jpab/jpba macros

This commit is contained in:
YamaArashi 2015-07-19 11:56:13 -07:00
parent 64b4cf624f
commit 02bd91b707
22 changed files with 66 additions and 162 deletions

View file

@ -187,9 +187,7 @@ SlidePlayerAndEnemySilhouettesOnScreen: ; 3c04c (f:404c)
ld b, $1 ld b, $1
call GoPAL_SET call GoPAL_SET
call HideSprites call HideSprites
ld hl, PrintBeginningBattleText jpab PrintBeginningBattleText
ld b, BANK(PrintBeginningBattleText)
jp Bankswitch
; when a battle is starting, silhouettes of the player's pic and the enemy's pic are slid onto the screen ; when a battle is starting, silhouettes of the player's pic and the enemy's pic are slid onto the screen
; the lower of the player's pic (his body) is part of the background, but his head is a sprite ; the lower of the player's pic (his body) is part of the background, but his head is a sprite
@ -359,9 +357,7 @@ EnemyRan: ; 3c202 (f:4202)
call PlaySoundWaitForCurrent call PlaySoundWaitForCurrent
xor a xor a
ld [H_WHOSETURN], a ld [H_WHOSETURN], a
ld hl, AnimationSlideEnemyMonOut jpab AnimationSlideEnemyMonOut
ld b, BANK(AnimationSlideEnemyMonOut)
jp Bankswitch
WildRanText: ; 3c229 (f:4229) WildRanText: ; 3c229 (f:4229)
TX_FAR _WildRanText TX_FAR _WildRanText
@ -938,9 +934,7 @@ FaintEnemyPokemon: ; 0x3c567
jr nz, .gainExpFlagsLoop jr nz, .gainExpFlagsLoop
ld a, b ld a, b
ld [wPartyGainExpFlags], a ld [wPartyGainExpFlags], a
ld hl, GainExperience jpab GainExperience
ld b, BANK(GainExperience)
jp Bankswitch
EnemyMonFaintedText: ; 0x3c63e EnemyMonFaintedText: ; 0x3c63e
TX_FAR _EnemyMonFaintedText TX_FAR _EnemyMonFaintedText
@ -6462,14 +6456,10 @@ LoadPlayerBackPic: ; 3ec92 (f:6c92)
; does nothing since no stats are ever selected (barring glitches) ; does nothing since no stats are ever selected (barring glitches)
DoubleOrHalveSelectedStats: ; 3ed02 (f:6d02) DoubleOrHalveSelectedStats: ; 3ed02 (f:6d02)
callab DoubleSelectedStats callab DoubleSelectedStats
ld hl, HalveSelectedStats jpab HalveSelectedStats
ld b, BANK(HalveSelectedStats)
jp Bankswitch
ScrollTrainerPicAfterBattle: ; 3ed12 (f:6d12) ScrollTrainerPicAfterBattle: ; 3ed12 (f:6d12)
ld hl, _ScrollTrainerPicAfterBattle jpab _ScrollTrainerPicAfterBattle
ld b, BANK(_ScrollTrainerPicAfterBattle)
jp Bankswitch
ApplyBurnAndParalysisPenaltiesToPlayer: ; 3ed1a (f:6d1a) ApplyBurnAndParalysisPenaltiesToPlayer: ; 3ed1a (f:6d1a)
ld a, $1 ld a, $1
@ -7372,9 +7362,7 @@ BadlyPoisonedText: ; 3f2e4 (f:72e4)
db "@" db "@"
DrainHPEffect: ; 3f2e9 (f:72e9) DrainHPEffect: ; 3f2e9 (f:72e9)
ld hl, DrainHPEffect_ jpab DrainHPEffect_
ld b, BANK(DrainHPEffect_)
jp Bankswitch
ExplodeEffect: ; 3f2f1 (f:72f1) ExplodeEffect: ; 3f2f1 (f:72f1)
ld hl, wBattleMonHP ld hl, wBattleMonHP
@ -8209,9 +8197,7 @@ FlinchSideEffect: ; 3f85b (f:785b)
ret ret
OneHitKOEffect: ; 3f884 (f:7884) OneHitKOEffect: ; 3f884 (f:7884)
ld hl, OneHitKOEffect_ jpab OneHitKOEffect_
ld b, BANK(OneHitKOEffect_)
jp Bankswitch
ChargeEffect: ; 3f88c (f:788c) ChargeEffect: ; 3f88c (f:788c)
ld hl, W_PLAYERBATTSTATUS1 ld hl, W_PLAYERBATTSTATUS1
@ -8321,19 +8307,13 @@ TrappingEffect: ; 3f917 (f:7917)
ret ret
MistEffect: ; 3f941 (f:7941) MistEffect: ; 3f941 (f:7941)
ld hl, MistEffect_ jpab MistEffect_
ld b, BANK(MistEffect_)
jp Bankswitch
FocusEnergyEffect: ; 3f949 (f:7949) FocusEnergyEffect: ; 3f949 (f:7949)
ld hl, FocusEnergyEffect_ jpab FocusEnergyEffect_
ld b, BANK(FocusEnergyEffect_)
jp Bankswitch
RecoilEffect: ; 3f951 (f:7951) RecoilEffect: ; 3f951 (f:7951)
ld hl, RecoilEffect_ jpab RecoilEffect_
ld b, BANK(RecoilEffect_)
jp Bankswitch
ConfusionSideEffect: ; 3f959 (f:7959) ConfusionSideEffect: ; 3f959 (f:7959)
call BattleRandom call BattleRandom
@ -8387,14 +8367,10 @@ ConfusionEffectFailed: ; 3f9a6 (f:79a6)
jp ConditionalPrintButItFailed jp ConditionalPrintButItFailed
ParalyzeEffect: ; 3f9b1 (f:79b1) ParalyzeEffect: ; 3f9b1 (f:79b1)
ld hl, ParalyzeEffect_ jpab ParalyzeEffect_
ld b, BANK(ParalyzeEffect_)
jp Bankswitch
SubstituteEffect: ; 3f9b9 (f:79b9) SubstituteEffect: ; 3f9b9 (f:79b9)
ld hl, SubstituteEffect_ jpab SubstituteEffect_
ld b, BANK(SubstituteEffect_)
jp Bankswitch
HyperBeamEffect: ; 3f9c1 (f:79c1) HyperBeamEffect: ; 3f9c1 (f:79c1)
ld hl, W_PLAYERBATTSTATUS2 ld hl, W_PLAYERBATTSTATUS2
@ -8505,9 +8481,7 @@ MimicLearnedMoveText: ; 3fa77 (f:7a77)
db "@" db "@"
LeechSeedEffect: ; 3fa7c (f:7a7c) LeechSeedEffect: ; 3fa7c (f:7a7c)
ld hl, LeechSeedEffect_ jpab LeechSeedEffect_
ld b, BANK(LeechSeedEffect_)
jp Bankswitch
SplashEffect: ; 3fa84 (f:7a84) SplashEffect: ; 3fa84 (f:7a84)
call PlayCurrentMoveAnimation call PlayCurrentMoveAnimation
@ -8601,34 +8575,22 @@ MoveWasDisabledText: ; 3fb09 (f:7b09)
db "@" db "@"
PayDayEffect: ; 3fb0e (f:7b0e) PayDayEffect: ; 3fb0e (f:7b0e)
ld hl, PayDayEffect_ jpab PayDayEffect_
ld b, BANK(PayDayEffect_)
jp Bankswitch
ConversionEffect: ; 3fb16 (f:7b16) ConversionEffect: ; 3fb16 (f:7b16)
ld hl, ConversionEffect_ jpab ConversionEffect_
ld b, BANK(ConversionEffect_)
jp Bankswitch
HazeEffect: ; 3fb1e (f:7b1e) HazeEffect: ; 3fb1e (f:7b1e)
ld hl, HazeEffect_ jpab HazeEffect_
ld b, BANK(HazeEffect_)
jp Bankswitch
HealEffect: ; 3fb26 (f:7b26) HealEffect: ; 3fb26 (f:7b26)
ld hl, HealEffect_ jpab HealEffect_
ld b, BANK(HealEffect_)
jp Bankswitch
TransformEffect: ; 3fb2e (f:7b2e) TransformEffect: ; 3fb2e (f:7b2e)
ld hl, TransformEffect_ jpab TransformEffect_
ld b, BANK(TransformEffect_)
jp Bankswitch
ReflectLightScreenEffect: ; 3fb36 (f:7b36) ReflectLightScreenEffect: ; 3fb36 (f:7b36)
ld hl, ReflectLightScreenEffect_ jpab ReflectLightScreenEffect_
ld b, BANK(ReflectLightScreenEffect_)
jp Bankswitch
NothingHappenedText: ; 3fb3e (f:7b3e) NothingHappenedText: ; 3fb3e (f:7b3e)
TX_FAR _NothingHappenedText TX_FAR _NothingHappenedText

View file

@ -35,6 +35,4 @@ InitBattleVariables: ; 525af (14:65af)
ld a, $2 ; safari battle ld a, $2 ; safari battle
ld [W_BATTLETYPE], a ld [W_BATTLETYPE], a
.notSafariBattle .notSafariBattle
ld hl, PlayBattleMusic jpab PlayBattleMusic
ld b, BANK(PlayBattleMusic)
jp Bankswitch

View file

@ -14,9 +14,7 @@ FocusEnergyEffect_: ; 27f86 (9:7f86)
.alreadyUsing .alreadyUsing
ld c, 50 ld c, 50
call DelayFrames call DelayFrames
ld hl, PrintButItFailedText_ jpab PrintButItFailedText_
ld b, BANK(PrintButItFailedText_)
jp Bankswitch
GettingPumpedText: ; 27fb3 (9:7fb3) GettingPumpedText: ; 27fb3 (9:7fb3)
db $0a db $0a

View file

@ -12,9 +12,7 @@ MistEffect_: ; 33f2b (c:7f2b)
ld hl, ShroudedInMistText ld hl, ShroudedInMistText
jp PrintText jp PrintText
.mistAlreadyInUse .mistAlreadyInUse
ld hl, PrintButItFailedText_ jpab PrintButItFailedText_
ld b, BANK(PrintButItFailedText_)
jp Bankswitch
ShroudedInMistText: ; 33f52 (c:7f52) ShroudedInMistText: ; 33f52 (c:7f52)
TX_FAR _ShroudedInMistText TX_FAR _ShroudedInMistText

View file

@ -36,18 +36,12 @@ ParalyzeEffect_: ; 52601 (14:6601)
ld c, 30 ld c, 30
call DelayFrames call DelayFrames
callab PlayCurrentMoveAnimation callab PlayCurrentMoveAnimation
ld hl, PrintMayNotAttackText jpab PrintMayNotAttackText
ld b, BANK(PrintMayNotAttackText)
jp Bankswitch
.didntAffect .didntAffect
ld c, 50 ld c, 50
call DelayFrames call DelayFrames
ld hl, PrintDidntAffectText jpab PrintDidntAffectText
ld b, BANK(PrintDidntAffectText)
jp Bankswitch
.doesntAffect .doesntAffect
ld c, 50 ld c, 50
call DelayFrames call DelayFrames
ld hl, PrintDoesntAffectText jpab PrintDoesntAffectText
ld b, BANK(PrintDoesntAffectText)
jp Bankswitch

View file

@ -55,9 +55,7 @@ SubstituteEffect_: ; 17dad (5:7dad)
call Bankswitch ; jump to routine depending on animation setting call Bankswitch ; jump to routine depending on animation setting
ld hl, SubstituteText ld hl, SubstituteText
call PrintText call PrintText
ld hl, DrawHUDsAndHPBars jpab DrawHUDsAndHPBars
ld b, BANK(DrawHUDsAndHPBars)
jp Bankswitch
.alreadyHasSubstitute .alreadyHasSubstitute
ld hl, HasSubstituteText ld hl, HasSubstituteText
jr .printText jr .printText

View file

@ -34,9 +34,7 @@ PrintBookshelfText: ; fb50 (3:7b50)
.noMatch .noMatch
ld a, $ff ld a, $ff
ld [$ffdb], a ld [$ffdb], a
ld b, BANK(PrintCardKeyText) jpba PrintCardKeyText
ld hl, PrintCardKeyText
jp Bankswitch
; format: db tileset id, bookshelf tile id, text id ; format: db tileset id, bookshelf tile id, text id
BookshelfTileIDs: ; fb8b (3:7b8b) BookshelfTileIDs: ; fb8b (3:7b8b)

View file

@ -159,9 +159,7 @@ InGameTrade_RestoreScreen: ; 71ca2 (1c:5ca2)
call LoadGBPal call LoadGBPal
ld c, 10 ld c, 10
call DelayFrames call DelayFrames
ld b, BANK(LoadWildData) jpba LoadWildData
ld hl, LoadWildData
jp Bankswitch
InGameTrade_PrepareTradeData: ; 71cc1 (1c:5cc1) InGameTrade_PrepareTradeData: ; 71cc1 (1c:5cc1)
ld hl, wTradedPlayerMonSpecies ld hl, wTradedPlayerMonSpecies

View file

@ -499,9 +499,7 @@ ItemUseTownMap: ; d968 (3:5968)
ld a,[W_ISINBATTLE] ld a,[W_ISINBATTLE]
and a and a
jp nz,ItemUseNotTime jp nz,ItemUseNotTime
ld b, BANK(DisplayTownMap) jpba DisplayTownMap
ld hl, DisplayTownMap
jp Bankswitch ; display Town Map
ItemUseBicycle: ; d977 (3:5977) ItemUseBicycle: ; d977 (3:5977)
ld a,[W_ISINBATTLE] ld a,[W_ISINBATTLE]

View file

@ -110,9 +110,7 @@ LeaguePCShowMon: ; 76610 (1d:6610)
ld de, wHoFTeamNo ld de, wHoFTeamNo
ld bc, $0103 ld bc, $0103
call PrintNumber call PrintNumber
ld b, BANK(HoFDisplayMonInfo) jpba HoFDisplayMonInfo
ld hl, HoFDisplayMonInfo
jp Bankswitch
HallOfFameNoText: ; 76670 (1d:6670) HallOfFameNoText: ; 76670 (1d:6670)
db "HALL OF FAME No @" db "HALL OF FAME No @"

View file

@ -172,9 +172,7 @@ DisplayNamingScreen: ; 6596 (1:6596)
ld a, [W_ISINBATTLE] ld a, [W_ISINBATTLE]
and a and a
jp z, LoadTextBoxTilePatterns jp z, LoadTextBoxTilePatterns
ld hl, LoadHudTilePatterns jpab LoadHudTilePatterns
ld b, BANK(LoadHudTilePatterns)
jp Bankswitch
.namingScreenButtonFunctions .namingScreenButtonFunctions
dw .dPadReturnPoint dw .dPadReturnPoint

View file

@ -111,9 +111,7 @@ Func_72a8: ; 72a8 (1:72a8)
xor a xor a
ld [hld], a ld [hld], a
ld [hl], a ld [hl], a
ld hl, LinkMenu jpab LinkMenu
ld b, BANK(LinkMenu)
jp Bankswitch
CableClubNPCAreaReservedFor2FriendsLinkedByCableText: ; 72b3 (1:72b3) CableClubNPCAreaReservedFor2FriendsLinkedByCableText: ; 72b3 (1:72b3)
TX_FAR _CableClubNPCAreaReservedFor2FriendsLinkedByCableText TX_FAR _CableClubNPCAreaReservedFor2FriendsLinkedByCableText

View file

@ -10,9 +10,7 @@ RemoveGuardDrink: ; 5a59f (16:659f)
call IsItemInBag call IsItemInBag
pop hl pop hl
jr z, .drinkLoop jr z, .drinkLoop
ld b, BANK(RemoveItemByID) jpba RemoveItemByID
ld hl, RemoveItemByID
jp Bankswitch
GuardDrinksList: ; 5a5b7 (16:65b7) GuardDrinksList: ; 5a5b7 (16:65b7)
db FRESH_WATER, SODA_POP, LEMONADE, $00 db FRESH_WATER, SODA_POP, LEMONADE, $00

View file

@ -262,9 +262,7 @@ ENDC
jp MainMenu jp MainMenu
.doClearSaveDialogue .doClearSaveDialogue
ld b, BANK(DoClearSaveDialogue) jpba DoClearSaveDialogue
ld hl, DoClearSaveDialogue
jp Bankswitch
TitleScreenPickNewMon: ; 4496 (1:4496) TitleScreenPickNewMon: ; 4496 (1:4496)
ld a, vBGMap0 / $100 ld a, vBGMap0 / $100

View file

@ -199,9 +199,7 @@ LoadTradingGFXAndMonNames: ; 411a1 (10:51a1)
Trade_LoadMonPartySpriteGfx: ; 4120b (10:520b) Trade_LoadMonPartySpriteGfx: ; 4120b (10:520b)
ld a, %11010000 ld a, %11010000
ld [rOBP1], a ld [rOBP1], a
ld b, BANK(LoadMonPartySpriteGfx) jpba LoadMonPartySpriteGfx
ld hl, LoadMonPartySpriteGfx
jp Bankswitch
Trade_SwapNames: ; 41217 (10:5217) Trade_SwapNames: ; 41217 (10:5217)
ld hl, wPlayerName ld hl, wPlayerName

View file

@ -253,9 +253,7 @@ DrawHPBar:: ; 1336 (0:1336)
; wLoadedMon = base address of pokemon data ; wLoadedMon = base address of pokemon data
; W_MONHDEXNUM = base address of base stats ; W_MONHDEXNUM = base address of base stats
LoadMonData:: ; 1372 (0:1372) LoadMonData:: ; 1372 (0:1372)
ld hl, LoadMonData_ jpab LoadMonData_
ld b, BANK(LoadMonData_)
jp Bankswitch
OverwritewMoves:: ; 137a (0:137a) OverwritewMoves:: ; 137a (0:137a)
@ -1317,9 +1315,7 @@ CountSetBits:: ; 2b7f (0:2b7f)
; subtracts the amount the player paid from their money ; subtracts the amount the player paid from their money
; sets carry flag if there is enough money and unsets carry flag if not ; sets carry flag if there is enough money and unsets carry flag if not
SubtractAmountPaidFromMoney:: ; 2b96 (0:2b96) SubtractAmountPaidFromMoney:: ; 2b96 (0:2b96)
ld b,BANK(SubtractAmountPaidFromMoney_) jpba SubtractAmountPaidFromMoney_
ld hl,SubtractAmountPaidFromMoney_
jp Bankswitch
; adds the amount the player sold to their money ; adds the amount the player sold to their money
AddAmountSoldToMoney:: ; 2b9e (0:2b9e) AddAmountSoldToMoney:: ; 2b9e (0:2b9e)
@ -2077,9 +2073,7 @@ ReloadTilesetTilePatterns:: ; 3090 (0:3090)
ChooseFlyDestination:: ; 30a9 (0:30a9) ChooseFlyDestination:: ; 30a9 (0:30a9)
ld hl,wd72e ld hl,wd72e
res 4,[hl] res 4,[hl]
ld b, BANK(LoadTownMap_Fly) jpba LoadTownMap_Fly
ld hl, LoadTownMap_Fly
jp Bankswitch
; causes the text box to close without waiting for a button press after displaying text ; causes the text box to close without waiting for a button press after displaying text
DisableWaitingAfterTextDisplay:: ; 30b6 (0:30b6) DisableWaitingAfterTextDisplay:: ; 30b6 (0:30b6)
@ -2097,9 +2091,7 @@ DisableWaitingAfterTextDisplay:: ; 30b6 (0:30b6)
; 01: successful ; 01: successful
; 02: not able to be used right now, no extra menu displayed (only certain items use this) ; 02: not able to be used right now, no extra menu displayed (only certain items use this)
UseItem:: ; 30bc (0:30bc) UseItem:: ; 30bc (0:30bc)
ld b,BANK(UseItem_) jpba UseItem_
ld hl,UseItem_
jp Bankswitch
; confirms the item toss and then tosses the item ; confirms the item toss and then tosses the item
; INPUT: ; INPUT:
@ -2201,14 +2193,10 @@ RunNPCMovementScript:: ; 310e (0:310e)
dw PewterMuseumGuyMovementScriptPointerTable dw PewterMuseumGuyMovementScriptPointerTable
dw PewterGymGuyMovementScriptPointerTable dw PewterGymGuyMovementScriptPointerTable
.playerStepOutFromDoor .playerStepOutFromDoor
ld b, BANK(PlayerStepOutFromDoor) jpba PlayerStepOutFromDoor
ld hl, PlayerStepOutFromDoor
jp Bankswitch
EndNPCMovementScript:: ; 314e (0:314e) EndNPCMovementScript:: ; 314e (0:314e)
ld b, BANK(_EndNPCMovementScript) jpba _EndNPCMovementScript
ld hl, _EndNPCMovementScript
jp Bankswitch
EmptyFunc2:: ; 3156 (0:3156) EmptyFunc2:: ; 3156 (0:3156)
ret ret
@ -2434,9 +2422,7 @@ ResetButtonPressedAndMapScript:: ; 32c1 (0:32c1)
; calls TrainerWalkUpToPlayer ; calls TrainerWalkUpToPlayer
TrainerWalkUpToPlayer_Bank0:: ; 32cf (0:32cf) TrainerWalkUpToPlayer_Bank0:: ; 32cf (0:32cf)
ld b, BANK(TrainerWalkUpToPlayer) jpba TrainerWalkUpToPlayer
ld hl, TrainerWalkUpToPlayer
jp Bankswitch
; sets opponent type and mon set/lvl based on the engaging trainer data ; sets opponent type and mon set/lvl based on the engaging trainer data
InitBattleEnemyParameters:: ; 32d7 (0:32d7) InitBattleEnemyParameters:: ; 32d7 (0:32d7)
@ -2726,9 +2712,7 @@ IsItemInBag:: ; 3493 (0:3493)
DisplayPokedex:: ; 349b (0:349b) DisplayPokedex:: ; 349b (0:349b)
ld [wd11e], a ld [wd11e], a
ld b, BANK(_DisplayPokedex) jpba _DisplayPokedex
ld hl, _DisplayPokedex
jp Bankswitch
SetSpriteFacingDirectionAndDelay:: ; 34a6 (0:34a6) SetSpriteFacingDirectionAndDelay:: ; 34a6 (0:34a6)
call SetSpriteFacingDirection call SetSpriteFacingDirection
@ -2937,9 +2921,7 @@ GetTrainerInformation:: ; 3566 (0:3566)
ret ret
GetTrainerName:: ; 359e (0:359e) GetTrainerName:: ; 359e (0:359e)
ld b, BANK(GetTrainerName_) jpba GetTrainerName_
ld hl, GetTrainerName_
jp Bankswitch
HasEnoughMoney:: HasEnoughMoney::
@ -3604,9 +3586,7 @@ CopyDataUntil:: ; 3913 (0:3913)
; [wRemoveMonFromBox] == 0 specifies the party. ; [wRemoveMonFromBox] == 0 specifies the party.
; [wRemoveMonFromBox] != 0 specifies the current box. ; [wRemoveMonFromBox] != 0 specifies the current box.
RemovePokemon:: ; 391f (0:391f) RemovePokemon:: ; 391f (0:391f)
ld hl, _RemovePokemon jpab _RemovePokemon
ld b, BANK(_RemovePokemon)
jp Bankswitch
AddPartyMon:: ; 3927 (0:3927) AddPartyMon:: ; 3927 (0:3927)
push hl push hl
@ -4590,9 +4570,7 @@ GivePokemon::
ld [W_CURENEMYLVL], a ld [W_CURENEMYLVL], a
xor a ; PLAYER_PARTY_DATA xor a ; PLAYER_PARTY_DATA
ld [wMonDataLocation], a ld [wMonDataLocation], a
ld b, BANK(_GivePokemon) jpba _GivePokemon
ld hl, _GivePokemon
jp Bankswitch
Random:: Random::
@ -4613,9 +4591,7 @@ INCLUDE "home/predef.asm"
Func_3ead:: ; 3ead (0:3ead) Func_3ead:: ; 3ead (0:3ead)
ld b, BANK(CinnabarGymQuiz_1eb0a) jpba CinnabarGymQuiz_1eb0a
ld hl, CinnabarGymQuiz_1eb0a
jp Bankswitch
CheckForHiddenObjectOrBookshelfOrCardKeyDoor:: ; 3eb5 (0:3eb5) CheckForHiddenObjectOrBookshelfOrCardKeyDoor:: ; 3eb5 (0:3eb5)
ld a, [H_LOADEDROMBANK] ld a, [H_LOADEDROMBANK]

View file

@ -1,9 +1,7 @@
HandleMidJump:: HandleMidJump::
; Handle the player jumping down ; Handle the player jumping down
; a ledge in the overworld. ; a ledge in the overworld.
ld b, BANK(_HandleMidJump) jpba _HandleMidJump
ld hl, _HandleMidJump
jp Bankswitch
EnterMap:: EnterMap::
; Load a new map. ; Load a new map.
@ -355,9 +353,7 @@ NewBattle:: ; 0683 (0:0683)
ld a,[wd72e] ld a,[wd72e]
bit 4,a bit 4,a
jr nz,.noBattle jr nz,.noBattle
ld b, BANK(InitBattle) jpba InitBattle
ld hl, InitBattle
jp Bankswitch
.noBattle .noBattle
and a and a
ret ret
@ -783,9 +779,7 @@ HandleFlyWarpOrDungeonWarp::
jp SpecialEnterMap jp SpecialEnterMap
LeaveMapAnim:: LeaveMapAnim::
ld b, BANK(_LeaveMapAnim) jpba _LeaveMapAnim
ld hl, _LeaveMapAnim
jp Bankswitch
LoadPlayerSpriteGraphics:: LoadPlayerSpriteGraphics::
; Load sprite graphics based on whether the player is standing, biking, or surfing. ; Load sprite graphics based on whether the player is standing, biking, or surfing.

View file

@ -53,6 +53,18 @@ callab: MACRO
call Bankswitch call Bankswitch
ENDM ENDM
jpba: MACRO
ld b, BANK(\1)
ld hl, \1
jp Bankswitch
ENDM
jpab: MACRO
ld hl, \1
ld b, BANK(\1)
jp Bankswitch
ENDM
bcd2: MACRO bcd2: MACRO
dn ((\1) / 1000) % 10, ((\1) / 100) % 10 dn ((\1) / 1000) % 10, ((\1) / 100) % 10
dn ((\1) / 10) % 10, (\1) % 10 dn ((\1) / 10) % 10, (\1) % 10

View file

@ -55,9 +55,7 @@ CeldaonMartElevatorWarpMaps: ; 4864a (12:464a)
db $02, CELADON_MART_5 db $02, CELADON_MART_5
CeladonMartElevatorScript_48654: ; 48654 (12:4654) CeladonMartElevatorScript_48654: ; 48654 (12:4654)
ld b, BANK(ShakeElevator) jpba ShakeElevator
ld hl, ShakeElevator
jp Bankswitch
CeladonMartElevatorTextPointers: ; 4865c (12:465c) CeladonMartElevatorTextPointers: ; 4865c (12:465c)
dw CeladonMartElevatorText1 dw CeladonMartElevatorText1

View file

@ -135,9 +135,7 @@ CeladonMartRoofScript_4840c: ; 4840c (12:440c)
jp PrintText jp PrintText
RemoveItemByIDBank12: ; 484e6 (12:44e6) RemoveItemByIDBank12: ; 484e6 (12:44e6)
ld b, BANK(RemoveItemByID) jpba RemoveItemByID
ld hl, RemoveItemByID
jp Bankswitch
CeladonMartRoofText_484ee: ; 484ee (12:44ee) CeladonMartRoofText_484ee: ; 484ee (12:44ee)
TX_FAR _CeladonMartRoofText_484ee TX_FAR _CeladonMartRoofText_484ee

View file

@ -112,6 +112,4 @@ Lab4Text2: ; 75dda (1d:5dda)
jp TextScriptEnd jp TextScriptEnd
LoadFossilItemAndMonNameBank1D: ; 75de8 (1d:5de8) LoadFossilItemAndMonNameBank1D: ; 75de8 (1d:5de8)
ld b, BANK(LoadFossilItemAndMonName) jpba LoadFossilItemAndMonName
ld hl, LoadFossilItemAndMonName
jp Bankswitch

View file

@ -128,9 +128,7 @@ ViridianGymScript4: ; 7496b (1d:496b)
ld [W_CURMAPSCRIPT], a ld [W_CURMAPSCRIPT], a
ret ret
.asm_74980 .asm_74980
ld b, BANK(LoadSpinnerArrowTiles) jpba LoadSpinnerArrowTiles
ld hl, LoadSpinnerArrowTiles
jp Bankswitch
ViridianGymScript3: ; 74988 (1d:4988) ViridianGymScript3: ; 74988 (1d:4988)
ld a, [W_ISINBATTLE] ld a, [W_ISINBATTLE]