summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-07-06 21:18:22 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2020-07-06 21:18:22 -0400
commit06db7ec55bbc87ed18db72a53fb20fa7b4da9b29 (patch)
treed9631415d7640c39b8883766fa5209f92912c95c
parent77ed5f3820301f9f301f12bf2f201d9bdab9e7e1 (diff)
callba/callab -> farcall/callfar; jpba/jpab -> farjp/jpfar
-rw-r--r--engine/battle/common_text.asm8
-rwxr-xr-xengine/battle/core.asm58
-rw-r--r--engine/battle/effects.asm28
-rwxr-xr-xengine/battle/end_of_battle.asm2
-rw-r--r--engine/battle/experience.asm16
-rw-r--r--engine/battle/ghost_marowak_anim.asm2
-rw-r--r--engine/battle/init_battle_variables.asm2
-rw-r--r--engine/battle/link_battle_versus_text.asm2
-rw-r--r--engine/battle/move_effects/drain_hp.asm2
-rw-r--r--engine/battle/move_effects/focus_energy.asm4
-rw-r--r--engine/battle/move_effects/leech_seed.asm4
-rw-r--r--engine/battle/move_effects/mist.asm4
-rw-r--r--engine/battle/move_effects/paralyze.asm12
-rw-r--r--engine/battle/move_effects/substitute.asm2
-rw-r--r--engine/battle/scroll_draw_trainer_pic.asm2
-rw-r--r--engine/battle/trainer_ai.asm6
-rw-r--r--engine/battle/wild_encounters.asm4
-rwxr-xr-xengine/events/cinnabar_lab.asm2
-rwxr-xr-xengine/events/diploma.asm4
-rwxr-xr-xengine/events/evolve_trade.asm2
-rwxr-xr-xengine/events/give_pokemon.asm4
-rw-r--r--engine/events/hidden_objects/bookshelves.asm2
-rw-r--r--engine/events/hidden_objects/town_map.asm2
-rwxr-xr-xengine/events/in_game_trades.asm6
-rwxr-xr-xengine/events/pokecenter.asm2
-rwxr-xr-xengine/events/pokedex_rating.asm2
-rwxr-xr-xengine/events/pokemart.asm4
-rwxr-xr-xengine/events/saffron_guards.asm2
-rwxr-xr-xengine/items/item_effects.asm28
-rwxr-xr-xengine/items/town_map.asm2
-rwxr-xr-xengine/link/cable_club.asm10
-rwxr-xr-xengine/link/cable_club_npc.asm4
-rwxr-xr-xengine/menus/league_pc.asm4
-rwxr-xr-xengine/menus/naming_screen.asm8
-rwxr-xr-xengine/menus/party_menu.asm6
-rwxr-xr-xengine/menus/pc.asm10
-rwxr-xr-xengine/menus/pokedex.asm4
-rwxr-xr-xengine/menus/save.asm2
-rwxr-xr-xengine/menus/start_sub_menus.asm4
-rwxr-xr-xengine/movie/credits.asm4
-rwxr-xr-xengine/movie/intro.asm4
-rwxr-xr-xengine/movie/oak_speech/clear_save.asm2
-rwxr-xr-xengine/movie/title.asm8
-rwxr-xr-xengine/movie/trade.asm4
-rwxr-xr-xengine/overworld/cut.asm2
-rwxr-xr-xengine/overworld/dust_smoke.asm2
-rw-r--r--engine/overworld/player_state.asm2
-rw-r--r--engine/overworld/push_boulder.asm2
-rw-r--r--engine/pokemon/add_mon.asm4
-rw-r--r--engine/pokemon/bills_pc.asm2
-rwxr-xr-xengine/pokemon/evos_moves.asm2
-rwxr-xr-xengine/pokemon/learn_move.asm2
-rw-r--r--engine/pokemon/load_mon_data.asm2
-rwxr-xr-xengine/pokemon/status_screen.asm6
-rwxr-xr-xengine/slots/game_corner_slots.asm2
-rw-r--r--home.asm30
-rw-r--r--home/move_mon.asm4
-rw-r--r--home/overworld.asm40
-rw-r--r--home/pokemon.asm6
-rw-r--r--home/serial.asm2
-rwxr-xr-xhome/start_menu.asm4
-rw-r--r--home/text_script.asm10
-rw-r--r--home/trainers.asm6
-rw-r--r--home/vblank.asm2
-rw-r--r--macros/farcall.asm10
-rwxr-xr-xscripts/BikeShop.asm2
-rwxr-xr-xscripts/CeladonMansion3F.asm2
-rwxr-xr-xscripts/CeladonMartElevator.asm2
-rwxr-xr-xscripts/CeladonMartRoof.asm2
-rwxr-xr-xscripts/CeruleanCity.asm4
-rwxr-xr-xscripts/ChampionsRoom.asm2
-rwxr-xr-xscripts/CinnabarLabFossilRoom.asm4
-rwxr-xr-xscripts/CopycatsHouse2F.asm2
-rwxr-xr-xscripts/Daycare.asm6
-rwxr-xr-xscripts/HallOfFame.asm2
-rwxr-xr-xscripts/NameRatersHouse.asm2
-rwxr-xr-xscripts/OaksLab.asm6
-rwxr-xr-xscripts/PokemonTower2F.asm2
-rwxr-xr-xscripts/RocketHideoutElevator.asm2
-rwxr-xr-xscripts/Route22.asm6
-rwxr-xr-xscripts/Route5Gate.asm4
-rwxr-xr-xscripts/Route6Gate.asm2
-rwxr-xr-xscripts/Route7Gate.asm2
-rwxr-xr-xscripts/Route8Gate.asm2
-rwxr-xr-xscripts/SSAnne2F.asm2
-rwxr-xr-xscripts/SilphCo7F.asm2
-rwxr-xr-xscripts/SilphCoElevator.asm2
-rwxr-xr-xscripts/VermilionDock.asm2
-rwxr-xr-xscripts/ViridianGym.asm2
-rwxr-xr-xscripts/WardensHouse.asm2
90 files changed, 251 insertions, 253 deletions
diff --git a/engine/battle/common_text.asm b/engine/battle/common_text.asm
index b65bb84b..9f6f90b6 100644
--- a/engine/battle/common_text.asm
+++ b/engine/battle/common_text.asm
@@ -24,7 +24,7 @@ PrintBeginningBattleText:
ld hl, TrainerWantsToFightText
.wildBattle
push hl
- callab DrawAllPokeballs
+ callfar DrawAllPokeballs
pop hl
call PrintText
jr .done
@@ -38,7 +38,7 @@ PrintBeginningBattleText:
ld a, b
and a
jr z, .noSilphScope
- callab LoadEnemyMonData
+ callfar LoadEnemyMonData
jr .notPokemonTower
.noSilphScope
ld hl, EnemyAppearedText
@@ -54,8 +54,8 @@ PrintBeginningBattleText:
call PrintText
ld hl, UnveiledGhostText
call PrintText
- callab LoadEnemyMonData
- callab MarowakAnim
+ callfar LoadEnemyMonData
+ callfar MarowakAnim
ld hl, WildMonAppearedText
call PrintText
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index 8cb3cd0a..4d999d2a 100755
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -97,7 +97,7 @@ SlidePlayerAndEnemySilhouettesOnScreen:
ld b, SET_PAL_BATTLE
call RunPaletteCommand
call HideSprites
- jpab PrintBeginningBattleText
+ jpfar PrintBeginningBattleText
; 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
@@ -178,7 +178,7 @@ StartBattle:
ld hl, .outOfSafariBallsText
jp PrintText
.notOutOfSafariBalls
- callab PrintSafariZoneBattleText
+ callfar PrintSafariZoneBattleText
ld a, [wEnemyMonSpeed + 1]
add a
ld b, a ; init b (which is later compared with random value) to (enemy speed % 256) * 2
@@ -267,7 +267,7 @@ EnemyRan:
call PlaySoundWaitForCurrent
xor a
ldh [hWhoseTurn], a
- jpab AnimationSlideEnemyMonOff
+ jpfar AnimationSlideEnemyMonOff
WildRanText:
text_far _WildRanText
@@ -365,7 +365,7 @@ MainInBattleLoop:
jr nz, .specialMoveNotUsed
ld [wPlayerSelectedMove], a
.specialMoveNotUsed
- callab SwitchEnemyMon
+ callfar SwitchEnemyMon
.noLinkBattle
ld a, [wPlayerSelectedMove]
cp QUICK_ATTACK
@@ -413,7 +413,7 @@ MainInBattleLoop:
.enemyMovesFirst
ld a, $1
ldh [hWhoseTurn], a
- callab TrainerAI
+ callfar TrainerAI
jr c, .AIActionUsedEnemyFirst
call ExecuteEnemyMove
ld a, [wEscapedFromBattle]
@@ -451,7 +451,7 @@ MainInBattleLoop:
call DrawHUDsAndHPBars
ld a, $1
ldh [hWhoseTurn], a
- callab TrainerAI
+ callfar TrainerAI
jr c, .AIActionUsedPlayerFirst
call ExecuteEnemyMove
ld a, [wEscapedFromBattle]
@@ -837,7 +837,7 @@ FaintEnemyPokemon:
.giveExpToMonsThatFought
xor a
ld [wBoostExpByExpAll], a
- callab GainExperience
+ callfar GainExperience
pop af
ret z ; return if no exp all
@@ -855,7 +855,7 @@ FaintEnemyPokemon:
jr nz, .gainExpFlagsLoop
ld a, b
ld [wPartyGainExpFlags], a
- jpab GainExperience
+ jpfar GainExperience
EnemyMonFaintedText:
text_far _EnemyMonFaintedText
@@ -893,7 +893,7 @@ ReplaceFaintedEnemyMon:
ld hl, wEnemyHPBarColor
ld e, $30
call GetBattleHealthBarColor
- callab DrawEnemyPokeballs
+ callfar DrawEnemyPokeballs
ld a, [wLinkState]
cp LINK_STATE_BATTLING
jr nz, .notLinkBattle
@@ -1720,7 +1720,7 @@ LoadEnemyMonFromParty:
ret
SendOutMon:
- callab PrintSendOutMonMessage
+ callfar PrintSendOutMonMessage
ld hl, wEnemyMonHP
ld a, [hli]
or [hl] ; is enemy mon HP zero?
@@ -1816,7 +1816,7 @@ DrawPlayerHUDAndHPBar:
coord hl, 9, 7
lb bc, 5, 11
call ClearScreenArea
- callab PlacePlayerHUDTiles
+ callfar PlacePlayerHUDTiles
coord hl, 18, 9
ld [hl], $73
ld de, wBattleMonNick
@@ -1877,7 +1877,7 @@ DrawEnemyHUDAndHPBar:
coord hl, 0, 0
lb bc, 4, 12
call ClearScreenArea
- callab PlaceEnemyHUDTiles
+ callfar PlaceEnemyHUDTiles
ld de, wEnemyMonNick
coord hl, 1, 0
call CenterMonName
@@ -2411,7 +2411,7 @@ PartyMenuOrRockOrRun:
; fall through to SwitchPlayerMon
SwitchPlayerMon:
- callab RetreatMon
+ callfar RetreatMon
ld c, 50
call DelayFrames
call AnimateRetreatingPlayerMon
@@ -2464,7 +2464,7 @@ MoveSelectionMenu:
ld de, wMoves
ld bc, NUM_MOVES
call CopyData
- callab FormatMovesString
+ callfar FormatMovesString
ret
.writemoves
@@ -2860,7 +2860,7 @@ PrintMenuItem:
ld [wWhichPokemon], a
ld a, BATTLE_MON_DATA
ld [wMonDataLocation], a
- callab GetMaxPP
+ callfar GetMaxPP
ld hl, wCurrentMenuItem
ld c, [hl]
inc [hl]
@@ -2955,7 +2955,7 @@ SelectEnemyMove:
ld a, [wIsInBattle]
dec a
jr z, .chooseRandomMove ; wild encounter
- callab AIEnemyTrainerChooseMoves
+ callfar AIEnemyTrainerChooseMoves
.chooseRandomMove
push hl
call BattleRandom
@@ -3020,7 +3020,7 @@ LinkBattleExchangeData:
ld a, b
.doExchange
ld [wSerialExchangeNybbleSendData], a
- callab PrintWaitingText
+ callfar PrintWaitingText
.syncLoop1
call Serial_ExchangeNybble
call DelayFrame
@@ -3196,7 +3196,7 @@ MirrorMoveCheck:
.moveDidNotMiss
call ApplyAttackToEnemyPokemon
call PrintCriticalOHKOText
- callab DisplayEffectiveness
+ callfar DisplayEffectiveness
ld a, 1
ld [wMoveDidntMiss], a
.notDone
@@ -4988,7 +4988,7 @@ AttackSubstitute:
ldh a, [hWhoseTurn]
xor $01
ldh [hWhoseTurn], a
- callab HideSubstituteShowMonAnim ; animate the substitute breaking
+ callfar HideSubstituteShowMonAnim ; animate the substitute breaking
; flip the turn back to the way it was
ldh a, [hWhoseTurn]
xor $01
@@ -5726,7 +5726,7 @@ EnemyCheckIfMirrorMoveEffect:
.moveDidNotMiss
call ApplyAttackToPlayerPokemon
call PrintCriticalOHKOText
- callab DisplayEffectiveness
+ callfar DisplayEffectiveness
ld a, 1
ld [wMoveDidntMiss], a
.handleExplosionMiss
@@ -6254,14 +6254,14 @@ DoBattleTransitionAndInitBattleVariables:
; link battle
xor a
ld [wMenuJoypadPollCount], a
- callab DisplayLinkBattleVersusTextBox
+ callfar DisplayLinkBattleVersusTextBox
ld a, $1
ld [wUpdateSpritesEnabled], a
call ClearScreen
.next
call DelayFrame
predef BattleTransition
- callab LoadHudAndHpBarAndStatusTilePatterns
+ callfar LoadHudAndHpBarAndStatusTilePatterns
ld a, $1
ldh [hAutoBGTransferEnabled], a
ld a, $ff
@@ -6359,11 +6359,11 @@ LoadPlayerBackPic:
; does nothing since no stats are ever selected (barring glitches)
DoubleOrHalveSelectedStats:
- callab DoubleSelectedStats
- jpab HalveSelectedStats
+ callfar DoubleSelectedStats
+ jpfar HalveSelectedStats
ScrollTrainerPicAfterBattle:
- jpab _ScrollTrainerPicAfterBattle
+ jpfar _ScrollTrainerPicAfterBattle
ApplyBurnAndParalysisPenaltiesToPlayer:
ld a, $1
@@ -6747,7 +6747,7 @@ DetermineWildOpponent:
ld a, [wNumberOfNoRandomBattleStepsLeft]
and a
ret nz
- callab TryDoWildEncounter
+ callfar TryDoWildEncounter
ret nz
InitBattleCommon:
ld a, [wMapPalOffset]
@@ -6756,13 +6756,13 @@ InitBattleCommon:
ld a, [hl]
push af
res 1, [hl]
- callab InitBattleVariables
+ callfar InitBattleVariables
ld a, [wEnemyMonSpecies2]
sub OPP_ID_OFFSET
jp c, InitWildBattle
ld [wTrainerClass], a
call GetTrainerInformation
- callab ReadTrainer
+ callfar ReadTrainer
call DoBattleTransitionAndInitBattleVariables
call _LoadTrainerPic
xor a
@@ -6857,7 +6857,7 @@ _InitBattleCommon:
dec a ; is it a wild battle?
call z, DrawEnemyHUDAndHPBar ; draw enemy HUD and HP bar if it's a wild battle
call StartBattle
- callab EndOfBattle
+ callfar EndOfBattle
pop af
ld [wLetterPrintingDelayFlags], a
pop af
diff --git a/engine/battle/effects.asm b/engine/battle/effects.asm
index c3a2a213..fe050937 100644
--- a/engine/battle/effects.asm
+++ b/engine/battle/effects.asm
@@ -170,7 +170,7 @@ BadlyPoisonedText:
text_end
DrainHPEffect:
- jpab DrainHPEffect_
+ jpfar DrainHPEffect_
ExplodeEffect:
ld hl, wBattleMonHP
@@ -987,7 +987,7 @@ FlinchSideEffect:
ret
OneHitKOEffect:
- jpab OneHitKOEffect_
+ jpfar OneHitKOEffect_
ChargeEffect:
ld hl, wPlayerBattleStatus1
@@ -1097,13 +1097,13 @@ TrappingEffect:
ret
MistEffect:
- jpab MistEffect_
+ jpfar MistEffect_
FocusEnergyEffect:
- jpab FocusEnergyEffect_
+ jpfar FocusEnergyEffect_
RecoilEffect:
- jpab RecoilEffect_
+ jpfar RecoilEffect_
ConfusionSideEffect:
call BattleRandom
@@ -1157,10 +1157,10 @@ ConfusionEffectFailed:
jp ConditionalPrintButItFailed
ParalyzeEffect:
- jpab ParalyzeEffect_
+ jpfar ParalyzeEffect_
SubstituteEffect:
- jpab SubstituteEffect_
+ jpfar SubstituteEffect_
HyperBeamEffect:
ld hl, wPlayerBattleStatus2
@@ -1271,7 +1271,7 @@ MimicLearnedMoveText:
text_end
LeechSeedEffect:
- jpab LeechSeedEffect_
+ jpfar LeechSeedEffect_
SplashEffect:
call PlayCurrentMoveAnimation
@@ -1365,22 +1365,22 @@ MoveWasDisabledText:
text_end
PayDayEffect:
- jpab PayDayEffect_
+ jpfar PayDayEffect_
ConversionEffect:
- jpab ConversionEffect_
+ jpfar ConversionEffect_
HazeEffect:
- jpab HazeEffect_
+ jpfar HazeEffect_
HealEffect:
- jpab HealEffect_
+ jpfar HealEffect_
TransformEffect:
- jpab TransformEffect_
+ jpfar TransformEffect_
ReflectLightScreenEffect:
- jpab ReflectLightScreenEffect_
+ jpfar ReflectLightScreenEffect_
NothingHappenedText:
text_far _NothingHappenedText
diff --git a/engine/battle/end_of_battle.asm b/engine/battle/end_of_battle.asm
index f490c34d..aa96f31d 100755
--- a/engine/battle/end_of_battle.asm
+++ b/engine/battle/end_of_battle.asm
@@ -10,7 +10,7 @@ EndOfBattle:
ld a, [wEnemyMonStatus]
ld [hl], a
call ClearScreen
- callab DisplayLinkBattleVersusTextBox
+ callfar DisplayLinkBattleVersusTextBox
ld a, [wBattleResult]
cp $1
ld de, YouWinText
diff --git a/engine/battle/experience.asm b/engine/battle/experience.asm
index 2e21d874..0eab6e08 100644
--- a/engine/battle/experience.asm
+++ b/engine/battle/experience.asm
@@ -117,7 +117,7 @@ GainExperience:
ld [wd0b5], a
call GetMonHeader
ld d, MAX_LEVEL
- callab CalcExperience ; get max exp
+ callfar CalcExperience ; get max exp
; compare max exp with current exp
ldh a, [hExperience]
ld b, a
@@ -155,7 +155,7 @@ GainExperience:
ld bc, wPartyMon1Level - wPartyMon1Exp
add hl, bc
push hl
- callba CalcLevelFromExperience
+ farcall CalcLevelFromExperience
pop hl
ld a, [hl] ; current level
cp d
@@ -233,11 +233,11 @@ GainExperience:
.recalcStatChanges
xor a ; battle mon
ld [wCalculateWhoseStats], a
- callab CalculateModifiedStats
- callab ApplyBurnAndParalysisPenaltiesToPlayer
- callab ApplyBadgeStatBoosts
- callab DrawPlayerHUDAndHPBar
- callab PrintEmptyString
+ callfar CalculateModifiedStats
+ callfar ApplyBurnAndParalysisPenaltiesToPlayer
+ callfar ApplyBadgeStatBoosts
+ callfar DrawPlayerHUDAndHPBar
+ callfar PrintEmptyString
call SaveScreenTilesToBuffer1
.printGrewLevelText
ld hl, GrewLevelText
@@ -246,7 +246,7 @@ GainExperience:
ld [wMonDataLocation], a
call LoadMonData
ld d, $1
- callab PrintStatsBox
+ callfar PrintStatsBox
call WaitForTextScrollButtonPress
call LoadScreenTilesFromBuffer1
xor a ; PLAYER_PARTY_DATA
diff --git a/engine/battle/ghost_marowak_anim.asm b/engine/battle/ghost_marowak_anim.asm
index bef680fe..9c47fd53 100644
--- a/engine/battle/ghost_marowak_anim.asm
+++ b/engine/battle/ghost_marowak_anim.asm
@@ -15,7 +15,7 @@ MarowakAnim:
ld [wChangeMonPicEnemyTurnSpecies], a
ld a, $1
ldh [hWhoseTurn], a
- callab ChangeMonPic
+ callfar ChangeMonPic
; alternate between black and light grey 8 times.
; this makes the ghost's body appear to flash
ld d, $80
diff --git a/engine/battle/init_battle_variables.asm b/engine/battle/init_battle_variables.asm
index d670319c..0d403b55 100644
--- a/engine/battle/init_battle_variables.asm
+++ b/engine/battle/init_battle_variables.asm
@@ -35,4 +35,4 @@ InitBattleVariables:
ld a, BATTLE_TYPE_SAFARI
ld [wBattleType], a
.notSafariBattle
- jpab PlayBattleMusic
+ jpfar PlayBattleMusic
diff --git a/engine/battle/link_battle_versus_text.asm b/engine/battle/link_battle_versus_text.asm
index 76559117..22fec0f3 100644
--- a/engine/battle/link_battle_versus_text.asm
+++ b/engine/battle/link_battle_versus_text.asm
@@ -18,6 +18,6 @@ DisplayLinkBattleVersusTextBox:
ld [hl], $6a
xor a
ld [wUpdateSpritesEnabled], a
- callab SetupPlayerAndEnemyPokeballs
+ callfar SetupPlayerAndEnemyPokeballs
ld c, 150
jp DelayFrames
diff --git a/engine/battle/move_effects/drain_hp.asm b/engine/battle/move_effects/drain_hp.asm
index 74e5d376..e7b241f6 100644
--- a/engine/battle/move_effects/drain_hp.asm
+++ b/engine/battle/move_effects/drain_hp.asm
@@ -81,7 +81,7 @@ DrainHPEffect_:
predef UpdateHPBar2
predef DrawPlayerHUDAndHPBar
predef DrawEnemyHUDAndHPBar
- callab ReadPlayerMonCurHPAndStatus
+ callfar ReadPlayerMonCurHPAndStatus
ld hl, SuckedHealthText
ldh a, [hWhoseTurn]
and a
diff --git a/engine/battle/move_effects/focus_energy.asm b/engine/battle/move_effects/focus_energy.asm
index fd04e024..1fafe920 100644
--- a/engine/battle/move_effects/focus_energy.asm
+++ b/engine/battle/move_effects/focus_energy.asm
@@ -8,13 +8,13 @@ FocusEnergyEffect_:
bit GETTING_PUMPED, [hl] ; is mon already using focus energy?
jr nz, .alreadyUsing
set GETTING_PUMPED, [hl] ; mon is now using focus energy
- callab PlayCurrentMoveAnimation
+ callfar PlayCurrentMoveAnimation
ld hl, GettingPumpedText
jp PrintText
.alreadyUsing
ld c, 50
call DelayFrames
- jpab PrintButItFailedText_
+ jpfar PrintButItFailedText_
GettingPumpedText:
text_pause
diff --git a/engine/battle/move_effects/leech_seed.asm b/engine/battle/move_effects/leech_seed.asm
index 061c0073..61bd982a 100644
--- a/engine/battle/move_effects/leech_seed.asm
+++ b/engine/battle/move_effects/leech_seed.asm
@@ -1,5 +1,5 @@
LeechSeedEffect_:
- callab MoveHitTest
+ callfar MoveHitTest
ld a, [wMoveMissed]
and a
jr nz, .moveMissed
@@ -22,7 +22,7 @@ LeechSeedEffect_:
bit SEEDED, [hl]
jr nz, .moveMissed
set SEEDED, [hl]
- callab PlayCurrentMoveAnimation
+ callfar PlayCurrentMoveAnimation
ld hl, WasSeededText
jp PrintText
.moveMissed
diff --git a/engine/battle/move_effects/mist.asm b/engine/battle/move_effects/mist.asm
index a9cb21b8..163d386f 100644
--- a/engine/battle/move_effects/mist.asm
+++ b/engine/battle/move_effects/mist.asm
@@ -8,11 +8,11 @@ MistEffect_:
bit PROTECTED_BY_MIST, [hl] ; is mon protected by mist?
jr nz, .mistAlreadyInUse
set PROTECTED_BY_MIST, [hl] ; mon is now protected by mist
- callab PlayCurrentMoveAnimation
+ callfar PlayCurrentMoveAnimation
ld hl, ShroudedInMistText
jp PrintText
.mistAlreadyInUse
- jpab PrintButItFailedText_
+ jpfar PrintButItFailedText_
ShroudedInMistText:
text_far _ShroudedInMistText
diff --git a/engine/battle/move_effects/paralyze.asm b/engine/battle/move_effects/paralyze.asm
index d828e333..dbaa0fb8 100644
--- a/engine/battle/move_effects/paralyze.asm
+++ b/engine/battle/move_effects/paralyze.asm
@@ -26,22 +26,22 @@ ParalyzeEffect_:
jr z, .doesntAffect
.hitTest
push hl
- callab MoveHitTest
+ callfar MoveHitTest
pop hl
ld a, [wMoveMissed]
and a
jr nz, .didntAffect
set PAR, [hl]
- callab QuarterSpeedDueToParalysis
+ callfar QuarterSpeedDueToParalysis
ld c, 30
call DelayFrames
- callab PlayCurrentMoveAnimation
- jpab PrintMayNotAttackText
+ callfar PlayCurrentMoveAnimation
+ jpfar PrintMayNotAttackText
.didntAffect
ld c, 50
call DelayFrames
- jpab PrintDidntAffectText
+ jpfar PrintDidntAffectText
.doesntAffect
ld c, 50
call DelayFrames
- jpab PrintDoesntAffectText
+ jpfar PrintDoesntAffectText
diff --git a/engine/battle/move_effects/substitute.asm b/engine/battle/move_effects/substitute.asm
index eb6d0e89..860b76b6 100644
--- a/engine/battle/move_effects/substitute.asm
+++ b/engine/battle/move_effects/substitute.asm
@@ -55,7 +55,7 @@ SubstituteEffect_:
call Bankswitch ; jump to routine depending on animation setting
ld hl, SubstituteText
call PrintText
- jpab DrawHUDsAndHPBars
+ jpfar DrawHUDsAndHPBars
.alreadyHasSubstitute
ld hl, HasSubstituteText
jr .printText
diff --git a/engine/battle/scroll_draw_trainer_pic.asm b/engine/battle/scroll_draw_trainer_pic.asm
index 98893dcf..978fb71a 100644
--- a/engine/battle/scroll_draw_trainer_pic.asm
+++ b/engine/battle/scroll_draw_trainer_pic.asm
@@ -5,7 +5,7 @@ _ScrollTrainerPicAfterBattle:
ld [wEnemyMonSpecies2], a
ld b, SET_PAL_BATTLE
call RunPaletteCommand
- callab _LoadTrainerPic
+ callfar _LoadTrainerPic
coord hl, 19, 0
ld c, $0
.scrollLoop
diff --git a/engine/battle/trainer_ai.asm b/engine/battle/trainer_ai.asm
index 3e444f8b..ea476538 100644
--- a/engine/battle/trainer_ai.asm
+++ b/engine/battle/trainer_ai.asm
@@ -204,7 +204,7 @@ AIMoveChoiceModification3:
push hl
push bc
push de
- callab AIGetTypeEffectiveness
+ callfar AIGetTypeEffectiveness
pop de
pop bc
pop hl
@@ -599,7 +599,7 @@ SwitchEnemyMon:
; switching in a new mon in response to this switch.
ld a, 1
ld [wFirstMonsNotOutYet], a
- callab EnemySendOut
+ callfar EnemySendOut
xor a
ld [wFirstMonsNotOutYet], a
@@ -713,7 +713,7 @@ AIIncreaseStat:
ld a, ANIM_AF
ld [hli], a
ld [hl], b
- callab StatModifierUpEffect
+ callfar StatModifierUpEffect
pop hl
pop af
ld [hli], a
diff --git a/engine/battle/wild_encounters.asm b/engine/battle/wild_encounters.asm
index 9b637f97..3d0eb556 100644
--- a/engine/battle/wild_encounters.asm
+++ b/engine/battle/wild_encounters.asm
@@ -7,14 +7,14 @@ TryDoWildEncounter:
ld a, [wd736]
and a
ret nz
- callab IsPlayerStandingOnDoorTileOrWarpTile
+ callfar IsPlayerStandingOnDoorTileOrWarpTile
jr nc, .notStandingOnDoorOrWarpTile
.CantEncounter
ld a, $1
and a
ret
.notStandingOnDoorOrWarpTile
- callab IsPlayerJustOutsideMap
+ callfar IsPlayerJustOutsideMap
jr z, .CantEncounter
ld a, [wRepelRemainingSteps]
and a
diff --git a/engine/events/cinnabar_lab.asm b/engine/events/cinnabar_lab.asm
index 0e0af0bb..aaa0428e 100755
--- a/engine/events/cinnabar_lab.asm
+++ b/engine/events/cinnabar_lab.asm
@@ -62,7 +62,7 @@ GiveFossilToCinnabarLab::
call PrintText
ld a, [wFossilItem]
ldh [hItemToRemoveID], a
- callba RemoveItemByID
+ farcall RemoveItemByID
ld hl, LabFossil_610b8
call PrintText
SetEvents EVENT_GAVE_FOSSIL_TO_LAB, EVENT_LAB_STILL_REVIVING_FOSSIL
diff --git a/engine/events/diploma.asm b/engine/events/diploma.asm
index 9e9da9a5..95dabab3 100755
--- a/engine/events/diploma.asm
+++ b/engine/events/diploma.asm
@@ -38,7 +38,7 @@ DisplayDiploma::
coord hl, 10, 4
ld de, wPlayerName
call PlaceString
- callba DrawPlayerCharacter
+ farcall DrawPlayerCharacter
; Move the player 33 pixels right and set the priority bit so he appears
; behind the background layer.
@@ -56,7 +56,7 @@ DisplayDiploma::
jr nz, .adjustPlayerGfxLoop
call EnableLCD
- callba LoadTrainerInfoTextBoxTiles
+ farcall LoadTrainerInfoTextBoxTiles
ld b, SET_PAL_GENERIC
call RunPaletteCommand
call Delay3
diff --git a/engine/events/evolve_trade.asm b/engine/events/evolve_trade.asm
index e17fc05c..56069fac 100755
--- a/engine/events/evolve_trade.asm
+++ b/engine/events/evolve_trade.asm
@@ -38,7 +38,7 @@ EvolveTradeMon:
ld [wForceEvolution], a
ld a, LINK_STATE_TRADING
ld [wLinkState], a
- callab TryEvolvingMon
+ callfar TryEvolvingMon
xor a ; LINK_STATE_NONE
ld [wLinkState], a
jp PlayDefaultMusic
diff --git a/engine/events/give_pokemon.asm b/engine/events/give_pokemon.asm
index 041b9fb0..ef01ef99 100755
--- a/engine/events/give_pokemon.asm
+++ b/engine/events/give_pokemon.asm
@@ -15,9 +15,9 @@ _GivePokemon::
ld [wEnemyBattleStatus3], a
ld a, [wcf91]
ld [wEnemyMonSpecies2], a
- callab LoadEnemyMonData
+ callfar LoadEnemyMonData
call SetPokedexOwnedFlag
- callab SendNewMonToBox
+ callfar SendNewMonToBox
ld hl, wcf4b
ld a, [wCurrentBoxNum]
and $7f
diff --git a/engine/events/hidden_objects/bookshelves.asm b/engine/events/hidden_objects/bookshelves.asm
index daa8205d..23c087cc 100644
--- a/engine/events/hidden_objects/bookshelves.asm
+++ b/engine/events/hidden_objects/bookshelves.asm
@@ -34,6 +34,6 @@ PrintBookshelfText::
.noMatch
ld a, $ff
ldh [hFFDB], a
- jpba PrintCardKeyText
+ farjp PrintCardKeyText
INCLUDE "data/tilesets/bookshelf_tile_ids.asm"
diff --git a/engine/events/hidden_objects/town_map.asm b/engine/events/hidden_objects/town_map.asm
index 866d38c8..4284214f 100644
--- a/engine/events/hidden_objects/town_map.asm
+++ b/engine/events/hidden_objects/town_map.asm
@@ -12,7 +12,7 @@ TownMapText::
inc a
ldh [hAutoBGTransferEnabled], a
call LoadFontTilePatterns
- callba DisplayTownMap
+ farcall DisplayTownMap
ld hl, wd730
res 6, [hl]
ld de, TextScriptEnd
diff --git a/engine/events/in_game_trades.asm b/engine/events/in_game_trades.asm
index a25abe0b..8a29d6a4 100755
--- a/engine/events/in_game_trades.asm
+++ b/engine/events/in_game_trades.asm
@@ -137,10 +137,10 @@ InGameTrade_DoTrade:
ld [wMonDataLocation], a
call AddPartyMon
call InGameTrade_CopyDataToReceivedMon
- callab EvolveTradeMon
+ callfar EvolveTradeMon
call ClearScreen
call InGameTrade_RestoreScreen
- callba RedrawMapView
+ farcall RedrawMapView
and a
ld a, $3
jr .tradeSucceeded
@@ -159,7 +159,7 @@ InGameTrade_RestoreScreen:
call LoadGBPal
ld c, 10
call DelayFrames
- jpba LoadWildData
+ farjp LoadWildData
InGameTrade_PrepareTradeData:
ld hl, wTradedPlayerMonSpecies
diff --git a/engine/events/pokecenter.asm b/engine/events/pokecenter.asm
index 030c333f..97dbcd53 100755
--- a/engine/events/pokecenter.asm
+++ b/engine/events/pokecenter.asm
@@ -22,7 +22,7 @@ DisplayPokemonCenterDialogue_::
ld [wSprite01StateData1ImageIndex], a ; make the nurse turn to face the machine
call Delay3
predef HealParty
- callba AnimateHealingMachine ; do the healing machine animation
+ farcall AnimateHealingMachine ; do the healing machine animation
xor a
ld [wAudioFadeOutControl], a
ld a, [wAudioSavedROMBank]
diff --git a/engine/events/pokedex_rating.asm b/engine/events/pokedex_rating.asm
index f17f7b17..490ae05a 100755
--- a/engine/events/pokedex_rating.asm
+++ b/engine/events/pokedex_rating.asm
@@ -30,7 +30,7 @@ DisplayDexRating:
call PrintText
pop hl
call PrintText
- callba PlayPokedexRatingSfx
+ farcall PlayPokedexRatingSfx
jp WaitForTextScrollButtonPress
.hallOfFame
ld de, wDexRatingNumMonsSeen
diff --git a/engine/events/pokemart.asm b/engine/events/pokemart.asm
index 0c71e4de..3345f540 100755
--- a/engine/events/pokemart.asm
+++ b/engine/events/pokemart.asm
@@ -42,7 +42,7 @@ DisplayPokemartDialogue_::
ld [wPrintItemPrices], a
ld a, INIT_BAG_ITEM_LIST
ld [wInitListType], a
- callab InitList
+ callfar InitList
ld a, [wNumBagItems]
and a
@@ -126,7 +126,7 @@ DisplayPokemartDialogue_::
ld [wPrintItemPrices], a
ld a, INIT_OTHER_ITEM_LIST
ld [wInitListType], a
- callab InitList
+ callfar InitList
ld hl, PokemartBuyingGreetingText
call PrintText
diff --git a/engine/events/saffron_guards.asm b/engine/events/saffron_guards.asm
index cd008394..bf30b8c5 100755
--- a/engine/events/saffron_guards.asm
+++ b/engine/events/saffron_guards.asm
@@ -10,6 +10,6 @@ RemoveGuardDrink::
call IsItemInBag
pop hl
jr z, .drinkLoop
- jpba RemoveItemByID
+ farjp RemoveItemByID
INCLUDE "data/items/guard_drink_items.asm"
diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm
index 3668dd74..b2901615 100755
--- a/engine/items/item_effects.asm
+++ b/engine/items/item_effects.asm
@@ -147,7 +147,7 @@ ItemUseBall:
; If the player is fighting an unidentified ghost, set the value that indicates
; the Pokémon can't be caught and skip the capture calculations.
- callab IsGhostBattle
+ callfar IsGhostBattle
ld b, $10 ; can't be caught value
jp z, .setAnimData
@@ -495,7 +495,7 @@ ItemUseBall:
ld [wcf91], a
ld a, [wEnemyMonLevel]
ld [wCurEnemyLVL], a
- callab LoadEnemyMonData
+ callfar LoadEnemyMonData
pop af
ld [wcf91], a
pop hl
@@ -632,7 +632,7 @@ ItemUseTownMap:
ld a, [wIsInBattle]
and a
jp nz, ItemUseNotTime
- jpba DisplayTownMap
+ farjp DisplayTownMap
ItemUseBicycle:
ld a, [wIsInBattle]
@@ -778,7 +778,7 @@ ItemUseEvoStone:
ld a, SFX_HEAL_AILMENT
call PlaySoundWaitForCurrent
call WaitForSoundToFinish
- callab TryEvolvingMon ; try to evolve pokemon
+ callfar TryEvolvingMon ; try to evolve pokemon
ld a, [wEvolutionOccurred]
and a
jr z, .noEffect
@@ -1341,7 +1341,7 @@ ItemUseMedicine:
push hl
push de
ld d, a
- callab CalcExperience ; calculate experience for next level and store it at hExperience
+ callfar CalcExperience ; calculate experience for next level and store it at hExperience
pop de
pop hl
ld bc, wPartyMon1Exp - wPartyMon1Level
@@ -1400,14 +1400,14 @@ ItemUseMedicine:
ld [wMonDataLocation], a
call LoadMonData
ld d, $01
- callab PrintStatsBox ; display new stats text box
+ callfar PrintStatsBox ; display new stats text box
call WaitForTextScrollButtonPress ; wait for button press
xor a ; PLAYER_PARTY_DATA
ld [wMonDataLocation], a
predef LearnMoveFromLevelUp ; learn level up move, if any
xor a
ld [wForceEvolution], a
- callab TryEvolvingMon ; evolve pokemon, if appropriate
+ callfar TryEvolvingMon ; evolve pokemon, if appropriate
ld a, $01
ld [wUpdateSpritesEnabled], a
pop af
@@ -1699,7 +1699,7 @@ ItemUseXStat:
call Delay3
xor a
ldh [hWhoseTurn], a ; set turn to player's turn
- callba StatModifierUpEffect ; do stat increase move
+ farcall StatModifierUpEffect ; do stat increase move
pop hl
pop af
ld [hld], a ; restore [wPlayerMoveEffect]
@@ -1775,7 +1775,7 @@ ItemUsePokeflute:
and $80
jr nz, .skipMusic
call WaitForSoundToFinish ; wait for sound to end
- callba Music_PokeFluteInBattle ; play in-battle pokeflute music
+ farcall Music_PokeFluteInBattle ; play in-battle pokeflute music
.musicWaitLoop ; wait for music to finish playing
ld a, [wChannelSoundIDs + Ch7]
and a ; music off?
@@ -1927,7 +1927,7 @@ RodResponse:
push af
push hl
ld [hl], 0
- callba FishingAnim
+ farcall FishingAnim
pop hl
pop af
ld [hl], a
@@ -1968,7 +1968,7 @@ ItemUseItemfinder:
and a
jp nz, ItemUseNotTime
call ItemUseReloadOverworldData
- callba HiddenItemNear ; check for hidden items
+ farcall HiddenItemNear ; check for hidden items
ld hl, ItemfinderFoundNothingText
jr nc, .printText ; if no hidden items
ld c, 4
@@ -2024,7 +2024,7 @@ ItemUsePPRestore:
call PrintText
xor a
ld [wPlayerMoveListIndex], a
- callab MoveSelectionMenu ; move selection menu
+ callfar MoveSelectionMenu ; move selection menu
ld a, 0
ld [wPlayerMoveListIndex], a
jr nz, .chooseMon
@@ -2278,7 +2278,7 @@ ItemUseTMHM:
call PrintText
jr .chooseMon
.checkIfAlreadyLearnedMove
- callab CheckIfMoveIsKnown ; check if the pokemon already knows the move
+ callfar CheckIfMoveIsKnown ; check if the pokemon already knows the move
jr c, .chooseMon
predef LearnMove ; teach move
pop af
@@ -2820,7 +2820,7 @@ SendNewMonToBox:
push de
ld a, [wCurEnemyLVL]
ld d, a
- callab CalcExperience
+ callfar CalcExperience
pop de
ldh a, [hExperience]
ld [de], a
diff --git a/engine/items/town_map.asm b/engine/items/town_map.asm
index 3f6d4fa5..3cff630b 100755
--- a/engine/items/town_map.asm
+++ b/engine/items/town_map.asm
@@ -366,7 +366,7 @@ DrawPlayerOrBirdSprite:
jp CopyData
DisplayWildLocations:
- callba FindWildLocationsOfMon
+ farcall FindWildLocationsOfMon
call ZeroOutDuplicatesInList
ld hl, wOAMBuffer
ld de, wTownMapCoords
diff --git a/engine/link/cable_club.asm b/engine/link/cable_club.asm
index abb88cc0..03e1c50a 100755
--- a/engine/link/cable_club.asm
+++ b/engine/link/cable_club.asm
@@ -359,7 +359,7 @@ TradeCenter_SelectMon:
.displayEnemyMonStats
ld a, INIT_ENEMYOT_LIST
ld [wInitListType], a
- callab InitList ; the list isn't used
+ callfar InitList ; the list isn't used
ld hl, wEnemyMons
call TradeCenter_DisplayStats
jp .getNewInput
@@ -418,7 +418,7 @@ TradeCenter_SelectMon:
; unreachable code
ld a, INIT_PLAYEROT_LIST
ld [wInitListType], a
- callab InitList ; the list isn't used
+ callfar InitList ; the list isn't used
call TradeCenter_DisplayStats
jp .getNewInput
.playerMonMenu_ANotPressed
@@ -513,7 +513,7 @@ TradeCenter_SelectMon:
ld [wCurrentMenuItem], a
ld a, INIT_PLAYEROT_LIST
ld [wInitListType], a
- callab InitList ; the list isn't used
+ callfar InitList ; the list isn't used
call TradeCenter_DisplayStats
call LoadScreenTilesFromBuffer1
jp .playerMonMenu
@@ -588,7 +588,7 @@ ReturnToCableClubRoom:
dec a
ld [wDestinationWarpID], a
call LoadMapData
- callba ClearVariablesOnEnterMap
+ farcall ClearVariablesOnEnterMap
pop hl
pop af
ld [hl], a
@@ -845,7 +845,7 @@ TradeCenter_Trade:
.usingExternalClock
predef ExternalClockTradeAnim
.tradeCompleted
- callab TryEvolvingMon
+ callfar TryEvolvingMon
call ClearScreen
call LoadTrainerInfoTextBoxTiles
call Serial_PrintWaitingTextAndSyncAndExchangeNybble
diff --git a/engine/link/cable_club_npc.asm b/engine/link/cable_club_npc.asm
index 16c62f9e..594adf08 100755
--- a/engine/link/cable_club_npc.asm
+++ b/engine/link/cable_club_npc.asm
@@ -54,7 +54,7 @@ CableClubNPC::
ld a, [wCurrentMenuItem]
and a
jr nz, .choseNo
- callab SaveSAVtoSRAM
+ callfar SaveSAVtoSRAM
call WaitForSoundToFinish
ld a, SFX_SAVE
call PlaySoundWaitForCurrent
@@ -107,7 +107,7 @@ CableClubNPC::
xor a
ld [hld], a
ld [hl], a
- jpab LinkMenu
+ jpfar LinkMenu
CableClubNPCAreaReservedFor2FriendsLinkedByCableText:
text_far _CableClubNPCAreaReservedFor2FriendsLinkedByCableText
diff --git a/engine/menus/league_pc.asm b/engine/menus/league_pc.asm
index 7bf0458d..d930e42f 100755
--- a/engine/menus/league_pc.asm
+++ b/engine/menus/league_pc.asm
@@ -29,7 +29,7 @@ PKMNLeaguePC:
push bc
ld a, [wHoFTeamIndex2]
ld [wHoFTeamIndex], a
- callba LoadHallOfFameTeams
+ farcall LoadHallOfFameTeams
call LeaguePCShowTeam
pop bc
jr c, .doneShowingTeams
@@ -110,7 +110,7 @@ LeaguePCShowMon:
ld de, wHoFTeamNo
lb bc, 1, 3
call PrintNumber
- jpba HoFDisplayMonInfo
+ farjp HoFDisplayMonInfo
HallOfFameNoText:
db "HALL OF FAME No @"
diff --git a/engine/menus/naming_screen.asm b/engine/menus/naming_screen.asm
index 170e778a..e6886c98 100755
--- a/engine/menus/naming_screen.asm
+++ b/engine/menus/naming_screen.asm
@@ -92,7 +92,7 @@ DisplayNamingScreen:
call RunPaletteCommand
call LoadHpBarAndStatusTilePatterns
call LoadEDTile
- callba LoadMonPartySpriteGfx
+ farcall LoadMonPartySpriteGfx
coord hl, 0, 4
ld b, 9
ld c, 18
@@ -128,7 +128,7 @@ DisplayNamingScreen:
.inputLoop
ld a, [wCurrentMenuItem]
push af
- callba AnimatePartyMon_ForceSpeed1
+ farcall AnimatePartyMon_ForceSpeed1
pop af
ld [wCurrentMenuItem], a
call JoypadLowSensitivity
@@ -172,7 +172,7 @@ DisplayNamingScreen:
ld a, [wIsInBattle]
and a
jp z, LoadTextBoxTilePatterns
- jpab LoadHudTilePatterns
+ jpfar LoadHudTilePatterns
.namingScreenButtonFunctions
dw .dPadReturnPoint
@@ -461,7 +461,7 @@ PrintNamingText:
ld a, [wcf91]
ld [wMonPartySpriteSpecies], a
push af
- callba WriteMonPartySpriteOAMBySpecies
+ farcall WriteMonPartySpriteOAMBySpecies
pop af
ld [wd11e], a
call GetMonName
diff --git a/engine/menus/party_menu.asm b/engine/menus/party_menu.asm
index f46b3994..4eeb0ed8 100755
--- a/engine/menus/party_menu.asm
+++ b/engine/menus/party_menu.asm
@@ -22,14 +22,14 @@ DrawPartyMenu_::
ldh [hAutoBGTransferEnabled], a
call ClearScreen
call UpdateSprites
- callba LoadMonPartySpriteGfxWithLCDDisabled ; load pokemon icon graphics
+ farcall LoadMonPartySpriteGfxWithLCDDisabled ; load pokemon icon graphics
RedrawPartyMenu_::
ld a, [wPartyMenuTypeOrMessageID]
cp SWAP_MONS_PARTY_MENU
jp z, .printMessage
call ErasePartyMenuCursors
- callba InitPartyMenuBlkPacket
+ farcall InitPartyMenuBlkPacket
coord hl, 3, 0
ld de, wPartySpecies
xor a
@@ -49,7 +49,7 @@ RedrawPartyMenu_::
call GetPartyMonName
pop hl
call PlaceString ; print the pokemon's name
- callba WriteMonPartySpriteOAMByPartyIndex ; place the appropriate pokemon icon
+ farcall WriteMonPartySpriteOAMByPartyIndex ; place the appropriate pokemon icon
ldh a, [hPartyMonIndex]
ld [wWhichPokemon], a
inc a
diff --git a/engine/menus/pc.asm b/engine/menus/pc.asm
index 1006cbbe..4c340e7b 100755
--- a/engine/menus/pc.asm
+++ b/engine/menus/pc.asm
@@ -10,7 +10,7 @@ ActivatePC::
call LoadScreenTilesFromBuffer2
call Delay3
PCMainMenu:
- callba DisplayPCMainMenu
+ farcall DisplayPCMainMenu
ld hl, wFlags_0xcd60
set 5, [hl]
call HandleMenuInput
@@ -56,19 +56,19 @@ PCMainMenu:
call WaitForSoundToFinish
ld hl, AccessedMyPCText
call PrintText
- callba PlayerPC
+ farcall PlayerPC
jr ReloadMainMenu
OaksPC:
ld a, SFX_ENTER_PC
call PlaySound
call WaitForSoundToFinish
- callba OpenOaksPC
+ farcall OpenOaksPC
jr ReloadMainMenu
PKMNLeague:
ld a, SFX_ENTER_PC
call PlaySound
call WaitForSoundToFinish
- callba PKMNLeaguePC
+ farcall PKMNLeaguePC
jr ReloadMainMenu
BillsPC:
ld a, SFX_ENTER_PC
@@ -82,7 +82,7 @@ BillsPC:
ld hl, AccessedBillsPCText
.printText
call PrintText
- callba BillsPC_
+ farcall BillsPC_
ReloadMainMenu:
xor a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
diff --git a/engine/menus/pokedex.asm b/engine/menus/pokedex.asm
index d0ef3e31..a2a55bfd 100755
--- a/engine/menus/pokedex.asm
+++ b/engine/menus/pokedex.asm
@@ -14,7 +14,7 @@ ShowPokedexMenu:
.setUpGraphics
ld b, SET_PAL_GENERIC
call RunPaletteCommand
- callab LoadPokedexTilePatterns
+ callfar LoadPokedexTilePatterns
.doPokemonListMenu
ld hl, wTopMenuItemY
ld a, 3
@@ -393,7 +393,7 @@ ShowPokedexData:
call GBPalWhiteOutWithDelay3
call ClearScreen
call UpdateSprites
- callab LoadPokedexTilePatterns ; load pokedex tiles
+ callfar LoadPokedexTilePatterns ; load pokedex tiles
; function to display pokedex data from inside the pokedex
ShowPokedexDataInternal:
diff --git a/engine/menus/save.asm b/engine/menus/save.asm
index 34fa9142..2941a07e 100755
--- a/engine/menus/save.asm
+++ b/engine/menus/save.asm
@@ -138,7 +138,7 @@ LoadSAVIgnoreBadCheckSum:
jp LoadSAV2
SaveSAV:
- callba PrintSaveScreenText
+ farcall PrintSaveScreenText
ld hl, WouldYouLikeToSaveText
call SaveSAVConfirm
and a ;|0 = Yes|1 = No|
diff --git a/engine/menus/start_sub_menus.asm b/engine/menus/start_sub_menus.asm
index acc6bda8..33d504b8 100755
--- a/engine/menus/start_sub_menus.asm
+++ b/engine/menus/start_sub_menus.asm
@@ -160,7 +160,7 @@ StartMenu_Pokemon::
.surf
bit 4, a ; does the player have the Soul Badge?
jp z, .newBadgeRequired
- callba IsSurfingAllowed
+ farcall IsSurfingAllowed
ld hl, wd728
bit 1, [hl]
res 1, [hl]
@@ -651,7 +651,7 @@ StartMenu_Option::
ldh [hAutoBGTransferEnabled], a
call ClearScreen
call UpdateSprites
- callab DisplayOptionMenu
+ callfar DisplayOptionMenu
call LoadScreenTilesFromBuffer2 ; restore saved screen
call LoadTextBoxTilePatterns
call UpdateSprites
diff --git a/engine/movie/credits.asm b/engine/movie/credits.asm
index caf62852..42b8e0cc 100755
--- a/engine/movie/credits.asm
+++ b/engine/movie/credits.asm
@@ -1,5 +1,5 @@
HallOfFamePC:
- callba AnimateHallOfFame
+ farcall AnimateHallOfFame
call ClearScreen
ld c, 100
call DelayFrames
@@ -235,7 +235,7 @@ Credits:
jr .nextCreditsScreen
.showCopyrightText
push de
- callba LoadCopyrightTiles
+ farcall LoadCopyrightTiles
pop de
pop de
jr .nextCreditsCommand
diff --git a/engine/movie/intro.asm b/engine/movie/intro.asm
index 1aba3408..08b6ed8b 100755
--- a/engine/movie/intro.asm
+++ b/engine/movie/intro.asm
@@ -311,7 +311,7 @@ LoadIntroGraphics:
PlayShootingStar:
ld b, SET_PAL_GAME_FREAK_INTRO
call RunPaletteCommand
- callba LoadCopyrightAndTextBoxTiles
+ farcall LoadCopyrightAndTextBoxTiles
ldPal a, BLACK, DARK_GRAY, LIGHT_GRAY, WHITE
ldh [rBGP], a
ld c, 180
@@ -328,7 +328,7 @@ PlayShootingStar:
set 3, [hl]
ld c, 64
call DelayFrames
- callba AnimateShootingStar
+ farcall AnimateShootingStar
push af
pop af
jr c, .next ; skip the delay if the user interrupted the animation
diff --git a/engine/movie/oak_speech/clear_save.asm b/engine/movie/oak_speech/clear_save.asm
index b214ec32..c423fb0b 100755
--- a/engine/movie/oak_speech/clear_save.asm
+++ b/engine/movie/oak_speech/clear_save.asm
@@ -15,7 +15,7 @@ DoClearSaveDialogue:
ld a, [wCurrentMenuItem]
and a
jp z, Init
- callba ClearSAV
+ farcall ClearSAV
jp Init
ClearSaveDataText:
diff --git a/engine/movie/title.asm b/engine/movie/title.asm
index 62eb37d0..efdf2f07 100755
--- a/engine/movie/title.asm
+++ b/engine/movie/title.asm
@@ -226,7 +226,7 @@ ENDC
ld c, 1
call CheckForUserInterruption
jr c, .finishedWaiting
- callba TitleScreenAnimateBallIfStarterOut
+ farcall TitleScreenAnimateBallIfStarterOut
call TitleScreenPickNewMon
jr .awaitUserInterruptionLoop
@@ -255,7 +255,7 @@ ENDC
jp MainMenu
.doClearSaveDialogue
- jpba DoClearSaveDialogue
+ farjp DoClearSaveDialogue
TitleScreenPickNewMon:
ld a, vBGMap0 / $100
@@ -282,12 +282,12 @@ TitleScreenPickNewMon:
ld a, $90
ldh [hWY], a
ld d, 1 ; scroll out
- callba TitleScroll
+ farcall TitleScroll
ret
TitleScreenScrollInMon:
ld d, 0 ; scroll in
- callba TitleScroll
+ farcall TitleScroll
xor a
ldh [hWY], a
ret
diff --git a/engine/movie/trade.asm b/engine/movie/trade.asm
index c8005b93..518742aa 100755
--- a/engine/movie/trade.asm
+++ b/engine/movie/trade.asm
@@ -199,7 +199,7 @@ LoadTradingGFXAndMonNames:
Trade_LoadMonPartySpriteGfx:
ld a, %11010000
ldh [rOBP1], a
- jpba LoadMonPartySpriteGfx
+ farjp LoadMonPartySpriteGfx
Trade_SwapNames:
ld hl, wPlayerName
@@ -615,7 +615,7 @@ Trade_AnimCircledMon:
ret
Trade_WriteCircledMonOAM:
- callba WriteMonPartySpriteOAMBySpecies
+ farcall WriteMonPartySpriteOAMBySpecies
call Trade_WriteCircleOAM
Trade_AddOffsetsToOAMCoords:
diff --git a/engine/overworld/cut.asm b/engine/overworld/cut.asm
index fc5fb578..97842079 100755
--- a/engine/overworld/cut.asm
+++ b/engine/overworld/cut.asm
@@ -57,7 +57,7 @@ UsedCut:
ld de, CutTreeBlockSwaps
call ReplaceTreeTileBlock
call RedrawMapView
- callba AnimCut
+ farcall AnimCut
ld a, $1
ld [wUpdateSpritesEnabled], a
ld a, SFX_CUT
diff --git a/engine/overworld/dust_smoke.asm b/engine/overworld/dust_smoke.asm
index 3d87e25a..09a71a18 100755
--- a/engine/overworld/dust_smoke.asm
+++ b/engine/overworld/dust_smoke.asm
@@ -8,7 +8,7 @@ AnimateBoulderDust:
ld a, %11100100
ldh [rOBP1], a
call LoadSmokeTileFourTimes
- callba WriteCutOrBoulderDustAnimationOAMBlock
+ farcall WriteCutOrBoulderDustAnimationOAMBlock
ld c, 8 ; number of steps in animation
.loop
push bc
diff --git a/engine/overworld/player_state.asm b/engine/overworld/player_state.asm
index f2e74683..39c8f756 100644
--- a/engine/overworld/player_state.asm
+++ b/engine/overworld/player_state.asm
@@ -192,7 +192,7 @@ IsPlayerStandingOnDoorTileOrWarpTile::
push hl
push de
push bc
- callba IsPlayerStandingOnDoorTile
+ farcall IsPlayerStandingOnDoorTile
jr c, .done
ld a, [wCurMapTileset]
add a
diff --git a/engine/overworld/push_boulder.asm b/engine/overworld/push_boulder.asm
index fb4d06aa..4cef8b64 100644
--- a/engine/overworld/push_boulder.asm
+++ b/engine/overworld/push_boulder.asm
@@ -86,7 +86,7 @@ DoBoulderDustAnimation::
ld a, [wd730]
bit 0, a
ret nz
- callab AnimateBoulderDust
+ callfar AnimateBoulderDust
call DiscardButtonPresses
ld [wJoyIgnore], a
call ResetBoulderPushFlags
diff --git a/engine/pokemon/add_mon.asm b/engine/pokemon/add_mon.asm
index eeef40b0..0c72ff5b 100644
--- a/engine/pokemon/add_mon.asm
+++ b/engine/pokemon/add_mon.asm
@@ -201,7 +201,7 @@ _AddPartyMon::
push de
ld a, [wCurEnemyLVL]
ld d, a
- callab CalcExperience
+ callfar CalcExperience
pop de
inc de
ldh a, [hExperience] ; write experience
@@ -498,7 +498,7 @@ _MoveMon::
add $2
ld [wMonDataLocation], a
call LoadMonData
- callba CalcLevelFromExperience
+ farcall CalcLevelFromExperience
ld a, d
ld [wCurEnemyLVL], a
pop hl
diff --git a/engine/pokemon/bills_pc.asm b/engine/pokemon/bills_pc.asm
index 80739de4..0a760a27 100644
--- a/engine/pokemon/bills_pc.asm
+++ b/engine/pokemon/bills_pc.asm
@@ -318,7 +318,7 @@ BillsPCRelease:
jp BillsPCMenu
BillsPCChangeBox:
- callba ChangeBox
+ farcall ChangeBox
jp BillsPCMenu
DisplayMonListMenu:
diff --git a/engine/pokemon/evos_moves.asm b/engine/pokemon/evos_moves.asm
index c54bf7c7..564a8557 100755
--- a/engine/pokemon/evos_moves.asm
+++ b/engine/pokemon/evos_moves.asm
@@ -129,7 +129,7 @@ Evolution_PartyMonLoop: ; loop over party mons
ld a, $ff
ld [wUpdateSpritesEnabled], a
call ClearSprites
- callab EvolveMon
+ callfar EvolveMon
jp c, CancelledEvolution
ld hl, EvolvedText
call PrintText
diff --git a/engine/pokemon/learn_move.asm b/engine/pokemon/learn_move.asm
index 510300cd..e7b907d5 100755
--- a/engine/pokemon/learn_move.asm
+++ b/engine/pokemon/learn_move.asm
@@ -114,7 +114,7 @@ TryingToLearn:
ld de, wMoves
ld bc, NUM_MOVES
call CopyData
- callab FormatMovesString
+ callfar FormatMovesString
pop hl
.loop
push hl
diff --git a/engine/pokemon/load_mon_data.asm b/engine/pokemon/load_mon_data.asm
index 480ab1ca..c5e2041a 100644
--- a/engine/pokemon/load_mon_data.asm
+++ b/engine/pokemon/load_mon_data.asm
@@ -15,7 +15,7 @@ LoadMonData_::
ld a, [wWhichPokemon]
ld e, a
- callab GetMonSpecies
+ callfar GetMonSpecies
.GetMonHeader
ld a, [wcf91]
diff --git a/engine/pokemon/status_screen.asm b/engine/pokemon/status_screen.asm
index e46adae4..c2abeedd 100755
--- a/engine/pokemon/status_screen.asm
+++ b/engine/pokemon/status_screen.asm
@@ -310,7 +310,7 @@ StatusScreen2:
ld de, wMoves
ld bc, NUM_MOVES
call CopyData
- callab FormatMovesString
+ callfar FormatMovesString
coord hl, 9, 2
lb bc, 5, 10
call ClearScreenArea ; Clear under name
@@ -356,7 +356,7 @@ StatusScreen2:
ld a, b
ld [hl], a
push hl
- callab GetMaxPP
+ callfar GetMaxPP
pop hl
pop af
ld [hl], a
@@ -445,7 +445,7 @@ CalcExpToLevelUp:
jr z, .atMaxLevel
inc a
ld d, a
- callab CalcExperience
+ callfar CalcExperience
ld hl, wLoadedMonExp + 2
ldh a, [hExperience + 2]
sub [hl]
diff --git a/engine/slots/game_corner_slots.asm b/engine/slots/game_corner_slots.asm
index 797c381c..c233b0e6 100755
--- a/engine/slots/game_corner_slots.asm
+++ b/engine/slots/game_corner_slots.asm
@@ -6,7 +6,7 @@ StartSlotMachine:
jr z, .printOutToLunch
cp $ff
jr z, .printSomeonesKeys
- callba AbleToPlaySlotsCheck
+ farcall AbleToPlaySlotsCheck
ld a, [wCanPlaySlots]
and a
ret z
diff --git a/home.asm b/home.asm
index 779a2e0c..62594b43 100644
--- a/home.asm
+++ b/home.asm
@@ -206,7 +206,7 @@ CountSetBits::
; subtracts the amount the player paid from their money
; OUTPUT: carry = 0(success) or 1(fail because there is not enough money)
SubtractAmountPaidFromMoney::
- jpba SubtractAmountPaidFromMoney_
+ farjp SubtractAmountPaidFromMoney_
; adds the amount the player sold to their money
AddAmountSoldToMoney::
@@ -296,7 +296,7 @@ ReloadTilesetTilePatterns::
ChooseFlyDestination::
ld hl, wd72e
res 4, [hl]
- jpba LoadTownMap_Fly
+ farjp LoadTownMap_Fly
; causes the text box to close without waiting for a button press after displaying text
DisableWaitingAfterTextDisplay::
@@ -314,7 +314,7 @@ DisableWaitingAfterTextDisplay::
; 01: successful
; 02: not able to be used right now, no extra menu displayed (only certain items use this)
UseItem::
- jpba UseItem_
+ farjp UseItem_
; confirms the item toss and then tosses the item
; INPUT:
@@ -348,7 +348,7 @@ IsKeyItem::
push hl
push de
push bc
- callba IsKeyItem_
+ farcall IsKeyItem_
pop bc
pop de
pop hl
@@ -418,10 +418,10 @@ RunNPCMovementScript::
dw PewterMuseumGuyMovementScriptPointerTable
dw PewterGymGuyMovementScriptPointerTable
.playerStepOutFromDoor
- jpba PlayerStepOutFromDoor
+ farjp PlayerStepOutFromDoor
EndNPCMovementScript::
- jpba _EndNPCMovementScript
+ farjp _EndNPCMovementScript
EmptyFunc2::
ret
@@ -502,7 +502,7 @@ IsItemInBag::
DisplayPokedex::
ld [wd11e], a
- jpba _DisplayPokedex
+ farjp _DisplayPokedex
SetSpriteFacingDirectionAndDelay::
call SetSpriteFacingDirection
@@ -711,7 +711,7 @@ GetTrainerInformation::
ret
GetTrainerName::
- jpba GetTrainerName_
+ farjp GetTrainerName_
HasEnoughMoney::
; Check if the player has at least as much
@@ -1107,7 +1107,7 @@ ManualTextScroll::
Multiply::
push hl
push bc
- callab _Multiply
+ callfar _Multiply
pop bc
pop hl
ret
@@ -1296,7 +1296,7 @@ HandleMenuInput_::
ld a, [wPartyMenuAnimMonEnabled]
and a ; is it a pokemon selection menu?
jr z, .getJoypadState
- callba AnimatePartyMon ; shake mini sprite of selected pokemon
+ farcall AnimatePartyMon ; shake mini sprite of selected pokemon
.getJoypadState
pop hl
call JoypadLowSensitivity
@@ -1687,7 +1687,7 @@ ReloadMapSpriteTilePatterns::
xor a
ld [wSpriteSetID], a
call DisableLCD
- callba InitMapSprites
+ farcall InitMapSprites
call EnableLCD
pop hl
pop af
@@ -1721,7 +1721,7 @@ GivePokemon::
ld [wCurEnemyLVL], a
xor a ; PLAYER_PARTY_DATA
ld [wMonDataLocation], a
- jpba _GivePokemon
+ farjp _GivePokemon
Random::
; Return a random number in a.
@@ -1729,7 +1729,7 @@ Random::
push hl
push de
push bc
- callba Random_
+ farcall Random_
ldh a, [hRandomAdd]
pop bc
pop de
@@ -1739,7 +1739,7 @@ Random::
INCLUDE "home/predef.asm"
UpdateCinnabarGymGateTileBlocks::
- jpba UpdateCinnabarGymGateTileBlocks_
+ farjp UpdateCinnabarGymGateTileBlocks_
CheckForHiddenObjectOrBookshelfOrCardKeyDoor::
ldh a, [hLoadedROMBank]
@@ -1765,7 +1765,7 @@ CheckForHiddenObjectOrBookshelfOrCardKeyDoor::
xor a
jr .done
.hiddenObjectNotFound
- callba PrintBookshelfText
+ farcall PrintBookshelfText
ldh a, [hFFDB]
and a
jr z, .done
diff --git a/home/move_mon.asm b/home/move_mon.asm
index 7be8eaf5..9fe7b067 100644
--- a/home/move_mon.asm
+++ b/home/move_mon.asm
@@ -3,13 +3,13 @@
; [wRemoveMonFromBox] == 0 specifies the party.
; [wRemoveMonFromBox] != 0 specifies the current box.
RemovePokemon::
- jpab _RemovePokemon
+ jpfar _RemovePokemon
AddPartyMon::
push hl
push de
push bc
- callba _AddPartyMon
+ farcall _AddPartyMon
pop bc
pop de
pop hl
diff --git a/home/overworld.asm b/home/overworld.asm
index 18c7977e..557efa2d 100644
--- a/home/overworld.asm
+++ b/home/overworld.asm
@@ -1,14 +1,14 @@
HandleMidJump::
; Handle the player jumping down
; a ledge in the overworld.
- jpba _HandleMidJump
+ farjp _HandleMidJump
EnterMap::
; Load a new map.
ld a, $ff
ld [wJoyIgnore], a
call LoadMapData
- callba ClearVariablesOnEnterMap
+ farcall ClearVariablesOnEnterMap
ld hl, wd72c
bit 0, [hl] ; has the player already made 3 steps since the last battle?
jr z, .skipGivingThreeStepsOfNoRandomBattles
@@ -25,10 +25,10 @@ EnterMap::
and 1 << 4 | 1 << 3 ; fly warp or dungeon warp
jr z, .didNotEnterUsingFlyWarpOrDungeonWarp
res 3, [hl]
- callba EnterMapAnim
+ farcall EnterMapAnim
call UpdateSprites
.didNotEnterUsingFlyWarpOrDungeonWarp
- callba CheckForceBikeOrSurf ; handle currents in SF islands and forced bike riding in cycling road
+ farcall CheckForceBikeOrSurf ; handle currents in SF islands and forced bike riding in cycling road
ld hl, wd72d
res 5, [hl]
call UpdateSprites
@@ -50,7 +50,7 @@ OverworldLoopLessDelay::
and a
jp nz, .moveAhead ; if the player sprite has not yet completed the walking animation
call JoypadOverworld ; get joypad state (which is possibly simulated)
- callba SafariZoneCheck
+ farcall SafariZoneCheck
ld a, [wSafariZoneGameOver]
and a
jp nz, WarpFound2
@@ -269,7 +269,7 @@ OverworldLoopLessDelay::
ld a, [wd736]
bit 7, a
jr z, .noSpinning
- callba LoadSpinnerArrowTiles
+ farcall LoadSpinnerArrowTiles
.noSpinning
call UpdateSprites
@@ -306,7 +306,7 @@ OverworldLoopLessDelay::
.doneStepCounting
CheckEvent EVENT_IN_SAFARI_ZONE
jr z, .notSafariZone
- callba SafariZoneCheckSteps
+ farcall SafariZoneCheckSteps
ld a, [wSafariZoneGameOver]
and a
jp nz, WarpFound2
@@ -343,7 +343,7 @@ OverworldLoopLessDelay::
ld a, [wCurMap]
cp OAKS_LAB
jp z, .noFaintCheck ; no blacking out if the player lost to the rival in Oak's lab
- callab AnyPartyAlive
+ callfar AnyPartyAlive
ld a, d
and a
jr z, .allPokemonFainted
@@ -368,7 +368,7 @@ NewBattle::
ld a, [wd72e]
bit 4, a
jr nz, .noBattle
- jpba InitBattle
+ farjp InitBattle
.noBattle
and a
ret
@@ -412,7 +412,7 @@ CheckWarpsNoCollisionLoop::
push bc
ld hl, wd736
set 2, [hl] ; standing on warp flag
- callba IsPlayerStandingOnDoorTileOrWarpTile
+ farcall IsPlayerStandingOnDoorTileOrWarpTile
pop bc
pop hl
jr c, WarpFound1 ; jump if standing on door or warp
@@ -511,7 +511,7 @@ WarpFound2::
jr z, .goBackOutside
; if not going back to the previous map
ld [wCurMap], a
- callba IsPlayerStandingOnWarpPadOrHole
+ farcall IsPlayerStandingOnWarpPadOrHole
ld a, [wStandingOnWarpPadOrHole]
dec a ; is the player on a warp pad?
jr nz, .notWarpPad
@@ -679,7 +679,7 @@ CheckMapConnections::
call RunPaletteCommand
; Since the sprite set shouldn't change, this will just update VRAM slots at
; $C2XE without loading any tile patterns.
- callba InitMapSprites
+ farcall InitMapSprites
call LoadTileBlockMap
jp OverworldLoopLessDelay
@@ -747,7 +747,7 @@ ExtraWarpCheck::
jp Bankswitch
MapEntryAfterBattle::
- callba IsPlayerStandingOnWarp ; for enabling warp testing after collisions
+ farcall IsPlayerStandingOnWarp ; for enabling warp testing after collisions
ld a, [wMapPalOffset]
and a
jp z, GBFadeInFromWhite
@@ -800,7 +800,7 @@ HandleFlyWarpOrDungeonWarp::
jp SpecialEnterMap
LeaveMapAnim::
- jpba _LeaveMapAnim
+ farjp _LeaveMapAnim
LoadPlayerSpriteGraphics::
; Load sprite graphics based on whether the player is standing, biking, or surfing.
@@ -1286,7 +1286,7 @@ CheckForJumpingAndTilePairCollisions::
predef GetTileAndCoordsInFrontOfPlayer ; get the tile in front of the player
push de
push bc
- callba HandleLedges ; check if the player is trying to jump a ledge
+ farcall HandleLedges ; check if the player is trying to jump a ledge
pop bc
pop de
pop hl
@@ -1977,11 +1977,11 @@ RunMapScript::
push hl
push de
push bc
- callba TryPushingBoulder
+ farcall TryPushingBoulder
ld a, [wFlags_0xcd60]
bit 1, a ; play boulder dust animation
jr z, .afterBoulderEffect
- callba DoBoulderDustAnimation
+ farcall DoBoulderDustAnimation
.afterBoulderEffect
pop bc
pop de
@@ -2032,7 +2032,7 @@ LoadPlayerSpriteGraphicsCommon::
; function to load data from the map header
LoadMapHeader::
- callba MarkTownVisitedAndLoadMissableObjects
+ farcall MarkTownVisitedAndLoadMissableObjects
ld a, [wCurMapTileset]
ld [wUnusedD119], a
ld a, [wCurMap]
@@ -2280,7 +2280,7 @@ LoadMapHeader::
jp nz, .loadSpriteLoop
.finishUp
predef LoadTilesetHeader
- callab LoadWildData
+ callfar LoadWildData
pop hl ; restore hl from before going to the warp/sign/sprite data (this value was saved for seemingly no purpose)
ld a, [wCurMapHeight] ; map height in 4x4 tile blocks
add a ; double it
@@ -2337,7 +2337,7 @@ LoadMapData::
ld [wSpriteSetID], a
call LoadTextBoxTilePatterns
call LoadMapHeader
- callba InitMapSprites ; load tile pattern data for sprites
+ farcall InitMapSprites ; load tile pattern data for sprites
call LoadTileBlockMap
call LoadTilesetTilePatternData
call LoadCurrentMapView
diff --git a/home/pokemon.asm b/home/pokemon.asm
index 6c5442c4..d018843e 100644
--- a/home/pokemon.asm
+++ b/home/pokemon.asm
@@ -81,7 +81,7 @@ DrawHPBar::
; wLoadedMon = base address of pokemon data
; wMonHeader = base address of base stats
LoadMonData::
- jpab LoadMonData_
+ jpfar LoadMonData_
OverwritewMoves::
; Write c to [wMoves + b]. Unused.
@@ -277,7 +277,7 @@ HandlePartyMenuInput::
bit 1, b ; was the B button pressed?
jr z, .handleSwap ; if not, handle swapping the pokemon
.cancelSwap ; if the B button was pressed
- callba ErasePartyMenuCursors
+ farcall ErasePartyMenuCursors
xor a
ld [wMenuItemToSwap], a
ld [wPartyMenuTypeOrMessageID], a
@@ -286,7 +286,7 @@ HandlePartyMenuInput::
.handleSwap
ld a, [wCurrentMenuItem]
ld [wWhichPokemon], a
- callba SwitchPartyMon
+ farcall SwitchPartyMon
jr HandlePartyMenuInput
DrawPartyMenu::
diff --git a/home/serial.asm b/home/serial.asm
index 27ac97d4..bd984d4f 100644
--- a/home/serial.asm
+++ b/home/serial.asm
@@ -225,7 +225,7 @@ Serial_ExchangeLinkMenuSelection::
Serial_PrintWaitingTextAndSyncAndExchangeNybble::
call SaveScreenTilesToBuffer1
- callab PrintWaitingText
+ callfar PrintWaitingText
call Serial_SyncAndExchangeNybble
jp LoadScreenTilesFromBuffer1
diff --git a/home/start_menu.asm b/home/start_menu.asm
index a692f007..5b29f67a 100755
--- a/home/start_menu.asm
+++ b/home/start_menu.asm
@@ -8,8 +8,8 @@ DisplayStartMenu::
call PlaySound
RedisplayStartMenu::
- callba DrawStartMenu
- callba PrintSafariZoneSteps ; print Safari Zone info, if in Safari Zone
+ farcall DrawStartMenu
+ farcall PrintSafariZoneSteps ; print Safari Zone info, if in Safari Zone
call UpdateSprites
.loop
call HandleMenuInput
diff --git a/home/text_script.asm b/home/text_script.asm
index 89f4d286..1baa3d64 100644
--- a/home/text_script.asm
+++ b/home/text_script.asm
@@ -3,7 +3,7 @@
DisplayTextID::
ldh a, [hLoadedROMBank]
push af
- callba DisplayTextIDInit ; initialization
+ farcall DisplayTextIDInit ; initialization
ld hl, wTextPredefFlag
bit 0, [hl]
res 0, [hl]
@@ -38,7 +38,7 @@ DisplayTextID::
push hl
push de
push bc
- callba UpdateSpriteFacingOffsetAndDelayMovement ; update the graphics of the sprite the player is talking to (to face the right direction)
+ farcall UpdateSpriteFacingOffsetAndDelayMovement ; update the graphics of the sprite the player is talking to (to face the right direction)
pop bc
pop de
ld hl, wMapSpriteData ; NPC text entries
@@ -79,9 +79,9 @@ ENDM
dict TX_SCRIPT_PLAYERS_PC, TextScript_ItemStoragePC
dict TX_SCRIPT_BILLS_PC, TextScript_BillsPC
dict TX_SCRIPT_POKECENTER_PC, TextScript_PokemonCenterPC
- dict2 TX_SCRIPT_VENDING_MACHINE, callba VendingMachineMenu
+ dict2 TX_SCRIPT_VENDING_MACHINE, farcall VendingMachineMenu
dict TX_SCRIPT_PRIZE_VENDOR, TextScript_GameCornerPrizeMenu
- dict2 TX_SCRIPT_CABLE_CLUB_RECEPTIONIST, callab CableClubNPC
+ dict2 TX_SCRIPT_CABLE_CLUB_RECEPTIONIST, callfar CableClubNPC
call PrintText_NoCreatingTextBox ; display the text
ld a, [wDoNotWaitForButtonPressAfterDisplayingText]
@@ -197,7 +197,7 @@ DisplayPokemonCenterDialogue::
jp AfterDisplayingTextID
DisplaySafariGameOverText::
- callab PrintSafariGameOverText
+ callfar PrintSafariGameOverText
jp AfterDisplayingTextID
DisplayPokemonFaintedText::
diff --git a/home/trainers.asm b/home/trainers.asm
index 66108af6..039c4ec8 100644
--- a/home/trainers.asm
+++ b/home/trainers.asm
@@ -219,7 +219,7 @@ ResetButtonPressedAndMapScript::
; calls TrainerWalkUpToPlayer
TrainerWalkUpToPlayer_Bank0::
- jpba TrainerWalkUpToPlayer
+ farjp TrainerWalkUpToPlayer
; sets opponent type and mon set/lvl based on the engaging trainer data
InitBattleEnemyParameters::
@@ -343,14 +343,14 @@ PrintEndBattleText::
ldh [hLoadedROMBank], a
ld [MBC1RomBank], a
push hl
- callba SaveTrainerName
+ farcall SaveTrainerName
ld hl, TrainerEndBattleText
call PrintText
pop hl
pop af
ldh [hLoadedROMBank], a
ld [MBC1RomBank], a
- callba FreezeEnemyTrainerSprite
+ farcall FreezeEnemyTrainerSprite
jp WaitForSoundToFinish
GetSavedEndBattleTextPointer::
diff --git a/home/vblank.asm b/home/vblank.asm
index 06b45b82..4c7abc20 100644
--- a/home/vblank.asm
+++ b/home/vblank.asm
@@ -72,7 +72,7 @@ VBlank::
call Audio3_UpdateMusic
.afterMusic
- callba TrackPlayTime ; keep track of time played
+ farcall TrackPlayTime ; keep track of time played
ldh a, [hDisableJoypadPolling]
and a
diff --git a/macros/farcall.asm b/macros/farcall.asm
index 85c2dc9f..122e5207 100644
--- a/macros/farcall.asm
+++ b/macros/farcall.asm
@@ -1,24 +1,22 @@
-farcall EQUS "callba"
-
-callba: MACRO
+farcall: MACRO
ld b, BANK(\1)
ld hl, \1
call Bankswitch
ENDM
-callab: MACRO
+callfar: MACRO
ld hl, \1
ld b, BANK(\1)
call Bankswitch
ENDM
-jpba: MACRO
+farjp: MACRO
ld b, BANK(\1)
ld hl, \1
jp Bankswitch
ENDM
-jpab: MACRO
+jpfar: MACRO
ld hl, \1
ld b, BANK(\1)
jp Bankswitch
diff --git a/scripts/BikeShop.asm b/scripts/BikeShop.asm
index 338381e9..8ff581a3 100755
--- a/scripts/BikeShop.asm
+++ b/scripts/BikeShop.asm
@@ -24,7 +24,7 @@ BikeShopText1:
jr nc, .BagFull
ld a, BIKE_VOUCHER
ldh [hItemToRemoveID], a
- callba RemoveItemByID
+ farcall RemoveItemByID
SetEvent EVENT_GOT_BICYCLE
ld hl, BikeShopText_1d824
call PrintText
diff --git a/scripts/CeladonMansion3F.asm b/scripts/CeladonMansion3F.asm
index c9085b32..b2d40b44 100755
--- a/scripts/CeladonMansion3F.asm
+++ b/scripts/CeladonMansion3F.asm
@@ -49,7 +49,7 @@ DirectorText:
text_far _CompletedDexText
text_promptbutton
text_asm
- callab DisplayDiploma
+ callfar DisplayDiploma
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
jp TextScriptEnd
diff --git a/scripts/CeladonMartElevator.asm b/scripts/CeladonMartElevator.asm
index bcac0d14..e58c88f0 100755
--- a/scripts/CeladonMartElevator.asm
+++ b/scripts/CeladonMartElevator.asm
@@ -60,7 +60,7 @@ CeladonMartElevatorWarpMaps:
CeladonMartElevatorWarpMapsEnd:
CeladonMartElevatorScript_48654:
- jpba ShakeElevator
+ farjp ShakeElevator
CeladonMartElevator_TextPointers:
dw CeladonMartElevatorText1
diff --git a/scripts/CeladonMartRoof.asm b/scripts/CeladonMartRoof.asm
index 06a8390a..e880211b 100755
--- a/scripts/CeladonMartRoof.asm
+++ b/scripts/CeladonMartRoof.asm
@@ -131,7 +131,7 @@ CeladonMartRoofScript_GiveDrinkToGirl:
jp PrintText
RemoveItemByIDBank12:
- jpba RemoveItemByID
+ farjp RemoveItemByID
CeladonMartRoofText_484ee:
text_far _CeladonMartRoofText_484ee
diff --git a/scripts/CeruleanCity.asm b/scripts/CeruleanCity.asm
index 656c3a4d..070120b7 100755
--- a/scripts/CeruleanCity.asm
+++ b/scripts/CeruleanCity.asm
@@ -174,7 +174,7 @@ CeruleanCityScript2:
ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a
call PlaySound
- callba Music_RivalAlternateStart
+ farcall Music_RivalAlternateStart
ld a, $1
ldh [hSpriteIndex], a
call SetSpriteMovementBytesToFF
@@ -310,7 +310,7 @@ CeruleanCityText2:
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, ReceivedTM28Text
call PrintText
- callba CeruleanHideRocket
+ farcall CeruleanHideRocket
.Done
jp TextScriptEnd
diff --git a/scripts/ChampionsRoom.asm b/scripts/ChampionsRoom.asm
index 53dd9d4e..e57048c5 100755
--- a/scripts/ChampionsRoom.asm
+++ b/scripts/ChampionsRoom.asm
@@ -108,7 +108,7 @@ GaryScript3:
ret
GaryScript4:
- callba Music_Cities1AlternateTempo
+ farcall Music_Cities1AlternateTempo
ld a, $2
ldh [hSpriteIndexOrTextID], a
call GaryScript_760c8
diff --git a/scripts/CinnabarLabFossilRoom.asm b/scripts/CinnabarLabFossilRoom.asm
index ac33e6ee..4bdb8a36 100755
--- a/scripts/CinnabarLabFossilRoom.asm
+++ b/scripts/CinnabarLabFossilRoom.asm
@@ -56,7 +56,7 @@ Lab4Text1:
ld a, [wFilteredBagItemsCount]
and a
jr z, .asm_75d8d
- callba GiveFossilToCinnabarLab
+ farcall GiveFossilToCinnabarLab
jr .asm_75d93
.asm_75d8d
ld hl, Lab4Text_75dcb
@@ -106,4 +106,4 @@ Lab4Text2:
jp TextScriptEnd
LoadFossilItemAndMonNameBank1D:
- jpba LoadFossilItemAndMonName
+ farjp LoadFossilItemAndMonName
diff --git a/scripts/CopycatsHouse2F.asm b/scripts/CopycatsHouse2F.asm
index b885baab..c27043e6 100755
--- a/scripts/CopycatsHouse2F.asm
+++ b/scripts/CopycatsHouse2F.asm
@@ -30,7 +30,7 @@ CopycatsHouse2FText1:
call PrintText
ld a, POKE_DOLL
ldh [hItemToRemoveID], a
- callba RemoveItemByID
+ farcall RemoveItemByID
SetEvent EVENT_GOT_TM31
jr .asm_62ecd
.BagFull
diff --git a/scripts/Daycare.asm b/scripts/Daycare.asm
index 9fc8f3c4..481d7e14 100755
--- a/scripts/Daycare.asm
+++ b/scripts/Daycare.asm
@@ -35,7 +35,7 @@ DayCareMText1:
pop af
ld hl, DayCareAllRightThenText
jp c, .done
- callab KnowsHMMove
+ callfar KnowsHMMove
ld hl, DayCareCantAcceptMonWithHMText
jp c, .done
xor a
@@ -65,13 +65,13 @@ DayCareMText1:
ld a, DAYCARE_DATA
ld [wMonDataLocation], a
call LoadMonData
- callab CalcLevelFromExperience
+ callfar CalcLevelFromExperience
ld a, d
cp MAX_LEVEL
jr c, .skipCalcExp
ld d, MAX_LEVEL
- callab CalcExperience
+ callfar CalcExperience
ld hl, wDayCareMonExp
ldh a, [hExperience]
ld [hli], a
diff --git a/scripts/HallOfFame.asm b/scripts/HallOfFame.asm
index cdfb2f17..35ad9fd8 100755
--- a/scripts/HallOfFame.asm
+++ b/scripts/HallOfFame.asm
@@ -45,7 +45,7 @@ HallofFameRoomScript2:
ld [wHallOfFameCurScript], a
ld a, PALLET_TOWN
ld [wLastBlackoutMap], a
- callba SaveSAVtoSRAM
+ farcall SaveSAVtoSRAM
ld b, 5
.delayLoop
ld c, 600 / 5
diff --git a/scripts/NameRatersHouse.asm b/scripts/NameRatersHouse.asm
index 7694e92b..cecf97e7 100755
--- a/scripts/NameRatersHouse.asm
+++ b/scripts/NameRatersHouse.asm
@@ -68,7 +68,7 @@ NameRaterText1:
jr nz, .asm_1daae
ld hl, NameRaterText_1dac2
call PrintText
- callba DisplayNameRaterScreen
+ farcall DisplayNameRaterScreen
jr c, .asm_1daae
ld hl, NameRaterText_1dac7
.asm_1daa8
diff --git a/scripts/OaksLab.asm b/scripts/OaksLab.asm
index 49017440..a2e0bfe8 100755
--- a/scripts/OaksLab.asm
+++ b/scripts/OaksLab.asm
@@ -441,7 +441,7 @@ OaksLabScript13:
ld a, $10
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
- callba Music_RivalAlternateStart
+ farcall Music_RivalAlternateStart
ld a, $1
ldh [hSpriteIndex], a
ld de, .RivalExitMovement
@@ -513,7 +513,7 @@ OaksLabScript15:
ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a
call PlaySound
- callba Music_RivalAlternateStart
+ farcall Music_RivalAlternateStart
ld a, $15
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
@@ -614,7 +614,7 @@ OaksLabScript16:
ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a
call PlaySound
- callba Music_RivalAlternateStart
+ farcall Music_RivalAlternateStart
ld a, $1
ldh [hSpriteIndex], a
ld de, wNPCMovementDirections2
diff --git a/scripts/PokemonTower2F.asm b/scripts/PokemonTower2F.asm
index 86a60579..cddebfa8 100755
--- a/scripts/PokemonTower2F.asm
+++ b/scripts/PokemonTower2F.asm
@@ -79,7 +79,7 @@ PokemonTower2Script1:
ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a
call PlaySound
- callba Music_RivalAlternateStart
+ farcall Music_RivalAlternateStart
ld a, $2
ld [wPokemonTower2FCurScript], a
ld [wCurMapScript], a
diff --git a/scripts/RocketHideoutElevator.asm b/scripts/RocketHideoutElevator.asm
index 6b1294b3..45b27e3b 100755
--- a/scripts/RocketHideoutElevator.asm
+++ b/scripts/RocketHideoutElevator.asm
@@ -58,7 +58,7 @@ RocketHideoutElevatorWarpMapsEnd:
RocketHideoutElevatorScript_4575f:
call Delay3
- callba ShakeElevator
+ farcall ShakeElevator
ret
RocketHideoutElevator_TextPointers:
diff --git a/scripts/Route22.asm b/scripts/Route22.asm
index fd566ff0..57dc934e 100755
--- a/scripts/Route22.asm
+++ b/scripts/Route22.asm
@@ -170,7 +170,7 @@ Route22Script2:
ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a
call PlaySound
- callba Music_RivalAlternateStart
+ farcall Music_RivalAlternateStart
ld a, [wcf0d]
cp $1
jr nz, .asm_50fff
@@ -248,7 +248,7 @@ Route22Script_5104e:
ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a
call PlaySound
- callba Music_RivalAlternateTempo
+ farcall Music_RivalAlternateTempo
ld a, $2
ldh [hSpriteIndex], a
call Route22MoveRivalSprite
@@ -329,7 +329,7 @@ Route22Script5:
ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a
call PlaySound
- callba Music_RivalAlternateStartAndTempo
+ farcall Music_RivalAlternateStartAndTempo
ld a, [wcf0d]
cp $1
jr nz, .asm_51134
diff --git a/scripts/Route5Gate.asm b/scripts/Route5Gate.asm
index 0b66efa6..f2d45112 100755
--- a/scripts/Route5Gate.asm
+++ b/scripts/Route5Gate.asm
@@ -26,7 +26,7 @@ Route5GateScript0:
ld [wPlayerMovingDirection], a
xor a
ldh [hJoyHeld], a
- callba RemoveGuardDrink
+ farcall RemoveGuardDrink
ldh a, [hItemToRemoveID]
and a
jr nz, .asm_1df82
@@ -73,7 +73,7 @@ Route5GateText1:
ld a, [wd728]
bit 6, a
jr nz, .asm_88856
- callba RemoveGuardDrink
+ farcall RemoveGuardDrink
ldh a, [hItemToRemoveID]
and a
jr nz, .asm_768a2
diff --git a/scripts/Route6Gate.asm b/scripts/Route6Gate.asm
index 7d135498..22d40fd3 100755
--- a/scripts/Route6Gate.asm
+++ b/scripts/Route6Gate.asm
@@ -20,7 +20,7 @@ Route6GateScript0:
ld [wPlayerMovingDirection], a
xor a
ldh [hJoyHeld], a
- callba RemoveGuardDrink
+ farcall RemoveGuardDrink
ldh a, [hItemToRemoveID]
and a
jr nz, .asm_1e080
diff --git a/scripts/Route7Gate.asm b/scripts/Route7Gate.asm
index 041d6c6a..182dedab 100755
--- a/scripts/Route7Gate.asm
+++ b/scripts/Route7Gate.asm
@@ -32,7 +32,7 @@ Route7GateScript0:
ld [wPlayerMovingDirection], a
xor a
ldh [hJoyHeld], a
- callba RemoveGuardDrink
+ farcall RemoveGuardDrink
ldh a, [hItemToRemoveID]
and a
jr nz, .asm_1e15a
diff --git a/scripts/Route8Gate.asm b/scripts/Route8Gate.asm
index 3bdd6070..9ddaf601 100755
--- a/scripts/Route8Gate.asm
+++ b/scripts/Route8Gate.asm
@@ -31,7 +31,7 @@ Route8GateScript0:
ld [wPlayerMovingDirection], a
xor a
ldh [hJoyHeld], a
- callba RemoveGuardDrink
+ farcall RemoveGuardDrink
ldh a, [hItemToRemoveID]
and a
jr nz, .asm_1e220
diff --git a/scripts/SSAnne2F.asm b/scripts/SSAnne2F.asm
index 45e8f283..5060f1e1 100755
--- a/scripts/SSAnne2F.asm
+++ b/scripts/SSAnne2F.asm
@@ -148,7 +148,7 @@ SSAnne2Script2:
ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a
call PlaySound
- callba Music_RivalAlternateStart
+ farcall Music_RivalAlternateStart
ld a, $3
ld [wSSAnne2FCurScript], a
ret
diff --git a/scripts/SilphCo7F.asm b/scripts/SilphCo7F.asm
index e7032760..dae0f96b 100755
--- a/scripts/SilphCo7F.asm
+++ b/scripts/SilphCo7F.asm
@@ -222,7 +222,7 @@ SilphCo7Script4:
ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a
call PlaySound
- callba Music_RivalAlternateStart
+ farcall Music_RivalAlternateStart
ld de, MovementData_51d1d
ld a, [wcf0d]
cp $1
diff --git a/scripts/SilphCoElevator.asm b/scripts/SilphCoElevator.asm
index 3ff507c7..e660cd0f 100755
--- a/scripts/SilphCoElevator.asm
+++ b/scripts/SilphCoElevator.asm
@@ -74,7 +74,7 @@ SilphCoElevatorWarpMapsEnd:
SilphCoElevatorScript_45827:
call Delay3
- callba ShakeElevator
+ farcall ShakeElevator
ret
SilphCoElevator_TextPointers:
diff --git a/scripts/VermilionDock.asm b/scripts/VermilionDock.asm
index d1a60988..5af5e5a2 100755
--- a/scripts/VermilionDock.asm
+++ b/scripts/VermilionDock.asm
@@ -45,7 +45,7 @@ VermilionDock_1db9b:
ld c, BANK(Music_Surfing)
ld a, MUSIC_SURFING
call PlayMusic
- callba LoadSmokeTileFourTimes
+ farcall LoadSmokeTileFourTimes
xor a
ld [wSpritePlayerStateData1ImageIndex], a
ld c, 120
diff --git a/scripts/ViridianGym.asm b/scripts/ViridianGym.asm
index fafc6388..80f19f3a 100755
--- a/scripts/ViridianGym.asm
+++ b/scripts/ViridianGym.asm
@@ -128,7 +128,7 @@ ViridianGymScript4:
ld [wCurMapScript], a
ret
.asm_74980
- jpba LoadSpinnerArrowTiles
+ farjp LoadSpinnerArrowTiles
ViridianGymScript3:
ld a, [wIsInBattle]
diff --git a/scripts/WardensHouse.asm b/scripts/WardensHouse.asm
index 1cb68cf9..6705a450 100755
--- a/scripts/WardensHouse.asm
+++ b/scripts/WardensHouse.asm
@@ -33,7 +33,7 @@ FuchsiaHouse2Text1:
call PrintText
ld a, GOLD_TEETH
ldh [hItemToRemoveID], a
- callba RemoveItemByID
+ farcall RemoveItemByID
SetEvent EVENT_GAVE_GOLD_TEETH
.asm_60cba
ld hl, WardenThankYouText