From 930d285fab94fde5e061efa80dc41d478f19fcff Mon Sep 17 00:00:00 2001 From: mid-kid Date: Tue, 25 Dec 2018 18:49:54 +0100 Subject: [PATCH] Fix comments around BANK() statements Found a couple BANK()s that reference multiple labels. --- engine/battle/core.asm | 4 ++-- engine/battle/move_effects/present.asm | 2 +- engine/battle_anims/anim_commands.asm | 2 +- engine/events/print_unown.asm | 2 +- home/battle.asm | 3 ++- home/init.asm | 2 +- home/scrolling_menu.asm | 2 +- 7 files changed, 9 insertions(+), 8 deletions(-) diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 5c34ddd20..56d42974f 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -4154,7 +4154,7 @@ PursuitSwitch: ld a, [wLastPlayerMon] ld [wCurBattleMon], a .do_turn - ld a, BANK(DoPlayerTurn) + ld a, BANK(DoPlayerTurn) ; and BANK(DoEnemyTurn) rst FarCall ld a, BATTLE_VARS_MOVE @@ -4404,7 +4404,7 @@ UseHeldStatusHealingItem: .got_pointer call SwitchTurnCore - ld a, BANK(CalcEnemyStats) + ld a, BANK(CalcPlayerStats) ; and BANK(CalcEnemyStats) rst FarCall call SwitchTurnCore call ItemRecoveryAnim diff --git a/engine/battle/move_effects/present.asm b/engine/battle/move_effects/present.asm index 35713927b..058bbad90 100644 --- a/engine/battle/move_effects/present.asm +++ b/engine/battle/move_effects/present.asm @@ -59,7 +59,7 @@ BattleCommand_Present: jr z, .got_hp_fn_pointer ld hl, AICheckEnemyMaxHP .got_hp_fn_pointer - ld a, BANK(AICheckPlayerMaxHP) + ld a, BANK(AICheckPlayerMaxHP) ; and BANK(AICheckEnemyMaxHP) rst FarCall jr c, .already_fully_healed diff --git a/engine/battle_anims/anim_commands.asm b/engine/battle_anims/anim_commands.asm index 6cc2d6620..48ba967f2 100644 --- a/engine/battle_anims/anim_commands.asm +++ b/engine/battle_anims/anim_commands.asm @@ -1340,7 +1340,7 @@ BattleAnimAssignPals: call DmgToCgbObjPals ret -ClearBattleAnims: +ClearBattleAnims:: ; Clear animation block ld hl, wLYOverrides ld bc, wBattleAnimEnd - wLYOverrides diff --git a/engine/events/print_unown.asm b/engine/events/print_unown.asm index fb0abd52b..ffb098745 100644 --- a/engine/events/print_unown.asm +++ b/engine/events/print_unown.asm @@ -19,7 +19,7 @@ _UnownPrinter: ld de, UnownDexATile ld hl, vTiles0 tile UNOWNSTAMP_BOLD_A - lb bc, BANK(UnownDexBTile), 1 + lb bc, BANK(UnownDexATile), 1 call Request1bpp ld de, UnownDexBTile diff --git a/home/battle.asm b/home/battle.asm index 407ef44c8..37c2e7b1c 100644 --- a/home/battle.asm +++ b/home/battle.asm @@ -190,7 +190,8 @@ GetBattleAnimPointer:: ld a, [hl] ld [wBattleAnimAddress + 1], a - ld a, BANK(BattleAnimCommands) + ; ClearBattleAnims is the only function that calls this... + ld a, BANK(ClearBattleAnims) rst Bankswitch ret diff --git a/home/init.asm b/home/init.asm index 0c670737a..5ee86bd1a 100644 --- a/home/init.asm +++ b/home/init.asm @@ -97,7 +97,7 @@ Init:: call ClearSprites call ClearsScratch - ld a, BANK(WriteOAMDMACodeToHRAM) + ld a, BANK(GameInit) ; and BANK(WriteOAMDMACodeToHRAM) rst Bankswitch call WriteOAMDMACodeToHRAM diff --git a/home/scrolling_menu.asm b/home/scrolling_menu.asm index 1ed9d0682..74015c704 100644 --- a/home/scrolling_menu.asm +++ b/home/scrolling_menu.asm @@ -3,7 +3,7 @@ ScrollingMenu:: ldh a, [hROMBank] push af - ld a, BANK(_ScrollingMenu) + ld a, BANK(_ScrollingMenu) ; and BANK(_InitScrollingMenu) rst Bankswitch call _InitScrollingMenu