summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--constants/scgb_constants.asm1
-rw-r--r--engine/gfx/color.asm2
-rw-r--r--engine/pokemon/mail_2.asm3
-rw-r--r--engine/pokemon/stats_screen.asm4
-rw-r--r--gfx/sgb/predef.pal2
5 files changed, 9 insertions, 3 deletions
diff --git a/constants/scgb_constants.asm b/constants/scgb_constants.asm
index 3625c858..cc5322b0 100644
--- a/constants/scgb_constants.asm
+++ b/constants/scgb_constants.asm
@@ -120,6 +120,7 @@ SCGB_DEFAULT EQU $ff
const PREDEFPAL_UNOWN_PUZZLE
const PREDEFPAL_GAMEFREAK_LOGO_OB
const PREDEFPAL_GAMEFREAK_LOGO_BG
+NUM_PREDEF_PALS EQU const_value
; SGB system command codes
; http://gbdev.gg8.se/wiki/articles/SGB_Functions#SGB_System_Command_Table
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
diff --git a/gfx/sgb/predef.pal b/gfx/sgb/predef.pal
index 720f62af..6277897e 100644
--- a/gfx/sgb/predef.pal
+++ b/gfx/sgb/predef.pal
@@ -1,4 +1,4 @@
- RGB 31,31,31, 22,25,19, 16,21,30, 00,00,00 ; PREDEFPAL_00
+ RGB 31,31,31, 22,25,19, 16,21,30, 00,00,00 ; PREDEFPAL_ROUTES
RGB 31,31,31, 27,28,31, 15,20,31, 00,00,00 ; PREDEFPAL_PALLET
RGB 31,31,31, 24,28,19, 15,20,31, 00,00,00 ; PREDEFPAL_VIRIDIAN
RGB 31,31,31, 24,24,24, 15,20,31, 00,00,00 ; PREDEFPAL_PEWTER