diff options
author | Rangi <remy.oukaour+rangi42@gmail.com> | 2021-10-24 18:26:31 -0400 |
---|---|---|
committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2021-10-24 18:28:38 -0400 |
commit | 05130829f989db67f6bedf8fa52316052c7a863b (patch) | |
tree | 6110b666be3eb50fd901a24c903657cc21a19309 /engine | |
parent | 7ec200353eb6e4b91ae46792c973767fd8177caa (diff) |
Add assertions to some more tables
Diffstat (limited to 'engine')
-rw-r--r-- | engine/gfx/color.asm | 2 | ||||
-rw-r--r-- | engine/pokemon/mail_2.asm | 3 | ||||
-rw-r--r-- | engine/pokemon/stats_screen.asm | 4 |
3 files changed, 7 insertions, 2 deletions
diff --git a/engine/gfx/color.asm b/engine/gfx/color.asm index 47f5dbf5..908a600b 100644 --- a/engine/gfx/color.asm +++ b/engine/gfx/color.asm @@ -1087,7 +1087,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 651a5e59..95402ea1 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] @@ -107,6 +108,7 @@ ReadAnyMail: MailGFXPointers: ; entries correspond to *MAIL_INDEX constants + table_width 3, MailGFXPointers dbw FLOWER_MAIL, LoadFlowerMailGFX dbw SURF_MAIL, LoadSurfMailGFX dbw LITEBLUEMAIL, LoadLiteBlueMailGFX @@ -117,6 +119,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 4aa4db52..f90df262 100644 --- a/engine/pokemon/stats_screen.asm +++ b/engine/pokemon/stats_screen.asm @@ -4,8 +4,6 @@ const BLUE_PAGE ; 3 NUM_STAT_PAGES EQU const_value - 1 -STAT_PAGE_MASK EQU %00000011 - StatsScreenInit: ldh a, [hMapAnims] push af @@ -262,9 +260,11 @@ EggStats_ScrollToLoadMon: StatsScreen_LoadPageJumptable: ; entries correspond to *_PAGE constants + table_width 2, StatsScreen_LoadPageJumptable dw LoadPinkPage dw LoadGreenPage dw LoadBluePage + assert_table_length NUM_STAT_PAGES StatsScreen_InitUpperHalf: push bc |