From 561c0c8ed0fde34d474f5460aae459dcd031c7b1 Mon Sep 17 00:00:00 2001 From: luckytyphlosion Date: Sat, 9 Apr 2016 18:21:55 -0400 Subject: Replace bankswitch jumps with jpab, also fix hardcoded bank reference. --- engine/battle/moveEffects/reflect_light_screen_effect.asm | 2 +- home.asm | 4 +--- home/overworld.asm | 12 +++--------- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/engine/battle/moveEffects/reflect_light_screen_effect.asm b/engine/battle/moveEffects/reflect_light_screen_effect.asm index c9e43715..1c2db0a0 100644 --- a/engine/battle/moveEffects/reflect_light_screen_effect.asm +++ b/engine/battle/moveEffects/reflect_light_screen_effect.asm @@ -41,5 +41,5 @@ ReflectGainedArmorText: ; f64a2 (3d:64a2) db "@" Bankswitch3DtoF: ; f64a7 (3d:64a7) - ld b, $f ; BANK(BattleCore) + ld b, BANK(BattleCore) jp Bankswitch diff --git a/home.asm b/home.asm index 7c6a0aad..233b00be 100644 --- a/home.asm +++ b/home.asm @@ -4741,9 +4741,7 @@ IsInRestOfArray:: ; 3da9 (0:3da9) ret InitMapSprites:: ; 3dba (0:3dba) - ld hl, _InitMapSprites ; 1401b (5:401b) - ld b,BANK(_InitMapSprites) - jp Bankswitch + jpab _InitMapSprites RestoreScreenTilesAndReloadTilePatterns:: ; 3dc2 (0:3dc2) call ClearSprites diff --git a/home/overworld.asm b/home/overworld.asm index 7a3e6cac..48b94072 100644 --- a/home/overworld.asm +++ b/home/overworld.asm @@ -2030,9 +2030,7 @@ Func_0f3d:: ; 0f3d (0:0f3d) pop af call BankswitchCommon asm_0f4d: ; 0f4d (0:0f4d) - ld hl, Func_f02da - ld b,BANK(Func_f02da) ; 3c:42da - jp Bankswitch + jpab Func_f02da ret ; useless? ResetMapVariables:: ; 0f56 (0:0f56) @@ -2143,14 +2141,10 @@ IsSpinning:: ; 0ff0 (0:0ff0) ld a,[wd736] bit 7,a ret z ; no spinning - ld b, BANK(LoadSpinnerArrowTiles); spin while moving - ld hl,LoadSpinnerArrowTiles ; 11:5077 - jp Bankswitch + jpab LoadSpinnerArrowTiles ; spin while moving Func_0ffe:: ; 0ffe (0:0ffe) - ld hl, IsPlayerTalkingToPikachu ; 3f:4f0c - ld b, BANK(IsPlayerTalkingToPikachu) - jp Bankswitch + jpab IsPlayerTalkingToPikachu InitSprites:: ; 1006 (0:1006) ld a,[hli] -- cgit v1.3.1-sl0p