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:
@@ -199,6 +199,7 @@ NUM_SPRITEMOVEDATA EQU const_value
|
||||
const SPRITEMOVEFN_SPIN_COUNTERCLOCKWISE ; 19
|
||||
const SPRITEMOVEFN_BOULDERDUST ; 1a
|
||||
const SPRITEMOVEFN_GRASS ; 1b
|
||||
NUM_SPRITEMOVEFN EQU const_value
|
||||
|
||||
; StepTypesJumptable indexes (see engine/overworld/map_objects.asm)
|
||||
const_def
|
||||
@@ -228,6 +229,7 @@ NUM_SPRITEMOVEDATA EQU const_value
|
||||
const STEP_TYPE_17 ; 17
|
||||
const STEP_TYPE_DELETE ; 18
|
||||
const STEP_TYPE_SKYFALL_TOP ; 19
|
||||
NUM_STEP_TYPES EQU const_value
|
||||
|
||||
; ObjectActionPairPointers indexes (see engine/overworld/map_object_action.asm)
|
||||
const_def
|
||||
@@ -248,6 +250,7 @@ NUM_SPRITEMOVEDATA EQU const_value
|
||||
const OBJECT_ACTION_BOULDER_DUST ; 0e
|
||||
const OBJECT_ACTION_GRASS_SHAKE ; 0f
|
||||
const OBJECT_ACTION_SKYFALL ; 10
|
||||
NUM_OBJECT_ACTIONS EQU const_value
|
||||
|
||||
; Facings indexes (see data/sprites/facings.asm)
|
||||
const_def
|
||||
@@ -283,6 +286,7 @@ NUM_SPRITEMOVEDATA EQU const_value
|
||||
const FACING_BOULDER_DUST_2 ; 1d
|
||||
const FACING_GRASS_1 ; 1e
|
||||
const FACING_GRASS_2 ; 1f
|
||||
NUM_FACINGS EQU const_value
|
||||
|
||||
; DoPlayerMovement.DoStep arguments (see engine/overworld/player_movement.asm)
|
||||
const_def
|
||||
@@ -294,3 +298,4 @@ NUM_SPRITEMOVEDATA EQU const_value
|
||||
const STEP_TURN ; 5
|
||||
const STEP_BACK_LEDGE ; 6
|
||||
const STEP_WALK_IN_PLACE ; 7
|
||||
NUM_STEPS EQU const_value
|
||||
|
Reference in New Issue
Block a user