From 95ec2cf039f0efdc6dadfb6fe766ace231a1b6b1 Mon Sep 17 00:00:00 2001 From: Rangi Date: Thu, 25 Mar 2021 16:33:05 -0400 Subject: Verify data table and name list sizes with assertion macros Fixes #312 --- data/maps/hide_show_data.asm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'data/maps/hide_show_data.asm') diff --git a/data/maps/hide_show_data.asm b/data/maps/hide_show_data.asm index fa0599f4..f54e484a 100644 --- a/data/maps/hide_show_data.asm +++ b/data/maps/hide_show_data.asm @@ -2,6 +2,7 @@ MapHSPointers: ; entries correspond to map ids + table_width 2, MapHSPointers dw PalletTownHS dw ViridianCityHS dw PewterCityHS @@ -250,6 +251,7 @@ MapHSPointers: dw NoHS dw NoHS dw NoHS + assert_table_length NUM_MAPS dw -1 ; end NoHS: @@ -257,6 +259,7 @@ NoHS: MissableObjects: ; entries correspond to HS_* constants (see constants/hide_show_constants) + table_width 3, MissableObjects ; format: map id, object id, HIDE/SHOW PalletTownHS: @@ -562,3 +565,4 @@ SeafoamIslandsB4FHS: db SEAFOAM_ISLANDS_B4F, $02, HIDE db SEAFOAM_ISLANDS_B4F, $03, SHOW db $FF, $01, SHOW ; end + assert_table_length NUM_HS_OBJECTS + 1 -- cgit v1.3.1-sl0p