summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorRemy Oukaour <remy.oukaour@gmail.com>2018-01-14 22:56:36 -0500
committerRemy Oukaour <remy.oukaour@gmail.com>2018-01-14 22:56:36 -0500
commit5c28d05bb40b47f084a34eb732da92c899e18db6 (patch)
treeb7e427bbb988bfdc51e347a87f6ab663c1f45a7b /engine
parent8e1e583640fcb82cb8d6327a0174a892b4ba0ad2 (diff)
parent2c789b64b1bfa9ec33d805d06ad3a7141e3871f1 (diff)
Merge branch 'master' of https://github.com/xCrystal/pokecrystal (resolve PR #459)
# Conflicts: # data/items/descriptions.asm # data/sprite_anims/framesets.asm # engine/crystal_colors.asm # engine/events/kurt.asm # engine/events/special.asm # engine/events/std_scripts.asm # engine/events_3.asm # engine/item_effects.asm # engine/namingscreen.asm # engine/scripting.asm # engine/stats_screen.asm # engine/trade_animation.asm # home/audio.asm # main.asm # maps/BattleTower1F.asm # maps/BattleTowerBattleRoom.asm # maps/BurnedTowerB1F.asm # maps/ElmsLab.asm # maps/GoldenrodDeptStore5F.asm # maps/GoldenrodUnderground.asm # maps/HallOfFame.asm # maps/MahoganyTown.asm # maps/ManiasHouse.asm # maps/MobileBattleRoom.asm # maps/MobileTradeRoomMobile.asm # maps/RadioTower2F.asm # maps/Route35NationalParkGate.asm # maps/Route36NationalParkGate.asm # maps/Route39Farmhouse.asm # tilesets/palette_maps.asm
Diffstat (limited to 'engine')
-rw-r--r--engine/battle/ai/items.asm4
-rwxr-xr-xengine/battle/ai/move.asm2
-rw-r--r--engine/battle/ai/scoring.asm2
-rwxr-xr-xengine/battle/ai/switch.asm16
-rwxr-xr-xengine/battle/anim_hp_bar.asm10
-rw-r--r--engine/battle/battle_transition.asm9
-rw-r--r--engine/battle/core.asm187
-rw-r--r--engine/battle/effect_commands.asm46
-rwxr-xr-xengine/battle/effect_commands/attract.asm4
-rw-r--r--engine/battle/misc.asm2
-rwxr-xr-xengine/battle/read_trainer_party.asm8
-rw-r--r--engine/battle/returntobattle_useball.asm4
-rw-r--r--engine/battle/start_battle.asm2
-rw-r--r--engine/battle_anims/anim_commands.asm23
-rwxr-xr-xengine/billspc.asm21
-rwxr-xr-xengine/billspctop.asm6
-rwxr-xr-xengine/breeding.asm31
-rwxr-xr-xengine/card_flip.asm7
-rw-r--r--engine/caught_data.asm2
-rw-r--r--engine/cgb_layouts.asm2
-rwxr-xr-xengine/clock_reset.asm1
-rw-r--r--engine/color.asm38
-rwxr-xr-xengine/crystal_colors.asm2
-rwxr-xr-xengine/debug.asm12
-rwxr-xr-xengine/decorations.asm4
-rwxr-xr-xengine/dma_transfer.asm4
-rw-r--r--engine/events.asm3
-rwxr-xr-xengine/events/battle_tower/battle_tower.asm30
-rw-r--r--engine/events/buena.asm4
-rw-r--r--engine/events/buena_menu.asm2
-rwxr-xr-xengine/events/bug_contest/contest_2.asm4
-rw-r--r--engine/events/bug_contest/display_stats.asm6
-rwxr-xr-xengine/events/bug_contest/judging.asm4
-rw-r--r--engine/events/catch_tutorial.asm2
-rwxr-xr-xengine/events/celebi.asm2
-rwxr-xr-xengine/events/daycare.asm10
-rw-r--r--engine/events/dratini.asm2
-rwxr-xr-xengine/events/field_moves.asm4
-rw-r--r--engine/events/fruit_trees.asm2
-rwxr-xr-xengine/events/halloffame.asm22
-rwxr-xr-xengine/events/happiness_egg.asm4
-rwxr-xr-xengine/events/heal_machine_anim.asm2
-rw-r--r--engine/events/kurt.asm2
-rw-r--r--engine/events/lucky_number.asm2
-rw-r--r--engine/events/magikarp.asm2
-rwxr-xr-xengine/events/misc_scripts.asm2
-rwxr-xr-xengine/events/mom_phone.asm8
-rw-r--r--engine/events/move_deleter.asm2
-rw-r--r--engine/events/move_tutor.asm4
-rwxr-xr-xengine/events/overworld.asm14
-rwxr-xr-xengine/events/poisonstep.asm4
-rw-r--r--engine/events/poisonstep_pals.asm2
-rw-r--r--engine/events/poke_seer.asm2
-rwxr-xr-xengine/events/pokecenter_pc.asm6
-rwxr-xr-xengine/events/pokepic.asm4
-rwxr-xr-xengine/events/print_photo.asm2
-rw-r--r--engine/events/print_unown.asm6
-rwxr-xr-xengine/events/prof_oaks_pc.asm4
-rwxr-xr-xengine/events/sacred_ash.asm12
-rwxr-xr-xengine/events/special.asm9
-rw-r--r--engine/events/std_scripts.asm24
-rwxr-xr-xengine/events/treemons.asm2
-rw-r--r--engine/events/unown_walls.asm4
-rwxr-xr-xengine/events/whiteout.asm6
-rw-r--r--engine/events_2.asm4
-rwxr-xr-xengine/evolution_animation.asm4
-rwxr-xr-xengine/evolve.asm22
-rwxr-xr-xengine/health.asm4
-rwxr-xr-xengine/intro_menu.asm18
-rw-r--r--engine/item_effects.asm32
-rwxr-xr-xengine/learn.asm4
-rwxr-xr-xengine/link.asm35
-rw-r--r--engine/link_2.asm2
-rwxr-xr-xengine/mail_2.asm3
-rwxr-xr-xengine/main_menu.asm2
-rw-r--r--engine/map_objects.asm10
-rw-r--r--engine/map_setup.asm8
-rwxr-xr-xengine/mart.asm10
-rwxr-xr-xengine/menu.asm6
-rw-r--r--engine/menu_2.asm6
-rwxr-xr-xengine/mon_icons.asm3
-rw-r--r--engine/mon_stats.asm29
-rwxr-xr-xengine/move_mon.asm62
-rwxr-xr-xengine/mystery_gift.asm10
-rwxr-xr-xengine/namingscreen.asm8
-rwxr-xr-xengine/npc_movement.asm4
-rwxr-xr-xengine/npctrade.asm16
-rwxr-xr-xengine/overworld.asm10
-rw-r--r--engine/pack.asm6
-rw-r--r--engine/party_menu.asm22
-rw-r--r--engine/phone/generic_calls.asm2
-rw-r--r--engine/phone/phone.asm4
-rw-r--r--engine/phone/phone_callers.asm10
-rw-r--r--engine/phone/phone_scripts.asm6
-rw-r--r--engine/pic_animation.asm33
-rw-r--r--engine/player_gfx.asm9
-rwxr-xr-xengine/player_movement.asm2
-rwxr-xr-xengine/player_step.asm2
-rw-r--r--engine/pokedex.asm8
-rwxr-xr-xengine/pokegear.asm12
-rw-r--r--engine/predef.asm144
-rwxr-xr-xengine/print_party.asm8
-rwxr-xr-xengine/printer.asm5
-rwxr-xr-xengine/printnum.asm2
-rw-r--r--engine/routines/correcterrorsinplayerparty.asm4
-rw-r--r--engine/routines/flagpredef.asm4
-rw-r--r--engine/routines/newpokedexentry.asm2
-rw-r--r--engine/routines/placegraphic.asm2
-rw-r--r--engine/routines/playslowcry.asm2
-rw-r--r--engine/routines/printhoursmins.asm3
-rw-r--r--engine/routines/printitemdescription.asm2
-rw-r--r--engine/routines/trademonfrontpic.asm6
-rwxr-xr-xengine/rtc.asm4
-rw-r--r--engine/save.asm12
-rw-r--r--engine/scripting.asm15
-rwxr-xr-xengine/scrolling_menu.asm2
-rwxr-xr-xengine/search.asm4
-rw-r--r--engine/sgb_layouts.asm3
-rwxr-xr-xengine/slot_machine.asm22
-rw-r--r--engine/specials.asm230
-rwxr-xr-xengine/sprites.asm3
-rwxr-xr-xengine/start_menu.asm26
-rwxr-xr-xengine/stats_screen.asm44
-rw-r--r--engine/tempmon.asm4
-rwxr-xr-xengine/time.asm4
-rw-r--r--engine/time_capsule_2.asm2
-rw-r--r--engine/timeofdaypals.asm8
-rwxr-xr-xengine/tmhm.asm6
-rwxr-xr-xengine/tmhm2.asm24
-rwxr-xr-xengine/trade_animation.asm14
-rwxr-xr-xengine/trainer_card.asm8
-rw-r--r--engine/types.asm10
-rwxr-xr-xengine/warp_connection.asm4
-rwxr-xr-xengine/wildmons.asm8
134 files changed, 857 insertions, 887 deletions
diff --git a/engine/battle/ai/items.asm b/engine/battle/ai/items.asm
index d0867fb33..5bdc070ec 100644
--- a/engine/battle/ai/items.asm
+++ b/engine/battle/ai/items.asm
@@ -545,7 +545,7 @@ AI_Items: ; 39196
AIUpdateHUD: ; 38387
call UpdateEnemyMonInParty
- farcall UpdateEnemyHUD
+ farcall Predef_UpdateEnemyHUD
ld a, $1
ld [hBGMapMode], a
ld hl, wEnemyItemState
@@ -664,7 +664,7 @@ EnemyPotionFinish: ; 38436
xor a
ld [wWhichHPBar], a
call AIUsedItemSound
- predef AnimateHPBar
+ predef Predef_AnimateHPBar
jp AIUpdateHUD
diff --git a/engine/battle/ai/move.asm b/engine/battle/ai/move.asm
index 72ed6983b..d04fb9930 100755
--- a/engine/battle/ai/move.asm
+++ b/engine/battle/ai/move.asm
@@ -92,7 +92,7 @@ AIChooseMove: ; 440ce
push bc
ld d, BANK(TrainerClassAttributes)
- predef FlagPredef
+ predef Predef_SmallFarFlagAction
ld d, c
pop bc
diff --git a/engine/battle/ai/scoring.asm b/engine/battle/ai/scoring.asm
index 73284435a..c1d175c38 100644
--- a/engine/battle/ai/scoring.asm
+++ b/engine/battle/ai/scoring.asm
@@ -1488,7 +1488,7 @@ AI_Smart_Encore: ; 38c3b
push hl
ld a, [wEnemyMoveStruct + MOVE_TYPE]
ld hl, EnemyMonType1
- predef CheckTypeMatchup
+ predef Predef_CheckTypeMatchup
pop hl
ld a, [wd265]
diff --git a/engine/battle/ai/switch.asm b/engine/battle/ai/switch.asm
index c2f83fa1f..cb278676e 100755
--- a/engine/battle/ai/switch.asm
+++ b/engine/battle/ai/switch.asm
@@ -28,7 +28,7 @@ CheckPlayerMoveTypeMatchups: ; 3484e
inc hl
call GetMoveByte
ld hl, EnemyMonType
- call CheckTypeMatchup
+ call Predef_CheckTypeMatchup
ld a, [wTypeMatchup]
cp 10 + 1 ; 1.0 + 0.1
jr nc, .super_effective
@@ -73,7 +73,7 @@ CheckPlayerMoveTypeMatchups: ; 3484e
ld a, [BattleMonType1]
ld b, a
ld hl, EnemyMonType1
- call CheckTypeMatchup
+ call Predef_CheckTypeMatchup
ld a, [wTypeMatchup]
cp 10 + 1 ; 1.0 + 0.1
jr c, .ok
@@ -82,7 +82,7 @@ CheckPlayerMoveTypeMatchups: ; 3484e
ld a, [BattleMonType2]
cp b
jr z, .ok2
- call CheckTypeMatchup
+ call Predef_CheckTypeMatchup
ld a, [wTypeMatchup]
cp 10 + 1 ; 1.0 + 0.1
jr c, .ok2
@@ -123,7 +123,7 @@ CheckPlayerMoveTypeMatchups: ; 3484e
inc hl
call GetMoveByte
ld hl, BattleMonType1
- call CheckTypeMatchup
+ call Predef_CheckTypeMatchup
ld a, [wTypeMatchup]
; immune
@@ -390,7 +390,7 @@ FindEnemyMonsImmuneToLastCounterMove: ; 34a2a
inc hl
call GetMoveByte
ld hl, BaseType
- call CheckTypeMatchup
+ call Predef_CheckTypeMatchup
ld a, [wTypeMatchup]
and a
jr nz, .next
@@ -481,7 +481,7 @@ FindEnemyMonsWithASuperEffectiveMove: ; 34aa7
inc hl
call GetMoveByte
ld hl, BattleMonType1
- call CheckTypeMatchup
+ call Predef_CheckTypeMatchup
; if immune or not very effective: continue
ld a, [wTypeMatchup]
@@ -585,7 +585,7 @@ FindEnemyMonsThatResistPlayer: ; 34b20
.skip_move
ld a, [BattleMonType1]
ld hl, BaseType
- call CheckTypeMatchup
+ call Predef_CheckTypeMatchup
ld a, [wTypeMatchup]
cp 10 + 1
jr nc, .dont_choose_mon
@@ -593,7 +593,7 @@ FindEnemyMonsThatResistPlayer: ; 34b20
.check_type
ld hl, BaseType
- call CheckTypeMatchup
+ call Predef_CheckTypeMatchup
ld a, [wTypeMatchup]
cp 10 + 1
jr nc, .dont_choose_mon
diff --git a/engine/battle/anim_hp_bar.asm b/engine/battle/anim_hp_bar.asm
index 71276d27e..d67a46a70 100755
--- a/engine/battle/anim_hp_bar.asm
+++ b/engine/battle/anim_hp_bar.asm
@@ -67,7 +67,7 @@ _AnimateHPBar: ; d627
ld a, [hli]
ld b, a
pop hl
- call ComputeHPBarPixels
+ call Predef_ComputeHPBarPixels
ld a, e
ld [wCurHPBarPixels], a
@@ -79,7 +79,7 @@ _AnimateHPBar: ; d627
ld e, a
ld a, [wCurHPAnimMaxHP + 1]
ld d, a
- call ComputeHPBarPixels
+ call Predef_ComputeHPBarPixels
ld a, e
ld [wNewHPBarPixels], a
@@ -183,11 +183,11 @@ LongAnim_UpdateVariables: ; d6f5
ld c, a
ld a, [hli]
ld b, a
- ; This routine is buggy. The result from ComputeHPBarPixels is stored
+ ; This routine is buggy. The result from Predef_ComputeHPBarPixels is stored
; in e. However, the pop de opcode deletes this result before it is even
; used. The game then proceeds as though it never deleted that output.
; To fix, uncomment the line below.
- call ComputeHPBarPixels
+ call Predef_ComputeHPBarPixels
; ld a, e
pop bc
pop de
@@ -227,7 +227,7 @@ LongHPBarAnim_UpdateTiles: ; d749
ld e, a
ld a, [wCurHPAnimMaxHP + 1]
ld d, a
- call ComputeHPBarPixels
+ call Predef_ComputeHPBarPixels
ld c, e
ld d, HP_BAR_LENGTH
ld a, [wWhichHPBar]
diff --git a/engine/battle/battle_transition.asm b/engine/battle/battle_transition.asm
index 16c9df2c1..17c9d0b6d 100644
--- a/engine/battle/battle_transition.asm
+++ b/engine/battle/battle_transition.asm
@@ -1,4 +1,4 @@
-Predef_StartBattle: ; 8c20f
+Predef_DoBattleTransition: ; 8c20f
call .InitGFX
ld a, [rBGP]
ld [wBGP], a
@@ -16,7 +16,7 @@ Predef_StartBattle: ; 8c20f
ld a, [wJumptableIndex]
bit 7, a
jr nz, .done
- call FlashyTransitionToBattle
+ call BattleTransitionJumptable
call DelayFrame
jr .loop
@@ -144,7 +144,7 @@ TrainerBattlePokeballTiles: ; 8c2f4
INCBIN "gfx/overworld/trainer_battle_pokeball_tiles.2bpp"
-FlashyTransitionToBattle: ; 8c314
+BattleTransitionJumptable: ; 8c314
jumptable .dw, wJumptableIndex
; 8c323
@@ -859,8 +859,7 @@ ENDM
ret
; 8c7c9 (23:47c9)
-Function8c7c9:
-; XXX
+Unreferenced_Function8c7c9:
ld a, $1
ld [hBGMapMode], a
call WaitBGMap
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index a604bc37a..5137da43d 100644
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -47,7 +47,7 @@ DoBattle: ; 3c000
.player_2
call LoadTileMapToTempTileMap
- call CheckPlayerPartyForFitPkmn
+ call Predef_CheckPlayerPartyForFitPkmn
ld a, d
and a
jp z, LostBattle
@@ -160,7 +160,7 @@ WildFled_EnemyFled_LinkBattleCanceled: ; 3c0e5
BattleTurn: ; 3c12f
.loop
- call MobileFn_3c1bf
+ call Stubbed_Function3c1bf
call CheckContestBattleOver
jp c, .quit
@@ -231,7 +231,8 @@ BattleTurn: ; 3c12f
ret
; 3c1bf
-MobileFn_3c1bf: mobile
+Stubbed_Function3c1bf:
+ ret
ld a, $5
call GetSRAMBank
ld hl, $a89b ; s5_a89b
@@ -1277,7 +1278,7 @@ HandleWrap: ; 3c874
xor a
ld [wNumHits], a
ld [FXAnimID + 1], a
- predef PlayBattleAnim
+ predef Predef_PlayBattleAnim
call SwitchTurnCore
.skip_anim
@@ -1943,8 +1944,7 @@ GetMaxHP: ; 3ccac
ret
; 3ccc2
-GetHalfHP: ; 3ccc2
-; unreferenced
+Unreferenced_GetHalfHP: ; 3ccc2
ld hl, BattleMonHP
ld a, [hBattleTurn]
and a
@@ -2040,7 +2040,7 @@ UpdateHPBar: ; 3cd3c
.ok
push bc
ld [wWhichHPBar], a
- predef AnimateHPBar
+ predef Predef_AnimateHPBar
pop bc
ret
; 3cd55
@@ -2054,7 +2054,7 @@ HandleEnemyMonFaint: ; 3cd55
xor a
ld [wWhichMonFaintedFirst], a
call UpdateBattleStateAndExperienceAfterEnemyFaint
- call CheckPlayerPartyForFitPkmn
+ call Predef_CheckPlayerPartyForFitPkmn
ld a, d
and a
jp z, LostBattle
@@ -2062,7 +2062,7 @@ HandleEnemyMonFaint: ; 3cd55
ld hl, BattleMonHP
ld a, [hli]
or [hl]
- call nz, UpdatePlayerHUD
+ call nz, Predef_UpdatePlayerHUD
ld a, $1
ld [hBGMapMode], a
@@ -2186,7 +2186,7 @@ UpdateBattleStateAndExperienceAfterEnemyFaint: ; 3ce01
call PlayerMonFaintHappinessMod
.player_mon_did_not_faint
- call CheckPlayerPartyForFitPkmn
+ call Predef_CheckPlayerPartyForFitPkmn
ld a, d
and a
ret z
@@ -2581,7 +2581,7 @@ AddBattleMoneyToAccount: ; 3d0be
push bc
ld b, h
ld c, l
- farcall TrainerRankings_AddToBattlePayouts
+ farcall StubbedTrainerRankings_AddToBattlePayouts
pop bc
pop hl
.loop
@@ -2670,7 +2670,7 @@ HandlePlayerMonFaint: ; 3d14e
ld a, $1
ld [wWhichMonFaintedFirst], a
call PlayerMonFaintHappinessMod
- call CheckPlayerPartyForFitPkmn
+ call Predef_CheckPlayerPartyForFitPkmn
ld a, d
and a
jp z, LostBattle
@@ -2716,7 +2716,7 @@ PlayerMonFaintHappinessMod: ; 3d1aa
ld c, a
ld hl, wBattleParticipantsNotFainted
ld b, RESET_FLAG
- predef FlagPredef
+ predef Predef_SmallFarFlagAction
ld hl, EnemySubStatus3
res SUBSTATUS_IN_LOOP, [hl]
xor a
@@ -3313,10 +3313,10 @@ AddBattleParticipant: ; 3d581
ld hl, wBattleParticipantsNotFainted
ld b, SET_FLAG
push bc
- predef FlagPredef
+ predef Predef_SmallFarFlagAction
pop bc
ld hl, wBattleParticipantsIncludingFainted
- predef_jump FlagPredef
+ predef_jump Predef_SmallFarFlagAction
; 3d599
FindPkmnInOTPartyToSwitchIntoBattle: ; 3d599
@@ -3534,7 +3534,7 @@ LoadEnemyPkmnToSwitchTo: ; 3d6ca
and a
jr nz, .skip_unown
ld hl, EnemyMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
ld a, [UnownLetter]
ld [wFirstUnownSeen], a
.skip_unown
@@ -3644,8 +3644,8 @@ Function_SetEnemyPkmnAndSendOutAnimation: ; 3d7c7
call GetBaseData
ld a, OTPARTYMON
ld [MonType], a
- predef CopyPkmnToTempMon
- call GetEnemyMonFrontpic
+ predef Predef_CopyPkmnToTempMon
+ call Predef_GetEnemyMonFrontpic
xor a
ld [wNumHits], a
@@ -3670,7 +3670,7 @@ Function_SetEnemyPkmnAndSendOutAnimation: ; 3d7c7
hlcoord 12, 0
ld d, $0
ld e, ANIM_MON_SLOW
- predef AnimateFrontpic
+ predef Predef_AnimateFrontpic
jr .skip_cry
.cry_no_anim
@@ -3680,7 +3680,7 @@ Function_SetEnemyPkmnAndSendOutAnimation: ; 3d7c7
call PlayStereoCry
.skip_cry
- call UpdateEnemyHUD
+ call Predef_UpdateEnemyHUD
ld a, $1
ld [hBGMapMode], a
ret
@@ -3721,7 +3721,7 @@ ResetEnemyStatLevels: ; 3d867
ret
; 3d873
-CheckPlayerPartyForFitPkmn: ; 3d873
+Predef_CheckPlayerPartyForFitPkmn: ; 3d873
; Has the player any Pkmn in his Party that can fight?
ld a, [PartyCount]
ld e, a
@@ -4124,7 +4124,7 @@ SwitchPlayerMon: ; 3db32
SendOutPlayerMon: ; 3db5f
ld hl, BattleMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
hlcoord 1, 5
ld b, 7
ld c, 8
@@ -4132,7 +4132,7 @@ SendOutPlayerMon: ; 3db5f
call WaitBGMap
xor a
ld [hBGMapMode], a
- call GetBattleMonBackpic
+ call Predef_GetBattleMonBackpic
xor a
ld [hGraphicStartTile], a
ld [wBattleMenuCursorBuffer], a
@@ -4172,7 +4172,7 @@ SendOutPlayerMon: ; 3db5f
call PlayStereoCry
.statused
- call UpdatePlayerHUD
+ call Predef_UpdatePlayerHUD
ld a, $1
ld [hBGMapMode], a
ret
@@ -4218,13 +4218,13 @@ BreakAttraction: ; 3dc18
SpikesDamage: ; 3dc23
ld hl, PlayerScreens
ld de, BattleMonType
- ld bc, UpdatePlayerHUD
+ ld bc, Predef_UpdatePlayerHUD
ld a, [hBattleTurn]
and a
jr z, .ok
ld hl, EnemyScreens
ld de, EnemyMonType
- ld bc, UpdateEnemyHUD
+ ld bc, Predef_UpdateEnemyHUD
.ok
bit SCREENS_SPIKES, [hl]
@@ -4306,7 +4306,7 @@ PursuitSwitch: ; 3dc5b
ld c, a
ld hl, wBattleParticipantsNotFainted
ld b, RESET_FLAG
- predef FlagPredef
+ predef Predef_SmallFarFlagAction
call PlayerMonFaintedAnimation
ld hl, BattleText_PkmnFainted
jr .done_fainted
@@ -4455,7 +4455,7 @@ HandleHPHealingItem: ; 3dd2f
.got_hp_bar_coords
ld [wWhichHPBar], a
- predef AnimateHPBar
+ predef Predef_AnimateHPBar
UseOpponentItem:
call RefreshBattleHuds
callfar GetOpponentItem
@@ -4478,7 +4478,7 @@ ItemRecoveryAnim: ; 3ddc8
xor a
ld [wNumHits], a
ld [FXAnimID + 1], a
- predef PlayBattleAnim
+ predef Predef_PlayBattleAnim
call SwitchTurnCore
pop bc
pop de
@@ -4708,7 +4708,7 @@ UpdateBattleHUDs: ; 3df2c
ret
; 3df48
-UpdatePlayerHUD:: ; 3df48
+Predef_UpdatePlayerHUD:: ; 3df48
push hl
push de
push bc
@@ -4741,7 +4741,7 @@ DrawPlayerHUD: ; 3df58
ld b, 1
xor a ; PARTYMON
ld [MonType], a
- predef DrawPlayerHP
+ predef Predef_DrawPlayerHP
; Exp bar
push de
@@ -4754,7 +4754,7 @@ DrawPlayerHUD: ; 3df58
hlcoord 10, 11
ld a, [TempMonLevel]
ld b, a
- call FillInExpBar
+ call Predef_FillInExpBar
pop de
ret
; 3df98
@@ -4823,7 +4823,7 @@ PrintPlayerHUD: ; 3dfbf
ld a, TEMPMON
ld [MonType], a
- callfar GetGender
+ callfar Predef_GetGender
ld a, " "
jr c, .got_gender_char
ld a, "♂"
@@ -4837,7 +4837,7 @@ PrintPlayerHUD: ; 3dfbf
push af ; back up gender
push hl
ld de, BattleMonStatus
- predef PlaceNonFaintStatus
+ predef Predef_PlaceNonFaintStatus
pop hl
pop bc
ret nz
@@ -4852,7 +4852,7 @@ PrintPlayerHUD: ; 3dfbf
jp PrintLevel
; 3e036
-UpdateEnemyHUD:: ; 3e036
+Predef_UpdateEnemyHUD:: ; 3e036
push hl
push de
push bc
@@ -4901,7 +4901,7 @@ DrawEnemyHUD: ; 3e043
ld a, TEMPMON
ld [MonType], a
- callfar GetGender
+ callfar Predef_GetGender
ld a, " "
jr c, .got_gender
ld a, "♂"
@@ -4916,7 +4916,7 @@ DrawEnemyHUD: ; 3e043
push af
push hl
ld de, EnemyMonStatus
- predef PlaceNonFaintStatus
+ predef Predef_PlaceNonFaintStatus
pop hl
pop bc
jr nz, .skip_level
@@ -5141,8 +5141,8 @@ BattleMenu_Pack: ; 3e1c7
call ClearPalettes
call DelayFrame
call _LoadBattleFontsHPBar
- call GetBattleMonBackpic
- call GetEnemyMonFrontpic
+ call Predef_GetBattleMonBackpic
+ call Predef_GetEnemyMonFrontpic
call ExitMenu
call WaitBGMap
call FinishBattleAnim
@@ -5174,10 +5174,10 @@ BattleMenu_Pack: ; 3e1c7
ld a, [BattleType]
cp BATTLETYPE_TUTORIAL
jr z, .tutorial2
- call GetBattleMonBackpic
+ call Predef_GetBattleMonBackpic
.tutorial2
- call GetEnemyMonFrontpic
+ call Predef_GetEnemyMonFrontpic
ld a, $1
ld [wMenuCursorY], a
call ExitMenu
@@ -5531,7 +5531,7 @@ MoveSelectionScreen: ; 3e4bc
.got_start_coord
ld a, SCREEN_WIDTH
ld [Buffer1], a
- predef ListMoves
+ predef Predef_ListMoves
ld b, 5
ld a, [wMoveSelectionMenuType]
@@ -5864,7 +5864,7 @@ MoveInfoBox: ; 3e6c8
ld a, [wPlayerMoveStruct + MOVE_ANIM]
ld b, a
hlcoord 2, 10
- predef PrintMoveType
+ predef Predef_PrintMoveType
.done
ret
@@ -6319,7 +6319,7 @@ LoadEnemyMon: ; 3e8eb
; Get letter based on DVs
ld hl, EnemyMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
; Can't use any letters that haven't been unlocked
; If combined with forced shiny battletype, causes an infinite loop
call CheckUnownLetter
@@ -6408,7 +6408,7 @@ LoadEnemyMon: ; 3e8eb
ld de, EnemyMonMaxHP
ld b, FALSE
ld hl, EnemyMonDVs - (MON_DVS - MON_STAT_EXP + 1) ; LinkBattleRNs + 7 ; ?
- predef CalcPkmnStats
+ predef Predef_CalcPkmnStats
; If we're in a trainer battle,
; get the rest of the parameters from the party struct
@@ -6523,7 +6523,7 @@ LoadEnemyMon: ; 3e8eb
; Make sure the predef knows this isn't a partymon
ld [wEvolutionOldSpecies], a
; Fill moves based on level
- predef FillMoves
+ predef Predef_FillMoves
.PP:
; Trainer battle?
@@ -6534,7 +6534,7 @@ LoadEnemyMon: ; 3e8eb
; Fill wild PP
ld hl, EnemyMonMoves
ld de, EnemyMonPP
- predef FillPP
+ predef Predef_FillPP
jr .Finish
.TrainerPP:
@@ -6587,7 +6587,7 @@ LoadEnemyMon: ; 3e8eb
ld c, a
ld b, SET_FLAG
ld hl, PokedexSeen
- predef FlagPredef
+ predef Predef_SmallFarFlagAction
ld hl, EnemyMonStats
ld de, EnemyStats
@@ -6696,8 +6696,7 @@ CheckUnownLetter: ; 3eb75
; 3ebc7
-SwapBattlerLevels: ; 3ebc7
-; unreferenced
+Unreferenced_SwapBattlerLevels: ; 3ebc7
push bc
ld a, [BattleMonLevel]
ld b, a
@@ -6716,7 +6715,7 @@ BattleWinSlideInEnemyTrainerFrontpic: ; 3ebd8
ld a, [OtherTrainerClass]
ld [TrainerClass], a
ld de, vTiles2
- callfar GetTrainerPic
+ callfar Predef_GetTrainerPic
hlcoord 19, 0
ld c, 0
@@ -7089,7 +7088,7 @@ _LoadHPBar: ; 3eda6
ret
; 3edad
-LoadHPExpBarGFX: ; unreferenced
+Unreferenced_LoadHPExpBarGFX:
ld de, EnemyHPBarBorderGFX
ld hl, vTiles2 tile $6c
lb bc, BANK(EnemyHPBarBorderGFX), 4
@@ -7193,7 +7192,7 @@ Call_PlayBattleAnim: ; 3ee17
ld a, d
ld [FXAnimID + 1], a
call WaitBGMap
- predef_jump PlayBattleAnim
+ predef_jump Predef_PlayBattleAnim
; 3ee27
FinishBattleAnim: ; 3ee27
@@ -7241,7 +7240,7 @@ GiveExperiencePoints: ; 3ee3b
ld c, a
ld b, CHECK_FLAG
ld d, $0
- predef FlagPredef
+ predef Predef_SmallFarFlagAction
ld a, c
and a
pop bc
@@ -7419,7 +7418,7 @@ GiveExperiencePoints: ; 3ee3b
.not_max_exp
xor a ; PARTYMON
ld [MonType], a
- predef CopyPkmnToTempMon
+ predef Predef_CopyPkmnToTempMon
callfar CalcLevel
pop bc
ld hl, MON_LEVEL
@@ -7456,7 +7455,7 @@ GiveExperiencePoints: ; 3ee3b
add hl, bc
push bc
ld b, TRUE
- predef CalcPkmnStats
+ predef Predef_CalcPkmnStats
pop bc
pop de
ld hl, MON_MAXHP + 1
@@ -7509,7 +7508,7 @@ GiveExperiencePoints: ; 3ee3b
call ApplyStatLevelMultiplierOnAllStats
callfar ApplyStatusEffectOnPlayerStats
callfar BadgeStatBoosts
- callfar UpdatePlayerHUD
+ callfar Predef_UpdatePlayerHUD
call EmptyBattleTextBox
call LoadTileMapToTempTileMap
ld a, $1
@@ -7532,14 +7531,14 @@ GiveExperiencePoints: ; 3ee3b
.skip_animation2
xor a ; PARTYMON
ld [MonType], a
- predef CopyPkmnToTempMon
+ predef Predef_CopyPkmnToTempMon
hlcoord 9, 0
ld b, $a
ld c, $9
call TextBox
hlcoord 11, 1
ld bc, 4
- predef PrintTempMonStats
+ predef Predef_PrintTempMonStats
ld c, $1e
call DelayFrames
call WaitPressAorB_BlinkCursor
@@ -7559,7 +7558,7 @@ GiveExperiencePoints: ; 3ee3b
ld a, b
ld [CurPartyLevel], a
push bc
- predef LearnLevelMoves
+ predef Predef_LearnLevelMoves
pop bc
ld a, b
cp c
@@ -7570,7 +7569,7 @@ GiveExperiencePoints: ; 3ee3b
ld a, [CurPartyMon]
ld c, a
ld b, SET_FLAG
- predef FlagPredef
+ predef Predef_SmallFarFlagAction
pop af
ld [CurPartyLevel], a
@@ -7692,7 +7691,7 @@ AnimateExpBar: ; 3f136
ld [wd002], a
xor a ; PARTYMON
ld [MonType], a
- predef CopyPkmnToTempMon
+ predef Predef_CopyPkmnToTempMon
ld a, [TempMonLevel]
ld b, a
ld e, a
@@ -8020,7 +8019,7 @@ TextJump_GoodComeBack: ; 3f352
db "@"
; 3f357
-UnusedFunction_TextJump_ComeBack: ; 3f357
+Unreferenced_TextJump_ComeBack: ; 3f357
; this function doesn't seem to be used
ld hl, TextJump_ComeBack
ret
@@ -8031,7 +8030,7 @@ TextJump_ComeBack: ; 3f35b
db "@"
; 3f360
-HandleSafariAngerEatingStatus: ; unreferenced
+Unreferenced_HandleSafariAngerEatingStatus:
ld hl, wSafariMonEating
ld a, [hl]
and a
@@ -8063,7 +8062,7 @@ HandleSafariAngerEatingStatus: ; unreferenced
jp StdBattleTextBox
; 3f390
-FillInExpBar: ; 3f390
+Predef_FillInExpBar: ; 3f390
push hl
call CalcExpBar
pop hl
@@ -8205,7 +8204,7 @@ PlaceExpBar: ; 3f41c
ret
; 3f43d
-GetBattleMonBackpic: ; 3f43d
+Predef_GetBattleMonBackpic: ; 3f43d
ld a, [PlayerSubStatus4]
bit SUBSTATUS_SUBSTITUTE, a
ld hl, BattleAnimCmd_RaiseSub
@@ -8221,9 +8220,9 @@ DropPlayerSub: ; 3f447
ld a, [BattleMonSpecies]
ld [CurPartySpecies], a
ld hl, BattleMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
ld de, vTiles2 tile $31
- predef GetMonBackpic
+ predef Predef_GetMonBackpic
pop af
ld [CurPartySpecies], a
ret
@@ -8241,7 +8240,7 @@ GetBattleMonBackpic_DoAnim: ; 3f46f
ret
; 3f47c
-GetEnemyMonFrontpic: ; 3f47c
+Predef_GetEnemyMonFrontpic: ; 3f47c
ld a, [EnemySubStatus4]
bit SUBSTATUS_SUBSTITUTE, a
ld hl, BattleAnimCmd_RaiseSub
@@ -8260,9 +8259,9 @@ DropEnemySub: ; 3f486
ld [CurPartySpecies], a
call GetBaseData
ld hl, EnemyMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
ld de, vTiles2
- predef GetAnimatedFrontpicPredef
+ predef Predef_GetAnimatedFrontpic
pop af
ld [CurPartySpecies], a
ret
@@ -8279,7 +8278,7 @@ GetEnemyMonFrontpic_DoAnim: ; 3f4b4
ret
; 3f4c1
-StartBattle: ; 3f4c1
+Predef_StartBattle: ; 3f4c1
; This check prevents you from entering a battle without any Pokemon.
; Those using walk-through-walls to bypass getting a Pokemon experience
; the effects of this check.
@@ -8298,14 +8297,13 @@ StartBattle: ; 3f4c1
ret
; 3f4d9
-_DoBattle: ; 3f4d9
-; unreferenced
+Unreferenced_DoBattle: ; 3f4d9
call DoBattle
ret
; 3f4dd
BattleIntro: ; 3f4dd
- farcall TrainerRankings_Battles ; mobile
+ farcall StubbedTrainerRankings_Battles ; mobile
call LoadTrainerOrWildMonPic
xor a
ld [TempBattleMonSpecies], a
@@ -8339,7 +8337,7 @@ BattleIntro: ; 3f4dd
call ClearSprites
ld a, [wBattleMode]
cp WILD_BATTLE
- call z, UpdateEnemyHUD
+ call z, Predef_UpdateEnemyHUD
ld a, $1
ld [hBGMapMode], a
ret
@@ -8390,7 +8388,7 @@ BackUpBGMap2: ; 3f568
InitEnemyTrainer: ; 3f594
ld [TrainerClass], a
- farcall TrainerRankings_TrainerBattles
+ farcall StubbedTrainerRankings_TrainerBattles
xor a
ld [TempEnemyMonSpecies], a
callfar GetTrainerAttributes
@@ -8404,14 +8402,14 @@ InitEnemyTrainer: ; 3f594
.ok
ld de, vTiles2
- callfar GetTrainerPic
+ callfar Predef_GetTrainerPic
xor a
ld [hGraphicStartTile], a
dec a
ld [wEnemyItemState], a
hlcoord 12, 0
lb bc, 7, 7
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
ld a, -1
ld [CurOTMon], a
ld a, TRAINER_BATTLE
@@ -8446,7 +8444,7 @@ InitEnemyTrainer: ; 3f594
InitEnemyWildmon: ; 3f607
ld a, WILD_BATTLE
ld [wBattleMode], a
- farcall TrainerRankings_WildBattles
+ farcall StubbedTrainerRankings_WildBattles
call LoadEnemyMon
ld hl, EnemyMonMoves
ld de, wWildMonMoves
@@ -8457,7 +8455,7 @@ InitEnemyWildmon: ; 3f607
ld bc, NUM_MOVES
call CopyBytes
ld hl, EnemyMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
ld a, [CurPartySpecies]
cp UNOWN
jr nz, .skip_unown
@@ -8468,18 +8466,17 @@ InitEnemyWildmon: ; 3f607
ld [wFirstUnownSeen], a
.skip_unown
ld de, vTiles2
- predef GetAnimatedFrontpicPredef
+ predef Predef_GetAnimatedFrontpic
xor a
ld [TrainerClass], a
ld [hGraphicStartTile], a
hlcoord 12, 0
lb bc, 7, 7
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
ret
; 3f662
-Function3f662: ; 3f662
-; XXX
+Unreferenced_Function3f662: ; 3f662
ld hl, EnemyMonMoves
ld de, wListMoves_MoveIndicesBuffer
ld b, NUM_MOVES
@@ -8554,7 +8551,7 @@ ExitBattle: ; 3f69e
call CheckPayDay
xor a
ld [wForceEvolution], a
- predef EvolveAfterBattle
+ predef Predef_EvolveAfterBattle
farcall GivePokerusAndConvertBerries
ret
; 3f6d0
@@ -8629,7 +8626,7 @@ CheckPayDay: ; 3f71d
; 3f759
ShowLinkBattleParticipantsAfterEnd: ; 3f759
- farcall TrainerRankings_LinkBattles
+ farcall StubbedTrainerRankings_LinkBattles
farcall BackupMobileEventIndex
ld a, [CurOTMon]
ld hl, OTPartyMon1Status
@@ -8659,17 +8656,17 @@ DisplayLinkBattleResult: ; 3f77c
cp $1
jr c, .victory
jr z, .loss
- farcall TrainerRankings_ColosseumDraws
+ farcall StubbedTrainerRankings_ColosseumDraws
ld de, .Draw
jr .store_result
.victory
- farcall TrainerRankings_ColosseumWins
+ farcall StubbedTrainerRankings_ColosseumWins
ld de, .Win
jr .store_result
.loss
- farcall TrainerRankings_ColosseumLosses
+ farcall StubbedTrainerRankings_ColosseumLosses
ld de, .Lose
jr .store_result
@@ -9228,7 +9225,7 @@ InitBattleDisplay: ; 3fb6c
ld [hGraphicStartTile], a
hlcoord 2, 6
lb bc, 6, 6
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
xor a
ld [hWY], a
ld [rWY], a
@@ -9301,7 +9298,7 @@ GetTrainerBackpic: ; 3fbff
.Decompress:
ld de, vTiles2 tile $31
ld c, $31
- predef DecompressPredef
+ predef Predef_Decompress
ret
; 3fc30
@@ -9323,7 +9320,7 @@ CopyBackpic: ; 3fc30
ld [hGraphicStartTile], a
hlcoord 2, 6
lb bc, 6, 6
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
ret
; 3fc5b
@@ -9403,7 +9400,7 @@ BattleStartMessage: ; 3fc8b
hlcoord 12, 0
ld d, $0
ld e, ANIM_MON_NORMAL
- predef AnimateFrontpic
+ predef Predef_AnimateFrontpic
jr .skip_cry ; cry is played during the animation
.cry_no_anim
@@ -9417,7 +9414,7 @@ BattleStartMessage: ; 3fc8b
cp BATTLETYPE_FISH
jr nz, .NotFishing
- farcall TrainerRankings_HookedEncounters
+ farcall StubbedTrainerRankings_HookedEncounters
ld hl, HookedPokemonAttackedText
jr .PlaceBattleStartText
diff --git a/engine/battle/effect_commands.asm b/engine/battle/effect_commands.asm
index 68184ce30..c46ded638 100644
--- a/engine/battle/effect_commands.asm
+++ b/engine/battle/effect_commands.asm
@@ -182,7 +182,7 @@ CheckPlayerTurn:
call StdBattleTextBox
call CantMove
call UpdateBattleMonInParty
- ld hl, UpdatePlayerHUD
+ ld hl, Predef_UpdatePlayerHUD
call CallBattleCore
ld a, $1
ld [hBGMapMode], a
@@ -433,7 +433,7 @@ CheckEnemyTurn: ; 3421f
call StdBattleTextBox
call CantMove
call UpdateEnemyMonInParty
- ld hl, UpdateEnemyHUD
+ ld hl, Predef_UpdateEnemyHUD
call CallBattleCore
ld a, $1
ld [hBGMapMode], a
@@ -672,7 +672,7 @@ HitConfusion: ; 343a5
and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND
call z, PlayFXAnimID
- ld hl, UpdatePlayerHUD
+ ld hl, Predef_UpdatePlayerHUD
call CallBattleCore
ld a, $1
ld [hBGMapMode], a
@@ -1538,12 +1538,12 @@ BattleCheckTypeMatchup: ; 347c8
ld hl, EnemyMonType1
ld a, [hBattleTurn]
and a
- jr z, CheckTypeMatchup
+ jr z, Predef_CheckTypeMatchup
ld hl, BattleMonType1
-CheckTypeMatchup: ; 347d3
+Predef_CheckTypeMatchup: ; 347d3
; There is an incorrect assumption about this function made in the AI related code: when
-; the AI calls CheckTypeMatchup (not BattleCheckTypeMatchup), it assumes that placing the
-; offensive type in a will make this function do the right thing. Since a is overwritten,
+; the AI calls Predef_CheckTypeMatchup (not BattleCheckTypeMatchup), it assumes that placing
+; the offensive type in a will make this function do the right thing. Since a is overwritten,
; this assumption is incorrect. A simple fix would be to load the move type for the
; current move into a in BattleCheckTypeMatchup, before falling through, which is
; consistent with how the rest of the code assumes this code works like.
@@ -2621,7 +2621,7 @@ BattleCommand_CheckDestinyBond: ; 351c0
ld [Buffer6], a
ld h, b
ld l, c
- predef AnimateHPBar
+ predef Predef_AnimateHPBar
call RefreshBattleHuds
call BattleCommand_SwitchTurn
@@ -4015,7 +4015,7 @@ BattleCommand_PainSplit: ; 35926
ld a, $1
ld [wWhichHPBar], a
hlcoord 10, 9
- predef AnimateHPBar
+ predef Predef_AnimateHPBar
ld hl, EnemyMonHP
ld a, [hli]
ld [Buffer4], a
@@ -4030,7 +4030,7 @@ BattleCommand_PainSplit: ; 35926
ld [wWhichHPBar], a
call ResetDamage
hlcoord 2, 2
- predef AnimateHPBar
+ predef Predef_AnimateHPBar
farcall _UpdateBattleHUDs
ld hl, SharedPainText
@@ -4172,7 +4172,7 @@ BattleCommand_Conversion2: ; 359e6
ld a, [hl]
ld [wNamedObjectIndexBuffer], a
- predef GetTypeName
+ predef Predef_GetTypeName
ld hl, TransformedTypeText
jp StdBattleTextBox
@@ -4711,7 +4711,7 @@ PlayFXAnimID: ; 35d08
ld c, 3
call DelayFrames
- callfar PlayBattleAnim
+ callfar Predef_PlayBattleAnim
ret
@@ -4773,7 +4773,7 @@ EnemyHurtItself: ; 35d1c
hlcoord 2, 2
xor a
ld [wWhichHPBar], a
- predef AnimateHPBar
+ predef Predef_AnimateHPBar
.did_no_damage
jp RefreshBattleHuds
@@ -4833,7 +4833,7 @@ PlayerHurtItself: ; 35d7e
hlcoord 10, 9
ld a, $1
ld [wWhichHPBar], a
- predef AnimateHPBar
+ predef Predef_AnimateHPBar
.did_no_damage
jp RefreshBattleHuds
@@ -5301,7 +5301,7 @@ SapHealth: ; 36011
xor a
.hp_bar
ld [wWhichHPBar], a
- predef AnimateHPBar
+ predef Predef_AnimateHPBar
call RefreshBattleHuds
jp UpdateBattleMonInParty
@@ -6239,11 +6239,11 @@ BattleCommand_Curl: ; 365a7
BattleCommand_RaiseSubNoAnim: ; 365af
- ld hl, GetBattleMonBackpic
+ ld hl, Predef_GetBattleMonBackpic
ld a, [hBattleTurn]
and a
jr z, .PlayerTurn
- ld hl, GetEnemyMonFrontpic
+ ld hl, Predef_GetEnemyMonFrontpic
.PlayerTurn:
xor a
ld [hBGMapMode], a
@@ -7525,7 +7525,7 @@ BattleCommand_Recoil: ; 36cb2
xor a
.animate_hp_bar
ld [wWhichHPBar], a
- predef AnimateHPBar
+ predef Predef_AnimateHPBar
call RefreshBattleHuds
ld hl, RecoilText
jp StdBattleTextBox
@@ -8023,7 +8023,7 @@ BattleCommand_LeechSeed: ; 36f9d
BattleCommand_Splash: ; 36fe1
call AnimateCurrentMove
- farcall TrainerRankings_Splash
+ farcall StubbedTrainerRankings_Splash
jp PrintNothingHappened
; 36fed
@@ -8227,7 +8227,7 @@ BattleCommand_Conversion: ; 3707f
inc de
ld [de], a
ld [wNamedObjectIndexBuffer], a
- farcall GetTypeName
+ farcall Predef_GetTypeName
call AnimateCurrentMove
ld hl, TransformedTypeText
jp StdBattleTextBox
@@ -8550,7 +8550,7 @@ CheckSubstituteOpp: ; 37378
BattleCommand_Selfdestruct: ; 37380
- farcall TrainerRankings_Selfdestruct
+ farcall StubbedTrainerRankings_Selfdestruct
ld a, BATTLEANIM_PLAYER_DAMAGE
ld [wNumHits], a
ld c, 3
@@ -9856,7 +9856,7 @@ PlayUserBattleAnim: ; 37e47
push hl
push de
push bc
- callfar PlayBattleAnim
+ callfar Predef_PlayBattleAnim
pop bc
pop de
pop hl
@@ -9878,7 +9878,7 @@ PlayOpponentBattleAnim: ; 37e54
push bc
call BattleCommand_SwitchTurn
- callfar PlayBattleAnim
+ callfar Predef_PlayBattleAnim
call BattleCommand_SwitchTurn
pop bc
diff --git a/engine/battle/effect_commands/attract.asm b/engine/battle/effect_commands/attract.asm
index 0a6d7c975..fc73d234c 100755
--- a/engine/battle/effect_commands/attract.asm
+++ b/engine/battle/effect_commands/attract.asm
@@ -35,7 +35,7 @@ CheckOppositeGender: ; 377f5
xor a
ld [MonType], a
- farcall GetGender
+ farcall Predef_GetGender
jr c, .genderless_samegender
ld b, 1
@@ -58,7 +58,7 @@ CheckOppositeGender: ; 377f5
ld [TempMonDVs + 1], a
ld a, 3
ld [MonType], a
- farcall GetGender
+ farcall Predef_GetGender
pop bc
jr c, .genderless_samegender
diff --git a/engine/battle/misc.asm b/engine/battle/misc.asm
index a41d31d9a..40c472e50 100644
--- a/engine/battle/misc.asm
+++ b/engine/battle/misc.asm
@@ -33,7 +33,7 @@ AppearUser: ; fbd77 (3e:7d77)
ld a, $31
.okay
ld [hGraphicStartTile], a
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
FinishAppearDisappearUser: ; fbd91 (3e:7d91)
ld a, $1
ld [hBGMapMode], a
diff --git a/engine/battle/read_trainer_party.asm b/engine/battle/read_trainer_party.asm
index a09c6dd08..4f3dc8e55 100755
--- a/engine/battle/read_trainer_party.asm
+++ b/engine/battle/read_trainer_party.asm
@@ -103,7 +103,7 @@ TrainerType1: ; 397eb
ld a, OTPARTYMON
ld [MonType], a
push hl
- predef TryAddMonToParty
+ predef Predef_TryAddMonToParty
pop hl
jr .loop
; 39806
@@ -124,7 +124,7 @@ TrainerType2: ; 39806
ld [MonType], a
push hl
- predef TryAddMonToParty
+ predef Predef_TryAddMonToParty
ld a, [OTPartyCount]
dec a
ld hl, OTPartyMon1Moves
@@ -200,7 +200,7 @@ TrainerType3: ; 39871
ld a, OTPARTYMON
ld [MonType], a
push hl
- predef TryAddMonToParty
+ predef Predef_TryAddMonToParty
ld a, [OTPartyCount]
dec a
ld hl, OTPartyMon1Item
@@ -231,7 +231,7 @@ TrainerType4: ; 3989d
ld [MonType], a
push hl
- predef TryAddMonToParty
+ predef Predef_TryAddMonToParty
ld a, [OTPartyCount]
dec a
ld hl, OTPartyMon1Item
diff --git a/engine/battle/returntobattle_useball.asm b/engine/battle/returntobattle_useball.asm
index e6e33f900..4254d24f4 100644
--- a/engine/battle/returntobattle_useball.asm
+++ b/engine/battle/returntobattle_useball.asm
@@ -4,13 +4,13 @@ _ReturnToBattle_UseBall: ; 2715c
ld a, [BattleType]
cp BATTLETYPE_TUTORIAL
jr z, .gettutorialbackpic
- farcall GetBattleMonBackpic
+ farcall Predef_GetBattleMonBackpic
jr .continue
.gettutorialbackpic
farcall GetTrainerBackpic
.continue
- farcall GetEnemyMonFrontpic
+ farcall Predef_GetEnemyMonFrontpic
farcall _LoadBattleFontsHPBar
call GetMemSGBLayout
call CloseWindow
diff --git a/engine/battle/start_battle.asm b/engine/battle/start_battle.asm
index 253169a27..b97eda1b3 100644
--- a/engine/battle/start_battle.asm
+++ b/engine/battle/start_battle.asm
@@ -33,7 +33,7 @@ FindFirstAliveMonAndStartBattle: ; 2ee2f
add hl, de
ld a, [hl]
ld [BattleMonLevel], a
- predef Predef_StartBattle
+ predef Predef_DoBattleTransition
farcall _LoadBattleFontsHPBar
ld a, 1
ld [hBGMapMode], a
diff --git a/engine/battle_anims/anim_commands.asm b/engine/battle_anims/anim_commands.asm
index fde4d2969..132dd24a5 100644
--- a/engine/battle_anims/anim_commands.asm
+++ b/engine/battle_anims/anim_commands.asm
@@ -1,6 +1,6 @@
; Battle animation command interpreter.
-PlayBattleAnim: ; cc0d6
+Predef_PlayBattleAnim: ; cc0d6
ld a, [rSVBK]
push af
@@ -167,7 +167,7 @@ BattleAnimRestoreHuds: ; cc1bb
ld [rSVBK], a
ld hl, UpdateBattleHuds
- ld a, BANK(UpdatePlayerHUD)
+ ld a, BANK(Predef_UpdatePlayerHUD)
rst FarCall ; Why not "call UpdateBattleHuds"?
pop af
@@ -232,8 +232,7 @@ ClearActorHud: ; cc207
ret
; cc220
-Functioncc220: ; cc220
-; Appears to be unused.
+Unreferenced_Functioncc220: ; cc220
xor a
ld [hBGMapMode], a
ld a, LOW(vBGMap0 tile $28)
@@ -929,18 +928,18 @@ BattleAnimCmd_Transform: ; cc5dc (33:45dc)
ld a, [TempBattleMonSpecies] ; TempBattleMonSpecies
ld [CurPartySpecies], a ; CurPartySpecies
ld hl, BattleMonDVs ; BattleMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
ld de, vTiles0 tile $00
- predef GetMonFrontpic
+ predef Predef_GetMonFrontpic
jr .done
.player
ld a, [TempEnemyMonSpecies] ; TempEnemyMonSpecies
ld [CurPartySpecies], a ; CurPartySpecies
ld hl, EnemyMonDVs ; EnemyMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
ld de, vTiles0 tile $00
- predef GetMonBackpic
+ predef Predef_GetMonBackpic
.done
pop af
@@ -1156,16 +1155,16 @@ BattleAnimCmd_BeatUp: ; cc776 (33:4776)
jr z, .player
ld hl, BattleMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
ld de, vTiles2 tile $00
- predef GetMonFrontpic
+ predef Predef_GetMonFrontpic
jr .done
.player
ld hl, EnemyMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
ld de, vTiles2 tile $31
- predef GetMonBackpic
+ predef Predef_GetMonBackpic
.done
pop af
diff --git a/engine/billspc.asm b/engine/billspc.asm
index 7be68ba36..cc5ca2388 100755
--- a/engine/billspc.asm
+++ b/engine/billspc.asm
@@ -244,8 +244,7 @@ BillsPCDepositMenuDataHeader: ; 0xe253d (38:653d)
db "CANCEL@"
; 0xe2564 (38:6564)
-BillsPC_ClearThreeBoxes: ; e2564
-; unreferenced
+Unreferenced_BillsPCClearThreeBoxes: ; e2564
hlcoord 0, 0
ld b, 4
ld c, 8
@@ -1096,10 +1095,10 @@ PCMonInfo: ; e2ac6 (38:6ac6)
ld [CurPartySpecies], a
ld [CurSpecies], a
ld hl, TempMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
call GetBaseData
ld de, vTiles2 tile $00
- predef GetMonFrontpic
+ predef Predef_GetMonFrontpic
xor a
ld [wBillsPC_MonHasMail], a
ld a, [CurPartySpecies]
@@ -1116,7 +1115,7 @@ PCMonInfo: ; e2ac6 (38:6ac6)
ld a, $3
ld [MonType], a
- farcall GetGender
+ farcall Predef_GetGender
jr c, .skip_gender
ld a, "♂"
jr nz, .printgender
@@ -1583,7 +1582,7 @@ endr
db -1
; e2ed5
-BillsPC_UnusedFillBox: ; e2ed5
+Unreferenced_BillsPC_FillBox: ; e2ed5
.row
push bc
push hl
@@ -1699,7 +1698,7 @@ BillsPC_StatsScreen: ; e2f7e (38:6f7e)
call BillsPC_CopyMon
ld a, $3
ld [MonType], a
- predef StatsScreenInit
+ predef Predef_StatsScreenInit
call BillsPC_InitGFX
call MaxVolume
ret
@@ -1727,7 +1726,7 @@ StatsScreenDPad: ; e2f95 (38:6f95)
ld [CurPartySpecies], a
ld [CurSpecies], a
ld hl, TempMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
call GetBaseData
call BillsPC_CopyMon
.pressed_a_b_right_left
@@ -1820,7 +1819,7 @@ DepositPokemon: ; e307c (38:707c)
call GetNick
ld a, PC_DEPOSIT
ld [wPokemonWithdrawDepositParameter], a
- predef SentGetPkmnIntoFromBox
+ predef Predef_SendGetPkmnIntoFromBox
jr c, .asm_boxisfull
xor a
ld [wPokemonWithdrawDepositParameter], a
@@ -1875,7 +1874,7 @@ TryWithdrawPokemon: ; e30fa (38:70fa)
call CloseSRAM
xor a
ld [wPokemonWithdrawDepositParameter], a
- predef SentGetPkmnIntoFromBox
+ predef Predef_SendGetPkmnIntoFromBox
jr c, .PartyFull
ld a, PC_DEPOSIT
ld [wPokemonWithdrawDepositParameter], a
@@ -2555,7 +2554,7 @@ BillsPC_ChangeBoxSubmenu: ; e36f9 (38:76f9)
ret
; e3778 (38:7778)
- hlcoord 11, 7 ; XXX
+ hlcoord 11, 7 ; unused
.MenuDataHeader: ; 0xe377b
db $40 ; flags
diff --git a/engine/billspctop.asm b/engine/billspctop.asm
index 0d2ba5e9d..9bbb513a7 100755
--- a/engine/billspctop.asm
+++ b/engine/billspctop.asm
@@ -142,7 +142,7 @@ BillsPC_DepositMenu: ; e4fe (3:64fe)
and a
ret
-Functione512: ; unused
+Unreferenced_Functione512:
ld a, [PartyCount]
and a
jr z, .no_pkmn
@@ -211,7 +211,7 @@ BillsPC_WithdrawMenu: ; e559 (3:6559)
and a
ret
-Functione56d: ; unused
+Unreferenced_Functione56d:
ld a, [PartyCount]
cp PARTY_LENGTH
jr nc, .asm_e576
@@ -267,7 +267,7 @@ CopyBoxmonToTempMon: ; e5bb
call CloseSRAM
ret
-Functione5d9: ; unreferenced
+Unreferenced_Functione5d9:
ld a, [wCurBox]
cp b
jr z, .same_box
diff --git a/engine/breeding.asm b/engine/breeding.asm
index df8b36e6a..e86cf5832 100755
--- a/engine/breeding.asm
+++ b/engine/breeding.asm
@@ -10,7 +10,7 @@ CheckBreedmonCompatibility: ; 16e1d
ld [TempMonDVs + 1], a
ld a, TEMPMON
ld [MonType], a
- predef GetGender
+ predef Predef_GetGender
jr c, .genderless
ld b, $1
jr nz, .breedmon2
@@ -26,7 +26,7 @@ CheckBreedmonCompatibility: ; 16e1d
ld [TempMonDVs + 1], a
ld a, $3
ld [MonType], a
- predef GetGender
+ predef Predef_GetGender
pop bc
jr c, .genderless
ld a, $1
@@ -232,7 +232,7 @@ HatchEggs: ; 16f70 (5:6f70)
push de
farcall SetEggMonCaughtData
- farcall TrainerRankings_EggsHatched
+ farcall StubbedTrainerRankings_EggsHatched
ld a, [CurPartyMon]
ld hl, PartyMon1Species
ld bc, PARTYMON_STRUCT_LENGTH
@@ -289,7 +289,7 @@ HatchEggs: ; 16f70 (5:6f70)
ld bc, MON_STAT_EXP - 1
add hl, bc
ld b, $0
- predef CalcPkmnStats
+ predef Predef_CalcPkmnStats
pop bc
ld hl, MON_MAXHP
add hl, bc
@@ -514,7 +514,7 @@ GLOBAL EggMoves
cp b
jr nz, .loop5
ld [wPutativeTMHMMove], a
- predef CanLearnTMHMMove
+ predef Predef_CanLearnTMHMMove
ld a, c
and a
jr z, .done
@@ -559,7 +559,7 @@ LoadEggMove: ; 17169
ld [hl], b
ld hl, wEggMonMoves
ld de, wEggMonPP
- predef FillPP
+ predef Predef_FillPP
pop bc
pop de
ret
@@ -590,7 +590,7 @@ GetHeritableMoves: ; 17197
ld [TempMonDVs + 1], a
ld a, TEMPMON
ld [MonType], a
- predef GetGender
+ predef Predef_GetGender
jr c, .inherit_mon2_moves
jr nz, .inherit_mon2_moves
jr .inherit_mon1_moves
@@ -606,7 +606,7 @@ GetHeritableMoves: ; 17197
ld [TempMonDVs + 1], a
ld a, TEMPMON
ld [MonType], a
- predef GetGender
+ predef Predef_GetGender
jr c, .inherit_mon1_moves
jr nz, .inherit_mon1_moves
@@ -647,9 +647,9 @@ GetEggFrontpic: ; 17224 (5:7224)
ld [CurSpecies], a
call GetBaseData
ld hl, BattleMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
pop de
- predef_jump GetMonFrontpic
+ predef_jump Predef_GetMonFrontpic
GetHatchlingFrontpic: ; 1723c (5:723c)
push de
@@ -657,9 +657,9 @@ GetHatchlingFrontpic: ; 1723c (5:723c)
ld [CurSpecies], a
call GetBaseData
ld hl, BattleMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
pop de
- predef_jump GetAnimatedFrontpicPredef
+ predef_jump Predef_GetAnimatedFrontpic
Hatch_UpdateFrontpicBGMapCenter: ; 17254 (5:7254)
push af
@@ -677,7 +677,7 @@ Hatch_UpdateFrontpicBGMapCenter: ; 17254 (5:7254)
ld a, c
ld [hGraphicStartTile], a
lb bc, 7, 7
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
pop af
call Hatch_LoadFrontpicPal
call SetPalettes
@@ -779,7 +779,7 @@ EggHatch_AnimationSequence: ; 1728f (5:728f)
hlcoord 6, 3
ld d, $0
ld e, ANIM_MON_HATCH
- predef AnimateFrontpic
+ predef Predef_AnimateFrontpic
pop af
ld [CurSpecies], a
ret
@@ -985,8 +985,7 @@ DayCareMonCompatibilityText: ; 1746c
db "@"
; 0x174b5
-DayCareMonPrintEmptyString: ; 174b5
-; unreferenced
+Unreferenced_DayCareMonPrintEmptyString: ; 174b5
ld hl, .string
ret
; 174b9
diff --git a/engine/card_flip.asm b/engine/card_flip.asm
index 1940cc850..641224c7a 100755
--- a/engine/card_flip.asm
+++ b/engine/card_flip.asm
@@ -3,6 +3,13 @@ CARDFLIP_LIGHT_ON EQU $f5
CARDFLIP_DECK_SIZE EQU 4 * 6
+; two labels below called from inside ./dummy_game.asm
+Unknown_e00ed: ; e00ed (38:40ed)
+; Graphics for an unused Game Corner
+; game were meant to be here.
+ret_e00ed: ; e00ed (38:40ed)
+ ret
+
_CardFlip: ; e00ee (38:40ee)
ld hl, Options
set 4, [hl]
diff --git a/engine/caught_data.asm b/engine/caught_data.asm
index 694d1bb74..56ef8a839 100644
--- a/engine/caught_data.asm
+++ b/engine/caught_data.asm
@@ -1,4 +1,4 @@
-CheckPartyFullAfterContest: ; 4d9e5
+Special_CheckPartyFullAfterContest: ; 4d9e5
ld a, [wContestMon]
and a
jp z, .DidntCatchAnything
diff --git a/engine/cgb_layouts.asm b/engine/cgb_layouts.asm
index 74b1f04bb..70429a453 100644
--- a/engine/cgb_layouts.asm
+++ b/engine/cgb_layouts.asm
@@ -6,7 +6,7 @@ CheckCGB: ; 8d55
ret
; 8d59
-Predef_LoadSGBLayoutCGB: ; 8d59
+LoadSGBLayoutCGB: ; 8d59
ld a, b
cp SCGB_RAM
jr nz, .not_ram
diff --git a/engine/clock_reset.asm b/engine/clock_reset.asm
index c81271442..82b81b85c 100755
--- a/engine/clock_reset.asm
+++ b/engine/clock_reset.asm
@@ -220,6 +220,7 @@ RestartClock: ; 20021 (8:4021)
ret
; 20160 (8:4160)
+; unused
.unreferenced ; 20160
ld a, [Buffer3]
ld b, a
diff --git a/engine/color.asm b/engine/color.asm
index 891441116..6e0747586 100644
--- a/engine/color.asm
+++ b/engine/color.asm
@@ -43,8 +43,7 @@ CheckShininess:
and a
ret
-; unreferenced
-CheckContestMon:
+UnusedPredef_CheckContestMon:
; Check a mon's DVs at hl in the bug catching contest.
; Return carry if its DVs are good enough to place in the contest.
@@ -78,8 +77,7 @@ CheckContestMon:
and a
ret
-Function8aa4:
-; XXX
+Unreferenced_Function8aa4:
push de
push bc
ld hl, PalPacket_9ce6
@@ -136,8 +134,7 @@ SGB_ApplyPartyMenuHPPals: ; 8ade
ld [hl], e
ret
-Function8b07:
-; Unreferenced
+Unreferenced_Function8b07:
call CheckCGB
ret z
; CGB only
@@ -170,8 +167,7 @@ Function8b07:
RGB 08, 16, 28
RGB 00, 00, 00
-Function8b3f:
-; Unreferenced
+Unreferenced_Function8b3f:
call CheckCGB
ret nz
ld a, [hSGB]
@@ -180,8 +176,7 @@ Function8b3f:
ld hl, BlkPacket_9a86
jp PushSGBPals_
-Function8b4d:
-; XXX
+Unreferenced_Function8b4d:
call CheckCGB
jr nz, .cgb
ld a, [hSGB]
@@ -196,8 +191,7 @@ Function8b4d:
call GetPredefPal
jp LoadHLPaletteIntoDE
-Function8b67:
-; XXX
+Unreferenced_Function8b67:
call CheckCGB
jr nz, .cgb
ld a, [hSGB]
@@ -212,8 +206,7 @@ Function8b67:
call GetPredefPal
jp LoadHLPaletteIntoDE
-Function8b81:
-; XXX
+Unreferenced_Function8b81:
call CheckCGB
jr nz, .cgb
ld a, [hSGB]
@@ -281,8 +274,7 @@ got_palette_pointer_8bd7
call LoadPalette_White_Col1_Col2_Black
ret
-Function8bec:
-; XXX
+Unreferenced_Function8bec:
ld a, [hCGB]
and a
jr nz, .cgb
@@ -455,8 +447,7 @@ INCLUDE "gfx/mail/mail.pal"
INCLUDE "engine/cgb_layouts.asm"
-Function95f0:
-; XXX
+Unreferenced_Function95f0:
ld hl, .Palette
ld de, wBGPals1
ld bc, 1 palettes
@@ -746,7 +737,8 @@ GetMonPalettePointer_:
call GetMonPalettePointer
ret
-Function9779: mobile
+Unreferenced_Function9779:
+ ret
call CheckCGB
ret z
ld hl, BattleObjectPals
@@ -768,8 +760,7 @@ Function9779: mobile
BattleObjectPals:
INCLUDE "gfx/battle_anims/battle_anims.pal"
-Function97cc:
-; XXX
+Unreferenced_Function97cc:
call CheckCGB
ret z
ld a, $90
@@ -864,7 +855,7 @@ PushSGBPals:
jr nz, .loop
ret
-InitSGBBorder:
+Predef_InitSGBBorder:
call CheckCGB
ret nz
; SGB/DMG only
@@ -979,8 +970,7 @@ _InitSGBBorderPals:
dw PalPacket_9dd6
dw PalPacket_9de6
-Function9911:
-; XXX
+Unreferenced_Function9911:
di
xor a
ld [rJOYP], a
diff --git a/engine/crystal_colors.asm b/engine/crystal_colors.asm
index c8f0b17cc..7c0f74a98 100755
--- a/engine/crystal_colors.asm
+++ b/engine/crystal_colors.asm
@@ -322,5 +322,5 @@ InitMG_Mobile_LinkTradePalMap: ; 49856
ret
; 4985a
-Unknown_4985a: ; unreferenced
+; unused
INCLUDE "gfx/unknown/4985a.asm"
diff --git a/engine/debug.asm b/engine/debug.asm
index c36652148..c131d7ae5 100755
--- a/engine/debug.asm
+++ b/engine/debug.asm
@@ -315,12 +315,12 @@ Function81adb: ; 81adb
hlcoord 12, 3
call _PrepMonFrontpic
ld de, vTiles2 tile $31
- predef GetMonBackpic
+ predef Predef_GetMonBackpic
ld a, $31
ld [hGraphicStartTile], a
hlcoord 2, 4
lb bc, 6, 6
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
ld a, [wd003]
and a
jr z, .asm_81b66
@@ -346,13 +346,13 @@ Function81adb: ; 81adb
hlcoord 4, 1
call PlaceString
ld de, vTiles2
- callfar GetTrainerPic
+ callfar Predef_GetTrainerPic
xor a
ld [TempEnemyMonSpecies], a
ld [hGraphicStartTile], a
hlcoord 2, 3
lb bc, 7, 7
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
.asm_81ba9
ld a, $1
@@ -739,7 +739,7 @@ Function81df4: ; 81df4
ld a, [wd004]
inc a
ld [wd265], a
- predef GetTMHMMove
+ predef Predef_GetTMHMMove
ld a, [wd265]
ld [wPutativeTMHMMove], a
call GetMoveName
@@ -748,7 +748,7 @@ Function81df4: ; 81df4
ld a, [wd004]
call Function81e55
ld [CurItem], a
- predef CanLearnTMHMMove
+ predef Predef_CanLearnTMHMMove
ld a, c
and a
ld de, String_81e46
diff --git a/engine/decorations.asm b/engine/decorations.asm
index 92ede0db6..0598d8c34 100755
--- a/engine/decorations.asm
+++ b/engine/decorations.asm
@@ -1194,7 +1194,7 @@ DecorationDesc_GiantOrnament: ; 26fdd
db "@"
; 0x26feb
-ToggleMaptileDecorations: ; 26feb
+Special_ToggleMaptileDecorations: ; 26feb
lb de, 0, 4
ld a, [Bed]
call SetDecorationTile
@@ -1248,7 +1248,7 @@ SetDecorationTile: ; 27037
ret
; 27043
-ToggleDecorationsVisibility: ; 27043
+Special_ToggleDecorationsVisibility: ; 27043
ld de, EVENT_KRISS_HOUSE_2F_CONSOLE
ld hl, VariableSprites + SPRITE_CONSOLE - SPRITE_VARS
ld a, [Console]
diff --git a/engine/dma_transfer.asm b/engine/dma_transfer.asm
index 56e7d56da..c5d804d42 100755
--- a/engine/dma_transfer.asm
+++ b/engine/dma_transfer.asm
@@ -112,7 +112,7 @@ Mobile_ReloadMapPart: ; 104099
ret
; 1040d4
-; XXX
+; unused
ld hl, .unreferenced_1040da
jp CallInSafeGFXMode
@@ -136,7 +136,7 @@ Mobile_ReloadMapPart: ; 104099
ret
; 1040fb
-; XXX
+; unused
ld hl, .unreferenced_104101
jp CallInSafeGFXMode
diff --git a/engine/events.asm b/engine/events.asm
index 400f1c9a4..f95e9ab12 100644
--- a/engine/events.asm
+++ b/engine/events.asm
@@ -995,6 +995,7 @@ CountStep: ; 96b79
ret
; 96bd3
+; unused
.unreferenced ; 96bd3
ld a, 7
scf
@@ -1061,7 +1062,7 @@ Invalid_0x96c2d: ; 96c2d
end
; 96c2e
-; unreferenced
+; unused
end
; 96c2f
diff --git a/engine/events/battle_tower/battle_tower.asm b/engine/events/battle_tower/battle_tower.asm
index d3a292811..93b283d27 100755
--- a/engine/events/battle_tower/battle_tower.asm
+++ b/engine/events/battle_tower/battle_tower.asm
@@ -1,11 +1,11 @@
-BattleTowerRoomMenu: ; 1700b0
+Special_BattleTowerRoomMenu: ; 1700b0
; special
call InitBattleTowerChallengeRAM
farcall _BattleTowerRoomMenu
ret
; 1700ba
-Function1700ba: ; 1700ba
+Special_Function1700ba: ; 1700ba
call InitBattleTowerChallengeRAM
farcall Function11811a
ret
@@ -53,7 +53,7 @@ Function1700c4: ; 1700c4
ret
; 170114
-Function170114: ; 170114
+Special_Function170114: ; 170114
call InitBattleTowerChallengeRAM
call .Function170121
farcall Function11805f
@@ -182,14 +182,14 @@ Function170139: ; 170139
ret
; 170215
-BattleTowerBattle: ; 170215
+Special_BattleTowerBattle: ; 170215
xor a
ld [wBattleTowerBattleEnded], a
call _BattleTowerBattle
ret
; 17021d
-EmptySpecial_17021d: ; 17021d
+DummySpecial_17021d: ; 17021d
ret
; 17021e
@@ -243,12 +243,12 @@ RunBattleTowerTrainer: ; 17024d
xor a
ld [wLinkMode], a
- farcall TrainerRankings_Healings
+ farcall Special_StubbedTrainerRankings_Healings
farcall HealParty
call ReadBTTrainerParty
call Clears5_a89a
- predef StartBattle
+ predef Predef_StartBattle
farcall LoadPokemonData
farcall HealParty
@@ -484,7 +484,7 @@ endr
ld hl, MON_STAT_EXP - 1
add hl, bc
ld b, $1
- predef CalcPkmnStats
+ predef Predef_CalcPkmnStats
pop de
pop hl
dec de
@@ -599,8 +599,7 @@ SkipBattleTowerTrainer: ; 1704c9
ret
; 1704ca
-Function1704ca: ; 1704ca
-; unreferenced mobile function
+Unreferenced_Function1704ca: ; 1704ca
ld a, [$be46]
cp $7
jr c, .asm_1704d3
@@ -620,8 +619,7 @@ Function1704ca: ; 1704ca
ret
; 1704e1
-Function1704e1: ; 1704e1
-; unreferenced special
+UnusedSpecial_Function1704e1: ; 1704e1
call SpeechTextBox
call FadeToMenu
call InitBattleTowerChallengeRAM
@@ -902,7 +900,7 @@ Function1704e1: ; 1704e1
db "れきだいりーダーいちらん@"
; 170687
-BattleTowerAction: ; 170687
+Special_BattleTowerAction: ; 170687
ld a, [ScriptVar]
ld e, a
ld d, 0
@@ -1605,7 +1603,7 @@ BattleTowerAction_UbersCheck: ; 170b16 (5c:4b16) BattleTowerAction $19
ld [ScriptVar], a
ret
-Function_LoadOpponentTrainerAndPokemonsWithOTSprite: ; 0x170b44
+Special_LoadOpponentTrainerAndPokemonWithOTSprite: ; 0x170b44
farcall Function_LoadOpponentTrainerAndPokemons
ld a, [rSVBK]
push af
@@ -1652,11 +1650,11 @@ Function_LoadOpponentTrainerAndPokemonsWithOTSprite: ; 0x170b44
INCLUDE "data/trainers/sprites.asm"
-ret_170bd2: ; 170bd2
+DummySpecial_170bd2: ; 170bd2
ret
; 170bd3
-SpecialCheckForBattleTowerRules: ; 170bd3
+Special_CheckForBattleTowerRules: ; 170bd3
farcall CheckForBattleTowerRules
jr c, .asm_170bde
xor a ; FALSE
diff --git a/engine/events/buena.asm b/engine/events/buena.asm
index cfe543a19..014c6b7a7 100644
--- a/engine/events/buena.asm
+++ b/engine/events/buena.asm
@@ -1,4 +1,4 @@
-SpecialBuenasPassword: ; 8af6b
+Special_BuenasPassword: ; 8af6b
xor a
ld [wWhichIndexSet], a
ld hl, .MenuDataHeader
@@ -63,7 +63,7 @@ SpecialBuenasPassword: ; 8af6b
ret
; 8afd4
-SpecialBuenaPrize: ; 8afd4
+Special_BuenaPrize: ; 8afd4
xor a
ld [wMenuScrollPosition], a
ld a, $1
diff --git a/engine/events/buena_menu.asm b/engine/events/buena_menu.asm
index b453da783..cf6fecf72 100644
--- a/engine/events/buena_menu.asm
+++ b/engine/events/buena_menu.asm
@@ -1,4 +1,4 @@
-AskRememberPassword: ; 4ae12
+Special_AskRememberPassword: ; 4ae12
call .DoMenu
ld a, $0
jr c, .okay
diff --git a/engine/events/bug_contest/contest_2.asm b/engine/events/bug_contest/contest_2.asm
index eff531c50..7ade44815 100755
--- a/engine/events/bug_contest/contest_2.asm
+++ b/engine/events/bug_contest/contest_2.asm
@@ -76,7 +76,7 @@ Special_CheckBugContestContestantFlag: ; 139ed
INCLUDE "data/bug_contest_flags.asm"
-ContestDropOffMons: ; 13a12
+Special_ContestDropOffMons: ; 13a12
ld hl, PartyMon1HP
ld a, [hli]
or [hl]
@@ -101,7 +101,7 @@ ContestDropOffMons: ; 13a12
ret
; 13a31
-ContestReturnMons: ; 13a31
+Special_ContestReturnMons: ; 13a31
; Restore the species of the second mon.
ld hl, PartySpecies + 1
ld a, [wBugContestSecondPartySpecies]
diff --git a/engine/events/bug_contest/display_stats.asm b/engine/events/bug_contest/display_stats.asm
index d6ad3997e..0e2567c28 100644
--- a/engine/events/bug_contest/display_stats.asm
+++ b/engine/events/bug_contest/display_stats.asm
@@ -101,7 +101,7 @@ DisplayAlreadyCaughtText: ; cc0c7
text_jump UnknownText_0x1c10dd
db "@"
-Predef2F:
-Predef38:
-Predef39: ; cc0d5
+DummyPredef2F:
+DummyPredef38:
+DummyPredef39: ; cc0d5
ret
diff --git a/engine/events/bug_contest/judging.asm b/engine/events/bug_contest/judging.asm
index 1db8cd6c6..8681feb8d 100755
--- a/engine/events/bug_contest/judging.asm
+++ b/engine/events/bug_contest/judging.asm
@@ -1,6 +1,6 @@
-_BugContestJudging: ; 1369d
+_Special_BugContestJudging: ; 1369d
call ContestScore
- farcall TrainerRankings_BugContestScore
+ farcall StubbedTrainerRankings_BugContestScore
call BugContest_JudgeContestants
ld a, [wBugContestThirdPlaceWinnerID]
call LoadContestantName
diff --git a/engine/events/catch_tutorial.asm b/engine/events/catch_tutorial.asm
index b9352ccd6..d91af65fe 100644
--- a/engine/events/catch_tutorial.asm
+++ b/engine/events/catch_tutorial.asm
@@ -41,7 +41,7 @@ CatchTutorial:: ; 4e554
ld hl, .AutoInput
ld a, BANK(.AutoInput)
call StartAutoInput
- callfar StartBattle
+ callfar Predef_StartBattle
call StopAutoInput
pop af
diff --git a/engine/events/celebi.asm b/engine/events/celebi.asm
index 58509f383..81565c27e 100755
--- a/engine/events/celebi.asm
+++ b/engine/events/celebi.asm
@@ -362,7 +362,7 @@ CelebiEvent_SetBattleType: ; 49bf3
; 49bf9
-CheckCaughtCelebi: ; 49bf9
+Special_CheckCaughtCelebi: ; 49bf9
ld a, [wBattleResult]
bit 6, a
jr z, .false
diff --git a/engine/events/daycare.asm b/engine/events/daycare.asm
index ed6e16e87..6310787ac 100755
--- a/engine/events/daycare.asm
+++ b/engine/events/daycare.asm
@@ -565,7 +565,7 @@ DayCare_GiveEgg: ; 169ac
pop hl
push bc
ld b, $0
- predef CalcPkmnStats
+ predef Predef_CalcPkmnStats
pop bc
ld hl, MON_HP
add hl, bc
@@ -639,7 +639,7 @@ DayCare_InitBreeding: ; 16a3b
cp DITTO
ld a, $0
jr z, .LoadWhichBreedmonIsTheMother
- farcall GetGender
+ farcall Predef_GetGender
ld a, $0
jr z, .LoadWhichBreedmonIsTheMother
inc a
@@ -684,7 +684,7 @@ DayCare_InitBreeding: ; 16a3b
ld de, wEggMonMoves
xor a
ld [Buffer1], a
- predef FillMoves
+ predef Predef_FillMoves
farcall InitEggMoves
ld hl, wEggMonID
ld a, [PlayerID]
@@ -726,7 +726,7 @@ DayCare_InitBreeding: ; 16a3b
ld a, TEMPMON
ld [MonType], a
push hl
- farcall GetGender
+ farcall Predef_GetGender
pop hl
ld de, wBreedMon1DVs
ld bc, wBreedMon2DVs
@@ -770,7 +770,7 @@ DayCare_InitBreeding: ; 16a3b
call CopyBytes
ld hl, wEggMonMoves
ld de, wEggMonPP
- predef FillPP
+ predef Predef_FillPP
ld hl, wMonOrItemNameBuffer
ld de, StringBuffer1
ld bc, NAME_LENGTH
diff --git a/engine/events/dratini.asm b/engine/events/dratini.asm
index f110b34ab..83732bef2 100644
--- a/engine/events/dratini.asm
+++ b/engine/events/dratini.asm
@@ -1,4 +1,4 @@
-SpecialDratini: ; 0x8b170
+Special_Dratini: ; 0x8b170
; if ScriptVar is 0 or 1, change the moveset of the last Dratini in the party.
; 0: give it a special moveset with Extremespeed.
; 1: give it the normal moveset of a level 15 Dratini.
diff --git a/engine/events/field_moves.asm b/engine/events/field_moves.asm
index efa1403be..3fb1fe9e6 100755
--- a/engine/events/field_moves.asm
+++ b/engine/events/field_moves.asm
@@ -7,7 +7,7 @@ PlayWhirlpoolSound: ; 8c7d4
; 8c7e1
BlindingFlash: ; 8c7e1
- farcall FadeOutPalettes
+ farcall Special_FadeOutPalettes
ld hl, wStatusFlags
set 2, [hl] ; Flash
farcall ReplaceTimeOfDayPals
@@ -15,7 +15,7 @@ BlindingFlash: ; 8c7e1
ld b, SCGB_MAPPALS
call GetSGBLayout
farcall LoadOW_BGPal7
- farcall FadeInPalettes
+ farcall Special_FadeInPalettes
ret
; 8c80a
diff --git a/engine/events/fruit_trees.asm b/engine/events/fruit_trees.asm
index 768bedb0b..44f2315a0 100644
--- a/engine/events/fruit_trees.asm
+++ b/engine/events/fruit_trees.asm
@@ -58,7 +58,7 @@ CheckFruitTree: ; 44055
; 4405f
PickedFruitTree: ; 4405f
- farcall TrainerRankings_FruitPicked
+ farcall StubbedTrainerRankings_FruitPicked
ld b, 1
jp GetFruitTreeFlag
; 4406a
diff --git a/engine/events/halloffame.asm b/engine/events/halloffame.asm
index 768ea9e58..c3e90b597 100755
--- a/engine/events/halloffame.asm
+++ b/engine/events/halloffame.asm
@@ -42,7 +42,7 @@ RedCredits:: ; 86455
ld [MusicFadeID + 1], a
ld a, 10
ld [MusicFade], a
- farcall FadeOutPalettes
+ farcall Special_FadeOutPalettes
xor a
ld [VramState], a
ld [hMapAnims], a
@@ -65,7 +65,7 @@ HallOfFame_FadeOutMusic: ; 8648e
ld [MusicFadeID + 1], a
ld a, 10
ld [MusicFade], a
- farcall FadeOutPalettes
+ farcall Special_FadeOutPalettes
xor a
ld [VramState], a
ld [hMapAnims], a
@@ -130,7 +130,7 @@ AnimateHallOfFame: ; 864c3
call WaitBGMap
decoord 6, 5
ld c, $6
- predef HOF_AnimateFrontpic
+ predef HOF_Predef_AnimateFrontpic
ld c, 60
call DelayFrames
and a
@@ -244,18 +244,18 @@ AnimateHOFMonEntrance: ; 865b5
ld a, [hli]
ld [TempMonDVs + 1], a
ld hl, TempMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
hlcoord 0, 0
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
ld a, " "
call ByteFill
ld de, vTiles2 tile $31
- predef GetMonBackpic
+ predef Predef_GetMonBackpic
ld a, $31
ld [hGraphicStartTile], a
hlcoord 6, 6
lb bc, 6, 6
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
ld a, $d0
ld [hSCY], a
ld a, $90
@@ -403,7 +403,7 @@ _HallOfFamePC: ; 86650
call SetPalettes
decoord 6, 5
ld c, $6
- predef HOF_AnimateFrontpic
+ predef HOF_Predef_AnimateFrontpic
and a
ret
@@ -478,7 +478,7 @@ DisplayHOFMon: ; 86748
ld [CurPartySpecies], a
ld [wd265], a
ld hl, TempMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
xor a
ld [wBoxAlignment], a
hlcoord 6, 5
@@ -499,7 +499,7 @@ DisplayHOFMon: ; 86748
call PlaceString
ld a, TEMPMON
ld [MonType], a
- farcall GetGender
+ farcall Predef_GetGender
ld a, " "
jr c, .got_gender
ld a, "♂"
@@ -546,7 +546,7 @@ HOF_AnimatePlayerPic: ; 86810
ld [hGraphicStartTile], a
hlcoord 6, 6
lb bc, 6, 6
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
ld a, $d0
ld [hSCY], a
ld a, $90
@@ -570,7 +570,7 @@ HOF_AnimatePlayerPic: ; 86810
ld [hGraphicStartTile], a
hlcoord 12, 5
lb bc, 7, 7
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
ld a, $c0
ld [hSCX], a
call WaitBGMap
diff --git a/engine/events/happiness_egg.asm b/engine/events/happiness_egg.asm
index df58c7143..2db54a1a7 100755
--- a/engine/events/happiness_egg.asm
+++ b/engine/events/happiness_egg.asm
@@ -1,4 +1,4 @@
-GetFirstPokemonHappiness: ; 718d
+Special_GetFirstPokemonHappiness: ; 718d
ld hl, PartyMon1Happiness
ld bc, PARTYMON_STRUCT_LENGTH
ld de, PartySpecies
@@ -17,7 +17,7 @@ GetFirstPokemonHappiness: ; 718d
call GetPokemonName
jp CopyPokemonName_Buffer1_Buffer3
-CheckFirstMonIsEgg: ; 71ac
+Special_CheckFirstMonIsEgg: ; 71ac
ld a, [PartySpecies]
ld [wd265], a
cp EGG
diff --git a/engine/events/heal_machine_anim.asm b/engine/events/heal_machine_anim.asm
index bd7ba792d..8518087f6 100755
--- a/engine/events/heal_machine_anim.asm
+++ b/engine/events/heal_machine_anim.asm
@@ -1,4 +1,4 @@
-HealMachineAnim: ; 12324
+Special_HealMachineAnim: ; 12324
; If you have no Pokemon, don't change the buffer. This can lead to some glitchy effects if you have no Pokemon.
ld a, [PartyCount]
and a
diff --git a/engine/events/kurt.asm b/engine/events/kurt.asm
index 8ab28cddf..be395b9d8 100644
--- a/engine/events/kurt.asm
+++ b/engine/events/kurt.asm
@@ -161,7 +161,7 @@ Kurt_SelectQuantity: ; 880c2
db $40 ; flags
menu_coords 6, 9, SCREEN_WIDTH - 1, 12
- ; XXX
+ ; unused
dw 0
db -1
db 0
diff --git a/engine/events/lucky_number.asm b/engine/events/lucky_number.asm
index 4488cfcc9..a172fc431 100644
--- a/engine/events/lucky_number.asm
+++ b/engine/events/lucky_number.asm
@@ -103,7 +103,7 @@ Special_CheckForLuckyNumberWinners: ; 4d87a
ld a, [ScriptVar]
and a
ret z ; found nothing
- farcall TrainerRankings_LuckyNumberShow
+ farcall StubbedTrainerRankings_LuckyNumberShow
ld a, [wFoundMatchingIDInParty]
and a
push af
diff --git a/engine/events/magikarp.asm b/engine/events/magikarp.asm
index 336d27e79..6588295b8 100644
--- a/engine/events/magikarp.asm
+++ b/engine/events/magikarp.asm
@@ -28,7 +28,7 @@ Special_CheckMagikarpLength: ; fbb32
ld c, l
call CalcMagikarpLength
call PrintMagikarpLength
- farcall TrainerRankings_MagikarpLength
+ farcall StubbedTrainerRankings_MagikarpLength
ld hl, .MeasureItText
call PrintText
diff --git a/engine/events/misc_scripts.asm b/engine/events/misc_scripts.asm
index 97372a57a..73ed89143 100755
--- a/engine/events/misc_scripts.asm
+++ b/engine/events/misc_scripts.asm
@@ -2,7 +2,7 @@ Script_AbortBugContest: ; 0x122c1
checkflag ENGINE_BUG_CONTEST_TIMER
iffalse .finish
setflag ENGINE_DAILY_BUG_CONTEST
- special ContestReturnMons
+ special Special_ContestReturnMons
.finish
end
diff --git a/engine/events/mom_phone.asm b/engine/events/mom_phone.asm
index bef7d5688..50496e663 100755
--- a/engine/events/mom_phone.asm
+++ b/engine/events/mom_phone.asm
@@ -217,7 +217,7 @@ endr
INCLUDE "data/items/mom_phone.asm"
- db 0, 0, 0 ; XXX
+ db 0, 0, 0 ; unused
_MomText_HiHowAreYou: ; 0xfd1b1
; Hi, ! How are you?
@@ -255,10 +255,10 @@ _MomText_ItsInRoom: ; 0xfd1ca
db "@"
; 0xfd1cf
- db 0 ; XXX
+ db 0 ; unused
-Predef3A: ; fd1d0
+DummyPredef3A: ; fd1d0
ret
; fd1d1
- ret ; XXX
+ ret ; unused
diff --git a/engine/events/move_deleter.asm b/engine/events/move_deleter.asm
index 95fc0f1d8..3e06113ae 100644
--- a/engine/events/move_deleter.asm
+++ b/engine/events/move_deleter.asm
@@ -1,4 +1,4 @@
-MoveDeletion:
+Special_MoveDeletion:
ld hl, .IntroText
call PrintText
call YesNoBox
diff --git a/engine/events/move_tutor.asm b/engine/events/move_tutor.asm
index 7b475c169..3a7272538 100644
--- a/engine/events/move_tutor.asm
+++ b/engine/events/move_tutor.asm
@@ -55,7 +55,7 @@ CheckCanLearnMoveTutorMove: ; 492b9
ld hl, .MenuDataHeader
call LoadMenuDataHeader
- predef CanLearnTMHMMove
+ predef Predef_CanLearnTMHMMove
push bc
ld a, [CurPartyMon]
@@ -79,7 +79,7 @@ CheckCanLearnMoveTutorMove: ; 492b9
callfar KnowsMove
jr c, .didnt_learn
- predef LearnMove
+ predef Predef_LearnMove
ld a, b
and a
jr z, .didnt_learn
diff --git a/engine/events/overworld.asm b/engine/events/overworld.asm
index 17ec54bb1..c9e0a5fe5 100755
--- a/engine/events/overworld.asm
+++ b/engine/events/overworld.asm
@@ -427,7 +427,7 @@ UsedSurfScript: ; c986
end
.empty_fn ; c9a2
- farcall TrainerRankings_Surf
+ farcall StubbedTrainerRankings_Surf
ret
UsedSurfText: ; c9a9
@@ -623,7 +623,7 @@ FlyFunction: ; ca3b
special UpdateTimePals
callasm FlyFromAnim
farscall Script_AbortBugContest
- special WarpToSpawnPoint
+ special Special_WarpToSpawnPoint
callasm DelayLoadingNewSprites
writecode VAR_MOVEMENT, PLAYER_NORMAL
newloadmap MAPSETUP_FLY
@@ -700,7 +700,7 @@ Script_UsedWaterfall: ; 0xcb20
ld a, [PlayerStandingTile]
call CheckWaterfallTile
ret z
- farcall TrainerRankings_Waterfall
+ farcall StubbedTrainerRankings_Waterfall
ld a, $1
ld [ScriptVar], a
ret
@@ -871,7 +871,7 @@ dig_incave
playsound SFX_WARP_TO
applymovement PLAYER, .DigOut
farscall Script_AbortBugContest
- special WarpToSpawnPoint
+ special Special_WarpToSpawnPoint
writecode VAR_MOVEMENT, PLAYER_NORMAL
newloadmap MAPSETUP_DOOR
playsound SFX_WARP_FROM
@@ -958,7 +958,7 @@ TeleportFunction: ; cc61
playsound SFX_WARP_TO
applymovement PLAYER, .TeleportFrom
farscall Script_AbortBugContest
- special WarpToSpawnPoint
+ special Special_WarpToSpawnPoint
writecode VAR_MOVEMENT, PLAYER_NORMAL
newloadmap MAPSETUP_TELEPORT
playsound SFX_WARP_FROM
@@ -986,7 +986,7 @@ StrengthFunction: ; cce5
jr c, .Failed
jr .UseStrength
-.AlreadyUsing: ; unreferenced
+.Unreferenced_AlreadyUsing:
ld hl, .JumpText
call MenuTextBoxBackup
ld a, $80
@@ -1749,7 +1749,7 @@ Script_GetOnBike_Register: ; 0xd14e
special ReplaceKrisSprite
end
-; XXX
+; unused
nop
ret
diff --git a/engine/events/poisonstep.asm b/engine/events/poisonstep.asm
index 00c7477bc..366ad1c03 100755
--- a/engine/events/poisonstep.asm
+++ b/engine/events/poisonstep.asm
@@ -104,7 +104,7 @@ DoPoisonStep:: ; 505da
ld de, SFX_POISON
call PlaySFX
ld b, $2
- predef LoadPoisonBGPals
+ predef Predef_LoadPoisonBGPals
call DelayFrame
ret
; 50669
@@ -145,7 +145,7 @@ DoPoisonStep:: ; 505da
ld a, [PartyCount]
cp [hl]
jr nz, .party_loop
- predef CheckPlayerPartyForFitPkmn
+ predef Predef_CheckPlayerPartyForFitPkmn
ld a, d
ld [ScriptVar], a
ret
diff --git a/engine/events/poisonstep_pals.asm b/engine/events/poisonstep_pals.asm
index 9aad8a9d8..22e05ae6c 100644
--- a/engine/events/poisonstep_pals.asm
+++ b/engine/events/poisonstep_pals.asm
@@ -1,4 +1,4 @@
-LoadPoisonBGPals: ; cbcdd
+Predef_LoadPoisonBGPals: ; cbcdd
call .LoadPals
ld a, [hCGB]
and a
diff --git a/engine/events/poke_seer.asm b/engine/events/poke_seer.asm
index 4a7b3e081..c7e6bd5ee 100644
--- a/engine/events/poke_seer.asm
+++ b/engine/events/poke_seer.asm
@@ -15,7 +15,7 @@
const SEERACTION_CANT_TELL_2
const SEERACTION_LEVEL_ONLY
-SpecialPokeSeer: ; 4f0bc
+Special_PokeSeer: ; 4f0bc
ld a, SEER_INTRO
call PrintSeerText
call JoyWaitAorB
diff --git a/engine/events/pokecenter_pc.asm b/engine/events/pokecenter_pc.asm
index f7c8a01a3..efb5d8ad1 100755
--- a/engine/events/pokecenter_pc.asm
+++ b/engine/events/pokecenter_pc.asm
@@ -1,4 +1,4 @@
-PokemonCenterPC: ; 1559a
+Special_PokemonCenterPC: ; 1559a
call PC_CheckPartyForPokemon
ret c
call PC_PlayBootSound
@@ -353,7 +353,7 @@ KrisWithdrawItemMenu: ; 0x157d1
ld [CurItemQuantity], a
ld hl, PCItems
call TossItem
- predef PartyMonItemName
+ predef Predef_PartyMonItemName
ld hl, .WithdrewText
call MenuTextBox
xor a
@@ -517,7 +517,7 @@ KrisDepositItemMenu: ; 0x1588b
ld [CurItemQuantity], a
ld hl, NumItems
call TossItem
- predef PartyMonItemName
+ predef Predef_PartyMonItemName
ld hl, .DepositText
call PrintText
ret
diff --git a/engine/events/pokepic.asm b/engine/events/pokepic.asm
index aa950b255..a2f0c0725 100755
--- a/engine/events/pokepic.asm
+++ b/engine/events/pokepic.asm
@@ -12,7 +12,7 @@ Pokepic:: ; 244e3
ld [CurSpecies], a
call GetBaseData
ld de, vTiles1
- predef GetMonFrontpic
+ predef Predef_GetMonFrontpic
ld a, [wMenuBorderTopCoord]
inc a
ld b, a
@@ -23,7 +23,7 @@ Pokepic:: ; 244e3
ld a, $80
ld [hGraphicStartTile], a
lb bc, 7, 7
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
call WaitBGMap
ret
diff --git a/engine/events/print_photo.asm b/engine/events/print_photo.asm
index 06b01bbcf..54aa1892d 100755
--- a/engine/events/print_photo.asm
+++ b/engine/events/print_photo.asm
@@ -1,4 +1,4 @@
-PhotoStudio: ; 16dc7
+Special_PhotoStudio: ; 16dc7
ld hl, .Text_AskWhichMon
call PrintText
farcall SelectMonFromParty
diff --git a/engine/events/print_unown.asm b/engine/events/print_unown.asm
index 72248a67b..948af5937 100644
--- a/engine/events/print_unown.asm
+++ b/engine/events/print_unown.asm
@@ -140,13 +140,13 @@ UnownPrinter: ; 16be4
xor a
ld [wBoxAlignment], a
ld de, vTiles2
- predef GetMonFrontpic
+ predef Predef_GetMonFrontpic
call .Load2bppToSRAM
hlcoord 1, 6
xor a
ld [hGraphicStartTile], a
lb bc, 7, 7
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
ld de, vTiles2 tile $31
farcall RotateUnownFrontpic
ret
@@ -228,6 +228,6 @@ PlaceUnownPrinterFrontpic: ; 16dac
ld a, $31
ld [hGraphicStartTile], a
lb bc, 7, 7
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
ret
; 16dc7
diff --git a/engine/events/prof_oaks_pc.asm b/engine/events/prof_oaks_pc.asm
index 69949940b..ae84a43a5 100755
--- a/engine/events/prof_oaks_pc.asm
+++ b/engine/events/prof_oaks_pc.asm
@@ -3,7 +3,7 @@ ProfOaksPC: ; 0x265d3
call MenuTextBox
call YesNoBox
jr c, .shutdown
- call ProfOaksPCBoot ; player chose "yes"?
+ call Special_ProfOaksPCBoot ; player chose "yes"?
.shutdown
ld hl, OakPCText4
call PrintText
@@ -11,7 +11,7 @@ ProfOaksPC: ; 0x265d3
call ExitMenu
ret
-ProfOaksPCBoot ; 0x265ee
+Special_ProfOaksPCBoot ; 0x265ee
ld hl, OakPCText2
call PrintText
call Rate
diff --git a/engine/events/sacred_ash.asm b/engine/events/sacred_ash.asm
index cc46eac9f..65ed83438 100755
--- a/engine/events/sacred_ash.asm
+++ b/engine/events/sacred_ash.asm
@@ -52,12 +52,12 @@ SacredAshScript: ; 0x50821
special HealParty
reloadmappart
playsound SFX_WARP_TO
- special FadeOutPalettes
- special FadeInPalettes
- special FadeOutPalettes
- special FadeInPalettes
- special FadeOutPalettes
- special FadeInPalettes
+ special Special_FadeOutPalettes
+ special Special_FadeInPalettes
+ special Special_FadeOutPalettes
+ special Special_FadeInPalettes
+ special Special_FadeOutPalettes
+ special Special_FadeInPalettes
waitsfx
writetext UnknownText_0x50845
playsound SFX_CAUGHT_MON
diff --git a/engine/events/special.asm b/engine/events/special.asm
index 9bd83f068..62e0a620e 100755
--- a/engine/events/special.asm
+++ b/engine/events/special.asm
@@ -1,6 +1,6 @@
MANIA_OT_ID EQU 00518
-SpecialGiveShuckle: ; 7305
+Special_GiveShuckle: ; 7305
; Adding to the party.
xor a
@@ -12,7 +12,7 @@ SpecialGiveShuckle: ; 7305
ld a, 15
ld [CurPartyLevel], a
- predef TryAddMonToParty
+ predef Predef_TryAddMonToParty
jr nc, .NotGiven
; Caught data.
@@ -71,7 +71,7 @@ SpecialShuckleOT:
SpecialShuckleNick:
db "SHUCKIE@"
-SpecialReturnShuckle: ; 737e
+Special_ReturnShuckle: ; 737e
farcall SelectMonFromParty
jr c, .refused
@@ -231,6 +231,5 @@ CopyPokemonName_Buffer1_Buffer3: ; 746e
ld bc, PKMN_NAME_LENGTH
jp CopyBytes
-Predef1: ; 747a
-; not used
+DummyPredef1: ; 747a
ret
diff --git a/engine/events/std_scripts.asm b/engine/events/std_scripts.asm
index 6e76c6189..8855555a7 100644
--- a/engine/events/std_scripts.asm
+++ b/engine/events/std_scripts.asm
@@ -108,13 +108,13 @@ PokecenterNurseScript:
farwritetext NurseTakePokemonText
pause 20
- special TrainerRankings_Healings
+ special Special_StubbedTrainerRankings_Healings
spriteface LAST_TALKED, LEFT
pause 10
special HealParty
playmusic MUSIC_NONE
writebyte HEALMACHINE_POKECENTER
- special HealMachineAnim
+ special Special_HealMachineAnim
pause 30
special RestartMapMusic
spriteface LAST_TALKED, DOWN
@@ -124,7 +124,7 @@ PokecenterNurseScript:
iftrue .no
checkflag ENGINE_POKERUS ; nurse already talked about pokerus
iftrue .no
- special SpecialCheckPokerus
+ special Special_CheckPokerus
iftrue .pokerus
.no
@@ -204,7 +204,7 @@ HomepageScript:
Radio1Script:
opentext
writebyte MAPRADIO_POKEMON_CHANNEL
- special MapRadio
+ special Special_MapRadio
closetext
end
@@ -212,7 +212,7 @@ Radio2Script:
; Lucky Channel
opentext
writebyte MAPRADIO_LUCKY_CHANNEL
- special MapRadio
+ special Special_MapRadio
closetext
end
@@ -221,7 +221,7 @@ TrashCanScript: ; 0xbc1a5
PCScript:
opentext
- special PokemonCenterPC
+ special Special_PokemonCenterPC
closetext
end
@@ -320,7 +320,7 @@ BugContestResultsScript:
opentext
farwritetext ContestResults_ReadyToJudgeText
waitbutton
- special BugContestJudging
+ special Special_BugContestJudging
vartomem MEM_BUFFER_0
if_equal 1, BugContestResults_FirstPlace
if_equal 2, BugContestResults_SecondPlace
@@ -346,9 +346,9 @@ BugContestResults_FinishUp
iffalse BugContestResults_DidNotLeaveMons
farwritetext ContestResults_ReturnPartyText
waitbutton
- special ContestReturnMons
+ special Special_ContestReturnMons
BugContestResults_DidNotLeaveMons
- special CheckPartyFullAfterContest
+ special Special_CheckPartyFullAfterContest
if_equal BUGCONTEST_CAUGHT_MON, BugContestResults_CleanUp
if_equal BUGCONTEST_NO_CATCH, BugContestResults_CleanUp
; BUGCONTEST_BOXED_MON
@@ -622,7 +622,7 @@ InitializeEventsScript:
return
AskNumber1MScript:
- special RandomPhoneMon
+ special Special_RandomPhoneMon
checkcode VAR_CALLERID
if_equal PHONE_SCHOOLBOY_JACK, .Jack
if_equal PHONE_SAILOR_HUEY, .Huey
@@ -707,7 +707,7 @@ AskNumber1MScript:
end
AskNumber2MScript:
- special RandomPhoneMon
+ special Special_RandomPhoneMon
checkcode VAR_CALLERID
if_equal PHONE_SCHOOLBOY_JACK, .Jack
if_equal PHONE_SAILOR_HUEY, .Huey
@@ -1887,7 +1887,7 @@ CoinVendor_IntroScript: ; 0xbcde0
HappinessCheckScript:
faceplayer
opentext
- special GetFirstPokemonHappiness
+ special Special_GetFirstPokemonHappiness
if_less_than 50, .Unhappy
if_less_than 150, .KindaHappy
farwritetext HappinessText3
diff --git a/engine/events/treemons.asm b/engine/events/treemons.asm
index 2a8ce4882..780fef2cc 100755
--- a/engine/events/treemons.asm
+++ b/engine/events/treemons.asm
@@ -1,5 +1,5 @@
TreeMonEncounter: ; b81ea
- farcall TrainerRankings_TreeEncounters
+ farcall StubbedTrainerRankings_TreeEncounters
xor a
ld [TempWildMonSpecies], a
diff --git a/engine/events/unown_walls.asm b/engine/events/unown_walls.asm
index d4e6083c4..af7e80bf0 100644
--- a/engine/events/unown_walls.asm
+++ b/engine/events/unown_walls.asm
@@ -1,4 +1,4 @@
-SpecialHoOhChamber: ; 0x8addb
+Special_HoOhChamber: ; 0x8addb
ld hl, PartySpecies
ld a, [hl]
cp HO_OH ; is Ho-oh the first Pokémon in the party?
@@ -11,7 +11,7 @@ SpecialHoOhChamber: ; 0x8addb
ret
; 0x8adef
-SpecialOmanyteChamber: ; 8adef
+Special_OmanyteChamber: ; 8adef
call GetSecondaryMapHeaderPointer
ld de, EVENT_WALL_OPENED_IN_OMANYTE_CHAMBER
ld b, CHECK_FLAG
diff --git a/engine/events/whiteout.asm b/engine/events/whiteout.asm
index 14a7066f1..aa629682f 100755
--- a/engine/events/whiteout.asm
+++ b/engine/events/whiteout.asm
@@ -10,7 +10,7 @@ Script_OverworldWhiteout:: ; 0x124c8
Script_Whiteout: ; 0x124ce
writetext .WhitedOutText
waitbutton
- special FadeOutPalettes
+ special Special_FadeOutPalettes
pause 40
special HealParty
checkflag ENGINE_BUG_CONTEST_TIMER
@@ -18,7 +18,7 @@ Script_Whiteout: ; 0x124ce
callasm HalveMoney
callasm GetWhiteoutSpawn
farscall Script_AbortBugContest
- special WarpToSpawnPoint
+ special Special_WarpToSpawnPoint
newloadmap MAPSETUP_WARP
end_all
@@ -49,7 +49,7 @@ BattleBGMap: ; 1250a
; 12513
HalveMoney: ; 12513
- farcall TrainerRankings_WhiteOuts
+ farcall StubbedTrainerRankings_WhiteOuts
; Halve the player's money.
ld hl, Money
diff --git a/engine/events_2.asm b/engine/events_2.asm
index cac736bab..e4458d9aa 100644
--- a/engine/events_2.asm
+++ b/engine/events_2.asm
@@ -1,7 +1,7 @@
; More overworld event handling.
-WarpToSpawnPoint:: ; 97c28
+Special_WarpToSpawnPoint:: ; 97c28
ld hl, wStatusFlags2
res 1, [hl] ; safari zone?
res 2, [hl] ; bug contest
@@ -361,7 +361,7 @@ HandleCmdQueue:: ; 97e08
ret
; 97e25
-GetNthCmdQueueEntry: ; 97e25 unreferenced
+Unreferenced_GetNthCmdQueueEntry: ; 97e25
ld hl, wCmdQueue
ld bc, CMDQUEUE_ENTRY_SIZE
call AddNTimes
diff --git a/engine/evolution_animation.asm b/engine/evolution_animation.asm
index d9def496c..365f4e729 100755
--- a/engine/evolution_animation.asm
+++ b/engine/evolution_animation.asm
@@ -122,7 +122,7 @@ EvolutionAnimation: ; 4e5e1
hlcoord 7, 2
ld d, $0
ld e, ANIM_MON_EVOLVE
- predef AnimateFrontpic
+ predef Predef_AnimateFrontpic
pop af
ld [CurPartySpecies], a
@@ -168,7 +168,7 @@ EvolutionAnimation: ; 4e5e1
ld a, $1
ld [wBoxAlignment], a
ld de, vTiles2
- predef GetAnimatedFrontpicPredef
+ predef Predef_GetAnimatedFrontpic
xor a
ld [wBoxAlignment], a
ret
diff --git a/engine/evolve.asm b/engine/evolve.asm
index c335229d6..877dd9031 100755
--- a/engine/evolve.asm
+++ b/engine/evolve.asm
@@ -6,7 +6,7 @@ EvolvePokemon: ; 421d8
ld c, a
ld b, SET_FLAG
call EvoFlagAction
-EvolveAfterBattle: ; 421e6
+Predef_EvolveAfterBattle: ; 421e6
xor a
ld [wMonTriedToEvolve], a
dec a
@@ -55,7 +55,7 @@ EvolveAfterBattle_MasterLoop
push hl
xor a
ld [MonType], a
- predef CopyPkmnToTempMon
+ predef Predef_CopyPkmnToTempMon
pop hl
.loop
@@ -247,7 +247,7 @@ EvolveAfterBattle_MasterLoop
push hl
ld hl, Text_EvolvedIntoPKMN
call PrintTextBoxText
- farcall TrainerRankings_MonsEvolved
+ farcall StubbedTrainerRankings_MonsEvolved
ld de, MUSIC_NONE
call PlayMusic
@@ -265,7 +265,7 @@ EvolveAfterBattle_MasterLoop
ld hl, TempMonExp + 2
ld de, TempMonMaxHP
ld b, $1
- predef CalcPkmnStats
+ predef Predef_CalcPkmnStats
ld a, [CurPartyMon]
ld hl, PartyMons
@@ -301,7 +301,7 @@ EvolveAfterBattle_MasterLoop
ld [wd265], a
xor a
ld [MonType], a
- call LearnLevelMoves
+ call Predef_LearnLevelMoves
ld a, [wd265]
dec a
call SetSeenAndCaughtMon
@@ -311,7 +311,7 @@ EvolveAfterBattle_MasterLoop
jr nz, .skip_unown
ld hl, TempMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
callfar UpdateUnownDex
.skip_unown
@@ -333,7 +333,7 @@ EvolveAfterBattle_MasterLoop
inc hl
jp .loop
-; XXX
+; unused
pop hl
.ReturnToMap:
pop de
@@ -429,7 +429,7 @@ Text_WhatEvolving: ; 0x42482
; 0x42487
-LearnLevelMoves: ; 42487
+Predef_LearnLevelMoves: ; 42487
ld a, [wd265]
ld [CurPartySpecies], a
dec a
@@ -484,7 +484,7 @@ LearnLevelMoves: ; 42487
ld [wd265], a
call GetMoveName
call CopyName1
- predef LearnMove
+ predef Predef_LearnMove
pop hl
jr .find_move
@@ -495,7 +495,7 @@ LearnLevelMoves: ; 42487
; 424e1
-FillMoves: ; 424e1
+Predef_FillMoves: ; 424e1
; Fill in moves at de for CurPartySpecies at CurPartyLevel
push hl
@@ -621,7 +621,7 @@ ShiftMoves: ; 4256e
EvoFlagAction: ; 42577
push de
ld d, $0
- predef FlagPredef
+ predef Predef_SmallFarFlagAction
pop de
ret
; 42581
diff --git a/engine/health.asm b/engine/health.asm
index 0f7ba156d..eba75ddf4 100755
--- a/engine/health.asm
+++ b/engine/health.asm
@@ -52,7 +52,7 @@ HealPartyMon: ; c677
farcall RestoreAllPP
ret
-ComputeHPBarPixels: ; c699
+Predef_ComputeHPBarPixels: ; c699
; e = bc * (6 * 8) / de
ld a, b
or c
@@ -103,7 +103,7 @@ ComputeHPBarPixels: ; c699
ld e, 0
ret
-AnimateHPBar: ; c6e0
+Predef_AnimateHPBar: ; c6e0
call WaitBGMap
call _AnimateHPBar
call WaitBGMap
diff --git a/engine/intro_menu.asm b/engine/intro_menu.asm
index b92ddc22e..46a61acd0 100755
--- a/engine/intro_menu.asm
+++ b/engine/intro_menu.asm
@@ -10,7 +10,7 @@ _MainMenu: ; 5ae8
jp StartTitleScreen
; 5b04
-; unreferenced
+; unused
ret
; 5b05
@@ -825,7 +825,7 @@ NamePlayer: ; 0x6074
db "KRIS@@@@@@@"
; 60e9
-Function60e9: ; Unreferenced
+Unreferenced_Function60e9:
call LoadMenuDataHeader
call VerticalMenu
ld a, [wMenuCursorY]
@@ -941,24 +941,24 @@ Intro_WipeInFrontpic: ; 6182
Intro_PrepTrainerPic: ; 619c
ld de, vTiles2
- farcall GetTrainerPic
+ farcall Predef_GetTrainerPic
xor a
ld [hGraphicStartTile], a
hlcoord 6, 4
lb bc, 7, 7
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
ret
; 61b4
ShrinkFrame: ; 61b4
ld de, vTiles2
ld c, $31
- predef DecompressPredef
+ predef Predef_Decompress
xor a
ld [hGraphicStartTile], a
hlcoord 6, 4
lb bc, 7, 7
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
ret
; 61cd
@@ -1093,7 +1093,7 @@ RunTitleScreen: ; 627b
ret
; 6292
-Function6292: ; 6292 ; unreferenced
+Unreferenced_Function6292: ; 6292
ld a, [hVBlankCounter]
and $7
ret nz
@@ -1124,7 +1124,7 @@ TitleScreenScene: ; 62a3
dw TitleScreenEnd
; 62b7
-.NextScene: ; Unreferenced
+.Unreferenced_NextScene:
ld hl, wJumptableIndex
inc [hl]
ret
@@ -1328,7 +1328,7 @@ ResetClock: ; 6392
jp Init
; 639b
-Function639b: ; unreferenced
+Unreferenced_Function639b:
; If bit 0 or 1 of [wTitleScreenTimer] is set, we don't need to be here.
ld a, [wTitleScreenTimer]
and %00000011
diff --git a/engine/item_effects.asm b/engine/item_effects.asm
index f5c5e76d1..a15e01247 100644
--- a/engine/item_effects.asm
+++ b/engine/item_effects.asm
@@ -415,7 +415,7 @@ ParkBall: ; e8a2
ld [hBattleTurn], a
ld [Buffer2], a
ld [wNumHits], a
- predef PlayBattleAnim
+ predef Predef_PlayBattleAnim
ld a, [wWildMon]
and a
@@ -517,7 +517,7 @@ ParkBall: ; e8a2
cp BATTLETYPE_TUTORIAL
jp z, .FinishTutorial
- farcall TrainerRankings_WildMonsCaught
+ farcall StubbedTrainerRankings_WildMonsCaught
ld hl, Text_GotchaMonWasCaught
call PrintText
@@ -547,7 +547,7 @@ ParkBall: ; e8a2
ld a, [EnemyMonSpecies]
ld [wd265], a
- predef NewPokedexEntry
+ predef Predef_NewPokedexEntry
.skip_pokedex
ld a, [BattleType]
@@ -567,7 +567,7 @@ ParkBall: ; e8a2
ld [MonType], a
call ClearSprites
- predef TryAddMonToParty
+ predef Predef_TryAddMonToParty
farcall SetCaughtData
@@ -623,7 +623,7 @@ ParkBall: ; e8a2
.SendToPC:
call ClearSprites
- predef SentPkmnIntoBox
+ predef Predef_SendPkmnIntoBox
farcall SetBoxMonCaughtData
@@ -979,7 +979,7 @@ LoveBallMultiplier:
ld [MonType], a
ld a, [CurBattleMon]
ld [CurPartyMon], a
- farcall GetGender
+ farcall Predef_GetGender
jr c, .done1 ; no effect on genderless
ld d, 0 ; male
@@ -993,7 +993,7 @@ LoveBallMultiplier:
ld [CurPartySpecies], a
ld a, WILDMON
ld [MonType], a
- farcall GetGender
+ farcall Predef_GetGender
jr c, .done2 ; no effect on genderless
ld d, 0 ; male
@@ -1283,7 +1283,7 @@ UpdateStatsAfterItem: ; ee8c
ld a, MON_STAT_EXP - 1
call GetPartyParamLocation
ld b, $1
- predef_jump CalcPkmnStats
+ predef_jump Predef_CalcPkmnStats
; ee9f
RareCandy_StatBooster_ExitMenu: ; ee9f
@@ -1422,7 +1422,7 @@ RareCandy: ; ef14
xor a ; PARTYMON
ld [MonType], a
- predef CopyPkmnToTempMon
+ predef Predef_CopyPkmnToTempMon
hlcoord 9, 0
ld b, 10
@@ -1431,7 +1431,7 @@ RareCandy: ; ef14
hlcoord 11, 1
ld bc, 4
- predef PrintTempMonStats
+ predef Predef_PrintTempMonStats
call WaitPressAorB_BlinkCursor
@@ -1439,7 +1439,7 @@ RareCandy: ; ef14
ld [MonType], a
ld a, [CurPartySpecies]
ld [wd265], a
- predef LearnLevelMoves
+ predef Predef_LearnLevelMoves
xor a
ld [wForceEvolution], a
@@ -1645,7 +1645,7 @@ RevivePokemon: ; f0d6
ld d, 0
ld hl, wBattleParticipantsIncludingFainted
ld b, CHECK_FLAG
- predef FlagPredef
+ predef Predef_SmallFarFlagAction
ld a, c
and a
jr z, .skip_to_revive
@@ -1654,7 +1654,7 @@ RevivePokemon: ; f0d6
ld c, a
ld hl, wBattleParticipantsNotFainted
ld b, SET_FLAG
- predef FlagPredef
+ predef Predef_SmallFarFlagAction
.skip_to_revive
xor a
@@ -1821,7 +1821,7 @@ HealHP_SFX_GFX: ; f1db (3:71db)
call AddNTimes
ld a, $2
ld [wWhichHPBar], a
- predef_jump AnimateHPBar
+ predef_jump Predef_AnimateHPBar
UseItem_SelectMon: ; f1f9 (3:71f9)
call .SelectMon
@@ -2912,7 +2912,7 @@ UseBallInTrainerBattle: ; f7a0
ld [wBattleAnimParam], a
ld [hBattleTurn], a
ld [wNumHits], a
- predef PlayBattleAnim
+ predef Predef_PlayBattleAnim
ld hl, BlockedTheBallText
call PrintText
ld hl, DontBeAThiefText
@@ -3059,7 +3059,7 @@ ApplyPPUp: ; f84c
call GetPartyParamLocation
push hl
ld de, Buffer1
- predef FillPP
+ predef Predef_FillPP
pop hl
ld bc, MON_PP - MON_MOVES
add hl, bc
diff --git a/engine/learn.asm b/engine/learn.asm
index d2751235f..ceb814650 100755
--- a/engine/learn.asm
+++ b/engine/learn.asm
@@ -1,4 +1,4 @@
-LearnMove: ; 6508
+Predef_LearnMove: ; 6508
call LoadTileMapToTempTileMap
ld a, [CurPartyMon]
ld hl, PartyMonNicknames
@@ -144,7 +144,7 @@ ForgetMove: ; 65d3
hlcoord 5 + 2, 2 + 2
ld a, SCREEN_WIDTH * 2
ld [Buffer1], a
- predef ListMoves
+ predef Predef_ListMoves
; wMenuData3
ld a, $4
ld [w2DMenuCursorInitY], a
diff --git a/engine/link.asm b/engine/link.asm
index bbb151965..034151726 100755
--- a/engine/link.asm
+++ b/engine/link.asm
@@ -150,7 +150,7 @@ TimeCapsule: ; 2805d
ld [wd265], a
push hl
push de
- callfar ConvertMon_1to2
+ callfar Predef_ConvertMon_1to2
pop de
pop hl
ld a, [wd265]
@@ -449,7 +449,7 @@ Gen2ToGen2LinkComms: ; 28177
pop af
ld [rIF], a
- predef StartBattle
+ predef Predef_StartBattle
ld a, [rIF]
ld h, a
@@ -786,7 +786,7 @@ Link_PrepPartyData_Gen1: ; 28499
add hl, bc
ld c, STAT_SATK
ld b, TRUE
- predef CalcPkmnStatC
+ predef Predef_CalcPkmnStatC
pop bc
pop de
@@ -993,7 +993,7 @@ Function2868a: ; 2868a
push bc
push de
ld [wd265], a
- callfar ConvertMon_1to2
+ callfar Predef_ConvertMon_1to2
pop de
pop bc
ld a, [wd265]
@@ -1072,7 +1072,7 @@ Function2868a: ; 2868a
add hl, bc
ld c, STAT_SATK
ld b, TRUE
- predef CalcPkmnStatC
+ predef Predef_CalcPkmnStatC
pop bc
pop hl
ld a, [hQuotient + 1]
@@ -1085,7 +1085,7 @@ Function2868a: ; 2868a
add hl, bc
ld c, STAT_SDEF
ld b, TRUE
- predef CalcPkmnStatC
+ predef Predef_CalcPkmnStatC
pop bc
pop hl
ld a, [hQuotient + 1]
@@ -1597,8 +1597,7 @@ Function28b22: ; 28b22
ret
; 28b42
-Function28b42: ; 28b42
-; unreferenced
+Unreferenced_Function28b42: ; 28b42
hlcoord 0, 16
ld a, "┘"
ld bc, 2 * SCREEN_WIDTH
@@ -1892,11 +1891,11 @@ LinkTrade: ; 28b87
ld a, [hLinkPlayerNumber]
cp $1
jr z, .player_2
- predef TradeAnimation
+ predef Predef_TradeAnimation
jr .done_animation
.player_2
- predef TradeAnimationPlayer2
+ predef Predef_TradeAnimationPlayer2
.done_animation
pop af
@@ -1914,7 +1913,7 @@ LinkTrade: ; 28b87
ld de, TempMonSpecies
ld bc, PARTYMON_STRUCT_LENGTH
call CopyBytes
- predef AddTempmonToParty
+ predef Predef_AddTempmonToParty
ld a, [PartyCount]
dec a
ld [CurPartyMon], a
@@ -1958,7 +1957,7 @@ LinkTrade: ; 28b87
.save
farcall SaveAfterLinkTrade
- farcall TrainerRankings_Trades
+ farcall StubbedTrainerRankings_Trades
farcall BackupMobileEventIndex
ld c, 40
call DelayFrames
@@ -2020,8 +2019,7 @@ SetTradeRoomBGPals: ; 28eff
ret
; 28f09
-Function28f09: ; 28f09
-; unreferenced
+Unreferenced_Function28f09: ; 28f09
hlcoord 0, 0
ld b, 6
ld c, 18
@@ -2145,7 +2143,7 @@ Special_EnterTimeCapsule: ; 29c7b
ret
; 29c92
-WaitForOtherPlayerToExit: ; 29c92
+Special_WaitForOtherPlayerToExit: ; 29c92
ld c, 3
call DelayFrames
ld a, -1
@@ -2577,17 +2575,16 @@ Special_CableClubCheckWhichChris: ; 29f47
ret
; 29f54
-UnusedGen1LinkCommsBorderGFX: ; 29f54
-; unreferenced
+Unreferenced_Gen1LinkCommsBorderGFX: ; 29f54
INCBIN "gfx/trade/unused_gen_1_border_tiles.2bpp"
; 29fe4
-Function29fe4: ; unreferenced
+Unreferenced_Function29fe4:
ld a, BANK(sPartyMail)
call GetSRAMBank
ld d, $0
ld b, CHECK_FLAG
- predef FlagPredef
+ predef Predef_SmallFarFlagAction
call CloseSRAM
ld a, c
and a
diff --git a/engine/link_2.asm b/engine/link_2.asm
index 72e5262b3..03b95b39a 100644
--- a/engine/link_2.asm
+++ b/engine/link_2.asm
@@ -3,7 +3,7 @@ LinkMonStatsScreen: ; 4d319
dec a
ld [CurPartyMon], a
call LowVolume
- predef StatsScreenInit
+ predef Predef_StatsScreenInit
ld a, [CurPartyMon]
inc a
ld [wMenuCursorY], a
diff --git a/engine/mail_2.asm b/engine/mail_2.asm
index d66bbbbd7..96d755a78 100755
--- a/engine/mail_2.asm
+++ b/engine/mail_2.asm
@@ -725,8 +725,7 @@ MailGFX_PlaceMessage: ; b9803
jp PlaceString
; b984e
-Functionb984e: ; b984e
-; XXX
+Unreferenced_Functionb984e: ; b984e
.loop
ld a, [hl]
xor $ff
diff --git a/engine/main_menu.asm b/engine/main_menu.asm
index 92a3da6bb..fe0dd6b2a 100755
--- a/engine/main_menu.asm
+++ b/engine/main_menu.asm
@@ -278,7 +278,7 @@ MainMenu_PrintCurrentTimeAndDay: ; 49e09
ret
.min
-; unreferenced
+; unused
db "min.@"
; 49e75
diff --git a/engine/map_objects.asm b/engine/map_objects.asm
index a50650863..0f04a0a16 100644
--- a/engine/map_objects.asm
+++ b/engine/map_objects.asm
@@ -420,8 +420,7 @@ UpdatePlayerStep: ; 4738
ret
; 4759
-Function4759: ; 4759
-; unreferenced
+Unreferenced_Function4759: ; 4759
push bc
ld e, a
ld d, 0
@@ -1573,7 +1572,7 @@ StepType05: ; 4e0c
ld [hl], a
call IncrementObjectStructField1c
StepType04: ; 4e21
- call MobileFn_4fb2
+ call Stubbed_Function4fb2
ld hl, OBJECT_DIRECTION_WALKING
add hl, bc
ld [hl], STANDING
@@ -1581,7 +1580,7 @@ StepType04: ; 4e21
; 4e2b
NPCStep: ; 4e2b
- call MobileFn_4fb2
+ call Stubbed_Function4fb2
call AddStepVector
ld hl, OBJECT_STEP_DURATION
add hl, bc
@@ -1844,7 +1843,8 @@ SkyfallTop: ; 4f83
ret
; 4fb2
-MobileFn_4fb2: mobile
+Stubbed_Function4fb2:
+ ret
ld hl, OBJECT_1D
add hl, bc
inc [hl]
diff --git a/engine/map_setup.asm b/engine/map_setup.asm
index 078e6a2fd..b3905b71e 100644
--- a/engine/map_setup.asm
+++ b/engine/map_setup.asm
@@ -79,7 +79,7 @@ MapSetupCommands: ; 15440
dba LoadGraphics ; 0e
dba LoadTileset ; 0f
dba LoadMapTimeOfDay ; 10
- dba LoadMapPalettes ; 11
+ dba Special_LoadMapPalettes ; 11
dba LoadWildMonData ; 12
dba RefreshMapSprites ; 13
dba HandleNewMap ; 14
@@ -91,8 +91,8 @@ MapSetupCommands: ; 15440
dba LoadMapAttributes ; 1a
dba LoadMapAttributes_SkipPeople ; 1b
dba ClearBGPalettes ; 1c
- dba FadeOutPalettes ; 1d
- dba FadeInPalettes ; 1e
+ dba Special_FadeOutPalettes ; 1d
+ dba Special_FadeInPalettes ; 1e
dba GetCoordOfUpperLeftCorner ; 1f
dba RestoreFacingAfterWarp ; 20
dba SpawnInFacingDown ; 21
@@ -137,7 +137,7 @@ LoadObjectsRunCallback_02: ; 154d7
ret
; 154ea (5:54ea)
-; unreferenced
+; unused
ret
; 154eb
diff --git a/engine/mart.asm b/engine/mart.asm
index d4af8fb61..07d385f6d 100755
--- a/engine/mart.asm
+++ b/engine/mart.asm
@@ -443,7 +443,7 @@ GetMartDialogGroup: ; 15ca3
BuyMenuLoop: ; 15cef
- farcall PlaceMoneyTopRight
+ farcall Special_PlaceMoneyTopRight
call UpdateSprites
ld hl, MenuDataHeader_Buy
call CopyMenuDataHeader
@@ -525,7 +525,7 @@ StandardMartAskPurchaseQuantity:
; 15d97
MartConfirmPurchase: ; 15d97
- predef PartyMonItemName
+ predef Predef_PartyMonItemName
ld a, MARTTEXT_COSTS_THIS_MUCH
call LoadBuyMenuText
call YesNoBox
@@ -796,7 +796,7 @@ SellMenu: ; 15eb3
ret
; 15ed3
-.NothingToSell: ; unreferenced
+.Unreferenced_NothingToSell:
ld hl, .NothingToSellText
call MenuTextBoxBackup
and a
@@ -863,7 +863,7 @@ SellMenu: ; 15eb3
ld a, [wMartItemID]
ld hl, NumItems
call TossItem
- predef PartyMonItemName
+ predef Predef_PartyMonItemName
hlcoord 1, 14
lb bc, 3, 18
call ClearBox
@@ -891,7 +891,7 @@ Text_Mart_ICanPayThisMuch: ; 0x15f78
db "@"
; 0x15f7d
-DummyString ; 15f7d
+.UnusedString15f7d: ; 15f7d
db "!ダミー!@"
Text_Mart_HowMayIHelpYou: ; 0x15f83
diff --git a/engine/menu.asm b/engine/menu.asm
index 6fbed2848..196d45ea9 100755
--- a/engine/menu.asm
+++ b/engine/menu.asm
@@ -291,8 +291,7 @@ MobileMenuJoypad: ; 241ba
; 241d5
-Function241d5: ; 241d5
-; Unreferenced
+Unreferenced_Function241d5: ; 241d5
call Place2DMenuCursor
.loop
call Move2DMenuCursor
@@ -725,8 +724,7 @@ _ExitMenu:: ; 243e8
ret
; 24423
-Function24423: ; 24423
-; Unreferenced
+Unreferenced_Function24423: ; 24423
ld a, [VramState]
bit 0, a
ret z
diff --git a/engine/menu_2.asm b/engine/menu_2.asm
index cbced7320..122a1ac62 100644
--- a/engine/menu_2.asm
+++ b/engine/menu_2.asm
@@ -27,7 +27,7 @@ PlaceMenuItemQuantity: ; 0x24ac3
.done
ret
-PlaceMoneyTopRight: ; 24ae8
+Special_PlaceMoneyTopRight: ; 24ae8
ld hl, MenuDataHeader_0x24b15
call CopyMenuDataHeader
jr PlaceMoneyDataHeader
@@ -110,8 +110,8 @@ CoinString: ; 24b89
ShowMoney_TerminatorString: ; 24b8e
db "@"
-Function24b8f: ; 24b8f
-; unreferenced, related to safari?
+Unreferenced_Function24b8f: ; 24b8f
+; related to safari?
ld hl, Options
ld a, [hl]
push af
diff --git a/engine/mon_icons.asm b/engine/mon_icons.asm
index 660ab8512..db1a68ceb 100755
--- a/engine/mon_icons.asm
+++ b/engine/mon_icons.asm
@@ -281,8 +281,7 @@ FlyFunction_GetMonIcon: ; 8e9bc (23:69bc)
ret
; 8e9cc (23:69cc)
-GetMonIcon2: ; 8e9cc
-; unreferenced
+Unreferenced_GetMonIcon2: ; 8e9cc
push de
ld a, [wd265]
call ReadMonMenuIcon
diff --git a/engine/mon_stats.asm b/engine/mon_stats.asm
index a3039eefd..1a08b2be5 100644
--- a/engine/mon_stats.asm
+++ b/engine/mon_stats.asm
@@ -1,8 +1,8 @@
-DrawPlayerHP: ; 50b0a
+Predef_DrawPlayerHP: ; 50b0a
ld a, $1
jr DrawHP
-DrawEnemyHP: ; 50b0e
+Predef_DrawEnemyHP: ; 50b0e
ld a, $2
DrawHP: ; 50b10
@@ -43,7 +43,7 @@ DrawHP: ; 50b10
ld c, e
.not_boxmon
- predef ComputeHPBarPixels
+ predef Predef_ComputeHPBarPixels
ld a, 6
ld d, a
ld c, a
@@ -82,7 +82,7 @@ DrawHP: ; 50b10
pop de
ret
-PrintTempMonStats: ; 50b7b
+Predef_PrintTempMonStats: ; 50b7b
; Print TempMon's stats at hl, with spacing bc.
push bc
push hl
@@ -121,7 +121,7 @@ PrintTempMonStats: ; 50b7b
next "SPEED"
next "@"
-GetGender: ; 50bdd
+Predef_GetGender: ; 50bdd
; Return the gender of a given monster (CurPartyMon/CurOTMon/CurWildMon).
; When calling this function, a should be set to an appropriate MonType value.
@@ -235,7 +235,7 @@ GetGender: ; 50bdd
scf
ret
-ListMovePP: ; 50c50
+Predef_ListMovePP: ; 50c50
ld a, [wNumMoves]
inc a
ld c, a
@@ -324,8 +324,7 @@ ListMovePP: ; 50c50
jr nz, .load_loop
ret
-Function50cd0: ; 50cd0
-; XXX
+Unreferenced_Function50cd0: ; 50cd0
.loop
ld [hl], $32
inc hl
@@ -336,7 +335,7 @@ Function50cd0: ; 50cd0
jr nz, .loop
ret
-Predef22: ; unreferenced predef
+UnusedPredef22:
push hl
push hl
ld hl, PartyMonNicknames
@@ -344,7 +343,7 @@ Predef22: ; unreferenced predef
call GetNick
pop hl
call PlaceString
- call CopyPkmnToTempMon
+ call Predef_CopyPkmnToTempMon
pop hl
ld a, [CurPartySpecies]
cp EGG
@@ -353,7 +352,7 @@ Predef22: ; unreferenced predef
ld bc, -12
add hl, bc
ld b, $0
- call DrawEnemyHP
+ call Predef_DrawEnemyHP
pop hl
ld bc, 5
add hl, bc
@@ -364,7 +363,7 @@ Predef22: ; unreferenced predef
.egg
ret
-PlaceStatusString: ; 50d0a
+Predef_PlaceStatusString: ; 50d0a
push de
inc de
inc de
@@ -374,7 +373,7 @@ PlaceStatusString: ; 50d0a
ld a, [de]
or b
pop de
- jr nz, PlaceNonFaintStatus
+ jr nz, Predef_PlaceNonFaintStatus
push de
ld de, FntString
call CopyStatusString
@@ -397,7 +396,7 @@ CopyStatusString: ; 50d25
ld [hl], a
ret
-PlaceNonFaintStatus: ; 50d2e
+Predef_PlaceNonFaintStatus: ; 50d2e
push de
ld a, [de]
ld de, PsnString
@@ -431,7 +430,7 @@ BrnString: db "BRN@"
FrzString: db "FRZ@"
ParString: db "PAR@"
-ListMoves: ; 50d6f
+Predef_ListMoves: ; 50d6f
; List moves at hl, spaced every [Buffer1] tiles.
ld de, wListMoves_MoveIndicesBuffer
ld b, $0
diff --git a/engine/move_mon.asm b/engine/move_mon.asm
index 90728e84c..426a3ba8b 100755
--- a/engine/move_mon.asm
+++ b/engine/move_mon.asm
@@ -1,4 +1,4 @@
-TryAddMonToParty: ; d88c
+Predef_TryAddMonToParty: ; d88c
; Check if to copy wild Pkmn or generate new Pkmn
; Whose is it?
ld de, PartyCount
@@ -120,7 +120,7 @@ GeneratePartyMonStats: ; d906
endr
ld [hl], a
ld [Buffer1], a
- predef FillMoves
+ predef Predef_FillMoves
.next
pop de
@@ -195,7 +195,7 @@ endr
push de
inc hl
inc hl
- call FillPP
+ call Predef_FillPP
pop de
pop hl
rept 4
@@ -224,7 +224,7 @@ endr
ld a, $1
ld c, a
ld b, FALSE
- call CalcPkmnStatC
+ call Predef_CalcPkmnStatC
ld a, [hProduct + 2]
ld [de], a
inc de
@@ -297,7 +297,7 @@ endr
ld bc, MON_STAT_EXP - 1
add hl, bc
ld b, $0 ; if b = 1, then stat calculation takes stat exp into account.
- call CalcPkmnStats
+ call Predef_CalcPkmnStats
.next3
ld a, [MonType]
@@ -311,7 +311,7 @@ endr
dec a
ld bc, PARTYMON_STRUCT_LENGTH
call AddNTimes
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
callfar UpdateUnownDex
.done
@@ -319,7 +319,7 @@ endr
ret
; da6d
-FillPP: ; da6d
+Predef_FillPP: ; da6d
push bc
ld b, NUM_MOVES
.loop
@@ -350,7 +350,7 @@ FillPP: ; da6d
ret
; da96
-AddTempmonToParty: ; da96
+Predef_AddTempmonToParty: ; da96
ld hl, PartyCount
ld a, [hl]
cp PARTY_LENGTH
@@ -422,7 +422,7 @@ AddTempmonToParty: ; da96
dec a
ld bc, PARTYMON_STRUCT_LENGTH
call AddNTimes
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
callfar UpdateUnownDex
ld a, [wFirstUnownSeen]
and a
@@ -434,7 +434,7 @@ AddTempmonToParty: ; da96
and a
ret
-SentGetPkmnIntoFromBox: ; db3f
+Predef_SendGetPkmnIntoFromBox: ; db3f
; Sents/Gets Pkmn into/from Box depending on Parameter
; wPokemonWithdrawDepositParameter == 0: get Pkmn into Party
; wPokemonWithdrawDepositParameter == 1: sent Pkmn into Box
@@ -597,7 +597,7 @@ SentGetPkmnIntoFromBox: ; db3f
srl a
add $2
ld [MonType], a
- predef CopyPkmnToTempMon
+ predef Predef_CopyPkmnToTempMon
callfar CalcLevel
ld a, d
ld [CurPartyLevel], a
@@ -617,7 +617,7 @@ SentGetPkmnIntoFromBox: ; db3f
push bc
ld b, $1
- call CalcPkmnStats
+ call Predef_CalcPkmnStats
pop bc
ld a, [wPokemonWithdrawDepositParameter]
@@ -830,7 +830,7 @@ Functiondd64: ; dd64
add hl, bc
push bc
ld b, $1
- call CalcPkmnStats
+ call Predef_CalcPkmnStats
ld hl, PartyMon1Moves
ld a, [PartyCount]
dec a
@@ -840,7 +840,7 @@ Functiondd64: ; dd64
ld e, l
ld a, $1
ld [Buffer1], a
- predef FillMoves
+ predef Predef_FillMoves
ld a, [PartyCount]
dec a
ld [CurPartyMon], a
@@ -904,8 +904,8 @@ DepositBreedmon: ; de44
ld bc, BOXMON_STRUCT_LENGTH
jp CopyBytes
-SentPkmnIntoBox: ; de6e
-; Sents the Pkmn into one of Bills Boxes
+Predef_SendPkmnIntoBox: ; de6e
+; Sends the Pkmn into one of Bills Boxes
; the data comes mainly from 'EnemyMon:'
ld a, BANK(sBoxCount)
call GetSRAMBank
@@ -1010,7 +1010,7 @@ SentPkmnIntoBox: ; de6e
cp UNOWN
jr nz, .not_unown
ld hl, sBoxMon1DVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
callfar UpdateUnownDex
.not_unown
@@ -1086,7 +1086,7 @@ ShiftBoxMon: ; df47
ret
; df8c
-GiveEgg:: ; df8c
+Predef_GiveEgg:: ; df8c
ld a, [CurPartySpecies]
push af
callfar GetPreEvolution
@@ -1094,7 +1094,7 @@ GiveEgg:: ; df8c
ld a, [CurPartySpecies]
dec a
-; TryAddMonToParty sets Seen and Caught flags
+; Predef_TryAddMonToParty sets Seen and Caught flags
; when it is successful. This routine will make
; sure that we aren't newly setting flags.
push af
@@ -1104,11 +1104,11 @@ GiveEgg:: ; df8c
call CheckSeenMon
push bc
- call TryAddMonToParty
+ call Predef_TryAddMonToParty
; If we haven't caught this Pokemon before receiving
; the Egg, reset the flag that was just set by
-; TryAddMonToParty.
+; Predef_TryAddMonToParty.
pop bc
ld a, c
and a
@@ -1119,12 +1119,12 @@ GiveEgg:: ; df8c
ld d, $0
ld hl, PokedexCaught
ld b, RESET_FLAG
- predef FlagPredef
+ predef Predef_SmallFarFlagAction
.skip_caught_flag
; If we haven't seen this Pokemon before receiving
; the Egg, reset the flag that was just set by
-; TryAddMonToParty.
+; Predef_TryAddMonToParty.
pop bc
ld a, c
and a
@@ -1135,7 +1135,7 @@ GiveEgg:: ; df8c
ld d, $0
ld hl, PokedexSeen
ld b, RESET_FLAG
- predef FlagPredef
+ predef Predef_SmallFarFlagAction
.skip_seen_flag
pop af
@@ -1360,7 +1360,7 @@ ComputeNPCTrademonStats: ; e134
ld a, MON_STAT_EXP - 1
call GetPartyParamLocation
ld b, $1
- call CalcPkmnStats
+ call Predef_CalcPkmnStats
pop de
ld a, MON_HP
call GetPartyParamLocation
@@ -1372,7 +1372,7 @@ ComputeNPCTrademonStats: ; e134
ret
; e167
-CalcPkmnStats: ; e167
+Predef_CalcPkmnStats: ; e167
; Calculates all 6 Stats of a Pkmn
; b: Take into account stat EXP if TRUE
; 'c' counts from 1-6 and points with 'BaseStats' to the base value
@@ -1382,7 +1382,7 @@ CalcPkmnStats: ; e167
ld c, $0
.loop
inc c
- call CalcPkmnStatC
+ call Predef_CalcPkmnStatC
ld a, [hMultiplicand + 1]
ld [de], a
inc de
@@ -1395,7 +1395,7 @@ CalcPkmnStats: ; e167
ret
; e17b
-CalcPkmnStatC: ; e17b
+Predef_CalcPkmnStatC: ; e17b
; 'c' is 1-6 and points to the BaseStat
; 1: HP
; 2: Attack
@@ -1596,7 +1596,7 @@ GivePoke:: ; e277
push bc
xor a ; PARTYMON
ld [MonType], a
- call TryAddMonToParty
+ call Predef_TryAddMonToParty
jr nc, .failed
ld hl, PartyMonNicknames
ld a, [PartyCount]
@@ -1626,7 +1626,7 @@ GivePoke:: ; e277
ld a, [CurPartySpecies]
ld [TempEnemyMonSpecies], a
callfar LoadEnemyMon
- call SentPkmnIntoBox
+ call Predef_SendPkmnIntoBox
jp nc, .FailedToGiveMon
ld a, BOXMON
ld [MonType], a
@@ -1795,7 +1795,7 @@ InitNickname: ; e3de
pop hl
ld de, StringBuffer1
call InitName
- ld a, $4 ; XXX could this be in bank 4 in pokered?
+ ld a, $4 ; ExitAllMenus is in bank 0, XXX could this be in bank 4 in pokered?
ld hl, ExitAllMenus
rst FarCall
ret
diff --git a/engine/mystery_gift.asm b/engine/mystery_gift.asm
index 00ed74ea0..b0d3c843b 100755
--- a/engine/mystery_gift.asm
+++ b/engine/mystery_gift.asm
@@ -63,7 +63,7 @@ DoMysteryGift: ; 1048ba (41:48ba)
jr z, .skip_append_save
call .SaveMysteryGiftTrainerName
farcall RestoreMobileEventIndex
- farcall TrainerRankings_MysteryGift
+ farcall StubbedTrainerRankings_MysteryGift
farcall BackupMobileEventIndex
.skip_append_save
ld a, [wMysteryGiftPartnerSentDeco]
@@ -1117,7 +1117,7 @@ MysteryGift_CheckAndSetDecorationAlreadyReceived: ; 105069 (41:5069)
ld d, $0
ld b, CHECK_FLAG
ld hl, sMysteryGiftDecorationsReceived
- predef_id FlagPredef
+ predef_id Predef_SmallFarFlagAction
push hl
push bc
call Predef
@@ -1129,7 +1129,7 @@ MysteryGift_CheckAndSetDecorationAlreadyReceived: ; 105069 (41:5069)
ret nz
call GetMysteryGiftBank
ld b, SET_FLAG
- predef FlagPredef
+ predef Predef_SmallFarFlagAction
call CloseSRAM
xor a
ret
@@ -1142,7 +1142,7 @@ MysteryGift_CopyReceivedDecosToPC: ; 105091 (41:5091)
ld d, $0
ld b, CHECK_FLAG
ld hl, sMysteryGiftDecorationsReceived
- predef FlagPredef
+ predef Predef_SmallFarFlagAction
ld a, c
and a
pop bc
@@ -1369,7 +1369,7 @@ InitMysteryGiftLayout: ; 105153 (41:5153)
jr .gfx_loop
; 105232 (41:5232)
-.Load6GFX: ; unreferenced
+.Unreferenced_Load6GFX:
ld b, 6
jr .gfx_loop
diff --git a/engine/namingscreen.asm b/engine/namingscreen.asm
index 98a64c775..f16f7176f 100755
--- a/engine/namingscreen.asm
+++ b/engine/namingscreen.asm
@@ -109,7 +109,7 @@ NamingScreen: ; 116c1
inc de
hlcoord 5, 4
call PlaceString
- farcall GetGender
+ farcall Predef_GetGender
jr c, .genderless
ld a, "♂"
jr nz, .place_gender
@@ -745,7 +745,7 @@ NamingScreen_AdvanceCursor_CheckEndOfString: ; 11b27
; 11b39 (4:5b39)
-; XXX
+; unused
ld a, [wNamingScreenCurrNameLength]
and a
ret z
@@ -1043,7 +1043,7 @@ INCBIN "gfx/icons/mail2.2bpp"
; 11f7a (4:5f7a)
-.Dummy: ; dummied out
+.UnusedString11f7a:
db "メールを かいてね@"
; 11f84
@@ -1426,7 +1426,7 @@ MailComposition_TryAddLastCharacter: ; 121ac (4:61ac)
; 121b2 (4:61b2)
-; XXX
+; unused
ld a, [wNamingScreenCurrNameLength]
and a
ret z
diff --git a/engine/npc_movement.asm b/engine/npc_movement.asm
index dfccc4330..71583408e 100755
--- a/engine/npc_movement.asm
+++ b/engine/npc_movement.asm
@@ -279,7 +279,7 @@ WillObjectBumpIntoSomeoneElse: ; 7009
jr IsNPCAtCoord
; 7015
-Function7015: ; unreferenced
+Unreferenced_Function7015:
ld a, [hMapObjectIndexBuffer]
call GetObjectStruct
call .CheckWillBeFacingNPC
@@ -482,7 +482,7 @@ IsObjectMovingOffEdgeOfScreen: ; 70ed
ret
; 7113
-Function7113: ; unreferenced
+Unreferenced_Function7113:
ld a, [PlayerStandingMapX]
ld d, a
ld a, [PlayerStandingMapY]
diff --git a/engine/npctrade.asm b/engine/npctrade.asm
index 1328efa4c..7e3fa4683 100755
--- a/engine/npctrade.asm
+++ b/engine/npctrade.asm
@@ -59,7 +59,7 @@ NPCTrade:: ; fcba8
push af
ld a, [wcf64]
push af
- predef TradeAnimation
+ predef Predef_TradeAnimation
pop af
ld [wcf64], a
pop af
@@ -80,12 +80,12 @@ CheckTradeGender: ; fcc23
cp TRADE_MALE_ONLY
jr z, .check_male
- farcall GetGender
+ farcall Predef_GetGender
jr nz, .not_matching
jr .matching
.check_male
- farcall GetGender
+ farcall Predef_GetGender
jr z, .not_matching
.matching
@@ -101,7 +101,7 @@ TradeFlagAction: ; fcc4a
ld hl, wTradeFlags
ld a, [wJumptableIndex]
ld c, a
- predef FlagPredef
+ predef Predef_SmallFarFlagAction
ld a, c
and a
ret
@@ -188,7 +188,7 @@ DoNPCTrade: ; fcc63
ld [MonType], a
ld [wPokemonWithdrawDepositParameter], a
callfar RemoveMonFromPartyOrBox
- predef TryAddMonToParty
+ predef Predef_TryAddMonToParty
ld e, TRADE_DIALOG
call GetTradeAttribute
@@ -324,8 +324,7 @@ CopyTradeName: ; fcdf4
ret
; fcdfb
-Functionfcdfb: ; fcdfb
-; unreferenced
+Unreferenced_Functionfcdfb: ; fcdfb
ld bc, 4
call CopyBytes
ld a, "@"
@@ -333,8 +332,7 @@ Functionfcdfb: ; fcdfb
ret
; fce05
-Functionfce05: ; fce05
-; unreferenced
+Unreferenced_Functionfce05: ; fce05
ld bc, 3
call CopyBytes
ld a, "@"
diff --git a/engine/overworld.asm b/engine/overworld.asm
index b4825290c..4c379711d 100755
--- a/engine/overworld.asm
+++ b/engine/overworld.asm
@@ -23,7 +23,7 @@ Function14146: ; mobile
push af
res 7, [hl]
set 6, [hl]
- call MapCallbackSprites_LoadUsedSpritesGFX
+ call Special_LoadUsedSpritesGFX
pop af
ld [wSpriteFlags], a
ret
@@ -35,15 +35,15 @@ Function14157: ; mobile
push af
set 7, [hl]
res 6, [hl]
- call MapCallbackSprites_LoadUsedSpritesGFX
+ call Special_LoadUsedSpritesGFX
pop af
ld [wSpriteFlags], a
ret
; 14168
-RefreshSprites:: ; 14168
+Special_RefreshSprites:: ; 14168
call .Refresh
- call MapCallbackSprites_LoadUsedSpritesGFX
+ call Special_LoadUsedSpritesGFX
ret
; 1416f
@@ -164,7 +164,7 @@ AddOutdoorSprites: ; 141ee
; 14209
-MapCallbackSprites_LoadUsedSpritesGFX: ; 14209
+Special_LoadUsedSpritesGFX: ; 14209
ld a, MAPCALLBACK_SPRITES
call RunMapCallback
call GetUsedSprites
diff --git a/engine/pack.asm b/engine/pack.asm
index 7dd900617..2d1210346 100644
--- a/engine/pack.asm
+++ b/engine/pack.asm
@@ -534,8 +534,7 @@ TossMenu: ; 10364
ret
; 1039d
-ResetPocketCursorPositions: ; 1039d
-; unreferenced
+Unreferenced_ResetPocketCursorPositions: ; 1039d
ld a, [wCurrPocket]
and a ; ITEM_POCKET
jr z, .items
@@ -1514,8 +1513,7 @@ Pack_GetItemName: ; 10a1d
ret
; 10a2a
-Pack_ClearTilemap: ; 10a2a
-; unreferenced
+Unreferenced_Pack_ClearTilemap: ; 10a2a
hlcoord 0, 0
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
ld a, " "
diff --git a/engine/party_menu.asm b/engine/party_menu.asm
index 77f0457e2..1efcfe417 100644
--- a/engine/party_menu.asm
+++ b/engine/party_menu.asm
@@ -189,7 +189,7 @@ PlacePartymonHPBar: ; 50117
ld d, a
ld a, [hli]
ld e, a
- predef ComputeHPBarPixels
+ predef Predef_ComputeHPBarPixels
ret
; 50138
@@ -298,7 +298,7 @@ PlacePartyMonStatus: ; 501b2
ld e, l
ld d, h
pop hl
- call PlaceStatusString
+ call Predef_PlaceStatusString
.next
pop hl
@@ -330,7 +330,7 @@ PlacePartyMonTMHMCompatibility: ; 501e0
add hl, de
ld a, [hl]
ld [CurPartySpecies], a
- predef CanLearnTMHMMove
+ predef Predef_CanLearnTMHMMove
pop hl
call .PlaceAbleNotAble
call PlaceString
@@ -469,7 +469,7 @@ PlacePartyMonGender: ; 502b1
ld [CurPartyMon], a
xor a
ld [MonType], a
- call GetGender
+ call Predef_GetGender
ld de, .unknown
jr c, .got_gender
ld de, .male
@@ -800,25 +800,33 @@ PartyMenuStrings: ; 0x504d2
ChooseAMonString: ; 0x504e4
db "Choose a #MON.@"
+
UseOnWhichPKMNString: ; 0x504f3
db "Use on which <PK><MN>?@"
+
WhichPKMNString: ; 0x50504
db "Which <PK><MN>?@"
+
TeachWhichPKMNString: ; 0x5050e
db "Teach which <PK><MN>?@"
+
MoveToWhereString: ; 0x5051e
db "Move to where?@"
-ChooseAFemalePKMNString: ; 0x5052d ; UNUSED
+
+ChooseAFemalePKMNString: ; 0x5052d
+; unused
db "Choose a ♀<PK><MN>.@"
-ChooseAMalePKMNString: ; 0x5053b ; UNUSED
+
+ChooseAMalePKMNString: ; 0x5053b
+; unused
db "Choose a ♂<PK><MN>.@"
+
ToWhichPKMNString: ; 0x50549
db "To which <PK><MN>?@"
YouHaveNoPKMNString: ; 0x50556
db "You have no <PK><MN>!@"
-
PrintPartyMenuActionText: ; 50566
ld a, [CurPartyMon]
ld hl, PartyMonNicknames
diff --git a/engine/phone/generic_calls.asm b/engine/phone/generic_calls.asm
index e1b53a950..937fc67c0 100644
--- a/engine/phone/generic_calls.asm
+++ b/engine/phone/generic_calls.asm
@@ -1240,7 +1240,7 @@ PhoneScript_Generic_Female:
end
PhoneScript_MonFlavorText:
- special RandomPhoneMon
+ special Special_RandomPhoneMon
farscall PhoneScript_Random2
if_equal $0, .TooEnergetic
farwritetext UnknownText_0x1b518b
diff --git a/engine/phone/phone.asm b/engine/phone/phone.asm
index 630249bf2..be18c569e 100644
--- a/engine/phone/phone.asm
+++ b/engine/phone/phone.asm
@@ -469,7 +469,7 @@ UnknownScript_0x90261: ; 0x90261
RingTwice_StartCall: ; 9026f
call .Ring
call .Ring
- farcall TrainerRankings_PhoneCalls
+ farcall StubbedTrainerRankings_PhoneCalls
ret
; 9027c
@@ -498,7 +498,7 @@ PhoneCall:: ; 9029a
ld [PhoneCaller + 1], a
call Phone_FirstOfTwoRings
call Phone_FirstOfTwoRings
- farcall TrainerRankings_PhoneCalls
+ farcall StubbedTrainerRankings_PhoneCalls
ret
; 902b3
diff --git a/engine/phone/phone_callers.asm b/engine/phone/phone_callers.asm
index c90448d33..cb333ae8d 100644
--- a/engine/phone/phone_callers.asm
+++ b/engine/phone/phone_callers.asm
@@ -1,5 +1,5 @@
Phone_GenericCall_Male:
- special RandomPhoneMon
+ special Special_RandomPhoneMon
farscall PhoneScript_Random2
if_equal 0, .Bragging
farscall PhoneScript_Generic_Male
@@ -9,7 +9,7 @@ Phone_GenericCall_Male:
farjump Phone_BraggingCall_Male
Phone_GenericCall_Female:
- special RandomPhoneMon
+ special Special_RandomPhoneMon
farscall PhoneScript_Random2
if_equal 0, .Bragging
farscall PhoneScript_Generic_Female
@@ -27,7 +27,7 @@ Phone_BraggingCall_Female:
farjump Phone_FoundAMon_Female
Phone_FoundAMon_Male:
- special RandomPhoneWildMon
+ special Special_RandomPhoneWildMon
farscall PhoneScript_Random2
if_equal 0, .GotAway
farscall Phone_WhoDefeatedMon_Male
@@ -37,7 +37,7 @@ Phone_FoundAMon_Male:
farjump Phone_GotAwayCall_Male
Phone_FoundAMon_Female:
- special RandomPhoneWildMon
+ special Special_RandomPhoneWildMon
farscall PhoneScript_Random2
if_equal 0, .GotAway
farscall Phone_WhoDefeatedMon_Female
@@ -851,7 +851,7 @@ Phone_CheckIfUnseenRare_Female:
farjump PhoneScript_HangupText_Female
PhoneScriptRareWildMon:
- special RandomUnseenWildMon
+ special Special_RandomUnseenWildMon
end
PhoneScript_BugCatchingContest:
diff --git a/engine/phone/phone_scripts.asm b/engine/phone/phone_scripts.asm
index c34113437..646040641 100644
--- a/engine/phone/phone_scripts.asm
+++ b/engine/phone/phone_scripts.asm
@@ -392,7 +392,7 @@ HueyPhoneScript1:
iftrue HueyWednesdayNight
.NotWednesday:
- special RandomPhoneMon
+ special Special_RandomPhoneMon
farjump UnknownScript_0xa0908
.WantsBattle:
@@ -629,7 +629,7 @@ JoeyPhoneScript1:
iftrue JoeyMondayAfternoon
.NotMonday:
- special RandomPhoneMon
+ special Special_RandomPhoneMon
farjump UnknownScript_0xa0930
.WantsBattle:
@@ -851,7 +851,7 @@ LizPhoneScript1:
iftrue LizThursdayAfternoon
.NotThursday:
- special RandomPhoneMon
+ special Special_RandomPhoneMon
farjump UnknownScript_0xa0948
.WantsBattle:
diff --git a/engine/pic_animation.asm b/engine/pic_animation.asm
index 4617c5f70..9c8e96b7f 100644
--- a/engine/pic_animation.asm
+++ b/engine/pic_animation.asm
@@ -1,54 +1,54 @@
; Pic animation arrangement.
-AnimateMon_Slow_Normal: ; d0000
+UnusedPredef_AnimateMon_Slow_Normal: ; d0000
hlcoord 12, 0
ld a, [wBattleMode]
cp WILD_BATTLE
jr z, .wild
ld e, ANIM_MON_SLOW
ld d, $0
- call AnimateFrontpic
+ call Predef_AnimateFrontpic
ret
.wild
ld e, ANIM_MON_NORMAL
ld d, $0
- call AnimateFrontpic
+ call Predef_AnimateFrontpic
ret
; d001a
AnimateMon_Menu: ; d001a
ld e, ANIM_MON_MENU
ld d, $0
- call AnimateFrontpic
+ call Predef_AnimateFrontpic
ret
; d0022
AnimateMon_Trade: ; d0022
ld e, ANIM_MON_TRADE
ld d, $0
- call AnimateFrontpic
+ call Predef_AnimateFrontpic
ret
; d002a
AnimateMon_Evolve: ; d002a
ld e, ANIM_MON_EVOLVE
ld d, $0
- call AnimateFrontpic
+ call Predef_AnimateFrontpic
ret
; d0032
AnimateMon_Hatch: ; d0032
ld e, ANIM_MON_HATCH
ld d, $0
- call AnimateFrontpic
+ call Predef_AnimateFrontpic
ret
; d003a
AnimateMon_Unused: ; d003a
ld e, ANIM_MON_UNUSED
ld d, $0
- call AnimateFrontpic
+ call Predef_AnimateFrontpic
ret
; d0042
@@ -86,10 +86,10 @@ PokeAnims: ; d0042
.Egg2: pokeanim Idle, Play
-AnimateFrontpic: ; d008e
+Predef_AnimateFrontpic: ; d008e
call AnimateMon_CheckIfPokemon
ret c
- call LoadMonAnimation
+ call Predef_LoadMonAnimation
.loop
call SetUpPokeAnim
push af
@@ -99,7 +99,7 @@ AnimateFrontpic: ; d008e
ret
; d00a3
-LoadMonAnimation: ; d00a3
+Predef_LoadMonAnimation: ; d00a3
push hl
ld c, e
ld b, 0
@@ -695,7 +695,7 @@ PokeAnim_ConvertAndApplyBitmask: ; d036b
ret
; d03f4
-; XXX
+; unused
db 6, 5, 4
.GetTilemap: ; d03f7
@@ -1110,10 +1110,11 @@ PokeAnim_GetSpeciesOrUnown: ; d065c
ret
; d0669
-Predef48: ; d0669 Predef 48
+UnusedPredef48: ; d0669 Predef 48
ld a, $1
ld [wBoxAlignment], a
-HOF_AnimateFrontpic: ; d066e Predef 49
+
+HOF_Predef_AnimateFrontpic: ; d066e Predef 49
call AnimateMon_CheckIfPokemon
jr c, .fail
ld h, d
@@ -1121,12 +1122,12 @@ HOF_AnimateFrontpic: ; d066e Predef 49
push bc
push hl
ld de, vTiles2
- predef GetAnimatedFrontpicPredef
+ predef Predef_GetAnimatedFrontpic
pop hl
pop bc
ld d, 0
ld e, c
- call AnimateFrontpic
+ call Predef_AnimateFrontpic
xor a
ld [wBoxAlignment], a
ret
diff --git a/engine/player_gfx.asm b/engine/player_gfx.asm
index 6170b29cc..8da7ad564 100644
--- a/engine/player_gfx.asm
+++ b/engine/player_gfx.asm
@@ -1,5 +1,4 @@
-Function88248: ; 88248
-; XXX
+Unreferenced_Function88248: ; 88248
ld c, CAL
ld a, [wPlayerGender]
bit 0, a
@@ -31,7 +30,7 @@ MovePlayerPic: ; 88266
xor a
ld [hBGMapMode], a
lb bc, 7, 7
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
xor a
ld [hBGMapThird], a
call WaitBGMap
@@ -142,7 +141,7 @@ GetChrisBackpic: ; 88830
ld b, BANK(ChrisBackpic)
ld de, vTiles2 tile $31
ld c, 7 * 7
- predef DecompressPredef
+ predef Predef_Decompress
ret
HOF_LoadTrainerFrontpic: ; 88840
@@ -204,7 +203,7 @@ DrawIntroPlayerPic: ; 88874
ld [hGraphicStartTile], a
hlcoord 6, 4
lb bc, 7, 7
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
ret
ChrisPic: ; 888a9
diff --git a/engine/player_movement.asm b/engine/player_movement.asm
index 49fb23f3a..e475bf6a4 100755
--- a/engine/player_movement.asm
+++ b/engine/player_movement.asm
@@ -316,7 +316,7 @@ DoPlayerMovement:: ; 80000
scf
ret
-; unused?
+; unused
xor a
ret
diff --git a/engine/player_step.asm b/engine/player_step.asm
index fb00a1b81..3af41be59 100755
--- a/engine/player_step.asm
+++ b/engine/player_step.asm
@@ -76,7 +76,7 @@ HandlePlayerStep: ; d4e5 (3:54e5)
ret
.mobile ; d509 (3:5509)
- farcall TrainerRankings_StepCount
+ farcall StubbedTrainerRankings_StepCount
ret
.fail2 ; d510 (3:5510)
diff --git a/engine/pokedex.asm b/engine/pokedex.asm
index 243b85613..a0e3e234a 100644
--- a/engine/pokedex.asm
+++ b/engine/pokedex.asm
@@ -443,7 +443,7 @@ DexEntryScreen_MenuActionJumptable: ; 402f2
call Pokedex_GetSelectedMon
ld a, [wDexCurrentLocation]
ld e, a
- predef _Area
+ predef Predef_Pokedex_GetArea
call Pokedex_BlackOutBG
call DelayFrame
xor a
@@ -2367,7 +2367,7 @@ Pokedex_LoadSelectedMonTiles: ; 4143b
ld [CurPartySpecies], a
call GetBaseData
ld de, vTiles2
- predef GetMonFrontpic
+ predef Predef_GetMonFrontpic
ret
.QuestionMark:
@@ -2520,7 +2520,7 @@ Pokedex_LoadUnownFrontpicTiles: ; 41a58 (10:5a58)
ld [CurPartySpecies], a
call GetBaseData
ld de, vTiles2 tile $00
- predef GetMonFrontpic
+ predef Predef_GetMonFrontpic
pop af
ld [UnownLetter], a
ret
@@ -2550,7 +2550,7 @@ _NewPokedexEntry: ; 41a7f
call WaitBGMap
call GetBaseData
ld de, vTiles2
- predef GetMonFrontpic
+ predef Predef_GetMonFrontpic
ld a, SCGB_POKEDEX
call Pokedex_GetSGBLayout
ld a, [CurPartySpecies]
diff --git a/engine/pokegear.asm b/engine/pokegear.asm
index 29946a47d..6f9192f19 100755
--- a/engine/pokegear.asm
+++ b/engine/pokegear.asm
@@ -1339,7 +1339,7 @@ PokegearPhoneContactSubmenu: ; 91342 (24:5342)
; 9146e
-; XXX
+; unused
ld a, [hHours]
cp 12
jr c, .am
@@ -1529,7 +1529,7 @@ UpdateRadioStation: ; 9166f (24:566f)
; 916a1 (24:56a1)
-; XXX
+; unused
ld [wPokegearRadioChannelBank], a
ld a, [hli]
ld [wPokegearRadioChannelAddr], a
@@ -1781,7 +1781,7 @@ LoadStation_EvolutionRadio: ; 9183e (24:583e)
; 91853 (24:5853)
-LoadStation_Dummy: ; 91853
+Unreferenced_LoadStation: ; 91853
ret
RadioMusicRestartDE: ; 91854 (24:5854)
@@ -2362,7 +2362,7 @@ HasVisitedSpawn: ; 91c50
ld hl, wVisitedSpawns
ld b, CHECK_FLAG
ld d, 0
- predef FlagPredef
+ predef Predef_SmallFarFlagAction
ld a, c
ret
@@ -2471,7 +2471,7 @@ FlyMap: ; 91c90
; 91d11
-_Area: ; 91d11
+Predef_Pokedex_GetArea: ; 91d11
; e: Current landmark
ld a, [wTownMapPlayerIconLandmark]
push af
@@ -2963,7 +2963,7 @@ INCBIN "gfx/pokegear/dexmap_nest_icon.2bpp"
FlyMapLabelBorderGFX: ; 922e1
INCBIN "gfx/pokegear/flymap_label_border.1bpp"
-; XXX
+Unreferenced_Function92311:
xor a
ld [wTownMapPlayerIconLandmark], a
call ClearBGPalettes
diff --git a/engine/predef.asm b/engine/predef.asm
index 837f7b96b..62ca7b147 100644
--- a/engine/predef.asm
+++ b/engine/predef.asm
@@ -30,79 +30,79 @@ PredefPointers:: ; 856b
; $4b Predef pointers
; address, bank
- add_predef LearnMove ; $0
- add_predef Predef1
- add_predef HealParty
- add_predef FlagPredef
- add_predef ComputeHPBarPixels
- add_predef FillPP
- add_predef TryAddMonToParty
- add_predef AddTempmonToParty
- add_predef SentGetPkmnIntoFromBox
- add_predef SentPkmnIntoBox
- add_predef GiveEgg
- add_predef AnimateHPBar
- add_predef CalcPkmnStats
- add_predef CalcPkmnStatC
- add_predef CanLearnTMHMMove
- add_predef GetTMHMMove
+ add_predef Predef_LearnMove ; $0
+ add_predef DummyPredef1
+ add_predef HealParty ; this is both a special and a predef
+ add_predef Predef_SmallFarFlagAction
+ add_predef Predef_ComputeHPBarPixels
+ add_predef Predef_FillPP
+ add_predef Predef_TryAddMonToParty
+ add_predef Predef_AddTempmonToParty
+ add_predef Predef_SendGetPkmnIntoFromBox
+ add_predef Predef_SendPkmnIntoBox
+ add_predef Predef_GiveEgg
+ add_predef Predef_AnimateHPBar
+ add_predef Predef_CalcPkmnStats
+ add_predef Predef_CalcPkmnStatC
+ add_predef Predef_CanLearnTMHMMove
+ add_predef Predef_GetTMHMMove
add_predef Predef_LinkTextbox ; $ 10
- add_predef PrintMoveDesc
- add_predef UpdatePlayerHUD
- add_predef PlaceGraphic
- add_predef CheckPlayerPartyForFitPkmn
- add_predef UpdateEnemyHUD
- add_predef StartBattle
- add_predef FillInExpBar
- add_predef GetBattleMonBackpic ; $18
- add_predef GetEnemyMonFrontpic
- add_predef LearnLevelMoves
- add_predef FillMoves
- add_predef EvolveAfterBattle
- add_predef TradeAnimationPlayer2
- add_predef TradeAnimation
- add_predef CopyPkmnToTempMon
- add_predef ListMoves ; $20
- add_predef PlaceNonFaintStatus
- add_predef Predef22
- add_predef ListMovePP
- add_predef GetGender
- add_predef StatsScreenInit
- add_predef DrawPlayerHP
- add_predef DrawEnemyHP
- add_predef PrintTempMonStats ; $28
- add_predef GetTypeName
- add_predef PrintMoveType
- add_predef PrintType
- add_predef PrintMonTypes
- add_predef GetUnownLetter
- add_predef LoadPoisonBGPals
- add_predef Predef2F
- add_predef InitSGBBorder ; $30
- add_predef Predef_LoadSGBLayout
- add_predef _Area
- add_predef CheckContestMon
+ add_predef Predef_PrintMoveDesc
+ add_predef Predef_UpdatePlayerHUD
+ add_predef Predef_PlaceGraphic
+ add_predef Predef_CheckPlayerPartyForFitPkmn
+ add_predef Predef_UpdateEnemyHUD
add_predef Predef_StartBattle
- add_predef Predef35
- add_predef Predef36
- add_predef PlayBattleAnim
- add_predef Predef38 ; $38
- add_predef Predef39
- add_predef Predef3A
- add_predef PartyMonItemName
- add_predef GetMonFrontpic
- add_predef GetMonBackpic
- add_predef GetAnimatedFrontpicPredef
- add_predef GetTrainerPic
- add_predef DecompressPredef ; $40
- add_predef CheckTypeMatchup
- add_predef ConvertMon_1to2
- add_predef NewPokedexEntry
- add_predef AnimateMon_Slow_Normal
- add_predef PlaceStatusString
- add_predef LoadMonAnimation
- add_predef AnimateFrontpic
- add_predef Predef48 ; $48
- add_predef HOF_AnimateFrontpic
+ add_predef Predef_FillInExpBar
+ add_predef Predef_GetBattleMonBackpic ; $18
+ add_predef Predef_GetEnemyMonFrontpic
+ add_predef Predef_LearnLevelMoves
+ add_predef Predef_FillMoves
+ add_predef Predef_EvolveAfterBattle
+ add_predef Predef_TradeAnimationPlayer2
+ add_predef Predef_TradeAnimation
+ add_predef Predef_CopyPkmnToTempMon
+ add_predef Predef_ListMoves ; $20
+ add_predef Predef_PlaceNonFaintStatus
+ add_predef UnusedPredef22
+ add_predef Predef_ListMovePP
+ add_predef Predef_GetGender
+ add_predef Predef_StatsScreenInit
+ add_predef Predef_DrawPlayerHP
+ add_predef Predef_DrawEnemyHP
+ add_predef Predef_PrintTempMonStats ; $28
+ add_predef Predef_GetTypeName
+ add_predef Predef_PrintMoveType
+ add_predef Predef_PrintType
+ add_predef Predef_PrintMonTypes
+ add_predef Predef_GetUnownLetter
+ add_predef Predef_LoadPoisonBGPals
+ add_predef DummyPredef2F
+ add_predef Predef_InitSGBBorder ; $30
+ add_predef Predef_LoadSGBLayout
+ add_predef Predef_Pokedex_GetArea
+ add_predef UnusedPredef_CheckContestMon
+ add_predef Predef_DoBattleTransition
+ add_predef DummyPredef35
+ add_predef DummyPredef36
+ add_predef Predef_PlayBattleAnim
+ add_predef DummyPredef38 ; $38
+ add_predef DummyPredef39
+ add_predef DummyPredef3A
+ add_predef Predef_PartyMonItemName
+ add_predef Predef_GetMonFrontpic
+ add_predef Predef_GetMonBackpic
+ add_predef Predef_GetAnimatedFrontpic
+ add_predef Predef_GetTrainerPic
+ add_predef Predef_Decompress ; $40
+ add_predef Predef_CheckTypeMatchup
+ add_predef Predef_ConvertMon_1to2
+ add_predef Predef_NewPokedexEntry
+ add_predef UnusedPredef_AnimateMon_Slow_Normal
+ add_predef Predef_PlaceStatusString
+ add_predef Predef_LoadMonAnimation
+ add_predef Predef_AnimateFrontpic
+ add_predef UnusedPredef48 ; $48
+ add_predef HOF_Predef_AnimateFrontpic
dbw $ff, InexplicablyEmptyFunction ; ???
; 864c
diff --git a/engine/print_party.asm b/engine/print_party.asm
index 819f38759..28f7a7c53 100755
--- a/engine/print_party.asm
+++ b/engine/print_party.asm
@@ -159,7 +159,7 @@ PrintPartyMonPage1: ; 1dc381
xor a
ld [MonType], a
- farcall CopyPkmnToTempMon
+ farcall Predef_CopyPkmnToTempMon
hlcoord 0, 7
ld b, 9
ld c, 18
@@ -215,7 +215,7 @@ PrintPartyMonPage1: ; 1dc381
call Function1dc51a
call Function1dc52c
ld hl, TempMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
ld hl, wBoxAlignment
xor a
ld [hl], a
@@ -243,7 +243,7 @@ PrintPartyMonPage2: ; 1dc47b
call LoadFontsBattleExtra
xor a
ld [MonType], a
- farcall CopyPkmnToTempMon
+ farcall Predef_CopyPkmnToTempMon
hlcoord 0, 0
ld b, 15
ld c, 18
@@ -318,7 +318,7 @@ Function1dc51a: ; 1dc51a
; 1dc52c
Function1dc52c: ; 1dc52c
- farcall GetGender
+ farcall Predef_GetGender
ld a, " "
jr c, .got_gender
ld a, "♂"
diff --git a/engine/printer.asm b/engine/printer.asm
index 68c3c6c9f..0e0696e2b 100755
--- a/engine/printer.asm
+++ b/engine/printer.asm
@@ -596,8 +596,7 @@ PlacePrinterStatusString: ; 84785
ret
; 847bd
-Function847bd: ; 847bd
-; XXX
+Unreferenced_Function847bd: ; 847bd
ld a, [wPrinterStatus]
and a
ret z
@@ -861,7 +860,7 @@ Printer_GetMonGender: ; 8498a (21:498a)
ld [CurPartyMon], a
ld a, TEMPMON
ld [MonType], a
- farcall GetGender
+ farcall Predef_GetGender
ld a, " "
jr c, .got_gender
ld a, "♂"
diff --git a/engine/printnum.asm b/engine/printnum.asm
index d1d7e7ad3..fec798d5c 100755
--- a/engine/printnum.asm
+++ b/engine/printnum.asm
@@ -165,7 +165,7 @@ _PrintNum:: ; c4c7
dec e
jr nz, .money_leading_zero
inc hl
- ld [hl], $f2 ; XXX
+ ld [hl], "<DOT>"
.money_leading_zero
call .AdvancePointer
diff --git a/engine/routines/correcterrorsinplayerparty.asm b/engine/routines/correcterrorsinplayerparty.asm
index 2fa98a545..fcc2f36af 100644
--- a/engine/routines/correcterrorsinplayerparty.asm
+++ b/engine/routines/correcterrorsinplayerparty.asm
@@ -1,4 +1,4 @@
-CorrectErrorsInPlayerParty: ; unreferenced
+Unreferenced_CorrectErrorsInPlayerParty:
ld hl, PartyCount
ld a, [hl]
and a
@@ -90,7 +90,7 @@ CorrectErrorsInPlayerParty: ; unreferenced
ld hl, MON_STAT_EXP - 1
add hl, bc
ld b, $1
- predef CalcPkmnStats
+ predef Predef_CalcPkmnStats
pop hl
ld bc, PARTYMON_STRUCT_LENGTH
add hl, bc
diff --git a/engine/routines/flagpredef.asm b/engine/routines/flagpredef.asm
index bd4f37882..676960c31 100644
--- a/engine/routines/flagpredef.asm
+++ b/engine/routines/flagpredef.asm
@@ -1,5 +1,5 @@
-FlagPredef: ; 4d7c1
-; Perform action b on flag c in flag array hl.
+Predef_SmallFarFlagAction: ; 4d7c1
+; Perform action b on bit c in flag array hl.
; If checking a flag, check flag array d:hl unless d is 0.
; For longer flag arrays, see FlagAction.
diff --git a/engine/routines/newpokedexentry.asm b/engine/routines/newpokedexentry.asm
index acf9fca7b..c52188f6e 100644
--- a/engine/routines/newpokedexentry.asm
+++ b/engine/routines/newpokedexentry.asm
@@ -1,4 +1,4 @@
-NewPokedexEntry: ; fb877
+Predef_NewPokedexEntry: ; fb877
ld a, [hMapAnims]
push af
xor a
diff --git a/engine/routines/placegraphic.asm b/engine/routines/placegraphic.asm
index d72364776..28b69fc23 100644
--- a/engine/routines/placegraphic.asm
+++ b/engine/routines/placegraphic.asm
@@ -1,4 +1,4 @@
-PlaceGraphic: ; 2ef6e
+Predef_PlaceGraphic: ; 2ef6e
; Fill wBoxAlignment-aligned box width b height c
; with iterating tile starting from hGraphicStartTile at hl.
; Predef $13
diff --git a/engine/routines/playslowcry.asm b/engine/routines/playslowcry.asm
index 3cc347a55..636741bcf 100644
--- a/engine/routines/playslowcry.asm
+++ b/engine/routines/playslowcry.asm
@@ -1,4 +1,4 @@
-PlaySlowCry: ; fb841
+Special_PlaySlowCry: ; fb841
ld a, [ScriptVar]
call LoadCryHeader
jr c, .done
diff --git a/engine/routines/printhoursmins.asm b/engine/routines/printhoursmins.asm
index 50117188c..eb7dc1619 100644
--- a/engine/routines/printhoursmins.asm
+++ b/engine/routines/printhoursmins.asm
@@ -1,5 +1,4 @@
-Function1dd6a9: ; 1dd6a9
-; XXX
+Unreferenced_Function1dd6a9: ; 1dd6a9
ld a, b
ld b, c
ld c, a
diff --git a/engine/routines/printitemdescription.asm b/engine/routines/printitemdescription.asm
index e6d087dae..4da061fda 100644
--- a/engine/routines/printitemdescription.asm
+++ b/engine/routines/printitemdescription.asm
@@ -11,7 +11,7 @@ PrintItemDescription: ; 0x1c8955
pop hl
ld a, [wd265]
ld [CurSpecies], a
- predef PrintMoveDesc
+ predef Predef_PrintMoveDesc
ret
.not_a_tm
diff --git a/engine/routines/trademonfrontpic.asm b/engine/routines/trademonfrontpic.asm
index e312042ff..2d05a1c04 100644
--- a/engine/routines/trademonfrontpic.asm
+++ b/engine/routines/trademonfrontpic.asm
@@ -4,13 +4,13 @@ GetTrademonFrontpic: ; 4d7fd
ld de, vTiles2
push de
push af
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
pop af
ld [CurPartySpecies], a
ld [CurSpecies], a
call GetBaseData
pop de
- predef GetAnimatedFrontpicPredef
+ predef Predef_GetAnimatedFrontpic
ret
AnimateTrademonFrontpic: ; 4d81e
@@ -34,5 +34,5 @@ AnimateTrademonFrontpic: ; 4d81e
hlcoord 7, 2
ld d, $0
ld e, ANIM_MON_TRADE
- predef AnimateFrontpic
+ predef Predef_AnimateFrontpic
ret
diff --git a/engine/rtc.asm b/engine/rtc.asm
index dc49a9630..70b114c7a 100755
--- a/engine/rtc.asm
+++ b/engine/rtc.asm
@@ -1,4 +1,4 @@
-StopRTC: ; Unreferenced???
+Unreferenced_StopRTC:
ld a, SRAM_ENABLE
ld [MBC3SRamEnable], a
call LatchClock
@@ -58,7 +58,7 @@ TimesOfDay: ; 14044
db -1, MORN_F
; 1404e
-Unknown_1404e: ; unreferenced
+Unreferenced_1404e:
db 20, NITE_F
db 40, MORN_F
db 60, DAY_F
diff --git a/engine/save.asm b/engine/save.asm
index af24b4d2f..1ce5eae49 100644
--- a/engine/save.asm
+++ b/engine/save.asm
@@ -415,8 +415,7 @@ EraseHallOfFame: ; 14d06
jp CloseSRAM
; 14d18
-Function14d18: ; 14d18
-; XXX
+Unreferenced_Function14d18: ; 14d18
; copy .Data to SRA4:a007
ld a, $4
call GetSRAMBank
@@ -452,8 +451,7 @@ SaveData: ; 14d68
ret
; 14d6c
-Function14d6c: ; 14d6c
-; XXX
+Unreferenced_Function14d6c: ; 14d6c
ld a, $4
call GetSRAMBank
ld a, [$a60b]
@@ -469,8 +467,7 @@ Function14d6c: ; 14d6c
ret
; 14d83
-Function14d83: ; 14d83
-; XXX
+Unreferenced_Function14d83: ; 14d83
ld a, $4
call GetSRAMBank
xor a
@@ -480,8 +477,7 @@ Function14d83: ; 14d83
ret
; 14d93
-Function14d93: ; 14d93
-; XXX
+Unreferenced_Function14d93: ; 14d93
ld a, $7
call GetSRAMBank
xor a
diff --git a/engine/scripting.asm b/engine/scripting.asm
index c2cfe8e15..5e06c2ef8 100644
--- a/engine/scripting.asm
+++ b/engine/scripting.asm
@@ -1370,7 +1370,7 @@ Script_startbattle:
; script command 0x5f
call BufferScreen
- predef StartBattle
+ predef Predef_StartBattle
ld a, [wBattleResult]
and $3f
ld [ScriptVar], a
@@ -2351,7 +2351,7 @@ Script_giveegg:
ld [CurPartySpecies], a
call GetScriptByte
ld [CurPartyLevel], a
- farcall GiveEgg
+ farcall Predef_GiveEgg
ret nc
ld a, 2
ld [ScriptVar], a
@@ -2624,7 +2624,8 @@ Script_warpcheck:
farcall EnableEvents
ret
-Script_enableevents: ; unreferenced
+Script_enableevents:
+; unused
farcall EnableEvents
ret
@@ -2667,7 +2668,7 @@ Script_loadbytec2cf:
ld [wc2cf], a
ret
- db $49 ; XXX
+ db closetext_command ; unused
Script_closetext:
; script command 0x49
@@ -2804,8 +2805,8 @@ Script_halloffame:
ld hl, wGameTimerPause
res 0, [hl]
- farcall TrainerRankings_HallOfFame
- farcall TrainerRankings_HallOfFame2
+ farcall StubbedTrainerRankings_HallOfFame
+ farcall StubbedTrainerRankings_HallOfFame2
farcall HallOfFame
ld hl, wGameTimerPause
set 0, [hl]
@@ -2847,7 +2848,7 @@ Script_check_save:
ret
-; unreferenced
+; unused
ld a, [.byte]
ld [ScriptVar], a
ret
diff --git a/engine/scrolling_menu.asm b/engine/scrolling_menu.asm
index 32f22188a..32acf2def 100755
--- a/engine/scrolling_menu.asm
+++ b/engine/scrolling_menu.asm
@@ -84,7 +84,7 @@ ScrollingMenuJoyAction: ; 24609
jr .loop
; 24640
-.unreferenced ; unreferenced
+.unreferenced ; unused
ld a, -1
and a
ret
diff --git a/engine/search.asm b/engine/search.asm
index 76be0e159..495d4cc5e 100755
--- a/engine/search.asm
+++ b/engine/search.asm
@@ -1,4 +1,4 @@
-SpecialBeastsCheck: ; 0x4a6e8
+Special_BeastsCheck: ; 0x4a6e8
; Check if the player owns all three legendary beasts.
; They must exist in either party or PC, and have the player's OT and ID.
; Return the result in ScriptVar.
@@ -29,7 +29,7 @@ SpecialBeastsCheck: ; 0x4a6e8
ret
-SpecialMonCheck: ; 0x4a711
+Special_MonCheck: ; 0x4a711
; Check if the player owns any monsters of the species in ScriptVar.
; Return the result in ScriptVar.
diff --git a/engine/sgb_layouts.asm b/engine/sgb_layouts.asm
index 64acbc69e..02055377a 100644
--- a/engine/sgb_layouts.asm
+++ b/engine/sgb_layouts.asm
@@ -1,7 +1,6 @@
Predef_LoadSGBLayout: ; 864c
-; LoadSGBLayout
call CheckCGB
- jp nz, Predef_LoadSGBLayoutCGB
+ jp nz, LoadSGBLayoutCGB
ld a, b
cp SCGB_RAM
diff --git a/engine/slot_machine.asm b/engine/slot_machine.asm
index d8086a5be..98f8dd21d 100755
--- a/engine/slot_machine.asm
+++ b/engine/slot_machine.asm
@@ -87,7 +87,7 @@ _SlotMachine:
call PlaySFX
call WaitSFX
call ClearBGPalettes
- farcall TrainerRankings_EndSlotsWinStreak
+ farcall StubbedTrainerRankings_EndSlotsWinStreak
ld hl, Options
res NO_TEXT_SCROLL, [hl]
ld hl, rLCDC
@@ -185,7 +185,7 @@ SlotsLoop: ; 927af (24:67af)
ld [wCurrSpriteOAMAddr], a
callfar DoNextFrameForFirst16Sprites
call .PrintCoinsAndPayout
- call .DummyFunc
+ call .Stubbed_Function927d3
call DelayFrame
and a
ret
@@ -194,7 +194,7 @@ SlotsLoop: ; 927af (24:67af)
scf
ret
-.DummyFunc: ; 927d3 (24:67d3)
+.Stubbed_Function927d3: ; 927d3 (24:67d3)
; dummied out
ret
ld a, [wReel1ReelAction]
@@ -234,8 +234,8 @@ SlotsLoop: ; 927af (24:67af)
; 92811 (24:6811)
-Function92811: ; 92811
-; unreferenced - debug function?
+Unreferenced_Function92811: ; 92811
+; debug function?
ld a, [wSlotBias]
add 0
daa
@@ -254,8 +254,7 @@ Function92811: ; 92811
; 9282c
-Function9282c: ; 9282c
-; unreferenced
+Unreferenced_Function9282c: ; 9282c
; animate OAM tiles?
ld hl, wcf66
ld a, [hl]
@@ -856,8 +855,7 @@ Slots_UpdateReelPositionAndOAM: ; 92b53 (24:6b53)
; 92bbe (24:6bbe)
-; unreferenced
-Function92bbe: ; 92bbe
+Unreferenced_Function92bbe: ; 92bbe
push hl
srl a
srl a
@@ -1938,7 +1936,7 @@ Slots_GetPayout: ; 93124 (24:7124)
ld a, [hl]
ld [wPayout], a
ld d, a
- farcall TrainerRankings_AddToSlotsPayouts
+ farcall StubbedTrainerRankings_AddToSlotsPayouts
ret
.PayoutTable:
@@ -1962,7 +1960,7 @@ Slots_PayoutText: ; 93158 (24:7158)
jr nz, .MatchedSomething
ld hl, .Text_Darn
call PrintText
- farcall TrainerRankings_EndSlotsWinStreak
+ farcall StubbedTrainerRankings_EndSlotsWinStreak
ret
.MatchedSomething:
@@ -1986,7 +1984,7 @@ Slots_PayoutText: ; 93158 (24:7158)
.return
ld hl, .Text_PrintPayout
call PrintText
- farcall TrainerRankings_AddToSlotsWinStreak
+ farcall StubbedTrainerRankings_AddToSlotsWinStreak
ret
; 93195 (24:7195)
diff --git a/engine/specials.asm b/engine/specials.asm
index a08f1ac85..cb8eb3a6b 100644
--- a/engine/specials.asm
+++ b/engine/specials.asm
@@ -15,7 +15,7 @@ Special:: ; c01b
; c029
SpecialsPointers:: ; c029
- add_special WarpToSpawnPoint
+ add_special Special_WarpToSpawnPoint
; Communications
add_special Special_SetBitsForLinkTradeRequest
@@ -25,7 +25,7 @@ SpecialsPointers:: ; c029
add_special Special_CheckBothSelectedSameRoom
add_special Special_FailedLinkToPast
add_special Special_CloseLink
- add_special WaitForOtherPlayerToExit
+ add_special Special_WaitForOtherPlayerToExit
add_special Special_SetBitsForBattleRequest
add_special Special_SetBitsForTimeCapsuleRequest
add_special Special_CheckTimeCapsuleCompatibility
@@ -39,160 +39,160 @@ SpecialsPointers:: ; c029
add_special Special_UnlockMysteryGift
; Map Events
- add_special BugContestJudging
- add_special CheckPartyFullAfterContest
- add_special ContestDropOffMons
- add_special ContestReturnMons
+ add_special Special_BugContestJudging
+ add_special Special_CheckPartyFullAfterContest
+ add_special Special_ContestDropOffMons
+ add_special Special_ContestReturnMons
add_special Special_GiveParkBalls
add_special Special_CheckMagikarpLength
add_special Special_MagikarpHouseSign
- add_special HealParty
- add_special PokemonCenterPC
+ add_special HealParty ; this is both a special and a predef
+ add_special Special_PokemonCenterPC
add_special Special_KrissHousePC
add_special Special_DayCareMan
add_special Special_DayCareLady
add_special Special_DayCareManOutside
- add_special MoveDeletion
+ add_special Special_MoveDeletion
add_special Special_BankOfMom
add_special Special_MagnetTrain
- add_special SpecialNameRival
+ add_special Special_NameRival
add_special Special_SetDayOfWeek
add_special Special_TownMap
add_special Special_UnownPrinter
- add_special MapRadio
+ add_special Special_MapRadio
add_special Special_UnownPuzzle
add_special Special_SlotMachine
add_special Special_CardFlip
add_special Special_DummyNonfunctionalGameCornerGame
add_special Special_ClearBGPalettesBufferScreen
- add_special FadeOutPalettes
+ add_special Special_FadeOutPalettes
add_special Special_BattleTowerFade
add_special Special_FadeBlackQuickly
- add_special FadeInPalettes
+ add_special Special_FadeInPalettes
add_special Special_FadeInQuickly
- add_special Special_ReloadSpritesNoPalettes
- add_special ClearBGPalettes
- add_special UpdateTimePals
- add_special ClearTileMap
- add_special UpdateSprites
- add_special ReplaceKrisSprite
+ add_special ReloadSpritesNoPalettes ; bank 0
+ add_special ClearBGPalettes ; bank 0
+ add_special UpdateTimePals ; bank 0
+ add_special ClearTileMap ; bank 0
+ add_special UpdateSprites ; bank 0
+ add_special ReplaceKrisSprite ; bank 0
add_special Special_GameCornerPrizeMonCheckDex
- add_special SpecialSeenMon
- add_special WaitSFX
- add_special PlayMapMusic
- add_special RestartMapMusic
- add_special HealMachineAnim
+ add_special UnusedSpecial_SeenMon
+ add_special WaitSFX ; bank 0
+ add_special PlayMapMusic ; bank 0
+ add_special RestartMapMusic ; bank 0
+ add_special Special_HealMachineAnim
add_special Special_SurfStartStep
add_special Special_FindGreaterThanThatLevel
add_special Special_FindAtLeastThatHappy
add_special Special_FindThatSpecies
add_special Special_FindThatSpeciesYourTrainerID
- add_special Special_CheckUnusedTwoDayTimer ; unreferenced
+ add_special UnusedSpecial_CheckUnusedTwoDayTimer
add_special Special_DayCareMon1
add_special Special_DayCareMon2
add_special Special_SelectRandomBugContestContestants
add_special Special_ActivateFishingSwarm
- add_special ToggleMaptileDecorations
- add_special ToggleDecorationsVisibility
- add_special SpecialGiveShuckle
- add_special SpecialReturnShuckle
+ add_special Special_ToggleMaptileDecorations
+ add_special Special_ToggleDecorationsVisibility
+ add_special Special_GiveShuckle
+ add_special Special_ReturnShuckle
add_special Special_BillsGrandfather
- add_special SpecialCheckPokerus
+ add_special Special_CheckPokerus
add_special Special_DisplayCoinCaseBalance
add_special Special_DisplayMoneyAndCoinBalance
- add_special PlaceMoneyTopRight
+ add_special Special_PlaceMoneyTopRight
add_special Special_CheckForLuckyNumberWinners
add_special Special_CheckLuckyNumberShowFlag
add_special Special_ResetLuckyNumberShowFlag
add_special Special_PrintTodaysLuckyNumber
add_special Special_SelectApricornForKurt
- add_special SpecialNameRater
+ add_special Special_NameRater
add_special Special_DisplayLinkRecord
- add_special GetFirstPokemonHappiness
- add_special CheckFirstMonIsEgg
- add_special RandomUnseenWildMon
- add_special RandomPhoneWildMon
- add_special RandomPhoneMon
- add_special MapCallbackSprites_LoadUsedSpritesGFX
- add_special PlaySlowCry
- add_special SpecialSnorlaxAwake
+ add_special Special_GetFirstPokemonHappiness
+ add_special Special_CheckFirstMonIsEgg
+ add_special Special_RandomUnseenWildMon
+ add_special Special_RandomPhoneWildMon
+ add_special Special_RandomPhoneMon
+ add_special Special_LoadUsedSpritesGFX
+ add_special Special_PlaySlowCry
+ add_special Special_SnorlaxAwake
add_special Special_YoungerHaircutBrother
add_special Special_OlderHaircutBrother
add_special Special_DaisyMassage
- add_special PlayCurMonCry
- add_special ProfOaksPCBoot
- add_special SpecialGameboyCheck
- add_special SpecialTrainerHouse
- add_special PhotoStudio
- add_special InitRoamMons
+ add_special Special_PlayCurMonCry
+ add_special Special_ProfOaksPCBoot
+ add_special Special_GameboyCheck
+ add_special Special_TrainerHouse
+ add_special Special_PhotoStudio
+ add_special Special_InitRoamMons
add_special Special_FadeOutMusic
- add_special Diploma
- add_special PrintDiploma
+ add_special Special_Diploma
+ add_special Special_PrintDiploma
; Crystal
- add_special Function11ac3e
- add_special Function11b444
- add_special Function11b5e8
- add_special Function11b7e5
- add_special Function11b879
- add_special Function11b920
- add_special Function11b93b
- add_special BattleTowerRoomMenu
- add_special Function1700ba
- add_special Function170114
- add_special BattleTowerBattle
- add_special Function1704e1
- add_special EmptySpecial_17021d
- add_special Function_LoadOpponentTrainerAndPokemonsWithOTSprite
- add_special Function11ba38
- add_special SpecialCheckForBattleTowerRules
+ add_special Special_Function11ac3e
+ add_special Special_Function11b444
+ add_special Special_Function11b5e8
+ add_special Special_Function11b7e5
+ add_special Special_Function11b879
+ add_special Special_Function11b920
+ add_special Special_Function11b93b
+ add_special Special_BattleTowerRoomMenu
+ add_special Special_Function1700ba
+ add_special Special_Function170114
+ add_special Special_BattleTowerBattle
+ add_special UnusedSpecial_Function1704e1
+ add_special DummySpecial_17021d
+ add_special Special_LoadOpponentTrainerAndPokemonWithOTSprite
+ add_special Special_Function11ba38
+ add_special Special_CheckForBattleTowerRules
add_special Special_GiveOddEgg
- add_special Reset
- add_special Function1011f1
- add_special Function101220
- add_special Function101225
- add_special Function101231
+ add_special Reset ; bank 0
+ add_special Special_Function1011f1
+ add_special Special_Function101220
+ add_special Special_Function101225
+ add_special Special_Function101231
add_special Special_MoveTutor
- add_special SpecialOmanyteChamber
- add_special Function11c1ab
- add_special BattleTowerAction
+ add_special Special_OmanyteChamber
+ add_special Special_Function11c1ab
+ add_special Special_BattleTowerAction
add_special Special_DisplayUnownWords
add_special Special_Menu_ChallengeExplanationCancel
- add_special Function17d2b6
- add_special Function17d2ce
- add_special BattleTowerMobileError
- add_special AskMobileOrCable
- add_special SpecialHoOhChamber
- add_special Function102142
+ add_special Special_Function17d2b6
+ add_special Special_Function17d2ce
+ add_special Special_BattleTowerMobileError
+ add_special Special_AskMobileOrCable
+ add_special Special_HoOhChamber
+ add_special Special_Function102142
add_special Special_CelebiShrineEvent
- add_special CheckCaughtCelebi
- add_special SpecialPokeSeer
- add_special SpecialBuenasPassword
- add_special SpecialBuenaPrize
- add_special SpecialDratini
+ add_special Special_CheckCaughtCelebi
+ add_special Special_PokeSeer
+ add_special Special_BuenasPassword
+ add_special Special_BuenaPrize
+ add_special Special_Dratini
add_special Special_SampleKenjiBreakCountdown
- add_special SpecialBeastsCheck
- add_special SpecialMonCheck
+ add_special Special_BeastsCheck
+ add_special Special_MonCheck
add_special Special_SetPlayerPalette
- add_special ret_170bd2
- add_special Mobile_SelectThreeMons
- add_special Function1037eb
- add_special Function10383c
- add_special TrainerRankings_Healings
- add_special RefreshSprites
- add_special Function1037c2
- add_special Mobile_DummyReturnFalse
- add_special Function103780
- add_special Function10387b
- add_special AskRememberPassword
- add_special LoadMapPalettes
- add_special FindItemInPCOrBag
+ add_special DummySpecial_170bd2
+ add_special Special_Mobile_SelectThreeMons
+ add_special Special_Function1037eb
+ add_special Special_Function10383c
+ add_special Special_StubbedTrainerRankings_Healings
+ add_special Special_RefreshSprites
+ add_special Special_Function1037c2
+ add_special Special_Mobile_DummyReturnFalse
+ add_special Special_Function103780
+ add_special Special_Function10387b
+ add_special Special_AskRememberPassword
+ add_special Special_LoadMapPalettes
+ add_special UnusedSpecial_FindItemInPCOrBag
add_special Special_InitialSetDSTFlag
add_special Special_InitialClearDSTFlag
- add_special SpecialNone
+ add_special DummySpecial_c224
; c224
-SpecialNone: ; c224
+DummySpecial_c224: ; c224
ret
; c225
@@ -214,12 +214,12 @@ Special_GameCornerPrizeMonCheckDex: ; c230
call FadeToMenu
ld a, [ScriptVar]
ld [wd265], a
- farcall NewPokedexEntry
+ farcall Predef_NewPokedexEntry
call ExitAllMenus
ret
; c252
-SpecialSeenMon: ; c252
+UnusedSpecial_SeenMon: ; c252
ld a, [ScriptVar]
dec a
call SetSeenMon
@@ -265,7 +265,7 @@ FoundNone: ; c298
ret
; c29d
-SpecialNameRival: ; 0xc29d
+Special_NameRival: ; 0xc29d
ld b, $2 ; rival
ld de, RivalName
farcall _NamingScreen
@@ -279,7 +279,7 @@ SpecialNameRival: ; 0xc29d
DefaultRivalName: ; 0xc2b2
db "SILVER@"
-SpecialNameRater: ; c2b9
+Special_NameRater: ; c2b9
farcall NameRater
ret
; c2c0
@@ -363,14 +363,14 @@ Special_GetMysteryGiftItem: ; c309
db "@"
; 0xc34a
-BugContestJudging: ; c34a
- farcall _BugContestJudging
+Special_BugContestJudging: ; c34a
+ farcall _Special_BugContestJudging
ld a, b
ld [ScriptVar], a
ret
; c355
-MapRadio: ; c355
+Special_MapRadio: ; c355
ld a, [ScriptVar]
ld e, a
farcall PlayRadio
@@ -483,7 +483,7 @@ ScriptReturnCarry: ; c3e2
ret
; c3ef
-Special_CheckUnusedTwoDayTimer: ; c3ef
+UnusedSpecial_CheckUnusedTwoDayTimer: ; c3ef
farcall CheckUnusedTwoDayTimer
ld a, [wUnusedTwoDayTimer]
ld [ScriptVar], a
@@ -517,7 +517,7 @@ StoreSwarmMapIndices:: ; c403
; c419
-SpecialCheckPokerus: ; c419
+Special_CheckPokerus: ; c419
; Check if a monster in your party has Pokerus
farcall CheckPokerus
jp ScriptReturnCarry
@@ -536,7 +536,7 @@ Special_CheckLuckyNumberShowFlag: ; c434
jp ScriptReturnCarry
; c43d
-SpecialSnorlaxAwake: ; 0xc43d
+Special_SnorlaxAwake: ; 0xc43d
; Check if the Poké Flute channel is playing, and if the player is standing
; next to Snorlax.
@@ -587,13 +587,13 @@ SpecialSnorlaxAwake: ; 0xc43d
db -1
-PlayCurMonCry: ; c472
+Special_PlayCurMonCry: ; c472
ld a, [CurPartySpecies]
jp PlayCry
; c478
-SpecialGameboyCheck: ; c478
+Special_GameboyCheck: ; c478
ld a, [hCGB]
and a
jr nz, .cgb
@@ -625,21 +625,21 @@ Special_FadeOutMusic: ; c48f
ret
; c49f
-Diploma: ; c49f
+Special_Diploma: ; c49f
call FadeToMenu
farcall _Diploma
call ExitAllMenus
ret
; c4ac
-PrintDiploma: ; c4ac
+Special_PrintDiploma: ; c4ac
call FadeToMenu
farcall _PrintDiploma
call ExitAllMenus
ret
; c4b9
-SpecialTrainerHouse: ; 0xc4b9
+Special_TrainerHouse: ; 0xc4b9
ld a, BANK(sMysteryGiftTrainerHouseFlag)
call GetSRAMBank
ld a, [sMysteryGiftTrainerHouseFlag]
diff --git a/engine/sprites.asm b/engine/sprites.asm
index 2bd06387b..7928fe1f0 100755
--- a/engine/sprites.asm
+++ b/engine/sprites.asm
@@ -527,8 +527,7 @@ GetFrameOAMPointer: ; 8d1a2
ret
; 8d1ac
-BrokenGetStdGraphics: ; 8d1ac
-; dummied out
+Unreferenced_BrokenGetStdGraphics: ; 8d1ac
push hl
ld l, a
ld h, 0
diff --git a/engine/start_menu.asm b/engine/start_menu.asm
index efb7b80f9..e5d69cbb4 100755
--- a/engine/start_menu.asm
+++ b/engine/start_menu.asm
@@ -591,7 +591,7 @@ HasNoItems: ; 129d5
TossItemFromPC: ; 129f4
push de
- call PartyMonItemName
+ call Predef_PartyMonItemName
farcall _CheckTossableItem
ld a, [wItemAttributeParamBuffer]
and a
@@ -614,7 +614,7 @@ TossItemFromPC: ; 129f4
pop hl
ld a, [CurItemQuantity]
call TossItem
- call PartyMonItemName
+ call Predef_PartyMonItemName
ld hl, .TossedThisMany
call MenuTextBox
call ExitMenu
@@ -666,7 +666,7 @@ CantUseItemText: ; 12a67
; 12a6c
-PartyMonItemName: ; 12a6c
+Predef_PartyMonItemName: ; 12a6c
ld a, [CurItem]
ld [wd265], a
call GetItemName
@@ -860,7 +860,7 @@ GiveTakePartyMonItem: ; 12b60
TryGiveItemToPartymon: ; 12bd9
call SpeechTextBox
- call PartyMonItemName
+ call Predef_PartyMonItemName
call GetPartyItemLocation
ld a, [hl]
and a
@@ -1221,7 +1221,7 @@ OpenPartyStats: ; 12e00
xor a
ld [MonType], a
call LowVolume
- predef StatsScreenInit
+ predef Predef_StatsScreenInit
call MaxVolume
call Call_ExitMenu
ld a, 0
@@ -1251,7 +1251,7 @@ MonMenu_Fly: ; 12e30
jr z, .Fail
cp $0
jr z, .Error
- farcall TrainerRankings_Fly
+ farcall StubbedTrainerRankings_Fly
ld b, $4
ld a, $2
ret
@@ -1264,7 +1264,7 @@ MonMenu_Fly: ; 12e30
ld a, $0
ret
-.Unused:
+.Unreferenced:
ld a, $1
ret
; 12e55
@@ -1788,7 +1788,7 @@ SetUpMoveScreenBG: ; 13172
hlcoord 5, 1
call PlaceString
push bc
- farcall CopyPkmnToTempMon
+ farcall Predef_CopyPkmnToTempMon
pop hl
call PrintLevel
ld hl, PlayerHPPal
@@ -1805,7 +1805,7 @@ SetUpMoveList: ; 131ef
ld [hBGMapMode], a
ld [wMoveSwapBuffer], a
ld [MonType], a
- predef CopyPkmnToTempMon
+ predef Predef_CopyPkmnToTempMon
ld hl, TempMonMoves
ld de, wListMoves_MoveIndicesBuffer
ld bc, NUM_MOVES
@@ -1813,9 +1813,9 @@ SetUpMoveList: ; 131ef
ld a, SCREEN_WIDTH * 2
ld [Buffer1], a
hlcoord 2, 3
- predef ListMoves
+ predef Predef_ListMoves
hlcoord 10, 4
- predef ListMovePP
+ predef Predef_ListMovePP
call WaitBGMap
call SetPalettes
ld a, [wNumMoves]
@@ -1859,7 +1859,7 @@ PlaceMoveData: ; 13256
ld a, [CurMove]
ld b, a
hlcoord 2, 12
- predef PrintMoveType
+ predef Predef_PrintMoveType
ld a, [CurMove]
dec a
ld hl, Moves + MOVE_POWER
@@ -1882,7 +1882,7 @@ PlaceMoveData: ; 13256
.description
hlcoord 1, 14
- predef PrintMoveDesc
+ predef Predef_PrintMoveDesc
ld a, $1
ld [hBGMapMode], a
ret
diff --git a/engine/stats_screen.asm b/engine/stats_screen.asm
index c0963d766..6bceaa1e9 100755
--- a/engine/stats_screen.asm
+++ b/engine/stats_screen.asm
@@ -7,14 +7,14 @@ NUM_STAT_PAGES EQU const_value +- 1
BattleStatsScreenInit: ; 4dc7b (13:5c7b)
ld a, [wLinkMode]
cp LINK_MOBILE
- jr nz, StatsScreenInit
+ jr nz, Predef_StatsScreenInit
ld a, [wBattleMode]
and a
- jr z, StatsScreenInit
+ jr z, Predef_StatsScreenInit
jr _MobileStatsScreenInit
-StatsScreenInit: ; 4dc8a
+Predef_StatsScreenInit: ; 4dc8a
ld hl, StatsScreenMain
jr StatsScreenInit_gotaddress
@@ -240,7 +240,7 @@ StatsScreen_CopyToTempMon: ; 4ddf2 (13:5df2)
jr .done
.breedmon
- farcall CopyPkmnToTempMon
+ farcall Predef_CopyPkmnToTempMon
ld a, [CurPartySpecies]
cp EGG
jr z, .done
@@ -425,7 +425,7 @@ StatsScreen_InitUpperHalf: ; 4deea (13:5eea)
ld a, [hli]
ld d, a
ld e, [hl]
- farcall ComputeHPBarPixels
+ farcall Predef_ComputeHPBarPixels
ld hl, wCurHPPal
call SetHPPal
ld b, SCGB_STATS_SCREEN_HP_PALS
@@ -435,7 +435,7 @@ StatsScreen_InitUpperHalf: ; 4deea (13:5eea)
.PlaceGenderChar: ; 4df66 (13:5f66)
push hl
- farcall GetGender
+ farcall Predef_GetGender
pop hl
ret c
ld a, "♂"
@@ -453,8 +453,7 @@ StatsScreen_InitUpperHalf: ; 4deea (13:5eea)
dw wBufferMonNick
; 4df7f
-Function4df7f: ; 4df7f
-; unreferenced
+Unreferenced_Function4df7f: ; 4df7f
hlcoord 7, 0
ld bc, SCREEN_WIDTH
ld d, SCREEN_HEIGHT
@@ -548,7 +547,7 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6)
.PinkPage: ; 4e013 (13:6013)
hlcoord 0, 9
ld b, $0
- predef DrawPlayerHP
+ predef Predef_DrawPlayerHP
hlcoord 8, 9
ld [hl], $41 ; right HP/exp bar end cap
ld de, .Status_Type
@@ -570,7 +569,7 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6)
hlcoord 6, 13
push hl
ld de, TempMonStatus
- predef PlaceStatusString
+ predef Predef_PlaceStatusString
pop hl
jr nz, .done_status
jr .StatusOK
@@ -584,7 +583,7 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6)
call PlaceString
.done_status
hlcoord 1, 15
- predef PrintMonTypes
+ predef Predef_PrintMonTypes
hlcoord 9, 8
ld de, SCREEN_WIDTH
ld b, 10
@@ -618,7 +617,7 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6)
ld a, [TempMonLevel]
ld b, a
ld de, TempMonExp + 2
- predef FillInExpBar
+ predef Predef_FillInExpBar
hlcoord 10, 16
ld [hl], $40 ; left exp bar end cap
hlcoord 19, 16
@@ -711,11 +710,11 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6)
hlcoord 8, 10
ld a, SCREEN_WIDTH * 2
ld [Buffer1], a
- predef ListMoves
+ predef Predef_ListMoves
hlcoord 12, 11
ld a, SCREEN_WIDTH * 2
ld [Buffer1], a
- predef ListMovePP
+ predef Predef_ListMovePP
ret
.GetItemName: ; 4e189 (13:6189)
@@ -756,7 +755,7 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6)
jr nz, .BluePageVerticalDivider
hlcoord 11, 8
ld bc, 6
- predef PrintTempMonStats
+ predef Predef_PrintTempMonStats
ret
.PlaceOTInfo: ; 4e1cc (13:61cc)
@@ -809,7 +808,7 @@ OTString: ; 4e222
StatsScreen_PlaceFrontpic: ; 4e226 (13:6226)
ld hl, TempMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
call StatsScreen_GetAnimationParam
jr c, .egg
and a
@@ -871,11 +870,11 @@ StatsScreen_PlaceFrontpic: ; 4e226 (13:6226)
ret c
call StatsScreen_LoadTextBoxSpaceGFX
ld de, vTiles2 tile $00
- predef GetAnimatedFrontpicPredef
+ predef Predef_GetAnimatedFrontpic
hlcoord 0, 0
ld d, $0
ld e, ANIM_MON_MENU
- predef LoadMonAnimation
+ predef Predef_LoadMonAnimation
ld hl, wcf64
set 6, [hl]
ret
@@ -969,9 +968,8 @@ StatsScreen_LoadTextBoxSpaceGFX: ; 4e307 (13:6307)
ret
; 4e32a (13:632a)
-; unreferenced
-Unknown_4e32a: ; 4e32a
-; An unused space tile?
+Unreferenced_4e32a: ; 4e32a
+; A blank space tile?
ds 16
; 4e33a
@@ -1076,11 +1074,11 @@ StatsScreen_AnimateEgg: ; 4e497 (13:6497)
ld [wBoxAlignment], a
call StatsScreen_LoadTextBoxSpaceGFX
ld de, vTiles2 tile $00
- predef GetAnimatedFrontpicPredef
+ predef Predef_GetAnimatedFrontpic
pop de
hlcoord 0, 0
ld d, $0
- predef LoadMonAnimation
+ predef Predef_LoadMonAnimation
ld hl, wcf64
set 6, [hl]
ret
diff --git a/engine/tempmon.asm b/engine/tempmon.asm
index be989d14b..abd85a9ec 100644
--- a/engine/tempmon.asm
+++ b/engine/tempmon.asm
@@ -1,4 +1,4 @@
-CopyPkmnToTempMon: ; 5084a
+Predef_CopyPkmnToTempMon: ; 5084a
; gets the BaseData of a Pkmn
; and copys the PkmnStructure to TempMon
@@ -51,7 +51,7 @@ _TempMonStatsCalculation: ; 50893
add hl, bc
push bc
ld b, $1
- predef CalcPkmnStats
+ predef Predef_CalcPkmnStats
pop bc
ld hl, MON_HP
add hl, bc
diff --git a/engine/time.asm b/engine/time.asm
index 03687eee9..29c811810 100755
--- a/engine/time.asm
+++ b/engine/time.asm
@@ -225,13 +225,13 @@ CheckUnusedTwoDayTimer: ; 1150c
ret
; 1151c
-; XXX
+; unused
ld hl, wDailyFlags
set 2, [hl]
ret
; 11522
-; XXX
+; unused
and a
ld hl, wDailyFlags
bit 2, [hl]
diff --git a/engine/time_capsule_2.asm b/engine/time_capsule_2.asm
index 0378ed697..c114e6952 100644
--- a/engine/time_capsule_2.asm
+++ b/engine/time_capsule_2.asm
@@ -18,7 +18,7 @@ ConvertMon_2to1: ; fb8f1
ret
; fb908
-ConvertMon_1to2: ; fb908
+Predef_ConvertMon_1to2: ; fb908
; Takes the Gen-1 Pokemon number stored in wd265 and returns the corresponding value from Pokered_MonIndices in wd265.
push bc
push hl
diff --git a/engine/timeofdaypals.asm b/engine/timeofdaypals.asm
index 0b1ea71a2..3679f2d23 100644
--- a/engine/timeofdaypals.asm
+++ b/engine/timeofdaypals.asm
@@ -1,5 +1,5 @@
-Predef35: ; 8c000
-Predef36:
+DummyPredef35: ; 8c000
+DummyPredef36:
ret
UpdateTimeOfDayPal:: ; 8c001
@@ -119,7 +119,7 @@ _UpdateTimePals:: ; 8c070
ret
; 8c079
-FadeInPalettes:: ; 8c079
+Special_FadeInPalettes:: ; 8c079
ld c, $12
call GetTimePalFade
ld b, $4
@@ -127,7 +127,7 @@ FadeInPalettes:: ; 8c079
ret
; 8c084
-FadeOutPalettes:: ; 8c084
+Special_FadeOutPalettes:: ; 8c084
call FillWhiteBGColor
ld c, $9
call GetTimePalFade
diff --git a/engine/tmhm.asm b/engine/tmhm.asm
index 6a9c76f00..11f692cb6 100755
--- a/engine/tmhm.asm
+++ b/engine/tmhm.asm
@@ -1,4 +1,4 @@
-CanLearnTMHMMove: ; 11639
+Predef_CanLearnTMHMMove: ; 11639
ld a, [CurPartySpecies]
ld [CurSpecies], a
call GetBaseData
@@ -23,7 +23,7 @@ CanLearnTMHMMove: ; 11639
ld b, CHECK_FLAG
push de
ld d, 0
- predef FlagPredef
+ predef Predef_SmallFarFlagAction
pop de
ret
@@ -33,7 +33,7 @@ CanLearnTMHMMove: ; 11639
ret
; 1166a
-GetTMHMMove: ; 1166a
+Predef_GetTMHMMove: ; 1166a
ld a, [wd265]
dec a
ld hl, TMHMMoves
diff --git a/engine/tmhm2.asm b/engine/tmhm2.asm
index c111fa7f9..ddc27da07 100755
--- a/engine/tmhm2.asm
+++ b/engine/tmhm2.asm
@@ -38,7 +38,7 @@ ConvertCurItemIntoCurTMHM: ; 2c7a7 (b:47a7)
GetTMHMItemMove: ; 2c7b6 (b:47b6)
call ConvertCurItemIntoCurTMHM
- predef GetTMHMMove
+ predef Predef_GetTMHMMove
ret
AskTeachTMHM: ; 2c7bf (b:47bf)
@@ -118,7 +118,7 @@ ChooseMonToLearnTMHM_NoRefresh: ; 2c80a
; 2c867
TeachTMHM: ; 2c867
- predef CanLearnTMHMMove
+ predef Predef_CanLearnTMHMMove
push bc
ld a, [CurPartyMon]
@@ -141,12 +141,12 @@ TeachTMHM: ; 2c867
callfar KnowsMove
jr c, .nope
- predef LearnMove
+ predef Predef_LearnMove
ld a, b
and a
jr z, .nope
- farcall TrainerRankings_TMsHMsTaught
+ farcall StubbedTrainerRankings_TMsHMsTaught
ld a, [CurItem]
call IsHM
ret c
@@ -258,11 +258,11 @@ TMHM_ShowTMMoveDescription: ; 2c946 (b:4946)
cp NUM_TMS + NUM_HMS + 1
jr nc, TMHM_JoypadLoop
ld [wd265], a
- predef GetTMHMMove
+ predef Predef_GetTMHMMove
ld a, [wd265]
ld [CurSpecies], a
hlcoord 1, 14
- call PrintMoveDesc
+ call Predef_PrintMoveDesc
jp TMHM_JoypadLoop
TMHM_ChooseTMorHM: ; 2c974 (b:4974)
@@ -386,7 +386,7 @@ TMHM_DisplayPocketItems: ; 2c9e2 (b:49e2)
pop af
ld [wd265], a
.okay
- predef GetTMHMMove
+ predef Predef_GetTMHMMove
ld a, [wd265]
ld [wPutativeTMHMMove], a
call GetMoveName
@@ -447,12 +447,11 @@ TMHMPocket_GetCurrentLineCoord: ; 2ca86 (b:4a86)
ret
; 2ca95 (b:4a95)
-Function2ca95: ; 2ca95
-; unreferenced
+Unreferenced_Function2ca95: ; 2ca95
pop hl
ld bc, 3
add hl, bc
- predef GetTMHMMove
+ predef Predef_GetTMHMMove
ld a, [wd265]
ld [wPutativeTMHMMove], a
call GetMoveName
@@ -499,8 +498,7 @@ TMHM_PlaySFX_ReadText2: ; 2cad6 (b:4ad6)
ret
; 2cadf (b:4adf)
-Function2cadf: ; 2cadf
-; unreferenced
+Unreferenced_Function2cadf: ; 2cadf
call ConvertCurItemIntoCurTMHM
call .CheckHaveRoomForTMHM
ld hl, .NoRoomText
@@ -574,7 +572,7 @@ CountTMsHMs: ; 2cb2a (b:4b2a)
ld [wd265], a
ret
-PrintMoveDesc: ; 2cb3e
+Predef_PrintMoveDesc: ; 2cb3e
push hl
ld hl, MoveDescriptions
ld a, [CurSpecies]
diff --git a/engine/trade_animation.asm b/engine/trade_animation.asm
index e63d95cd7..2ded0807a 100755
--- a/engine/trade_animation.asm
+++ b/engine/trade_animation.asm
@@ -9,7 +9,7 @@ TRADEANIM_LEFT_ARROW EQU $ee
const TRADEANIMSTATE_3 ; 3
TRADEANIMJUMPTABLE_LENGTH EQU const_value
-TradeAnimation: ; 28f24
+Predef_TradeAnimation: ; 28f24
xor a
ld [wcf66], a
ld hl, wPlayerTrademonSenderName
@@ -60,7 +60,7 @@ TradeAnimation: ; 28f24
tradeanim_scroll_out_right
tradeanim_end
-TradeAnimationPlayer2: ; 28f63
+Predef_TradeAnimationPlayer2: ; 28f63
xor a
ld [wcf66], a
ld hl, wOTTrademonSenderName
@@ -883,13 +883,13 @@ TradeAnim_AnimateFrontpic: ; 29487
TradeAnim_GetFrontpic: ; 29491
push de
push af
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
pop af
ld [CurPartySpecies], a
ld [CurSpecies], a
call GetBaseData
pop de
- predef GetMonFrontpic
+ predef Predef_GetMonFrontpic
ret
; 294a9
@@ -923,7 +923,7 @@ TradeAnim_ShowFrontpic: ; 294c3
xor a
ld [hGraphicStartTile], a
lb bc, 7, 7
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
call WaitBGMap
ret
@@ -1575,8 +1575,8 @@ TradeAnim_WaitAnim2: ; 29886
; 29893
-DebugTrade: ; 29893
-; This function is unreferenced.
+Unreferenced_DebugTrade: ; 29893
+; This function is not referenced.
; It was meant for use in Japanese versions, so the
; constant used for copy length was changed by accident.
diff --git a/engine/trainer_card.asm b/engine/trainer_card.asm
index 5f48d2e5d..c80553ecd 100755
--- a/engine/trainer_card.asm
+++ b/engine/trainer_card.asm
@@ -128,8 +128,7 @@ TrainerCard_Page1_Joypad: ; 251d7 (9:51d7)
ld [wJumptableIndex], a
ret
-.KantoCheck:
-; unreferenced
+.Unreferenced_KantoCheck:
ld a, [wKantoBadges]
and a
ret z
@@ -174,8 +173,7 @@ TrainerCard_Page2_Joypad: ; 25221 (9:5221)
ld [wJumptableIndex], a
ret
-.KantoCheck:
-; unreferenced
+.Unreferenced_KantoCheck:
ld a, [wKantoBadges]
and a
ret z
@@ -256,7 +254,7 @@ TrainerCard_PrintTopHalfOfCard: ; 25299 (9:5299)
lb bc, 5, 7
xor a
ld [hGraphicStartTile], a
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
ret
; 252ec (9:52ec)
diff --git a/engine/types.asm b/engine/types.asm
index ade1aaa4a..0cd52eda7 100644
--- a/engine/types.asm
+++ b/engine/types.asm
@@ -1,4 +1,4 @@
-PrintMonTypes: ; 5090d
+Predef_PrintMonTypes: ; 5090d
; Print one or both types of [CurSpecies]
; on the stats screen at hl.
@@ -24,7 +24,7 @@ PrintMonTypes: ; 5090d
.Print:
ld b, a
- jr PrintType
+ jr Predef_PrintType
.hide_type_2
; Erase any type name that was here before.
@@ -40,7 +40,7 @@ PrintMonTypes: ; 5090d
; 5093a
-PrintMoveType: ; 5093a
+Predef_PrintMoveType: ; 5093a
; Print the type of move b at hl.
push hl
@@ -58,7 +58,7 @@ PrintMoveType: ; 5093a
ld b, a
-PrintType: ; 50953
+Predef_PrintType: ; 50953
; Print type b at hl.
ld a, b
@@ -78,7 +78,7 @@ PrintType: ; 50953
; 50964
-GetTypeName: ; 50964
+Predef_GetTypeName: ; 50964
; Copy the name of type [wd265] to StringBuffer1.
ld a, [wd265]
diff --git a/engine/warp_connection.asm b/engine/warp_connection.asm
index 3a7292633..28908e793 100755
--- a/engine/warp_connection.asm
+++ b/engine/warp_connection.asm
@@ -305,12 +305,12 @@ LoadGraphics: ; 1047cf
ld [hMapAnims], a
xor a
ld [hTileAnimFrame], a
- farcall RefreshSprites
+ farcall Special_RefreshSprites
call LoadFontsExtra
farcall LoadOverworldFont
ret
-LoadMapPalettes: ; 1047eb
+Special_LoadMapPalettes: ; 1047eb
ld b, SCGB_MAPPALS
jp GetSGBLayout
; 1047f0
diff --git a/engine/wildmons.asm b/engine/wildmons.asm
index 33e66ce07..287ffe6ac 100755
--- a/engine/wildmons.asm
+++ b/engine/wildmons.asm
@@ -508,7 +508,7 @@ LookUpWildmonsForMapDE: ; 2a288
; 2a2a0
-InitRoamMons: ; 2a2a0
+Special_InitRoamMons: ; 2a2a0
; initialize wRoamMon structs
; species
@@ -804,7 +804,7 @@ ValidateTempWildMonSpecies: ; 2a4a0
; Finds a rare wild Pokemon in the route of the trainer calling, then checks if it's been Seen already.
; The trainer will then tell you about the Pokemon if you haven't seen it.
-RandomUnseenWildMon: ; 2a4ab
+Special_RandomUnseenWildMon: ; 2a4ab
farcall GetCallerLocation
ld d, b
ld e, c
@@ -877,7 +877,7 @@ RandomUnseenWildMon: ; 2a4ab
db "@"
; 0x2a51f
-RandomPhoneWildMon: ; 2a51f
+Special_RandomPhoneWildMon: ; 2a51f
farcall GetCallerLocation
ld d, b
ld e, c
@@ -917,7 +917,7 @@ RandomPhoneWildMon: ; 2a51f
jp CopyBytes
; 2a567
-RandomPhoneMon: ; 2a567
+Special_RandomPhoneMon: ; 2a567
; Get a random monster owned by the trainer who's calling.
farcall GetCallerLocation
ld hl, TrainerGroups