Verify script command table sizes

This commit is contained in:
Rangi
2021-03-11 16:28:52 -05:00
parent dbabd8b4a9
commit d132a20b7a
9 changed files with 17 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
MovementPointers:
; entries correspond to movement_* constants (see macros/scripts/movement.asm)
table_width 2, MovementPointers
dw Movement_turn_head_down ; 00
dw Movement_turn_head_up ; 01
dw Movement_turn_head_left ; 02
@@ -90,6 +91,7 @@ MovementPointers:
dw Movement_rock_smash ; 57
dw Movement_return_dig ; 58
dw Movement_skyfall_top ; 59
assert_table_length NUM_MOVEMENT_CMDS
Movement_teleport_from:
ld hl, OBJECT_STEP_TYPE

View File

@@ -63,6 +63,7 @@ RunScriptCommand:
ScriptCommandTable:
; entries correspond to *_command constants (see macros/scripts/events.asm)
table_width 2, ScriptCommandTable
dw Script_scall ; 00
dw Script_farscall ; 01
dw Script_memcall ; 02
@@ -233,6 +234,7 @@ ScriptCommandTable:
dw Script_getname ; a7
dw Script_wait ; a8
dw Script_checksave ; a9
assert_table_length NUM_EVENT_COMMANDS
StartScript:
ld hl, wScriptFlags