diff options
| author | Rangi <35663410+Rangi42@users.noreply.github.com> | 2020-10-30 12:26:03 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-30 12:26:03 -0400 |
| commit | 7a42f1790ae1e9e357593879bd38c6596dcb03da (patch) | |
| tree | dbf4ee19995364f15a3b3f98925f606c50598334 /engine/events | |
| parent | a2b6befd7d12b2ad8bb97979a10519500dcdd870 (diff) | |
| parent | 1092983bde65bbf1a27eeabbfbceec1f278a4831 (diff) | |
Merge pull request #776 from Rangi42/unreferenced
Comment, remove, or revise many unreferenced labels
Diffstat (limited to 'engine/events')
| -rw-r--r-- | engine/events/battle_tower/battle_tower.asm | 18 | ||||
| -rw-r--r-- | engine/events/battle_tower/load_trainer.asm | 2 | ||||
| -rw-r--r-- | engine/events/buena.asm | 22 | ||||
| -rw-r--r-- | engine/events/bug_contest/judging.asm | 3 | ||||
| -rw-r--r-- | engine/events/celebi.asm | 7 | ||||
| -rw-r--r-- | engine/events/daycare.asm | 18 | ||||
| -rw-r--r-- | engine/events/diploma.asm | 3 | ||||
| -rw-r--r-- | engine/events/engine_flags.asm | 2 | ||||
| -rw-r--r-- | engine/events/field_moves.asm | 2 | ||||
| -rw-r--r-- | engine/events/heal_machine_anim.asm | 4 | ||||
| -rw-r--r-- | engine/events/magnet_train.asm | 2 | ||||
| -rw-r--r-- | engine/events/mom_phone.asm | 7 | ||||
| -rw-r--r-- | engine/events/npc_trade.asm | 9 | ||||
| -rw-r--r-- | engine/events/overworld.asm | 8 | ||||
| -rw-r--r-- | engine/events/poisonstep.asm | 2 | ||||
| -rw-r--r-- | engine/events/print_unown_2.asm | 18 | ||||
| -rw-r--r-- | engine/events/prof_oaks_pc.asm | 10 | ||||
| -rw-r--r-- | engine/events/specials.asm | 10 | ||||
| -rw-r--r-- | engine/events/std_collision.asm | 2 | ||||
| -rw-r--r-- | engine/events/treemons.asm | 2 |
20 files changed, 78 insertions, 73 deletions
diff --git a/engine/events/battle_tower/battle_tower.asm b/engine/events/battle_tower/battle_tower.asm index f335a83c9..0164ede48 100644 --- a/engine/events/battle_tower/battle_tower.asm +++ b/engine/events/battle_tower/battle_tower.asm @@ -67,7 +67,7 @@ Function170114: call Function170c8b ret -Function170139: +Function170139: ; unreferenced ; Convert the 4-digit decimal number at s5_aa41 into binary ld a, BANK(s5_aa41) call OpenSRAM @@ -183,7 +183,7 @@ BattleTowerBattle: call _BattleTowerBattle ret -DummySpecial_17021d: +UnusedBattleTowerDummySpecial1: ret InitBattleTowerChallengeRAM: @@ -374,7 +374,7 @@ ReadBTTrainerParty: ld [bc], a ret -ValidateBTParty: +ValidateBTParty: ; unreferenced ; Check for and fix errors in party data ld hl, wBT_OTTempMon1Species ld d, BATTLETOWER_PARTY_LENGTH @@ -386,7 +386,7 @@ ValidateBTParty: ld a, [hl] and a x = $ff -rept ($ff - NUM_POKEMON) +rept $ff - NUM_POKEMON jr z, .invalid cp x x = x - 1 @@ -1008,11 +1008,11 @@ BattleTowerAction_SetExplanationRead: BattleTowerAction_SetByteToQuickSaveChallenge: ld c, BATTLETOWER_SAVED_AND_LEFT - jr asm_17079f + jr SetBattleTowerChallengeState BattleTowerAction_SetByteToCancelChallenge: ld c, BATTLETOWER_NO_CHALLENGE -asm_17079f: +SetBattleTowerChallengeState: ld a, BANK(sBattleTowerChallengeState) call OpenSRAM ld a, c @@ -1447,11 +1447,11 @@ Function1709bb: ; BattleTowerAction $10 Function170a9c: ld c, FALSE - jr asm_170aa2 + jr Set_s5_aa8d Function170aa0: ld c, TRUE -asm_170aa2: +Set_s5_aa8d: ld a, BANK(s5_aa8d) call OpenSRAM ld a, c @@ -1576,7 +1576,7 @@ LoadOpponentTrainerAndPokemonWithOTSprite: INCLUDE "data/trainers/sprites.asm" -DummySpecial_170bd2: +UnusedBattleTowerDummySpecial2: ret CheckForBattleTowerRules: diff --git a/engine/events/battle_tower/load_trainer.asm b/engine/events/battle_tower/load_trainer.asm index 8ed401afe..165efb8dd 100644 --- a/engine/events/battle_tower/load_trainer.asm +++ b/engine/events/battle_tower/load_trainer.asm @@ -95,7 +95,7 @@ Function_LoadRandomBattleTowerMon: ld c, BATTLETOWER_PARTY_LENGTH .loop push bc - ld a, BANK(sBTMonPrevTrainer1) + ld a, BANK(sBTMonOfTrainers) call OpenSRAM .FindARandomBattleTowerMon: diff --git a/engine/events/buena.asm b/engine/events/buena.asm index 452f5d62a..dca125ece 100644 --- a/engine/events/buena.asm +++ b/engine/events/buena.asm @@ -85,7 +85,7 @@ BuenaPrize: call Buena_PrizeMenu jr z, .done ld [wMenuSelectionQuantity], a - call Buena_getprize + call Buena_GetPrize ld a, [hl] ld [wNamedObjectIndexBuffer], a call GetItemName @@ -95,7 +95,7 @@ BuenaPrize: jr c, .loop ld a, [wMenuSelectionQuantity] - call Buena_getprize + call Buena_GetPrize inc hl ld a, [hld] ld c, a @@ -258,11 +258,11 @@ Buena_PrizeMenu: db SCROLLINGMENU_DISPLAY_ARROWS ; flags db 4, 13 ; rows, columns db SCROLLINGMENU_ITEMS_NORMAL ; item format - dba .indices - dba .prizeitem - dba .prizepoints + dba .Prizes + dba .PrintPrizeItem + dba .PrintPrizePoints -.indices: +.Prizes: db NUM_BUENA_PRIZES x = 1 rept NUM_BUENA_PRIZES @@ -271,9 +271,9 @@ x = x + 1 endr db -1 -.prizeitem: +.PrintPrizeItem: ld a, [wMenuSelection] - call Buena_getprize + call Buena_GetPrize ld a, [hl] push de ld [wNamedObjectIndexBuffer], a @@ -282,9 +282,9 @@ endr call PlaceString ret -.prizepoints: +.PrintPrizePoints: ld a, [wMenuSelection] - call Buena_getprize + call Buena_GetPrize inc hl ld a, [hl] ld c, "0" @@ -292,7 +292,7 @@ endr ld [de], a ret -Buena_getprize: +Buena_GetPrize: dec a ld hl, BuenaPrizeItems ld b, 0 diff --git a/engine/events/bug_contest/judging.asm b/engine/events/bug_contest/judging.asm index 361aef81a..abb9d60da 100644 --- a/engine/events/bug_contest/judging.asm +++ b/engine/events/bug_contest/judging.asm @@ -68,7 +68,8 @@ ContestJudging_ThirdPlaceScoreText: LoadContestantName: ; If a = 1, get your name. - dec a ; BUG_CONTEST_PLAYER + assert BUG_CONTEST_PLAYER == 1 + dec a jr z, .player ; Find the pointer for the trainer class of the Bug Catching Contestant whose ID is in a. ld c, a diff --git a/engine/events/celebi.asm b/engine/events/celebi.asm index 028f2e350..6a2d16dfc 100644 --- a/engine/events/celebi.asm +++ b/engine/events/celebi.asm @@ -1,6 +1,6 @@ SPECIALCELEBIEVENT_CELEBI EQU $84 -UnusedForestTreeFrames: +UnusedForestTreeFrames: ; unreferenced INCBIN "gfx/tilesets/forest-tree/1.2bpp" INCBIN "gfx/tilesets/forest-tree/2.2bpp" INCBIN "gfx/tilesets/forest-tree/3.2bpp" @@ -99,9 +99,8 @@ CelebiEvent_CountDown: set 7, [hl] ret -CelebiEvent_SpawnLeaf: -; unused - ld hl, wcf65 +CelebiEvent_SpawnLeaf: ; unreferenced + ld hl, wFrameCounter2 ld a, [hl] inc [hl] and $7 diff --git a/engine/events/daycare.asm b/engine/events/daycare.asm index 1c08ca1b8..9393ebc93 100644 --- a/engine/events/daycare.asm +++ b/engine/events/daycare.asm @@ -1,9 +1,9 @@ ; PrintDayCareText.TextTable indexes const_def const DAYCARETEXT_MAN_INTRO - const DAYCARETEXT_MAN_ODD_EGG + const DAYCARETEXT_MAN_INTRO_EGG const DAYCARETEXT_LADY_INTRO - const DAYCARETEXT_LADY_ODD_EGG + const DAYCARETEXT_LADY_INTRO_EGG const DAYCARETEXT_WHICH_ONE const DAYCARETEXT_DEPOSIT const DAYCARETEXT_CANT_BREED_EGG @@ -166,7 +166,7 @@ DayCareAskDepositPokemon: scf ret -.DaycareDummyText: +.DaycareDummyText: ; unreferenced text_far _DaycareDummyText text_end @@ -274,9 +274,9 @@ PrintDayCareText: .TextTable: ; entries correspond to DAYCARETEXT_* constants dw .DayCareManIntroText ; 00 - dw .DayCareManOddEggText ; 01 + dw .DayCareManIntroEggText ; 01 dw .DayCareLadyIntroText ; 02 - dw .DayCareLadyOddEggText ; 03 + dw .DayCareLadyIntroEggText ; 03 dw .WhatShouldIRaiseText ; 04 dw .IllRaiseYourMonText ; 05 dw .CantAcceptEggText ; 06 @@ -298,16 +298,16 @@ PrintDayCareText: text_far _DayCareManIntroText text_end -.DayCareManOddEggText: - text_far _DayCareManOddEggText +.DayCareManIntroEggText: + text_far _DayCareManIntroEggText text_end .DayCareLadyIntroText: text_far _DayCareLadyIntroText text_end -.DayCareLadyOddEggText: - text_far _DayCareLadyOddEggText +.DayCareLadyIntroEggText: + text_far _DayCareLadyIntroEggText text_end .WhatShouldIRaiseText: diff --git a/engine/events/diploma.asm b/engine/events/diploma.asm index f0008b7fd..814c9644c 100644 --- a/engine/events/diploma.asm +++ b/engine/events/diploma.asm @@ -87,4 +87,5 @@ INCBIN "gfx/diploma/page1.tilemap" DiplomaPage2Tilemap: INCBIN "gfx/diploma/page2.tilemap" - ret ; unused +Diploma_DummyFunction: ; unreferenced + ret diff --git a/engine/events/engine_flags.asm b/engine/events/engine_flags.asm index aebbacdc1..13f9a9a81 100644 --- a/engine/events/engine_flags.asm +++ b/engine/events/engine_flags.asm @@ -57,7 +57,7 @@ EngineFlagAction:: jr z, .set ; b = 1 ; Return the given flag in c. -.check +; check ld a, [de] and c ld c, a diff --git a/engine/events/field_moves.asm b/engine/events/field_moves.asm index 6bbb7cbec..130ec411d 100644 --- a/engine/events/field_moves.asm +++ b/engine/events/field_moves.asm @@ -426,7 +426,7 @@ FlyFunction_FrameTimer: ret .SpawnLeaf: - ld hl, wcf65 + ld hl, wFrameCounter2 ld a, [hl] inc [hl] and $7 diff --git a/engine/events/heal_machine_anim.asm b/engine/events/heal_machine_anim.asm index 38ccbf12c..166b42b67 100644 --- a/engine/events/heal_machine_anim.asm +++ b/engine/events/heal_machine_anim.asm @@ -56,7 +56,7 @@ HealMachineAnim: .Pointers: ; entries correspond to HEALMACHINE_* constants dw .Pokecenter - dw .ElmLab + dw .ElmsLab dw .HallOfFame healmachineanimseq: MACRO @@ -68,7 +68,7 @@ ENDM .Pokecenter: healmachineanimseq LOADGFX, PCLOADBALLS, PLAYMUSIC, FINISH -.ElmLab: +.ElmsLab: healmachineanimseq LOADGFX, PCLOADBALLS, PLAYMUSIC, FINISH .HallOfFame: healmachineanimseq LOADGFX, HOFLOADBALLS, HOFPLAYSFX, FINISH diff --git a/engine/events/magnet_train.asm b/engine/events/magnet_train.asm index 14ccb02ba..43b1d716d 100644 --- a/engine/events/magnet_train.asm +++ b/engine/events/magnet_train.asm @@ -69,7 +69,7 @@ MagnetTrain: ld [wRequested2bppSource + 1], a ld [wRequested2bppDest], a ld [wRequested2bppDest + 1], a - ld [wRequested2bpp], a + ld [wRequested2bppSize], a call ClearTilemap pop af diff --git a/engine/events/mom_phone.asm b/engine/events/mom_phone.asm index f18685df8..3ff5f2b3e 100644 --- a/engine/events/mom_phone.asm +++ b/engine/events/mom_phone.asm @@ -228,9 +228,12 @@ MomItsInYourRoomText: text_far _MomItsInYourRoomText text_end - db 0 ; unused + +DummyPredef3A_DummyData: ; unreferenced + db 0 DummyPredef3A: ret - ret ; unused +DummyPredef3A_DummyFunction: ; unreferenced + ret diff --git a/engine/events/npc_trade.asm b/engine/events/npc_trade.asm index 94aaace72..6b32aff56 100644 --- a/engine/events/npc_trade.asm +++ b/engine/events/npc_trade.asm @@ -56,11 +56,12 @@ NPCTrade:: call DisableSpriteUpdates ld a, [wJumptableIndex] push af - ld a, [wcf64] + ; wTradeDialog aliases wFrameCounter, which TradeAnimation uses + ld a, [wTradeDialog] push af predef TradeAnimation pop af - ld [wcf64], a + ld [wTradeDialog], a pop af ld [wJumptableIndex], a call ReturnToMapWithSpeechTextbox @@ -107,7 +108,7 @@ Trade_GetDialog: ld e, NPCTRADE_DIALOG call GetTradeAttribute ld a, [hl] - ld [wcf64], a + ld [wTradeDialog], a ret DoNPCTrade: @@ -392,7 +393,7 @@ PrintTradeText: ld bc, 2 * 4 ld hl, TradeTexts call AddNTimes - ld a, [wcf64] + ld a, [wTradeDialog] ld c, a add hl, bc add hl, bc diff --git a/engine/events/overworld.asm b/engine/events/overworld.asm index 9c956e83b..0ca448930 100644 --- a/engine/events/overworld.asm +++ b/engine/events/overworld.asm @@ -271,7 +271,7 @@ CheckOverworldTileArrays: xor a ret -INCLUDE "data/events/field_move_blocks.asm" +INCLUDE "data/collision/field_move_blocks.asm" FlashFunction: call .CheckUseFlash @@ -1414,7 +1414,7 @@ HasRockSmash: ld d, ROCK_SMASH call CheckPartyMove jr nc, .yes -.no +; no ld a, 1 jr .done .yes @@ -1616,7 +1616,7 @@ RodNothingText: text_far _RodNothingText text_end -UnusedNothingHereText: ; unused +UnusedNothingHereText: ; unreferenced text_far _UnusedNothingHereText text_end @@ -1722,7 +1722,7 @@ Script_GetOnBike_Register: special UpdatePlayerSprite end -; unused +Overworld_DummyFunction: ; unreferenced nop ret diff --git a/engine/events/poisonstep.asm b/engine/events/poisonstep.asm index e6de6f19f..827f69411 100644 --- a/engine/events/poisonstep.asm +++ b/engine/events/poisonstep.asm @@ -149,6 +149,6 @@ DoPoisonStep:: text_far _PoisonFaintText text_end -.PoisonWhiteoutText: +.PoisonWhiteoutText: ; unreferenced text_far _PoisonWhiteoutText text_end diff --git a/engine/events/print_unown_2.asm b/engine/events/print_unown_2.asm index 0badae200..4926bf532 100644 --- a/engine/events/print_unown_2.asm +++ b/engine/events/print_unown_2.asm @@ -9,7 +9,7 @@ RotateUnownFrontpic: push bc push hl push bc - ld de, wd002 + ld de, wPrintedUnownTileSource call .Copy call .Rotate ld hl, UnownPrinter_GBPrinterRectangle @@ -19,10 +19,10 @@ RotateUnownFrontpic: ld a, [hli] ld e, a ld d, [hl] - ld hl, wd012 + ld hl, wPrintedUnownTileDest call .Copy pop hl - ld bc, $10 + ld bc, LEN_2BPP_TILE add hl, bc pop bc inc c @@ -30,7 +30,7 @@ RotateUnownFrontpic: cp 7 * 7 jr c, .loop - ld hl, wGameboyPrinterRAM + ld hl, wGameboyPrinter2bppSource ld de, sScratch ld bc, 7 * 7 tiles call CopyBytes @@ -44,7 +44,7 @@ RotateUnownFrontpic: ret .Copy: - ld c, $10 + ld c, LEN_2BPP_TILE .loop_copy ld a, [hli] ld [de], a @@ -54,18 +54,18 @@ RotateUnownFrontpic: ret .Rotate: - ld hl, wd012 + ld hl, wPrintedUnownTileDest ld e, %10000000 ld d, 8 .loop_decompress push hl - ld hl, wd002 + ld hl, wPrintedUnownTileSource call .CountSetBit pop hl ld a, b ld [hli], a push hl - ld hl, wd003 + ld hl, wPrintedUnownTileSource + 1 call .CountSetBit pop hl ld a, b @@ -100,7 +100,7 @@ y = 0 rept \1 x = \1 * (\2 - 1) + y rept \2 - dw wGameboyPrinterRAM tile x + dw wGameboyPrinter2bppSource tile x x = x - \2 endr y = y + 1 diff --git a/engine/events/prof_oaks_pc.asm b/engine/events/prof_oaks_pc.asm index 1be775a4c..b272e3fb5 100644 --- a/engine/events/prof_oaks_pc.asm +++ b/engine/events/prof_oaks_pc.asm @@ -36,18 +36,18 @@ Rate: ld hl, wPokedexSeen ld b, wEndPokedexSeen - wPokedexSeen call CountSetBits - ld [wd002], a + ld [wTempPokedexSeenCount], a ld hl, wPokedexCaught ld b, wEndPokedexCaught - wPokedexCaught call CountSetBits - ld [wd003], a + ld [wTempPokedexCaughtCount], a ; print appropriate rating call .UpdateRatingBuffers ld hl, OakPCText3 call PrintText call JoyWaitAorB - ld a, [wd003] + ld a, [wTempPokedexCaughtCount] ld hl, OakRatings call FindOakRating push de @@ -57,10 +57,10 @@ Rate: .UpdateRatingBuffers: ld hl, wStringBuffer3 - ld de, wd002 + ld de, wTempPokedexSeenCount call .UpdateRatingBuffer ld hl, wStringBuffer4 - ld de, wd003 + ld de, wTempPokedexCaughtCount call .UpdateRatingBuffer ret diff --git a/engine/events/specials.asm b/engine/events/specials.asm index 28cf2dd13..1333f27ce 100644 --- a/engine/events/specials.asm +++ b/engine/events/specials.asm @@ -15,7 +15,7 @@ Special:: INCLUDE "data/events/special_pointers.asm" -DummySpecial_c224: +UnusedDummySpecial: ret SetPlayerPalette: @@ -207,7 +207,7 @@ CardFlip: call StartGameCornerGame ret -DummyNonfunctionalGameCornerGame: +UnusedDummyGame: call CheckCoinsAndCoinCase ret c ld a, BANK(_DummyGame) @@ -380,17 +380,17 @@ GameboyCheck: ldh a, [hCGB] and a jr nz, .cgb - ldh a, [hSGB] and a jr nz, .sgb - -.gb +; gb xor a ; GBCHECK_GB jr .done + .sgb ld a, GBCHECK_SGB jr .done + .cgb ld a, GBCHECK_CGB .done diff --git a/engine/events/std_collision.asm b/engine/events/std_collision.asm index 8c54c0414..5ab112680 100644 --- a/engine/events/std_collision.asm +++ b/engine/events/std_collision.asm @@ -23,7 +23,7 @@ CheckFacingTileForStdScript:: xor a ret -INCLUDE "data/events/collision_stdscripts.asm" +INCLUDE "data/collision/collision_stdscripts.asm" Script_JumpStdFromRAM: sjump wJumpStdScriptBuffer diff --git a/engine/events/treemons.asm b/engine/events/treemons.asm index 680a9d7f5..9adcdbdc2 100644 --- a/engine/events/treemons.asm +++ b/engine/events/treemons.asm @@ -210,7 +210,7 @@ GetTreeScore: cp 5 jr c, .good -.bad +; bad xor a ; TREEMON_SCORE_BAD ret |
