FF7/Field/Script/Opcodes/30 IFKEY

From Final Fantasy Inside
< FF7‎ | Field‎ | Script‎ | Opcodes
Revision as of 18:59, 19 January 2007 by my_wiki>Synergy Blades (Button IDs: Highlights)
  • Opcode: 0x30
  • Short name: IFKEY
  • Long name: If Key Pressed

Contents

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