From c3c18dd19643ea48170bb3d0c5be5c9fe16e473e Mon Sep 17 00:00:00 2001 From: Rangi Date: Sun, 21 Jun 2020 18:33:31 -0400 Subject: [PATCH] Comment more ROM labels as unreferenced (Some unreferenced labels are above code which is still used via fallthrough!) --- constants/map_setup_constants.asm | 2 +- data/maps/setup_scripts.asm | 2 +- data/text/common_1.asm | 18 +++++++++--------- data/text/common_2.asm | 18 ++++++------------ engine/events/odd_egg.asm | 2 +- engine/events/std_scripts.asm | 2 +- engine/menus/debug.asm | 8 ++++---- engine/overworld/map_setup.asm | 2 +- gfx/tilesets.asm | 4 ++-- home/audio.asm | 4 ++-- home/copy.asm | 2 +- home/farcall.asm | 1 + home/gfx.asm | 2 ++ home/joypad.asm | 5 +++-- home/map.asm | 6 +++--- home/menu.asm | 5 +++-- home/palettes.asm | 1 + home/sine.asm | 2 +- hram.asm | 1 - mobile/mobile_22.asm | 12 ++++++------ mobile/mobile_5e.asm | 4 +--- 21 files changed, 50 insertions(+), 53 deletions(-) diff --git a/constants/map_setup_constants.asm b/constants/map_setup_constants.asm index ad5ea6155..92b173b8f 100644 --- a/constants/map_setup_constants.asm +++ b/constants/map_setup_constants.asm @@ -25,7 +25,7 @@ const map_fade_music_and_palettes ; 06 const map_play_music_bike ; 07 const map_force_music ; 08 - const map_fade_in_music ; 09 + const map_fade_in_to_music ; 09 const map_load_block_data ; 0a const map_load_connection_block_data ; 0b const map_save_screen ; 0c diff --git a/data/maps/setup_scripts.asm b/data/maps/setup_scripts.asm index 3df4ac404..6702be698 100644 --- a/data/maps/setup_scripts.asm +++ b/data/maps/setup_scripts.asm @@ -37,7 +37,7 @@ MapSetupScript_Warp: db map_spawn_in_facing_down db map_refresh_sprites db map_play_music_bike - db map_fade_in_music + db map_fade_in_to_music db map_fade_in_palettes db map_activate_anims db map_load_wild_mon_data diff --git a/data/text/common_1.asm b/data/text/common_1.asm index 4aeb1331a..e585a6320 100644 --- a/data/text/common_1.asm +++ b/data/text/common_1.asm @@ -215,32 +215,32 @@ _OakTimeIsItText:: ; Mobile Adapter -UnknownText_0x1bc384:: +UnknownText_0x1bc384:: ; unreferenced text "There is nothing" line "connected." done -UnknownText_0x1bc3a1:: +UnknownText_0x1bc3a1:: ; unreferenced text "Check cell phone" line "adapter." done -UnknownText_0x1bc3bc:: +UnknownText_0x1bc3bc:: ; unreferenced text "Check CDMA" line "adapter." done -UnknownText_0x1bc3d1:: +UnknownText_0x1bc3d1:: ; unreferenced text "Check DOCOMO PHS" line "adapter." done -UnknownText_0x1bc3ec:: +UnknownText_0x1bc3ec:: ; unreferenced text "Check DDI PHS" line "adapter." done -UnknownText_0x1bc404:: +UnknownText_0x1bc404:: ; unreferenced text "Check unlimited" line "battle mobile" cont "adapter." @@ -1258,17 +1258,17 @@ UnknownText_0x1bd223:: text "Closing link." done -UnknownText_0x1bd232:: +UnknownText_0x1bd232:: ; unreferenced text "Clear the time" line "limit?" done -UnknownText_0x1bd249:: +UnknownText_0x1bd249:: ; unreferenced text "The time limit was" line "cleared." done -UnknownText_0x1bd266:: +UnknownText_0x1bd266:: ; unreferenced text "Pick which packet" line "as an error?" done diff --git a/data/text/common_2.asm b/data/text/common_2.asm index 6ef6162e1..4b01a5294 100644 --- a/data/text/common_2.asm +++ b/data/text/common_2.asm @@ -889,18 +889,15 @@ _MailMovedFromBoxText:: line "from the MAILBOX." prompt -; unreferenced -_YesPromptText:: +_YesPromptText:: ; unreferenced text "Yes" prompt -; unreferenced -_NoPromptText:: +_NoPromptText:: ; unreferenced text "No" prompt -; unreferenced -_AnimationTypeText:: +_AnimationTypeText:: ; unreferenced text_decimal wcf64, 1, 3 text " @" text_ram wStringBuffer1 @@ -911,8 +908,7 @@ _AnimationTypeText:: text_end ; unreferenced -; unreferenced -_MonNumberText:: +_MonNumberText:: ; unreferenced text "#MON number?" done @@ -1352,8 +1348,7 @@ _OakPCText4:: line "OAK's PC closed." done -; unreferenced -_TrainerRankingExplanationText:: +_TrainerRankingExplanationText:: ; unreferenced text "Triple-theme" line "trainer ranking!" @@ -1364,8 +1359,7 @@ _TrainerRankingExplanationText:: para "" done -; unreferenced -_TrainerRankingNoDataText:: +_TrainerRankingNoDataText:: ; unreferenced text "There is no" line "ranking data." diff --git a/engine/events/odd_egg.asm b/engine/events/odd_egg.asm index d6d8f344e..406d5242f 100644 --- a/engine/events/odd_egg.asm +++ b/engine/events/odd_egg.asm @@ -22,7 +22,7 @@ _GiveOddEgg: jr z, .done .not_done - ; Break when [hRandom] <= de. + ; Break when the random word <= the next probability in de. ldh a, [hRandomSub] cp d jr c, .done diff --git a/engine/events/std_scripts.asm b/engine/events/std_scripts.asm index 3112d40e2..edd596a24 100644 --- a/engine/events/std_scripts.asm +++ b/engine/events/std_scripts.asm @@ -14,7 +14,7 @@ StdScripts:: add_stdscript TownMapScript add_stdscript WindowScript add_stdscript TVScript - add_stdscript HomepageScript + add_stdscript HomepageScript ; unused add_stdscript Radio1Script add_stdscript Radio2Script add_stdscript TrashCanScript diff --git a/engine/menus/debug.asm b/engine/menus/debug.asm index d49902254..24bd75fb8 100644 --- a/engine/menus/debug.asm +++ b/engine/menus/debug.asm @@ -297,15 +297,15 @@ Function81adb: hlcoord 1, 3 lb bc, 7, 18 ld a, DEBUGTEST_WHITE - call Bank20_FillBoxWithByte + call DebugColor_FillBoxWithByte hlcoord 11, 0 lb bc, 2, 3 ld a, DEBUGTEST_LIGHT - call Bank20_FillBoxWithByte + call DebugColor_FillBoxWithByte hlcoord 16, 0 lb bc, 2, 3 ld a, DEBUGTEST_DARK - call Bank20_FillBoxWithByte + call DebugColor_FillBoxWithByte call Function81bc0 call Function81bf4 ld a, [wcf66] @@ -880,7 +880,7 @@ Function81ee3: jr nz, .asm_81ee3 ret -Bank20_FillBoxWithByte: +DebugColor_FillBoxWithByte: ; For some reason, we have another copy of FillBoxWithByte here .row push bc diff --git a/engine/overworld/map_setup.asm b/engine/overworld/map_setup.asm index a767dc5e7..08ea00493 100644 --- a/engine/overworld/map_setup.asm +++ b/engine/overworld/map_setup.asm @@ -69,7 +69,7 @@ MapSetupCommands: dba FadeMapMusicAndPalettes ; 06 dba PlayMapMusicBike ; 07 dba ForceMapMusic ; 08 - dba FadeInMusic ; 09 + dba FadeInToMusic ; 09 dba LoadBlockData ; 0a (callback 1) dba LoadConnectionBlockData ; 0b dba SaveScreen ; 0c diff --git a/gfx/tilesets.asm b/gfx/tilesets.asm index ead1860e7..54dd4a48a 100644 --- a/gfx/tilesets.asm +++ b/gfx/tilesets.asm @@ -190,10 +190,10 @@ INCLUDE "data/tilesets/underground_collision.asm" TilesetDarkCaveGFX:: INCBIN "gfx/tilesets/dark_cave.2bpp.lz" -UnusedTilesetJohtoMeta:: +UnusedTilesetJohtoMeta:: ; unreferenced INCBIN "data/tilesets/unused_johto_metatiles.bin" -UnusedTilesetJohtoColl:: +UnusedTilesetJohtoColl:: ; unreferenced INCLUDE "data/tilesets/unused_johto_collision.asm" diff --git a/home/audio.asm b/home/audio.asm index 7448de022..d9e04dd92 100644 --- a/home/audio.asm +++ b/home/audio.asm @@ -286,12 +286,12 @@ MinVolume:: ld [wVolume], a ret -Unused_FadeOutMusic:: +FadeOutToMusic:: ; unreferenced ld a, 4 ld [wMusicFade], a ret -FadeInMusic:: +FadeInToMusic:: ld a, 4 | (1 << MUSIC_FADE_IN_F) ld [wMusicFade], a ret diff --git a/home/copy.asm b/home/copy.asm index 55951342c..4972045ae 100644 --- a/home/copy.asm +++ b/home/copy.asm @@ -117,7 +117,7 @@ GetFarWRAMByte:: ldh a, [hFarByte] ret -GetFarWRAMWord:: +GetFarWRAMWord:: ; unreferenced ldh [hTempBank], a ldh a, [rSVBK] push af diff --git a/home/farcall.asm b/home/farcall.asm index 1c17fb409..ebec3881b 100644 --- a/home/farcall.asm +++ b/home/farcall.asm @@ -24,6 +24,7 @@ FarCall_hl:: ldh a, [hTempBank] rst Bankswitch call FarCall_JumpToHL + ; fallthrough ReturnFarCall:: ; We want to retain the contents of f. diff --git a/home/gfx.asm b/home/gfx.asm index 01598a95b..06ff91969 100644 --- a/home/gfx.asm +++ b/home/gfx.asm @@ -337,6 +337,7 @@ Get2bpp:: ldh a, [rLCDC] bit rLCDC_ENABLE, a jp nz, Request2bpp + ; fallthrough Copy2bpp: ; copy c 2bpp tiles from b:de to hl @@ -366,6 +367,7 @@ Get1bpp:: ldh a, [rLCDC] bit rLCDC_ENABLE, a jp nz, Request1bpp + ; fallthrough Copy1bpp:: ; copy c 1bpp tiles from b:de to hl diff --git a/home/joypad.asm b/home/joypad.asm index 79129ecc4..05868d8b3 100644 --- a/home/joypad.asm +++ b/home/joypad.asm @@ -261,19 +261,20 @@ StopAutoInput:: ld [wInputType], a ret -JoyTitleScreenInput:: +JoyTitleScreenInput:: ; unreferenced .loop - call DelayFrame push bc call JoyTextDelay pop bc +; Save data can be deleted by pressing Up + B + Select. ldh a, [hJoyDown] cp D_UP | SELECT | B_BUTTON jr z, .keycombo +; Press Start or A to start the game. ldh a, [hJoyLast] and START | A_BUTTON jr nz, .keycombo diff --git a/home/map.asm b/home/map.asm index 927c705db..b2bf2bc9f 100644 --- a/home/map.asm +++ b/home/map.asm @@ -1109,14 +1109,14 @@ ObjectEventText:: text_far _ObjectEventText text_end -BGEvent:: +BGEvent:: ; unreferenced jumptext BGEventText BGEventText:: text_far _BGEventText text_end -CoordinatesEvent:: +CoordinatesEvent:: ; unreferenced jumptext CoordinatesEventText CoordinatesEventText:: @@ -2047,7 +2047,7 @@ SwitchToAnyMapAttributesBank:: rst Bankswitch ret -GetMapAttributesBank:: +GetMapAttributesBank:: ; unreferenced ld a, [wMapGroup] ld b, a ld a, [wMapNumber] diff --git a/home/menu.asm b/home/menu.asm index 1ee95f181..2328ad5b1 100644 --- a/home/menu.asm +++ b/home/menu.asm @@ -282,8 +282,9 @@ MenuBoxCoord2Attr:: ld c, a ld a, [wMenuBorderTopCoord] ld b, a + ; fallthrough -Coord2Attr:: +Coord2Attr:: ; unreferenced ; Return the address of wAttrmap(c, b) in hl. xor a ld h, a @@ -835,7 +836,7 @@ InterpretBattleMenu:: ld a, [wMenuCursorBuffer] ret -InterpretMobileMenu:: +InterpretMobileMenu:: ; unreferenced ldh a, [hROMBank] ld [wMenuData_2DMenuItemStringsBank], a farcall _InterpretMobileMenu diff --git a/home/palettes.asm b/home/palettes.asm index 528c273f8..5940a0efe 100644 --- a/home/palettes.asm +++ b/home/palettes.asm @@ -16,6 +16,7 @@ UpdateCGBPals:: ldh a, [hCGBPalUpdate] and a ret z + ; fallthrough ForceUpdateCGBPals:: ldh a, [rSVBK] diff --git a/home/sine.asm b/home/sine.asm index 821f7c47d..3601e1ebf 100644 --- a/home/sine.asm +++ b/home/sine.asm @@ -1,4 +1,4 @@ -Cosine:: +Cosine:: ; unreferenced ; a = d * cos(a * pi/32) add %010000 ; cos(x) = sin(x + pi/2) ; fallthrough diff --git a/hram.asm b/hram.asm index e60ee27be..0b8b40b31 100644 --- a/hram.asm +++ b/hram.asm @@ -149,7 +149,6 @@ hTileAnimFrame:: db hLastTalked:: db -hRandom:: hRandomAdd:: db hRandomSub:: db diff --git a/mobile/mobile_22.asm b/mobile/mobile_22.asm index f5e3073e2..d73977854 100644 --- a/mobile/mobile_22.asm +++ b/mobile/mobile_22.asm @@ -519,9 +519,9 @@ INCBIN "gfx/mobile/ez_chat_cursor.2bpp" Function8942b: ld de, vTiles0 tile $02 - ld hl, CardLargeSpriteGFX - ld bc, 8 tiles - ld a, BANK(CardLargeSpriteGFX) + ld hl, CardLargeSpriteAndFolderGFX + ld bc, 8 tiles ; just the large card sprite + ld a, BANK(CardLargeSpriteAndFolderGFX) call FarCopyBytes ld de, vTiles0 tile $0a ld hl, CardSpriteGFX @@ -544,10 +544,10 @@ Function89448: ret Function89455: - ld hl, CardLargeSpriteGFX + ld hl, CardLargeSpriteAndFolderGFX ld de, vTiles2 tile $0c - ld bc, (8 + 65) tiles - ld a, BANK(CardLargeSpriteGFX) ; aka BANK(CardFolderGFX) + ld bc, (8 + 65) tiles ; large card sprite + folder + ld a, BANK(CardLargeSpriteAndFolderGFX) call FarCopyBytes ret diff --git a/mobile/mobile_5e.asm b/mobile/mobile_5e.asm index 55654d572..a30ed4983 100644 --- a/mobile/mobile_5e.asm +++ b/mobile/mobile_5e.asm @@ -10,10 +10,8 @@ INCBIN "gfx/mobile/kris_silhouette.2bpp" MobileCard2GFX:: INCBIN "gfx/mobile/card_2.2bpp" -CardLargeSpriteGFX:: +CardLargeSpriteAndFolderGFX:: INCBIN "gfx/mobile/card_large_sprite.2bpp" - -CardFolderGFX:: INCBIN "gfx/mobile/card_folder.2bpp" CardSpriteGFX::