summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2021-10-24 18:25:44 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2021-10-24 18:28:54 -0400
commit187b120007f14b2b7f44bad5a33de6021ec07d1a (patch)
treec2762cea026eab148626b7f522cc4bcb4d44ace8 /engine
parentd4a6a1b2bcf94915020f2a6c96b8004479185325 (diff)
Add assertions to some more tables
Diffstat (limited to 'engine')
-rw-r--r--engine/gfx/color.asm2
-rw-r--r--engine/pokemon/mail_2.asm3
-rw-r--r--engine/pokemon/stats_screen.asm2
3 files changed, 7 insertions, 0 deletions
diff --git a/engine/gfx/color.asm b/engine/gfx/color.asm
index b6d1a2b2e..af7b7cd3d 100644
--- a/engine/gfx/color.asm
+++ b/engine/gfx/color.asm
@@ -1170,7 +1170,9 @@ INCLUDE "gfx/sgb/pal_packets.asm"
INCLUDE "data/sgb_ctrl_packets.asm"
PredefPals:
+ table_width PALETTE_SIZE, PredefPals
INCLUDE "gfx/sgb/predef.pal"
+ assert_table_length NUM_PREDEF_PALS
SGBBorderMapAndPalettes:
; interleaved tile ids and palette ids, without the center 20x18 screen area
diff --git a/engine/pokemon/mail_2.asm b/engine/pokemon/mail_2.asm
index 634d5c69d..e0eb014b8 100644
--- a/engine/pokemon/mail_2.asm
+++ b/engine/pokemon/mail_2.asm
@@ -11,6 +11,7 @@
const BLUESKY_MAIL_INDEX ; 7
const MUSIC_MAIL_INDEX ; 8
const MIRAGE_MAIL_INDEX ; 9
+NUM_MAIL EQU const_value
ReadPartyMonMail:
ld a, [wCurPartyMon]
@@ -126,6 +127,7 @@ ReadAnyMail:
MailGFXPointers:
; entries correspond to *MAIL_INDEX constants
+ table_width 3, MailGFXPointers
dbw FLOWER_MAIL, LoadFlowerMailGFX
dbw SURF_MAIL, LoadSurfMailGFX
dbw LITEBLUEMAIL, LoadLiteBlueMailGFX
@@ -136,6 +138,7 @@ MailGFXPointers:
dbw BLUESKY_MAIL, LoadBlueSkyMailGFX
dbw MUSIC_MAIL, LoadMusicMailGFX
dbw MIRAGE_MAIL, LoadMirageMailGFX
+ assert_table_length NUM_MAIL
db -1 ; end
LoadSurfMailGFX:
diff --git a/engine/pokemon/stats_screen.asm b/engine/pokemon/stats_screen.asm
index 4c351ff91..932c0f72b 100644
--- a/engine/pokemon/stats_screen.asm
+++ b/engine/pokemon/stats_screen.asm
@@ -570,9 +570,11 @@ StatsScreen_LoadGFX:
.Jumptable:
; entries correspond to *_PAGE constants
+ table_width 2, StatsScreen_LoadGFX.Jumptable
dw LoadPinkPage
dw LoadGreenPage
dw LoadBluePage
+ assert_table_length NUM_STAT_PAGES
LoadPinkPage:
hlcoord 0, 9