From 91774f206e97d67cb8f16f5afeec03ce9c7e28ca Mon Sep 17 00:00:00 2001 From: Rangi Date: Sun, 21 Jun 2020 16:27:43 -0400 Subject: [PATCH] Replace "Unreferenced" labels with "; unreferenced" comments --- data/pokemon/unused_pic_banks.asm | 2 +- data/text/unused_dakutens.asm | 4 +- engine/battle/battle_transition.asm | 2 +- engine/battle/core.asm | 14 ++-- ...ssname.asm => getgen1trainerclassname.asm} | 2 +- engine/battle/read_trainer_party.asm | 2 +- engine/battle_anims/anim_commands.asm | 2 +- engine/events/battle_tower/battle_tower.asm | 2 +- engine/events/npc_trade.asm | 4 +- engine/events/overworld.asm | 2 +- engine/games/slot_machine.asm | 6 +- engine/gfx/cgb_layouts.asm | 2 +- engine/gfx/color.asm | 20 +++--- engine/gfx/dma_transfer.asm | 12 ++-- engine/gfx/load_font.asm | 10 +-- engine/gfx/load_pics.asm | 2 +- engine/gfx/mon_icons.asm | 2 +- engine/gfx/player_gfx.asm | 4 +- engine/gfx/sprites.asm | 2 +- engine/items/mart.asm | 2 +- engine/items/pack.asm | 4 +- engine/items/tmhm.asm | 4 +- engine/link/link.asm | 8 +-- engine/link/mystery_gift.asm | 2 +- engine/menus/intro_menu.asm | 8 +-- engine/menus/menu.asm | 4 +- engine/menus/menu_2.asm | 2 +- engine/menus/naming_screen.asm | 4 +- engine/menus/save.asm | 12 ++-- engine/menus/scrolling_menu.asm | 2 +- engine/menus/start_menu.asm | 2 +- engine/menus/trainer_card.asm | 4 +- engine/movie/trade_animation.asm | 5 +- engine/overworld/cmd_queue.asm | 4 +- engine/overworld/events.asm | 5 +- engine/overworld/map_objects.asm | 2 +- engine/overworld/map_setup.asm | 4 +- engine/overworld/npc_movement.asm | 4 +- engine/pokedex/pokedex_2.asm | 3 +- engine/pokegear/pokegear.asm | 4 +- engine/pokemon/bills_pc.asm | 4 +- engine/pokemon/bills_pc_top.asm | 6 +- engine/pokemon/breeding.asm | 2 +- engine/pokemon/correct_party_errors.asm | 2 +- engine/pokemon/mail_2.asm | 2 +- engine/pokemon/mon_menu.asm | 2 +- engine/pokemon/mon_stats.asm | 2 +- engine/pokemon/stats_screen.asm | 4 +- engine/printer/printer.asm | 2 +- engine/rtc/print_hours_mins.asm | 2 +- engine/rtc/restart_clock.asm | 9 +-- engine/rtc/rtc.asm | 4 +- engine/rtc/timeset.asm | 4 +- gfx/sgb/blk_packets.asm | 2 +- gfx/sgb/pal_packets.asm | 4 +- gfx/tileset_palette_maps.asm | 7 +- home/audio.asm | 2 +- home/battle.asm | 2 +- home/fade.asm | 3 +- home/flag.asm | 4 +- home/gfx.asm | 2 +- home/header.asm | 2 +- home/lcd.asm | 2 +- home/map.asm | 9 ++- home/map_objects.asm | 6 +- home/math.asm | 2 +- home/menu.asm | 4 +- home/mobile.asm | 12 ++-- home/palettes.asm | 2 +- home/pokemon.asm | 2 +- home/region.asm | 2 +- home/serial.asm | 2 +- home/text.asm | 72 ++++--------------- home/time.asm | 6 +- home/trainers.asm | 2 +- lib/mobile/main.asm | 2 +- main.asm | 2 +- maps/BattleTower1F.asm | 12 ++-- maps/BattleTowerBattleRoom.asm | 4 +- maps/FastShipCabins_SE_SSE_CaptainsCabin.asm | 2 +- maps/GoldenrodBikeShop.asm | 2 +- maps/Route32.asm | 2 +- mobile/fixed_words.asm | 2 +- mobile/mobile_12.asm | 2 +- mobile/mobile_40.asm | 16 ++--- mobile/mobile_41.asm | 4 +- mobile/mobile_46.asm | 10 +-- mobile/mobile_5b.asm | 2 +- mobile/news/news.asm | 4 +- wram.asm | 15 +++- 90 files changed, 212 insertions(+), 250 deletions(-) rename engine/battle/{unreferenced_getgen1trainerclassname.asm => getgen1trainerclassname.asm} (87%) diff --git a/data/pokemon/unused_pic_banks.asm b/data/pokemon/unused_pic_banks.asm index 2ede9c3f9..6532c722f 100644 --- a/data/pokemon/unused_pic_banks.asm +++ b/data/pokemon/unused_pic_banks.asm @@ -1,7 +1,7 @@ ; This was a table of Pokémon sprite banks in the 1997 G/S prototype. ; See pokegold-spaceworld's gfx/pokemon/pkmn_pic_banks.asm. -Unreferenced_MonPicBanks: +BetaMonPicBanks: ; unreferenced ; last mon in bank, bank # db RAICHU, $15 + 0 db DUGTRIO, $15 + 1 diff --git a/data/text/unused_dakutens.asm b/data/text/unused_dakutens.asm index 756018d79..f578e0ff4 100644 --- a/data/text/unused_dakutens.asm +++ b/data/text/unused_dakutens.asm @@ -1,4 +1,4 @@ -UnreferencedDakutens: +Dakutens: ; unreferenced db "かが", "きぎ", "くぐ", "けげ", "こご" db "さざ", "しじ", "すず", "せぜ", "そぞ" db "ただ", "ちぢ", "つづ", "てで", "とど" @@ -9,7 +9,7 @@ UnreferencedDakutens: db "ハバ", "ヒビ", "フブ", "へべ", "ホボ" db -1 ; end -UnreferencedHandakutens: +Handakutens: ; unreferenced db "はぱ", "ひぴ", "ふぷ", "へぺ", "ほぽ" db "ハパ", "ヒピ", "フプ", "へぺ", "ホポ" db -1 ; end diff --git a/engine/battle/battle_transition.asm b/engine/battle/battle_transition.asm index 653622f86..a36927820 100644 --- a/engine/battle/battle_transition.asm +++ b/engine/battle/battle_transition.asm @@ -826,7 +826,7 @@ ENDM jr nz, .row ret -Unreferenced_Function8c7c9: +Function8c7c9: ; unreferenced ld a, 1 ldh [hBGMapMode], a call WaitBGMap diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 4256b0df6..90f0372f6 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -1899,7 +1899,7 @@ GetMaxHP: ld c, a ret -Unreferenced_GetHalfHP: +GetHalfHP: ; unreferenced ld hl, wBattleMonHP ldh a, [hBattleTurn] and a @@ -6488,7 +6488,7 @@ CheckUnownLetter: INCLUDE "data/wild/unlocked_unowns.asm" -Unreferenced_SwapBattlerLevels: +SwapBattlerLevels: ; unreferenced push bc ld a, [wBattleMonLevel] ld b, a @@ -6852,7 +6852,7 @@ _LoadHPBar: callfar LoadHPBar ret -Unreferenced_LoadHPExpBarGFX: +LoadHPExpBarGFX: ; unreferenced ld de, EnemyHPBarBorderGFX ld hl, vTiles2 tile $6c lb bc, BANK(EnemyHPBarBorderGFX), 4 @@ -7763,7 +7763,7 @@ GoodComeBackText: text_far _GoodComeBackText text_end -Unreferenced_TextJump_ComeBack: +TextJump_ComeBack: ; unreferenced ld hl, ComeBackText ret @@ -7771,7 +7771,7 @@ ComeBackText: text_far _ComeBackText text_end -Unreferenced_HandleSafariAngerEatingStatus: +HandleSafariAngerEatingStatus: ; unreferenced ld hl, wSafariMonEating ld a, [hl] and a @@ -8028,7 +8028,7 @@ StartBattle: scf ret -Unreferenced_DoBattle: +CallDoBattle: ; unreferenced call DoBattle ret @@ -8201,7 +8201,7 @@ InitEnemyWildmon: predef PlaceGraphic ret -Unreferenced_Function3f662: +Function3f662: ; unreferenced ld hl, wEnemyMonMoves ld de, wListMoves_MoveIndicesBuffer ld b, NUM_MOVES diff --git a/engine/battle/unreferenced_getgen1trainerclassname.asm b/engine/battle/getgen1trainerclassname.asm similarity index 87% rename from engine/battle/unreferenced_getgen1trainerclassname.asm rename to engine/battle/getgen1trainerclassname.asm index 045325234..78b543f12 100644 --- a/engine/battle/unreferenced_getgen1trainerclassname.asm +++ b/engine/battle/getgen1trainerclassname.asm @@ -1,4 +1,4 @@ -Unreferenced_GetGen1TrainerClassName: +GetGen1TrainerClassName: ; unreferenced ld hl, Gen1TrainerClassNames ld a, [wTrainerClass] dec a diff --git a/engine/battle/read_trainer_party.asm b/engine/battle/read_trainer_party.asm index b2a0903b4..1c1ff1c4b 100644 --- a/engine/battle/read_trainer_party.asm +++ b/engine/battle/read_trainer_party.asm @@ -380,7 +380,7 @@ CopyTrainerName: pop de ret -Unreferenced_Function39990: +Function39990: ; unreferenced ld de, wStringBuffer1 push de ld bc, NAME_LENGTH diff --git a/engine/battle_anims/anim_commands.asm b/engine/battle_anims/anim_commands.asm index 14396f385..f6c50b72f 100644 --- a/engine/battle_anims/anim_commands.asm +++ b/engine/battle_anims/anim_commands.asm @@ -216,7 +216,7 @@ ClearActorHud: call ClearBox ret -Unreferenced_Functioncc220: +Functioncc220: ; unreferenced xor a ldh [hBGMapMode], a ld a, LOW(vBGMap0 tile $28) diff --git a/engine/events/battle_tower/battle_tower.asm b/engine/events/battle_tower/battle_tower.asm index 6ffc3c8e2..bba5ae3a5 100644 --- a/engine/events/battle_tower/battle_tower.asm +++ b/engine/events/battle_tower/battle_tower.asm @@ -581,7 +581,7 @@ CopyBTTrainer_FromBT_OT_TowBT_OTTemp: SkipBattleTowerTrainer: ret -Unreferenced_Function1704ca: +Function1704ca: ; unreferenced ld a, [s5_be46] cp BATTLETOWER_STREAK_LENGTH jr c, .not_max diff --git a/engine/events/npc_trade.asm b/engine/events/npc_trade.asm index a14a102cf..f7ec0f23e 100644 --- a/engine/events/npc_trade.asm +++ b/engine/events/npc_trade.asm @@ -312,14 +312,14 @@ CopyTradeName: call CopyBytes ret -Unreferenced_Functionfcdfb: +Functionfcdfb: ; unreferenced ld bc, 4 call CopyBytes ld a, "@" ld [de], a ret -Unreferenced_Functionfce05: +Functionfce05: ; unreferenced ld bc, 3 call CopyBytes ld a, "@" diff --git a/engine/events/overworld.asm b/engine/events/overworld.asm index 824cde120..d0ab25d62 100644 --- a/engine/events/overworld.asm +++ b/engine/events/overworld.asm @@ -971,7 +971,7 @@ StrengthFunction: jr c, .Failed jr .UseStrength -.Unreferenced_AlreadyUsing: +.AlreadyUsingStrength: ; unreferenced ld hl, .AlreadyUsingStrengthText call MenuTextboxBackup ld a, $80 diff --git a/engine/games/slot_machine.asm b/engine/games/slot_machine.asm index 30f6c45af..8a741b025 100644 --- a/engine/games/slot_machine.asm +++ b/engine/games/slot_machine.asm @@ -230,7 +230,7 @@ SlotsLoop: call PrintNum ret -Unreferenced_Function92811: +Function92811: ; unreferenced ; debug function? ld a, [wSlotBias] add 0 @@ -248,7 +248,7 @@ Unreferenced_Function92811: ld [hl], a ret -Unreferenced_Function9282c: +Function9282c: ; unreferenced ; animate OAM tiles? ld hl, wcf66 ld a, [hl] @@ -845,7 +845,7 @@ Slots_UpdateReelPositionAndOAM: jr nz, .loop ret -Unreferenced_Function92bbe: +Function92bbe: ; unreferenced push hl srl a srl a diff --git a/engine/gfx/cgb_layouts.asm b/engine/gfx/cgb_layouts.asm index 70cb5325a..6de95194b 100644 --- a/engine/gfx/cgb_layouts.asm +++ b/engine/gfx/cgb_layouts.asm @@ -980,7 +980,7 @@ _CGB_MysteryGift: .MysteryGiftPalettes: INCLUDE "gfx/mystery_gift/mystery_gift.pal" -Unreferenced_GS_CGB_MysteryGift: +GS_CGB_MysteryGift: ; unreferenced ld hl, .MysteryGiftPalette ld de, wBGPals1 ld bc, 1 palettes diff --git a/engine/gfx/color.asm b/engine/gfx/color.asm index cef6381ec..f316548bd 100644 --- a/engine/gfx/color.asm +++ b/engine/gfx/color.asm @@ -76,7 +76,7 @@ Unused_CheckShininess: and a ret -Unreferenced_SGB_ApplyCreditsPals: +SGB_ApplyCreditsPals: ; unreferenced push de push bc ld hl, PalPacket_9ce6 @@ -133,7 +133,7 @@ SGB_ApplyPartyMenuHPPals: ld [hl], e ret -Unreferenced_Function8b07: +Function8b07: ; unreferenced call CheckCGB ret z ; CGB only @@ -166,7 +166,7 @@ Unreferenced_Function8b07: RGB 08, 16, 28 RGB 00, 00, 00 -Unreferenced_Function8b3f: +Function8b3f: ; unreferenced call CheckCGB ret nz ldh a, [hSGB] @@ -175,7 +175,7 @@ Unreferenced_Function8b3f: ld hl, BlkPacket_9a86 jp PushSGBPals -Unreferenced_Function8b4d: +Function8b4d: ; unreferenced call CheckCGB jr nz, .cgb ldh a, [hSGB] @@ -190,7 +190,7 @@ Unreferenced_Function8b4d: call GetPredefPal jp LoadHLPaletteIntoDE -Unreferenced_Function8b67: +Function8b67: ; unreferenced call CheckCGB jr nz, .cgb ldh a, [hSGB] @@ -205,7 +205,7 @@ Unreferenced_Function8b67: call GetPredefPal jp LoadHLPaletteIntoDE -Unreferenced_GSIntro_LoadMonPalette: +GSIntro_LoadMonPalette: ; unreferenced call CheckCGB jr nz, .cgb ldh a, [hSGB] @@ -273,7 +273,7 @@ LoadNthMiddleBGPal: call LoadPalette_White_Col1_Col2_Black ret -Unreferenced_Function8bec: +Function8bec: ; unreferenced ldh a, [hCGB] and a jr nz, .cgb @@ -719,7 +719,7 @@ GetMonPalettePointer: call _GetMonPalettePointer ret -Unreferenced_Function9779: +Function9779: ; unreferenced ret call CheckCGB ret z @@ -742,7 +742,7 @@ Unreferenced_Function9779: BattleObjectPals: INCLUDE "gfx/battle_anims/battle_anims.pal" -Unreferenced_Function97cc: +Function97cc: ; unreferenced call CheckCGB ret z ld a, $90 @@ -952,7 +952,7 @@ _InitSGBBorderPals: dw DataSndPacket7 dw DataSndPacket8 -Unreferenced_Function9911: +Function9911: ; unreferenced di xor a ldh [rJOYP], a diff --git a/engine/gfx/dma_transfer.asm b/engine/gfx/dma_transfer.asm index f30c5eb45..1f5f3e785 100644 --- a/engine/gfx/dma_transfer.asm +++ b/engine/gfx/dma_transfer.asm @@ -108,11 +108,11 @@ Mobile_ReloadMapPart: ret -; unused - ld hl, .unreferenced_1040da +Function1040d4: ; unreferenced + ld hl, .Function jp CallInSafeGFXMode -.unreferenced_1040da +.Function ld a, $1 ldh [rVBK], a ld a, BANK(w3_d800) @@ -131,11 +131,11 @@ Mobile_ReloadMapPart: call WaitDMATransfer ret -; unused - ld hl, .unreferenced_104101 +Function1040fb: ; unreferenced + ld hl, .Function jp CallInSafeGFXMode -.unreferenced_104101 +.Function ld a, $1 ldh [rVBK], a ld a, BANK(w3_d800) diff --git a/engine/gfx/load_font.asm b/engine/gfx/load_font.asm index a83083581..0852cd8ff 100644 --- a/engine/gfx/load_font.asm +++ b/engine/gfx/load_font.asm @@ -1,16 +1,16 @@ INCLUDE "gfx/font.asm" -Unused_EnableHDMA: +EnableHDMAForGraphics: db FALSE -Unreferenced_Get1bppOptionalHDMA: - ld a, [Unused_EnableHDMA] +Get1bppOptionalHDMA: ; unreferenced + ld a, [EnableHDMAForGraphics] and a jp nz, Get1bppViaHDMA jp Get1bpp -Unreferenced_Get2bppOptionalHDMA: - ld a, [Unused_EnableHDMA] +Get2bppOptionalHDMA: ; unreferenced + ld a, [EnableHDMAForGraphics] and a jp nz, Get2bppViaHDMA jp Get2bpp diff --git a/engine/gfx/load_pics.asm b/engine/gfx/load_pics.asm index bf656b48d..a8dc82892 100644 --- a/engine/gfx/load_pics.asm +++ b/engine/gfx/load_pics.asm @@ -287,7 +287,7 @@ EXPORT PICS_FIX db BANK("Pics 23") ; BANK("Pics 1") + 22 db BANK("Pics 24") ; BANK("Pics 1") + 23 -Unreferenced_GSIntro_GetMonFrontpic: +GSIntro_GetMonFrontpic: ; unreferenced ld a, c push de ld hl, PokemonPicPointers diff --git a/engine/gfx/mon_icons.asm b/engine/gfx/mon_icons.asm index 6c7f14e3a..c1666fda4 100644 --- a/engine/gfx/mon_icons.asm +++ b/engine/gfx/mon_icons.asm @@ -273,7 +273,7 @@ FlyFunction_GetMonIcon: call GetIcon_a ret -Unreferenced_GetMonIcon2: +GetMonIconDE: ; unreferenced push de ld a, [wTempIconSpecies] call ReadMonMenuIcon diff --git a/engine/gfx/player_gfx.asm b/engine/gfx/player_gfx.asm index bd0fd0ce7..9a395e048 100644 --- a/engine/gfx/player_gfx.asm +++ b/engine/gfx/player_gfx.asm @@ -1,4 +1,4 @@ -Unreferenced_Function88248: +Function88248: ; unreferenced ld c, CAL ld a, [wPlayerGender] bit PLAYERGENDER_FEMALE_F, a @@ -72,7 +72,7 @@ ShowPlayerNamingChoices: INCLUDE "data/player_names.asm" -Unreferenced_GetPlayerNameArray: +GetPlayerNameArray: ; unreferenced ld hl, wPlayerName ld de, MalePlayerNameArray ld a, [wPlayerGender] diff --git a/engine/gfx/sprites.asm b/engine/gfx/sprites.asm index e070cb9f0..c5a91a9b5 100644 --- a/engine/gfx/sprites.asm +++ b/engine/gfx/sprites.asm @@ -508,7 +508,7 @@ GetFrameOAMPointer: add hl, de ret -Unreferenced_BrokenGetStdGraphics: +BrokenGetStdGraphics: ; unreferenced push hl ld l, a ld h, 0 diff --git a/engine/items/mart.asm b/engine/items/mart.asm index 98bb8324c..a0773df4a 100644 --- a/engine/items/mart.asm +++ b/engine/items/mart.asm @@ -722,7 +722,7 @@ SellMenu: and a ret -.Unreferenced_NothingToSell: +.NothingToSell: ; unreferenced ld hl, .NothingToSellText call MenuTextboxBackup and a diff --git a/engine/items/pack.asm b/engine/items/pack.asm index 1331c039f..bde5685cc 100644 --- a/engine/items/pack.asm +++ b/engine/items/pack.asm @@ -499,7 +499,7 @@ TossMenu: .finish ret -Unreferenced_ResetPocketCursorPositions: +ResetPocketCursorPositions: ; unreferenced ld a, [wCurPocket] and a ; ITEM_POCKET jr z, .items @@ -1434,7 +1434,7 @@ Pack_GetItemName: call CopyName1 ret -Unreferenced_Pack_ClearTilemap: +Pack_ClearTilemap: ; unreferenced hlcoord 0, 0 ld bc, SCREEN_WIDTH * SCREEN_HEIGHT ld a, " " diff --git a/engine/items/tmhm.asm b/engine/items/tmhm.asm index ecc2d45cb..8afd4bf79 100644 --- a/engine/items/tmhm.asm +++ b/engine/items/tmhm.asm @@ -436,7 +436,7 @@ TMHMPocket_GetCurrentLineCoord: jr nz, .loop ret -Unreferenced_Function2ca95: +Function2ca95: ; unreferenced pop hl ld bc, 3 add hl, bc @@ -484,7 +484,7 @@ TMHM_PlaySFX_ReadText2: pop de ret -Unreferenced_Function2cadf: +Function2cadf: ; unreferenced call ConvertCurItemIntoCurTMHM call .CheckHaveRoomForTMHM ld hl, .NoRoomTMHMText diff --git a/engine/link/link.asm b/engine/link/link.asm index 6a698761f..4f794eb00 100644 --- a/engine/link/link.asm +++ b/engine/link/link.asm @@ -1561,7 +1561,7 @@ Function28b22: ldh [rSC], a ret -Unreferenced_Function28b42: +Function28b42: ; unreferenced hlcoord 0, 16 ld a, "┘" ld bc, 2 * SCREEN_WIDTH @@ -1971,7 +1971,7 @@ SetTradeRoomBGPals: call SetPalettes ret -Unreferenced_Function28f09: +Function28f09: ; unreferenced hlcoord 0, 0 ld b, 6 ld c, 18 @@ -2503,10 +2503,10 @@ CableClubCheckWhichChris: ld [wScriptVar], a ret -Unreferenced_GSLinkCommsBorderGFX: +GSLinkCommsBorderGFX: ; unreferenced INCBIN "gfx/trade/unused_gs_border_tiles.2bpp" -Unreferenced_Function29fe4: +Function29fe4: ; unreferenced ld a, BANK(sPartyMail) call OpenSRAM ld d, FALSE diff --git a/engine/link/mystery_gift.asm b/engine/link/mystery_gift.asm index 5bf58ac2e..716fad205 100644 --- a/engine/link/mystery_gift.asm +++ b/engine/link/mystery_gift.asm @@ -1350,7 +1350,7 @@ InitMysteryGiftLayout: ld b, 5 jr .gfx_loop -.Unreferenced_Load6GFX: +.Load6GFX: ; unreferenced ld b, 6 jr .gfx_loop diff --git a/engine/menus/intro_menu.asm b/engine/menus/intro_menu.asm index 37f88506a..0c8d38375 100644 --- a/engine/menus/intro_menu.asm +++ b/engine/menus/intro_menu.asm @@ -781,7 +781,7 @@ NamePlayer: .Kris: db "KRIS@@@@@@@" -Unreferenced_GSShowPlayerNamingChoices: +GSShowPlayerNamingChoices: ; unreferenced call LoadMenuHeader call VerticalMenu ld a, [wMenuCursorY] @@ -1033,7 +1033,7 @@ RunTitleScreen: scf ret -Unreferenced_Function6292: +Function6292: ; unreferenced ldh a, [hVBlankCounter] and $7 ret nz @@ -1061,7 +1061,7 @@ TitleScreenScene: dw TitleScreenMain dw TitleScreenEnd -.Unreferenced_NextScene: +TitleScreenNextScene: ; unreferenced ld hl, wJumptableIndex inc [hl] ret @@ -1252,7 +1252,7 @@ ResetClock: farcall _ResetClock jp Init -Unreferenced_Function639b: +Function639b: ; unreferenced ; 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/menus/menu.asm b/engine/menus/menu.asm index 091dd27d0..94accb539 100644 --- a/engine/menus/menu.asm +++ b/engine/menus/menu.asm @@ -272,7 +272,7 @@ MobileMenuJoypad: ld c, a ret -Unreferenced_Function241d5: +Function241d5: ; unreferenced call Place2DMenuCursor .loop call Move2DMenuCursor @@ -690,7 +690,7 @@ _ExitMenu:: dec [hl] ret -Unreferenced_Function24423: +Function24423: ; unreferenced ld a, [wVramState] bit 0, a ret z diff --git a/engine/menus/menu_2.asm b/engine/menus/menu_2.asm index 3c68c2c49..6c65f8bf5 100644 --- a/engine/menus/menu_2.asm +++ b/engine/menus/menu_2.asm @@ -110,7 +110,7 @@ CoinString: ShowMoney_TerminatorString: db "@" -Unreferenced_StartMenu_PrintSafariGameStatus: +StartMenu_PrintSafariGameStatus: ; unreferenced ld hl, wOptions ld a, [hl] push af diff --git a/engine/menus/naming_screen.asm b/engine/menus/naming_screen.asm index aa0d9abf7..791ae5e02 100644 --- a/engine/menus/naming_screen.asm +++ b/engine/menus/naming_screen.asm @@ -698,7 +698,7 @@ NamingScreen_AdvanceCursor_CheckEndOfString: scf ret -Unreferenced_AddDakutenToCharacter: +AddDakutenToCharacter: ; unreferenced ld a, [wNamingScreenCurNameLength] and a ret z @@ -975,7 +975,7 @@ INCBIN "gfx/icons/mail_big.2bpp" ld [wNamingScreenMaxNameLength], a ret -.Unreferenced_PleaseWriteAMailString: +.PleaseWriteAMailString: ; unreferenced db "メールを かいてね@" .InitCharset: diff --git a/engine/menus/save.asm b/engine/menus/save.asm index 3bb23f08e..8f77e9b55 100644 --- a/engine/menus/save.asm +++ b/engine/menus/save.asm @@ -18,7 +18,7 @@ SaveMenu: .refused call ExitMenu - call ret_d90 + call GSReloadPalettes farcall SaveMenu_CopyTilemapAtOnce scf ret @@ -205,7 +205,7 @@ SaveTheGame_yesorno: dec a call CloseWindow push af - call ret_d90 + call GSReloadPalettes pop af and a ret @@ -390,7 +390,7 @@ EraseHallOfFame: call ByteFill jp CloseSRAM -Unreferenced_Function14d18: +Function14d18: ; unreferenced ld a, BANK(s4_a007) call OpenSRAM ld hl, .Data @@ -421,7 +421,7 @@ SaveData: call _SaveData ret -Unreferenced_Function14d6c: +Function14d6c: ; unreferenced ld a, BANK(s4_a60b) ; MBC30 bank used by JP Crystal; inaccessible by MBC3 call OpenSRAM ld a, [s4_a60b] ; address of MBC30 bank @@ -436,7 +436,7 @@ Unreferenced_Function14d6c: call CloseSRAM ret -Unreferenced_Function14d83: +Function14d83: ; unreferenced ld a, BANK(s4_a60c) ; aka BANK(s4_a60d) ; MBC30 bank used by JP Crystal; inaccessible by MBC3 call OpenSRAM xor a @@ -445,7 +445,7 @@ Unreferenced_Function14d83: call CloseSRAM ret -Unreferenced_Function14d93: +Function14d93: ; unreferenced ld a, BANK(s7_a000) ; MBC30 bank used by JP Crystal; inaccessible by MBC3 call OpenSRAM xor a diff --git a/engine/menus/scrolling_menu.asm b/engine/menus/scrolling_menu.asm index 0574bc730..d23b4d1e3 100644 --- a/engine/menus/scrolling_menu.asm +++ b/engine/menus/scrolling_menu.asm @@ -78,7 +78,7 @@ ScrollingMenuJoyAction: jp nz, .d_down jr .loop -.unreferenced ; unused +.no_zero_no_carry ; unreferenced ld a, -1 and a ret diff --git a/engine/menus/start_menu.asm b/engine/menus/start_menu.asm index e9e5236a9..dc12767ff 100644 --- a/engine/menus/start_menu.asm +++ b/engine/menus/start_menu.asm @@ -151,7 +151,7 @@ StartMenu:: call DrawVariableLengthMenuBox call .DrawBugContestStatus call UpdateSprites - call ret_d90 + call GSReloadPalettes call FinishExitMenu ret diff --git a/engine/menus/trainer_card.asm b/engine/menus/trainer_card.asm index 726148e20..6a7477e14 100644 --- a/engine/menus/trainer_card.asm +++ b/engine/menus/trainer_card.asm @@ -128,7 +128,7 @@ TrainerCard_Page1_Joypad: ld [wJumptableIndex], a ret -.Unreferenced_KantoCheck: +.KantoBadgeCheck: ; unreferenced ld a, [wKantoBadges] and a ret z @@ -171,7 +171,7 @@ TrainerCard_Page2_Joypad: ld [wJumptableIndex], a ret -.Unreferenced_KantoCheck: +.KantoBadgeCheck: ; unreferenced ld a, [wKantoBadges] and a ret z diff --git a/engine/movie/trade_animation.asm b/engine/movie/trade_animation.asm index d8c467d65..5b885249c 100644 --- a/engine/movie/trade_animation.asm +++ b/engine/movie/trade_animation.asm @@ -1400,9 +1400,8 @@ TradeAnim_WaitAnim2: call TradeAnim_AdvanceScriptPointer ret -Unreferenced_DebugTrade: -; This function is not referenced. -; It was meant for use in Japanese versions, so the +DebugTrade: ; unreferenced +; This function was meant for use in Japanese versions, so the ; constant used for copy length was changed by accident. ld hl, .DebugTradeData diff --git a/engine/overworld/cmd_queue.asm b/engine/overworld/cmd_queue.asm index 414281565..e482f789b 100644 --- a/engine/overworld/cmd_queue.asm +++ b/engine/overworld/cmd_queue.asm @@ -33,7 +33,7 @@ HandleCmdQueue:: jr nz, .loop ret -Unreferenced_GetNthCmdQueueEntry: +GetNthCmdQueueEntry: ; unreferenced ld hl, wCmdQueue ld bc, CMDQUEUE_ENTRY_SIZE call AddNTimes @@ -158,7 +158,7 @@ CmdQueue_Null: ret CmdQueue_Type1: - call ret_2f3e + call Function2f3e ret CmdQueue_Type4: diff --git a/engine/overworld/events.asm b/engine/overworld/events.asm index f78635cb7..0606f64b1 100644 --- a/engine/overworld/events.asm +++ b/engine/overworld/events.asm @@ -399,7 +399,7 @@ SetMinTwoStepWildEncounterCooldown: Dummy_CheckScriptFlags3Bit5: call CheckBit5_ScriptFlags3 ret z - call ret_2f3e + call Function2f3e ret RunSceneScript: @@ -928,8 +928,7 @@ CountStep: scf ret -; unused -.unreferenced +.whiteout ; unreferenced ld a, PLAYEREVENT_WHITEOUT scf ret diff --git a/engine/overworld/map_objects.asm b/engine/overworld/map_objects.asm index ebc4b8688..7c83f4fea 100644 --- a/engine/overworld/map_objects.asm +++ b/engine/overworld/map_objects.asm @@ -402,7 +402,7 @@ UpdatePlayerStep: set PLAYERSTEP_CONTINUE_F, [hl] ret -Unreferenced_Function4759: +Function4759: ; unreferenced push bc ld e, a ld d, 0 diff --git a/engine/overworld/map_setup.asm b/engine/overworld/map_setup.asm index 92e706ab3..a767dc5e7 100644 --- a/engine/overworld/map_setup.asm +++ b/engine/overworld/map_setup.asm @@ -113,12 +113,12 @@ EnableTextAcceleration: ret ActivateMapAnims: - ld a, $1 + ld a, TRUE ldh [hMapAnims], a ret SuspendMapAnims: - xor a + xor a ; FALSE ldh [hMapAnims], a ret diff --git a/engine/overworld/npc_movement.asm b/engine/overworld/npc_movement.asm index d6b02fc45..1dc8b6fbd 100644 --- a/engine/overworld/npc_movement.asm +++ b/engine/overworld/npc_movement.asm @@ -274,7 +274,7 @@ WillObjectBumpIntoSomeoneElse: ld e, [hl] jr IsNPCAtCoord -Unreferenced_Function7015: +Function7015: ; unreferenced ldh a, [hMapObjectIndexBuffer] call GetObjectStruct call .CheckWillBeFacingNPC @@ -473,7 +473,7 @@ IsObjectMovingOffEdgeOfScreen: scf ret -Unreferenced_Function7113: +Function7113: ; unreferenced ld a, [wPlayerStandingMapX] ld d, a ld a, [wPlayerStandingMapY] diff --git a/engine/pokedex/pokedex_2.asm b/engine/pokedex/pokedex_2.asm index 2757d26fc..38282d174 100644 --- a/engine/pokedex/pokedex_2.asm +++ b/engine/pokedex/pokedex_2.asm @@ -214,8 +214,7 @@ DisplayDexEntry: call FarString ret -UnreferencedPOKeString: -; unused +POKeString: ; unreferenced db "#@" GetDexEntryPointer: diff --git a/engine/pokegear/pokegear.asm b/engine/pokegear/pokegear.asm index d2d2d61f9..05700fa2d 100644 --- a/engine/pokegear/pokegear.asm +++ b/engine/pokegear/pokegear.asm @@ -1693,7 +1693,7 @@ LoadStation_EvolutionRadio: ld de, UnownStationName ret -Unreferenced_LoadStation: +DummyLoadStation: ; unreferenced ret RadioMusicRestartDE: @@ -2813,7 +2813,7 @@ INCBIN "gfx/pokegear/dexmap_nest_icon.2bpp" FlyMapLabelBorderGFX: INCBIN "gfx/pokegear/flymap_label_border.1bpp" -Unreferenced_Function92311: +Function92311: xor a ld [wTownMapPlayerIconLandmark], a call ClearBGPalettes diff --git a/engine/pokemon/bills_pc.asm b/engine/pokemon/bills_pc.asm index 93fbeab8d..5992beab4 100644 --- a/engine/pokemon/bills_pc.asm +++ b/engine/pokemon/bills_pc.asm @@ -239,7 +239,7 @@ BillsPCDepositMenuHeader: db "RELEASE@" db "CANCEL@" -Unreferenced_BillsPCClearThreeBoxes: +BillsPCClearThreeBoxes: ; unreferenced hlcoord 0, 0 ld b, 4 ld c, 8 @@ -1540,7 +1540,7 @@ endr dbsprite 19, 4, 0, 7, $07, 0 db -1 -Unreferenced_BillsPC_FillBox: +BillsPC_FillBox: ; unreferenced .row push bc push hl diff --git a/engine/pokemon/bills_pc_top.asm b/engine/pokemon/bills_pc_top.asm index 71e65186a..757b977c5 100644 --- a/engine/pokemon/bills_pc_top.asm +++ b/engine/pokemon/bills_pc_top.asm @@ -139,7 +139,7 @@ BillsPC_DepositMenu: and a ret -Unreferenced_Functione512: +Functione512: ; unreferenced ld a, [wPartyCount] and a jr z, .no_mon @@ -206,7 +206,7 @@ BillsPC_WithdrawMenu: and a ret -Unreferenced_Functione56d: +Functione56d: ; unreferenced ld a, [wPartyCount] cp PARTY_LENGTH jr nc, .party_full @@ -261,7 +261,7 @@ CopyBoxmonToTempMon: call CloseSRAM ret -Unreferenced_LoadBoxMonListing: +LoadBoxMonListing: ; unreferenced ld a, [wCurBox] cp b jr z, .same_box diff --git a/engine/pokemon/breeding.asm b/engine/pokemon/breeding.asm index a545d9ab9..fce75963c 100644 --- a/engine/pokemon/breeding.asm +++ b/engine/pokemon/breeding.asm @@ -943,7 +943,7 @@ DayCareMonCompatibilityText: text_far _BreedShowsInterestText text_end -Unreferenced_DayCareMonPrintEmptyString: +DayCareMonPrintEmptyString: ; unreferenced ld hl, .string ret diff --git a/engine/pokemon/correct_party_errors.asm b/engine/pokemon/correct_party_errors.asm index 717893b36..4e7d1cabe 100644 --- a/engine/pokemon/correct_party_errors.asm +++ b/engine/pokemon/correct_party_errors.asm @@ -1,4 +1,4 @@ -Unreferenced_CorrectPartyErrors: +CorrectPartyErrors: ; unreferenced ld hl, wPartyCount ld a, [hl] and a diff --git a/engine/pokemon/mail_2.asm b/engine/pokemon/mail_2.asm index 7114569fb..4879ca7d4 100644 --- a/engine/pokemon/mail_2.asm +++ b/engine/pokemon/mail_2.asm @@ -709,7 +709,7 @@ MailGFX_PlaceMessage: .place_author jp PlaceString -Unreferenced_Functionb984e: +Functionb984e: ; unreferenced .loop ld a, [hl] xor $ff diff --git a/engine/pokemon/mon_menu.asm b/engine/pokemon/mon_menu.asm index c785a098e..c8d35a59f 100644 --- a/engine/pokemon/mon_menu.asm +++ b/engine/pokemon/mon_menu.asm @@ -626,7 +626,7 @@ MonMenu_Fly: ld a, $0 ret -.Unreferenced: +.NoReload: ; unreferenced ld a, $1 ret diff --git a/engine/pokemon/mon_stats.asm b/engine/pokemon/mon_stats.asm index e32bf7160..418ca8554 100644 --- a/engine/pokemon/mon_stats.asm +++ b/engine/pokemon/mon_stats.asm @@ -323,7 +323,7 @@ ListMovePP: jr nz, .load_loop ret -Unreferenced_Function50cd0: +Function50cd0: ; unreferenced .loop ld [hl], $32 ; typo for P? inc hl diff --git a/engine/pokemon/stats_screen.asm b/engine/pokemon/stats_screen.asm index 3a150c434..e7fc4f8b2 100644 --- a/engine/pokemon/stats_screen.asm +++ b/engine/pokemon/stats_screen.asm @@ -446,7 +446,7 @@ StatsScreen_InitUpperHalf: dw sBoxMonNicknames dw wBufferMonNick -Unreferenced_Function4df7f: +Function4df7f: ; unreferenced hlcoord 7, 0 ld bc, SCREEN_WIDTH ld d, SCREEN_HEIGHT @@ -944,7 +944,7 @@ StatsScreen_LoadTextboxSpaceGFX: pop hl ret -Unreferenced_StatsScreenSpaceGFX: +StatsScreenSpaceGFX: ; unreferenced INCBIN "gfx/font/space.2bpp" EggStatsScreen: diff --git a/engine/printer/printer.asm b/engine/printer/printer.asm index 1cba451e7..19888ee9a 100644 --- a/engine/printer/printer.asm +++ b/engine/printer/printer.asm @@ -575,7 +575,7 @@ PlacePrinterStatusString: ld [wPrinterStatus], a ret -Unreferenced_Function847bd: +Function847bd: ; unreferenced ld a, [wPrinterStatus] and a ret z diff --git a/engine/rtc/print_hours_mins.asm b/engine/rtc/print_hours_mins.asm index 6dd8daf18..2cc6cc326 100644 --- a/engine/rtc/print_hours_mins.asm +++ b/engine/rtc/print_hours_mins.asm @@ -1,4 +1,4 @@ -Unreferenced_Function1dd6a9: +Function1dd6a9: ; unreferenced ld a, b ld b, c ld c, a diff --git a/engine/rtc/restart_clock.asm b/engine/rtc/restart_clock.asm index 5dc987189..15b1fd135 100644 --- a/engine/rtc/restart_clock.asm +++ b/engine/rtc/restart_clock.asm @@ -206,8 +206,7 @@ RestartClock: ld [wBuffer2], a ret -.unreferenced -; unused +.UnusedPlaceCharsFragment: ; unreferenced ld a, [wBuffer3] ld b, a call Coord2Tile @@ -227,10 +226,8 @@ RestartClock: ld [hl], e ret -UnreferencedString_HourJP: -; unused +JPHourString: ; unreferenced db "じ@" ; HR -UnreferencedString_MinuteJP: -; unused +JPMinuteString: ; unreferenced db "ふん@" ; MIN diff --git a/engine/rtc/rtc.asm b/engine/rtc/rtc.asm index eb39adb76..d4d7a1ef3 100644 --- a/engine/rtc/rtc.asm +++ b/engine/rtc/rtc.asm @@ -1,4 +1,4 @@ -Unreferenced_StopRTC: +StopRTC: ; unreferenced ld a, SRAM_ENABLE ld [MBC3SRamEnable], a call LatchClock @@ -54,7 +54,7 @@ TimesOfDay: db MAX_HOUR, NITE_F db -1, MORN_F -Unreferenced_1404e: +BetaTimesOfDay: ; unreferenced db 20, NITE_F db 40, MORN_F db 60, DAY_F diff --git a/engine/rtc/timeset.asm b/engine/rtc/timeset.asm index 5b12aec1f..c511827b0 100644 --- a/engine/rtc/timeset.asm +++ b/engine/rtc/timeset.asm @@ -196,7 +196,7 @@ DisplayHourOClock: pop hl ret -UnreferencedFunction907f1: +Function907f1: ; unreferenced ld h, d ld l, e push hl @@ -593,7 +593,7 @@ InitialClearDSTFlag: text_far _TimeAskOkayText text_end -Unreferenced_MrChrono: +MrChrono: ; unreferenced hlcoord 1, 14 lb bc, 3, SCREEN_WIDTH - 2 call ClearBox diff --git a/gfx/sgb/blk_packets.asm b/gfx/sgb/blk_packets.asm index 9c4bcb6ed..d25c5e22c 100644 --- a/gfx/sgb/blk_packets.asm +++ b/gfx/sgb/blk_packets.asm @@ -59,7 +59,7 @@ BlkPacket_SlotMachine: attr_blk_data %011, 0,0,0, 04,04, 15,09 ; slot reels: pal 0 attr_blk_data %011, 0,0,0, 00,12, 19,17 ; text box: pal 0 -UnreferencedBlkPacket_9b26: +BlkPacket_PartyMenu: ; unreferenced attr_blk 7 attr_blk_data %111, 0,0,1, 00,00, 02,12 attr_blk_data %010, 0,0,0, 12,00, 18,01 diff --git a/gfx/sgb/pal_packets.asm b/gfx/sgb/pal_packets.asm index a596d1dc6..5085f9194 100644 --- a/gfx/sgb/pal_packets.asm +++ b/gfx/sgb/pal_packets.asm @@ -34,7 +34,7 @@ PalPacket_9bd6: PalPacket_GSIntroShellderLapras: sgb_pal_set GS_INTRO_SHELLDER_LAPRAS, ROUTES, ROUTES, ROUTES -UnreferencedPalPacket_BetaIntroLapras: +PalPacket_BetaIntroLapras: ; unreferenced sgb_pal_set BETA_INTRO_LAPRAS, ROUTES, ROUTES, ROUTES PalPacket_GSIntroJigglypuffPikachu: @@ -61,7 +61,7 @@ PalPacket_BattleGrayscale: PalPacket_Pokegear: sgb_pal_set POKEGEAR, ROUTES, ROUTES, ROUTES -UnreferencedPalPacket_9c86: +PalPacket_9c86: ; unreferenced sgb_pal_set PACK, ROUTES, ROUTES, ROUTES PalPacket_SlotMachine: diff --git a/gfx/tileset_palette_maps.asm b/gfx/tileset_palette_maps.asm index b423c4c45..bbe1ccad4 100644 --- a/gfx/tileset_palette_maps.asm +++ b/gfx/tileset_palette_maps.asm @@ -108,5 +108,8 @@ INCLUDE "gfx/tilesets/battle_tower_inside_palette_map.asm" TilesetBattleTowerOutsidePalMap: INCLUDE "gfx/tilesets/battle_tower_outside_palette_map.asm" -Unreferenced_MapGroupPalettes: - ds NUM_MAP_GROUPS, PAL_BG_ROOF +MapGroupPalettes: ; unreferenced +; entries correspond to GROUP_* constants +rept NUM_MAP_GROUPS + db PAL_BG_ROOF +endr diff --git a/home/audio.asm b/home/audio.asm index 87faf814d..7448de022 100644 --- a/home/audio.asm +++ b/home/audio.asm @@ -467,7 +467,7 @@ GetMapMusic_MaybeSpecial:: call GetMapMusic ret -Unreferenced_Function3d9f:: +Function3d9f:: ; unreferenced ; Places a BCD number at the ; upper center of the screen. ld a, 4 * TILE_WIDTH diff --git a/home/battle.asm b/home/battle.asm index d7e81f8a3..da9c081a2 100644 --- a/home/battle.asm +++ b/home/battle.asm @@ -15,7 +15,7 @@ GetPartyLocation:: ld bc, PARTYMON_STRUCT_LENGTH jp AddNTimes -Unreferenced_GetDexNumber:: +GetDexNumber:: ; unreferenced ; Probably used in gen 1 to convert index number to dex number ; Not required in gen 2 because index number == dex number push hl diff --git a/home/fade.asm b/home/fade.asm index 6af6ae08b..5a02cddec 100644 --- a/home/fade.asm +++ b/home/fade.asm @@ -1,7 +1,6 @@ ; Functions to fade the screen in and out. -Unreferenced_Function48c:: -; TimeOfDayFade +TimeOfDayFade:: ; unreferenced ld a, [wTimeOfDayPal] ld b, a ld hl, IncGradGBPalTable_11 diff --git a/home/flag.asm b/home/flag.asm index 125c2a434..76e08e260 100644 --- a/home/flag.asm +++ b/home/flag.asm @@ -102,7 +102,7 @@ CheckReceivedDex:: and a ret -Unreferenced_CheckBPressedDebug:: +CheckBPressedDebug:: ; unreferenced ; Used in debug ROMs to walk through walls and avoid encounters. ld a, [wDebugFlags] @@ -122,7 +122,7 @@ xor_a_dec_a:: dec a ret -Unreferenced_CheckFieldDebug:: +CheckFieldDebug:: ; unreferenced push hl ld hl, wDebugFlags bit DEBUG_FIELD_F, [hl] diff --git a/home/gfx.asm b/home/gfx.asm index a0f12c659..01598a95b 100644 --- a/home/gfx.asm +++ b/home/gfx.asm @@ -32,7 +32,7 @@ FarCopyBytesDouble_DoubleBankSwitch:: rst Bankswitch ret -Unreferenced_DMATransfer: +SafeHDMATransfer: ; unreferenced dec c ldh a, [hBGMapMode] push af diff --git a/home/header.asm b/home/header.asm index 2e8c58949..a450c072d 100644 --- a/home/header.asm +++ b/home/header.asm @@ -47,7 +47,7 @@ SECTION "lcd", ROM0[$0048] jp LCD SECTION "timer", ROM0[$0050] - jp Timer + jp MobileTimer SECTION "serial", ROM0[$0058] jp Serial diff --git a/home/lcd.asm b/home/lcd.asm index 1d6671117..b78f1d13a 100644 --- a/home/lcd.asm +++ b/home/lcd.asm @@ -1,6 +1,6 @@ ; LCD handling -Unreferenced_Function547:: +Function547:: ; unreferenced ldh a, [hLCDCPointer] cp LOW(rSCX) ret nz diff --git a/home/map.asm b/home/map.asm index 91c052a90..927c705db 100644 --- a/home/map.asm +++ b/home/map.asm @@ -368,8 +368,7 @@ CheckIndoorMap:: cp GATE ret -; unused -UnreferencedCheckEnvironment:: +CheckUnknownMap:: ; unreferenced cp INDOOR ret z cp GATE @@ -1313,7 +1312,7 @@ UpdateBGMapColumn:: ldh [hBGMapTileCount], a ret -Unreferenced_Function2816:: +Function2816:: ; unreferenced ld hl, wBGMapBuffer ld bc, wBGMapBufferEnd - wBGMapBuffer xor a @@ -1904,7 +1903,7 @@ CloseSubmenu:: call ReloadTilesetAndPalettes call UpdateSprites call Call_ExitMenu - call ret_d90 + call GSReloadPalettes jr FinishExitMenu ExitAllMenus:: @@ -1912,7 +1911,7 @@ ExitAllMenus:: call Call_ExitMenu call ReloadTilesetAndPalettes call UpdateSprites - call ret_d90 + call GSReloadPalettes FinishExitMenu:: ld b, SCGB_MAPPALS call GetSGBLayout diff --git a/home/map_objects.asm b/home/map_objects.asm index 667658f0c..94a33f032 100644 --- a/home/map_objects.asm +++ b/home/map_objects.asm @@ -362,7 +362,7 @@ CopyPlayerObjectTemplate:: call CopyBytes ret -Unreferenced_Function19b8: +Function19b8: ; unreferenced call GetMapObject ld hl, MAPOBJECT_OBJECT_STRUCT_ID add hl, bc @@ -574,12 +574,12 @@ _GetMovementByte:: ld a, h ret -UnreferencedSetVramState_Bit0:: +SetVramState_Bit0:: ; unreferenced ld hl, wVramState set 0, [hl] ret -UnreferencedResetVramState_Bit0:: +ResetVramState_Bit0:: ; unreferenced ld hl, wVramState res 0, [hl] ret diff --git a/home/math.asm b/home/math.asm index c99214cce..8e9501633 100644 --- a/home/math.asm +++ b/home/math.asm @@ -48,7 +48,7 @@ Divide:: pop hl ret -UnreferencedSubtractAbsolute:: +SubtractAbsolute:: ; unreferenced ; Return |a - b|, sign in carry. sub b ret nc diff --git a/home/menu.asm b/home/menu.asm index c53459c00..1ee95f181 100644 --- a/home/menu.asm +++ b/home/menu.asm @@ -417,7 +417,7 @@ YesNoBox:: PlaceYesNoBox:: jr _YesNoBox -UnreferencedPlaceGenericTwoOptionBox:: +PlaceGenericTwoOptionBox:: ; unreferenced call LoadMenuHeader jr InterpretTwoOptionMenu @@ -719,7 +719,7 @@ PlaceNthMenuStrings:: call PlaceString ret -Unreferenced_Function1f9e:: +Function1f9e:: ; unreferenced call GetMenuDataPointerTableEntry inc hl inc hl diff --git a/home/mobile.asm b/home/mobile.asm index 9597372fb..6cab585fa 100644 --- a/home/mobile.asm +++ b/home/mobile.asm @@ -65,7 +65,7 @@ MobileReceive:: ret -Timer:: +MobileTimer:: push af push bc push de @@ -89,11 +89,11 @@ Timer:: ld a, [$c822] bit 1, a - jr nz, .skip_Timer + jr nz, .skip_timer ldh a, [rSC] and 1 << rSC_ON - jr nz, .skip_Timer + jr nz, .skip_timer ldh a, [hROMBank] push af @@ -108,7 +108,7 @@ Timer:: ld [$c981], a rst Bankswitch -.skip_Timer +.skip_timer ldh a, [rTMA] ldh [rTIMA], a @@ -122,7 +122,7 @@ Timer:: pop af reti -Unreferenced_Function3ed7:: +Function3ed7:: ; unreferenced ld [$dc02], a ldh a, [hROMBank] push af @@ -152,7 +152,7 @@ Function3eea:: call MobileHome_PlaceBox ret -Unreferenced_Function3efd:: +Function3efd:: ; unreferenced push hl hlcoord 0, 12 ld b, 4 diff --git a/home/palettes.asm b/home/palettes.asm index 4eeab5aa1..528c273f8 100644 --- a/home/palettes.asm +++ b/home/palettes.asm @@ -301,7 +301,7 @@ ClearVBank1:: ldh [rVBK], a ret -ret_d90:: +GSReloadPalettes:: ; dummied out ret ReloadSpritesNoPalettes:: diff --git a/home/pokemon.asm b/home/pokemon.asm index edf17e7af..82fc92bdc 100644 --- a/home/pokemon.asm +++ b/home/pokemon.asm @@ -234,7 +234,7 @@ Print8BitNumLeftAlign:: ld b, PRINTNUM_LEFTALIGN | 1 jp PrintNum -Unreferenced_GetNthMove:: +GetNthMove:: ; unreferenced ld hl, wListMoves_MoveIndicesBuffer ld c, a ld b, 0 diff --git a/home/region.asm b/home/region.asm index 185f5ed25..4b303e396 100644 --- a/home/region.asm +++ b/home/region.asm @@ -31,5 +31,5 @@ IsInJohto:: ld a, KANTO_REGION ret -ret_2f3e:: +Function2f3e:: ; dummied out ret diff --git a/home/serial.asm b/home/serial.asm index d1b67f9b2..9b595db81 100644 --- a/home/serial.asm +++ b/home/serial.asm @@ -388,7 +388,7 @@ LinkDataReceived:: ldh [rSC], a ret -Unreferenced_Function919:: +Function919:: ; unreferenced ld a, [wLinkMode] and a ret nz diff --git a/home/text.asm b/home/text.asm index abbf12c41..c8b23d5b3 100644 --- a/home/text.asm +++ b/home/text.asm @@ -128,8 +128,8 @@ SpeechTextbox:: ld c, TEXTBOX_INNERW jp Textbox -UnreferencedTestText:: - text "ゲームフりーク!" +GameFreakText:: ; unreferenced + text "ゲームフりーク!" ; "GAMEFREAK!" done RadioTerminator:: @@ -712,10 +712,7 @@ TextCommands:: dw TextCommand_FAR ; TX_FAR TextCommand_START:: -; text_start ; write text until "@" -; [$00]["...@"] - ld d, h ld e, l ld h, b @@ -727,11 +724,7 @@ TextCommand_START:: ret TextCommand_RAM:: -; text_ram -; write text from a ram address -; little endian -; [$01][addr] - +; write text from a ram address (little endian) ld a, [hli] ld e, a ld a, [hli] @@ -744,11 +737,7 @@ TextCommand_RAM:: ret TextCommand_FAR:: -; text_far -; write text from a different bank -; little endian -; [$16][addr][bank] - +; write text from a different bank (little endian) ldh a, [hROMBank] push af @@ -773,11 +762,7 @@ TextCommand_FAR:: ret TextCommand_BCD:: -; text_bcd ; write bcd from address, typically ram -; [$02][addr][flags] -; flags: see PrintBCDNumber - ld a, [hli] ld e, a ld a, [hli] @@ -794,10 +779,7 @@ TextCommand_BCD:: ret TextCommand_MOVE:: -; text_move ; move to a new tile -; [$03][addr] - ld a, [hli] ld [wMenuScrollPosition + 2], a ld c, a @@ -807,11 +789,7 @@ TextCommand_MOVE:: ret TextCommand_BOX:: -; text_box -; draw a box -; little endian -; [$04][addr][height][width] - +; draw a box (height, width) ld a, [hli] ld e, a ld a, [hli] @@ -828,19 +806,12 @@ TextCommand_BOX:: ret TextCommand_LOW:: -; text_low ; write text at (1,16) -; [$05] - bccoord TEXTBOX_INNERX, TEXTBOX_INNERY + 2 ret TextCommand_PROMPT_BUTTON:: -; text_promptbutton -; wait for button press -; show arrow -; [06] - +; wait for button press; show arrow ld a, [wLinkMode] cp LINK_COLOSSEUM jp z, TextCommand_LINK_PROMPT_BUTTON @@ -857,7 +828,6 @@ TextCommand_PROMPT_BUTTON:: ret TextCommand_SCROLL:: -; text_scroll ; pushes text up two lines and sets the BC cursor to the border tile ; below the first character column of the text box. push hl @@ -869,8 +839,7 @@ TextCommand_SCROLL:: ret TextCommand_START_ASM:: -; text_asm - +; run assembly code bit 7, h jr nz, .not_rom jp hl @@ -881,8 +850,7 @@ TextCommand_START_ASM:: ret TextCommand_NUM:: -; text_decimal -; [$09][addr][hi:bytes lo:digits] +; print a number ld a, [hli] ld e, a ld a, [hli] @@ -906,7 +874,7 @@ TextCommand_NUM:: ret TextCommand_PAUSE:: -; text_pause +; wait for button press or 30 frames push hl push bc call GetJoypad @@ -921,10 +889,7 @@ TextCommand_PAUSE:: ret TextCommand_SOUND:: -; chars: -; $0b, $0e, $0f, $10, $11, $12, $13 -; see TextSFX - +; play a sound effect from TextSFX push bc dec hl ld a, [hli] @@ -955,8 +920,8 @@ TextCommand_SOUND:: pop bc ret -Unreferenced_Function1522:: -; sound_cry +TextCommand_CRY:: ; unreferenced +; play a pokemon cry push de ld e, [hl] inc hl @@ -978,8 +943,7 @@ TextSFX:: db -1 TextCommand_DOTS:: -; text_dots -; [$0C][num] +; wait for button press or 30 frames while printing "…"s ld a, [hli] ld d, a push hl @@ -1007,9 +971,7 @@ TextCommand_DOTS:: ret TextCommand_LINK_PROMPT_BUTTON:: -; text_linkpromptbutton -; wait for key down -; display arrow +; wait for button press; display arrow push hl push bc call PromptButton @@ -1018,7 +980,6 @@ TextCommand_LINK_PROMPT_BUTTON:: ret TextCommand_STRINGBUFFER:: -; text_buffer ; Print a string from one of the following: ; 0: wStringBuffer3 ; 1: wStringBuffer4 @@ -1027,8 +988,6 @@ TextCommand_STRINGBUFFER:: ; 4: wStringBuffer1 ; 5: wEnemyMonNick ; 6: wBattleMonNick -; [$14][id] - ld a, [hli] push hl ld e, a @@ -1047,8 +1006,7 @@ TextCommand_STRINGBUFFER:: ret TextCommand_DAY:: -; text_today - +; print the day of the week call GetWeekday push hl push bc diff --git a/home/time.asm b/home/time.asm index 206d6dce4..0b51dea79 100644 --- a/home/time.asm +++ b/home/time.asm @@ -1,11 +1,11 @@ ; Functions relating to the timer interrupt and the real-time-clock. -Unreferenced_Timer:: +Timer:: ; unreferenced push af ldh a, [hMobile] and a jr z, .not_mobile - call Timer + call MobileTimer .not_mobile pop af @@ -256,7 +256,7 @@ SetClock:: call CloseSRAM ; unlatch clock, disable clock r/w ret -UnreferencedClearRTCStatus:: +ClearRTCStatus:: ; unreferenced ; clear sRTCStatusFlags xor a push af diff --git a/home/trainers.asm b/home/trainers.asm index cff804c96..eac8101e8 100644 --- a/home/trainers.asm +++ b/home/trainers.asm @@ -203,7 +203,7 @@ FacingPlayerDistance:: and a ret -UnreferencedCheckTrainerFlag:: +CheckTrainerFlag:: ; unreferenced push bc ld hl, OBJECT_MAP_OBJECT_INDEX add hl, bc diff --git a/lib/mobile/main.asm b/lib/mobile/main.asm index fa0ecfbcd..10e956cf8 100644 --- a/lib/mobile/main.asm +++ b/lib/mobile/main.asm @@ -9414,7 +9414,7 @@ Function113eb8: res 0, [hl] jp Function111f97 -Unreferenced_Function113ec7: +Function113ec7: ; unreferenced ld hl, $c822 ld a, [hl] push af diff --git a/main.asm b/main.asm index 49fc676ae..f90fad682 100644 --- a/main.asm +++ b/main.asm @@ -250,7 +250,7 @@ INCLUDE "engine/events/basement_key.asm" INCLUDE "engine/events/sacred_ash.asm" INCLUDE "engine/pokemon/tempmon.asm" INCLUDE "engine/pokemon/types.asm" -INCLUDE "engine/battle/unreferenced_getgen1trainerclassname.asm" +INCLUDE "engine/battle/getgen1trainerclassname.asm" INCLUDE "engine/pokemon/mon_stats.asm" INCLUDE "engine/link/init_list.asm" INCLUDE "engine/pokemon/experience.asm" diff --git a/maps/BattleTower1F.asm b/maps/BattleTower1F.asm index a405783ea..a0f27d74d 100644 --- a/maps/BattleTower1F.asm +++ b/maps/BattleTower1F.asm @@ -154,7 +154,7 @@ Script_BattleTowerHopeToServeYouAgain: closetext end -UnreferencedScript_0x9e4b6: +Script_MobileError2: ; unreferenced special BattleTowerMobileError closetext end @@ -164,7 +164,7 @@ Script_WaitButton: closetext end -UnreferencedScript_0x9e4be: +Script_ChooseChallenge2: ; unreferenced writetext Text_SaveBeforeEnteringBattleRoom yesorno iffalse Script_Menu_ChallengeExplanationCancel @@ -183,7 +183,7 @@ UnreferencedScript_0x9e4be: closetext end -UnreferencedScript_0x9e4ea: +Script_StartChallenge: ; unreferenced setval BATTLETOWERACTION_LEVEL_CHECK special BattleTowerAction ifnotequal $0, Script_AMonLevelExceeds @@ -196,11 +196,11 @@ UnreferencedScript_0x9e4ea: special BattleTowerAction ifequal $0, .zero writetext Text_CantBeRegistered_PreviousRecordDeleted - sjump continue + sjump .continue .zero writetext Text_CantBeRegistered -continue: +.continue yesorno iffalse Script_Menu_ChallengeExplanationCancel writetext Text_SaveBeforeReentry @@ -218,7 +218,7 @@ continue: waitbutton sjump Script_ResumeBattleTowerChallenge -UnreferencedScript_0x9e53b: +Script_ReachedBattleLimit: ; unreferenced writetext Text_FiveDayBattleLimit_Mobile waitbutton sjump Script_BattleTowerHopeToServeYouAgain diff --git a/maps/BattleTowerBattleRoom.asm b/maps/BattleTowerBattleRoom.asm index 8d05ee828..0b0cc3cb1 100644 --- a/maps/BattleTowerBattleRoom.asm +++ b/maps/BattleTowerBattleRoom.asm @@ -110,7 +110,7 @@ Script_BeatenAllTrainers2: writetext Text_CongratulationsYouveBeatenAllTheTrainers sjump Script_GivePlayerHisPrize -UnreferencedScript_0x9f4eb: +Script_TooMuchTimeElapsedNoRegister: ; unreferenced setval BATTLETOWERACTION_CHALLENGECANCELED special BattleTowerAction opentext @@ -119,7 +119,7 @@ UnreferencedScript_0x9f4eb: closetext end -UnreferencedScript_0x9f4f7: +Script_ChallengeCanceled: ; unreferenced setval BATTLETOWERACTION_CHALLENGECANCELED special BattleTowerAction setval BATTLETOWERACTION_06 diff --git a/maps/FastShipCabins_SE_SSE_CaptainsCabin.asm b/maps/FastShipCabins_SE_SSE_CaptainsCabin.asm index 00d7af45c..84adc5975 100644 --- a/maps/FastShipCabins_SE_SSE_CaptainsCabin.asm +++ b/maps/FastShipCabins_SE_SSE_CaptainsCabin.asm @@ -16,7 +16,7 @@ FastShipCabins_SE_SSE_CaptainsCabin_MapScripts: db 0 ; callbacks -.UnreferencedDummyScene: +.DummyScene: ; unreferenced end SSAquaCaptain: diff --git a/maps/GoldenrodBikeShop.asm b/maps/GoldenrodBikeShop.asm index c4a05e3fa..06f2d0e67 100644 --- a/maps/GoldenrodBikeShop.asm +++ b/maps/GoldenrodBikeShop.asm @@ -6,7 +6,7 @@ GoldenrodBikeShop_MapScripts: db 0 ; callbacks -.UnreferencedDummyScene: +.DummyScene: ; unreferenced end GoldenrodBikeShopClerkScript: diff --git a/maps/Route32.asm b/maps/Route32.asm index fe57225eb..33219612e 100644 --- a/maps/Route32.asm +++ b/maps/Route32.asm @@ -57,7 +57,7 @@ Route32CooltrainerMContinueScene: closetext end -.Unreferenced: +.GoToSproutTower: ; unreferenced writetext Route32CooltrainerMText_UnusedSproutTower waitbutton closetext diff --git a/mobile/fixed_words.asm b/mobile/fixed_words.asm index a1c0192f5..3b4c0878d 100644 --- a/mobile/fixed_words.asm +++ b/mobile/fixed_words.asm @@ -31,7 +31,7 @@ Function11c075: call Function11c08f ret -Unreferenced_Function11c082: +Function11c082: ; unreferenced push de ld a, c call Function11c254 diff --git a/mobile/mobile_12.asm b/mobile/mobile_12.asm index 35a45c116..0bf26b8ee 100644 --- a/mobile/mobile_12.asm +++ b/mobile/mobile_12.asm @@ -1598,7 +1598,7 @@ Function48c63: scf ret -Unreferenced_Function48c8e: +Function48c8e: ; unreferenced ld hl, wd019 + $11 ld d, h ld e, l diff --git a/mobile/mobile_40.asm b/mobile/mobile_40.asm index 3a3519883..1b93c8985 100644 --- a/mobile/mobile_40.asm +++ b/mobile/mobile_40.asm @@ -2925,7 +2925,7 @@ Function1013dd: call CGBOnly_CopyTilemapAtOnce ret -Unreferenced_Function1013e1: +Function1013e1: ; unreferenced push de inc de ld b, a @@ -2960,7 +2960,7 @@ Function1013f5: jr nz, .asm_1013f9 ret -Unreferenced_Function101400: +Function101400: ; unreferenced ld a, [de] inc de cp [hl] @@ -3135,7 +3135,7 @@ Function101507: ld [wMobileCommsJumptableIndex], a ret -Unreferenced_Function10151d: +Function10151d: ; unreferenced ld a, $34 call Function3e32 ld a, [wMobileCommsJumptableIndex] @@ -3312,7 +3312,7 @@ Function101663: call MobileCopyTransferData2 ret -Unreferenced_Function101674: +Function101674: ; unreferenced ld a, BANK(w5_dc00) ld hl, w5_dc00 call MobileCopyTransferData @@ -4146,7 +4146,7 @@ Function101cbc: ld [wcd2b], a ret -Unreferenced_Function101cc2: +Function101cc2: ; unreferenced ld a, $02 ld [wcd2b], a ret @@ -4407,14 +4407,14 @@ Function101e64: ld [wcd2b], a ret -Unreferenced_Function101e82: +Function101e82: ; unreferenced call Function101ecc ld a, [wMobileCommsJumptableIndex] inc a ld [wMobileCommsJumptableIndex], a ret -Unreferenced_Function101e8d: +Function101e8d: ; unreferenced call Function101ed3 ld a, [wMobileCommsJumptableIndex] inc a @@ -6123,7 +6123,7 @@ Function102b4e: ld [w2DMenuNumRows], a ret -Unreferenced_Function102b68: +Function102b68: ; unreferenced xor a ld hl, wWindowStackPointer ld bc, $10 diff --git a/mobile/mobile_41.asm b/mobile/mobile_41.asm index c38bd9fc2..8dc755368 100644 --- a/mobile/mobile_41.asm +++ b/mobile/mobile_41.asm @@ -245,7 +245,7 @@ StubbedTrainerRankings_StepCount: ld hl, sTrainerRankingStepCount jp StubbedTrainerRankings_Increment4Byte -Unreferenced_StubbedTrainerRankings_BattleTowerWins: +StubbedTrainerRankings_BattleTowerWins: ; unreferenced ret ld a, BANK(s5_aa8d) call OpenSRAM @@ -537,7 +537,7 @@ RestoreMobileEventIndex: call CloseSRAM ret -Unreferenced_VerifyTrainerRankingsChecksum: +VerifyTrainerRankingsChecksum: ; unreferenced call CalculateTrainerRankingsChecksum ld hl, sTrainerRankingsChecksum ld a, d diff --git a/mobile/mobile_46.asm b/mobile/mobile_46.asm index c89041deb..d5c331cb9 100644 --- a/mobile/mobile_46.asm +++ b/mobile/mobile_46.asm @@ -1502,7 +1502,7 @@ IndexDownloadURL: popc -Unreferenced_Function118d35: +Function118d35: ; unreferenced ld hl, $d200 ld a, [wcd38] and a @@ -3889,8 +3889,8 @@ Strings_Ll0ToL40: db " L:30 @@" db " L:40 @@" db "CANCEL@@" - -Unreferenced_CancelString: + +BattleTowerCancelString: ; unreferenced db "CANCEL@" BattleTower_LevelCheck: @@ -5392,7 +5392,7 @@ Function11a9ce: call Call_ExitMenu farcall Stubbed_Function106462 farcall Function106464 - call ret_d90 + call GSReloadPalettes farcall FinishExitMenu call UpdateSprites ret @@ -6695,7 +6695,7 @@ Function11b397: inc de jr .loop -Unreferenced_Function11b3b6: +Function11b3b6: ; unreferenced .loop ld a, [hl] cp -1 diff --git a/mobile/mobile_5b.asm b/mobile/mobile_5b.asm index 8fb96d7d8..2598fc39e 100644 --- a/mobile/mobile_5b.asm +++ b/mobile/mobile_5b.asm @@ -1,4 +1,4 @@ -Unreferenced_Function16c000: +Function16c000: ; unreferenced ; Only for CGB ldh a, [hCGB] and a diff --git a/mobile/news/news.asm b/mobile/news/news.asm index 130ff048e..8f31e5755 100644 --- a/mobile/news/news.asm +++ b/mobile/news/news.asm @@ -2,7 +2,7 @@ dab Doll1Script ; related to "My Room" in Stadium 2? -Unreferenced_Function1f4003: +Function1f4003: ; unreferenced ld a, BANK(s6_a000) call OpenSRAM ld hl, .news_data @@ -15,7 +15,7 @@ Unreferenced_Function1f4003: .news_data INCBIN "mobile/news/news_1.bin" -Unreferenced_Function1f4dbe: +Function1f4dbe: ; unreferenced ld a, BANK(s6_a000) call OpenSRAM ld hl, .news_data diff --git a/wram.asm b/wram.asm index f353f6171..ac2101b08 100644 --- a/wram.asm +++ b/wram.asm @@ -2053,6 +2053,7 @@ wWhichHPBar:: ; 1: Player ; 2: Party Menu db + wPokemonWithdrawDepositParameter:: ; 0: Take from PC ; 1: Put into PC @@ -2077,7 +2078,9 @@ wItemAttributeParamBuffer:: db wCurPartyLevel:: db -wScrollingMenuListSize:: dw +wScrollingMenuListSize:: db + + ds 1 ; used when following a map warp wNextWarp:: db @@ -2409,6 +2412,7 @@ wScriptTextAddr:: ds 1 wWildEncounterCooldown:: db wXYComparePointer:: dw + ds 4 wBattleScriptFlags:: dw @@ -2422,14 +2426,20 @@ wPlayerSpriteSetupFlags:: wMapReentryScriptQueueFlag:: db wMapReentryScriptBank:: db wMapReentryScriptAddress:: dw + ds 4 + wTimeCyclesSinceLastCall:: db wReceiveCallDelay_MinsRemaining:: db wReceiveCallDelay_StartTime:: ds 3 + ds 3 + wBugContestMinsRemaining:: db wBugContestSecsRemaining:: db + ds 2 + wMapStatusEnd:: ds 2 @@ -2452,8 +2462,7 @@ wd479:: ds 2 wGameData:: wPlayerData:: -wPlayerID:: - dw +wPlayerID:: dw wPlayerName:: ds NAME_LENGTH wMomsName:: ds NAME_LENGTH