summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2021-03-16 18:08:25 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2021-03-16 18:08:25 -0400
commit2bc8cf5fc11d4ef84022840ad10cd05eaab12ae9 (patch)
treea51a504112ef948c1ddcb0b7e31c2f285f3b84a9
parent8b5dde16c3e7f7ad87a095f71cc6b61cf00b2bb8 (diff)
Revise some constant definitions
-rw-r--r--audio/notes.asm3
-rw-r--r--constants/audio_constants.asm1
-rw-r--r--constants/battle_constants.asm22
-rw-r--r--constants/gfx_constants.asm2
-rw-r--r--constants/hardware_constants.asm5
-rw-r--r--constants/landmark_constants.asm2
-rw-r--r--constants/map_data_constants.asm2
-rw-r--r--constants/map_setup_constants.asm1
-rw-r--r--constants/npc_trade_constants.asm2
-rw-r--r--constants/phone_constants.asm26
-rw-r--r--constants/radio_constants.asm3
-rw-r--r--constants/scgb_constants.asm4
-rw-r--r--constants/script_constants.asm2
-rw-r--r--constants/sprite_data_constants.asm17
-rw-r--r--constants/text_constants.asm21
-rw-r--r--constants/trainer_data_constants.asm16
-rw-r--r--data/maps/environment_colors.asm2
-rw-r--r--data/maps/setup_scripts.asm2
-rw-r--r--engine/gfx/cgb_layouts.asm6
-rw-r--r--engine/gfx/load_font.asm4
-rw-r--r--engine/gfx/sgb_layouts.asm6
-rw-r--r--engine/pokegear/pokegear.asm12
-rw-r--r--gfx/font.asm1
-rw-r--r--gfx/footprints.asm2
-rw-r--r--home/battle_vars.asm2
25 files changed, 91 insertions, 75 deletions
diff --git a/audio/notes.asm b/audio/notes.asm
index eeb84959..e1d69313 100644
--- a/audio/notes.asm
+++ b/audio/notes.asm
@@ -1,4 +1,5 @@
FrequencyTable:
+ table_width 2, FrequencyTable
dw 0 ; __
dw $f82c ; C_
dw $f89d ; C#
@@ -12,6 +13,7 @@ FrequencyTable:
dw $fb58 ; A_
dw $fb9b ; A#
dw $fbda ; B_
+ assert_table_length NUM_NOTES + 1
dw $fc16 ; C_
dw $fc4e ; C#
dw $fc83 ; D_
@@ -24,3 +26,4 @@ FrequencyTable:
dw $fdac ; A_
dw $fdcd ; A#
dw $fded ; B_
+ assert_table_length NUM_NOTES * 2 + 1
diff --git a/constants/audio_constants.asm b/constants/audio_constants.asm
index 640b1e8c..bf275385 100644
--- a/constants/audio_constants.asm
+++ b/constants/audio_constants.asm
@@ -13,6 +13,7 @@
const A_ ; a
const A# ; b
const B_ ; c
+NUM_NOTES EQU const_value - 1
; channel
; ChannelPointers indexes (see audio/engine.asm)
diff --git a/constants/battle_constants.asm b/constants/battle_constants.asm
index c7d3f155..f486bf51 100644
--- a/constants/battle_constants.asm
+++ b/constants/battle_constants.asm
@@ -41,15 +41,15 @@ BASE_AI_SWITCH_SCORE EQU 10
NUM_LEVEL_STATS EQU const_value
; move struct members (see data/moves/moves.asm)
- const_def
- const MOVE_ANIM ; 0
- const MOVE_EFFECT ; 1
- const MOVE_POWER ; 2
- const MOVE_TYPE ; 3
- const MOVE_ACC ; 4
- const MOVE_PP ; 5
- const MOVE_CHANCE ; 6
-MOVE_LENGTH EQU const_value
+rsreset
+MOVE_ANIM rb ; 0
+MOVE_EFFECT rb ; 1
+MOVE_POWER rb ; 2
+MOVE_TYPE rb ; 3
+MOVE_ACC rb ; 4
+MOVE_PP rb ; 5
+MOVE_CHANCE rb ; 6
+MOVE_LENGTH EQU _RS
; stat constants
; indexes for:
@@ -95,7 +95,7 @@ SPDSPCDV_SHINY EQU $AA
const BATTLETYPE_TRAP
const BATTLETYPE_FORCEITEM
-; BattleVarPairs indexes (see home/battle.asm)
+; BattleVarPairs indexes (see home/battle_vars.asm)
const_def
const BATTLE_VARS_SUBSTATUS1
const BATTLE_VARS_SUBSTATUS2
@@ -120,7 +120,7 @@ SPDSPCDV_SHINY EQU $AA
const BATTLE_VARS_LAST_MOVE_OPP
NUM_BATTLE_VARS EQU const_value
-; BattleVarLocations indexes (see home/battle.asm)
+; BattleVarLocations indexes (see home/battle_vars.asm)
const_def
const PLAYER_SUBSTATUS_1
const ENEMY_SUBSTATUS_1
diff --git a/constants/gfx_constants.asm b/constants/gfx_constants.asm
index fe042b15..546274a9 100644
--- a/constants/gfx_constants.asm
+++ b/constants/gfx_constants.asm
@@ -28,7 +28,7 @@ EXP_BAR_LENGTH EQU 8 ; tiles
HP_BAR_LENGTH_PX EQU HP_BAR_LENGTH * TILE_WIDTH ; pixels
EXP_BAR_LENGTH_PX EQU EXP_BAR_LENGTH * TILE_WIDTH ; pixels
-; GetHPPal return values (see home.asm)
+; GetHPPal return values (see home/tilemap.asm)
HP_GREEN EQU 0
HP_YELLOW EQU 1
HP_RED EQU 2
diff --git a/constants/hardware_constants.asm b/constants/hardware_constants.asm
index f9014380..93f0dec6 100644
--- a/constants/hardware_constants.asm
+++ b/constants/hardware_constants.asm
@@ -1,5 +1,6 @@
-; Graciously aped from:
-; http://nocash.emubase.de/pandocs.htm
+; Graciously derived from:
+; https://gbdev.io/pandocs/
+; https://github.com/gbdev/hardware.inc
; http://gameboy.mongenel.com/dmg/asmmemmap.html
; memory map
diff --git a/constants/landmark_constants.asm b/constants/landmark_constants.asm
index afece24e..200e66d5 100644
--- a/constants/landmark_constants.asm
+++ b/constants/landmark_constants.asm
@@ -1,7 +1,7 @@
; Landmarks indexes (see data/maps/landmarks.asm)
const_def
-; Johto landmarks
const LANDMARK_SPECIAL ; 00
+; Johto landmarks
const LANDMARK_NEW_BARK_TOWN ; 01
const LANDMARK_ROUTE_29 ; 02
const LANDMARK_CHERRYGROVE_CITY ; 03
diff --git a/constants/map_data_constants.asm b/constants/map_data_constants.asm
index 7af919b1..a521204c 100644
--- a/constants/map_data_constants.asm
+++ b/constants/map_data_constants.asm
@@ -18,6 +18,7 @@ MAP_FISHGROUP rb ; 8
MAP_LENGTH EQU _RS
; map environments (wEnvironment)
+; EnvironmentColorsPointers indexes (see data/maps/environment_colors.asm)
const_def 1
const TOWN
const ROUTE
@@ -26,6 +27,7 @@ MAP_LENGTH EQU _RS
const ENVIRONMENT_5
const GATE
const DUNGEON
+NUM_ENVIRONMENTS EQU const_value - 1
; map palettes (wEnvironment)
const_def
diff --git a/constants/map_setup_constants.asm b/constants/map_setup_constants.asm
index ae587e55..ba845664 100644
--- a/constants/map_setup_constants.asm
+++ b/constants/map_setup_constants.asm
@@ -12,6 +12,7 @@
const MAPSETUP_TRAIN ; f9
const MAPSETUP_SUBMENU ; fa
const MAPSETUP_BADWARP ; fb
+NUM_MAPSETUP_SCRIPTS EQU const_value - $f1
; callback types
const_def 1
diff --git a/constants/npc_trade_constants.asm b/constants/npc_trade_constants.asm
index 51431e8c..72333a65 100644
--- a/constants/npc_trade_constants.asm
+++ b/constants/npc_trade_constants.asm
@@ -1,4 +1,4 @@
- ; npctrade struct members (see data/events/npc_trades.asm)
+; npctrade struct members (see data/events/npc_trades.asm)
rsreset
NPCTRADE_DIALOG rb
NPCTRADE_GIVEMON rb
diff --git a/constants/phone_constants.asm b/constants/phone_constants.asm
index 48ae6e2d..0721ca99 100644
--- a/constants/phone_constants.asm
+++ b/constants/phone_constants.asm
@@ -54,20 +54,18 @@ NUM_SPECIALCALLS EQU const_value - 1
SPECIALCALL_SIZE EQU 6
; phone struct members
- const_def
- const PHONE_CONTACT_TRAINER_CLASS
- const PHONE_CONTACT_TRAINER_NUMBER
- const PHONE_CONTACT_MAP_GROUP
- const PHONE_CONTACT_MAP_NUMBER
- const PHONE_CONTACT_SCRIPT1_TIME
- const PHONE_CONTACT_SCRIPT1_BANK
- const PHONE_CONTACT_SCRIPT1_ADDR
- const_skip ; high PHONE_CONTACT_SCRIPT1_ADDR byte
- const PHONE_CONTACT_SCRIPT2_TIME
- const PHONE_CONTACT_SCRIPT2_BANK
- const PHONE_CONTACT_SCRIPT2_ADDR
- const_skip ; high PHONE_CONTACT_SCRIPT2_ADDR byte
-PHONE_CONTACT_SIZE EQU const_value
+rsreset
+PHONE_CONTACT_TRAINER_CLASS rb
+PHONE_CONTACT_TRAINER_NUMBER rb
+PHONE_CONTACT_MAP_GROUP rb
+PHONE_CONTACT_MAP_NUMBER rb
+PHONE_CONTACT_SCRIPT1_TIME rb
+PHONE_CONTACT_SCRIPT1_BANK rb
+PHONE_CONTACT_SCRIPT1_ADDR rw
+PHONE_CONTACT_SCRIPT2_TIME rb
+PHONE_CONTACT_SCRIPT2_BANK rb
+PHONE_CONTACT_SCRIPT2_ADDR rw
+PHONE_CONTACT_SIZE EQU _RS
; maximum number of pokegear contacts
CONTACT_LIST_SIZE EQU 10
diff --git a/constants/radio_constants.asm b/constants/radio_constants.asm
index 0a6f5d49..9a4c181d 100644
--- a/constants/radio_constants.asm
+++ b/constants/radio_constants.asm
@@ -75,7 +75,7 @@ NUM_RADIO_CHANNELS EQU const_value
const POKEDEX_SHOW_8 ; 42
NUM_RADIO_SEGMENTS EQU const_value
-; PlayRadio.StationPointers indexes (see engine/pokegear/pokegear.asm)
+; PlayRadioStationPointers indexes (see engine/pokegear/pokegear.asm)
const_def
const MAPRADIO_POKEMON_CHANNEL
const MAPRADIO_OAKS_POKEMON_TALK
@@ -86,6 +86,7 @@ NUM_RADIO_SEGMENTS EQU const_value
const MAPRADIO_PLACES_PEOPLE
const MAPRADIO_LETS_ALL_SING
const MAPRADIO_ROCKET
+NUM_MAP_RADIO_STATIONS EQU const_value
; These tables in engine/pokegear/radio.asm are all sized to a power of 2
; so there's no need for a rejection sampling loop
diff --git a/constants/scgb_constants.asm b/constants/scgb_constants.asm
index d07f89ae..3625c858 100644
--- a/constants/scgb_constants.asm
+++ b/constants/scgb_constants.asm
@@ -1,4 +1,5 @@
-; GetSGBLayout arguments (see engine/gfx/cgb_layouts.asm and engine/gfx/sgb_layouts.asm)
+; CGBLayoutJumptable indexes (see engine/gfx/cgb_layouts.asm)
+; SGBLayoutJumptable indexes (see engine/gfx/sgb_layouts.asm)
const_def
const SCGB_BATTLE_GRAYSCALE
const SCGB_BATTLE_COLORS
@@ -32,6 +33,7 @@
const SCGB_MYSTERY_GIFT
const SCGB_1E
const SCGB_POKEDEX_5X5
+NUM_SCGB_LAYOUTS EQU const_value
SCGB_PARTY_MENU_HP_BARS EQU $fc
SCGB_DEFAULT EQU $ff
diff --git a/constants/script_constants.asm b/constants/script_constants.asm
index 0c978484..0867a528 100644
--- a/constants/script_constants.asm
+++ b/constants/script_constants.asm
@@ -1,4 +1,4 @@
-; person constants
+; object constants
PLAYER EQU 0
LAST_TALKED EQU -2
diff --git a/constants/sprite_data_constants.asm b/constants/sprite_data_constants.asm
index 271faca1..64ff9c83 100644
--- a/constants/sprite_data_constants.asm
+++ b/constants/sprite_data_constants.asm
@@ -1,12 +1,11 @@
-; overworld_sprite struct members (see data/sprites.asm)
- const_def
- const SPRITEDATA_ADDR ; 0
- const_skip ; high SPRITEDATA_ADDR byte
- const SPRITEDATA_SIZE ; 2
- const SPRITEDATA_BANK ; 3
- const SPRITEDATA_TYPE ; 4
- const SPRITEDATA_PALETTE ; 5
-NUM_SPRITEDATA_FIELDS EQU const_value
+; overworld_sprite struct members (see data/sprites/sprites.asm)
+rsreset
+SPRITEDATA_ADDR rw ; 0
+SPRITEDATA_SIZE rb ; 2
+SPRITEDATA_BANK rb ; 3
+SPRITEDATA_TYPE rb ; 4
+SPRITEDATA_PALETTE rb ; 5
+NUM_SPRITEDATA_FIELDS EQU _RS
; sprite types
const_def 1
diff --git a/constants/text_constants.asm b/constants/text_constants.asm
index dbe06a36..a42835f2 100644
--- a/constants/text_constants.asm
+++ b/constants/text_constants.asm
@@ -1,10 +1,10 @@
; name lengths
-NAME_LENGTH EQU 11
-PLAYER_NAME_LENGTH EQU 8
-BOX_NAME_LENGTH EQU 9
-MON_NAME_LENGTH EQU 11
-MOVE_NAME_LENGTH EQU 13
-ITEM_NAME_LENGTH EQU 13
+NAME_LENGTH EQU 11
+PLAYER_NAME_LENGTH EQU 8
+BOX_NAME_LENGTH EQU 9
+MON_NAME_LENGTH EQU 11
+MOVE_NAME_LENGTH EQU 13
+ITEM_NAME_LENGTH EQU 13
TRAINER_CLASS_NAME_LENGTH EQU 13
NAME_LENGTH_JAPANESE EQU 6
@@ -30,6 +30,9 @@ TEXTBOX_INNERX EQU TEXTBOX_X + 1
TEXTBOX_Y EQU SCREEN_HEIGHT - TEXTBOX_HEIGHT
TEXTBOX_INNERY EQU TEXTBOX_Y + 2
+; see gfx/frames/*.png
+TEXTBOX_FRAME_TILES EQU 6
+
; PrintNum bit flags
const_def 5
const PRINTNUM_MONEY_F ; 5
@@ -37,9 +40,9 @@ TEXTBOX_INNERY EQU TEXTBOX_Y + 2
const PRINTNUM_LEADINGZEROS_F ; 7
; PrintNum arguments (see engine/math/print_num.asm)
-PRINTNUM_MONEY EQU 1 << PRINTNUM_MONEY_F
-PRINTNUM_LEFTALIGN EQU 1 << PRINTNUM_LEFTALIGN_F
-PRINTNUM_LEADINGZEROS EQU 1 << PRINTNUM_LEADINGZEROS_F
+PRINTNUM_MONEY EQU 1 << PRINTNUM_MONEY_F
+PRINTNUM_LEFTALIGN EQU 1 << PRINTNUM_LEFTALIGN_F
+PRINTNUM_LEADINGZEROS EQU 1 << PRINTNUM_LEADINGZEROS_F
; character sets (see charmap.asm)
FIRST_REGULAR_TEXT_CHAR EQU $60
diff --git a/constants/trainer_data_constants.asm b/constants/trainer_data_constants.asm
index 0f893253..fd081b7c 100644
--- a/constants/trainer_data_constants.asm
+++ b/constants/trainer_data_constants.asm
@@ -1,13 +1,11 @@
; TrainerClassAttributes struct members (see data/trainers/attributes.asm)
- const_def
- const TRNATTR_ITEM1 ; 0
- const TRNATTR_ITEM2 ; 1
- const TRNATTR_BASEMONEY ; 2
- const TRNATTR_AI_MOVE_WEIGHTS ; 3
- const_skip ; high TRNATTR_AI_MOVE_WEIGHTS byte
- const TRNATTR_AI_ITEM_SWITCH ; 5
- const_skip ; high TRNATTR_AI_ITEM_SWITCH byte
-NUM_TRAINER_ATTRIBUTES EQU const_value
+rsreset
+TRNATTR_ITEM1 rb ; 0
+TRNATTR_ITEM2 rb ; 1
+TRNATTR_BASEMONEY rb ; 2
+TRNATTR_AI_MOVE_WEIGHTS rw ; 3
+TRNATTR_AI_ITEM_SWITCH rw ; 5
+NUM_TRAINER_ATTRIBUTES EQU _RS
; TRNATTR_AI_MOVE_WEIGHTS bit flags (wEnemyTrainerAIFlags)
; AIScoringPointers indexes (see engine/battle/ai/move.asm)
diff --git a/data/maps/environment_colors.asm b/data/maps/environment_colors.asm
index 3497b2b9..99e9be73 100644
--- a/data/maps/environment_colors.asm
+++ b/data/maps/environment_colors.asm
@@ -1,5 +1,6 @@
EnvironmentColorsPointers:
; entries correspond to environment constants (see constants/map_data_constants.asm)
+ table_width 2, EnvironmentColorsPointers
dw .OutdoorColors ; unused
dw .OutdoorColors ; TOWN
dw .OutdoorColors ; ROUTE
@@ -8,6 +9,7 @@ EnvironmentColorsPointers:
dw .Env5Colors ; ENVIRONMENT_5
dw .IndoorColors ; GATE
dw .DungeonColors ; DUNGEON
+ assert_table_length NUM_ENVIRONMENTS + 1
; Valid indices: $00 - $29 (see gfx/tilesets/bg_tiles.pal)
.OutdoorColors:
diff --git a/data/maps/setup_scripts.asm b/data/maps/setup_scripts.asm
index 255831d4..506d8fe4 100644
--- a/data/maps/setup_scripts.asm
+++ b/data/maps/setup_scripts.asm
@@ -1,5 +1,6 @@
MapSetupScripts:
; entries correspond to MAPSETUP_* constants (see constants/map_setup_constants.asm)
+ table_width 2, MapSetupScripts
dw MapSetupScript_Warp
dw MapSetupScript_Continue
dw MapSetupScript_ReloadMap
@@ -11,6 +12,7 @@ MapSetupScripts:
dw MapSetupScript_Train
dw MapSetupScript_Submenu
dw MapSetupScript_BadWarp
+ assert_table_length NUM_MAPSETUP_SCRIPTS
; valid commands are listed in MapSetupCommands (see data/maps/setup_script_pointers.asm)
mapsetup: MACRO
diff --git a/engine/gfx/cgb_layouts.asm b/engine/gfx/cgb_layouts.asm
index a830e45a..c0f0dbf5 100644
--- a/engine/gfx/cgb_layouts.asm
+++ b/engine/gfx/cgb_layouts.asm
@@ -17,7 +17,7 @@ LoadSGBLayoutCGB:
ld l, a
ld h, 0
add hl, hl
- ld de, .Jumptable
+ ld de, CGBLayoutJumptable
add hl, de
ld a, [hli]
ld h, [hl]
@@ -28,7 +28,8 @@ LoadSGBLayoutCGB:
.done:
ret
-.Jumptable:
+CGBLayoutJumptable:
+ table_width 2, CGBLayoutJumptable
dw _CGB_BattleGrayscale
dw _CGB_BattleColors
dw _CGB_PokegearPals
@@ -61,6 +62,7 @@ LoadSGBLayoutCGB:
dw _CGB_MysteryGift
dw _CGB_Unused1E
dw _CGB_Pokedex_5x5
+ assert_table_length NUM_SCGB_LAYOUTS
_CGB_BattleGrayscale:
ld hl, PalPacket_BattleGrayscale + 1
diff --git a/engine/gfx/load_font.asm b/engine/gfx/load_font.asm
index b41badc2..d6658137 100644
--- a/engine/gfx/load_font.asm
+++ b/engine/gfx/load_font.asm
@@ -29,13 +29,13 @@ _LoadFontsBattleExtra::
LoadFrame:
ld a, [wTextboxFrame]
maskbits NUM_FRAMES
- ld bc, 6 * LEN_1BPP_TILE
+ ld bc, TEXTBOX_FRAME_TILES * LEN_1BPP_TILE
ld hl, Frames
call AddNTimes
ld d, h
ld e, l
ld hl, vTiles2 tile "┌" ; $79
- lb bc, BANK(Frames), 6 ; "┌" to "┘"
+ lb bc, BANK(Frames), TEXTBOX_FRAME_TILES ; "┌" to "┘"
call Get1bpp
ld hl, vTiles2 tile " " ; $7f
ld de, TextboxSpaceGFX
diff --git a/engine/gfx/sgb_layouts.asm b/engine/gfx/sgb_layouts.asm
index 1b2799bf..b7a6fc3f 100644
--- a/engine/gfx/sgb_layouts.asm
+++ b/engine/gfx/sgb_layouts.asm
@@ -12,7 +12,7 @@ LoadSGBLayout:
ld l, a
ld h, 0
add hl, hl
- ld de, .Jumptable
+ ld de, SGBLayoutJumptable
add hl, de
ld a, [hli]
ld h, [hl]
@@ -21,7 +21,8 @@ LoadSGBLayout:
push de
jp hl
-.Jumptable:
+SGBLayoutJumptable:
+ table_width 2, SGBLayoutJumptable
dw .SGB_BattleGrayscale
dw .SGB_BattleColors
dw .SGB_PokegearPals
@@ -54,6 +55,7 @@ LoadSGBLayout:
dw .SGB_MysteryGift
dw .SGB_Unused1E
dw .SGB_Pokedex_5x5
+ assert_table_length NUM_SCGB_LAYOUTS
.SGB_BattleGrayscale:
ld hl, PalPacket_BattleGrayscale
diff --git a/engine/pokegear/pokegear.asm b/engine/pokegear/pokegear.asm
index acef7b42..ee040de3 100644
--- a/engine/pokegear/pokegear.asm
+++ b/engine/pokegear/pokegear.asm
@@ -1907,7 +1907,7 @@ PlayRadio:
.PlayStation:
ld a, ENTER_MAP_MUSIC
ld [wPokegearRadioMusicPlaying], a
- ld hl, .StationPointers
+ ld hl, PlayRadioStationPointers
ld d, 0
add hl, de
add hl, de
@@ -1934,9 +1934,10 @@ PlayRadio:
call WaitBGMap
ret
-.StationPointers:
+PlayRadioStationPointers:
; entries correspond to MAPRADIO_* constants
- dw .OakOrPnP
+ table_width 2, PlayRadioStationPointers
+ dw LoadStation_PokemonChannel
dw LoadStation_OaksPokemonTalk
dw LoadStation_PokedexShow
dw LoadStation_PokemonMusic
@@ -1945,8 +1946,9 @@ PlayRadio:
dw LoadStation_PlacesAndPeople
dw LoadStation_LetsAllSing
dw LoadStation_RocketRadio
+ assert_table_length NUM_MAP_RADIO_STATIONS
-.OakOrPnP:
+LoadStation_PokemonChannel:
call IsInJohto
and a
jr nz, .kanto
@@ -1956,7 +1958,7 @@ PlayRadio:
jp z, LoadStation_PokedexShow
jp LoadStation_OaksPokemonTalk
-.kanto
+.kanto:
jp LoadStation_PlacesAndPeople
PokegearMap:
diff --git a/gfx/font.asm b/gfx/font.asm
index 679141e3..ab7c46e5 100644
--- a/gfx/font.asm
+++ b/gfx/font.asm
@@ -49,7 +49,6 @@ FontsExtra_SolidBlackAndUpArrowGFX:
INCBIN "gfx/font/black.1bpp"
INCBIN "gfx/font/up_arrow.1bpp"
-Footprints:
INCLUDE "gfx/footprints.asm"
UnownFont:
diff --git a/gfx/footprints.asm b/gfx/footprints.asm
index aeff1658..7acf1c74 100644
--- a/gfx/footprints.asm
+++ b/gfx/footprints.asm
@@ -7,8 +7,8 @@
footprint_top EQUS "0, 2 * LEN_1BPP_TILE"
footprint_bottom EQUS "2 * LEN_1BPP_TILE, 2 * LEN_1BPP_TILE"
+Footprints:
; Entries correspond to Pokémon species, two apiece, 8 tops then 8 bottoms
-
table_width LEN_1BPP_TILE * 4, Footprints
; 001-008 top halves
diff --git a/home/battle_vars.asm b/home/battle_vars.asm
index 70567ce7..2cf7b515 100644
--- a/home/battle_vars.asm
+++ b/home/battle_vars.asm
@@ -1,5 +1,4 @@
GetBattleVar::
-; Preserves hl.
push hl
call GetBattleVarAddr
pop hl
@@ -8,7 +7,6 @@ GetBattleVar::
GetBattleVarAddr::
; Get variable from pair a, depending on whose turn it is.
; There are 21 variable pairs.
-
push bc
ld hl, BattleVarPairs