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:
@@ -7,6 +7,7 @@ ENDM
|
||||
|
||||
FishGroups:
|
||||
; entries correspond to FISHGROUP_* constants
|
||||
table_width FISHGROUP_DATA_LENGTH, FishGroups
|
||||
fishgroup 50 percent + 1, .Shore_Old, .Shore_Good, .Shore_Super
|
||||
fishgroup 50 percent + 1, .Ocean_Old, .Ocean_Good, .Ocean_Super
|
||||
fishgroup 50 percent + 1, .Lake_Old, .Lake_Good, .Lake_Super
|
||||
@@ -20,6 +21,7 @@ FishGroups:
|
||||
fishgroup 50 percent + 1, .Qwilfish_Old, .Qwilfish_Good, .Qwilfish_Super
|
||||
fishgroup 50 percent + 1, .Remoraid_Old, .Remoraid_Good, .Remoraid_Super
|
||||
fishgroup 50 percent + 1, .Qwilfish_NoSwarm_Old, .Qwilfish_NoSwarm_Good, .Qwilfish_NoSwarm_Super
|
||||
assert_table_length NUM_FISHGROUPS
|
||||
|
||||
.Shore_Old:
|
||||
db 70 percent + 1, MAGIKARP, 10
|
||||
|
Reference in New Issue
Block a user