Difference between revisions of "FF7/Field/Script/Opcodes/30 IFKEY"
Jump to navigation
Jump to search
my_wiki>Synergy Blades m (→Arguments) |
my_wiki>Synergy Blades (Corrected) |
||
Line 1: | Line 1: | ||
* Opcode: '''0x30''' | * Opcode: '''0x30''' | ||
* Short name: '''IFKEY''' | * Short name: '''IFKEY''' | ||
− | * Long name: If Key | + | * Long name: If Key Pressed |
==== Memory layout ==== | ==== Memory layout ==== | ||
{| 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;" | ||
! width="40" | 0x30 | ! width="40" | 0x30 | ||
− | ! width="40" | ''B | + | ! width="40" | ''B'' |
− | |||
! width="40" | ''A'' | ! width="40" | ''A'' | ||
|} | |} | ||
Line 13: | Line 12: | ||
==== Arguments ==== | ==== Arguments ==== | ||
− | * '''const Bit | + | * '''const UShort (Bit field)''' ''B'': Button ID to check for. |
− | + | * '''const UByte''' ''A'': Amount to jump if button not pressed. | |
− | |||
− | * '''const UByte''' ''A'': Amount to jump if | ||
==== Description ==== | ==== Description ==== | ||
− | Checks the status of a button being pressed. If the checked button fails the condition check, then the | + | 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 ==== |
{| 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)" width="40" | ID | ||
− | ! style="background:rgb(204,204,204)" width=" | + | ! style="background:rgb(204,204,204)" width="120" | Button |
+ | |- | ||
+ | | align="center" | 0x0001 | ||
+ | | Assist | ||
+ | |- | ||
+ | | align="center" | 0x0008 | ||
+ | | Start | ||
+ | |- | ||
+ | | align="center" | 0x0010 | ||
+ | | Up | ||
+ | |- | ||
+ | | align="center" | 0x0020 | ||
+ | | Right | ||
+ | |- | ||
+ | | align="center" | 0x0040 | ||
+ | | Down | ||
+ | |- | ||
+ | | align="center" | 0x0080 | ||
+ | | Left | ||
+ | |- | ||
+ | | align="center" | 0x0100 | ||
+ | | Camera | ||
|- | |- | ||
− | | align="center" | | + | | align="center" | 0x0200 |
− | | | + | | Target |
|- | |- | ||
− | | align="center" | | + | | align="center" | 0x0400 |
− | | | + | | Page Up |
|- | |- | ||
− | | | + | | align="center" | 0x0800 |
− | + | | Page Down | |
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | | align="center" | | + | | align="center" | 0x1000 |
− | | | + | | Menu |
|- | |- | ||
− | | align="center" | | + | | align="center" | 0x2000 |
− | | | + | | OK |
|- | |- | ||
− | | align="center" | | + | | align="center" | 0x4000 |
− | | | + | | Cancel |
|- | |- | ||
− | | align="center" | | + | | align="center" | 0x8000 |
− | | | + | | Switch |
|- | |- | ||
|} | |} |
Revision as of 18:36, 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 |