Difference between revisions of "FF7/Field/Script/Opcodes/37 WNUMB"

From Final Fantasy Inside
< FF7‎ | Field‎ | Script‎ | Opcodes
Jump to navigation Jump to search
my_wiki>Synergy Blades
m
m (6 revisions imported)
 
(4 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
* Long name: Set Number
 
* Long name: Set Number
  
==== Memory layout ====
+
==== Memory layout ====
{| border="1" cellspacing="1" cellpadding="3" style="border: 1px solid black; border-collapse: collapse;"
+
 
 +
{| style="border: 1px solid black; border-collapse: collapse" border="1" cellspacing="1" cellpadding="3"
 
! width="40" | 0x37
 
! width="40" | 0x37
 
! width="50" | ''B1 / B2''
 
! width="50" | ''B1 / B2''
Line 12: Line 13:
 
|}
 
|}
  
==== Arguments ====
+
==== Arguments ====
  
* '''const Bit[4]''' ''B1'': Bank to retrieve lower two bytes of number, or zero if number is given as a literal value.
+
* '''const Bit[4]''' ''B1''<nowiki>: Bank to retrieve lower two bytes of number, or zero if number is given as a literal value. </nowiki>
* '''const Bit[4]''' ''B2'': Bank to retrieve higher two bytes of number, or zero if number is given as a literal value.
+
* '''const Bit[4]''' ''B2''<nowiki>: Bank to retrieve higher two bytes of number, or zero if number is given as a literal value. </nowiki>
* '''const UByte''' ''W'': Window ID whose numerical display will be set.
+
* '''const UByte''' ''W''<nowiki>: Window ID whose numerical display will be set. </nowiki>
* '''const ULong''' ''N'': A four-byte number to set the numerical display.
+
* '''const ULong''' ''N''<nowiki>: A four-byte number to set the numerical display. If </nowiki>''B1'' or ''B2'' are non-zero, this value is split into two two-byte values, indicating the address to find the number value in banks ''B1'' and ''B2'', respectively.
* '''const UByte''' ''C'': The number of digits to display, from 1 to 8.
+
* '''const UByte''' ''C''<nowiki>: The number of digits to display, from 1 to 8. </nowiki>
  
==== Description ====
+
==== Description ====
  
Sets the numerical display, as found in the [[FF7/Field/Script/Opcodes/36 WSPCL|WSPCL]] opcode. The number may be set with a specified value or retrieved from two 16-bit values, and the number of digits to show is specified with ''C''. The [[FF7/Field/Script/Opcodes/50 WINDOW|WINDOW]] ID must also be given, although this opcode can be used before the window has even been created with the WINDOW opcode.
+
Sets the numerical display, as found in the [[FF7/Field/Script/Opcodes/36_WSPCL|WSPCL]] opcode. The number may be set with a specified value or retrieved from two 16-bit values, and the number of digits to show is specified with ''C''. Unlike the other special window setting function, [[FF7/Field/Script/Opcodes/38_STTIM|STTIM]], the [[FF7/Field/Script/Opcodes/50_WINDOW|WINDOW]] ID must be given for this opcode.
  
 
If the value does not fit in the specified number of digits for the display, the higher units are not displayed.
 
If the value does not fit in the specified number of digits for the display, the higher units are not displayed.

Latest revision as of 05:16, 23 May 2019

  • Opcode: 0x37
  • Short name: WNUMB
  • Long name: Set Number

Memory layout

0x37 B1 / B2 W N C

Arguments

  • const Bit[4] B1: Bank to retrieve lower two bytes of number, or zero if number is given as a literal value.
  • const Bit[4] B2: Bank to retrieve higher two bytes of number, or zero if number is given as a literal value.
  • const UByte W: Window ID whose numerical display will be set.
  • const ULong N: A four-byte number to set the numerical display. If B1 or B2 are non-zero, this value is split into two two-byte values, indicating the address to find the number value in banks B1 and B2, respectively.
  • const UByte C: The number of digits to display, from 1 to 8.

Description

Sets the numerical display, as found in the WSPCL opcode. The number may be set with a specified value or retrieved from two 16-bit values, and the number of digits to show is specified with C. Unlike the other special window setting function, STTIM, the WINDOW ID must be given for this opcode.

If the value does not fit in the specified number of digits for the display, the higher units are not displayed.