Difference between revisions of "Script Format"
Jump to navigation
Jump to search
(Updated and added commands) |
|||
Line 77: | Line 77: | ||
| 0x08 | | 0x08 | ||
| 4 | | 4 | ||
| | | Jumps to offset if flag is set | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 86: | Line 86: | ||
| 0 | | 0 | ||
| 1 | | 1 | ||
| | | Flag | ||
|- | |- | ||
| 1 | | 1 | ||
| 1 | | 1 | ||
| | | Value | ||
|- | |- | ||
| 2 | | 2 | ||
Line 100: | Line 100: | ||
| 0x09 | | 0x09 | ||
| 4 | | 4 | ||
| | | Jumps to offset if flag is not set | ||
{| class="wikitable" | |||
|- | |||
! Offset | |||
! Length | |||
! Name | |||
|- | |||
| 0 | |||
| 1 | |||
| Flag | |||
|- | |||
| 1 | |||
| 1 | |||
| Value | |||
|- | |||
| 2 | |||
| 2 | |||
| Offset to script location | |||
|} | |||
|- | |- | ||
Line 141: | Line 159: | ||
|- | |- | ||
| 0 | | 0 | ||
| 2 | | 2 | ||
| | | Pointer to options | ||
|- | |- | ||
| 3 | | 3 | ||
Line 168: | Line 182: | ||
| 0x1B | | 0x1B | ||
| 2 | | 2 | ||
| Call text script | | Call text script (16 byte address) | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 183: | Line 197: | ||
| 0x1C | | 0x1C | ||
| 3 | | 3 | ||
| Call text script | | Call text script (24 byte address) | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 229: | Line 243: | ||
| Offset | | Offset | ||
|} | |} | ||
|- | |||
| 0x48 | |||
| 2 | |||
| Event flag related | |||
|- | |||
| 0x6E | |||
| 1 | |||
| Update scene | |||
|- | |||
| 0x78 | |||
| x | |||
| Update BG fade | |||
|- | |||
| 0x80 | |||
| x | |||
| Set model mode | |||
|- | |||
| 0x87 | |||
| x | |||
| Move object | |||
|- | |- | ||
Line 234: | Line 273: | ||
| 0 | | 0 | ||
| Unknown | | Unknown | ||
|- | |||
| 0xC1 | |||
| x | |||
| Set scene time | |||
|- | |||
| 0xAA | |||
| x | |||
| Call script | |||
|- | |- |
Revision as of 21:31, 15 January 2013
Scripts are parsed bytewise.
Commands
Opcode | argument length (byte) | Function | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0x00 | 3 | Jump to 24byte offset
| ||||||||||||||||||
0x01 | 1 | Unknown | ||||||||||||||||||
0x02 | 2 | Setup a loop
| ||||||||||||||||||
0x03 | 1 | Execute loop
| ||||||||||||||||||
0x04 | 4 | Unknown | ||||||||||||||||||
0x07 | 2 | Set event flag
| ||||||||||||||||||
0x08 | 4 | Jumps to offset if flag is set
| ||||||||||||||||||
0x09 | 4 | Jumps to offset if flag is not set
| ||||||||||||||||||
0x14 | 8 | Port player
| ||||||||||||||||||
0x1A | 11 | Display choice dialog
| ||||||||||||||||||
0x1B | 2 | Call text script (16 byte address)
| ||||||||||||||||||
0x1C | 3 | Call text script (24 byte address)
| ||||||||||||||||||
0x1F | 0 | End script | ||||||||||||||||||
0x21 | 2 |
| ||||||||||||||||||
0x23 | 2 |
| ||||||||||||||||||
0x48 | 2 | Event flag related | ||||||||||||||||||
0x6E | 1 | Update scene | ||||||||||||||||||
0x78 | x | Update BG fade | ||||||||||||||||||
0x80 | x | Set model mode | ||||||||||||||||||
0x87 | x | Move object | ||||||||||||||||||
0x8F | 0 | Unknown | ||||||||||||||||||
0xC1 | x | Set scene time | ||||||||||||||||||
0xAA | x | Call script | ||||||||||||||||||
0xB7 | 0 | Unknown |