Comment, remove, or revise many unreferenced labels

This commit is contained in:
Rangi
2020-10-26 15:45:57 -04:00
parent a2b6befd7d
commit 9dcdad5e60
180 changed files with 810 additions and 1032 deletions

View File

@@ -20,8 +20,9 @@ AI_SwitchOrTryItem:
and a
jr nz, DontSwitch
; always load the first trainer class in wTrainerClass for Battle Tower trainers
ld hl, TrainerClassAttributes + TRNATTR_AI_ITEM_SWITCH
ld a, [wInBattleTowerBattle] ; always load the first trainer class in wTrainerClass for BattleTower-Trainers
ld a, [wInBattleTowerBattle]
and a
jr nz, .ok
@@ -29,6 +30,7 @@ AI_SwitchOrTryItem:
dec a
ld bc, NUM_TRAINER_ATTRIBUTES
call AddNTimes
.ok
bit SWITCH_OFTEN_F, [hl]
jp nz, SwitchOften
@@ -145,13 +147,13 @@ SwitchSometimes:
ld [wEnemySwitchMonIndex], a
jp AI_TrySwitch
CheckSubstatusCantRun:
CheckSubstatusCantRun: ; unreferenced
ld a, [wEnemySubStatus5]
bit SUBSTATUS_CANT_RUN, a
ret
AI_TryItem:
; items are not allowed in the BattleTower
; items are not allowed in the Battle Tower
ld a, [wInBattleTowerBattle]
and a
ret nz
@@ -213,7 +215,7 @@ AI_TryItem:
inc hl
jr c, .loop
.used_item
; used item
xor a
ld [de], a
inc a
@@ -259,7 +261,7 @@ AI_TryItem:
cp e
jr nc, .yes
.no
.no ; unreferenced
and a
ret

View File

@@ -449,7 +449,7 @@ ENDM
spin_quadrant LOWER_LEFT, .wedge1, 1, 11
db -1
.load
.load:
ld a, [hli]
ld e, a
ld a, [hli]

View File

@@ -1697,7 +1697,7 @@ HandleWeather:
cp USING_EXTERNAL_CLOCK
jr z, .enemy_first
.player_first
; player first
call SetPlayerTurn
call .SandstormDamage
call SetEnemyTurn
@@ -2711,7 +2711,7 @@ AskUseNextPokemon:
ForcePlayerMonChoice:
call EmptyBattleTextbox
call LoadStandardMenuHeader
call SetUpBattlePartyMenu_NoLoop
call SetUpBattlePartyMenu
call ForcePickPartyMonInBattle
ld a, [wLinkMode]
and a
@@ -2810,9 +2810,9 @@ IsMobileBattle:
cp LINK_MOBILE
ret
SetUpBattlePartyMenu_NoLoop:
SetUpBattlePartyMenu:
call ClearBGPalettes
SetUpBattlePartyMenu: ; switch to fullscreen menu?
SetUpBattlePartyMenu_Loop: ; switch to fullscreen menu?
farcall LoadPartyMenuGFX
farcall InitPartyMenuWithCancel
farcall InitPartyMenuBGPal7
@@ -3486,7 +3486,7 @@ OfferSwitch:
ld a, [wMenuCursorY]
dec a
jr nz, .said_no
call SetUpBattlePartyMenu_NoLoop
call SetUpBattlePartyMenu
call PickSwitchMonInBattle
jr c, .canceled_switch
ld a, [wCurBattleMon]
@@ -5043,7 +5043,7 @@ BattleMenuPKMN_ReturnFromStats:
call LoadStandardMenuHeader
call ClearBGPalettes
BattleMenuPKMN_Loop:
call SetUpBattlePartyMenu
call SetUpBattlePartyMenu_Loop
xor a
ld [wPartyMenuActionText], a
call JumpToPartyMenuAndPrintText
@@ -8952,13 +8952,13 @@ InitBattleDisplay:
ldh [rSVBK], a
ld hl, wDecompressScratch
ld bc, wScratchAttrmap - wDecompressScratch
ld bc, BG_MAP_WIDTH * BG_MAP_HEIGHT
ld a, " "
call ByteFill
ld de, wDecompressScratch
hlbgcoord 0, 0
lb bc, BANK(.BlankBGMap), $40
lb bc, BANK(@), (BG_MAP_WIDTH * BG_MAP_HEIGHT) / LEN_2BPP_TILE
call Request2bpp
pop af

View File

@@ -134,7 +134,7 @@ BattleCommand_CheckTurn:
and a
jp nz, CheckEnemyTurn
CheckPlayerTurn:
; check player turn
ld hl, wPlayerSubStatus4
bit SUBSTATUS_RECHARGE, [hl]
jr z, .no_recharge
@@ -2586,7 +2586,7 @@ PlayerAttackDamage:
cp SPECIAL
jr nc, .special
.physical
; physical
ld hl, wEnemyMonDefense
ld a, [hli]
ld b, a
@@ -2826,9 +2826,9 @@ EnemyAttackDamage:
ld a, [hl]
cp SPECIAL
jr nc, .Special
jr nc, .special
.physical
; physical
ld hl, wBattleMonDefense
ld a, [hli]
ld b, a
@@ -2852,7 +2852,7 @@ EnemyAttackDamage:
ld hl, wEnemyAttack
jr .thickclub
.Special:
.special
ld hl, wBattleMonSpclDef
ld a, [hli]
ld b, a
@@ -6124,7 +6124,7 @@ INCLUDE "engine/battle/move_effects/conversion.asm"
BattleCommand_ResetStats:
; resetstats
ld a, 7 ; neutral
ld a, BASE_STAT_LEVEL
ld hl, wPlayerStatLevels
call .Fill
ld hl, wEnemyStatLevels
@@ -6147,7 +6147,7 @@ BattleCommand_ResetStats:
jp StdBattleTextbox
.Fill:
ld b, wPlayerStatLevelsEnd - wPlayerStatLevels
ld b, NUM_LEVEL_STATS
.next
ld [hli], a
dec b

View File

@@ -9,8 +9,7 @@ LoadBattleMenu:
call ExitMenu
ret
SafariBattleMenu:
; untranslated
SafariBattleMenu: ; unreferenced
ld hl, SafariBattleMenuHeader
call LoadMenuHeader
jr CommonBattleMenu
@@ -18,7 +17,8 @@ SafariBattleMenu:
ContestBattleMenu:
ld hl, ContestBattleMenuHeader
call LoadMenuHeader
; fallthrough
; fallthrough
CommonBattleMenu:
ld a, [wBattleMenuCursorBuffer]
ld [wMenuCursorBuffer], a

View File

@@ -17,7 +17,7 @@ BattleCommand_BatonPass:
; Transition into switchmon menu
call LoadStandardMenuHeader
farcall SetUpBattlePartyMenu_NoLoop
farcall SetUpBattlePartyMenu
farcall ForcePickSwitchMonInBattle