From 306c85750e0686f9af104249ca3000e717aee0e2 Mon Sep 17 00:00:00 2001 From: Rangi Date: Sun, 4 Oct 2020 19:43:28 -0400 Subject: [PATCH] Identify some more unnamed labels --- engine/battle/move_effects/metronome.asm | 4 ++-- engine/battle/move_effects/protect.asm | 4 ++-- engine/battle/move_effects/spikes.asm | 4 ++-- engine/events/overworld.asm | 4 ++-- engine/events/pokecenter_pc.asm | 4 ++-- engine/gfx/sgb_layouts.asm | 6 +++--- engine/items/item_effects.asm | 26 ++++++++++++------------ engine/link/link.asm | 2 +- engine/link/time_capsule.asm | 2 +- engine/menus/menu.asm | 2 +- engine/menus/menu_2.asm | 10 ++++----- engine/overworld/cmd_queue.asm | 2 +- engine/overworld/decorations.asm | 8 ++++---- engine/overworld/events.asm | 18 ++++++++-------- engine/overworld/player_movement.asm | 4 ++-- engine/phone/scripts/mom.asm | 4 ++-- engine/pokemon/bills_pc.asm | 8 ++++---- engine/pokemon/mon_submenu.asm | 8 ++++---- engine/printer/printer.asm | 4 ++-- gfx/sgb/pal_packets.asm | 2 +- home/region.asm | 2 +- mobile/mobile_40.asm | 2 +- wram.asm | 2 +- 23 files changed, 66 insertions(+), 66 deletions(-) diff --git a/engine/battle/move_effects/metronome.asm b/engine/battle/move_effects/metronome.asm index 5b43c9b75..ab1c6a6c9 100644 --- a/engine/battle/move_effects/metronome.asm +++ b/engine/battle/move_effects/metronome.asm @@ -3,7 +3,7 @@ BattleCommand_Metronome: call ClearLastMove call CheckUserIsCharging - jr nz, .asm_3742b + jr nz, .charging ld a, [wBattleAnimParam] push af @@ -11,7 +11,7 @@ BattleCommand_Metronome: pop af ld [wBattleAnimParam], a -.asm_3742b +.charging call LoadMoveAnim .GetMove: diff --git a/engine/battle/move_effects/protect.asm b/engine/battle/move_effects/protect.asm index e66bce443..bcfdacdfc 100644 --- a/engine/battle/move_effects/protect.asm +++ b/engine/battle/move_effects/protect.asm @@ -16,9 +16,9 @@ ProtectChance: ld de, wPlayerProtectCount ldh a, [hBattleTurn] and a - jr z, .asm_37637 + jr z, .got_count ld de, wEnemyProtectCount -.asm_37637 +.got_count call CheckOpponentWentFirst jr nz, .failed diff --git a/engine/battle/move_effects/spikes.asm b/engine/battle/move_effects/spikes.asm index 96163a680..69752c8f6 100644 --- a/engine/battle/move_effects/spikes.asm +++ b/engine/battle/move_effects/spikes.asm @@ -4,9 +4,9 @@ BattleCommand_Spikes: ld hl, wEnemyScreens ldh a, [hBattleTurn] and a - jr z, .asm_3768e + jr z, .got_screens ld hl, wPlayerScreens -.asm_3768e +.got_screens ; Fails if spikes are already down! diff --git a/engine/events/overworld.asm b/engine/events/overworld.asm index eee3e2df3..57a3e6a9b 100644 --- a/engine/events/overworld.asm +++ b/engine/events/overworld.asm @@ -1089,14 +1089,14 @@ TryStrengthOW: WhirlpoolFunction: call FieldMoveJumptableReset .loop - ld hl, Jumptable_cdae + ld hl, .Jumptable call FieldMoveJumptable jr nc, .loop and $7f ld [wFieldMoveSucceeded], a ret -Jumptable_cdae: +.Jumptable: dw .TryWhirlpool dw .DoWhirlpool dw .FailWhirlpool diff --git a/engine/events/pokecenter_pc.asm b/engine/events/pokecenter_pc.asm index dff908dd6..7cb89e6d6 100644 --- a/engine/events/pokecenter_pc.asm +++ b/engine/events/pokecenter_pc.asm @@ -211,7 +211,7 @@ _PlayersHousePC: ld b, PLAYERSPC_HOUSE call _PlayersPC and a - jr nz, .asm_156f9 + jr nz, .changed_deco_tiles call OverworldTextModeSwitch call ApplyTilemap call UpdateSprites @@ -219,7 +219,7 @@ _PlayersHousePC: ld c, FALSE ret -.asm_156f9 +.changed_deco_tiles call ClearBGPalettes ld c, TRUE ret diff --git a/engine/gfx/sgb_layouts.asm b/engine/gfx/sgb_layouts.asm index 658b9064c..bfdaeb098 100644 --- a/engine/gfx/sgb_layouts.asm +++ b/engine/gfx/sgb_layouts.asm @@ -134,7 +134,7 @@ LoadSGBLayout: ret .SGB_MoveList: - ld hl, PalPacket_Routes + ld hl, PalPacket_AllPal0 ld de, wSGBPals ld bc, PALPACKET_LENGTH call CopyBytes @@ -341,7 +341,7 @@ endr ret .SGB_MapPals: - ld hl, PalPacket_Routes + ld hl, PalPacket_AllPal0 ld de, wSGBPals ld bc, PALPACKET_LENGTH call CopyBytes @@ -409,7 +409,7 @@ endr ret .SGB_Pokepic: - ld hl, PalPacket_Routes + ld hl, PalPacket_AllPal0 ld de, wSGBPals ld bc, PALPACKET_LENGTH call CopyBytes diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index ae2ebd187..bc185500e 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -1377,17 +1377,16 @@ HealPowderEffect: jp c, StatusHealer_ExitMenu call UseStatusHealer + cp FALSE + jr nz, .not_used - cp $0 - jr nz, .asm_efc9 ld c, HAPPINESS_BITTERPOWDER farcall ChangeHappiness - call LooksBitterMessage ld a, $0 -.asm_efc9 +.not_used jp StatusHealer_Jumptable StatusHealingEffect: @@ -1401,7 +1400,7 @@ FullyHealStatus: UseStatusHealer: call IsMonFainted - ld a, $1 + ld a, TRUE ret z call GetItemHealingAction ld a, MON_STATUS @@ -1410,7 +1409,7 @@ UseStatusHealer: and c jr nz, .good call IsItemUsedOnConfusedMon - ld a, $1 + ld a, TRUE ret nc ld b, PARTYMENUTEXT_HEAL_CONFUSION .good @@ -1422,7 +1421,7 @@ UseStatusHealer: call Play_SFX_FULL_HEAL call ItemActionTextWaitButton call UseDisposableItem - ld a, $0 + ld a, FALSE ret IsItemUsedOnConfusedMon: @@ -1512,15 +1511,16 @@ RevivalHerbEffect: jp c, StatusHealer_ExitMenu call RevivePokemon - cp 0 - jr nz, .asm_f0c5 + cp FALSE + jr nz, .not_used ld c, HAPPINESS_REVIVALHERB farcall ChangeHappiness call LooksBitterMessage - ld a, 0 -.asm_f0c5 + ld a, $0 + +.not_used jp StatusHealer_Jumptable ReviveEffect: @@ -1533,7 +1533,7 @@ ReviveEffect: RevivePokemon: call IsMonFainted - ld a, 1 + ld a, TRUE ret nz ld a, [wBattleMode] and a @@ -1574,7 +1574,7 @@ RevivePokemon: ld [wPartyMenuActionText], a call ItemActionTextWaitButton call UseDisposableItem - ld a, 0 + ld a, FALSE ret FullRestoreEffect: diff --git a/engine/link/link.asm b/engine/link/link.asm index 72ad2263c..e30f78378 100644 --- a/engine/link/link.asm +++ b/engine/link/link.asm @@ -1435,7 +1435,7 @@ Function28926: call DelayFrames farcall ValidateOTTrademon jr c, .abnormal - farcall Functionfb5dd + farcall CheckAnyOtherAliveMonsForTrade jp nc, LinkTrade xor a ld [wcf57], a diff --git a/engine/link/time_capsule.asm b/engine/link/time_capsule.asm index ff7e83ca6..bacda9c4b 100644 --- a/engine/link/time_capsule.asm +++ b/engine/link/time_capsule.asm @@ -64,7 +64,7 @@ ValidateOTTrademon: scf ret -Functionfb5dd: +CheckAnyOtherAliveMonsForTrade: ld a, [wd002] ld d, a ld a, [wPartyCount] diff --git a/engine/menus/menu.asm b/engine/menus/menu.asm index 94accb539..338a6c8f3 100644 --- a/engine/menus/menu.asm +++ b/engine/menus/menu.asm @@ -690,7 +690,7 @@ _ExitMenu:: dec [hl] ret -Function24423: ; unreferenced +RestoreOverworldMapTiles: ; unreferenced ld a, [wVramState] bit 0, a ret z diff --git a/engine/menus/menu_2.asm b/engine/menus/menu_2.asm index 6c65f8bf5..64a58a18d 100644 --- a/engine/menus/menu_2.asm +++ b/engine/menus/menu_2.asm @@ -28,17 +28,17 @@ PlaceMenuItemQuantity: ret PlaceMoneyTopRight: - ld hl, MenuHeader_0x24b15 + ld hl, MoneyTopRightMenuHeader call CopyMenuHeader jr PlaceMoneyTextbox PlaceMoneyBottomLeft: - ld hl, MenuHeader_0x24b1d + ld hl, MoneyBottomLeftMenuHeader call CopyMenuHeader jr PlaceMoneyTextbox PlaceMoneyAtTopLeftOfTextbox: - ld hl, MenuHeader_0x24b15 + ld hl, MoneyTopRightMenuHeader lb de, 0, 11 call OffsetMenuHeader @@ -52,13 +52,13 @@ PlaceMoneyTextbox: call PrintNum ret -MenuHeader_0x24b15: +MoneyTopRightMenuHeader: db MENU_BACKUP_TILES ; flags menu_coords 11, 0, SCREEN_WIDTH - 1, 2 dw NULL db 1 ; default option -MenuHeader_0x24b1d: +MoneyBottomLeftMenuHeader: db MENU_BACKUP_TILES ; flags menu_coords 0, 11, 8, 13 dw NULL diff --git a/engine/overworld/cmd_queue.asm b/engine/overworld/cmd_queue.asm index e482f789b..3e1b09db5 100644 --- a/engine/overworld/cmd_queue.asm +++ b/engine/overworld/cmd_queue.asm @@ -158,7 +158,7 @@ CmdQueue_Null: ret CmdQueue_Type1: - call Function2f3e + call SetXYCompareFlags ret CmdQueue_Type4: diff --git a/engine/overworld/decorations.asm b/engine/overworld/decorations.asm index 67a07e5db..6c56330ed 100644 --- a/engine/overworld/decorations.asm +++ b/engine/overworld/decorations.asm @@ -834,7 +834,7 @@ WhichSidePutAwayText: DecoAction_AskWhichSide: call MenuTextbox - ld hl, MenuHeader_0x26eab + ld hl, DecoSideMenuHeader call GetMenu2 call ExitMenu call CopyMenuData @@ -867,13 +867,13 @@ QueryWhichSide: pop de ret -MenuHeader_0x26eab: +DecoSideMenuHeader: db MENU_BACKUP_TILES ; flags menu_coords 0, 0, 13, 7 - dw MenuData_0x26eb3 + dw .MenuData db 1 ; default option -MenuData_0x26eb3: +.MenuData: db STATICMENU_CURSOR ; flags db 3 ; items db "RIGHT SIDE@" diff --git a/engine/overworld/events.asm b/engine/overworld/events.asm index d599ffc5c..e7ef5c727 100644 --- a/engine/overworld/events.asm +++ b/engine/overworld/events.asm @@ -399,7 +399,7 @@ SetMinTwoStepWildEncounterCooldown: Dummy_CheckScriptFlags3Bit5: call CheckBit5_ScriptFlags3 ret z - call Function2f3e + call SetXYCompareFlags ret RunSceneScript: @@ -975,7 +975,7 @@ DoPlayerEvent: PlayerEventScriptPointers: ; entries correspond to PLAYEREVENT_* constants - dba Invalid_0x96c2d ; PLAYEREVENT_NONE + dba InvalidEventScript ; PLAYEREVENT_NONE dba SeenByTrainerScript ; PLAYEREVENT_SEENBYTRAINER dba TalkToTrainerScript ; PLAYEREVENT_TALKTOTRAINER dba FindItemInBallScript ; PLAYEREVENT_ITEMBALL @@ -985,12 +985,12 @@ PlayerEventScriptPointers: dba OverworldWhiteoutScript ; PLAYEREVENT_WHITEOUT dba HatchEggScript ; PLAYEREVENT_HATCH dba ChangeDirectionScript ; PLAYEREVENT_JOYCHANGEFACING - dba Invalid_0x96c2d ; (NUM_PLAYER_EVENTS) + dba InvalidEventScript ; (NUM_PLAYER_EVENTS) -Invalid_0x96c2d: +InvalidEventScript: end -; unused +UnusedPlayerEventScript: ; unreferenced end HatchEggScript: @@ -1005,12 +1005,12 @@ WarpToNewMapScript: FallIntoMapScript: newloadmap MAPSETUP_FALL playsound SFX_KINESIS - applymovement PLAYER, MovementData_0x96c48 + applymovement PLAYER, .SkyfallMovement playsound SFX_STRENGTH scall LandAfterPitfallScript end -MovementData_0x96c48: +.SkyfallMovement: skyfall step_end @@ -1018,10 +1018,10 @@ LandAfterPitfallScript: earthquake 16 end -EdgeWarpScript: ; 4 +EdgeWarpScript: reloadend MAPSETUP_CONNECTION -ChangeDirectionScript: ; 9 +ChangeDirectionScript: deactivatefacing 3 callasm EnableWildEncounters end diff --git a/engine/overworld/player_movement.asm b/engine/overworld/player_movement.asm index e2b92b1cf..fcf147dd0 100644 --- a/engine/overworld/player_movement.asm +++ b/engine/overworld/player_movement.asm @@ -364,7 +364,7 @@ DoPlayerMovement:: and 7 ld e, a ld d, 0 - ld hl, .data_8021e + ld hl, .ledge_table add hl, de ld a, [wFacingDirection] and [hl] @@ -382,7 +382,7 @@ DoPlayerMovement:: xor a ret -.data_8021e +.ledge_table db FACE_RIGHT ; COLL_HOP_RIGHT db FACE_LEFT ; COLL_HOP_LEFT db FACE_UP ; COLL_HOP_UP diff --git a/engine/phone/scripts/mom.asm b/engine/phone/scripts/mom.asm index db1f65d45..bd56e1faa 100644 --- a/engine/phone/scripts/mom.asm +++ b/engine/phone/scripts/mom.asm @@ -1,6 +1,6 @@ MomPhoneCalleeScript: checkevent EVENT_TALKED_TO_MOM_AFTER_MYSTERY_EGG_QUEST - iftrue .bcec5 + iftrue .started_quest checkevent EVENT_DUDE_TALKED_TO_YOU iftrue MomPhoneLectureScript checkevent EVENT_GAVE_MYSTERY_EGG_TO_ELM @@ -9,7 +9,7 @@ MomPhoneCalleeScript: iftrue MomPhoneNoPokedexScript sjump MomPhoneNoPokemonScript -.bcec5 +.started_quest checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_8 iftrue MomPhoneHangUpScript farwritetext MomPhoneGreetingText diff --git a/engine/pokemon/bills_pc.asm b/engine/pokemon/bills_pc.asm index 5992beab4..5c2437749 100644 --- a/engine/pokemon/bills_pc.asm +++ b/engine/pokemon/bills_pc.asm @@ -513,16 +513,16 @@ _MovePKMNWithoutMail: inc a ld [wBillsPC_LoadedBox], a call DelayFrame -.asm_e2781 +.loop call JoyTextDelay ld a, [wJumptableIndex] bit 7, a - jr nz, .asm_e2793 + jr nz, .done call .RunJumptable call DelayFrame - jr .asm_e2781 + jr .loop -.asm_e2793 +.done call ClearSprites pop af ldh [hInMenu], a diff --git a/engine/pokemon/mon_submenu.asm b/engine/pokemon/mon_submenu.asm index 39c2c86bc..bd20b7c1f 100644 --- a/engine/pokemon/mon_submenu.asm +++ b/engine/pokemon/mon_submenu.asm @@ -245,7 +245,7 @@ AddMonMenuItem: ret BattleMonMenu: - ld hl, MenuHeader_0x24ed4 + ld hl, .MenuHeader call CopyMenuHeader xor a ldh [hBGMapMode], a @@ -276,13 +276,13 @@ BattleMonMenu: and a ret -MenuHeader_0x24ed4: +.MenuHeader: db 0 ; flags menu_coords 11, 11, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 - dw MenuData_0x24edc + dw .MenuData db 1 ; default option -MenuData_0x24edc: +.MenuData: db STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING ; flags db 3 ; items db "SWITCH@" diff --git a/engine/printer/printer.asm b/engine/printer/printer.asm index 19888ee9a..ebfe1a4dd 100644 --- a/engine/printer/printer.asm +++ b/engine/printer/printer.asm @@ -907,7 +907,7 @@ Printer_PlaceEmptyBoxSlotString: .loop push bc push hl - ld de, String84a25 + ld de, .EmptyBoxSlotString call PlaceString pop hl ld bc, 3 * SCREEN_WIDTH @@ -917,5 +917,5 @@ Printer_PlaceEmptyBoxSlotString: jr nz, .loop ret -String84a25: +.EmptyBoxSlotString: db " ------@" diff --git a/gfx/sgb/pal_packets.asm b/gfx/sgb/pal_packets.asm index 5dbf8e22e..b031e969c 100644 --- a/gfx/sgb/pal_packets.asm +++ b/gfx/sgb/pal_packets.asm @@ -28,7 +28,7 @@ PalPacket_BetaPoker: PalPacket_UnownPuzzle: sgb_pal_set UNOWN_PUZZLE, UNOWN_PUZZLE, UNOWN_PUZZLE, UNOWN_PUZZLE -PalPacket_Routes: +PalPacket_AllPal0: sgb_pal_set ROUTES, ROUTES, ROUTES, ROUTES PalPacket_GSIntroShellderLapras: diff --git a/home/region.asm b/home/region.asm index 4b303e396..493db214f 100644 --- a/home/region.asm +++ b/home/region.asm @@ -31,5 +31,5 @@ IsInJohto:: ld a, KANTO_REGION ret -Function2f3e:: ; dummied out +SetXYCompareFlags:: ; dummied out ret diff --git a/mobile/mobile_40.asm b/mobile/mobile_40.asm index 4f603ab4c..7828928ab 100644 --- a/mobile/mobile_40.asm +++ b/mobile/mobile_40.asm @@ -5276,7 +5276,7 @@ Function10250c: call Function102b9c call Function102bdc jr c, .asm_10256d - farcall Functionfb5dd + farcall CheckAnyOtherAliveMonsForTrade jr c, .asm_102568 ld hl, wcd4b set 1, [hl] diff --git a/wram.asm b/wram.asm index 8031fd5d2..5a0c071f4 100644 --- a/wram.asm +++ b/wram.asm @@ -2448,8 +2448,8 @@ wScriptTextAddr:: dw ds 1 wWildEncounterCooldown:: db -wXYComparePointer:: dw +wXYComparePointer:: dw ds 4 wBattleScriptFlags:: db