Verify data table sizes with table_width and assert_table_length macros
This was discussed in #706 It also uncovered some off-by-one issues with defining some constants. A few structs now use rsreset/_RS to define their offset constants, as discussed in #739
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
ObjectActionPairPointers:
|
||||
; entries correspond to OBJECT_ACTION_* constants
|
||||
; entries correspond to OBJECT_ACTION_* constants (see constants/map_object_constants.asm)
|
||||
; normal action, frozen action
|
||||
table_width 2 + 2, ObjectActionPairPointers
|
||||
dw SetFacingStanding, SetFacingStanding
|
||||
dw SetFacingStandAction, SetFacingCurrent
|
||||
dw SetFacingStepAction, SetFacingCurrent
|
||||
@@ -18,6 +19,7 @@ ObjectActionPairPointers:
|
||||
dw SetFacingBoulderDust, SetFacingStanding
|
||||
dw SetFacingGrassShake, SetFacingStanding
|
||||
dw SetFacingSkyfall, SetFacingCurrent
|
||||
assert_table_length NUM_OBJECT_ACTIONS
|
||||
|
||||
SetFacingStanding:
|
||||
ld hl, OBJECT_FACING_STEP
|
||||
|
Reference in New Issue
Block a user