diff options
| author | Rangi <remy.oukaour+rangi42@gmail.com> | 2020-10-23 20:39:20 -0400 |
|---|---|---|
| committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2020-10-26 20:30:09 -0400 |
| commit | 46f6cc4d41494c044f1091491c712afc2a5bfd3a (patch) | |
| tree | fee103b542f99af23954d6610029b481e8f6742b /engine/battle | |
| parent | 26ddba8cfd8f035c06bd6419b64a6c4d7dbc226f (diff) | |
Comment, remove, or revise many unreferenced labels
Diffstat (limited to 'engine/battle')
| -rw-r--r-- | engine/battle/ai/items.asm | 8 | ||||
| -rw-r--r-- | engine/battle/battle_transition.asm | 2 | ||||
| -rw-r--r-- | engine/battle/core.asm | 17 | ||||
| -rw-r--r-- | engine/battle/effect_commands.asm | 15 | ||||
| -rw-r--r-- | engine/battle/menu.asm | 6 | ||||
| -rw-r--r-- | engine/battle/move_effects/baton_pass.asm | 2 |
6 files changed, 24 insertions, 26 deletions
diff --git a/engine/battle/ai/items.asm b/engine/battle/ai/items.asm index b375b54c..16e9ef20 100644 --- a/engine/battle/ai/items.asm +++ b/engine/battle/ai/items.asm @@ -25,7 +25,7 @@ AI_SwitchOrTryItem: ld hl, TrainerClassAttributes + TRNATTR_AI_ITEM_SWITCH ld bc, NUM_TRAINER_ATTRIBUTES call AddNTimes -.ok + bit SWITCH_OFTEN_F, [hl] jp nz, SwitchOften bit SWITCH_RARELY_F, [hl] @@ -141,7 +141,7 @@ SwitchSometimes: ld [wEnemySwitchMonIndex], a jp AI_TrySwitch -CheckSubstatusCantRun: +CheckSubstatusCantRun: ; unreferenced ld a, [wEnemySubStatus5] bit SUBSTATUS_CANT_RUN, a ret @@ -204,7 +204,7 @@ AI_TryItem: inc hl jr c, .loop -.used_item +; used item xor a ld [de], a inc a @@ -247,7 +247,7 @@ AI_TryItem: cp e jr nc, .yes -.no +.no ; unreferenced and a ret diff --git a/engine/battle/battle_transition.asm b/engine/battle/battle_transition.asm index 105248f0..611702b3 100644 --- a/engine/battle/battle_transition.asm +++ b/engine/battle/battle_transition.asm @@ -396,7 +396,7 @@ ENDM spin_quadrant LOWER_LEFT, .wedge1, 1, 11 db -1 -.load +.load: ld a, [hli] ld e, a ld a, [hli] diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 4a580aca..24b79b7c 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -1644,7 +1644,7 @@ HandleWeather: cp USING_EXTERNAL_CLOCK jr z, .enemy_first -.player_first +; player first call SetPlayerTurn call .SandstormDamage call SetEnemyTurn @@ -2609,7 +2609,7 @@ AskUseNextPokemon: ForcePlayerMonChoice: call EmptyBattleTextbox call LoadStandardMenuHeader - call SetUpBattlePartyMenu_NoLoop + call SetUpBattlePartyMenu call ForcePickPartyMonInBattle ld a, [wLinkMode] cp LINK_COLOSSEUM @@ -2681,9 +2681,8 @@ PlayerPartyMonEntrance: call SetPlayerTurn jp SpikesDamage -SetUpBattlePartyMenu_NoLoop: +SetUpBattlePartyMenu: call ClearBGPalettes -SetUpBattlePartyMenu: ; switch to fullscreen menu? farcall LoadPartyMenuGFX farcall InitPartyMenuWithCancel farcall InitPartyMenuGFX @@ -3296,7 +3295,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] @@ -8005,7 +8004,7 @@ CheckPayDay: call StdBattleTextbox ret -PlayerPickedUpPayDayMoney: +PlayerPickedUpPayDayMoney: ; unreferenced text_far _PlayerPickedUpPayDayMoney text_end @@ -8180,7 +8179,6 @@ ReadAndPrintLinkBattleRecord: lb bc, 2, 4 call PrintNum -.quit ret .PrintZerosIfNoSaveFileExists: @@ -8556,14 +8554,15 @@ InitBattleDisplay: call OpenSRAM ld hl, sDecompressScratch - ld bc, sScratchAttrmap - sDecompressScratch + ld bc, BG_MAP_WIDTH * BG_MAP_HEIGHT ld a, " " call ByteFill ld de, sDecompressScratch hlbgcoord 0, 0 - lb bc, BANK(.BlankBGMap), $40 + lb bc, BANK(@), (BG_MAP_WIDTH * BG_MAP_HEIGHT) / LEN_2BPP_TILE call Request2bpp + call CloseSRAM ret diff --git a/engine/battle/effect_commands.asm b/engine/battle/effect_commands.asm index a5ae950f..7317407a 100644 --- a/engine/battle/effect_commands.asm +++ b/engine/battle/effect_commands.asm @@ -145,7 +145,7 @@ BattleCommand_CheckTurn: and a jp nz, CheckEnemyTurn -CheckPlayerTurn: +; check player turn ld hl, wPlayerSubStatus4 bit SUBSTATUS_RECHARGE, [hl] jr z, .no_recharge @@ -2592,7 +2592,7 @@ PlayerAttackDamage: cp SPECIAL jr nc, .special -.physical +; physical ld hl, wEnemyMonDefense ld a, [hli] ld b, a @@ -2660,7 +2660,6 @@ PlayerAttackDamage: ret TruncateHL_BC: -.loop ; Truncate 16-bit values hl and bc to 8-bit values b and c respectively. ; b = hl, c = bc @@ -2821,9 +2820,9 @@ EnemyAttackDamage: ld a, [hl] cp SPECIAL - jr nc, .Special + jr nc, .special -.physical +; physical ld hl, wBattleMonDefense ld a, [hli] ld b, a @@ -2847,7 +2846,7 @@ EnemyAttackDamage: ld hl, wEnemyAttack jr .thickclub -.Special: +.special ld hl, wBattleMonSpclDef ld a, [hli] ld b, a @@ -6075,7 +6074,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 @@ -6098,7 +6097,7 @@ BattleCommand_ResetStats: jp StdBattleTextbox .Fill: - ld b, wPlayerStatLevelsEnd - wPlayerStatLevels + ld b, NUM_LEVEL_STATS .next ld [hli], a dec b diff --git a/engine/battle/menu.asm b/engine/battle/menu.asm index 6a942f6c..e9a7e593 100644 --- a/engine/battle/menu.asm +++ b/engine/battle/menu.asm @@ -3,8 +3,7 @@ LoadBattleMenu: call LoadMenuHeader jr CommonBattleMenu -SafariBattleMenu: -; untranslated +SafariBattleMenu: ; unreferenced ld hl, SafariBattleMenuHeader call LoadMenuHeader jr CommonBattleMenu @@ -12,7 +11,8 @@ SafariBattleMenu: ContestBattleMenu: ld hl, ContestBattleMenuHeader call LoadMenuHeader -; fallthrough + ; fallthrough + CommonBattleMenu: ld a, [wBattleMenuCursorBuffer] ld [wMenuCursorBuffer], a diff --git a/engine/battle/move_effects/baton_pass.asm b/engine/battle/move_effects/baton_pass.asm index bf9e3235..236acc82 100644 --- a/engine/battle/move_effects/baton_pass.asm +++ b/engine/battle/move_effects/baton_pass.asm @@ -17,7 +17,7 @@ BattleCommand_BatonPass: ; Transition into switchmon menu call LoadStandardMenuHeader - farcall SetUpBattlePartyMenu_NoLoop + farcall SetUpBattlePartyMenu farcall ForcePickSwitchMonInBattle |
