Difference between revisions of "FF7/Field/Script/Opcodes/30 IFKEY"

From Final Fantasy Inside
< FF7‎ | Field‎ | Script‎ | Opcodes
Jump to navigation Jump to search
my_wiki>Synergy Blades
(Corrected)
my_wiki>Synergy Blades
m (Button IDs: Highlights)
Line 22: Line 22:
  
 
{| border="1" cellspacing="1" cellpadding="3" style="border: 1px solid black; border-collapse: collapse;"
 
{| border="1" cellspacing="1" cellpadding="3" style="border: 1px solid black; border-collapse: collapse;"
! style="background:rgb(204,204,204)" width="40" | ID
+
! style="background:rgb(204,204,204)" | ID
! style="background:rgb(204,204,204)" width="120" | Button
+
! style="background:rgb(204,204,204)" | Button
 
|-
 
|-
| align="center" | 0x0001
+
| style="background:rgb(255,255,204)" align="center" | 0x0001
| Assist
+
| style="background:rgb(255,255,204)" | Assist
 
|-
 
|-
 
| align="center" | 0x0008
 
| align="center" | 0x0008
Line 43: Line 43:
 
| Left
 
| Left
 
|-
 
|-
| align="center" | 0x0100
+
| style="background:rgb(255,255,204)" align="center" | 0x0100
| Camera
+
| style="background:rgb(255,255,204)" | Camera
 
|-
 
|-
| align="center" | 0x0200
+
| style="background:rgb(255,255,204)" align="center" | 0x0200
| Target
+
| style="background:rgb(255,255,204)" | Target
 
|-
 
|-
 
| align="center" | 0x0400
 
| align="center" | 0x0400

Revision as of 18:59, 19 January 2007

  • Opcode: 0x30
  • Short name: IFKEY
  • Long name: If Key Pressed

Memory layout

0x30 B A

Arguments

  • const UShort (Bit field) B: Button ID to check for.
  • const UByte A: Amount to jump if button not pressed.

Description

Checks the status of a button being pressed; if pressed, the "if" body executes (that is, the script pointer is moved to the opcode after the current IFKEY). If the checked button fails the condition check, then the script pointer moves ahead A bytes.

Button IDs

ID Button
0x0001 Assist
0x0008 Start
0x0010 Up
0x0020 Right
0x0040 Down
0x0080 Left
0x0100 Camera
0x0200 Target
0x0400 Page Up
0x0800 Page Down
0x1000 Menu
0x2000 OK
0x4000 Cancel
0x8000 Switch