summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/debug/debug_room.asm2
-rw-r--r--engine/events/lucky_number.asm2
-rw-r--r--engine/pokemon/bills_pc.asm23
-rw-r--r--engine/pokemon/bills_pc_top.asm6
-rw-r--r--engine/pokemon/search.asm6
5 files changed, 23 insertions, 16 deletions
diff --git a/engine/debug/debug_room.asm b/engine/debug/debug_room.asm
index 498b307f3..9f2b9287d 100644
--- a/engine/debug/debug_room.asm
+++ b/engine/debug/debug_room.asm
@@ -1355,6 +1355,7 @@ DebugRoom_BoxStructStrings:
.SendBox: db "SEND BOX@"
DebugRoom_BoxAddresses:
+ table_width 3, DebugRoom_BoxAddresses
dba sBox1
dba sBox2
dba sBox3
@@ -1369,6 +1370,7 @@ DebugRoom_BoxAddresses:
dba sBox12
dba sBox13
dba sBox14
+ assert_table_length NUM_BOXES
DebugRoomMenu_RTCEdit:
ld hl, .PagedValuesHeader
diff --git a/engine/events/lucky_number.asm b/engine/events/lucky_number.asm
index 1c2329b37..ea0c55e08 100644
--- a/engine/events/lucky_number.asm
+++ b/engine/events/lucky_number.asm
@@ -192,6 +192,7 @@ CheckForLuckyNumberWinners:
ret
.BoxBankAddresses:
+ table_width 3, CheckForLuckyNumberWinners.BoxBankAddresses
dba sBox1
dba sBox2
dba sBox3
@@ -206,6 +207,7 @@ CheckForLuckyNumberWinners:
dba sBox12
dba sBox13
dba sBox14
+ assert_table_length NUM_BOXES
.LuckyNumberMatchPartyText:
text_far _LuckyNumberMatchPartyText
diff --git a/engine/pokemon/bills_pc.asm b/engine/pokemon/bills_pc.asm
index e9a0bc82f..79842c06c 100644
--- a/engine/pokemon/bills_pc.asm
+++ b/engine/pokemon/bills_pc.asm
@@ -2140,7 +2140,7 @@ GetBoxPointer:
dec b
ld c, b
ld b, 0
- ld hl, .boxes
+ ld hl, .BoxBankAddresses
add hl, bc
add hl, bc
add hl, bc
@@ -2151,8 +2151,8 @@ GetBoxPointer:
ld l, a
ret
-.boxes
- ; bank, address
+.BoxBankAddresses:
+ table_width 3, GetBoxPointer.BoxBankAddresses
dba sBox1
dba sBox2
dba sBox3
@@ -2167,6 +2167,7 @@ GetBoxPointer:
dba sBox12
dba sBox13
dba sBox14
+ assert_table_length NUM_BOXES
BillsPC_ApplyPalettes:
ld b, a
@@ -2319,19 +2320,15 @@ BillsPC_PrintBoxCountAndCapacity:
ld de, wTextDecimalByte
lb bc, 1, 2
call PrintNum
- ld de, .out_of_20
+ ld de, .OutOf20
call PlaceString
ret
.Pokemon:
db "#MON@"
-.out_of_20
- ; db "/20@"
- db "/"
- db "0" + MONS_PER_BOX / 10 ; "2"
- db "0" + MONS_PER_BOX % 10 ; "0"
- db "@"
+.OutOf20:
+ db "/{d:MONS_PER_BOX}@" ; "/20@"
GetBoxCount:
ld a, [wCurBox]
@@ -2342,7 +2339,7 @@ GetBoxCount:
jr z, .activebox
ld c, a
ld b, 0
- ld hl, .boxbanks
+ ld hl, .BoxBankAddresses
add hl, bc
add hl, bc
add hl, bc
@@ -2374,7 +2371,8 @@ GetBoxCount:
call CloseSRAM
ret
-.boxbanks
+.BoxBankAddresses:
+ table_width 3, GetBoxCount.BoxBankAddresses
dba sBox1
dba sBox2
dba sBox3
@@ -2389,6 +2387,7 @@ GetBoxCount:
dba sBox12
dba sBox13
dba sBox14
+ assert_table_length NUM_BOXES
BillsPC_PrintBoxName:
hlcoord 0, 0
diff --git a/engine/pokemon/bills_pc_top.asm b/engine/pokemon/bills_pc_top.asm
index 1e4cf8728..480adefa1 100644
--- a/engine/pokemon/bills_pc_top.asm
+++ b/engine/pokemon/bills_pc_top.asm
@@ -266,7 +266,7 @@ LoadBoxMonListing: ; unreferenced
cp b
jr z, .same_box
ld a, b
- ld hl, .BoxAddrs
+ ld hl, .BoxAddresses
ld bc, 3
call AddNTimes
ld a, [hli]
@@ -364,7 +364,8 @@ LoadBoxMonListing: ; unreferenced
call CloseSRAM
ret
-.BoxAddrs:
+.BoxAddresses:
+ table_width 3, LoadBoxMonListing.BoxAddresses
dba sBox1
dba sBox2
dba sBox3
@@ -379,3 +380,4 @@ LoadBoxMonListing: ; unreferenced
dba sBox12
dba sBox13
dba sBox14
+ assert_table_length NUM_BOXES
diff --git a/engine/pokemon/search.asm b/engine/pokemon/search.asm
index 522ed3493..f74c11875 100644
--- a/engine/pokemon/search.asm
+++ b/engine/pokemon/search.asm
@@ -113,7 +113,7 @@ CheckOwnMonAnywhere:
jr z, .loopbox
; Load the box.
- ld hl, BoxAddressTable
+ ld hl, SearchBoxAddressTable
ld b, 0
add hl, bc
add hl, bc
@@ -244,7 +244,8 @@ endr
scf
ret
-BoxAddressTable:
+SearchBoxAddressTable:
+ table_width 3, SearchBoxAddressTable
dba sBox1
dba sBox2
dba sBox3
@@ -259,6 +260,7 @@ BoxAddressTable:
dba sBox12
dba sBox13
dba sBox14
+ assert_table_length NUM_BOXES
UpdateOTPointer:
push hl