summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-10-28 13:35:26 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2020-10-28 14:39:52 -0400
commitb47bfbd813cc7981ff3b99baa7913933f28d67b9 (patch)
tree0fea9afdc675ac7381e661f6fd344c55dcb32374 /engine
parent9483cf47dd62d3c513dade49747e868f49f0e374 (diff)
Identify more WRAM labels, and start a <X>_DummyFunction label convention
Diffstat (limited to 'engine')
-rw-r--r--engine/battle/battle_transition.asm34
-rw-r--r--engine/battle/core.asm16
-rw-r--r--engine/debug/color_picker.asm8
-rw-r--r--engine/events/field_moves.asm2
-rw-r--r--engine/events/npc_trade.asm9
-rw-r--r--engine/events/print_unown_2.asm12
-rw-r--r--engine/events/specials.asm4
-rw-r--r--engine/games/dummy_game.asm10
-rw-r--r--engine/games/slot_machine.asm2
-rw-r--r--engine/gfx/cgb_layouts.asm10
-rw-r--r--engine/gfx/color.asm20
-rw-r--r--engine/gfx/sgb_layouts.asm10
-rw-r--r--engine/gfx/sprite_anims.asm4
-rw-r--r--engine/link/init_list.asm4
-rw-r--r--engine/link/link.asm18
-rw-r--r--engine/menus/intro_menu.asm4
-rw-r--r--engine/menus/main_menu.asm4
-rw-r--r--engine/movie/trade_animation.asm4
-rw-r--r--engine/overworld/events.asm2
-rw-r--r--engine/overworld/overworld.asm2
-rw-r--r--engine/overworld/scripting.asm12
-rw-r--r--engine/pokedex/pokedex.asm2
-rw-r--r--engine/pokegear/pokegear.asm6
-rw-r--r--engine/pokemon/bills_pc.asm6
-rw-r--r--engine/printer/printer.asm4
25 files changed, 109 insertions, 100 deletions
diff --git a/engine/battle/battle_transition.asm b/engine/battle/battle_transition.asm
index 611702b3..f5b4effe 100644
--- a/engine/battle/battle_transition.asm
+++ b/engine/battle/battle_transition.asm
@@ -208,7 +208,7 @@ StartTrainerBattle_NextScene:
StartTrainerBattle_SetUpBGMap:
call StartTrainerBattle_NextScene
xor a
- ld [wce64], a
+ ld [wBattleTransitionCounter], a
ldh [hBGMapMode], a
ret
@@ -222,7 +222,7 @@ StartTrainerBattle_Flash:
ld a, [wTimeOfDayPalset]
cp DARKNESS_PALSET
jr z, .done
- ld hl, wce64
+ ld hl, wBattleTransitionCounter
ld a, [hl]
inc [hl]
srl a
@@ -240,7 +240,7 @@ StartTrainerBattle_Flash:
.done
xor a
- ld [wce64], a
+ ld [wBattleTransitionCounter], a
scf
ret
@@ -271,12 +271,12 @@ StartTrainerBattle_SetUpForWavyOutro:
ld a, $90
ldh [hLYOverrideEnd], a
xor a
- ld [wce64], a
- ld [wce65], a
+ ld [wBattleTransitionCounter], a
+ ld [wBattleTransitionSineWaveOffset], a
ret
StartTrainerBattle_SineWave:
- ld a, [wce64]
+ ld a, [wBattleTransitionCounter]
cp $60
jr nc, .end
call .DoSineWave
@@ -288,10 +288,10 @@ StartTrainerBattle_SineWave:
ret
.DoSineWave:
- ld hl, wce65
+ ld hl, wBattleTransitionSineWaveOffset
ld a, [hl]
inc [hl]
- ld hl, wce64
+ ld hl, wBattleTransitionCounter
ld d, [hl]
add [hl]
ld [hl], a
@@ -319,13 +319,13 @@ StartTrainerBattle_SetUpForSpinOutro:
farcall RespawnPlayerAndOpponent
call StartTrainerBattle_NextScene
xor a
- ld [wce64], a
+ ld [wBattleTransitionCounter], a
ret
StartTrainerBattle_SpinToBlack:
xor a
ldh [hBGMapMode], a
- ld a, [wce64]
+ ld a, [wBattleTransitionCounter]
ld e, a
ld d, 0
ld hl, .spin_quadrants
@@ -335,13 +335,13 @@ endr
ld a, [hli]
cp -1
jr z, .end
- ld [wce65], a
+ ld [wBattleTransitionSpinQuadrant], a
call .load
ld a, 1
ldh [hBGMapMode], a
call DelayFrame
call DelayFrame
- ld hl, wce64
+ ld hl, wBattleTransitionCounter
inc [hl]
ret
@@ -411,7 +411,7 @@ ENDM
inc de
.loop1
ld [hl], BATTLETRANSITION_BLACK
- ld a, [wce65]
+ ld a, [wBattleTransitionSpinQuadrant]
bit RIGHT_QUADRANT_F, a
jr z, .leftside
inc hl
@@ -422,7 +422,7 @@ ENDM
dec c
jr nz, .loop1
pop hl
- ld a, [wce65]
+ ld a, [wBattleTransitionSpinQuadrant]
bit LOWER_QUADRANT_F, a
ld bc, SCREEN_WIDTH
jr z, .upper
@@ -437,7 +437,7 @@ ENDM
jr z, .loop
ld c, a
.loop2
- ld a, [wce65]
+ ld a, [wBattleTransitionSpinQuadrant]
bit RIGHT_QUADRANT_F, a
jr z, .leftside2
dec hl
@@ -459,13 +459,13 @@ StartTrainerBattle_SetUpForRandomScatterOutro:
farcall RespawnPlayerAndOpponent
call StartTrainerBattle_NextScene
ld a, $10
- ld [wce64], a
+ ld [wBattleTransitionCounter], a
ld a, 1
ldh [hBGMapMode], a
ret
StartTrainerBattle_SpeckleToBlack:
- ld hl, wce64
+ ld hl, wBattleTransitionCounter
ld a, [hl]
and a
jr z, .done
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index 830a7a23..a006f376 100644
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -2817,10 +2817,11 @@ PlayerMonFaintedAnimation:
jp MonFaintedAnimation
MonFaintedAnimation:
- ld a, [wd8ba]
+ ld a, [wJoypadDisable]
push af
- set 6, a
- ld [wd8ba], a
+ set JOYPAD_DISABLE_MON_FAINT_F, a
+ ld [wJoypadDisable], a
+
ld b, 7
.OuterLoop:
@@ -2863,7 +2864,7 @@ MonFaintedAnimation:
jr nz, .OuterLoop
pop af
- ld [wd8ba], a
+ ld [wJoypadDisable], a
ret
.Spaces:
@@ -4403,7 +4404,7 @@ CheckDanger:
PrintPlayerHUD:
ld de, wBattleMonNick
hlcoord 10, 7
- call ret_3df99
+ call Battle_DummyFunction
call PlaceString
push bc
@@ -4489,7 +4490,7 @@ DrawEnemyHUD:
call GetBaseData
ld de, wEnemyMonNick
hlcoord 1, 0
- call ret_3df99
+ call Battle_DummyFunction
call PlaceString
ld h, b
ld l, c
@@ -4618,7 +4619,8 @@ UpdateHPPal:
ret z
jp FinishBattleAnim
-ret_3df99:
+Battle_DummyFunction:
+; called before placing either battler's nickname in the HUD
ret
BattleMenu:
diff --git a/engine/debug/color_picker.asm b/engine/debug/color_picker.asm
index 324d6c57..2ebf4861 100644
--- a/engine/debug/color_picker.asm
+++ b/engine/debug/color_picker.asm
@@ -913,13 +913,13 @@ DebugColor_FillBoxWithByte:
ret
DebugColor_PushSGBPals:
- ld a, [wd8ba]
+ ld a, [wJoypadDisable]
push af
- set 7, a
- ld [wd8ba], a
+ set JOYPAD_DISABLE_SGB_TRANSFER_F, a
+ ld [wJoypadDisable], a
call _DebugColor_PushSGBPals
pop af
- ld [wd8ba], a
+ ld [wJoypadDisable], a
ret
_DebugColor_PushSGBPals:
diff --git a/engine/events/field_moves.asm b/engine/events/field_moves.asm
index 39c92b2e..8085084f 100644
--- a/engine/events/field_moves.asm
+++ b/engine/events/field_moves.asm
@@ -421,7 +421,7 @@ FlyFunction_FrameTimer:
ret
.SpawnLeaf:
- ld hl, wce65
+ ld hl, wFrameCounter2
ld a, [hl]
inc [hl]
and $7
diff --git a/engine/events/npc_trade.asm b/engine/events/npc_trade.asm
index d4e450c2..94773f2f 100644
--- a/engine/events/npc_trade.asm
+++ b/engine/events/npc_trade.asm
@@ -56,11 +56,12 @@ NPCTrade::
call DisableSpriteUpdates
ld a, [wJumptableIndex]
push af
- ld a, [wce64]
+ ; wTradeDialog aliases wFrameCounter, which TradeAnimation uses
+ ld a, [wTradeDialog]
push af
predef TradeAnimation
pop af
- ld [wce64], a
+ ld [wTradeDialog], a
pop af
ld [wJumptableIndex], a
call ReturnToMapWithSpeechTextbox
@@ -107,7 +108,7 @@ Trade_GetDialog:
ld e, NPCTRADE_DIALOG
call GetTradeAttribute
ld a, [hl]
- ld [wce64], a
+ ld [wTradeDialog], a
ret
DoNPCTrade:
@@ -366,7 +367,7 @@ PrintTradeText:
rept 6
add hl, de
endr
- ld a, [wce64]
+ ld a, [wTradeDialog]
ld e, a
add hl, de
add hl, de
diff --git a/engine/events/print_unown_2.asm b/engine/events/print_unown_2.asm
index 9c4d1d85..cc441e2d 100644
--- a/engine/events/print_unown_2.asm
+++ b/engine/events/print_unown_2.asm
@@ -9,7 +9,7 @@ RotateUnownFrontpic:
push bc
push hl
push bc
- ld de, wceed
+ ld de, wPrintedUnownTileSource
call .Copy
call .Rotate
ld hl, UnownPrinter_GBPrinterRectangle
@@ -19,10 +19,10 @@ RotateUnownFrontpic:
ld a, [hli]
ld e, a
ld d, [hl]
- ld hl, wcefd
+ ld hl, wPrintedUnownTileDest
call .Copy
pop hl
- ld bc, $10
+ ld bc, LEN_2BPP_TILE
add hl, bc
pop bc
inc c
@@ -44,7 +44,7 @@ RotateUnownFrontpic:
ret
.Copy:
- ld c, $10
+ ld c, LEN_2BPP_TILE
.loop_copy
ld a, [hli]
ld [de], a
@@ -54,12 +54,12 @@ RotateUnownFrontpic:
ret
.Rotate:
- ld hl, wcefd
+ ld hl, wPrintedUnownTileDest
ld e, %10000000
ld d, 8
.loop_decompress
push hl
- ld hl, wceed
+ ld hl, wPrintedUnownTileSource
call .CountSetBit
pop hl
ld a, b
diff --git a/engine/events/specials.asm b/engine/events/specials.asm
index 5c26daa7..0b3e3560 100644
--- a/engine/events/specials.asm
+++ b/engine/events/specials.asm
@@ -15,7 +15,7 @@ Special::
INCLUDE "data/events/special_pointers.asm"
-DummySpecial_c389:
+UnusedDummySpecial:
ret
GameCornerPrizeMonCheckDex:
@@ -205,7 +205,7 @@ CardFlip:
call StartGameCornerGame
ret
-DummyNonfunctionalGameCornerGame:
+UnusedDummyGame:
call CheckCoinsAndCoinCase
ret c
ld a, BANK(_DummyGame)
diff --git a/engine/games/dummy_game.asm b/engine/games/dummy_game.asm
index 8f03e66c..648346fc 100644
--- a/engine/games/dummy_game.asm
+++ b/engine/games/dummy_game.asm
@@ -133,11 +133,11 @@ endr
.next_try
dec [hl]
xor a
- ld [wce64], a
+ ld [wDummyGameCardChoice], a
ld hl, wJumptableIndex
inc [hl]
.PickCard1:
- ld a, [wce64]
+ ld a, [wDummyGameCardChoice]
and a
ret z
dec a
@@ -155,13 +155,13 @@ endr
call DummyGame_Card2Coord
call DummyGame_PlaceCard
xor a
- ld [wce64], a
+ ld [wDummyGameCardChoice], a
ld hl, wJumptableIndex
inc [hl]
ret
.PickCard2:
- ld a, [wce64]
+ ld a, [wDummyGameCardChoice]
and a
ret z
dec a
@@ -527,7 +527,7 @@ DummyGame_InterpretJoypad_AnimateCursor:
add hl, bc
ld a, [hl]
inc a
- ld [wce64], a
+ ld [wDummyGameCardChoice], a
ret
.pressed_left
diff --git a/engine/games/slot_machine.asm b/engine/games/slot_machine.asm
index 68a56bbc..47f1cc42 100644
--- a/engine/games/slot_machine.asm
+++ b/engine/games/slot_machine.asm
@@ -248,7 +248,7 @@ DebugPrintSlotBias: ; unreferenced
AnimateSlotReelIcons: ; unreferenced
; This animation was present in pokegold-spaceworld.
- ld hl, wce66
+ ld hl, wUnusedSlotReelIconDelay
ld a, [hl]
inc [hl]
and $7
diff --git a/engine/gfx/cgb_layouts.asm b/engine/gfx/cgb_layouts.asm
index 70c4a29c..f30bd328 100644
--- a/engine/gfx/cgb_layouts.asm
+++ b/engine/gfx/cgb_layouts.asm
@@ -43,7 +43,7 @@ LoadSGBLayoutCGB:
dw _CGB_PartyMenu
dw _CGB_Evolution
dw _CGB_GSTitleScreen
- dw _CGB0d
+ dw _CGB_Unused0D
dw _CGB_MoveList
dw _CGB_BetaPikachuMinigame
dw _CGB_PokedexSearchOption
@@ -60,7 +60,7 @@ LoadSGBLayoutCGB:
dw _CGB_TradeTube
dw _CGB_TrainerOrMonFrontpicPals
dw _CGB_MysteryGift
- dw _CGB1e
+ dw _CGB_Unused1E
dw _CGB_Pokedex_5x5
_CGB_BattleGrayscale:
@@ -303,7 +303,7 @@ _CGB_BillsPC:
ldh [hCGBPalUpdate], a
ret
-Function95a0: ; unreferenced
+_CGB_Unknown: ; unreferenced
ld hl, BillsPCOrangePalette
call LoadHLPaletteIntoDE
jr .GotPalette
@@ -568,7 +568,7 @@ _CGB_GSTitleScreen:
ldh [hCGBPalUpdate], a
ret
-_CGB0d:
+_CGB_Unused0D:
ld hl, PalPacket_Diploma + 1
call CopyFourPalettes
call WipeAttrmap
@@ -831,7 +831,7 @@ _CGB_PlayerOrMonFrontpicPals:
call ApplyPals
ret
-_CGB1e:
+_CGB_Unused1E:
ld de, wBGPals1
ld a, [wCurPartySpecies]
call GetMonPalettePointer
diff --git a/engine/gfx/color.asm b/engine/gfx/color.asm
index fd42d597..18ae76a8 100644
--- a/engine/gfx/color.asm
+++ b/engine/gfx/color.asm
@@ -144,6 +144,7 @@ SGB_ApplyPartyMenuHPPals:
Intro_LoadMagikarpPalettes:
call CheckCGB
ret z
+
; CGB only
ld hl, .BGPal
ld de, wBGPals1
@@ -715,13 +716,13 @@ endr
ret
PushSGBPals:
- ld a, [wd8ba]
+ ld a, [wJoypadDisable]
push af
- set 7, a
- ld [wd8ba], a
+ set JOYPAD_DISABLE_SGB_TRANSFER_F, a
+ ld [wJoypadDisable], a
call _PushSGBPals
pop af
- ld [wd8ba], a
+ ld [wJoypadDisable], a
ret
_PushSGBPals:
@@ -767,12 +768,14 @@ _PushSGBPals:
InitSGBBorder:
call CheckCGB
ret nz
+
; SGB/DMG only
di
- ld a, [wd8ba]
+ ld a, [wJoypadDisable]
push af
- set 7, a
- ld [wd8ba], a
+ set JOYPAD_DISABLE_SGB_TRANSFER_F, a
+ ld [wJoypadDisable], a
+
xor a
ldh [rJOYP], a
ldh [hSGB], a
@@ -792,13 +795,14 @@ InitSGBBorder:
.skip
pop af
- ld [wd8ba], a
+ ld [wJoypadDisable], a
ei
ret
InitCGBPals::
call CheckCGB
ret z
+
; CGB only
ld a, BANK(vTiles3)
ldh [rVBK], a
diff --git a/engine/gfx/sgb_layouts.asm b/engine/gfx/sgb_layouts.asm
index 2ed648f6..1b2799bf 100644
--- a/engine/gfx/sgb_layouts.asm
+++ b/engine/gfx/sgb_layouts.asm
@@ -35,7 +35,7 @@ LoadSGBLayout:
dw .SGB_PartyMenu
dw .SGB_Evolution
dw .SGB_GSTitleScreen
- dw .SGB0d
+ dw .SGB_Unused0D
dw .SGB_MoveList
dw .SGB_BetaPikachuMinigame
dw .SGB_PokedexSearchOption
@@ -52,7 +52,7 @@ LoadSGBLayout:
dw .SGB_TradeTube
dw .SGB_TrainerOrMonFrontpicPals
dw .SGB_MysteryGift
- dw .SGB1e
+ dw .SGB_Unused1E
dw .SGB_Pokedex_5x5
.SGB_BattleGrayscale:
@@ -403,7 +403,7 @@ endr
ld de, BlkPacket_AllPal0
ret
-.SGB0d:
+.SGB_Unused0D:
.SGB_TrainerCard:
ld hl, PalPacket_Diploma
ld de, BlkPacket_AllPal0
@@ -443,7 +443,7 @@ endr
ld de, wSGBPals + PALPACKET_LENGTH
ret
-.SGB1e:
+.SGB_Unused1E:
ld hl, PalPacket_Pal01
ld de, wSGBPals
ld bc, PALPACKET_LENGTH
@@ -456,7 +456,7 @@ endr
add hl, hl
ld de, PokemonPalettes
add hl, de
- ld a, [wce65]
+ ld a, [wUnusedSGB1eColorOffset]
and 3
sla a
sla a
diff --git a/engine/gfx/sprite_anims.asm b/engine/gfx/sprite_anims.asm
index 2a4cc868..93b69a3c 100644
--- a/engine/gfx/sprite_anims.asm
+++ b/engine/gfx/sprite_anims.asm
@@ -1066,7 +1066,7 @@ AnimSeq_SlotsGolem:
AnimSeq_SlotsChansey:
callfar Slots_AnimateChansey
- ld hl, wce64
+ ld hl, wSlotsDelay
ld a, [hl]
cp $2
ret nz
@@ -1091,7 +1091,7 @@ AnimSeq_SlotsChanseyEgg:
jr c, .move_right
call DeinitializeSprite
ld a, $4
- ld [wce64], a
+ ld [wSlotsDelay], a
ld de, SFX_PLACE_PUZZLE_PIECE_DOWN
call PlaySFX
ret
diff --git a/engine/link/init_list.asm b/engine/link/init_list.asm
index b85cf001..3e16d349 100644
--- a/engine/link/init_list.asm
+++ b/engine/link/init_list.asm
@@ -44,9 +44,9 @@ InitList:
ld a, h
ld [wListPointer + 1], a
ld a, e
- ld [wUnusedCFFE], a
+ ld [wUnusedNamesPointer], a
ld a, d
- ld [wUnusedCFFE + 1], a
+ ld [wUnusedNamesPointer + 1], a
ld bc, ItemAttributes
ld a, c
ld [wItemAttributesPtr], a
diff --git a/engine/link/link.asm b/engine/link/link.asm
index ba2ae115..f80bb86e 100644
--- a/engine/link/link.asm
+++ b/engine/link/link.asm
@@ -82,9 +82,9 @@ Gen2ToGen1LinkComms:
call Serial_ExchangeBytes
ld a, SERIAL_NO_DATA_BYTE
ld [de], a
- ld hl, wLink_c508
+ ld hl, wc508
ld de, wTrademons
- ld bc, wTrademons - wLink_c508
+ ld bc, wTrademons - wc508
call Serial_ExchangeBytes
xor a
ldh [rIF], a
@@ -163,9 +163,9 @@ Gen2ToGen1LinkComms:
ld hl, wTimeCapsulePlayerData
call Link_ConvertPartyStruct1to2
ld a, LOW(wOTPartyMonOT)
- ld [wUnusedCFFE], a
+ ld [wUnusedNamesPointer], a
ld a, HIGH(wOTPartyMonOT)
- ld [wUnusedCFFE + 1], a
+ ld [wUnusedNamesPointer + 1], a
ld de, MUSIC_NONE
call PlayMusic
ldh a, [hSerialConnectionStatus]
@@ -226,9 +226,9 @@ Gen2ToGen2LinkComms:
call Serial_ExchangeBytes
ld a, SERIAL_NO_DATA_BYTE
ld [de], a
- ld hl, wLink_c508
+ ld hl, wc508
ld de, wTrademons
- ld bc, wTrademons - wLink_c508
+ ld bc, wTrademons - wc508
call Serial_ExchangeBytes
ld a, [wLinkMode]
cp LINK_TRADECENTER
@@ -377,9 +377,9 @@ Gen2ToGen2LinkComms:
ld bc, wOTPartyDataEnd - wOTPartyMons
call CopyBytes
ld a, LOW(wOTPartyMonOT)
- ld [wUnusedCFFE], a
+ ld [wUnusedNamesPointer], a
ld a, HIGH(wOTPartyMonOT)
- ld [wUnusedCFFE + 1], a
+ ld [wUnusedNamesPointer + 1], a
ld de, MUSIC_NONE
call PlayMusic
ldh a, [hSerialConnectionStatus]
@@ -514,7 +514,7 @@ FixDataForLinkTransfer:
ld [hli], a
dec b
jr nz, .loop2
- ld hl, wLink_c508
+ ld hl, wc508
ld a, SERIAL_PREAMBLE_BYTE
ld [hli], a
ld [hli], a
diff --git a/engine/menus/intro_menu.asm b/engine/menus/intro_menu.asm
index 2fe285b1..9b744f72 100644
--- a/engine/menus/intro_menu.asm
+++ b/engine/menus/intro_menu.asm
@@ -344,8 +344,8 @@ FinishContinueFunction:
.loop
xor a
ld [wDontPlayMapMusicOnReload], a
- ld hl, wGameTimerPause
- set GAMETIMERPAUSE_TIMER_PAUSED_F, [hl]
+ ld hl, wGameTimerPaused
+ set GAME_TIMER_PAUSED_F, [hl]
farcall OverworldLoop
ld a, [wSpawnAfterChampion]
cp SPAWN_RED
diff --git a/engine/menus/main_menu.asm b/engine/menus/main_menu.asm
index 22308a87..eb34cb26 100644
--- a/engine/menus/main_menu.asm
+++ b/engine/menus/main_menu.asm
@@ -28,8 +28,8 @@ MainMenu:
call ClearTilemapEtc
ld b, SCGB_DIPLOMA
call GetSGBLayout
- ld hl, wGameTimerPause
- res GAMETIMERPAUSE_TIMER_PAUSED_F, [hl]
+ ld hl, wGameTimerPaused
+ res GAME_TIMER_PAUSED_F, [hl]
call MainMenu_GetWhichMenu
ld [wWhichIndexSet], a
call MainMenu_PrintCurrentTimeAndDay
diff --git a/engine/movie/trade_animation.asm b/engine/movie/trade_animation.asm
index 6877514a..f99e9e0c 100644
--- a/engine/movie/trade_animation.asm
+++ b/engine/movie/trade_animation.asm
@@ -212,7 +212,7 @@ DoTradeAnimation:
jr nz, .finished
call .DoTradeAnimCommand
callfar PlaySpriteAnimations
- ld hl, wce65
+ ld hl, wFrameCounter2
inc [hl]
call DelayFrame
and a
@@ -1269,7 +1269,7 @@ LinkTradeAnim_LoadTradeMonSpecies:
ret
TradeAnim_FlashBGPals:
- ld a, [wce65]
+ ld a, [wFrameCounter2]
and $7
ret nz
ldh a, [rBGP]
diff --git a/engine/overworld/events.asm b/engine/overworld/events.asm
index fda0149e..ee2facbe 100644
--- a/engine/overworld/events.asm
+++ b/engine/overworld/events.asm
@@ -800,7 +800,7 @@ PlayerMovement:
CheckMenuOW:
xor a
ldh [hMenuReturn], a
- ldh [hUnusedFFA3], a
+ ldh [hUnusedByte], a
ldh a, [hJoyPressed]
bit SELECT_F, a
diff --git a/engine/overworld/overworld.asm b/engine/overworld/overworld.asm
index 0d285d2a..40157524 100644
--- a/engine/overworld/overworld.asm
+++ b/engine/overworld/overworld.asm
@@ -119,7 +119,7 @@ AddOutdoorSprites:
dec c
jr nz, .loop
- ld a, [wUnusedD05A]
+ ld a, [wUnusedAddOutdoorSpritesReturnValue]
ld c, a
ret
diff --git a/engine/overworld/scripting.asm b/engine/overworld/scripting.asm
index a97f7621..105f53e2 100644
--- a/engine/overworld/scripting.asm
+++ b/engine/overworld/scripting.asm
@@ -432,11 +432,11 @@ Script_verbosegiveitem:
ld de, GiveItemScript
jp ScriptCall
-ret_96e71:
+GiveItemScript_DummyFunction:
ret
GiveItemScript:
- callasm ret_96e71
+ callasm GiveItemScript_DummyFunction
writetext .ReceivedItemText
iffalse .Full
waitsfx
@@ -2206,11 +2206,11 @@ Script_endall:
ret
Script_halloffame:
- ld hl, wGameTimerPause
- res GAMETIMERPAUSE_TIMER_PAUSED_F, [hl]
+ ld hl, wGameTimerPaused
+ res GAME_TIMER_PAUSED_F, [hl]
farcall HallOfFame
- ld hl, wGameTimerPause
- set GAMETIMERPAUSE_TIMER_PAUSED_F, [hl]
+ ld hl, wGameTimerPaused
+ set GAME_TIMER_PAUSED_F, [hl]
jr ReturnFromCredits
Script_credits:
diff --git a/engine/pokedex/pokedex.asm b/engine/pokedex/pokedex.asm
index 90aa56c4..23840d1d 100644
--- a/engine/pokedex/pokedex.asm
+++ b/engine/pokedex/pokedex.asm
@@ -91,7 +91,7 @@ InitPokedex:
ld [wJumptableIndex], a
ld [wPrevDexEntryJumptableIndex], a
ld [wPrevDexEntryBackup], a
- ld [wce66], a
+ ld [wUnusedPokedexByte], a
call Pokedex_CheckUnlockedUnownMode
diff --git a/engine/pokegear/pokegear.asm b/engine/pokegear/pokegear.asm
index e75af0cd..6586774e 100644
--- a/engine/pokegear/pokegear.asm
+++ b/engine/pokegear/pokegear.asm
@@ -92,7 +92,7 @@ PokeGear:
ld [wJumptableIndex], a ; POKEGEARSTATE_CLOCKINIT
ld [wPokegearCard], a ; POKEGEARCARD_CLOCK
ld [wPokegearMapRegion], a ; JOHTO_REGION
- ld [wce66], a
+ ld [wUnusedPokegearByte], a
ld [wPokegearPhoneScrollPosition], a
ld [wPokegearPhoneCursorPosition], a
ld [wPokegearPhoneSelectedPerson], a
@@ -1989,7 +1989,7 @@ _FlyMap:
lb bc, BANK(FlyMapLabelBorderGFX), 6
call Request1bpp
call FlyMap
- call ret_91bfd
+ call Pokegear_DummyFunction
ld b, SCGB_POKEGEAR_PALS
call GetSGBLayout
call SetPalettes
@@ -2194,7 +2194,7 @@ HasVisitedSpawn:
INCLUDE "data/maps/flypoints.asm"
-ret_91bfd:
+Pokegear_DummyFunction:
ret
FlyMap:
diff --git a/engine/pokemon/bills_pc.asm b/engine/pokemon/bills_pc.asm
index af266312..43d79586 100644
--- a/engine/pokemon/bills_pc.asm
+++ b/engine/pokemon/bills_pc.asm
@@ -767,9 +767,9 @@ BillsPC_InitRAM:
call ByteFill
xor a
ld [wJumptableIndex], a
- ld [wce64], a
- ld [wce65], a
- ld [wce66], a
+ ld [wUnusedBillsPCData], a
+ ld [wUnusedBillsPCData+1], a
+ ld [wUnusedBillsPCData+2], a
ld [wBillsPC_CursorPosition], a
ld [wBillsPC_ScrollPosition], a
ret
diff --git a/engine/printer/printer.asm b/engine/printer/printer.asm
index a6e0f956..5b17c52f 100644
--- a/engine/printer/printer.asm
+++ b/engine/printer/printer.asm
@@ -443,9 +443,11 @@ CheckCancelPrint:
ret
.pressed_b
- ld a, [wc980]
+ ld a, [wUnusedGameboyPrinterSafeCancelFlag]
cp $0c
jr nz, .cancel
+
+; wait for printer activity to finish before canceling?
.loop
ld a, [wPrinterOpcode]
and a