ref: c66d195089b1e1b823be4f0a0fc9b8f41f5f790d
parent: d787c66374df60fceb34fa5860c34bf56e476cbe
author: Remy Oukaour <remy.oukaour@gmail.com>
date: Sun Dec 24 07:47:30 EST 2017
callba/callab → farcall/callfar
--- a/battle/ai/items.asm
+++ b/battle/ai/items.asm
@@ -9,7 +9,7 @@
and a
ret nz
- callba CheckEnemyLockedIn
+ farcall CheckEnemyLockedIn
ret nz
ld a, [PlayerSubStatus5]
@@ -44,7 +44,7 @@
; 38045
SwitchOften: ; 38045
- callab CheckAbleToSwitch
+ callfar CheckAbleToSwitch
ld a, [wEnemySwitchMonParam]
and $f0
jp z, DontSwitch
@@ -80,7 +80,7 @@
; 38083
SwitchRarely: ; 38083
- callab CheckAbleToSwitch
+ callfar CheckAbleToSwitch
ld a, [wEnemySwitchMonParam]
and $f0
jp z, DontSwitch
@@ -115,7 +115,7 @@
; 380c1
SwitchSometimes: ; 380c1
- callab CheckAbleToSwitch
+ callfar CheckAbleToSwitch
ld a, [wEnemySwitchMonParam]
and $f0
jp z, DontSwitch
@@ -358,12 +358,12 @@
ld a, [bc]
bit CONTEXT_USE_F, a
jr nz, .CheckHalfOrQuarterHP
- callab AICheckEnemyHalfHP
+ callfar AICheckEnemyHalfHP
jp c, .DontUse
ld a, [bc]
bit UNKNOWN_USE_F, a
jp nz, .CheckQuarterHP
- callab AICheckEnemyQuarterHP
+ callfar AICheckEnemyQuarterHP
jp nc, .UseHealItem
call Random
cp 1 + 50 percent
@@ -371,7 +371,7 @@
jp .DontUse
.CheckQuarterHP: ; 38254 (e:4254)
- callab AICheckEnemyQuarterHP
+ callfar AICheckEnemyQuarterHP
jp c, .DontUse
call Random
cp -1 + 20 percent
@@ -379,9 +379,9 @@
jr .UseHealItem
.CheckHalfOrQuarterHP: ; 38267 (e:4267)
- callab AICheckEnemyHalfHP
+ callfar AICheckEnemyHalfHP
jp c, .DontUse
- callab AICheckEnemyQuarterHP
+ callfar AICheckEnemyQuarterHP
jp nc, .UseHealItem
call Random
cp -1 + 20 percent
@@ -416,7 +416,7 @@
; 382ae
.asm_382ae ; This appears to be unused
- callab AICheckEnemyMaxHP
+ callfar AICheckEnemyMaxHP
jr c, .dont_use
push bc
ld de, EnemyMonMaxHP + 1
@@ -433,7 +433,7 @@
ld a, c
cp b
jp c, .check_50_percent
- callab AICheckEnemyQuarterHP
+ callfar AICheckEnemyQuarterHP
jr c, .check_40_percent
.check_50_percent
@@ -545,7 +545,7 @@
AIUpdateHUD: ; 38387
call UpdateEnemyMonInParty
- callba UpdateEnemyHUD
+ farcall UpdateEnemyHUD
ld a, $1
ld [hBGMapMode], a
ld hl, wEnemyItemState
@@ -705,7 +705,7 @@
res SUBSTATUS_RAGE, [hl]
xor a
ld [hBattleTurn], a
- callab PursuitSwitch
+ callfar PursuitSwitch
push af
ld a, [CurOTMon]
@@ -726,12 +726,12 @@
.skiptext
ld a, 1
ld [wBattleHasJustStarted], a
- callab NewEnemyMonStatus
- callab ResetEnemyStatLevels
+ callfar NewEnemyMonStatus
+ callfar ResetEnemyStatLevels
ld hl, PlayerSubStatus1
res SUBSTATUS_IN_LOVE, [hl]
- callba EnemySwitch
- callba ResetBattleParticipants
+ farcall EnemySwitch
+ farcall ResetBattleParticipants
xor a
ld [wBattleHasJustStarted], a
ld a, [wLinkMode]
@@ -851,7 +851,7 @@
push bc
call PrintText_UsedItemOn
pop bc
- callba CheckIfStatCanBeRaised
+ farcall CheckIfStatCanBeRaised
jp AIUpdateHUD
; 38568
--- a/battle/ai/move.asm
+++ b/battle/ai/move.asm
@@ -12,7 +12,7 @@
ret nz
; No use picking a move if there's no choice.
- callba CheckEnemyLockedIn
+ farcall CheckEnemyLockedIn
ret nz
--- a/battle/ai/redundant.asm
+++ b/battle/ai/redundant.asm
@@ -141,7 +141,7 @@
jr .NotRedundant
.Attract: ; 2c4fe
- callba CheckOppositeGender
+ farcall CheckOppositeGender
jr c, .Redundant
ld a, [PlayerSubStatus1]
bit SUBSTATUS_IN_LOVE, a
@@ -184,7 +184,7 @@
.MorningSun:
.Synthesis:
.Moonlight: ; 2c539
- callba AICheckEnemyMaxHP
+ farcall AICheckEnemyMaxHP
jr nc, .NotRedundant
.Teleport:
--- a/battle/ai/scoring.asm
+++ b/battle/ai/scoring.asm
@@ -29,7 +29,7 @@
push hl
push de
push bc
- callba AI_Redundant
+ farcall AI_Redundant
pop bc
pop de
pop hl
@@ -176,7 +176,7 @@
push de
ld a, 1
ld [hBattleTurn], a
- callab BattleCheckTypeMatchup
+ callfar BattleCheckTypeMatchup
pop de
pop bc
pop hl
@@ -429,7 +429,7 @@
push hl
ld a, 1
ld [hBattleTurn], a
- callab BattleCheckTypeMatchup
+ callfar BattleCheckTypeMatchup
pop hl
; 60% chance to discourage this move if not very effective.
@@ -510,7 +510,7 @@
push hl
push bc
- callba BattleCheckTypeMatchup
+ farcall BattleCheckTypeMatchup
ld a, [wd265]
cp $a
pop bc
@@ -572,7 +572,7 @@
; Unless this is the enemy's last Pokemon...
push hl
- callba FindAliveEnemyMons
+ farcall FindAliveEnemyMons
pop hl
jr nc, .asm_388b7
@@ -970,7 +970,7 @@
; Consider player's type(s) if its moves are unknown.
push hl
- callab CheckPlayerMoveTypeMatchups
+ callfar CheckPlayerMoveTypeMatchups
ld a, [wEnemyAISwitchScore]
cp 10 ; neutral
pop hl
@@ -1368,7 +1368,7 @@
ld a, $1
ld [hBattleTurn], a
- callab BattleCheckTypeMatchup
+ callfar BattleCheckTypeMatchup
ld a, [wd265]
cp $a
@@ -1763,9 +1763,9 @@
ld a, $1
ld [hBattleTurn], a
push hl
- callab EnemyAttackDamage
- callab BattleCommand_DamageCalc
- callab BattleCommand_Stab
+ callfar EnemyAttackDamage
+ callfar BattleCommand_DamageCalc
+ callfar BattleCommand_Stab
pop hl
ld a, [CurDamage + 1]
ld c, a
@@ -1811,7 +1811,7 @@
xor a
ld [hBattleTurn], a
- callab BattleCheckTypeMatchup
+ callfar BattleCheckTypeMatchup
ld a, [wd265]
cp $a
@@ -1890,7 +1890,7 @@
; Otherwise, discourage this move unless the player only has not very effective moves against the enemy.
push hl
- callab CheckPlayerMoveTypeMatchups
+ callfar CheckPlayerMoveTypeMatchups
ld a, [wEnemyAISwitchScore]
cp $b ; not very effective
pop hl
@@ -2008,7 +2008,7 @@
jp nz, AIDiscourageMove
push hl
- callba FindAliveEnemyMons
+ farcall FindAliveEnemyMons
pop hl
jr nc, .asm_38eb0
@@ -2137,7 +2137,7 @@
AI_Smart_PerishSong: ; 38f4a
push hl
- callab FindAliveEnemyMons
+ callfar FindAliveEnemyMons
pop hl
jr c, .no
@@ -2146,7 +2146,7 @@
jr nz, .yes
push hl
- callab CheckPlayerMoveTypeMatchups
+ callfar CheckPlayerMoveTypeMatchups
ld a, [wEnemyAISwitchScore]
cp 10 ; 1.0
pop hl
@@ -2404,7 +2404,7 @@
; Consider player's type(s) if its moves are unknown.
push hl
- callab CheckPlayerMoveTypeMatchups
+ callfar CheckPlayerMoveTypeMatchups
ld a, [wEnemyAISwitchScore]
cp 10 ; neutral
pop hl
@@ -2466,8 +2466,8 @@
ld [hBattleTurn], a
; Calculate Hidden Power's type and base power based on enemy's DVs.
- callab HiddenPowerDamage
- callab BattleCheckTypeMatchup
+ callfar HiddenPowerDamage
+ callfar BattleCheckTypeMatchup
pop hl
; Discourage Hidden Power if not very effective.
@@ -3336,13 +3336,13 @@
ld hl, .ConstantDamageEffects
call IsInArray
jr nc, .asm_39400
- callab BattleCommand_ConstantDamage
+ callfar BattleCommand_ConstantDamage
ret
.asm_39400
- callab EnemyAttackDamage
- callab BattleCommand_DamageCalc
- callab BattleCommand_Stab
+ callfar EnemyAttackDamage
+ callfar BattleCommand_DamageCalc
+ callfar BattleCommand_Stab
ret
.ConstantDamageEffects:
@@ -3459,7 +3459,7 @@
push de
ld a, 1
ld [hBattleTurn], a
- callab BattleCheckTypeMatchup
+ callfar BattleCheckTypeMatchup
pop de
pop bc
pop hl
--- a/battle/anim_commands.asm
+++ b/battle/anim_commands.asm
@@ -61,7 +61,7 @@
and a
jr nz, .hi_byte
- callba CheckBattleScene
+ farcall CheckBattleScene
jr c, .disabled
call BattleAnimClearHud
@@ -169,7 +169,7 @@
ld hl, UpdateBattleHuds
ld a, BANK(UpdatePlayerHUD)
- rst FarCall ; Why the heck is this a callab?
+ rst FarCall ; Why not "call UpdateBattleHuds"?
pop af
ld [rSVBK], a
@@ -907,7 +907,7 @@
ret
BattleAnimCmd_CheckPokeball: ; cc5d0 (33:45d0)
- callab GetPokeBallWobble
+ callfar GetPokeBallWobble
ld a, c
ld [BattleAnimVar], a
ret
@@ -1128,11 +1128,11 @@
and a
jr z, .player
- callab DropEnemySub
+ callfar DropEnemySub
jr .done
.player
- callab DropPlayerSub
+ callfar DropPlayerSub
.done
pop af
@@ -1221,7 +1221,7 @@
call GetBattleAnimByte
ld e, a
ld d, 0
- callab PlayStereoSFX
+ callfar PlayStereoSFX
ret
; cc7f8 (33:47f8)
@@ -1311,7 +1311,7 @@
ld a, 1
ld [wStereoPanningMask], a
- callab _PlayCryHeader
+ callfar _PlayCryHeader
.done
pop af
--- a/battle/bg_effects.asm
+++ b/battle/bg_effects.asm
@@ -550,7 +550,7 @@
ret
_QueueBattleAnimation: ; c82ee (32:42ee)
- callab QueueBattleAnimation
+ callfar QueueBattleAnimation
ret
BattleBGEffect_27: ; c82f5 (32:42f5)
@@ -2944,13 +2944,13 @@
BattleBGEffects_Sine: ; c905d (32:505d)
ld e, a
- callab BattleAnim_Sine_e
+ callfar BattleAnim_Sine_e
ld a, e
ret
BattleBGEffects_Cosine: ; c9066 (32:5066)
ld e, a
- callab BattleAnim_Cosine_e
+ callfar BattleAnim_Cosine_e
ld a, e
ret
--- a/battle/core.asm
+++ b/battle/core.asm
@@ -175,13 +175,13 @@
call HandleBerserkGene
call UpdateBattleMonInParty
- callba AIChooseMove
+ farcall AIChooseMove
call IsMobileBattle
jr nz, .not_disconnected
- callba Function100da5
- callba StartMobileInactivityTimer
- callba Function100dd8
+ farcall Function100da5
+ farcall StartMobileInactivityTimer
+ farcall Function100dd8
jp c, .quit
.not_disconnected
@@ -377,7 +377,7 @@
.go
push de
push bc
- callab GetUserItem
+ callfar GetUserItem
ld a, [hl]
ld [wd265], a
sub BERSERK_GENE
@@ -405,7 +405,7 @@
ld [hl], a
ld [AttackMissed], a
ld [EffectFailed], a
- callba BattleCommand_AttackUp2
+ farcall BattleCommand_AttackUp2
pop af
pop hl
ld [hl], a
@@ -412,7 +412,7 @@
call GetItemName
ld hl, BattleText_UsersStringBuffer1Activated
call StdBattleTextBox
- callab BattleCommand_StatUpMessage
+ callfar BattleCommand_StatUpMessage
pop af
bit SUBSTATUS_CONFUSED, a
ret nz
@@ -473,7 +473,7 @@
jp .player_first
.switch
- callab AI_Switch
+ callfar AI_Switch
call SetEnemyTurn
call SpikesDamage
jp .enemy_first
@@ -489,9 +489,9 @@
.equal_priority
call SetPlayerTurn
- callab GetUserItem
+ callfar GetUserItem
push bc
- callab GetOpponentItem
+ callfar GetOpponentItem
pop de
ld a, d
cp HELD_QUICK_CLAW
@@ -651,7 +651,7 @@
.encored
call SetPlayerTurn
- callab UpdateMoveData
+ callfar UpdateMoveData
xor a
ld [wPlayerCharging], a
ld a, [wPlayerMoveStruct + MOVE_EFFECT]
@@ -894,7 +894,7 @@
call SetEnemyTurn
ld a, $1
ld [wEnemyGoesFirst], a
- callab AI_SwitchOrTryItem
+ callfar AI_SwitchOrTryItem
jr c, .switch_item
call EnemyTurn_EndOpponentProtectEndureDestinyBond
call CheckMobileBattleError
@@ -935,7 +935,7 @@
xor a
ld [wEnemyGoesFirst], a
call SetEnemyTurn
- callab AI_SwitchOrTryItem
+ callfar AI_SwitchOrTryItem
push af
call PlayerTurn_EndOpponentProtectEndureDestinyBond
pop bc
@@ -984,7 +984,7 @@
PlayerTurn_EndOpponentProtectEndureDestinyBond: ; 3c6cf
call SetPlayerTurn
call EndUserDestinyBond
- callab DoPlayerTurn
+ callfar DoPlayerTurn
jp EndOpponentProtectEndureDestinyBond
; 3c6de
@@ -991,7 +991,7 @@
EnemyTurn_EndOpponentProtectEndureDestinyBond: ; 3c6de
call SetEnemyTurn
call EndUserDestinyBond
- callab DoEnemyTurn
+ callfar DoEnemyTurn
jp EndOpponentProtectEndureDestinyBond
; 3c6ed
@@ -1323,7 +1323,7 @@
call SetPlayerTurn
.do_it
- callab GetUserItem
+ callfar GetUserItem
ld a, [hl]
ld [wd265], a
call GetItemName
@@ -1373,7 +1373,7 @@
call SetPlayerTurn
.do_it
- callab GetUserItem
+ callfar GetUserItem
ld a, b
cp HELD_RESTORE_PP
jr nz, .quit
@@ -1470,7 +1470,7 @@
add b
ld [de], a
.skip_checks
- callab GetUserItem
+ callfar GetUserItem
ld a, [hl]
ld [wd265], a
xor a
@@ -1536,13 +1536,13 @@
ld a, FUTURE_SIGHT
ld [hl], a
- callab UpdateMoveData
+ callfar UpdateMoveData
xor a
ld [AttackMissed], a
ld [AlreadyDisobeyed], a
ld a, 10
ld [TypeModifier], a
- callab DoMove
+ callfar DoMove
xor a
ld [CurDamage], a
ld [CurDamage + 1], a
@@ -2359,7 +2359,7 @@
ld e, HP_BAR_LENGTH_PX
call UpdateHPPal
call WaitBGMap
- callba EnemySwitch_TrainerHud
+ farcall EnemySwitch_TrainerHud
ld a, [wLinkMode]
and a
jr z, .not_linked
@@ -2417,7 +2417,7 @@
and a
ld a, b
call z, PlayVictoryMusic
- callab Battle_GetTrainerName
+ callfar Battle_GetTrainerName
ld hl, BattleText_EnemyWasDefeated
call StdBattleTextBox
@@ -2452,7 +2452,7 @@
ld c, 40
call DelayFrames
ld c, $4 ; win
- callba Mobile_PrintOpponentBattleMessage
+ farcall Mobile_PrintOpponentBattleMessage
ret
.battle_tower
@@ -2461,7 +2461,7 @@
call DelayFrames
call EmptyBattleTextBox
ld c, $3
- callba BattleTowerText
+ farcall BattleTowerText
call WaitPressAorB_BlinkCursor
ld hl, wPayDayMoney
ld a, [hli]
@@ -2589,7 +2589,7 @@
push bc
ld b, h
ld c, l
- callba TrainerRankings_AddToBattlePayouts
+ farcall TrainerRankings_AddToBattlePayouts
pop bc
pop hl
.loop
@@ -2783,7 +2783,7 @@
.got_param
ld a, [CurBattleMon]
ld [CurPartyMon], a
- callab ChangeHappiness
+ callfar ChangeHappiness
ld a, [wBattleResult]
and %11000000
add $1
@@ -2932,16 +2932,16 @@
SetUpBattlePartyMenu_NoLoop: ; 3d2f7
call ClearBGPalettes
SetUpBattlePartyMenu: ; switch to fullscreen menu?
- callba LoadPartyMenuGFX
- callba InitPartyMenuWithCancel
- callba InitPartyMenuBGPal7
- callba InitPartyMenuGFX
+ farcall LoadPartyMenuGFX
+ farcall InitPartyMenuWithCancel
+ farcall InitPartyMenuBGPal7
+ farcall InitPartyMenuGFX
ret
; 3d313
JumpToPartyMenuAndPrintText: ; 3d313
- callba WritePartyMenuTilemap
- callba PrintPartyMenuText
+ farcall WritePartyMenuTilemap
+ farcall PrintPartyMenuText
call WaitBGMap
call SetPalettes
call DelayFrame
@@ -2951,11 +2951,11 @@
SelectBattleMon: ; 3d329
call IsMobileBattle
jr z, .mobile
- callba PartyMenuSelect
+ farcall PartyMenuSelect
ret
.mobile
- callba Mobile_PartyMenuSelect
+ farcall Mobile_PartyMenuSelect
ret
; 3d33c
@@ -3067,7 +3067,7 @@
call EmptyBattleTextBox
ld c, 2
- callba BattleTowerText
+ farcall BattleTowerText
call WaitPressAorB_BlinkCursor
call ClearTileMap
call ClearBGPalettes
@@ -3118,7 +3118,7 @@
call DelayFrames
ld c, $3 ; lost
- callba Mobile_PrintOpponentBattleMessage
+ farcall Mobile_PrintOpponentBattleMessage
scf
ret
; 3d432
@@ -3424,7 +3424,7 @@
ld a, BANK(Moves)
call FarCopyBytes
call SetEnemyTurn
- callab BattleCheckTypeMatchup
+ callfar BattleCheckTypeMatchup
pop bc
pop de
pop hl
@@ -3460,13 +3460,13 @@
ld a, [BattleMonType1]
ld [wPlayerMoveStruct + MOVE_TYPE], a
call SetPlayerTurn
- callab BattleCheckTypeMatchup
+ callfar BattleCheckTypeMatchup
ld a, [wd265]
cp 10 + 1 ; 1.0 + 0.1
jr nc, .super_effective
ld a, [BattleMonType2]
ld [wPlayerMoveStruct + MOVE_TYPE], a
- callab BattleCheckTypeMatchup
+ callfar BattleCheckTypeMatchup
ld a, [wd265]
cp 10 + 1 ; 1.0 + 0.1
jr nc, .super_effective
@@ -3608,7 +3608,7 @@
push af
ld a, [CurBattleMon]
ld [CurPartyMon], a
- callba CheckCurPartyMonFainted
+ farcall CheckCurPartyMonFainted
pop bc
ld a, b
ld [CurPartyMon], a
@@ -3624,7 +3624,7 @@
OfferSwitch: ; 3d74b
ld a, [CurPartyMon]
push af
- callab Battle_GetTrainerName
+ callfar Battle_GetTrainerName
ld hl, BattleText_EnemyIsAboutToUseWillPlayerChangePkmn
call StdBattleTextBox
lb bc, 1, 7
@@ -3675,7 +3675,7 @@
; 3d7b8
Function_BattleTextEnemySentOut: ; 3d7b8
- callab Battle_GetTrainerName
+ callfar Battle_GetTrainerName
ld hl, BattleText_EnemySentOut
call StdBattleTextBox
jp WaitBGMap
@@ -3707,9 +3707,9 @@
.not_shiny
ld bc, TempMonSpecies
- callba CheckFaintedFrzSlp
+ farcall CheckFaintedFrzSlp
jr c, .skip_cry
- callba CheckBattleScene
+ farcall CheckBattleScene
jr c, .cry_no_anim
hlcoord 12, 0
ld d, $0
@@ -3851,7 +3851,7 @@
ld a, [BattleMonItem]
ld [wd265], a
ld b, a
- callab GetItemHeldEffect
+ callfar GetItemHeldEffect
ld a, b
cp HELD_ESCAPE
pop de
@@ -4054,7 +4054,7 @@
BattleCheckShininess: ; 3da7c
ld b, h
ld c, l
- callab CheckShininess
+ callfar CheckShininess
ret
; 3da85
@@ -4208,7 +4208,7 @@
call GetPartyParamLocation
ld b, h
ld c, l
- callba CheckFaintedFrzSlp
+ farcall CheckFaintedFrzSlp
jr c, .statused
ld a, $f0
ld [CryTracks], a
@@ -4418,7 +4418,7 @@
; 3dd2f
HandleHPHealingItem: ; 3dd2f
- callab GetOpponentItem
+ callfar GetOpponentItem
ld a, b
cp HELD_BERRY
ret nz
@@ -4502,11 +4502,11 @@
predef AnimateHPBar
UseOpponentItem:
call RefreshBattleHuds
- callab GetOpponentItem
+ callfar GetOpponentItem
ld a, [hl]
ld [wNamedObjectIndexBuffer], a
call GetItemName
- callab ConsumeHeldItem
+ callfar ConsumeHeldItem
ld hl, RecoveredUsingText
jp StdBattleTextBox
; 3ddc8
@@ -4531,7 +4531,7 @@
; 3dde9
UseHeldStatusHealingItem: ; 3dde9
- callab GetOpponentItem
+ callfar GetOpponentItem
ld hl, .Statuses
.loop
ld a, [hli]
@@ -4600,7 +4600,7 @@
call GetBattleVar
bit SUBSTATUS_CONFUSED, a
ret z
- callab GetOpponentItem
+ callfar GetOpponentItem
ld a, b
cp HELD_HEAL_CONFUSION
jr z, .heal_status
@@ -4667,7 +4667,7 @@
push bc
ld a, [bc]
ld b, a
- callab GetItemHeldEffect
+ callfar GetItemHeldEffect
ld hl, .StatUpItems
.loop
ld a, [hli]
@@ -4699,7 +4699,7 @@
call GetItemName
ld hl, BattleText_UsersStringBuffer1Activated
call StdBattleTextBox
- callab BattleCommand_StatUpMessage
+ callfar BattleCommand_StatUpMessage
ret
.finish
@@ -4774,7 +4774,7 @@
lb bc, 5, 11
call ClearBox
- callba DrawPlayerHUDBorder
+ farcall DrawPlayerHUDBorder
hlcoord 18, 9
ld [hl], $73 ; vertical bar
@@ -4867,7 +4867,7 @@
ld a, TEMPMON
ld [MonType], a
- callab GetGender
+ callfar GetGender
ld a, " "
jr c, .got_gender_char
ld a, "♂"
@@ -4916,7 +4916,7 @@
lb bc, 4, 11
call ClearBox
- callba DrawEnemyHUDBorder
+ farcall DrawEnemyHUDBorder
ld a, [TempEnemyMonSpecies]
ld [CurSpecies], a
@@ -4945,7 +4945,7 @@
ld a, TEMPMON
ld [MonType], a
- callab GetGender
+ callfar GetGender
ld a, " "
jr c, .got_gender
ld a, "♂"
@@ -5080,7 +5080,7 @@
ld a, [BattleType]
cp BATTLETYPE_CONTEST
jr nz, .not_contest
- callba ContestBattleMenu
+ farcall ContestBattleMenu
jr .next
.not_contest
@@ -5088,7 +5088,7 @@
ld a, [InputType]
or a
jr z, .skip_dude_pack_select
- callba _DudeAutoInput_DownA
+ farcall _DudeAutoInput_DownA
.skip_dude_pack_select
call LoadBattleMenu2
ret c
@@ -5120,12 +5120,12 @@
call IsMobileBattle
jr z, .mobile
- callba LoadBattleMenu
+ farcall LoadBattleMenu
and a
ret
.mobile
- callba Function100b12
+ farcall Function100b12
ld a, [wcd2b]
and a
ret z
@@ -5159,7 +5159,7 @@
cp BATTLETYPE_CONTEST
jr z, .contest
- callba BattlePack
+ farcall BattlePack
ld a, [wPlayerAction]
and a
jr z, .didnt_use_item
@@ -5166,7 +5166,7 @@
jr .got_item
.tutorial
- callba TutorialPack
+ farcall TutorialPack
ld a, POKE_BALL
ld [CurItem], a
call DoItemEffect
@@ -5204,7 +5204,7 @@
ld a, [wWildMon]
and a
jr nz, .run
- callab CheckItemPocket
+ callfar CheckItemPocket
ld a, [wItemAttributeParamBuffer]
cp BALL
jr z, .ball
@@ -5259,7 +5259,7 @@
call SelectBattleMon
jr c, .Cancel
.loop
- callba FreezeMonIcons
+ farcall FreezeMonIcons
call .GetMenu
jr c, .PressedB
call PlaceHollowCursor
@@ -5298,11 +5298,11 @@
.GetMenu: ; 3e2f5
call IsMobileBattle
jr z, .mobile
- callba BattleMonMenu
+ farcall BattleMonMenu
ret
.mobile
- callba MobileBattleMonMenu
+ farcall MobileBattleMonMenu
ret
; 3e308
@@ -5325,7 +5325,7 @@
call LowVolume
xor a ; PARTYMON
ld [MonType], a
- callba BattleStatsScreenInit
+ farcall BattleStatsScreenInit
call MaxVolume
call DisableLCD
@@ -5434,7 +5434,7 @@
; 3e3ff
EnemyMonEntrance: ; 3e3ff
- callab AI_Switch
+ callfar AI_Switch
call SetEnemyTurn
jp SpikesDamage
; 3e40b
@@ -5517,7 +5517,7 @@
CheckAmuletCoin: ; 3e4a8
ld a, [BattleMonItem]
ld b, a
- callab GetItemHeldEffect
+ callfar GetItemHeldEffect
ld a, b
cp HELD_AMULET_COIN
ret nz
@@ -5529,7 +5529,7 @@
MoveSelectionScreen: ; 3e4bc
call IsMobileBattle
jr nz, .not_mobile
- callba MobileMoveSelectionScreen
+ farcall MobileMoveSelectionScreen
ret
.not_mobile
@@ -5884,7 +5884,7 @@
ld [CurPartyMon], a
ld a, WILDMON
ld [MonType], a
- callab GetMaxPPOfMove
+ callfar GetMaxPPOfMove
ld hl, wMenuCursorY
ld c, [hl]
@@ -5904,7 +5904,7 @@
hlcoord 7, 11
ld [hl], "/"
- callab UpdateMoveData
+ callfar UpdateMoveData
ld a, [wPlayerMoveStruct + MOVE_ANIM]
ld b, a
hlcoord 2, 10
@@ -6104,7 +6104,7 @@
.skip_load
call SetEnemyTurn
- callab UpdateMoveData
+ callfar UpdateMoveData
call CheckEnemyLockedIn
jr nz, .raging
xor a
@@ -6167,7 +6167,7 @@
; 3e8e4
LinkBattleSendReceiveAction: ; 3e8e4
- callba _LinkBattleSendReceiveAction
+ farcall _LinkBattleSendReceiveAction
ret
; 3e8eb
@@ -6276,7 +6276,7 @@
; All trainers have preset DVs, determined by class
; See GetTrainerDVs for more on that
- callba GetTrainerDVs
+ farcall GetTrainerDVs
; These are the DVs we'll use if we're actually in a trainer battle
ld a, [wBattleMode]
dec a
@@ -6380,7 +6380,7 @@
; Get Magikarp's length
ld de, EnemyMonDVs
ld bc, PlayerID
- callab CalcMagikarpLength
+ callfar CalcMagikarpLength
; We're clear if the length is < 1536
ld a, [wMagikarpLength]
@@ -6780,7 +6780,7 @@
ld a, [OtherTrainerClass]
ld [TrainerClass], a
ld de, VTiles2
- callab GetTrainerPic
+ callfar GetTrainerPic
hlcoord 19, 0
ld c, 0
@@ -7144,12 +7144,12 @@
; 3ed9f
_LoadBattleFontsHPBar: ; 3ed9f
- callab LoadBattleFontsHPBar
+ callfar LoadBattleFontsHPBar
ret
; 3eda6
_LoadHPBar: ; 3eda6
- callab LoadHPBar
+ callfar LoadHPBar
ret
; 3edad
@@ -7455,7 +7455,7 @@
call GetBaseData
push bc
ld d, MAX_LEVEL
- callab CalcExpAtLevel
+ callfar CalcExpAtLevel
pop bc
ld hl, MON_STAT_EXP - 1
add hl, bc
@@ -7484,7 +7484,7 @@
xor a ; PARTYMON
ld [MonType], a
predef CopyPkmnToTempMon
- callab CalcLevel
+ callfar CalcLevel
pop bc
ld hl, MON_LEVEL
add hl, bc
@@ -7571,9 +7571,9 @@
xor a
ld [wd265], a
call ApplyStatLevelMultiplierOnAllStats
- callab ApplyStatusEffectOnPlayerStats
- callab BadgeStatBoosts
- callab UpdatePlayerHUD
+ callfar ApplyStatusEffectOnPlayerStats
+ callfar BadgeStatBoosts
+ callfar UpdatePlayerHUD
call EmptyBattleTextBox
call LoadTileMapToTempTileMap
ld a, $1
@@ -7580,7 +7580,7 @@
ld [hBGMapMode], a
.skip_animation
- callba LevelUpHappinessMod
+ farcall LevelUpHappinessMod
ld a, [CurBattleMon]
ld b, a
ld a, [CurPartyMon]
@@ -7781,7 +7781,7 @@
.NoOverflow:
ld d, MAX_LEVEL
- callab CalcExpAtLevel
+ callfar CalcExpAtLevel
ld a, [hProduct + 1]
ld b, a
ld a, [hProduct + 2]
@@ -7804,7 +7804,7 @@
ld [hld], a
.AlreadyAtMaxExp:
- callab CalcLevel
+ callfar CalcLevel
ld a, d
pop bc
pop de
@@ -7836,7 +7836,7 @@
call TerminateExpBarSound
ld de, SFX_HIT_END_OF_EXP_BAR
call PlaySFX
- callba AnimateEndOfExpBar
+ farcall AnimateEndOfExpBar
call WaitSFX
ld hl, BattleText_StringBuffer1GrewToLevel
call StdBattleTextBox
@@ -8142,7 +8142,7 @@
push de
ld d, b
push de
- callab CalcExpAtLevel
+ callfar CalcExpAtLevel
pop de
; exp at current level gets pushed to the stack
ld hl, hMultiplicand
@@ -8154,7 +8154,7 @@
push af
; next level
inc d
- callab CalcExpAtLevel
+ callfar CalcExpAtLevel
; back up the next level exp, and subtract the two levels
ld hl, hMultiplicand + 2
ld a, [hl]
@@ -8369,7 +8369,7 @@
; 3f4dd
BattleIntro: ; 3f4dd
- callba TrainerRankings_Battles ; mobile
+ farcall TrainerRankings_Battles ; mobile
call LoadTrainerOrWildMonPic
xor a
ld [TempBattleMonSpecies], a
@@ -8376,11 +8376,11 @@
ld [wBattleMenuCursorBuffer], a
xor a
ld [hMapAnims], a
- callba PlayBattleMusic
- callba ShowLinkBattleParticipants
- callba FindFirstAliveMonAndStartBattle
+ farcall PlayBattleMusic
+ farcall ShowLinkBattleParticipants
+ farcall FindFirstAliveMonAndStartBattle
call DisableSpriteUpdates
- callba ClearBattleRAM
+ farcall ClearBattleRAM
call InitEnemy
call BackUpVBGMap2
ld b, SCGB_BATTLE_GRAYSCALE
@@ -8454,11 +8454,11 @@
InitEnemyTrainer: ; 3f594
ld [TrainerClass], a
- callba TrainerRankings_TrainerBattles
+ farcall TrainerRankings_TrainerBattles
xor a
ld [TempEnemyMonSpecies], a
- callab GetTrainerAttributes
- callab ReadTrainerParty
+ callfar GetTrainerAttributes
+ callfar ReadTrainerParty
ld a, [TrainerClass]
cp RIVAL1
@@ -8468,7 +8468,7 @@
.ok
ld de, VTiles2
- callab GetTrainerPic
+ callfar GetTrainerPic
xor a
ld [hGraphicStartTile], a
dec a
@@ -8495,7 +8495,7 @@
or [hl]
jr z, .skipfaintedmon
ld c, HAPPINESS_GYMBATTLE
- callab ChangeHappiness
+ callfar ChangeHappiness
.skipfaintedmon
pop bc
dec b
@@ -8510,7 +8510,7 @@
InitEnemyWildmon: ; 3f607
ld a, WILD_BATTLE
ld [wBattleMode], a
- callba TrainerRankings_WildBattles
+ farcall TrainerRankings_WildBattles
call LoadEnemyMon
ld hl, EnemyMonMoves
ld de, wWildMonMoves
@@ -8619,7 +8619,7 @@
xor a
ld [wForceEvolution], a
predef EvolveAfterBattle
- callba GivePokerusAndConvertBerries
+ farcall GivePokerusAndConvertBerries
ret
; 3f6d0
@@ -8693,8 +8693,8 @@
; 3f759
ShowLinkBattleParticipantsAfterEnd: ; 3f759
- callba TrainerRankings_LinkBattles
- callba BackupMobileEventIndex
+ farcall TrainerRankings_LinkBattles
+ farcall BackupMobileEventIndex
ld a, [CurOTMon]
ld hl, OTPartyMon1Status
call GetPartyLocation
@@ -8701,12 +8701,12 @@
ld a, [EnemyMonStatus]
ld [hl], a
call ClearTileMap
- callba _ShowLinkBattleParticipants
+ farcall _ShowLinkBattleParticipants
ret
; 3f77c
DisplayLinkBattleResult: ; 3f77c
- callba CheckMobileBattleError
+ farcall CheckMobileBattleError
jp c, .Mobile_InvalidBattle
call IsMobileBattle2
jr nz, .proceed
@@ -8715,7 +8715,7 @@
bit 4, [hl]
jr z, .proceed
- callba DetermineLinkBattleResult
+ farcall DetermineLinkBattleResult
.proceed
ld a, [wBattleResult]
@@ -8723,17 +8723,17 @@
cp $1
jr c, .victory
jr z, .loss
- callba TrainerRankings_ColosseumDraws
+ farcall TrainerRankings_ColosseumDraws
ld de, .Draw
jr .store_result
.victory
- callba TrainerRankings_ColosseumWins
+ farcall TrainerRankings_ColosseumWins
ld de, .Win
jr .store_result
.loss
- callba TrainerRankings_ColosseumLosses
+ farcall TrainerRankings_ColosseumLosses
ld de, .Lose
jr .store_result
@@ -8740,7 +8740,7 @@
.store_result
hlcoord 6, 8
call PlaceString
- callba BackupMobileEventIndex
+ farcall BackupMobileEventIndex
ld c, 200
call DelayFrames
@@ -8977,7 +8977,7 @@
ret nz
.update_roam_mons
- callab UpdateRoamMons
+ callfar UpdateRoamMons
ret
; 3f9d1
@@ -9269,7 +9269,7 @@
ld b, 4
ld c, 18
call TextBox
- callba MobileTextBorder
+ farcall MobileTextBorder
hlcoord 1, 5
lb bc, 3, 7
call ClearBox
@@ -9285,7 +9285,7 @@
call WaitBGMap
xor a
ld [hBGMapMode], a
- callba BattleIntroSlidingPics
+ farcall BattleIntroSlidingPics
ld a, $1
ld [hBGMapMode], a
ld a, $31
@@ -9354,7 +9354,7 @@
jr z, .Chris
; It's a girl.
- callba GetKrisBackpic
+ farcall GetKrisBackpic
ret
.Chris:
@@ -9439,7 +9439,7 @@
ld c, 20
call DelayFrames
- callba Battle_GetTrainerName
+ farcall Battle_GetTrainerName
ld hl, WantsToBattleText
jr .PlaceBattleStartText
@@ -9458,10 +9458,10 @@
call Call_PlayBattleAnim
.not_shiny
- callba CheckSleepingTreeMon
+ farcall CheckSleepingTreeMon
jr c, .skip_cry
- callba CheckBattleScene
+ farcall CheckBattleScene
jr c, .cry_no_anim
hlcoord 12, 0
@@ -9481,7 +9481,7 @@
cp BATTLETYPE_FISH
jr nz, .NotFishing
- callba TrainerRankings_HookedEncounters
+ farcall TrainerRankings_HookedEncounters
ld hl, HookedPokemonAttackedText
jr .PlaceBattleStartText
@@ -9497,7 +9497,7 @@
.PlaceBattleStartText:
push hl
- callba BattleStart_TrainerHuds
+ farcall BattleStart_TrainerHuds
pop hl
call StdBattleTextBox
@@ -9505,7 +9505,7 @@
ret nz
ld c, $2 ; start
- callba Mobile_PrintOpponentBattleMessage
+ farcall Mobile_PrintOpponentBattleMessage
ret
; 3fd26
--- a/battle/effect_commands.asm
+++ b/battle/effect_commands.asm
@@ -1016,7 +1016,7 @@
BattleCommand_UsedMoveText: ; 34541
; usedmovetext
- callba DisplayUsedMoveText
+ farcall DisplayUsedMoveText
ret
; 34548
@@ -1385,7 +1385,7 @@
push hl
push de
push bc
- callba DoWeatherModifiers
+ farcall DoWeatherModifiers
pop bc
pop de
pop hl
@@ -1392,7 +1392,7 @@
push de
push bc
- callba DoBadgeTypeBoosts
+ farcall DoBadgeTypeBoosts
pop bc
pop de
@@ -3862,7 +3862,7 @@
ret z
ld b, a
- callab GetMoveEffect
+ callfar GetMoveEffect
ld a, b
cp EFFECT_COUNTER
ret z
@@ -4068,7 +4068,7 @@
call ResetDamage
hlcoord 2, 2
predef AnimateHPBar
- callba _UpdateBattleHUDs
+ farcall _UpdateBattleHUDs
ld hl, SharedPainText
jp StdBattleTextBox
@@ -4518,7 +4518,7 @@
push bc
ld b, a
- callab GetMoveEffect
+ callfar GetMoveEffect
ld a, b
pop bc
@@ -4747,7 +4747,7 @@
ld c, 3
call DelayFrames
- callab PlayBattleAnim
+ callfar PlayBattleAnim
ret
@@ -5017,7 +5017,7 @@
ld hl, FellAsleepText
call StdBattleTextBox
- callba UseHeldStatusHealingItem
+ farcall UseHeldStatusHealingItem
jp z, OpponentCantMove
ret
@@ -5094,7 +5094,7 @@
ld hl, WasPoisonedText
call StdBattleTextBox
- callba UseHeldStatusHealingItem
+ farcall UseHeldStatusHealingItem
ret
; 35f2c
@@ -5179,7 +5179,7 @@
call StdBattleTextBox
.finished
- callba UseHeldStatusHealingItem
+ farcall UseHeldStatusHealingItem
ret
.failed
@@ -5382,7 +5382,7 @@
ld hl, WasBurnedText
call StdBattleTextBox
- callba UseHeldStatusHealingItem
+ farcall UseHeldStatusHealingItem
ret
; 360dd
@@ -5455,7 +5455,7 @@
ld hl, WasFrozenText
call StdBattleTextBox
- callba UseHeldStatusHealingItem
+ farcall UseHeldStatusHealingItem
ret nz
call OpponentCantMove
@@ -6816,7 +6816,7 @@
ld a, d
inc a
ld [wEnemySwitchMonIndex], a
- callab ForceEnemySwitch
+ callfar ForceEnemySwitch
ld hl, DraggedOutText
call StdBattleTextBox
@@ -8081,7 +8081,7 @@
BattleCommand_Splash: ; 36fe1
call AnimateCurrentMove
- callba TrainerRankings_Splash
+ farcall TrainerRankings_Splash
jp PrintNothingHappened
; 36fed
@@ -8285,7 +8285,7 @@
inc de
ld [de], a
ld [wNamedObjectIndexBuffer], a
- callba GetTypeName
+ farcall GetTypeName
call AnimateCurrentMove
ld hl, TransformedTypeText
jp StdBattleTextBox
@@ -8608,7 +8608,7 @@
BattleCommand_Selfdestruct: ; 37380
- callba TrainerRankings_Selfdestruct
+ farcall TrainerRankings_Selfdestruct
ld a, BATTLEANIM_PLAYER_DAMAGE
ld [wNumHits], a
ld c, 3
@@ -8632,8 +8632,8 @@
res SUBSTATUS_DESTINY_BOND, [hl]
call _CheckBattleScene
ret nc
- callba DrawPlayerHUD
- callba DrawEnemyHUD
+ farcall DrawPlayerHUD
+ farcall DrawEnemyHUD
call WaitBGMap
jp RefreshBattleHuds
@@ -9032,13 +9032,13 @@
; Transition into switchmon menu
call LoadStandardMenuDataHeader
- callba SetUpBattlePartyMenu_NoLoop
+ farcall SetUpBattlePartyMenu_NoLoop
- callba ForcePickSwitchMonInBattle
+ farcall ForcePickSwitchMonInBattle
; Return to battle scene
call ClearPalettes
- callba _LoadBattleFontsHPBar
+ farcall _LoadBattleFontsHPBar
call CloseWindow
call ClearSprites
hlcoord 1, 0
@@ -9050,7 +9050,7 @@
call BatonPass_LinkPlayerSwitch
; Mobile link battles handle entrances differently
- callba CheckMobileBattleError
+ farcall CheckMobileBattleError
jp c, EndMoveEffect
ld hl, PassedBattleMonEntrance
@@ -9075,7 +9075,7 @@
call BatonPass_LinkEnemySwitch
; Mobile link battles handle entrances differently
- callba CheckMobileBattleError
+ farcall CheckMobileBattleError
jp c, EndMoveEffect
; Passed enemy PartyMon entrance
@@ -9403,7 +9403,7 @@
call AnimateCurrentMove
call BattleCommand_SwitchTurn
- callab RestoreHP
+ callfar RestoreHP
call BattleCommand_SwitchTurn
call UpdateUserInParty
@@ -9433,7 +9433,7 @@
ld a, [AttackMissed]
and a
ret nz
- callba HiddenPowerDamage
+ farcall HiddenPowerDamage
ret
; 37bf4
@@ -9475,14 +9475,14 @@
and a
jr nz, .failed
- callab GetHalfMaxHP
- callab CheckUserHasEnoughHP
+ callfar GetHalfMaxHP
+ callfar CheckUserHasEnoughHP
jr nc, .failed
push bc
call AnimateCurrentMove
pop bc
- callab SubtractHPFromUser
+ callfar SubtractHPFromUser
call UpdateUserInParty
ld a, 5
@@ -9568,7 +9568,7 @@
ret z
ld b, a
- callab GetMoveEffect
+ callfar GetMoveEffect
ld a, b
cp EFFECT_MIRROR_COAT
ret z
@@ -9914,7 +9914,7 @@
push hl
push de
push bc
- callab PlayBattleAnim
+ callfar PlayBattleAnim
pop bc
pop de
pop hl
@@ -9936,7 +9936,7 @@
push bc
call BattleCommand_SwitchTurn
- callab PlayBattleAnim
+ callfar PlayBattleAnim
call BattleCommand_SwitchTurn
pop bc
@@ -10035,7 +10035,7 @@
DisappearUser: ; 37ec0
- callba _DisappearUser
+ farcall _DisappearUser
ret
; 37ec7
@@ -10042,7 +10042,7 @@
AppearUserLowerSub: ; 37ec7
- callba _AppearUserLowerSub
+ farcall _AppearUserLowerSub
ret
; 37ece
@@ -10049,7 +10049,7 @@
AppearUserRaiseSub: ; 37ece
- callba _AppearUserRaiseSub
+ farcall _AppearUserRaiseSub
ret
; 37ed5
@@ -10060,7 +10060,7 @@
push hl
push de
push bc
- callba CheckBattleScene
+ farcall CheckBattleScene
pop bc
pop de
pop hl
--- a/battle/effects/attract.asm
+++ b/battle/effects/attract.asm
@@ -35,7 +35,7 @@
xor a
ld [MonType], a
- callba GetGender
+ farcall GetGender
jr c, .genderless_samegender
ld b, 1
@@ -58,7 +58,7 @@
ld [TempMonDVs + 1], a
ld a, 3
ld [MonType], a
- callba GetGender
+ farcall GetGender
pop bc
jr c, .genderless_samegender
--- a/battle/effects/thief.asm
+++ b/battle/effects/thief.asm
@@ -23,7 +23,7 @@
ld [wd265], a
ld d, a
- callba ItemIsMail
+ farcall ItemIsMail
ret c
ld a, [EffectFailed]
@@ -71,7 +71,7 @@
ld [wd265], a
ld d, a
- callba ItemIsMail
+ farcall ItemIsMail
ret c
ld a, [EffectFailed]
--- a/battle/hidden_power.asm
+++ b/battle/hidden_power.asm
@@ -104,7 +104,7 @@
; based on the new type, but keep base power.
ld a, d
push af
- callba BattleCommand_DamageStats ; damagestats
+ farcall BattleCommand_DamageStats ; damagestats
pop af
ld d, a
ret
--- a/battle/link_result.asm
+++ b/battle/link_result.asm
@@ -1,5 +1,5 @@
DetermineLinkBattleResult: ; 2b930
- callba UpdateEnemyMonInParty
+ farcall UpdateEnemyMonInParty
ld hl, PartyMon1HP
call .CountMonsRemaining
push bc
--- a/battle/misc.asm
+++ b/battle/misc.asm
@@ -13,11 +13,11 @@
jr FinishAppearDisappearUser
_AppearUserRaiseSub: ; fbd69 (3e:7d69)
- callba BattleCommand_RaiseSubNoAnim
+ farcall BattleCommand_RaiseSubNoAnim
jr AppearUser
_AppearUserLowerSub: ; fbd71 (3e:7d71)
- callba BattleCommand_LowerSubNoAnim
+ farcall BattleCommand_LowerSubNoAnim
AppearUser: ; fbd77 (3e:7d77)
xor a
--- a/battle/objects/engine.asm
+++ b/battle/objects/engine.asm
@@ -302,13 +302,13 @@
ret
_ExecuteBGEffects: ; ccb48
- callab ExecuteBGEffects
+ callfar ExecuteBGEffects
ret
; ccb4f
_QueueBGEffect: ; ccb4f (33:4b4f)
- callab QueueBGEffect
+ callfar QueueBGEffect
ret
; ccb56 (33:4b56)
--- a/battle/trainer_huds.asm
+++ b/battle/trainer_huds.asm
@@ -259,7 +259,7 @@
ld a, "<BOLD_V>"
ld [hli], a
ld [hl], "<BOLD_S>"
- callba LinkBattle_TrainerHuds ; no need to callba
+ farcall LinkBattle_TrainerHuds ; no need to farcall
ld b, SCGB_DIPLOMA
call GetSGBLayout
call SetPalettes
--- a/battle/used_move_text.asm
+++ b/battle/used_move_text.asm
@@ -32,7 +32,7 @@
ld [wd265], a
push hl
- callba CheckUserIsCharging
+ farcall CheckUserIsCharging
pop hl
jr nz, .grammar
--- a/data/items/item_descriptions.asm
+++ b/data/items/item_descriptions.asm
@@ -7,7 +7,7 @@
ld [CurItem], a
push de
- callba GetTMHMItemMove
+ farcall GetTMHMItemMove
pop hl
ld a, [wd265]
ld [CurSpecies], a
--- a/engine/anim_hp_bar.asm
+++ b/engine/anim_hp_bar.asm
@@ -293,7 +293,7 @@
call SetHPPal
ld a, [wCurHPAnimPal]
ld c, a
- callba ApplyHPBarPals
+ farcall ApplyHPBarPals
ret
; d7c9
--- a/engine/battle_transition.asm
+++ b/engine/battle_transition.asm
@@ -56,7 +56,7 @@
ld a, [wLinkMode]
cp LINK_MOBILE
jr z, .mobile
- callba ReanchorBGMap_NoOAMUpdate
+ farcall ReanchorBGMap_NoOAMUpdate
call UpdateSprites
call DelayFrame
call .NonMobile_LoadPokeballTiles
@@ -297,7 +297,7 @@
; 8c3e8
StartTrainerBattle_SetUpForWavyOutro: ; 8c3e8 (23:43e8)
- callba Function5602
+ farcall Function5602
ld a, $5 ; BANK(LYOverrides)
ld [rSVBK], a
@@ -355,7 +355,7 @@
ret
StartTrainerBattle_SetUpForSpinOutro: ; 8c43d (23:443d)
- callba Function5602
+ farcall Function5602
ld a, $5 ; BANK(LYOverrides)
ld [rSVBK], a
call StartTrainerBattle_NextScene
@@ -497,7 +497,7 @@
; 8c578
StartTrainerBattle_SetUpForRandomScatterOutro: ; 8c578 (23:4578)
- callba Function5602
+ farcall Function5602
ld a, $5 ; BANK(LYOverrides)
ld [rSVBK], a
call StartTrainerBattle_NextScene
@@ -797,7 +797,7 @@
; 8c768
StartTrainerBattle_ZoomToBlack: ; 8c768 (23:4768)
- callba Function5602
+ farcall Function5602
ld de, .boxes
.loop
--- a/engine/billspc.asm
+++ b/engine/billspc.asm
@@ -208,7 +208,7 @@
ld [CurPartyMon], a
xor a
ld [wPokemonWithdrawDepositParameter], a
- callba RemoveMonFromPartyOrBox
+ farcall RemoveMonFromPartyOrBox
call ReleasePKMN_ByePKMN
ld a, $0
ld [wJumptableIndex], a
@@ -472,7 +472,7 @@
ld [CurPartyMon], a
ld a, PC_DEPOSIT
ld [wPokemonWithdrawDepositParameter], a
- callba RemoveMonFromPartyOrBox
+ farcall RemoveMonFromPartyOrBox
call ReleasePKMN_ByePKMN
ld a, $0
ld [wJumptableIndex], a
@@ -1125,7 +1125,7 @@
ld a, $3
ld [MonType], a
- callba GetGender
+ farcall GetGender
jr c, .skip_gender
ld a, "♂"
jr nz, .printgender
@@ -1140,7 +1140,7 @@
ret z
ld d, a
- callab ItemIsMail
+ callfar ItemIsMail
jr c, .mail
ld a, $5d ; item icon
jr .printitem
@@ -1656,7 +1656,7 @@
ld hl, wBillsPC_ScrollPosition
add [hl]
ld [CurPartyMon], a
- callba CheckCurPartyMonFainted
+ farcall CheckCurPartyMonFainted
jr c, .AllOthersFainted
ld a, [wBillsPC_MonHasMail]
and a
@@ -1773,7 +1773,7 @@
ld bc, PARTYMON_STRUCT_LENGTH
call CopyBytes
call CloseSRAM
- callba CalcwBufferMonStats
+ farcall CalcwBufferMonStats
ret
.party
@@ -1816,7 +1816,7 @@
ld bc, BOXMON_STRUCT_LENGTH
call CopyMonToTemp
call CloseSRAM
- callba CalcwBufferMonStats
+ farcall CalcwBufferMonStats
ret
DepositPokemon: ; e307c (38:707c)
@@ -1833,7 +1833,7 @@
jr c, .asm_boxisfull
xor a
ld [wPokemonWithdrawDepositParameter], a
- callba RemoveMonFromPartyOrBox
+ farcall RemoveMonFromPartyOrBox
ld a, [CurPartySpecies]
call PlayCry
hlcoord 0, 0
@@ -1888,7 +1888,7 @@
jr c, .PartyFull
ld a, PC_DEPOSIT
ld [wPokemonWithdrawDepositParameter], a
- callba RemoveMonFromPartyOrBox
+ farcall RemoveMonFromPartyOrBox
ld a, [CurPartySpecies]
call PlayCry
hlcoord 0, 0
@@ -2020,7 +2020,7 @@
.dw_return ; e322a
pop af
ld e, a
- callba MovePkmnWOMail_InsertMon_SaveGame
+ farcall MovePkmnWOMail_InsertMon_SaveGame
ret
; e3233
@@ -2056,7 +2056,7 @@
call .CopyFromParty
ld a, $1
ld [wGameLogicPaused], a
- callba SaveGameData
+ farcall SaveGameData
xor a
ld [wGameLogicPaused], a
call .CopyToBox
@@ -2106,7 +2106,7 @@
ld a, [wBillsPC_BackupLoadedBox]
dec a
ld e, a
- callba MovePkmnWOMail_SaveGame
+ farcall MovePkmnWOMail_SaveGame
ld a, [wBillsPC_BackupCursorPosition]
ld hl, wBillsPC_BackupScrollPosition
add [hl]
@@ -2123,10 +2123,10 @@
ld bc, BOXMON_STRUCT_LENGTH
call CopyMonToTemp
call CloseSRAM
- callba CalcwBufferMonStats
+ farcall CalcwBufferMonStats
ld a, PC_DEPOSIT
ld [wPokemonWithdrawDepositParameter], a
- callba RemoveMonFromPartyOrBox
+ farcall RemoveMonFromPartyOrBox
ret
; e32fa
@@ -2134,12 +2134,12 @@
ld a, [wBillsPC_LoadedBox]
dec a
ld e, a
- callba MovePkmnWOMail_SaveGame
+ farcall MovePkmnWOMail_SaveGame
ld a, [wBillsPC_CursorPosition]
ld hl, wBillsPC_ScrollPosition
add [hl]
ld [CurPartyMon], a
- callba InsertPokemonIntoBox
+ farcall InsertPokemonIntoBox
ret
; e3316
@@ -2159,7 +2159,7 @@
call CopyMonToTemp
xor a
ld [wPokemonWithdrawDepositParameter], a
- callba RemoveMonFromPartyOrBox
+ farcall RemoveMonFromPartyOrBox
ret
; e3346
@@ -2168,7 +2168,7 @@
ld hl, wBillsPC_ScrollPosition
add [hl]
ld [CurPartyMon], a
- callba InsertPokemonIntoParty
+ farcall InsertPokemonIntoParty
ret
; e3357
@@ -2523,7 +2523,7 @@
ld a, [MenuSelection]
dec a
ld c, a
- callba PrintPCBox
+ farcall PrintPCBox
call BillsPC_ClearTilemap
and a
ret
@@ -2540,13 +2540,13 @@
ld a, [wCurBox]
cp e
ret z
- callba ChangeBoxSaveGame
+ farcall ChangeBoxSaveGame
ret
.Name:
ld b, $4 ; box
ld de, wd002
- callba NamingScreen
+ farcall NamingScreen
call ClearTileMap
call LoadStandardFont
call LoadFontsBattleExtra
--- a/engine/billspctop.asm
+++ b/engine/billspctop.asm
@@ -111,7 +111,7 @@
BillsPC_MovePKMNMenu: ; e4cd
call LoadStandardMenuDataHeader
- callba IsAnyMonHoldingMail
+ farcall IsAnyMonHoldingMail
jr nc, .no_mail
ld hl, .Text_MonHoldingMail
call PrintText
@@ -118,9 +118,9 @@
jr .quit
.no_mail
- callba StartMovePkmnWOMail_SaveGame
+ farcall StartMovePkmnWOMail_SaveGame
jr c, .quit
- callba _MovePKMNWithoutMail
+ farcall _MovePKMNWithoutMail
call ReturnToMapFromSubmenu
call ClearPCItemScreen
@@ -136,7 +136,7 @@
BillsPC_DepositMenu: ; e4fe (3:64fe)
call LoadStandardMenuDataHeader
- callba _DepositPKMN
+ farcall _DepositPKMN
call ReturnToMapFromSubmenu
call ClearPCItemScreen
call CloseWindow
@@ -205,7 +205,7 @@
BillsPC_WithdrawMenu: ; e559 (3:6559)
call LoadStandardMenuDataHeader
- callba _WithdrawPKMN
+ farcall _WithdrawPKMN
call ReturnToMapFromSubmenu
call ClearPCItemScreen
call CloseWindow
@@ -231,7 +231,7 @@
db "@"
BillsPC_ChangeBoxMenu: ; e583 (3:6583)
- callba _ChangeBox
+ farcall _ChangeBox
and a
ret
--- a/engine/breeding.asm
+++ b/engine/breeding.asm
@@ -231,8 +231,8 @@
push de
- callba SetEggMonCaughtData
- callba TrainerRankings_EggsHatched
+ farcall SetEggMonCaughtData
+ farcall TrainerRankings_EggsHatched
ld a, [CurPartyMon]
ld hl, PartyMon1Species
ld bc, PARTYMON_STRUCT_LENGTH
@@ -337,7 +337,7 @@
ld [MonType], a
push de
ld b, $0
- callba NamingScreen
+ farcall NamingScreen
pop hl
ld de, StringBuffer1
call InitName
@@ -687,7 +687,7 @@
push hl
push de
push bc
- callab PlaySpriteAnimations
+ callfar PlaySpriteAnimations
call DelayFrame
pop bc
pop de
@@ -701,7 +701,7 @@
push af
ld de, MUSIC_NONE
call PlayMusic
- callba BlankScreen
+ farcall BlankScreen
call DisableLCD
ld hl, EggHatchGFX
ld de, VTiles0 tile $00
@@ -708,7 +708,7 @@
ld bc, $20
ld a, BANK(EggHatchGFX)
call FarCopyBytes
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
ld de, VTiles2 tile $00
ld a, [wJumptableIndex]
call GetHatchlingFrontpic
@@ -817,7 +817,7 @@
; 173b3
Hatch_InitShellFragments: ; 173b3 (5:73b3)
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
ld hl, .SpriteData
.loop
ld a, [hli]
--- a/engine/buy_sell_toss.asm
+++ b/engine/buy_sell_toss.asm
@@ -6,7 +6,7 @@
; 24fc9
SelectQuantityToBuy: ; 24fc9
- callba GetItemPrice
+ farcall GetItemPrice
RooftopSale_SelectQuantityToBuy: ; 24fcf
ld a, d
ld [Buffer1], a
@@ -19,7 +19,7 @@
; 24fe1
SelectQuantityToSell: ; 24fe1
- callba GetItemPrice
+ farcall GetItemPrice
ld a, d
ld [Buffer1], a
ld a, e
--- a/engine/caught_data.asm
+++ b/engine/caught_data.asm
@@ -52,7 +52,7 @@
xor a
ld [MonType], a
ld de, wMonOrItemNameBuffer
- callab InitNickname
+ callfar InitNickname
.Party_SkipNickname:
ld a, [PartyCount]
@@ -103,7 +103,7 @@
ld de, wBufferMonOT
ld bc, NAME_LENGTH
call CopyBytes
- callab InsertPokemonIntoBox
+ callfar InsertPokemonIntoBox
ld a, [CurPartySpecies]
ld [wd265], a
call GetPokemonName
@@ -113,7 +113,7 @@
ld a, BOXMON
ld [MonType], a
ld de, wMonOrItemNameBuffer
- callab InitNickname
+ callfar InitNickname
ld hl, wMonOrItemNameBuffer
.Box_SkipNickname:
--- a/engine/cgb_layouts.asm
+++ b/engine/cgb_layouts.asm
@@ -156,7 +156,7 @@
InitPartyMenuBGPal7: ; 8e85
- callba Function100dc0
+ farcall Function100dc0
Mobile_InitPartyMenuBGPal7: ; 8e8b
ld hl, Palette_b311
jr nc, .not_mobile
@@ -170,7 +170,7 @@
; 8e9f
InitPartyMenuBGPal0: ; 8e9f
- callba Function100dc0
+ farcall Function100dc0
ld hl, Palette_b311
jr nc, .not_mobile
ld hl, Palette_b309
--- a/engine/clock_reset.asm
+++ b/engine/clock_reset.asm
@@ -202,13 +202,13 @@
decoord 1, 8
ld a, [Buffer4]
ld b, a
- callba PrintDayOfWeek
+ farcall PrintDayOfWeek
ld a, [Buffer5]
ld b, a
ld a, [Buffer6]
ld c, a
decoord 11, 8
- callba PrintHoursMins
+ farcall PrintHoursMins
ld a, [Buffer2]
lb de, " ", " "
call .PlaceChars
--- a/engine/color.asm
+++ b/engine/color.asm
@@ -691,7 +691,7 @@
GetBattlemonBackpicPalettePointer:
push de
- callba GetPartyMonDVs
+ farcall GetPartyMonDVs
ld c, l
ld b, h
ld a, [TempBattleMonSpecies]
@@ -701,7 +701,7 @@
GetEnemyFrontpicPalettePointer:
push de
- callba GetEnemyMonDVs
+ farcall GetEnemyMonDVs
ld c, l
ld b, h
ld a, [TempEnemyMonSpecies]
@@ -1306,7 +1306,7 @@
INCLUDE "gfx/trainer_palettes.asm"
LoadMapPals:
- callba LoadSpecialMapPalette
+ farcall LoadSpecialMapPalette
jr c, .got_pals
; Which palette group is based on whether we're outside or inside
--- a/engine/consume_held_item.asm
+++ b/engine/consume_held_item.asm
@@ -17,7 +17,7 @@
push af
ld a, [de]
ld b, a
- callba GetItemHeldEffect
+ farcall GetItemHeldEffect
ld hl, .ConsumableEffects
.loop
ld a, [hli]
--- a/engine/crystal_colors.asm
+++ b/engine/crystal_colors.asm
@@ -5,7 +5,7 @@
ld a, [SGBPredef]
.not_ram
push af
- callba ResetBGPals
+ farcall ResetBGPals
pop af
ld l, a
ld h, 0
@@ -70,8 +70,8 @@
call MG_Mobile_Layout_LoadPals
call MG_Mobile_Layout_WipeAttrMap
call MG_Mobile_Layout_CreatePalBoxes
- callba ApplyAttrMap
- callba ApplyPals
+ farcall ApplyAttrMap
+ farcall ApplyPals
ret
MG_Mobile_Layout_CreatePalBoxes: ; 49384 (12:5384)
@@ -167,8 +167,8 @@
call Function49496
.asm_49467
- callba ApplyAttrMap
- callba ApplyPals
+ farcall ApplyAttrMap
+ farcall ApplyPals
ld a, $1
ld [hCGBPalUpdate], a
ret
@@ -215,9 +215,9 @@
ld bc, 1 palettes
ld a, BANK(UnknBGPals)
call FarCopyWRAM
- callba ApplyPals
+ farcall ApplyPals
call MG_Mobile_Layout_WipeAttrMap
- callba ApplyAttrMap
+ farcall ApplyAttrMap
ld hl, Palette_4973a
ld de, UnknOBPals
ld bc, 1 palettes
@@ -246,7 +246,7 @@
ld bc, $40
ld a, $5
call FarCopyWRAM
- callba ApplyPals
+ farcall ApplyPals
ret
; 49757
@@ -312,7 +312,7 @@
ld bc, 6 palettes
ld a, BANK(UnknBGPals)
call FarCopyWRAM
- callba ApplyPals
+ farcall ApplyPals
ret
; 49826
--- a/engine/crystal_intro.asm
+++ b/engine/crystal_intro.asm
@@ -18,12 +18,12 @@
call SetPalettes
ld c, 10
call DelayFrames
- callab Copyright
+ callfar Copyright
call WaitBGMap
ld c, 100
call DelayFrames
call ClearTileMap
- callba GBCOnlyScreen
+ farcall GBCOnlyScreen
call .GetGFLogoGFX
.joy_loop
call JoyTextDelay
@@ -34,7 +34,7 @@
bit 7, a
jr nz, .finish
call PlaceGameFreakPresents
- callba PlaySpriteAnimations
+ farcall PlaySpriteAnimations
call DelayFrame
jr .joy_loop
@@ -78,7 +78,7 @@
pop af
ld [rSVBK], a
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
depixel 10, 11, 4, 0
ld a, SPRITE_ANIM_INDEX_GAMEFREAK_LOGO
call _InitSpriteAnimStruct
@@ -107,7 +107,7 @@
; e465e
.StopGamefreakAnim: ; e465e
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
call ClearTileMap
call ClearSprites
ld c, 16
@@ -253,7 +253,7 @@
add $20
.asm_e4723
ld e, a
- callba BattleAnim_Sine_e
+ farcall BattleAnim_Sine_e
ld hl, SPRITEANIMSTRUCT_YOFFSET
add hl, bc
ld [hl], e
@@ -368,7 +368,7 @@
bit 7, a
jr nz, .done
call IntroSceneJumper
- callba PlaySpriteAnimations
+ farcall PlaySpriteAnimations
call DelayFrame
jp .loop
@@ -499,7 +499,7 @@
ld [hWX], a
ld a, $90
ld [hWY], a
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
call Intro_SetCGBPalUpdate
xor a
ld [wIntroSceneFrameCounter], a
@@ -638,7 +638,7 @@
ld [hWX], a
ld a, $90
ld [hWY], a
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
call Intro_SetCGBPalUpdate
xor a
ld [wIntroSceneFrameCounter], a
@@ -749,7 +749,7 @@
ld a, $90
ld [hWY], a
call Intro_ResetLYOverrides
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
depixel 13, 27, 4, 0
ld a, SPRITE_ANIM_INDEX_INTRO_SUICUNE
call _InitSpriteAnimStruct
@@ -787,7 +787,7 @@
.finish
ld de, SFX_INTRO_SUICUNE_2
call PlaySFX
- callba DeinitializeAllSprites
+ farcall DeinitializeAllSprites
call NextIntroScene
ret
@@ -903,7 +903,7 @@
ld [hWX], a
ld a, $90
ld [hWY], a
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
call Intro_SetCGBPalUpdate
xor a
ld [wIntroSceneFrameCounter], a
@@ -1030,7 +1030,7 @@
ld [hWX], a
ld a, $90
ld [hWY], a
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
depixel 13, 11, 4, 0
ld a, SPRITE_ANIM_INDEX_INTRO_SUICUNE
call _InitSpriteAnimStruct
@@ -1077,7 +1077,7 @@
ret
.asm_e4e2c
- callba DeinitializeAllSprites
+ farcall DeinitializeAllSprites
ret
.asm_e4e33
@@ -1140,7 +1140,7 @@
ld [hWX], a
ld a, $90
ld [hWY], a
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
call Intro_SetCGBPalUpdate
depixel 8, 5
ld a, SPRITE_ANIM_INDEX_INTRO_UNOWN_F
@@ -1213,7 +1213,7 @@
ld [hWX], a
ld a, $90
ld [hWY], a
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
call Intro_SetCGBPalUpdate
xor a
ld [wIntroSceneFrameCounter], a
@@ -1288,7 +1288,7 @@
ld [hWX], a
ld a, $90
ld [hWY], a
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
ld hl, wSpriteAnimDict
xor a
ld [hli], a
@@ -1370,7 +1370,7 @@
jr nc, .done
ret
.done
- callba DeinitializeAllSprites
+ farcall DeinitializeAllSprites
call NextIntroScene
ret
@@ -1457,7 +1457,7 @@
ld [hWX], a
ld a, $90
ld [hWY], a
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
call Intro_SetCGBPalUpdate
xor a
ld [wIntroSceneFrameCounter], a
--- a/engine/debug.asm
+++ b/engine/debug.asm
@@ -341,12 +341,12 @@
.asm_81b7a
ld a, [wd265]
ld [TrainerClass], a
- callab GetTrainerAttributes
+ callfar GetTrainerAttributes
ld de, StringBuffer1
hlcoord 4, 1
call PlaceString
ld de, VTiles2
- callab GetTrainerPic
+ callfar GetTrainerPic
xor a
ld [TempEnemyMonSpecies], a
ld [hGraphicStartTile], a
--- a/engine/decorations.asm
+++ b/engine/decorations.asm
@@ -1368,7 +1368,7 @@
ld c, a
push de
push hl
- callba GetDecorationSprite
+ farcall GetDecorationSprite
pop hl
pop de
ld a, c
--- a/engine/delete_save_change_clock.asm
+++ b/engine/delete_save_change_clock.asm
@@ -1,5 +1,5 @@
_ResetClock: ; 4d3b1
- callba BlankScreen
+ farcall BlankScreen
ld b, SCGB_DIPLOMA
call GetSGBLayout
call LoadStandardFont
@@ -260,7 +260,7 @@
ret
_DeleteSaveData: ; 4d54c
- callba BlankScreen
+ farcall BlankScreen
ld b, SCGB_DIPLOMA
call GetSGBLayout
call LoadStandardFont
@@ -276,7 +276,7 @@
ld a, [wMenuCursorY]
cp $1
ret z
- callba EmptyAllSRAMBanks
+ farcall EmptyAllSRAMBanks
ret
.Text_ClearAllSaveData: ; 0x4d580
--- a/engine/dummy_game.asm
+++ b/engine/dummy_game.asm
@@ -10,7 +10,7 @@
call DisableLCD
ld b, SCGB_DIPLOMA
call GetSGBLayout
- callab ClearSpriteAnims
+ callfar ClearSpriteAnims
ld hl, LZ_e2221
ld de, VTiles2 tile $00
call Decompress
@@ -47,7 +47,7 @@
bit 7, a
jr nz, .quit
call .ExecuteJumptable
- callab PlaySpriteAnimations
+ callfar PlaySpriteAnimations
call DelayFrame
and a
ret
--- a/engine/events.asm
+++ b/engine/events.asm
@@ -120,7 +120,7 @@
ld hl, MapStatus
ld bc, wMapStatusEnd - MapStatus
call ByteFill
- callba InitCallReceiveDelay
+ farcall InitCallReceiveDelay
call ClearJoypad
EnterMap: ; 9673e
xor a
@@ -127,7 +127,7 @@
ld [wXYComparePointer], a
ld [wXYComparePointer + 1], a
call SetUpFiveStepWildEncounterCooldown
- callba RunMapSetupScript
+ farcall RunMapSetupScript
call DisableEvents
ld a, [hMapEntryMethod]
@@ -159,7 +159,7 @@
HandleMap: ; 96773
call ResetOverworldDelay
call HandleMapTimeAndJoypad
- callba HandleCmdQueue ; no need to farcall
+ farcall HandleCmdQueue ; no need to farcall
call MapEvents
; Not immediately entering a connected map will cause problems.
@@ -188,7 +188,7 @@
.events ; 967a1
call PlayerEvents
call DisableEvents
- callba ScriptEvents
+ farcall ScriptEvents
ret
; 967ae
@@ -227,16 +227,16 @@
; 967d1
HandleMapObjects: ; 967d1
- callba HandleNPCStep ; engine/map_objects.asm
- callba _HandlePlayerStep
+ farcall HandleNPCStep ; engine/map_objects.asm
+ farcall _HandlePlayerStep
call _CheckObjectEnteringVisibleRange
ret
; 967e1
HandleMapBackground: ; 967e1
- callba _UpdateSprites
- callba ScrollScreen
- callba PlaceMapNameSign
+ farcall _UpdateSprites
+ farcall ScrollScreen
+ farcall PlaceMapNameSign
ret
; 967f4
@@ -264,7 +264,7 @@
ld hl, wPlayerStepFlags
bit 6, [hl]
ret z
- callba CheckObjectEnteringVisibleRange
+ farcall CheckObjectEnteringVisibleRange
ret
; 9681f
@@ -300,7 +300,7 @@
.ok
push af
- callba EnableScriptMode
+ farcall EnableScriptMode
pop af
ld [ScriptRunning], a
@@ -340,7 +340,7 @@
call CheckWarpConnxnScriptFlag
jr z, .connections_disabled
- callba CheckMovingOffEdgeOfMap
+ farcall CheckMovingOffEdgeOfMap
jr c, .map_connection
call CheckWarpTile
@@ -465,8 +465,8 @@
ld hl, ScriptFlags
res 3, [hl]
- callba EnableScriptMode
- callba ScriptEvents
+ farcall EnableScriptMode
+ farcall ScriptEvents
ld hl, ScriptFlags
bit 3, [hl]
@@ -495,15 +495,15 @@
bit 2, [hl] ; bug contest
jr z, .do_daily
- callba CheckBugContestTimer
+ farcall CheckBugContestTimer
jr c, .end_bug_contest
xor a
ret
.do_daily
- callba CheckDailyResetTimer
- callba CheckPokerusTick
- callba CheckPhoneCall
+ farcall CheckDailyResetTimer
+ farcall CheckPokerusTick
+ farcall CheckPhoneCall
ret c
.nothing
@@ -532,7 +532,7 @@
jr nz, .NoAction
; Can't perform button actions while sliding on ice.
- callba CheckStandingOnIce
+ farcall CheckStandingOnIce
jr c, .NoAction
call CheckAPressOW
@@ -547,7 +547,7 @@
.Action:
push af
- callba StopPlayerForEvent
+ farcall StopPlayerForEvent
pop af
scf
ret
@@ -576,7 +576,7 @@
; 969b5
TryObjectEvent: ; 969b5
- callba CheckFacingObject
+ farcall CheckFacingObject
jr c, .IsObject
xor a
ret
@@ -804,7 +804,7 @@
; 96af0
PlayerMovement: ; 96af0
- callba DoPlayerMovement
+ farcall DoPlayerMovement
ld a, c
ld hl, .pointers
rst JumpTable
@@ -934,7 +934,7 @@
jr nz, .done
; If there is a special phone call, don't count the step.
- callba CheckSpecialPhoneCall
+ farcall CheckSpecialPhoneCall
jr c, .doscript
; If Repel wore off, don't count the step.
@@ -949,7 +949,7 @@
; Every 256 steps, increase the happiness of all your Pokemon.
jr nz, .skip_happiness
- callba StepHappiness
+ farcall StepHappiness
.skip_happiness
; Every 256 steps, offset from the happiness incrementor by 128 steps,
@@ -959,12 +959,12 @@
cp $80
jr nz, .skip_egg
- callba DoEggStep
+ farcall DoEggStep
jr nz, .hatch
.skip_egg
; Increase the EXP of (both) DayCare Pokemon by 1.
- callba DayCareStep
+ farcall DayCareStep
; Every four steps, deal damage to all Poisoned Pokemon
ld hl, PoisonStepCount
@@ -973,11 +973,11 @@
jr c, .skip_poison
ld [hl], 0
- callba DoPoisonStep
+ farcall DoPoisonStep
jr c, .doscript
.skip_poison
- callba DoBikeStep
+ farcall DoBikeStep
.done
xor a
--- a/engine/events_2.asm
+++ b/engine/events_2.asm
@@ -54,12 +54,12 @@
call GetFacingTileCoord
ld [EngineBuffer1], a
ld c, a
- callba CheckFacingTileForStd
+ farcall CheckFacingTileForStd
jr c, .done
call CheckCutTreeTile
jr nz, .whirlpool
- callba TryCutOW
+ farcall TryCutOW
jr .done
.whirlpool
@@ -66,7 +66,7 @@
ld a, [EngineBuffer1]
call CheckWhirlpoolTile
jr nz, .waterfall
- callba TryWhirlpoolOW
+ farcall TryWhirlpoolOW
jr .done
.waterfall
@@ -73,7 +73,7 @@
ld a, [EngineBuffer1]
call CheckWaterfallTile
jr nz, .headbutt
- callba TryWaterfallOW
+ farcall TryWaterfallOW
jr .done
.headbutt
@@ -80,12 +80,12 @@
ld a, [EngineBuffer1]
call CheckHeadbuttTreeTile
jr nz, .surf
- callba TryHeadbuttOW
+ farcall TryHeadbuttOW
jr c, .done
jr .noevent
.surf
- callba TrySurfOW
+ farcall TrySurfOW
jr nc, .noevent
jr .done
@@ -111,7 +111,7 @@
ld hl, StatusFlags2
bit 2, [hl] ; bug contest
jr nz, .bug_contest
- callba TryWildEncounter
+ farcall TryWildEncounter
jr nz, .nope
jr .ok
@@ -157,7 +157,7 @@
jr z, .ice_check
cp DUNGEON
jr z, .ice_check
- callba CheckGrassCollision
+ farcall CheckGrassCollision
jr nc, .no
.ice_check
@@ -176,7 +176,7 @@
call TryWildEncounter_BugContest
ret nc
call ChooseWildEncounter_BugContest
- callba CheckRepelEffect
+ farcall CheckRepelEffect
ret
; 97d31
@@ -242,8 +242,8 @@
ld b, 20 percent
.ok
- callba ApplyMusicEffectOnEncounterRate
- callba ApplyCleanseTagEffectOnEncounterRate
+ farcall ApplyMusicEffectOnEncounterRate
+ farcall ApplyCleanseTagEffectOnEncounterRate
call Random
ld a, [hRandomAdd]
cp b
--- a/engine/events_3.asm
+++ b/engine/events_3.asm
@@ -1,14 +1,14 @@
ReturnFromMapSetupScript:: ; b8000
xor a
ld [hBGMapMode], a
- ; For some reson, GameFreak chose to use a callba here instead of just falling through.
+ ; For some reson, GameFreak chose to use a farcall here instead of just falling through.
; No other function in the game references the function at 2E:400A, here labeled
- ; ReturnFromMapSetupScript.inefficientcallba.
- callba .inefficientcallba ; this is a waste of 6 ROM bytes and 6 stack bytes
+ ; ReturnFromMapSetupScript.inefficient_farcall.
+ farcall .inefficient_farcall ; this is a waste of 6 ROM bytes and 6 stack bytes
ret
; b800a
-.inefficientcallba ; b800a
+.inefficient_farcall ; b800a
ld a, [MapGroup]
ld b, a
ld a, [MapNumber]
@@ -45,7 +45,7 @@
ld [wLandmarkSignTimer], a
call LoadMapNameSignGFX
call InitMapNameFrame
- callba HDMATransfer_OnlyTopFourRows
+ farcall HDMATransfer_OnlyTopFourRows
ret
.dont_do_map_sign
@@ -113,7 +113,7 @@
jr nz, .skip2
call InitMapNameFrame
call PlaceMapNameCenterAlign
- callba HDMATransfer_OnlyTopFourRows
+ farcall HDMATransfer_OnlyTopFourRows
.skip2
ld a, $80
ld a, $70
@@ -151,7 +151,7 @@
PlaceMapNameCenterAlign: ; b80e1 (2e:40e1)
ld a, [wCurrentLandmark]
ld e, a
- callba GetLandmarkName
+ farcall GetLandmarkName
call .GetNameLength
ld a, SCREEN_WIDTH
sub c
@@ -360,7 +360,7 @@
TreeMonEncounter: ; b81ea
- callba TrainerRankings_TreeEncounters
+ farcall TrainerRankings_TreeEncounters
xor a
ld [TempWildMonSpecies], a
--- a/engine/evolution_animation.asm
+++ b/engine/evolution_animation.asm
@@ -36,7 +36,7 @@
ld de, MUSIC_NONE
call PlayMusic
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
ld de, .GFX
ld hl, VTiles0
@@ -106,7 +106,7 @@
ld c, $0
call .GetSGBLayout
call .PlayEvolvedSFX
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
call .check_statused
jr c, .no_anim
@@ -143,7 +143,7 @@
ld c, $0
call .GetSGBLayout
call .PlayEvolvedSFX
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
call .check_statused
ret c
@@ -263,7 +263,7 @@
call GetPartyLocation
ld b, h
ld c, l
- callba CheckFaintedFrzSlp
+ farcall CheckFaintedFrzSlp
ret
; 4e7a6
@@ -337,7 +337,7 @@
.AnimateBallsOfLight: ; 4e80c
push bc
- callab PlaySpriteAnimations
+ callfar PlaySpriteAnimations
; a = (([hVBlankCounter] + 4) / 2) % NUM_PALETTES
ld a, [hVBlankCounter]
and %1110
--- a/engine/evolve.asm
+++ b/engine/evolve.asm
@@ -225,7 +225,7 @@
ld [hBGMapMode], a
call ClearSprites
- callba EvolutionAnimation
+ farcall EvolutionAnimation
push af
call ClearSprites
@@ -247,7 +247,7 @@
push hl
ld hl, Text_EvolvedIntoPKMN
call PrintTextBoxText
- callba TrainerRankings_MonsEvolved
+ farcall TrainerRankings_MonsEvolved
ld de, MUSIC_NONE
call PlayMusic
@@ -312,7 +312,7 @@
ld hl, TempMonDVs
predef GetUnownLetter
- callab UpdateUnownDex
+ callfar UpdateUnownDex
.skip_unown
pop de
--- a/engine/fruit_trees.asm
+++ b/engine/fruit_trees.asm
@@ -58,7 +58,7 @@
; 4405f
PickedFruitTree: ; 4405f
- callba TrainerRankings_FruitPicked
+ farcall TrainerRankings_FruitPicked
ld b, 1
jp GetFruitTreeFlag
; 4406a
--- a/engine/get_breedmon_growth.asm
+++ b/engine/get_breedmon_growth.asm
@@ -3,7 +3,7 @@
ld de, TempMon
ld bc, BOXMON_STRUCT_LENGTH
call CopyBytes
- callab CalcLevel
+ callfar CalcLevel
ld a, [wBreedMon1Level]
ld b, a
ld a, d
@@ -17,7 +17,7 @@
ld de, TempMon
ld bc, BOXMON_STRUCT_LENGTH
call CopyBytes
- callab CalcLevel
+ callfar CalcLevel
ld a, [wBreedMon2Level]
ld b, a
ld a, d
--- a/engine/health.asm
+++ b/engine/health.asm
@@ -49,7 +49,7 @@
ld a, [hl]
ld [bc], a
- callba RestoreAllPP
+ farcall RestoreAllPP
ret
ComputeHPBarPixels: ; c699
--- a/engine/init_gender.asm
+++ b/engine/init_gender.asm
@@ -92,7 +92,7 @@
ld bc, 1 palettes
ld a, $5
call FarCopyWRAM
- callba ApplyPals
+ farcall ApplyPals
ret
; 48e5c (12:4e5c)
--- a/engine/init_map.asm
+++ b/engine/init_map.asm
@@ -30,14 +30,14 @@
ld a, VBGMap1 / $100
call .LoadBGMapAddrIntoHRAM
call _OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
- callba LoadOW_BGPal7
- callba ApplyPals
+ farcall LoadOW_BGPal7
+ farcall ApplyPals
ld a, $1
ld [hCGBPalUpdate], a
xor a
ld [hBGMapMode], a
ld [hWY], a
- callba HDMATransfer_FillBGMap0WithBlack ; no need to farcall
+ farcall HDMATransfer_FillBGMap0WithBlack ; no need to farcall
ld a, VBGMap0 / $100
call .LoadBGMapAddrIntoHRAM
xor a
--- a/engine/intro_menu.asm
+++ b/engine/intro_menu.asm
@@ -6,7 +6,7 @@
ld a, e
ld [wMapMusic], a
call PlayMusic
- callba MainMenu
+ farcall MainMenu
jp StartTitleScreen
; 5b04
@@ -56,13 +56,13 @@
MysteryGift: ; 5b54
call UpdateTime
- callba DoMysteryGiftIfDayHasPassed
- callba DoMysteryGift
+ farcall DoMysteryGiftIfDayHasPassed
+ farcall DoMysteryGift
ret
; 5b64
OptionsMenu: ; 5b64
- callba _OptionsMenu
+ farcall _OptionsMenu
ret
; 5b6b
@@ -86,14 +86,14 @@
; 5b8f
AreYouABoyOrAreYouAGirl: ; 5b8f
- callba Mobile_AlwaysReturnNotCarry ; some mobile stuff
+ farcall Mobile_AlwaysReturnNotCarry ; some mobile stuff
jr c, .ok
- callba InitGender
+ farcall InitGender
ret
.ok
ld c, 0
- callba InitMobileProfile ; mobile
+ farcall InitMobileProfile ; mobile
ret
; 5ba7
@@ -220,11 +220,11 @@
call InitializeNPCNames
- callba InitDecorations
+ farcall InitDecorations
- callba DeletePartyMonMail
+ farcall DeletePartyMonMail
- callba DeleteMobileEventIndex
+ farcall DeleteMobileEventIndex
call ResetGameTime
ret
@@ -316,8 +316,8 @@
InitializeWorld: ; 5d23
call ShrinkPlayer
- callba SpawnPlayer
- callba _InitializeStartDay
+ farcall SpawnPlayer
+ farcall _InitializeStartDay
ret
; 5d33
@@ -349,9 +349,9 @@
; 5d65
Continue: ; 5d65
- callba TryLoadSaveFile
+ farcall TryLoadSaveFile
jr c, .FailToLoad
- callba _LoadData
+ farcall _LoadData
call LoadStandardMenuDataHeader
call DisplaySaveInfoOnContinue
ld a, $1
@@ -382,9 +382,9 @@
call ClearTileMap
ld c, 20
call DelayFrames
- callba JumpRoamMons
- callba MysteryGift_CopyReceivedDecosToPC ; Mystery Gift
- callba Function140ae ; time-related
+ farcall JumpRoamMons
+ farcall MysteryGift_CopyReceivedDecosToPC ; Mystery Gift
+ farcall Function140ae ; time-related
ld a, [wSpawnAfterChampion]
cp SPAWN_LANCE
jr z, .SpawnAfterE4
@@ -416,7 +416,7 @@
; 5df0
Continue_MobileAdapterMenu: ; 5df0
- callba Mobile_AlwaysReturnNotCarry ; mobile check
+ farcall Mobile_AlwaysReturnNotCarry ; mobile check
ret nc
; the rest of this stuff is never reached because
@@ -433,8 +433,8 @@
ld c, 20
call DelayFrames
ld c, $1
- callba InitMobileProfile ; mobile
- callba _SaveData
+ farcall InitMobileProfile ; mobile
+ farcall _SaveData
ld a, 8
ld [MusicFade], a
ld a, MUSIC_NONE % $100
@@ -466,7 +466,7 @@
call CheckRTCStatus
and %10000000 ; Day count exceeded 16383
jr z, .pass
- callba RestartClock
+ farcall RestartClock
ld a, c
and a
jr z, .pass
@@ -488,7 +488,7 @@
res 7, [hl]
ld hl, wEnteredMapFromContinue
set 1, [hl]
- callba OverworldLoop
+ farcall OverworldLoop
ld a, [wSpawnAfterChampion]
cp SPAWN_RED
jr z, .AfterRed
@@ -671,7 +671,7 @@
OakSpeech: ; 0x5f99
- callba InitClock
+ farcall InitClock
call RotateFourPalettesLeft
call ClearTileMap
@@ -735,7 +735,7 @@
xor a
ld [CurPartySpecies], a
- callba DrawIntroPlayerPic
+ farcall DrawIntroPlayerPic
ld b, SCGB_TRAINER_OR_MON_FRONTPIC_PALS
call GetSGBLayout
@@ -782,20 +782,20 @@
db "@"
NamePlayer: ; 0x6074
- callba MovePlayerPicRight
- callba ShowPlayerNamingChoices
+ farcall MovePlayerPicRight
+ farcall ShowPlayerNamingChoices
ld a, [wMenuCursorY]
dec a
jr z, .NewName
call StorePlayerName
- callba ApplyMonOrTrainerPals
- callba MovePlayerPicLeft
+ farcall ApplyMonOrTrainerPals
+ farcall MovePlayerPicLeft
ret
.NewName:
ld b, 1
ld de, PlayerName
- callba NamingScreen
+ farcall NamingScreen
call RotateThreePalettesRight
call ClearTileMap
@@ -805,7 +805,7 @@
xor a
ld [CurPartySpecies], a
- callba DrawIntroPlayerPic
+ farcall DrawIntroPlayerPic
ld b, SCGB_TRAINER_OR_MON_FRONTPIC_PALS
call GetSGBLayout
@@ -943,7 +943,7 @@
Intro_PrepTrainerPic: ; 619c
ld de, VTiles2
- callba GetTrainerPic
+ farcall GetTrainerPic
xor a
ld [hGraphicStartTile], a
hlcoord 6, 4
@@ -966,7 +966,7 @@
Intro_PlacePlayerSprite: ; 61cd
- callba GetPlayerIcon
+ farcall GetPlayerIcon
ld c, $c
ld hl, VTiles0
call Request2bpp
@@ -1012,9 +1012,9 @@
CrystalIntroSequence: ; 620b
- callab Copyright_GFPresents
+ callfar Copyright_GFPresents
jr c, StartTitleScreen
- callba CrystalIntro
+ farcall CrystalIntro
StartTitleScreen: ; 6219
ld a, [rSVBK]
@@ -1075,7 +1075,7 @@
.TitleScreen: ; 6274
- callba _TitleScreen
+ farcall _TitleScreen
ret
; 627b
@@ -1084,7 +1084,7 @@
bit 7, a
jr nz, .done_title
call TitleScreenScene
- callba SuicuneFrameIterator
+ farcall SuicuneFrameIterator
call DelayFrame
and a
ret
@@ -1162,7 +1162,7 @@
dec b
jr nz, .loop
- callba AnimateTitleCrystal
+ farcall AnimateTitleCrystal
ret
.done
@@ -1320,12 +1320,12 @@
; 6389
DeleteSaveData: ; 6389
- callba _DeleteSaveData
+ farcall _DeleteSaveData
jp Init
; 6392
ResetClock: ; 6392
- callba _ResetClock
+ farcall _ResetClock
jp Init
; 639b
@@ -1401,7 +1401,7 @@
; 642e
GameInit:: ; 642e
- callba TryLoadSaveData
+ farcall TryLoadSaveData
call ClearWindowData
call ClearBGPalettes
call ClearTileMap
--- a/engine/item_effects.asm
+++ b/engine/item_effects.asm
@@ -358,7 +358,7 @@
ld d, a
push de
- ; BUG: callba overwrites a,
+ ; BUG: farcall overwrites a,
; and GetItemHeldEffect takes b anyway.
; This is probably the reason
@@ -369,7 +369,7 @@
ld a, [BattleMonItem]
; ld b, a
- callba GetItemHeldEffect
+ farcall GetItemHeldEffect
ld a, b
cp HELD_CATCH_CHANCE
@@ -478,7 +478,7 @@
ld [CurPartySpecies], a
ld a, [EnemyMonLevel]
ld [CurPartyLevel], a
- callba LoadEnemyMon
+ farcall LoadEnemyMon
pop af
ld [EnemySubStatus5], a
@@ -517,7 +517,7 @@
cp BATTLETYPE_TUTORIAL
jp z, .FinishTutorial
- callba TrainerRankings_WildMonsCaught
+ farcall TrainerRankings_WildMonsCaught
ld hl, Text_GotchaMonWasCaught
call PrintText
@@ -569,7 +569,7 @@
predef TryAddMonToParty
- callba SetCaughtData
+ farcall SetCaughtData
ld a, [CurItem]
cp FRIEND_BALL
@@ -608,7 +608,7 @@
xor a ; PARTYMON
ld [MonType], a
ld b, 0
- callba NamingScreen
+ farcall NamingScreen
call RotateThreePalettesRight
@@ -625,7 +625,7 @@
predef SentPkmnIntoBox
- callba SetBoxMonCaughtData
+ farcall SetBoxMonCaughtData
ld a, BANK(sBoxCount)
call GetSRAMBank
@@ -661,7 +661,7 @@
ld [MonType], a
ld de, wMonOrItemNameBuffer
ld b, $0
- callba NamingScreen
+ farcall NamingScreen
ld a, BANK(sBoxMonNicknames)
call GetSRAMBank
@@ -696,7 +696,7 @@
jr .return_from_capture
.catch_bug_contest_mon
- callba BugContest_SetCaughtContestMon
+ farcall BugContest_SetCaughtContestMon
jr .return_from_capture
.FinishTutorial:
@@ -985,7 +985,7 @@
ld [MonType], a
ld a, [CurBattleMon]
ld [CurPartyMon], a
- callba GetGender
+ farcall GetGender
jr c, .done1 ; no effect on genderless
ld d, 0 ; male
@@ -999,7 +999,7 @@
ld [CurPartySpecies], a
ld a, WILDMON
ld [MonType], a
- callba GetGender
+ farcall GetGender
jr c, .done2 ; no effect on genderless
ld d, 0 ; male
@@ -1173,17 +1173,17 @@
; 0xedfa
ReturnToBattle_UseBall: ; edfa (3:6dfa)
- callba _ReturnToBattle_UseBall
+ farcall _ReturnToBattle_UseBall
ret
TownMap: ; ee01
- callba PokegearMap
+ farcall PokegearMap
ret
; ee08
Bicycle: ; ee08
- callba BikeFunction
+ farcall BikeFunction
ret
; ee0f
@@ -1208,7 +1208,7 @@
ld a, $1
ld [wForceEvolution], a
- callba EvolvePokemon
+ farcall EvolvePokemon
ld a, [wMonTriedToEvolve]
and a
@@ -1269,7 +1269,7 @@
call PrintText
ld c, HAPPINESS_USEDITEM
- callba ChangeHappiness
+ farcall ChangeHappiness
jp UseDisposableItem
@@ -1383,7 +1383,7 @@
ld [CurPartyLevel], a
push de
ld d, a
- callba CalcExpAtLevel
+ farcall CalcExpAtLevel
pop de
ld a, MON_EXP
@@ -1421,7 +1421,7 @@
ld a, [hl]
adc b
ld [hl], a
- callba LevelUpHappinessMod
+ farcall LevelUpHappinessMod
ld a, PARTYMENUTEXT_LEVEL_UP
call ItemActionText
@@ -1449,7 +1449,7 @@
xor a
ld [wForceEvolution], a
- callba EvolvePokemon
+ farcall EvolvePokemon
jp UseDisposableItem
; efad
@@ -1466,7 +1466,7 @@
cp $0
jr nz, .asm_efc9
ld c, HAPPINESS_BITTERPOWDER
- callba ChangeHappiness
+ farcall ChangeHappiness
call LooksBitterMessage
@@ -1569,7 +1569,7 @@
res SUBSTATUS_CONFUSED, [hl]
.not_full_heal
push bc
- callba CalcPlayerStats
+ farcall CalcPlayerStats
pop bc
ret
@@ -1635,7 +1635,7 @@
jr nz, .asm_f0c5
ld c, HAPPINESS_REVIVALHERB
- callba ChangeHappiness
+ farcall ChangeHappiness
call LooksBitterMessage
ld a, 0
@@ -1797,7 +1797,7 @@
cp 0
jr nz, .skip_happiness
- callba ChangeHappiness
+ farcall ChangeHappiness
call LooksBitterMessage
ld a, 0
@@ -1876,15 +1876,15 @@
ret
ChoosePkmnToUseItemOn: ; f21c (3:721c)
- callba LoadPartyMenuGFX
- callba InitPartyMenuWithCancel
- callba InitPartyMenuGFX
- callba WritePartyMenuTilemap
- callba PrintPartyMenuText
+ farcall LoadPartyMenuGFX
+ farcall InitPartyMenuWithCancel
+ farcall InitPartyMenuGFX
+ farcall WritePartyMenuTilemap
+ farcall PrintPartyMenuText
call WaitBGMap
call SetPalettes
call DelayFrame
- callba PartyMenuSelect
+ farcall PartyMenuSelect
ret
ItemActionText: ; f24a (3:724a)
@@ -1896,8 +1896,8 @@
push hl
push de
push bc
- callba WritePartyMenuTilemap
- callba PrintPartyMenuActionText
+ farcall WritePartyMenuTilemap
+ farcall PrintPartyMenuActionText
call WaitBGMap
call SetPalettes
call DelayFrame
@@ -2234,7 +2234,7 @@
EscapeRope: ; f44f
xor a
ld [wItemEffectSucceeded], a
- callba EscapeRopeFunction
+ farcall EscapeRopeFunction
ld a, [wItemEffectSucceeded]
cp 1
@@ -2344,16 +2344,16 @@
ld [hBattleTurn], a
ld [AttackMissed], a
ld [EffectFailed], a
- callba CheckIfStatCanBeRaised
+ farcall CheckIfStatCanBeRaised
call WaitSFX
- callba BattleCommand_StatUpMessage
- callba BattleCommand_StatUpFailText
+ farcall BattleCommand_StatUpMessage
+ farcall BattleCommand_StatUpFailText
ld a, [CurBattleMon]
ld [CurPartyMon], a
ld c, HAPPINESS_USEDXITEM
- callba ChangeHappiness
+ farcall ChangeHappiness
ret
; f504
@@ -2499,13 +2499,13 @@
; f5b1
UseRod: ; f5b1
- callba FishFunction
+ farcall FishFunction
ret
; f5b8
Itemfinder: ; f5b8
- callba ItemFinder
+ farcall ItemFinder
ret
; f5bf
@@ -2547,7 +2547,7 @@
ld [CurMoveNum], a
ld a, $2
ld [wMoveSelectionMenuType], a
- callba MoveSelectionScreen
+ farcall MoveSelectionScreen
pop bc
ld a, b
@@ -2782,25 +2782,25 @@
Squirtbottle: ; f73e
- callba _Squirtbottle
+ farcall _Squirtbottle
ret
; f745
CardKey: ; f745
- callba _CardKey
+ farcall _CardKey
ret
; f74c
BasementKey: ; f74c
- callba _BasementKey
+ farcall _BasementKey
ret
; f753
SacredAsh: ; f753
- callba _SacredAsh
+ farcall _SacredAsh
ld a, [wItemEffectSucceeded]
cp $1
ret nz
@@ -2817,7 +2817,7 @@
GorgeousBox: ; f767
ld c, DECOFLAG_GOLD_TROPHY_DOLL
OpenBox: ; f769
- callba SetSpecificDecorationFlag
+ farcall SetSpecificDecorationFlag
ld hl, .text
call PrintText
--- a/engine/link.asm
+++ b/engine/link.asm
@@ -14,7 +14,7 @@
call UpdateSprites
call LoadStandardFont
call LoadFontsBattleExtra
- callba LinkComms_LoadPleaseWaitTextboxBorderGFX
+ farcall LinkComms_LoadPleaseWaitTextboxBorderGFX
call WaitBGMap2
hlcoord 3, 8
ld b, 2
@@ -21,7 +21,7 @@
ld c, 12
ld d, h
ld e, l
- callba LinkTextbox2
+ farcall LinkTextbox2
hlcoord 4, 10
ld de, String_PleaseWait
call PlaceString
@@ -150,7 +150,7 @@
ld [wd265], a
push hl
push de
- callab ConvertMon_1to2
+ callfar ConvertMon_1to2
pop de
pop hl
ld a, [wd265]
@@ -362,19 +362,19 @@
.fix_mail_loop
push bc
push de
- callba IsMailEuropean
+ farcall IsMailEuropean
ld a, c
or a
jr z, .next
sub $3
jr nc, .skip
- callba DeutenEnglischenPost
+ farcall DeutenEnglischenPost
jr .next
.skip
cp $2
jr nc, .next
- callba HandleSpanishItalianMail
+ farcall HandleSpanishItalianMail
.next
pop de
@@ -419,7 +419,7 @@
ld a, CAL
ld [OtherTrainerClass], a
call ClearScreen
- callba Link_WaitBGMap
+ farcall Link_WaitBGMap
ld hl, Options
ld a, [hl]
push af
@@ -463,7 +463,7 @@
ld [wDisableTextAcceleration], a
pop af
ld [Options], a
- callba LoadPokemonData
+ farcall LoadPokemonData
jp Function28b22
.ready_to_trade
@@ -491,7 +491,7 @@
push de
ld d, h
ld e, l
- callba LinkTextbox2
+ farcall LinkTextbox2
pop de
pop hl
bccoord 1, 14
@@ -658,7 +658,7 @@
ld [wd265], a
push hl
push de
- callab ConvertMon_2to1
+ callfar ConvertMon_2to1
pop de
pop hl
ld a, [wd265]
@@ -698,7 +698,7 @@
push bc
ld a, [hl]
ld [wd265], a
- callab ConvertMon_2to1
+ callfar ConvertMon_2to1
pop bc
pop de
ld a, [wd265]
@@ -882,7 +882,7 @@
push hl
push de
push hl
- callba IsMailEuropean
+ farcall IsMailEuropean
pop de
ld a, c
or a
@@ -889,13 +889,13 @@
jr z, .next
sub $3
jr nc, .italian_spanish
- callba HandleFrenchGermanMail
+ farcall HandleFrenchGermanMail
jr .next
.italian_spanish
cp $2
jr nc, .next
- callba HandleSpanishItalianMail
+ farcall HandleSpanishItalianMail
.next
pop de
@@ -993,7 +993,7 @@
push bc
push de
ld [wd265], a
- callab ConvertMon_1to2
+ callfar ConvertMon_1to2
pop de
pop bc
ld a, [wd265]
@@ -1195,7 +1195,7 @@
InitTradeMenuDisplay: ; 287e3
call ClearScreen
call LoadTradeScreenBorder
- callba InitTradeSpeciesList
+ farcall InitTradeSpeciesList
xor a
ld hl, wOtherPlayerLinkMode
ld [hli], a
@@ -1232,7 +1232,7 @@
ld [w2DMenuFlags2], a
LinkTradeOTPartymonMenuLoop: ; 28835
- callba LinkTradeMenu
+ farcall LinkTradeMenu
ld a, d
and a
jp z, LinkTradePartiesMenuMasterLoop
@@ -1240,9 +1240,9 @@
jr z, .not_a_button
ld a, $1
ld [wInitListType], a
- callab InitList
+ callfar InitList
ld hl, OTPartyMon1Species
- callba LinkMonStatsScreen
+ farcall LinkMonStatsScreen
jp LinkTradePartiesMenuMasterLoop
.not_a_button
@@ -1274,7 +1274,7 @@
; 2888b
LinkTrade_PlayerPartyMenu: ; 2888b
- callba InitMG_Mobile_LinkTradePalMap
+ farcall InitMG_Mobile_LinkTradePalMap
xor a
ld [MonType], a
ld a, A_BUTTON | D_UP | D_DOWN
@@ -1298,7 +1298,7 @@
call WaitBGMap2
LinkTradePartymonMenuLoop: ; 288c5
- callba LinkTradeMenu
+ farcall LinkTradeMenu
ld a, d
and a
jr nz, .check_joypad
@@ -1366,7 +1366,7 @@
hlcoord 2, 16
ld de, .String_Stats_Trade
call PlaceString
- callba Link_WaitBGMap
+ farcall Link_WaitBGMap
.joy_loop
ld a, " "
@@ -1433,8 +1433,8 @@
ld [wMenuCursorY], a
ld a, $4
ld [wInitListType], a
- callab InitList
- callba LinkMonStatsScreen
+ callfar InitList
+ farcall LinkMonStatsScreen
call Call_LoadTempTileMapToTileMap
hlcoord 6, 1
lb bc, 6, 1
@@ -1453,7 +1453,7 @@
dec a
ld [wd002], a
ld [wPlayerLinkAction], a
- callba Function16d6ce
+ farcall Function16d6ce
ld a, [wOtherPlayerLinkMode]
cp $f
jp z, InitTradeMenuDisplay
@@ -1461,9 +1461,9 @@
call Function28b68
ld c, 100
call DelayFrames
- callba ValidateOTTrademon
+ farcall ValidateOTTrademon
jr c, .abnormal
- callba Functionfb5dd
+ farcall Functionfb5dd
jp nc, LinkTrade
xor a
ld [wcf57], a
@@ -1472,7 +1472,7 @@
ld b, 4
ld c, 18
call Predef_LinkTextbox
- callba Link_WaitBGMap
+ farcall Link_WaitBGMap
ld hl, .Text_CantTradeLastMon
bccoord 1, 14
call PlaceHLTextAtBC
@@ -1494,7 +1494,7 @@
ld b, 4
ld c, 18
call Predef_LinkTextbox
- callba Link_WaitBGMap
+ farcall Link_WaitBGMap
ld hl, .Text_Abnormal
bccoord 1, 14
call PlaceHLTextAtBC
@@ -1509,7 +1509,7 @@
call PlaceString
ld a, $1
ld [wPlayerLinkAction], a
- callba Function16d6ce
+ farcall Function16d6ce
ld c, 100
call DelayFrames
jp InitTradeMenuDisplay
@@ -1575,7 +1575,7 @@
ldcoord_a 9, 17
ld a, $f
ld [wPlayerLinkAction], a
- callba Function16d6ce
+ farcall Function16d6ce
ld a, [wOtherPlayerLinkMode]
cp $f
jr nz, .loop1
@@ -1650,7 +1650,7 @@
ld b, $4
ld c, $12
call Predef_LinkTextbox
- callba Link_WaitBGMap
+ farcall Link_WaitBGMap
ld a, [wd002]
ld hl, PartySpecies
ld c, a
@@ -1700,7 +1700,7 @@
ld a, 1
ld [wMenuCursorY], a
ld [wMenuCursorX], a
- callba Link_WaitBGMap
+ farcall Link_WaitBGMap
call ScrollingMenuJoypad
push af
call Call_ExitMenu
@@ -1722,13 +1722,13 @@
hlcoord 1, 14
ld de, String_TooBadTheTradeWasCanceled
call PlaceString
- callba Function16d6ce
+ farcall Function16d6ce
jp Function28ea3
.asm_28c54
ld a, $2
ld [wPlayerLinkAction], a
- callba Function16d6ce
+ farcall Function16d6ce
ld a, [wOtherPlayerLinkMode]
dec a
jr nz, .asm_28c7b
@@ -1817,7 +1817,7 @@
call GetPartyLocation
ld b, h
ld c, l
- callba GetCaughtGender
+ farcall GetCaughtGender
ld a, c
ld [wPlayerTrademonCaughtData], a
ld hl, OTPlayerName
@@ -1856,7 +1856,7 @@
call GetPartyLocation
ld b, h
ld c, l
- callba GetCaughtGender
+ farcall GetCaughtGender
ld a, c
ld [wOTTrademonCaughtData], a
ld a, [wd002]
@@ -1869,7 +1869,7 @@
ld [wd002], a
xor a
ld [wPokemonWithdrawDepositParameter], a
- callab RemoveMonFromPartyOrBox
+ callfar RemoveMonFromPartyOrBox
ld a, [PartyCount]
dec a
ld [CurPartyMon], a
@@ -1918,11 +1918,11 @@
ld a, [PartyCount]
dec a
ld [CurPartyMon], a
- callab EvolvePokemon
+ callfar EvolvePokemon
call ClearScreen
call LoadTradeScreenBorder
call SetTradeRoomBGPals
- callba Link_WaitBGMap
+ farcall Link_WaitBGMap
ld b, $1
pop af
ld c, a
@@ -1957,9 +1957,9 @@
jr nz, .loop
.save
- callba SaveAfterLinkTrade
- callba TrainerRankings_Trades
- callba BackupMobileEventIndex
+ farcall SaveAfterLinkTrade
+ farcall TrainerRankings_Trades
+ farcall BackupMobileEventIndex
ld c, 40
call DelayFrames
hlcoord 0, 12
@@ -1969,7 +1969,7 @@
hlcoord 1, 14
ld de, String28ebd
call PlaceString
- callba Link_WaitBGMap
+ farcall Link_WaitBGMap
ld c, 50
call DelayFrames
ld a, [wLinkMode]
@@ -2005,17 +2005,17 @@
Predef_LinkTextbox: ; 28eef
ld d, h
ld e, l
- callba LinkTextbox
+ farcall LinkTextbox
ret
; 28ef8
LoadTradeScreenBorder: ; 28ef8
- callba _LoadTradeScreenBorder
+ farcall _LoadTradeScreenBorder
ret
; 28eff
SetTradeRoomBGPals: ; 28eff
- callba LoadTradeRoomBGPals_ ; just a nested farcall; so wasteful
+ farcall LoadTradeRoomBGPals_ ; just a nested farcall; so wasteful
call SetPalettes
ret
; 28f09
@@ -2030,7 +2030,7 @@
ld b, 6
ld c, 18
call Predef_LinkTextbox
- callba PlaceTradePartnerNamesAndParty
+ farcall PlaceTradePartnerNamesAndParty
ret
; 28f24
@@ -2064,7 +2064,7 @@
push hl
push bc
ld d, [hl]
- callba ItemIsMail
+ farcall ItemIsMail
pop bc
pop hl
jr c, .mon_has_mail
@@ -2435,7 +2435,7 @@
Special_TryQuickSave: ; 29e66
ld a, [wd265]
push af
- callba Link_SaveGame
+ farcall Link_SaveGame
ld a, $1
jr nc, .return_result
xor a
@@ -2479,7 +2479,7 @@
ld a, LINK_TIMECAPSULE
ld [wLinkMode], a
call DisableSpriteUpdates
- callab LinkCommunications
+ callfar LinkCommunications
call EnableSpriteUpdates
xor a
ld [hVBlank], a
@@ -2490,7 +2490,7 @@
ld a, LINK_TRADECENTER
ld [wLinkMode], a
call DisableSpriteUpdates
- callab LinkCommunications
+ callfar LinkCommunications
call EnableSpriteUpdates
xor a
ld [hVBlank], a
@@ -2501,7 +2501,7 @@
ld a, LINK_COLOSSEUM
ld [wLinkMode], a
call DisableSpriteUpdates
- callab LinkCommunications
+ callfar LinkCommunications
call EnableSpriteUpdates
xor a
ld [hVBlank], a
--- a/engine/link_trade.asm
+++ b/engine/link_trade.asm
@@ -23,8 +23,8 @@
call ClearBGPalettes
call ClearTileMap
call ClearSprites
- callba __LoadTradeScreenBorder ; useless to farcall
- callba Function16d42e ; useless to farcall
+ farcall __LoadTradeScreenBorder ; useless to farcall
+ farcall Function16d42e ; useless to farcall
ld b, SCGB_DIPLOMA
call GetSGBLayout
call SetPalettes
@@ -119,8 +119,8 @@
InitTradeSpeciesList: ; 16d673
call _LoadTradeScreenBorder
call Function16d6ae
- callba InitMG_Mobile_LinkTradePalMap
- callba PlaceTradePartnerNamesAndParty
+ farcall InitMG_Mobile_LinkTradePalMap
+ farcall PlaceTradePartnerNamesAndParty
hlcoord 10, 17
ld de, .CANCEL
call PlaceString
@@ -146,7 +146,7 @@
; 16d6a7
LoadTradeRoomBGPals_: ; 16d6a7
- callba LoadTradeRoomBGPals
+ farcall LoadTradeRoomBGPals
ret
; 16d6ae
@@ -171,7 +171,7 @@
Function16d6ce: ; 16d6ce
call LoadStandardMenuDataHeader
call Function16d6e1
- callba WaitLinkTransfer
+ farcall WaitLinkTransfer
call Call_ExitMenu
call WaitBGMap2
ret
@@ -233,7 +233,7 @@
call .UpdateBGMapAndOAM
call .loop2
jr nc, .done
- callba _2DMenuInterpretJoypad
+ farcall _2DMenuInterpretJoypad
jr c, .done
ld a, [w2DMenuFlags1]
bit 7, a
@@ -352,7 +352,7 @@
ld a, [w2DMenuFlags1]
bit 6, a
jr z, .skip_anims
- callba PlaySpriteAnimationsAndDelayFrame
+ farcall PlaySpriteAnimationsAndDelayFrame
.skip_anims
call JoyTextDelay
call .GetJoypad
--- a/engine/mail.asm
+++ b/engine/mail.asm
@@ -2,7 +2,7 @@
ld a, MON_ITEM
call GetPartyParamLocation
ld d, [hl]
- callba ItemIsMail
+ farcall ItemIsMail
jr nc, .full
call GetMailboxCount
cp MAILBOX_CAPACITY
@@ -80,7 +80,7 @@
call AddNTimes
ld d, h
ld e, l
- callba ReadAnyMail
+ farcall ReadAnyMail
ret
MoveMailFromPCToParty: ; 44607
@@ -127,7 +127,7 @@
CheckPokeItem:: ; 44654
push bc
push de
- callba SelectMonFromParty
+ farcall SelectMonFromParty
ld a, $2
jr c, .pop_return
@@ -136,7 +136,7 @@
ld bc, PARTYMON_STRUCT_LENGTH
call AddNTimes
ld d, [hl]
- callba ItemIsMail
+ farcall ItemIsMail
ld a, $3
jr nc, .pop_return
@@ -172,12 +172,12 @@
jr nz, .loop
.done
- callba CheckCurPartyMonFainted
+ farcall CheckCurPartyMonFainted
ld a, $4
jr c, .close_sram_return
xor a
ld [wPokemonWithdrawDepositParameter], a
- callba RemoveMonFromPartyOrBox
+ farcall RemoveMonFromPartyOrBox
ld a, $1
.close_sram_return
@@ -296,7 +296,7 @@
ld d, [hl]
push hl
push de
- callba ItemIsMail
+ farcall ItemIsMail
pop de
pop hl
ret c
@@ -503,15 +503,15 @@
ld [PartyMenuActionText], a
call ClearBGPalettes
.try_again
- callba LoadPartyMenuGFX
- callba InitPartyMenuWithCancel
- callba InitPartyMenuGFX
- callba WritePartyMenuTilemap
- callba PrintPartyMenuText
+ farcall LoadPartyMenuGFX
+ farcall InitPartyMenuWithCancel
+ farcall InitPartyMenuGFX
+ farcall WritePartyMenuTilemap
+ farcall PrintPartyMenuText
call WaitBGMap
call SetPalettes
call DelayFrame
- callba PartyMenuSelect
+ farcall PartyMenuSelect
jr c, .exit2
ld a, [CurPartySpecies]
cp EGG
--- a/engine/main_menu.asm
+++ b/engine/main_menu.asm
@@ -271,7 +271,7 @@
decoord 4, 16
ld a, [hHours]
ld c, a
- callba PrintHour
+ farcall PrintHour
ld [hl], ":"
inc hl
ld de, hMinutes
@@ -341,21 +341,21 @@
MainMenu_NewGame: ; 49ee0
- callba NewGame
+ farcall NewGame
ret
; 49ee7
MainMenu_Options: ; 49ee7
- callba OptionsMenu
+ farcall OptionsMenu
ret
; 49eee
MainMenu_Continue: ; 49eee
- callba Continue
+ farcall Continue
ret
; 49ef5
MainMenu_MysteryGift: ; 49ef5
- callba MysteryGift
+ farcall MysteryGift
ret
; 49efc
--- a/engine/map_objects.asm
+++ b/engine/map_objects.asm
@@ -1699,7 +1699,7 @@
add hl, bc
ld a, [hl]
ld b, a
- callba CopyDECoordsToMapObject
+ farcall CopyDECoordsToMapObject
pop bc
ld hl, OBJECT_FLAGS2
add hl, bc
@@ -2177,7 +2177,7 @@
ret nc
ld d, h
ld e, l
- callba CopyTempObjectToObjectStruct
+ farcall CopyTempObjectToObjectStruct
ret
; 55b9
@@ -2306,7 +2306,7 @@
call Function56a3
jr c, SetFacing_Standing
call Function5688
- callba Function4440
+ farcall Function4440
xor a
ret
; 5673
@@ -2314,7 +2314,7 @@
Function5673: ; 5673
call Function56a3
jr c, SetFacing_Standing
- callba Function4440 ; no need to farcall
+ farcall Function4440 ; no need to farcall
xor a
ret
; 5680
@@ -2340,7 +2340,7 @@
ld hl, OBJECT_NEXT_TILE
add hl, bc
ld [hl], a
- callba UpdateTallGrassFlags ; no need to farcall
+ farcall UpdateTallGrassFlags ; no need to farcall
ret
; 56a3
@@ -2527,7 +2527,7 @@
ld [wPlayerTurningDirection], a
ld [PlayerObjectStepFrame], a
call .TryResetPlayerAction
- callba CheckWarpFacingDown
+ farcall CheckWarpFacingDown
call c, SpawnInFacingDown
call .SpawnInCustomFacing
ret
@@ -2596,7 +2596,7 @@
ret c
ld a, c
call SetFollowerIfVisible
- callba QueueFollowerFirstStep
+ farcall QueueFollowerFirstStep
ret
; 5815
@@ -2642,7 +2642,7 @@
cp -1
ret z
call GetObjectStruct
- callba Function58e3 ; no need to bankswitch
+ farcall Function58e3 ; no need to bankswitch
ld a, -1
ld [wObjectFollow_Follower], a
ret
--- a/engine/map_setup.asm
+++ b/engine/map_setup.asm
@@ -308,8 +308,8 @@
LoadObjectsRunCallback_02: ; 154d7
ld a, MAPCALLBACK_OBJECTS
call RunMapCallback
- callba LoadObjectMasks
- callba InitializeVisibleSprites
+ farcall LoadObjectMasks
+ farcall InitializeVisibleSprites
ret
; 154ea (5:54ea)
@@ -409,7 +409,7 @@
; 1556d
RetainOldPalettes: ; 1556d
- callba _UpdateTimePals
+ farcall _UpdateTimePals
ret
RotatePalettesRightMapAndMusic: ; 15574
--- a/engine/mart.asm
+++ b/engine/mart.asm
@@ -252,7 +252,7 @@
; Return the price of item a in BCD at hl and in tiles at StringBuffer1.
push hl
ld [CurItem], a
- callba GetItemPrice
+ farcall GetItemPrice
pop hl
GetMartPrice: ; 15bf0
@@ -344,7 +344,7 @@
BuyMenu: ; 15c62
call FadeToMenu
- callba BlankScreen
+ farcall BlankScreen
xor a
ld [wMenuScrollPositionBackup], a
ld a, 1
@@ -443,7 +443,7 @@
BuyMenuLoop: ; 15cef
- callba PlaceMoneyTopRight
+ farcall PlaceMoneyTopRight
call UpdateSprites
ld hl, MenuDataHeader_Buy
call CopyMenuDataHeader
@@ -519,7 +519,7 @@
ld [wItemQuantityBuffer], a
ld a, MARTTEXT_HOW_MANY
call LoadBuyMenuText
- callba SelectQuantityToBuy
+ farcall SelectQuantityToBuy
call ExitMenu
ret
; 15d97
@@ -579,7 +579,7 @@
call .GetSalePrice
ld a, 99
ld [wItemQuantityBuffer], a
- callba RooftopSale_SelectQuantityToBuy
+ farcall RooftopSale_SelectQuantityToBuy
call ExitMenu
ret
; 15df9
@@ -782,9 +782,9 @@
SellMenu: ; 15eb3
call DisableSpriteUpdates
- callba DepositSellInitPackBuffers
+ farcall DepositSellInitPackBuffers
.loop
- callba DepositSellPack
+ farcall DepositSellPack
ld a, [wcf66]
and a
jp z, .quit
@@ -812,7 +812,7 @@
.TryToSellItem: ; 15ee0
- callba CheckItemMenu
+ farcall CheckItemMenu
ld a, [wItemAttributeParamBuffer]
ld hl, .dw
rst JumpTable
@@ -835,7 +835,7 @@
.try_sell ; 15efd
- callba _CheckTossableItem
+ farcall _CheckTossableItem
ld a, [wItemAttributeParamBuffer]
and a
jr z, .okay_to_sell
@@ -847,8 +847,8 @@
.okay_to_sell
ld hl, Text_Mart_SellHowMany
call PrintText
- callba PlaceMoneyAtTopLeftOfTextbox
- callba SelectQuantityToSell
+ farcall PlaceMoneyAtTopLeftOfTextbox
+ farcall SelectQuantityToSell
call ExitMenu
jr c, .declined
hlcoord 1, 14
@@ -871,7 +871,7 @@
ld hl, Text_Mart_SoldForAmount
call PrintTextBoxText
call PlayTransactionSound
- callba PlaceMoneyBottomLeft
+ farcall PlaceMoneyBottomLeft
call JoyWaitAorB
.declined
--- a/engine/menu.asm
+++ b/engine/menu.asm
@@ -16,7 +16,7 @@
rst FarCall
call Draw2DMenu
- callba MobileTextBorder
+ farcall MobileTextBorder
call UpdateSprites
call ApplyTilemap
call Get2DMenuSelection
@@ -29,7 +29,7 @@
rst FarCall
call Draw2DMenu
- callba MobileTextBorder
+ farcall MobileTextBorder
call UpdateSprites
call ApplyTilemap
call Init2DMenuCursorPosition
@@ -37,7 +37,7 @@
set 7, [hl]
.loop
call DelayFrame
- callba Function10032e
+ farcall Function10032e
ld a, [wcd2b]
and a
jr nz, .quit
@@ -322,7 +322,7 @@
call AdvanceMobileInactivityTimerAndCheckExpired ; BUG: This function is in another bank.
; Pointer in current bank (9) is bogus.
ret c
- callba Function100337
+ farcall Function100337
ret c
ld a, [w2DMenuFlags1]
bit 7, a
@@ -382,7 +382,7 @@
ld a, [w2DMenuFlags1]
bit 6, a
jr z, .skip_to_joypad
- callab PlaySpriteAnimationsAndDelayFrame
+ callfar PlaySpriteAnimationsAndDelayFrame
.skip_to_joypad
call JoyTextDelay
--- a/engine/menu_2.asm
+++ b/engine/menu_2.asm
@@ -11,7 +11,7 @@
push de
ld a, [MenuSelection]
ld [CurItem], a
- callba _CheckTossableItem
+ farcall _CheckTossableItem
ld a, [wItemAttributeParamBuffer]
pop hl
and a
--- a/engine/mon_icons.asm
+++ b/engine/mon_icons.asm
@@ -66,7 +66,7 @@
push hl
push bc
ld d, a
- callab ItemIsMail
+ callfar ItemIsMail
pop bc
pop hl
jr c, .not_mail
@@ -140,7 +140,7 @@
push hl
push bc
ld d, a
- callab ItemIsMail
+ callfar ItemIsMail
pop bc
pop hl
jr c, .mail
@@ -204,7 +204,7 @@
ret
.getspeed ; 8e94c (23:694c)
- callba PlacePartymonHPBar
+ farcall PlacePartymonHPBar
call GetHPPal
ld e, d
ld d, 0
--- a/engine/mon_menu.asm
+++ b/engine/mon_menu.asm
@@ -39,7 +39,7 @@
xor a
ld [hBGMapMode], a
call GetMonSubmenuItems
- callba FreezeMonIcons
+ farcall FreezeMonIcons
ld hl, .MenuDataHeader
call LoadMenuDataHeader
call .GetTopCoord
@@ -202,7 +202,7 @@
ld a, MON_ITEM
call GetPartyParamLocation
ld d, [hl]
- callba ItemIsMail
+ farcall ItemIsMail
pop hl
ld a, MONMENU_MAIL
jr c, .ok
--- a/engine/mon_stats.asm
+++ b/engine/mon_stats.asm
@@ -276,7 +276,7 @@
push af
ld [hl], b
push hl
- callab GetMaxPPOfMove
+ callfar GetMaxPPOfMove
pop hl
pop af
ld [hl], a
--- a/engine/move_mon.asm
+++ b/engine/move_mon.asm
@@ -136,7 +136,7 @@
push de
ld a, [CurPartyLevel]
ld d, a
- callab CalcExpAtLevel
+ callfar CalcExpAtLevel
pop de
ld a, [hProduct + 1]
ld [de], a
@@ -160,7 +160,7 @@
and $f
jr z, .generateDVs
push hl
- callba GetTrainerDVs
+ farcall GetTrainerDVs
pop hl
jr .initializetrainermonstats
@@ -312,7 +312,7 @@
ld bc, PARTYMON_STRUCT_LENGTH
call AddNTimes
predef GetUnownLetter
- callab UpdateUnownDex
+ callfar UpdateUnownDex
.done
scf ; When this function returns, the carry flag indicates success vs failure.
@@ -423,7 +423,7 @@
ld bc, PARTYMON_STRUCT_LENGTH
call AddNTimes
predef GetUnownLetter
- callab UpdateUnownDex
+ callfar UpdateUnownDex
ld a, [wFirstUnownSeen]
and a
jr nz, .done
@@ -598,7 +598,7 @@
add $2
ld [MonType], a
predef CopyPkmnToTempMon
- callab CalcLevel
+ callfar CalcLevel
ld a, d
ld [CurPartyLevel], a
pop hl
@@ -708,7 +708,7 @@
push bc
push hl
push de
- callba GetMaxPPOfMove
+ farcall GetMaxPPOfMove
pop de
pop hl
ld a, [wd265]
@@ -844,10 +844,10 @@
ld a, [PartyCount]
dec a
ld [CurPartyMon], a
- callba HealPartyMon
+ farcall HealPartyMon
ld a, [CurPartyLevel]
ld d, a
- callab CalcExpAtLevel
+ callfar CalcExpAtLevel
pop bc
ld hl, $8
add hl, bc
@@ -961,7 +961,7 @@
push de
ld a, [CurPartyLevel]
ld d, a
- callab CalcExpAtLevel
+ callfar CalcExpAtLevel
pop de
ld a, [hProduct + 1]
ld [de], a
@@ -1011,7 +1011,7 @@
jr nz, .not_unown
ld hl, sBoxMon1DVs
predef GetUnownLetter
- callab UpdateUnownDex
+ callfar UpdateUnownDex
.not_unown
ld hl, sBoxMon1Moves
@@ -1089,8 +1089,8 @@
GiveEgg:: ; df8c
ld a, [CurPartySpecies]
push af
- callab GetPreEvolution
- callab GetPreEvolution
+ callfar GetPreEvolution
+ callfar GetPreEvolution
ld a, [CurPartySpecies]
dec a
@@ -1433,7 +1433,7 @@
ld a, [hld]
ld e, a
ld d, [hl]
- callba GetSquareRoot
+ farcall GetSquareRoot
pop de
.no_stat_exp
@@ -1625,7 +1625,7 @@
.failed
ld a, [CurPartySpecies]
ld [TempEnemyMonSpecies], a
- callab LoadEnemyMon
+ callfar LoadEnemyMon
call SentPkmnIntoBox
jp nc, .FailedToGiveMon
ld a, BOXMON
@@ -1706,7 +1706,7 @@
ld [hli], a
ld [hl], 01001 % $100
pop bc
- callba SetGiftPartyMonCaughtData
+ farcall SetGiftPartyMonCaughtData
jr .skip_nickname
.send_to_box
@@ -1730,7 +1730,7 @@
call Random
ld [hl], a
call CloseSRAM
- callba SetGiftBoxMonCaughtData
+ farcall SetGiftBoxMonCaughtData
jr .skip_nickname
.wildmon
@@ -1741,13 +1741,13 @@
ld a, b
and a
jr z, .party
- callba SetBoxMonCaughtData
+ farcall SetBoxMonCaughtData
jr .set_caught_data
.party
- callba SetCaughtData
+ farcall SetCaughtData
.set_caught_data
- callba GiveANickname_YesNo
+ farcall GiveANickname_YesNo
pop de
jr c, .skip_nickname
call InitNickname
@@ -1791,7 +1791,7 @@
pop de
push de
ld b, $0
- callba NamingScreen
+ farcall NamingScreen
pop hl
ld de, StringBuffer1
call InitName
--- a/engine/move_mon_wo_mail.asm
+++ b/engine/move_mon_wo_mail.asm
@@ -34,7 +34,7 @@
call CopyBytes
ld a, [CurPartyMon]
ld b, a
- callba RestorePPofDepositedPokemon
+ farcall RestorePPofDepositedPokemon
jp CloseSRAM
InsertPokemonIntoParty: ; 5138b
--- a/engine/mystery_gift.asm
+++ b/engine/mystery_gift.asm
@@ -7,7 +7,7 @@
ld de, .String_PressAToLink_BToCancel
call PlaceString
call WaitBGMap
- callba PrepMysteryGiftDataToSend
+ farcall PrepMysteryGiftDataToSend
call MysteryGift_ClearTrainerData
ld a, $2
ld [wca01], a
@@ -62,9 +62,9 @@
cp 4
jr z, .skip_append_save
call .SaveMysteryGiftTrainerName
- callba RestoreMobileEventIndex
- callba TrainerRankings_MysteryGift
- callba BackupMobileEventIndex
+ farcall RestoreMobileEventIndex
+ farcall TrainerRankings_MysteryGift
+ farcall BackupMobileEventIndex
.skip_append_save
ld a, [wMysteryGiftPartnerSentDeco]
and a
@@ -71,12 +71,12 @@
jr z, .item
ld a, [wMysteryGiftPartnerWhichDeco]
ld c, a
- callba MysteryGiftGetDecoration
+ farcall MysteryGiftGetDecoration
push bc
call MysteryGift_CheckAndSetDecorationAlreadyReceived
pop bc
jr nz, .item
- callab GetDecorationName_c
+ callfar GetDecorationName_c
ld h, d
ld l, e
ld de, StringBuffer1
@@ -89,7 +89,7 @@
call GetMysteryGiftBank
ld a, [wMysteryGiftPartnerWhichItem]
ld c, a
- callba MysteryGiftGetItemHeldEffect
+ farcall MysteryGiftGetItemHeldEffect
ld a, c
ld [sBackupMysteryGiftItem], a
ld [wNamedObjectIndexBuffer], a
@@ -237,7 +237,7 @@
Function104a95: ; 104a95 (41:4a95)
di
- callba ClearChannels
+ farcall ClearChannels
call Function104d5e
.loop2
@@ -421,7 +421,7 @@
ld a, [wMysteryGiftTrainerData]
cp $3
jr nc, .quit
- callba StagePartyDataForMysteryGift
+ farcall StagePartyDataForMysteryGift
call MysteryGift_ClearTrainerData
ld a, $26
ld [wca02], a
@@ -453,7 +453,7 @@
Function104c2d: ; 104c2d (41:4c2d)
di
- callba ClearChannels
+ farcall ClearChannels
call Function104d5e
.asm_104c37
call Function104d96
@@ -1148,7 +1148,7 @@
pop bc
jr z, .skip
push bc
- callab SetSpecificDecorationFlag
+ callfar SetSpecificDecorationFlag
pop bc
.skip
inc c
@@ -1447,7 +1447,7 @@
ld hl, Text_ReceivedCard
call PrintText
ld de, wMysteryGiftTrainerData
- callba Function8ac70
+ farcall Function8ac70
ld a, c
ld [wd265], a
ld hl, Text_CardNotRegistered
@@ -1663,7 +1663,7 @@
call EnableLCD
call WaitBGMap
ld b, $2
- callba GetMysteryGift_MobileAdapterLayout
+ farcall GetMysteryGift_MobileAdapterLayout
jp SetPalettes
.Load6Row: ; 1058c6 (41:58c6)
--- a/engine/namingscreen.asm
+++ b/engine/namingscreen.asm
@@ -103,7 +103,7 @@
inc de
hlcoord 5, 4
call PlaceString
- callba GetGender
+ farcall GetGender
jr c, .genderless
ld a, "♂"
jr nz, .place_gender
@@ -124,7 +124,7 @@
; 1178d
.Player: ; 1178d (4:578d)
- callba GetPlayerIcon
+ farcall GetPlayerIcon
call .LoadSprite
hlcoord 5, 2
ld de, .PlayerNameString
@@ -352,7 +352,7 @@
bit 7, a
jr nz, .quit
call .RunJumptable
- callba PlaySpriteAnimationsAndDelayFrame
+ farcall PlaySpriteAnimationsAndDelayFrame
call .UpdateStringEntry
call DelayFrame
and a
@@ -359,7 +359,7 @@
ret
.quit
- callab ClearSpriteAnims
+ callfar ClearSpriteAnims
call ClearSprites
xor a
ld [hSCX], a
@@ -900,7 +900,7 @@
LoadNamingScreenGFX: ; 11c51
call ClearSprites
- callab ClearSpriteAnims
+ callfar ClearSpriteAnims
call LoadStandardFont
call LoadFontsExtra
@@ -1096,7 +1096,7 @@
bit 7, a
jr nz, .exit_mail
call .DoJumptable
- callba PlaySpriteAnimationsAndDelayFrame
+ farcall PlaySpriteAnimationsAndDelayFrame
call .Update
call DelayFrame
and a
@@ -1103,7 +1103,7 @@
ret
.exit_mail
- callab ClearSpriteAnims
+ callfar ClearSpriteAnims
call ClearSprites
xor a
ld [hSCX], a
--- a/engine/new_pokedex_entry.asm
+++ b/engine/new_pokedex_entry.asm
@@ -15,11 +15,11 @@
ld [hSCX], a
xor a
ld [wPokedexStatus], a
- callba _NewPokedexEntry
+ farcall _NewPokedexEntry
call WaitPressAorB_BlinkCursor
ld a, $1
ld [wPokedexStatus], a
- callba DisplayDexEntry
+ farcall DisplayDexEntry
call WaitPressAorB_BlinkCursor
pop af
ld [wPokedexStatus], a
@@ -38,9 +38,9 @@
call ClearTileMap
call LoadFontsExtra
call LoadStandardFont
- callba Pokedex_PlaceFrontpicTopLeftCorner
+ farcall Pokedex_PlaceFrontpicTopLeftCorner
call WaitBGMap2
- callba GetEnemyMonDVs
+ farcall GetEnemyMonDVs
ld a, [hli]
ld [TempMonDVs], a
ld a, [hl]
--- a/engine/npctrade.asm
+++ b/engine/npctrade.asm
@@ -24,7 +24,7 @@
; Select givemon from party
ld b, PARTYMENUACTION_GIVE_MON
- callba SelectTradeOrDayCareMon
+ farcall SelectTradeOrDayCareMon
ld a, TRADE_CANCEL
jr c, .done
@@ -88,12 +88,12 @@
cp 1
jr z, .check_male
- callba GetGender
+ farcall GetGender
jr nz, .not_matching
jr .matching
.check_male
- callba GetGender
+ farcall GetGender
jr z, .not_matching
.matching
@@ -171,7 +171,7 @@
call Trade_GetAttributeOfCurrentPartymon
ld b, h
ld c, l
- callba GetCaughtGender
+ farcall GetCaughtGender
ld a, c
ld [wPlayerTrademonCaughtData], a
@@ -195,7 +195,7 @@
xor a
ld [MonType], a
ld [wPokemonWithdrawDepositParameter], a
- callab RemoveMonFromPartyOrBox
+ callfar RemoveMonFromPartyOrBox
predef TryAddMonToParty
ld e, TRADE_DIALOG
@@ -206,7 +206,7 @@
jr c, .incomplete
ld b, SET_FLAG
.incomplete
- callba SetGiftPartyMonCaughtData
+ farcall SetGiftPartyMonCaughtData
ld e, TRADE_NICK
call GetTradeAttribute
@@ -275,7 +275,7 @@
ld a, [PartyCount]
dec a
ld [CurPartyMon], a
- callba ComputeNPCTrademonStats
+ farcall ComputeNPCTrademonStats
pop af
ld [CurPartyMon], a
pop hl
--- a/engine/odd_eggs.asm
+++ b/engine/odd_eggs.asm
@@ -86,7 +86,7 @@
ld [wMobileMonNicknamePointerBuffer], a
ld a, wOddEggName / $100
ld [wMobileMonNicknamePointerBuffer + 1], a
- callba AddMobileMonToParty
+ farcall AddMobileMonToParty
ret
; 1fb546
--- a/engine/overworld.asm
+++ b/engine/overworld.asm
@@ -178,7 +178,7 @@
ret nz
ld c, EMOTE_SHADOW
- callba LoadEmote
+ farcall LoadEmote
call GetMapPermission
call CheckOutdoorMap
ld c, EMOTE_GRASS_RUSTLE
@@ -185,7 +185,7 @@
jr z, .outdoor
ld c, EMOTE_BOULDER_DUST
.outdoor
- callba LoadEmote
+ farcall LoadEmote
ret
; 14236
@@ -265,7 +265,7 @@
and a
jr z, .NoBreedmon
- callba LoadOverworldMonIcon
+ farcall LoadOverworldMonIcon
ld l, 1
ld h, 0
--- a/engine/pack.asm
+++ b/engine/pack.asm
@@ -118,12 +118,12 @@
ret
.TMHMPocketMenu: ; 100e8 (4:40e8)
- callba TMHMPocket
+ farcall TMHMPocket
ld b, $5
ld c, $1
call Pack_InterpretJoypad
ret c
- callba _CheckTossableItem
+ farcall _CheckTossableItem
ld a, [wItemAttributeParamBuffer]
and a
jr nz, .use_quit
@@ -192,15 +192,15 @@
; 10159
.UseItem: ; 10159
- callba AskTeachTMHM
+ farcall AskTeachTMHM
ret c
- callba ChooseMonToLearnTMHM
+ farcall ChooseMonToLearnTMHM
jr c, .declined
ld hl, Options
ld a, [hl]
push af
res NO_TEXT_SCROLL, [hl]
- callba TeachTMHM
+ farcall TeachTMHM
pop af
ld [Options], a
.declined
@@ -240,15 +240,15 @@
ret
.ItemBallsKey_LoadSubmenu: ; 101c5 (4:41c5)
- callba _CheckTossableItem
+ farcall _CheckTossableItem
ld a, [wItemAttributeParamBuffer]
and a
jr nz, .tossable
- callba CheckSelectableItem
+ farcall CheckSelectableItem
ld a, [wItemAttributeParamBuffer]
and a
jr nz, .selectable
- callba CheckItemMenu
+ farcall CheckItemMenu
ld a, [wItemAttributeParamBuffer]
and a
jr nz, .usable
@@ -255,7 +255,7 @@
jr .unusable
.selectable
- callba CheckItemMenu
+ farcall CheckItemMenu
ld a, [wItemAttributeParamBuffer]
and a
jr nz, .selectable_usable
@@ -262,7 +262,7 @@
jr .selectable_unusable
.tossable
- callba CheckSelectableItem
+ farcall CheckSelectableItem
ld a, [wItemAttributeParamBuffer]
and a
jr nz, .tossable_selectable
@@ -455,7 +455,7 @@
; 10311
UseItem: ; 10311
- callba CheckItemMenu
+ farcall CheckItemMenu
ld a, [wItemAttributeParamBuffer]
ld hl, .dw
rst JumpTable
@@ -512,7 +512,7 @@
TossMenu: ; 10364
ld hl, Text_ThrowAwayHowMany
call Pack_PrintTextNoScroll
- callba SelectQuantityToToss
+ farcall SelectQuantityToToss
push af
call ExitMenu
pop af
@@ -566,7 +566,7 @@
; 103c2
RegisterItem: ; 103c2
- callba CheckSelectableItem
+ farcall CheckSelectableItem
ld a, [wItemAttributeParamBuffer]
and a
jr nz, .cant_register
@@ -606,16 +606,16 @@
ld a, PARTYMENUACTION_GIVE_ITEM
ld [PartyMenuActionText], a
call ClearBGPalettes
- callba LoadPartyMenuGFX
- callba InitPartyMenuWithCancel
- callba InitPartyMenuGFX
+ farcall LoadPartyMenuGFX
+ farcall InitPartyMenuWithCancel
+ farcall InitPartyMenuGFX
.loop
- callba WritePartyMenuTilemap
- callba PrintPartyMenuText
+ farcall WritePartyMenuTilemap
+ farcall PrintPartyMenuText
call WaitBGMap
call SetPalettes
call DelayFrame
- callba PartyMenuSelect
+ farcall PartyMenuSelect
jr c, .finish
ld a, [CurPartySpecies]
cp EGG
@@ -786,7 +786,7 @@
ret
.TMHMPocketMenu: ; 10581 (4:4581)
- callba TMHMPocket
+ farcall TMHMPocket
ld b, $5
ld c, $1
call Pack_InterpretJoypad
@@ -824,7 +824,7 @@
ret
ItemSubmenu: ; 105d3 (4:45d3)
- callba CheckItemContext
+ farcall CheckItemContext
ld a, [wItemAttributeParamBuffer]
TMHMSubmenu: ; 105dc (4:45dc)
and a
@@ -890,7 +890,7 @@
; 10629
.Use: ; 10629
- callba CheckItemContext
+ farcall CheckItemContext
ld a, [wItemAttributeParamBuffer]
ld hl, .ItemFunctionJumptable
rst JumpTable
@@ -1043,7 +1043,7 @@
ld a, 3
call InitPocket
call WaitBGMap_DrawPackGFX
- callba TMHMPocket
+ farcall TMHMPocket
ld a, [CurItem]
ld [CurItem], a
ret
@@ -1130,7 +1130,7 @@
ld a, [InputType]
or a
jr z, .loop
- callba _DudeAutoInput_RightA
+ farcall _DudeAutoInput_RightA
.loop
call .RunJumptable
call DepositSellTutorial_InterpretJoypad
@@ -1207,7 +1207,7 @@
ld a, 3
call InitPocket
call WaitBGMap_DrawPackGFX
- callba TMHMPocket
+ farcall TMHMPocket
ld a, [CurItem]
ld [CurItem], a
ret
@@ -1310,7 +1310,7 @@
ret
.female
- callba DrawKrisPackGFX
+ farcall DrawKrisPackGFX
ret
; 108cc
@@ -1377,7 +1377,7 @@
ret
.select
- callba SwitchItemsInBag
+ farcall SwitchItemsInBag
ld hl, Text_MoveItemWhere
call Pack_PrintTextNoScroll
scf
@@ -1394,7 +1394,7 @@
ret
.place_insert
- callba SwitchItemsInBag
+ farcall SwitchItemsInBag
ld de, SFX_SWITCH_POKEMON
call WaitPlaySFX
ld de, SFX_SWITCH_POKEMON
--- a/engine/party_menu.asm
+++ b/engine/party_menu.asm
@@ -40,8 +40,8 @@
LoadPartyMenuGFX: ; 5004f
call LoadFontsBattleExtra
- callab InitPartyMenuPalettes ; engine/color.asm
- callab ClearSpriteAnims2
+ callfar InitPartyMenuPalettes ; engine/color.asm
+ callfar ClearSpriteAnims2
ret
; 5005f
@@ -662,7 +662,7 @@
pop bc
dec c
jr nz, .loop
- callab PlaySpriteAnimations
+ callfar PlaySpriteAnimations
ret
; 50405
--- a/engine/phone/phone.asm
+++ b/engine/phone/phone.asm
@@ -154,7 +154,7 @@
ret
.timecheck ; 900a6 (24:40a6)
- callba CheckReceiveCallTimer
+ farcall CheckReceiveCallTimer
ret
CheckPhoneContactTimeOfDay: ; 900ad (24:40ad)
@@ -163,7 +163,7 @@
push de
push af
- callba CheckTime
+ farcall CheckTime
pop af
and MORN | DAY | NITE
and c
@@ -201,7 +201,7 @@
ret
GetAvailableCallers: ; 900de (24:40de)
- callba CheckTime
+ farcall CheckTime
ld a, c
ld [EngineBuffer1], a
ld hl, EngineBuffer3
@@ -471,7 +471,7 @@
RingTwice_StartCall: ; 9026f
call .Ring
call .Ring
- callba TrainerRankings_PhoneCalls
+ farcall TrainerRankings_PhoneCalls
ret
; 9027c
@@ -500,7 +500,7 @@
ld [PhoneCaller + 1], a
call Phone_FirstOfTwoRings
call Phone_FirstOfTwoRings
- callba TrainerRankings_PhoneCalls
+ farcall TrainerRankings_PhoneCalls
ret
; 902b3
@@ -599,7 +599,7 @@
call PlaySFX
call Phone_CallerTextbox
call UpdateSprites
- callba PhoneRing_LoadEDTile
+ farcall PhoneRing_LoadEDTile
ret
; 90355
@@ -609,7 +609,7 @@
Phone_Wait20Frames
ld c, 20
call DelayFrames
- callba PhoneRing_LoadEDTile
+ farcall PhoneRing_LoadEDTile
ret
; 90363
@@ -725,7 +725,7 @@
Phone_GetTrainerName: ; 90423 (24:4423)
push hl
push bc
- callba GetTrainerName
+ farcall GetTrainerName
pop bc
pop hl
ret
@@ -733,7 +733,7 @@
Phone_GetTrainerClassName: ; 9042e (24:442e)
push hl
push bc
- callba GetTrainerClassName
+ farcall GetTrainerClassName
pop bc
pop hl
ret
@@ -754,7 +754,7 @@
push bc
call GetWorldMapLocation
ld e, a
- callba GetLandmarkName
+ farcall GetLandmarkName
pop bc
pop de
ret
--- a/engine/play_slow_cry.asm
+++ b/engine/play_slow_cry.asm
@@ -23,7 +23,7 @@
ld [CryLength], a
ld a, h
ld [CryLength + 1], a
- callba _PlayCryHeader
+ farcall _PlayCryHeader
call WaitSFX
.done
--- a/engine/player_movement.asm
+++ b/engine/player_movement.asm
@@ -653,7 +653,7 @@
ld e, a
; Find an object struct with coordinates equal to d,e
ld bc, ObjectStructs ; redundant
- callba IsNPCAtCoord
+ farcall IsNPCAtCoord
jr nc, .is_npc
call .CheckStrengthBoulder
jr c, .no_bump
--- a/engine/player_step.asm
+++ b/engine/player_step.asm
@@ -77,7 +77,7 @@
ret
.mobile ; d509 (3:5509)
- callba TrainerRankings_StepCount
+ farcall TrainerRankings_StepCount
ret
.fail2 ; d510 (3:5510)
--- a/engine/pokecenter_pc.asm
+++ b/engine/pokecenter_pc.asm
@@ -105,7 +105,7 @@
call PC_PlayChoosePCSound
ld hl, PokecenterPCText_AccessedBillsPC
call PC_DisplayText
- callba _BillsPC
+ farcall _BillsPC
and a
ret
; 15679 (5:5679)
@@ -124,7 +124,7 @@
call PC_PlayChoosePCSound
ld hl, PokecenterPCText_AccessedOaksPC
call PC_DisplayText
- callba ProfOaksPC
+ farcall ProfOaksPC
and a
ret
; 1569a
@@ -132,7 +132,7 @@
HallOfFamePC: ; 1569a
call PC_PlayChoosePCSound
call FadeToMenu
- callba _HallOfFamePC
+ farcall _HallOfFamePC
call CloseSubmenu
and a
ret
@@ -308,7 +308,7 @@
KrisWithdrawItemMenu: ; 0x157d1
call LoadStandardMenuDataHeader
- callba ClearPCItemScreen
+ farcall ClearPCItemScreen
.loop
call PCItemsJoypad
jr c, .quit
@@ -322,7 +322,7 @@
.Submenu:
; check if the item has a quantity
- callba _CheckTossableItem
+ farcall _CheckTossableItem
ld a, [wItemAttributeParamBuffer]
and a
jr z, .askquantity
@@ -335,7 +335,7 @@
.askquantity
ld hl, .HowManyText
call MenuTextBox
- callba SelectQuantityToToss
+ farcall SelectQuantityToToss
call ExitMenu
call ExitMenu
jr c, .done
@@ -384,12 +384,12 @@
KrisTossItemMenu: ; 0x1585f
call LoadStandardMenuDataHeader
- callba ClearPCItemScreen
+ farcall ClearPCItemScreen
.loop
call PCItemsJoypad
jr c, .quit
ld de, PCItems
- callba TossItemFromPC
+ farcall TossItemFromPC
jr .loop
.quit
@@ -399,7 +399,7 @@
; 0x1587d
KrisDecorationMenu: ; 0x1587d
- callba _KrisDecorationMenu
+ farcall _KrisDecorationMenu
ld a, c
and a
ret z
@@ -418,14 +418,14 @@
jr c, .nope
call DisableSpriteUpdates
call LoadStandardMenuDataHeader
- callba DepositSellInitPackBuffers
+ farcall DepositSellInitPackBuffers
.loop
- callba DepositSellPack
+ farcall DepositSellPack
ld a, [wcf66]
and a
jr z, .close
call .TryDepositItem
- callba CheckRegisteredItem
+ farcall CheckRegisteredItem
jr .loop
.close
@@ -436,7 +436,7 @@
ret
.CheckItemsInBag:
- callba HasNoItems
+ farcall HasNoItems
ret nc
ld hl, .NoItemsInBag
call MenuTextBoxBackup
@@ -453,7 +453,7 @@
push af
ld a, $0
ld [wSpriteUpdatesEnabled], a
- callba CheckItemMenu
+ farcall CheckItemMenu
ld a, [wItemAttributeParamBuffer]
ld hl, .dw
rst JumpTable
@@ -486,7 +486,7 @@
ret
.DepositItem_:
- callba _CheckTossableItem
+ farcall _CheckTossableItem
ld a, [wItemAttributeParamBuffer]
and a
jr z, .AskQuantity
@@ -497,7 +497,7 @@
.AskQuantity:
ld hl, .HowManyText
call MenuTextBox
- callba SelectQuantityToToss
+ farcall SelectQuantityToToss
push af
call ExitMenu
call ExitMenu
@@ -545,7 +545,7 @@
db "@"
KrisMailBoxMenu: ; 0x1597d
- callba _KrisMailBoxMenu
+ farcall _KrisMailBoxMenu
xor a
ret
; 0x15985
@@ -605,12 +605,12 @@
.a_select_2
call PC_PlaySwapItemsSound
.select_1
- callba SwitchItemsInBag
+ farcall SwitchItemsInBag
.next
jp .loop
.a_1
- callba ScrollingMenu_ClearLeftColumn
+ farcall ScrollingMenu_ClearLeftColumn
call PlaceHollowCursor
and a
ret
--- a/engine/pokedex.asm
+++ b/engine/pokedex.asm
@@ -98,7 +98,7 @@
call Pokedex_OrderMonsByMode
call Pokedex_InitCursorPosition
call Pokedex_GetLandmark
- callba DrawDexEntryScreenRightEdge
+ farcall DrawDexEntryScreenRightEdge
call Pokedex_ResetBGMapMode
ret
@@ -220,7 +220,7 @@
hlcoord 0, 0, AttrMap
ld bc, SCREEN_HEIGHT * SCREEN_WIDTH
call ByteFill
- callba DrawPokedexListWindow
+ farcall DrawPokedexListWindow
hlcoord 0, 17
ld de, String_START_SEARCH
call Pokedex_PlaceString
@@ -250,7 +250,7 @@
ld a, SCGB_POKEDEX
call Pokedex_GetSGBLayout
call Pokedex_UpdateCursorOAM
- callba DrawPokedexListWindow
+ farcall DrawPokedexListWindow
hlcoord 0, 17
ld de, String_START_SEARCH
call Pokedex_PlaceString
@@ -333,7 +333,7 @@
call Pokedex_InitArrowCursor
call Pokedex_GetSelectedMon
ld [wLastDexEntry], a
- callba DisplayDexEntry
+ farcall DisplayDexEntry
call Pokedex_DrawFootprint
call WaitBGMap
ld a, $a7
@@ -387,7 +387,7 @@
ld [wPokedexStatus], a
call Pokedex_GetSelectedMon
ld [wLastDexEntry], a
- callba DisplayDexEntry
+ farcall DisplayDexEntry
call WaitBGMap
ret
@@ -403,7 +403,7 @@
call Pokedex_LoadCurrentFootprint
call Pokedex_GetSelectedMon
ld [wLastDexEntry], a
- callba DisplayDexEntry
+ farcall DisplayDexEntry
call Pokedex_DrawFootprint
call Pokedex_LoadSelectedMonTiles
call WaitBGMap
@@ -481,7 +481,7 @@
push af
ld a, [wJumptableIndex]
push af
- callba PrintDexEntry
+ farcall PrintDexEntry
pop af
ld [wJumptableIndex], a
pop af
@@ -502,7 +502,7 @@
Pokedex_RedisplayDexEntry: ; 4038d
call Pokedex_DrawDexEntryScreenBG
call Pokedex_GetSelectedMon
- callba DisplayDexEntry
+ farcall DisplayDexEntry
call Pokedex_DrawFootprint
ret
@@ -622,7 +622,7 @@
call Pokedex_PlaceSearchScreenTypeStrings
xor a
ld [wDexSearchSlowpokeFrame], a
- callba DoDexSearchSlowpokeFrame
+ farcall DoDexSearchSlowpokeFrame
call WaitBGMap
ld a, SCGB_POKEDEX_SEARCH_OPTION
call Pokedex_GetSGBLayout
@@ -675,7 +675,7 @@
.MenuAction_BeginSearch: ; 404b7
call Pokedex_SearchForMons
- callba AnimateDexSearchSlowpoke
+ farcall AnimateDexSearchSlowpoke
ld a, [wDexSearchResultCount]
and a
jr nz, .show_search_results
@@ -722,7 +722,7 @@
call ByteFill
call Pokedex_SetBGMapMode4
call Pokedex_ResetBGMapMode
- callba DrawPokedexSearchResultsWindow
+ farcall DrawPokedexSearchResultsWindow
call Pokedex_PlaceSearchResultsTypeStrings
ld a, 4
ld [wDexListingHeight], a
@@ -738,7 +738,7 @@
ld [hWY], a
call WaitBGMap
call Pokedex_ResetBGMapMode
- callba DrawPokedexSearchResultsWindow
+ farcall DrawPokedexSearchResultsWindow
call Pokedex_PlaceSearchResultsTypeStrings
call Pokedex_UpdateSearchResultsCursorOAM
ld a, $ff
@@ -801,7 +801,7 @@
ld [wDexCurrentUnownIndex], a
call Pokedex_LoadUnownFrontpicTiles
call Pokedex_UnownModePlaceCursor
- callba PrintUnownWord
+ farcall PrintUnownWord
call WaitBGMap
ld a, SCGB_POKEDEX_UNOWN_MODE
call Pokedex_GetSGBLayout
@@ -823,7 +823,7 @@
call DelayFrame
call Pokedex_CheckSGB
jr nz, .decompress
- callba LoadSGBPokedexGFX2
+ farcall LoadSGBPokedexGFX2
jr .done
.decompress
@@ -873,7 +873,7 @@
call Pokedex_UnownModeEraseCursor
call Pokedex_LoadUnownFrontpicTiles
call Pokedex_UnownModePlaceCursor
- callba PrintUnownWord
+ farcall PrintUnownWord
ld a, $1
ld [hBGMapMode], a
call DelayFrame
@@ -2409,7 +2409,7 @@
.QuestionMark:
ld a, BANK(sScratch)
call GetSRAMBank
- callba LoadQuestionMarkPic
+ farcall LoadQuestionMarkPic
ld hl, VTiles2
ld de, sScratch
ld c, 7 * 7
@@ -2477,7 +2477,7 @@
call Pokedex_InvertTiles
call Pokedex_CheckSGB
jr nz, .LoadPokedexLZ
- callba LoadSGBPokedexGFX
+ farcall LoadSGBPokedexGFX
jr .LoadPokedexSlowpokeLZ
.LoadPokedexLZ:
@@ -2564,7 +2564,7 @@
_NewPokedexEntry: ; 41a7f
xor a
ld [hBGMapMode], a
- callba DrawDexEntryScreenRightEdge
+ farcall DrawDexEntryScreenRightEdge
call Pokedex_ResetBGMapMode
call DisableLCD
call LoadStandardFont
@@ -2581,7 +2581,7 @@
ld bc, 19
ld a, " "
call ByteFill
- callba DisplayDexEntry
+ farcall DisplayDexEntry
call EnableLCD
call WaitBGMap
call GetBaseData
--- a/engine/pokegear.asm
+++ b/engine/pokegear.asm
@@ -20,7 +20,7 @@
bit 7, a
jr nz, .done
call PokegearJumptable
- callba PlaySpriteAnimations
+ farcall PlaySpriteAnimations
call DelayFrame
jr .loop
@@ -55,7 +55,7 @@
ld a, $7
ld [hWX], a
call Pokegear_LoadGFX
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
call InitPokegearModeIndicatorArrow
ld a, 8
call SkipMusic
@@ -106,7 +106,7 @@
call GetWorldMapLocation
cp FAST_SHIP
jr z, .ssaqua
- callba GetPlayerIcon
+ farcall GetPlayerIcon
push de
ld h, d
ld l, e
@@ -239,7 +239,7 @@
.return_from_jumptable
call Pokegear_FinishTilemap
- callba TownMapPals
+ farcall TownMapPals
ld a, [wcf65]
and a
jr nz, .kanto_0
@@ -319,7 +319,7 @@
.kanto
ld e, 1
.ok
- callba PokegearMap
+ farcall PokegearMap
ld a, $7
ld bc, $12
hlcoord 1, 2
@@ -513,7 +513,7 @@
ld a, [hMinutes]
ld c, a
decoord 6, 8
- callba PrintHoursMins
+ farcall PrintHoursMins
ld hl, .DayText
bccoord 6, 6
call PlaceHLTextAtBC
@@ -670,7 +670,7 @@
pop af
ld e, a
push bc
- callba GetLandmarkCoords
+ farcall GetLandmarkCoords
pop bc
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
@@ -709,9 +709,9 @@
pop af
ld e, a
push de
- callba GetLandmarkName
+ farcall GetLandmarkName
pop de
- callba TownMap_ConvertLineBreakCharacters
+ farcall TownMap_ConvertLineBreakCharacters
hlcoord 8, 0
ld [hl], $34
ret
@@ -721,7 +721,7 @@
PokegearMap_UpdateCursorPosition: ; 910d4
push bc
ld e, a
- callba GetLandmarkCoords
+ farcall GetLandmarkCoords
pop bc
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
@@ -929,7 +929,7 @@
ret
.no_service
- callba Phone_NoSignal
+ farcall Phone_NoSignal
ld hl, .OutOfServiceArea
call PrintText
ld a, $8
@@ -958,7 +958,7 @@
ld a, [hJoyPressed]
and A_BUTTON | B_BUTTON
ret z
- callba HangUp
+ farcall HangUp
ld a, $8
ld [wJumptableIndex], a
ld hl, PokegearText_WhomToCall
@@ -1121,7 +1121,7 @@
ld d, 0
add hl, de
ld c, [hl]
- callba CheckCanDeletePhoneNumber
+ farcall CheckCanDeletePhoneNumber
ld a, c
and a
jr z, .cant_delete
@@ -1849,7 +1849,7 @@
call ClearSprites
call DisableLCD
call Pokegear_LoadGFX
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
ld a, 8
call SkipMusic
ld a, $e3
@@ -1919,7 +1919,7 @@
jr nz, .pressed_down
.loop2
push de
- callba PlaySpriteAnimations
+ farcall PlaySpriteAnimations
pop de
call DelayFrame
jr .loop
@@ -1973,7 +1973,7 @@
.kanto2
ld e, $1
.okay_tilemap
- callba PokegearMap
+ farcall PokegearMap
ld a, $7
ld bc, 6
hlcoord 1, 0
@@ -1994,7 +1994,7 @@
ld [hl], $17
ld a, [wTownMapCursorLandmark]
call PokegearMap_UpdateLandmarkName
- callba TownMapPals
+ farcall TownMapPals
ret
; 91a53
@@ -2116,7 +2116,7 @@
ld [hl], $1
xor a
ld [hBGMapMode], a
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
call LoadTownMapGFX
ld de, FlyMapLabelBorderGFX
ld hl, VTiles2 tile $30
@@ -2138,7 +2138,7 @@
jr nz, .pressedA
call FlyMapScroll
call GetMapCursorCoordinates
- callba PlaySpriteAnimations
+ farcall PlaySpriteAnimations
call DelayFrame
jr .loop
@@ -2276,7 +2276,7 @@
ld de, Flypoints
add hl, de
ld e, [hl]
- callba GetLandmarkName
+ farcall GetLandmarkName
hlcoord 2, 1
ld de, StringBuffer1
call PlaceString
@@ -2292,7 +2292,7 @@
ld de, Flypoints
add hl, de
ld e, [hl]
- callba GetLandmarkCoords
+ farcall GetLandmarkCoords
ld a, [wTownMapCursorCoordinates]
ld c, a
ld a, [wTownMapCursorCoordinates + 1]
@@ -2595,7 +2595,7 @@
.GetAndPlaceNest: ; 91e1e
ld [wTownMapCursorLandmark], a
ld e, a
- callba FindNest ; load nest landmarks into TileMap[0,0]
+ farcall FindNest ; load nest landmarks into TileMap[0,0]
decoord 0, 0
ld hl, Sprites
.nestloop
@@ -2605,7 +2605,7 @@
push de
ld e, a
push hl
- callba GetLandmarkCoords
+ farcall GetLandmarkCoords
pop hl
; load into OAM
ld a, d
@@ -2637,7 +2637,7 @@
ret c
ld a, [wTownMapPlayerIconLandmark]
ld e, a
- callba GetLandmarkCoords
+ farcall GetLandmarkCoords
ld c, e
ld b, d
ld de, .PlayerOAM
@@ -2723,7 +2723,7 @@
ld a, [wTownMapPlayerIconLandmark]
cp FAST_SHIP
jr z, .FastShip
- callba GetPlayerIcon
+ farcall GetPlayerIcon
ret
.FastShip:
@@ -2851,7 +2851,7 @@
ld [wd265], a
; Get FlyMon icon
ld e, 8 ; starting tile in VRAM
- callba GetSpeciesIcon
+ farcall GetSpeciesIcon
; Animation/palette
depixel 0, 0
ld a, SPRITE_ANIM_INDEX_PARTY_MON
@@ -2869,7 +2869,7 @@
TownMapPlayerIcon: ; 91fa6
; Draw the player icon at town map location in a
push af
- callba GetPlayerIcon
+ farcall GetPlayerIcon
; Standing icon
ld hl, VTiles0 tile $10
ld c, 4 ; # tiles
@@ -2899,7 +2899,7 @@
pop af
ld e, a
push bc
- callba GetLandmarkCoords
+ farcall GetLandmarkCoords
pop bc
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
@@ -2945,7 +2945,7 @@
ld [hl], $1
xor a
ld [hBGMapMode], a
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
call LoadTownMapGFX
ld de, FlyMapLabelBorderGFX
ld hl, VTiles2 tile $30
@@ -2980,7 +2980,7 @@
jr nz, .pressedA
call .HandleDPad
call GetMapCursorCoordinates
- callba PlaySpriteAnimations
+ farcall PlaySpriteAnimations
call DelayFrame
jr .loop
--- a/engine/print_party.asm
+++ b/engine/print_party.asm
@@ -31,7 +31,7 @@
ld a, [wd265]
ld b, a
ld c, 1 ; get page 1
- callba GetDexEntryPagePointer
+ farcall GetDexEntryPagePointer
pop af
ld a, b
hlcoord 1, 11, wPrinterTileMapBuffer
@@ -81,7 +81,7 @@
ld a, [wd265]
ld b, a
ld c, 2 ; get page 2
- callba GetDexEntryPagePointer
+ farcall GetDexEntryPagePointer
pop af
hlcoord 1, 1, wPrinterTileMapBuffer
ld a, b
@@ -157,7 +157,7 @@
xor a
ld [MonType], a
- callba CopyPkmnToTempMon
+ farcall CopyPkmnToTempMon
hlcoord 0, 7
ld b, 9
ld c, 18
@@ -241,7 +241,7 @@
call LoadFontsBattleExtra
xor a
ld [MonType], a
- callba CopyPkmnToTempMon
+ farcall CopyPkmnToTempMon
hlcoord 0, 0
ld b, 15
ld c, 18
@@ -316,7 +316,7 @@
; 1dc52c
Function1dc52c: ; 1dc52c
- callba GetGender
+ farcall GetGender
ld a, " "
jr c, .got_gender
ld a, "♂"
@@ -327,7 +327,7 @@
hlcoord 17, 2
ld [hl], a
ld bc, TempMonDVs
- callba CheckShininess
+ farcall CheckShininess
ret nc
hlcoord 18, 2
ld [hl], "<SHINY>"
--- a/engine/printer.asm
+++ b/engine/printer.asm
@@ -68,7 +68,7 @@
call Printer_StartTransmission
ld a, $10
ld [wcbfa], a
- callba PrintPage1
+ farcall PrintPage1
call ClearTileMap
ld a, %11100100
call DmgToCgbBGPals
@@ -94,7 +94,7 @@
call Printer_StartTransmission
ld a, $3
ld [wcbfa], a
- callba PrintPage2
+ farcall PrintPage2
call Printer_ResetJoypadRegisters
ld a, 4
ld [wPrinterQueueLength], a
@@ -235,7 +235,7 @@
xor a
ld [hBGMapMode], a
call LoadTileMapToTempTileMap
- callba PlaceUnownPrinterFrontpic
+ farcall PlaceUnownPrinterFrontpic
ld a, $0 ; to be loaded to wcbfa
call Printer_PrepareTileMapForPrint
call Call_LoadTempTileMapToTileMap
@@ -341,7 +341,7 @@
xor a
ld [hBGMapMode], a
- callba PrintPartyMonPage1
+ farcall PrintPartyMonPage1
ld a, $10 ; to be loaded to wcbfa
call Printer_PrepareTileMapForPrint
@@ -362,7 +362,7 @@
xor a
ld [hBGMapMode], a
- callba PrintPartyMonPage2
+ farcall PrintPartyMonPage2
ld a, $3 ; to be loaded to wcbfa
call Printer_PrepareTileMapForPrint
@@ -391,7 +391,7 @@
ld a, [wPrinterQueueLength]
push af
- callba PlaceDiplomaOnScreen
+ farcall PlaceDiplomaOnScreen
xor a
ld [hPrinter], a
@@ -425,7 +425,7 @@
xor a
ld [hBGMapMode], a
- callba PrintDiplomaPage2
+ farcall PrintDiplomaPage2
ld a, $3 ; to be loaded to wcbfa
call Printer_PrepareTileMapForPrint
@@ -861,7 +861,7 @@
ld [CurPartyMon], a
ld a, TEMPMON
ld [MonType], a
- callba GetGender
+ farcall GetGender
ld a, " "
jr c, .got_gender
ld a, "♂"
--- a/engine/radio.asm
+++ b/engine/radio.asm
@@ -278,7 +278,7 @@
pop bc
call GetWorldMapLocation
ld e, a
- callba GetLandmarkName
+ farcall GetLandmarkName
ld hl, OPT_OakText1
call CopyRadioTextToRAM
ld a, OAKS_POKEMON_TALK_5
@@ -592,7 +592,7 @@
db "@"
OaksPkmnTalk10:
- callba RadioMusicRestartPokemonChannel
+ farcall RadioMusicRestartPokemonChannel
ld hl, OPT_RestartText
call PrintText
call WaitBGMap
@@ -653,7 +653,7 @@
dec [hl]
ret nz
ld de, $1d
- callab RadioMusicRestartDE
+ callfar RadioMusicRestartDE
ld hl, .terminator
call PrintText
ld a, OAKS_POKEMON_TALK_4
@@ -923,7 +923,7 @@
jr z, .SunTueThurSun
ld de, MUSIC_POKEMON_LULLABY
.SunTueThurSun:
- callab RadioMusicRestartDE
+ callfar RadioMusicRestartDE
ret
BenIntroText1:
@@ -978,9 +978,9 @@
LuckyNumberShow1:
call StartRadioStation
- callab Special_CheckLuckyNumberShowFlag
+ callfar Special_CheckLuckyNumberShowFlag
jr nc, .dontreset
- callab Special_ResetLuckyNumberShowFlag
+ callfar Special_ResetLuckyNumberShowFlag
.dontreset
ld hl, LC_Text1
ld a, LUCKY_NUMBER_SHOW_2
@@ -1193,12 +1193,12 @@
pop bc
jr c, PeoplePlaces4
push bc
- callab GetTrainerClassName
+ callfar GetTrainerClassName
ld de, StringBuffer1
call CopyName1
pop bc
ld b, 1
- callab GetTrainerName
+ callfar GetTrainerName
ld hl, PnP_Text4
ld a, PLACES_AND_PEOPLE_5
jp NextRadioLine
@@ -1348,7 +1348,7 @@
ld c, [hl]
call GetWorldMapLocation
ld e, a
- callba GetLandmarkName
+ farcall GetLandmarkName
ld hl, PnP_Text5
ld a, PLACES_AND_PEOPLE_7
jp NextRadioLine
@@ -1808,8 +1808,8 @@
BuenasPassword20:
ld a, [hBGMapMode]
push af
- callba NoRadioMusic
- callba NoRadioName
+ farcall NoRadioMusic
+ farcall NoRadioName
pop af
ld [hBGMapMode], a
ld hl, WeeklyFlags
@@ -1955,7 +1955,7 @@
ld e, [hl]
inc hl
ld d, [hl]
- callab RadioMusicRestartDE
+ callfar RadioMusicRestartDE
ret
RadioChannelSongs:
--- a/engine/rtc.asm
+++ b/engine/rtc.asm
@@ -143,8 +143,8 @@
jr c, .dont_update
.time_overflow
- callba ClearDailyTimers
- callba Function170923
+ farcall ClearDailyTimers
+ farcall Function170923
; mobile
ld a, $5
call GetSRAMBank
--- a/engine/save.asm
+++ b/engine/save.asm
@@ -1,9 +1,9 @@
SaveMenu: ; 14a1a
call LoadStandardMenuDataHeader
- callba DisplaySaveInfoOnSave
+ farcall DisplaySaveInfoOnSave
call SpeechTextBox
call UpdateSprites
- callba SaveMenu_LoadEDTile
+ farcall SaveMenu_LoadEDTile
ld hl, Text_WouldYouLikeToSaveTheGame
call SaveTheGame_yesorno
jr nz, .refused
@@ -19,20 +19,20 @@
.refused
call ExitMenu
call ret_d90
- callba SaveMenu_LoadEDTile
+ farcall SaveMenu_LoadEDTile
scf
ret
SaveAfterLinkTrade: ; 14a58
call PauseGameLogic
- callba StageRTCTimeForSave
- callba BackupMysteryGift
+ farcall StageRTCTimeForSave
+ farcall BackupMysteryGift
call SavePokemonData
call SaveChecksum
call SaveBackupPokemonData
call SaveBackupChecksum
- callba BackupPartyMonMail
- callba SaveRTC
+ farcall BackupPartyMonMail
+ farcall SaveRTC
call ResumeGameLogic
ret
; 14a83
@@ -95,8 +95,8 @@
ld [wCurBox], a
ld a, $1
ld [wSaveFileExists], a
- callba StageRTCTimeForSave
- callba BackupMysteryGift
+ farcall StageRTCTimeForSave
+ farcall BackupMysteryGift
call ValidateSave
call SaveOptions
call SavePlayerData
@@ -107,9 +107,9 @@
call SaveBackupPlayerData
call SaveBackupPokemonData
call SaveBackupChecksum
- callba BackupPartyMonMail
- callba BackupMobileEventIndex
- callba SaveRTC
+ farcall BackupPartyMonMail
+ farcall BackupMobileEventIndex
+ farcall SaveRTC
call LoadBox
call ResumeGameLogic
ld de, SFX_SAVE
@@ -271,8 +271,8 @@
SaveGameData_: ; 14c10
ld a, 1
ld [wSaveFileExists], a
- callba StageRTCTimeForSave
- callba BackupMysteryGift
+ farcall StageRTCTimeForSave
+ farcall BackupMysteryGift
call ValidateSave
call SaveOptions
call SavePlayerData
@@ -285,9 +285,9 @@
call SaveBackupPokemonData
call SaveBackupChecksum
call UpdateStackTop
- callba BackupPartyMonMail
- callba BackupMobileEventIndex
- callba SaveRTC
+ farcall BackupPartyMonMail
+ farcall BackupMobileEventIndex
+ farcall SaveRTC
ld a, BANK(sBattleTowerChallengeState)
call GetSRAMBank
ld a, [sBattleTowerChallengeState]
@@ -636,9 +636,9 @@
call LoadPlayerData
call LoadPokemonData
call LoadBox
- callba RestorePartyMonMail
- callba RestoreMobileEventIndex
- callba RestoreMysteryGift
+ farcall RestorePartyMonMail
+ farcall RestoreMobileEventIndex
+ farcall RestoreMysteryGift
call ValidateBackupSave
call SaveBackupOptions
call SaveBackupPlayerData
@@ -653,9 +653,9 @@
call LoadBackupPlayerData
call LoadBackupPokemonData
call LoadBox
- callba RestorePartyMonMail
- callba RestoreMobileEventIndex
- callba RestoreMysteryGift
+ farcall RestorePartyMonMail
+ farcall RestoreMobileEventIndex
+ farcall RestoreMysteryGift
call ValidateSave
call SaveOptions
call SavePlayerData
--- a/engine/scripting.asm
+++ b/engine/scripting.asm
@@ -35,7 +35,7 @@
dec [hl]
ret nz
- callba Function58b9
+ farcall Function58b9
ld a, SCRIPT_READ
ld [ScriptMode], a
@@ -49,7 +49,7 @@
bit 7, [hl]
ret nz
- callba Function58b9
+ farcall Function58b9
ld a, SCRIPT_READ
ld [ScriptMode], a
@@ -277,7 +277,7 @@
ld e, a
call GetScriptByte
ld d, a
- callba Special
+ farcall Special
ret
Script_ptcallasm:
@@ -475,13 +475,13 @@
ld a, [ScriptVar]
.ok
ld [CurPartySpecies], a
- callba Pokepic
+ farcall Pokepic
ret
Script_closepokepic:
; script command 0x57
- callba ClosePokepic
+ farcall ClosePokepic
ret
Script_verticalmenu:
@@ -519,7 +519,7 @@
call SetUpTextBox
call GetScriptByte
ld c, a
- callba BattleTowerText
+ farcall BattleTowerText
ret
Script_verbosegiveitem:
@@ -615,7 +615,7 @@
Script_specialsound:
; script command 0x88
- callba CheckItemPocket
+ farcall CheckItemPocket
ld a, [wItemAttributeParamBuffer]
cp TM_HM
ld de, SFX_GET_TM
@@ -628,7 +628,7 @@
GetPocketName:
- callba CheckItemPocket
+ farcall CheckItemPocket
ld a, [wItemAttributeParamBuffer]
dec a
ld hl, .Pockets
@@ -689,7 +689,7 @@
ld d, a
ld a, [ScriptBank]
ld b, a
- callba OpenMartDialog
+ farcall OpenMartDialog
ret
Script_elevator:
@@ -705,7 +705,7 @@
ld d, a
ld a, [ScriptBank]
ld b, a
- callba Elevator
+ farcall Elevator
ret c
ld a, TRUE
ld [ScriptVar], a
@@ -718,7 +718,7 @@
call GetScriptByte
ld e, a
- callba NPCTrade
+ farcall NPCTrade
ret
Script_phonecall:
@@ -732,13 +732,13 @@
ld d, a
ld a, [ScriptBank]
ld b, a
- callba PhoneCall
+ farcall PhoneCall
ret
Script_hangup:
; script command 0x99
- callba HangUp
+ farcall HangUp
ret
Script_askforphonenumber:
@@ -750,7 +750,7 @@
jr c, .refused
call GetScriptByte
ld c, a
- callba AddPhoneNumber
+ farcall AddPhoneNumber
jr c, .phonefull
xor a
jr .done
@@ -771,7 +771,7 @@
call GetScriptByte
ld b, a
- callba DescribeDecoration
+ farcall DescribeDecoration
ld h, d
ld l, e
jp ScriptJump
@@ -800,7 +800,7 @@
ld d, a
call GetScriptByte
ld e, a
- callba StoreSwarmMapIndices
+ farcall StoreSwarmMapIndices
ret
Script_trainertext:
@@ -897,7 +897,7 @@
ld a, [OtherTrainerClass]
ld e, a
- callba PlayTrainerEncounterMusic
+ farcall PlayTrainerEncounterMusic
ret
Script_playmapmusic:
@@ -959,7 +959,7 @@
Script_warpsound:
; script command 0x87
- callba GetWarpSFX
+ farcall GetWarpSFX
call PlaySFX
ret
@@ -1010,7 +1010,7 @@
ApplyMovement:
push bc
ld a, c
- callba SetFlagsForMovement_1
+ farcall SetFlagsForMovement_1
pop bc
push bc
@@ -1032,7 +1032,7 @@
ret
SetFlagsForMovement_2:
- callba _SetFlagsForMovement_2
+ farcall _SetFlagsForMovement_2
ret
Script_applymovement2:
@@ -1054,7 +1054,7 @@
ld d, $0
ld a, [hLastTalked]
ld e, a
- callba GetRelativeFacing
+ farcall GetRelativeFacing
ld a, d
add a
add a
@@ -1085,7 +1085,7 @@
.ok2
ld d, a
push de
- callba GetRelativeFacing
+ farcall GetRelativeFacing
pop bc
ret c
ld a, d
@@ -1204,7 +1204,7 @@
ld a, [hMapObjectIndexBuffer]
ld b, 1 ; set
call ApplyEventActionAppearDisappear
- callba _UpdateSprites
+ farcall _UpdateSprites
ret
ApplyEventActionAppearDisappear:
@@ -1239,13 +1239,13 @@
call GetScriptByte
call GetScriptPerson
ld c, a
- callba StartFollow
+ farcall StartFollow
ret
Script_stopfollow:
; script command 0x71
- callba StopFollow
+ farcall StopFollow
ret
Script_moveperson:
@@ -1264,7 +1264,7 @@
call GetScriptByte
add 4
ld e, a
- callba CopyDECoordsToMapObject
+ farcall CopyDECoordsToMapObject
ret
Script_writepersonxy:
@@ -1279,7 +1279,7 @@
ld a, [hLastTalked]
.ok
ld b, a
- callba WritePersonXY
+ farcall WritePersonXY
ret
Script_follownotexact:
@@ -1294,7 +1294,7 @@
call GetScriptByte
call GetScriptPerson
ld c, a
- callba FollowNotExact
+ farcall FollowNotExact
ret
Script_loademote:
@@ -1308,7 +1308,7 @@
ld a, [ScriptVar]
.not_var_emote
ld c, a
- callba LoadEmote
+ farcall LoadEmote
ret
Script_showemote:
@@ -1451,7 +1451,7 @@
call GetScriptByte
ld [BattleType], a
call BufferScreen
- callba CatchTutorial
+ farcall CatchTutorial
jp Script_reloadmap
Script_reloadmapafterbattle:
@@ -1471,7 +1471,7 @@
.notblackedout
bit 0, d
jr z, .was_wild
- callba MomTriesToBuySomething
+ farcall MomTriesToBuySomething
jr .done
.was_wild
@@ -1480,7 +1480,7 @@
jr z, .done
ld b, BANK(Script_SpecialBillCall)
ld de, Script_SpecialBillCall
- callba LoadScriptBDE
+ farcall LoadScriptBDE
.done
jp Script_reloadmap
@@ -1969,7 +1969,7 @@
GetVarAction:
ld c, a
- callba _GetVarAction
+ farcall _GetVarAction
ret
Script_checkver:
@@ -2040,7 +2040,7 @@
ConvertLandmarkToText:
ld e, a
- callba GetLandmarkName
+ farcall GetLandmarkName
ld de, StringBuffer1
jp ConvertMemToText
@@ -2064,7 +2064,7 @@
ld c, a
call GetScriptByte
ld b, a
- callba GetTrainerName
+ farcall GetTrainerName
jr ConvertMemToText
Script_name:
@@ -2176,7 +2176,7 @@
ld a, [ScriptBank]
call FarCopyBytes
pop bc
- callba GivePokeItem
+ farcall GivePokeItem
ret
Script_checkpokeitem:
@@ -2190,7 +2190,7 @@
ld d, a
ld a, [ScriptBank]
ld b, a
- callba CheckPokeItem
+ farcall CheckPokeItem
ret
Script_giveitem:
@@ -2263,7 +2263,7 @@
call GetMoneyAccount
call LoadMoneyAmountToMem
- callba GiveMoney
+ farcall GiveMoney
ret
Script_takemoney:
@@ -2274,7 +2274,7 @@
call GetMoneyAccount
call LoadMoneyAmountToMem
- callba TakeMoney
+ farcall TakeMoney
ret
Script_checkmoney:
@@ -2285,7 +2285,7 @@
call GetMoneyAccount
call LoadMoneyAmountToMem
- callba CompareMoney
+ farcall CompareMoney
CompareMoneyAction:
jr c, .two
@@ -2329,7 +2329,7 @@
; coins (CoinByteParam)
call LoadCoinAmountToMem
- callba GiveCoins
+ farcall GiveCoins
ret
Script_takecoins:
@@ -2338,7 +2338,7 @@
; coins (CoinByteParam)
call LoadCoinAmountToMem
- callba TakeCoins
+ farcall TakeCoins
ret
Script_checkcoins:
@@ -2347,7 +2347,7 @@
; coins (CoinByteParam)
call LoadCoinAmountToMem
- callba CheckCoins
+ farcall CheckCoins
jr CompareMoneyAction
LoadCoinAmountToMem:
@@ -2365,7 +2365,7 @@
xor a
ld [ScriptVar], a
- callba CheckTime
+ farcall CheckTime
call GetScriptByte
and c
ret z
@@ -2398,7 +2398,7 @@
ld [ScriptVar], a
call GetScriptByte
ld c, a
- callba AddPhoneNumber
+ farcall AddPhoneNumber
ret nc
ld a, TRUE
ld [ScriptVar], a
@@ -2413,7 +2413,7 @@
ld [ScriptVar], a
call GetScriptByte
ld c, a
- callba DelCellNum
+ farcall DelCellNum
ret nc
ld a, TRUE
ld [ScriptVar], a
@@ -2429,7 +2429,7 @@
ld [ScriptVar], a
call GetScriptByte
ld c, a
- callba CheckCellNum
+ farcall CheckCellNum
ret nc
ld a, TRUE
ld [ScriptVar], a
@@ -2487,7 +2487,7 @@
call GetScriptByte
call GetScriptByte
.ok
- callba GivePoke
+ farcall GivePoke
ld a, b
ld [ScriptVar], a
ret
@@ -2506,7 +2506,7 @@
ld [CurPartySpecies], a
call GetScriptByte
ld [CurPartyLevel], a
- callba GiveEgg
+ farcall GiveEgg
ret nc
ld a, 2
ld [ScriptVar], a
@@ -2603,7 +2603,7 @@
ret
_EngineFlagAction:
- callba EngineFlagAction
+ farcall EngineFlagAction
ret
Script_wildoff:
@@ -2735,7 +2735,7 @@
ld d, a
ld a, [ScriptBank]
ld b, a
- callba WriteCmdQueue ; no need to farcall
+ farcall WriteCmdQueue ; no need to farcall
ret
Script_delcmdqueue:
@@ -2747,7 +2747,7 @@
ld [ScriptVar], a
call GetScriptByte
ld b, a
- callba DelCmdQueue ; no need to farcall
+ farcall DelCmdQueue ; no need to farcall
ret c
ld a, 1
ld [ScriptVar], a
@@ -2794,7 +2794,7 @@
ld [hBGMapMode], a
call OverworldTextModeSwitch
call GetMovementPermissions
- callba ReloadMapPart
+ farcall ReloadMapPart
call UpdateSprites
ret
@@ -2803,11 +2803,11 @@
call WarpCheck
ret nc
- callba EnableEvents
+ farcall EnableEvents
ret
Script_enableevents: ; unreferenced
- callba EnableEvents
+ farcall EnableEvents
ret
Script_newloadmap:
@@ -2993,9 +2993,9 @@
ld hl, GameTimerPause
res 0, [hl]
- callba TrainerRankings_HallOfFame
- callba TrainerRankings_HallOfFame2
- callba HallOfFame
+ farcall TrainerRankings_HallOfFame
+ farcall TrainerRankings_HallOfFame2
+ farcall HallOfFame
ld hl, GameTimerPause
set 0, [hl]
jr ReturnFromCredits
@@ -3003,7 +3003,7 @@
Script_credits:
; script command 0xa2
- callba RedCredits
+ farcall RedCredits
ReturnFromCredits:
call Script_end_all
ld a, $3
@@ -3031,7 +3031,7 @@
Script_check_save:
; script command 0xa9
- callba CheckSave
+ farcall CheckSave
ld a, c
ld [ScriptVar], a
ret
--- a/engine/select_menu.asm
+++ b/engine/select_menu.asm
@@ -120,7 +120,7 @@
UseRegisteredItem: ; 133c3
- callba CheckItemMenu
+ farcall CheckItemMenu
ld a, [wItemAttributeParamBuffer]
ld hl, .SwitchTo
rst JumpTable
--- a/engine/slot_machine.asm
+++ b/engine/slot_machine.asm
@@ -20,7 +20,7 @@
call PlaySFX
call WaitSFX
call ClearBGPalettes
- callba TrainerRankings_EndSlotsWinStreak
+ farcall TrainerRankings_EndSlotsWinStreak
ld hl, Options
res NO_TEXT_SCROLL, [hl]
ld hl, rLCDC ; $ff40
@@ -41,7 +41,7 @@
call ByteFill
ld b, SCGB_SLOT_MACHINE
call GetSGBLayout
- callab ClearSpriteAnims
+ callfar ClearSpriteAnims
ld hl, wSlots
ld bc, wSlotsDataEnd - wSlots
xor a
@@ -116,7 +116,7 @@
call Slots_SpinReels
xor a
ld [wCurrSpriteOAMAddr], a
- callab DoNextFrameForFirst16Sprites
+ callfar DoNextFrameForFirst16Sprites
call .PrintCoinsAndPayout
call .DummyFunc
call DelayFrame
@@ -1812,7 +1812,7 @@
ld a, [hl]
ld [wPayout], a
ld d, a
- callba TrainerRankings_AddToSlotsPayouts
+ farcall TrainerRankings_AddToSlotsPayouts
ret
.PayoutTable:
@@ -1836,7 +1836,7 @@
jr nz, .MatchedSomething
ld hl, .Text_Darn
call PrintText
- callba TrainerRankings_EndSlotsWinStreak
+ farcall TrainerRankings_EndSlotsWinStreak
ret
.MatchedSomething:
@@ -1860,7 +1860,7 @@
.return
ld hl, .Text_PrintPayout
call PrintText
- callba TrainerRankings_AddToSlotsWinStreak
+ farcall TrainerRankings_AddToSlotsWinStreak
ret
; 93195 (24:7195)
@@ -2001,7 +2001,7 @@
dec [hl]
ld e, a
ld d, 14 * 8
- callba BattleAnim_Sine_e
+ farcall BattleAnim_Sine_e
ld a, e
ld hl, SPRITEANIMSTRUCT_YOFFSET
add hl, bc
--- a/engine/specials.asm
+++ b/engine/specials.asm
@@ -200,7 +200,7 @@
Special_SetPlayerPalette: ; c225
ld a, [ScriptVar]
ld d, a
- callba SetPlayerPalette
+ farcall SetPlayerPalette
ret
; c230
@@ -215,7 +215,7 @@
call FadeToMenu
ld a, [ScriptVar]
ld [wd265], a
- callba NewPokedexEntry
+ farcall NewPokedexEntry
call ExitAllMenus
ret
; c252
@@ -230,7 +230,7 @@
Special_FindGreaterThanThatLevel: ; c25a
ld a, [ScriptVar]
ld b, a
- callba _FindGreaterThanThatLevel
+ farcall _FindGreaterThanThatLevel
jr z, FoundNone
jr FoundOne
@@ -237,7 +237,7 @@
Special_FindAtLeastThatHappy: ; c268
ld a, [ScriptVar]
ld b, a
- callba _FindAtLeastThatHappy
+ farcall _FindAtLeastThatHappy
jr z, FoundNone
jr FoundOne
@@ -244,7 +244,7 @@
Special_FindThatSpecies: ; c276
ld a, [ScriptVar]
ld b, a
- callba _FindThatSpecies
+ farcall _FindThatSpecies
jr z, FoundNone
jr FoundOne
@@ -251,7 +251,7 @@
Special_FindThatSpeciesYourTrainerID: ; c284
ld a, [ScriptVar]
ld b, a
- callba _FindThatSpeciesYourTrainerID
+ farcall _FindThatSpeciesYourTrainerID
jr z, FoundNone
jr FoundOne
@@ -269,7 +269,7 @@
SpecialNameRival: ; 0xc29d
ld b, $2 ; rival
ld de, RivalName
- callba _NamingScreen
+ farcall _NamingScreen
; default to "SILVER"
ld hl, RivalName
ld de, DefaultRivalName
@@ -281,13 +281,13 @@
db "SILVER@"
SpecialNameRater: ; c2b9
- callba NameRater
+ farcall NameRater
ret
; c2c0
Special_TownMap: ; c2c0
call FadeToMenu
- callba _TownMap
+ farcall _TownMap
call ExitAllMenus
ret
; c2cd
@@ -294,7 +294,7 @@
Special_UnownPrinter: ; c2cd
call FadeToMenu
- callba UnownPrinter
+ farcall UnownPrinter
call ExitAllMenus
ret
; c2da
@@ -301,7 +301,7 @@
Special_DisplayLinkRecord: ; c2da
call FadeToMenu
- callba DisplayLinkRecord
+ farcall DisplayLinkRecord
call ExitAllMenus
ret
; c2e7
@@ -309,7 +309,7 @@
Special_KrissHousePC: ; c2e7
xor a
ld [ScriptVar], a
- callba _KrissHousePC
+ farcall _KrissHousePC
ld a, c
ld [ScriptVar], a
ret
@@ -365,7 +365,7 @@
; 0xc34a
BugContestJudging: ; c34a
- callba _BugContestJudging
+ farcall _BugContestJudging
ld a, b
ld [ScriptVar], a
ret
@@ -374,13 +374,13 @@
MapRadio: ; c355
ld a, [ScriptVar]
ld e, a
- callba PlayRadio
+ farcall PlayRadio
ret
; c360
Special_UnownPuzzle: ; c360
call FadeToMenu
- callba UnownPuzzle
+ farcall UnownPuzzle
ld a, [wSolvedUnownPuzzle]
ld [ScriptVar], a
call ExitAllMenus
@@ -485,7 +485,7 @@
; c3ef
Special_CheckUnusedTwoDayTimer: ; c3ef
- callba CheckUnusedTwoDayTimer
+ farcall CheckUnusedTwoDayTimer
ld a, [wUnusedTwoDayTimer]
ld [ScriptVar], a
ret
@@ -520,20 +520,20 @@
SpecialCheckPokerus: ; c419
; Check if a monster in your party has Pokerus
- callba CheckPokerus
+ farcall CheckPokerus
jp ScriptReturnCarry
; c422
Special_ResetLuckyNumberShowFlag: ; c422
- callba RestartLuckyNumberCountdown
+ farcall RestartLuckyNumberCountdown
ld hl, wLuckyNumberShowFlag
res 0, [hl]
- callba LoadOrRegenerateLuckyIDNumber
+ farcall LoadOrRegenerateLuckyIDNumber
ret
; c434
Special_CheckLuckyNumberShowFlag: ; c434
- callba CheckLuckyNumberShowFlag
+ farcall CheckLuckyNumberShowFlag
jp ScriptReturnCarry
; c43d
@@ -628,7 +628,7 @@
Diploma: ; c49f
call FadeToMenu
- callba _Diploma
+ farcall _Diploma
call ExitAllMenus
ret
; c4ac
@@ -635,7 +635,7 @@
PrintDiploma: ; c4ac
call FadeToMenu
- callba _PrintDiploma
+ farcall _PrintDiploma
call ExitAllMenus
ret
; c4b9
--- a/engine/sprite_anims.asm
+++ b/engine/sprite_anims.asm
@@ -218,15 +218,15 @@
ret
.NamingScreenCursor ; 8d36c (23:536c)
- callab NamingScreen_AnimateCursor
+ callfar NamingScreen_AnimateCursor
ret
.MailCursor ; 8d373 (23:5373)
- callab ComposeMail_AnimateCursor
+ callfar ComposeMail_AnimateCursor
ret
.GameFreakLogo: ; 8d37a (23:537a)
- callab GameFreakLogoJumper
+ callfar GameFreakLogoJumper
ret
.GSIntroStar ; 8d381 (23:5381)
@@ -357,11 +357,11 @@
ret
.SlotsGolem: ; 8d422 (23:5422)
- callab SlotMachine_AnimateGolem
+ callfar SlotMachine_AnimateGolem
ret
.SlotsChansey: ; 8d429 (23:5429)
- callab Slots_AnimateChansey
+ callfar Slots_AnimateChansey
ld hl, wcf64
ld a, [hl]
cp $2
@@ -405,15 +405,15 @@
ret
.ForUnusedCursor ; 8d46e (23:546e)
- callab ret_e00ed
+ callfar ret_e00ed
ret
.PokegearArrow ; 8d475 (23:5475)
- callab AnimatePokegearModeIndicatorArrow
+ callfar AnimatePokegearModeIndicatorArrow
ret
.DummyGameCursor ; 8d47c (23:547c)
- callab DummyGame_InterpretJoypad_AnimateCursor
+ callfar DummyGame_InterpretJoypad_AnimateCursor
ret
.TradePokeBall ; 8d483 (23:5483)
@@ -566,7 +566,7 @@
ret
.TrademonInTube ; 8d543 (23:5543)
- callab TradeAnim_AnimateTrademonInTube
+ callfar TradeAnim_AnimateTrademonInTube
ret
.RevealNewMon: ; 8d54a (23:554a)
@@ -607,7 +607,7 @@
ret
.RadioTuningKnob: ; 8d578 (23:5578)
- callab AnimateTuningKnob
+ callfar AnimateTuningKnob
ret
.CutLeaves ; 8d57f (23:557f)
@@ -750,11 +750,11 @@
ret
.sprite_anim_seq_1B ; 8d630 (23:5630)
- callba Function108bc7
+ farcall Function108bc7
ret
.sprite_anim_seq_1C ; 8d637 (23:5637)
- callba Function108be0
+ farcall Function108be0
ret
.IntroSuicune ; 8d63e (23:563e)
@@ -847,11 +847,11 @@
ret
.sprite_anim_seq_1A ; 8d6b7 (23:56b7)
- callba AnimateEZChatCursor
+ farcall AnimateEZChatCursor
ret
.Celebi ; 8d6be (23:56be)
- callba UpdateCelebiPosition
+ farcall UpdateCelebiPosition
ret
.AnonymousJumptable: ; 8d6c5 (23:56c5)
--- a/engine/start_battle.asm
+++ b/engine/start_battle.asm
@@ -5,7 +5,7 @@
and a
ret z
- callba _ShowLinkBattleParticipants
+ farcall _ShowLinkBattleParticipants
ld c, 150
call DelayFrames
call ClearTileMap
@@ -34,7 +34,7 @@
ld a, [hl]
ld [BattleMonLevel], a
predef Predef_StartBattle
- callba _LoadBattleFontsHPBar
+ farcall _LoadBattleFontsHPBar
ld a, 1
ld [hBGMapMode], a
call ClearSprites
@@ -70,7 +70,7 @@
and a
jr nz, .trainermusic
- callba RegionCheck
+ farcall RegionCheck
ld a, e
and a
jr nz, .kantowild
@@ -101,11 +101,11 @@
jr z, .done
ld de, MUSIC_KANTO_GYM_LEADER_BATTLE
- callba IsKantoGymLeader
+ farcall IsKantoGymLeader
jr c, .done
ld de, MUSIC_JOHTO_GYM_LEADER_BATTLE
- callba IsJohtoGymLeader
+ farcall IsJohtoGymLeader
jr c, .done
ld de, MUSIC_RIVAL_BATTLE
@@ -126,7 +126,7 @@
and a
jr nz, .johtotrainer
- callba RegionCheck
+ farcall RegionCheck
ld a, e
and a
jr nz, .kantotrainer
@@ -186,7 +186,7 @@
xor a
call ByteFill
- callab ResetEnemyStatLevels
+ callfar ResetEnemyStatLevels
call ClearWindowData
--- a/engine/start_menu.asm
+++ b/engine/start_menu.asm
@@ -5,7 +5,7 @@
ld de, SFX_MENU
call PlaySFX
- callba ReanchorBGMap_NoOAMUpdate
+ farcall ReanchorBGMap_NoOAMUpdate
ld hl, StatusFlags2
bit 2, [hl] ; bug catching contest
@@ -23,7 +23,7 @@
call .DrawBugContestStatusBox
call SafeUpdateSprites
call _OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
- callba LoadFonts_NoOAMUpdate
+ farcall LoadFonts_NoOAMUpdate
call .DrawBugContestStatus
call UpdateTimePals
jr .Select
@@ -393,7 +393,7 @@
ld hl, StatusFlags2
bit 2, [hl] ; bug catching contest
ret z
- callba StartMenu_DrawBugContestStatusBox
+ farcall StartMenu_DrawBugContestStatusBox
ret
; 128de
@@ -403,7 +403,7 @@
jr nz, .contest
ret
.contest
- callba StartMenu_PrintBugContestStatus
+ farcall StartMenu_PrintBugContestStatus
ret
; 128ed
@@ -442,7 +442,7 @@
; Save the game.
call BufferScreen
- callba SaveMenu
+ farcall SaveMenu
jr nc, .asm_12919
ld a, 0
ret
@@ -456,7 +456,7 @@
; Game options.
call FadeToMenu
- callba OptionsMenu
+ farcall OptionsMenu
ld a, 6
ret
; 12928
@@ -466,7 +466,7 @@
; Player status.
call FadeToMenu
- callba TrainerCard
+ farcall TrainerCard
call CloseSubmenu
ld a, 0
ret
@@ -480,7 +480,7 @@
jr z, .asm_12949
call FadeToMenu
- callba Pokedex
+ farcall Pokedex
call CloseSubmenu
.asm_12949
@@ -492,7 +492,7 @@
StartMenu_Pokegear: ; 1294c
call FadeToMenu
- callba PokeGear
+ farcall PokeGear
call CloseSubmenu
ld a, 0
ret
@@ -502,7 +502,7 @@
StartMenu_Pack: ; 1295b
call FadeToMenu
- callba Pack
+ farcall Pack
ld a, [wcf66]
and a
jr nz, .used_item
@@ -531,17 +531,17 @@
call ClearBGPalettes
.menu
- callba LoadPartyMenuGFX
- callba InitPartyMenuWithCancel
- callba InitPartyMenuGFX
+ farcall LoadPartyMenuGFX
+ farcall InitPartyMenuWithCancel
+ farcall InitPartyMenuGFX
.menunoreload
- callba WritePartyMenuTilemap
- callba PrintPartyMenuText
+ farcall WritePartyMenuTilemap
+ farcall PrintPartyMenuText
call WaitBGMap
call SetPalettes ; load regular palettes?
call DelayFrame
- callba PartyMenuSelect
+ farcall PartyMenuSelect
jr c, .return ; if cancelled or pressed B
call PokemonActionSubmenu
@@ -594,13 +594,13 @@
TossItemFromPC: ; 129f4
push de
call PartyMonItemName
- callba _CheckTossableItem
+ farcall _CheckTossableItem
ld a, [wItemAttributeParamBuffer]
and a
jr nz, .key_item
ld hl, .TossHowMany
call MenuTextBox
- callba SelectQuantityToToss
+ farcall SelectQuantityToToss
push af
call CloseWindow
call ExitMenu
@@ -678,8 +678,8 @@
CancelPokemonAction: ; 12a79
- callba InitPartyMenuWithCancel
- callba UnfreezeMonIcons
+ farcall InitPartyMenuWithCancel
+ farcall UnfreezeMonIcons
ld a, 1
ret
; 12a88
@@ -689,7 +689,7 @@
hlcoord 1, 15
lb bc, 2, 18
call ClearBox
- callba MonSubmenu
+ farcall MonSubmenu
call GetCurNick
ld a, [MenuSelection]
ld hl, .Actions
@@ -742,13 +742,13 @@
inc a
ld [wSwitchMon], a
- callba HoldSwitchmonIcon
- callba InitPartyMenuNoCancel
+ farcall HoldSwitchmonIcon
+ farcall InitPartyMenuNoCancel
ld a, PARTYMENUACTION_MOVE
ld [PartyMenuActionText], a
- callba WritePartyMenuTilemap
- callba PrintPartyMenuText
+ farcall WritePartyMenuTilemap
+ farcall PrintPartyMenuText
hlcoord 0, 1
ld bc, 20 * 2
@@ -760,18 +760,18 @@
call SetPalettes
call DelayFrame
- callba PartyMenuSelect
+ farcall PartyMenuSelect
bit 1, b
jr c, .DontSwitch
- callba _SwitchPartyMons
+ farcall _SwitchPartyMons
xor a
ld [PartyMenuActionText], a
- callba LoadPartyMenuGFX
- callba InitPartyMenuWithCancel
- callba InitPartyMenuGFX
+ farcall LoadPartyMenuGFX
+ farcall InitPartyMenuWithCancel
+ farcall InitPartyMenuGFX
ld a, 1
ret
@@ -828,10 +828,10 @@
.GiveItem:
- callba DepositSellInitPackBuffers
+ farcall DepositSellInitPackBuffers
.loop
- callba DepositSellPack
+ farcall DepositSellPack
ld a, [wcf66]
and a
@@ -870,7 +870,7 @@
push hl
ld d, a
- callba ItemIsMail
+ farcall ItemIsMail
pop hl
jr c, .please_remove_mail
ld a, [hl]
@@ -930,7 +930,7 @@
ld a, [CurItem]
ld [hl], a
ld d, a
- callba ItemIsMail
+ farcall ItemIsMail
jr nc, .done
call ComposeMailMessage
@@ -951,7 +951,7 @@
call ReceiveItemFromPokemon
jr nc, .asm_12c94
- callba ItemIsMail
+ farcall ItemIsMail
call GetPartyItemLocation
ld a, [hl]
ld [wd265], a
@@ -1063,7 +1063,7 @@
ComposeMailMessage: ; 12cfe (4:6cfe)
ld de, wTempMailMessage
- callba _ComposeMailMessage
+ farcall _ComposeMailMessage
ld hl, PlayerName
ld de, wTempMailAuthor
ld bc, NAME_LENGTH - 1
@@ -1116,7 +1116,7 @@
jp .done
.read
- callba ReadPartyMonMail
+ farcall ReadPartyMonMail
ld a, $0
ret
@@ -1126,7 +1126,7 @@
jr c, .RemoveMailToBag
ld a, [CurPartyMon]
ld b, a
- callba SendMailToPC
+ farcall SendMailToPC
jr c, .MailboxFull
ld hl, .sentmailtopctext
call MenuTextBoxBackup
@@ -1234,7 +1234,7 @@
MonMenu_Cut: ; 12e1b
- callba CutFunction
+ farcall CutFunction
ld a, [wFieldMoveSucceeded]
cp $1
jr nz, .Fail
@@ -1249,13 +1249,13 @@
MonMenu_Fly: ; 12e30
- callba FlyFunction
+ farcall FlyFunction
ld a, [wFieldMoveSucceeded]
cp $2
jr z, .Fail
cp $0
jr z, .Error
- callba TrainerRankings_Fly
+ farcall TrainerRankings_Fly
ld b, $4
ld a, $2
ret
@@ -1274,7 +1274,7 @@
; 12e55
MonMenu_Flash: ; 12e55
- callba OWFlash
+ farcall OWFlash
ld a, [wFieldMoveSucceeded]
cp $1
jr nz, .Fail
@@ -1288,7 +1288,7 @@
; 12e6a
MonMenu_Strength: ; 12e6a
- callba StrengthFunction
+ farcall StrengthFunction
ld a, [wFieldMoveSucceeded]
cp $1
jr nz, .Fail
@@ -1302,7 +1302,7 @@
; 12e7f
MonMenu_Whirlpool: ; 12e7f
- callba WhirlpoolFunction
+ farcall WhirlpoolFunction
ld a, [wFieldMoveSucceeded]
cp $1
jr nz, .Fail
@@ -1316,7 +1316,7 @@
; 12e94
MonMenu_Waterfall: ; 12e94
- callba WaterfallFunction
+ farcall WaterfallFunction
ld a, [wFieldMoveSucceeded]
cp $1
jr nz, .Fail
@@ -1330,7 +1330,7 @@
; 12ea9
MonMenu_Teleport: ; 12ea9
- callba TeleportFunction
+ farcall TeleportFunction
ld a, [wFieldMoveSucceeded]
and a
jr z, .Fail
@@ -1344,7 +1344,7 @@
; 12ebd
MonMenu_Surf: ; 12ebd
- callba SurfFunction
+ farcall SurfFunction
ld a, [wFieldMoveSucceeded]
and a
jr z, .Fail
@@ -1358,7 +1358,7 @@
; 12ed1
MonMenu_Dig: ; 12ed1
- callba DigFunction
+ farcall DigFunction
ld a, [wFieldMoveSucceeded]
cp $1
jr nz, .Fail
@@ -1374,7 +1374,7 @@
MonMenu_Softboiled_MilkDrink: ; 12ee6
call .CheckMonHasEnoughHP
jr nc, .NotEnoughHP
- callba Softboiled_MilkDrinkFunction
+ farcall Softboiled_MilkDrinkFunction
jr .finish
.NotEnoughHP:
@@ -1417,7 +1417,7 @@
; 12f26
MonMenu_Headbutt: ; 12f26
- callba HeadbuttFunction
+ farcall HeadbuttFunction
ld a, [wFieldMoveSucceeded]
cp $1
jr nz, .Fail
@@ -1431,7 +1431,7 @@
; 12f3b
MonMenu_RockSmash: ; 12f3b
- callba RockSmashFunction
+ farcall RockSmashFunction
ld a, [wFieldMoveSucceeded]
cp $1
jr nz, .Fail
@@ -1445,7 +1445,7 @@
; 12f50
MonMenu_SweetScent: ; 12f50
- callba SweetScentFromMenu
+ farcall SweetScentFromMenu
ld b, $4
ld a, $2
ret
@@ -1762,8 +1762,8 @@
call ClearSprites
xor a
ld [hBGMapMode], a
- callba LoadStatsScreenPageTilesGFX
- callba ClearSpriteAnims2
+ farcall LoadStatsScreenPageTilesGFX
+ farcall ClearSpriteAnims2
ld a, [CurPartyMon]
ld e, a
ld d, $0
@@ -1772,7 +1772,7 @@
ld a, [hl]
ld [wd265], a
ld e, $2
- callba LoadMenuMonIcon
+ farcall LoadMenuMonIcon
hlcoord 0, 1
ld b, 9
ld c, 18
@@ -1792,7 +1792,7 @@
hlcoord 5, 1
call PlaceString
push bc
- callba CopyPkmnToTempMon
+ farcall CopyPkmnToTempMon
pop hl
call PrintLevel
ld hl, PlayerHPPal
--- a/engine/stats_screen.asm
+++ b/engine/stats_screen.asm
@@ -33,7 +33,7 @@
call ClearBGPalettes
call ClearTileMap
call UpdateSprites
- callba StatsScreen_LoadFont
+ farcall StatsScreen_LoadFont
pop hl
call _hl_
call ClearBGPalettes
@@ -83,13 +83,13 @@
or $1
ld [wcf64], a
.loop
- callba Mobile_SetOverworldDelay
+ farcall Mobile_SetOverworldDelay
ld a, [wJumptableIndex]
and $7f
ld hl, StatsScreenPointerTable
rst JumpTable
call StatsScreen_WaitAnim
- callba MobileComms_CheckInactivityTimer
+ farcall MobileComms_CheckInactivityTimer
jr c, .exit
ld a, [wJumptableIndex]
bit 7, a
@@ -121,7 +121,7 @@
ret
.try_anim
- callba SetUpPokeAnim
+ farcall SetUpPokeAnim
jr nc, .finish
ld hl, wcf64
res 6, [hl]
@@ -128,7 +128,7 @@
.finish
ld hl, wcf64
res 5, [hl]
- callba HDMATransferTileMapToWRAMBank3
+ farcall HDMATransferTileMapToWRAMBank3
ret
StatsScreen_SetJumptableIndex: ; 4dd62 (13:5d62)
@@ -148,7 +148,7 @@
res 6, [hl]
call ClearBGPalettes
call ClearTileMap
- callba HDMATransferTileMapToWRAMBank3
+ farcall HDMATransferTileMapToWRAMBank3
call StatsScreen_CopyToTempMon
ld a, [CurPartySpecies]
cp EGG
@@ -234,7 +234,7 @@
jr .done
.breedmon
- callba CopyPkmnToTempMon
+ farcall CopyPkmnToTempMon
ld a, [CurPartySpecies]
cp EGG
jr z, .done
@@ -241,7 +241,7 @@
ld a, [MonType]
cp BOXMON
jr c, .done
- callba CalcTempmonStats
+ farcall CalcTempmonStats
.done
and a
ret
@@ -254,7 +254,7 @@
push hl
push de
push bc
- callba StatsScreenDPad
+ farcall StatsScreenDPad
pop bc
pop de
pop hl
@@ -419,7 +419,7 @@
ld a, [hli]
ld d, a
ld e, [hl]
- callba ComputeHPBarPixels
+ farcall ComputeHPBarPixels
ld hl, wCurHPPal
call SetHPPal
ld b, SCGB_STATS_SCREEN_HP_PALS
@@ -429,7 +429,7 @@
.PlaceGenderChar: ; 4df66 (13:5f66)
push hl
- callba GetGender
+ farcall GetGender
pop hl
ret c
ld a, "♂"
@@ -480,7 +480,7 @@
StatsScreen_PlaceShinyIcon: ; 4dfa6 (13:5fa6)
ld bc, TempMonDVs
- callba CheckShininess
+ farcall CheckShininess
ret nc
hlcoord 19, 0
ld [hl], "<SHINY>"
@@ -519,7 +519,7 @@
ld a, [wcf64]
and $3
ld c, a
- callba LoadStatsScreenPals
+ farcall LoadStatsScreenPals
call DelayFrame
ld hl, wcf64
set 5, [hl]
@@ -639,7 +639,7 @@
jr z, .AlreadyAtMaxLevel
inc a
ld d, a
- callba CalcExpAtLevel
+ farcall CalcExpAtLevel
ld hl, TempMonExp + 2
ld hl, TempMonExp + 2
ld a, [hQuotient + 2]
@@ -719,7 +719,7 @@
and a
ret z
ld b, a
- callba TimeCapsule_ReplaceTeruSama
+ farcall TimeCapsule_ReplaceTeruSama
ld a, b
ld [wd265], a
call GetItemName
@@ -768,7 +768,7 @@
ld hl, .OTNamePointers
call GetNicknamePointer
call CopyNickname
- callba CheckNickErrors
+ farcall CheckNickErrors
hlcoord 2, 13
call PlaceString
ld a, [TempMonCaughtGender]
@@ -1013,7 +1013,7 @@
call DelayFrame
hlcoord 0, 0
call PrepMonFrontpic
- callba HDMATransferTileMapToWRAMBank3
+ farcall HDMATransferTileMapToWRAMBank3
call StatsScreen_AnimateEgg
ld a, [TempMonHappiness]
--- a/engine/tempmon.asm
+++ b/engine/tempmon.asm
@@ -19,7 +19,7 @@
cp OTPARTYMON
jr z, .copywholestruct
ld bc, BOXMON_STRUCT_LENGTH
- callab CopyBoxmonToTempMon
+ callfar CopyBoxmonToTempMon
jr .done
.copywholestruct
--- a/engine/time.asm
+++ b/engine/time.asm
@@ -200,7 +200,7 @@
and a
jr z, .done ; not even a day has passed since game start
ld b, a
- callba ApplyPokerusTick
+ farcall ApplyPokerusTick
.done
xor a
ret
@@ -282,7 +282,7 @@
ld hl, Buffer1
call InitOneDayCountdown
call CloseSRAM
- callba Function1050c8
+ farcall Function1050c8
.not_timed_out
ld a, BANK(sMysteryGiftTimer)
--- a/engine/timeset.asm
+++ b/engine/timeset.asm
@@ -590,7 +590,7 @@
ld a, [hMinutes]
ld c, a
decoord 1, 14
- callba PrintHoursMins
+ farcall PrintHoursMins
ld hl, .DSTIsThatOK
ret
; 90a83 (24:4a83)
@@ -621,7 +621,7 @@
ld a, [hMinutes]
ld c, a
decoord 1, 14
- callba PrintHoursMins
+ farcall PrintHoursMins
ld hl, .IsThatOK
ret
; 90ab7
--- a/engine/tmhm2.asm
+++ b/engine/tmhm2.asm
@@ -23,7 +23,7 @@
.ConvertItemToTMHMNumber: ; 2c798 (b:4798)
ld a, [CurItem]
ld c, a
- callab GetNumberedTMHM
+ callfar GetNumberedTMHM
ld a, c
ld [CurItem], a
ret
@@ -31,7 +31,7 @@
ConvertCurItemIntoCurTMHM: ; 2c7a7 (b:47a7)
ld a, [CurItem]
ld c, a
- callab GetTMHMNumber
+ callfar GetTMHMNumber
ld a, c
ld [wCurTMHM], a
ret
@@ -77,18 +77,18 @@
call CopyBytes
call ClearBGPalettes
ChooseMonToLearnTMHM_NoRefresh: ; 2c80a
- callba LoadPartyMenuGFX
- callba InitPartyMenuWithCancel
- callba InitPartyMenuGFX
+ farcall LoadPartyMenuGFX
+ farcall InitPartyMenuWithCancel
+ farcall InitPartyMenuGFX
ld a, PARTYMENUACTION_TEACH_TMHM
ld [PartyMenuActionText], a
.loopback
- callba WritePartyMenuTilemap
- callba PrintPartyMenuText
+ farcall WritePartyMenuTilemap
+ farcall PrintPartyMenuText
call WaitBGMap
call SetPalettes
call DelayFrame
- callba PartyMenuSelect
+ farcall PartyMenuSelect
push af
ld a, [CurPartySpecies]
cp EGG
@@ -138,7 +138,7 @@
jr .nope
.compatible
- callab KnowsMove
+ callfar KnowsMove
jr c, .nope
predef LearnMove
@@ -146,13 +146,13 @@
and a
jr z, .nope
- callba TrainerRankings_TMsHMsTaught
+ farcall TrainerRankings_TMsHMsTaught
ld a, [CurItem]
call IsHM
ret c
ld c, HAPPINESS_LEARNMOVE
- callab ChangeHappiness
+ callfar ChangeHappiness
call ConsumeTM
jr .learned_move
--- a/engine/trade_animation.asm
+++ b/engine/trade_animation.asm
@@ -143,7 +143,7 @@
call ClearTileMap
call DisableLCD
call LoadFontsBattleExtra
- callab ClearSpriteAnims
+ callfar ClearSpriteAnims
ld a, [hCGB]
and a
jr z, .NotCGB
@@ -181,7 +181,7 @@
ld [hWX], a
ld a, $90
ld [hWY], a
- callba GetTrademonFrontpic
+ farcall GetTrademonFrontpic
call EnableLCD
call LoadTradeBallAndCableGFX
ld a, [wPlayerTrademonSpecies]
@@ -208,7 +208,7 @@
bit 7, a
jr nz, .finished
call .DoTradeAnimCommand
- callab PlaySpriteAnimations
+ callfar PlaySpriteAnimations
ld hl, wcf65
inc [hl]
call DelayFrame
@@ -342,7 +342,7 @@
push af
call DisableLCD
- callab ClearSpriteAnims
+ callfar ClearSpriteAnims
hlbgcoord 20, 3
ld bc, 12
ld a, $60
@@ -488,7 +488,7 @@
call ClearTileMap
call ClearSprites
call DisableLCD
- callab ClearSpriteAnims
+ callfar ClearSpriteAnims
hlbgcoord 0, 0
ld bc, sScratch - VBGMap0
ld a, " "
@@ -862,7 +862,7 @@
; 29487
TradeAnim_AnimateFrontpic: ; 29487
- callba AnimateTrademonFrontpic
+ farcall AnimateTrademonFrontpic
call TradeAnim_AdvanceScriptPointer
ret
@@ -1521,7 +1521,7 @@
LoadTradeBubbleGFX: ; 2985a
call DelayFrame
ld e, $3
- callab LoadMenuMonIcon
+ callfar LoadMenuMonIcon
ld de, TradeBubbleGFX
ld hl, VTiles0 tile $72
lb bc, BANK(TradeBubbleGFX), $4
--- a/engine/trademon_frontpic.asm
+++ b/engine/trademon_frontpic.asm
@@ -17,7 +17,7 @@
ld a, [wOTTrademonSpecies]
call IsAPokemon
ret c
- callba ShowOTTrademonStats
+ farcall ShowOTTrademonStats
ld a, [wOTTrademonSpecies]
ld [CurPartySpecies], a
ld a, [wOTTrademonDVs]
@@ -28,7 +28,7 @@
call GetSGBLayout
ld a, %11100100 ; 3,2,1,0
call DmgToCgbBGPals
- callba TradeAnim_ShowGetmonFrontpic
+ farcall TradeAnim_ShowGetmonFrontpic
ld a, [wOTTrademonSpecies]
ld [CurPartySpecies], a
hlcoord 7, 2
--- a/engine/trainer_card.asm
+++ b/engine/trainer_card.asm
@@ -34,7 +34,7 @@
call ClearTileMap
call DisableLCD
- callba GetCardPic
+ farcall GetCardPic
ld hl, CardRightCornerGFX
ld de, VTiles2 tile $1c
--- a/engine/unused_correct_party.asm
+++ b/engine/unused_correct_party.asm
@@ -107,7 +107,7 @@
push bc
call .GetLengthOfStringWith6CharCap
push de
- callba CheckStringForErrors
+ farcall CheckStringForErrors
pop hl
pop bc
jr nc, .valid_nickname
@@ -145,7 +145,7 @@
push bc
call .GetLengthOfStringWith6CharCap
push de
- callba CheckStringForErrors
+ farcall CheckStringForErrors
pop hl
jr nc, .valid_ot_name
ld d, h
--- a/engine/warp_connection.asm
+++ b/engine/warp_connection.asm
@@ -8,7 +8,7 @@
ld a, MAPCALLBACK_NEWMAP
call RunMapCallback
InitCommandQueue: ; 1045c4
- callba ClearCmdQueue
+ farcall ClearCmdQueue
ld a, MAPCALLBACK_CMDQUEUE
call RunMapCallback
call GetMapHeaderTimeOfDayNybble
@@ -225,8 +225,8 @@
res 6, [hl]
ld a, $1
ld [wSpriteUpdatesEnabled], a
- callba ReplaceTimeOfDayPals
- callba UpdateTimeOfDayPal
+ farcall ReplaceTimeOfDayPals
+ farcall UpdateTimeOfDayPal
call OverworldTextModeSwitch
call .ClearBGMap
call .PushAttrMap
@@ -239,7 +239,7 @@
ld [wBGMapAnchor], a
ld [hSCY], a
ld [hSCX], a
- callba ApplyBGMapAnchorToObjects
+ farcall ApplyBGMapAnchorToObjects
ld a, [rVBK]
push af
@@ -298,9 +298,9 @@
ld [hMapAnims], a
xor a
ld [hTileAnimFrame], a
- callba RefreshSprites
+ farcall RefreshSprites
call LoadFontsExtra
- callba LoadOverworldFont
+ farcall LoadOverworldFont
ret
LoadMapPalettes: ; 1047eb
@@ -310,10 +310,10 @@
RefreshMapSprites: ; 1047f0
call ClearSprites
- callba ReturnFromMapSetupScript
+ farcall ReturnFromMapSetupScript
call GetMovementPermissions
- callba RefreshPlayerSprite
- callba CheckReplaceKrisSprite
+ farcall RefreshPlayerSprite
+ farcall CheckReplaceKrisSprite
ld hl, wPlayerSpriteSetupFlags
bit 6, [hl]
jr nz, .skip
--- a/engine/wildmons.asm
+++ b/engine/wildmons.asm
@@ -805,7 +805,7 @@
; Finds a rare wild Pokemon in the route of the trainer calling, then checks if it's been Seen already.
; The trainer will then tell you about the Pokemon if you haven't seen it.
RandomUnseenWildMon: ; 2a4ab
- callba GetCallerLocation
+ farcall GetCallerLocation
ld d, b
ld e, c
ld hl, JohtoGrassWildMons
@@ -878,7 +878,7 @@
; 0x2a51f
RandomPhoneWildMon: ; 2a51f
- callba GetCallerLocation
+ farcall GetCallerLocation
ld d, b
ld e, c
ld hl, JohtoGrassWildMons
@@ -919,7 +919,7 @@
RandomPhoneMon: ; 2a567
; Get a random monster owned by the trainer who's calling.
- callba GetCallerLocation
+ farcall GetCallerLocation
ld hl, TrainerGroups
ld a, d
dec a
--- a/event/buena.asm
+++ b/event/buena.asm
@@ -5,7 +5,7 @@
call CopyMenuDataHeader
ld a, [wBuenasPassword]
ld c, a
- callba GetBuenasPassword
+ farcall GetBuenasPassword
ld a, [wMenuBorderLeftCoord]
add c
add $2
@@ -12,7 +12,7 @@
ld [wMenuBorderRightCoord], a
call PushWindow
call DoNthMenu ; menu
- callba Buena_ExitMenu
+ farcall Buena_ExitMenu
ld b, $0
ld a, [MenuSelection]
ld c, a
@@ -58,7 +58,7 @@
ld a, [MenuSelection]
add c
ld c, a
- callba GetBuenasPassword
+ farcall GetBuenasPassword
pop hl
call PlaceString
ret
--- a/event/bug_contest/caught_mon.asm
+++ b/event/bug_contest/caught_mon.asm
@@ -3,8 +3,8 @@
and a
jr z, .firstcatch
ld [wd265], a
- callba DisplayAlreadyCaughtText
- callba DisplayCaughtContestMonStats
+ farcall DisplayAlreadyCaughtText
+ farcall DisplayCaughtContestMonStats
lb bc, 14, 7
call PlaceYesNoBox
ret c
--- a/event/bug_contest/contest.asm
+++ b/event/bug_contest/contest.asm
@@ -3,7 +3,7 @@
ld [wContestMon], a
ld a, 20
ld [wParkBallsRemaining], a
- callba StartBugContestTimer
+ farcall StartBugContestTimer
ret
BugCatchingContestBattleScript:: ; 0x135eb
--- a/event/bug_contest/judging.asm
+++ b/event/bug_contest/judging.asm
@@ -1,6 +1,6 @@
_BugContestJudging: ; 1369d
call ContestScore
- callba TrainerRankings_BugContestScore
+ farcall TrainerRankings_BugContestScore
call BugContest_JudgeContestants
ld a, [wBugContestThirdPlacePersonID]
call LoadContestantName
@@ -97,7 +97,7 @@
push hl
push bc
; Get the Trainer Class name and copy it into wBugContestWinnerName.
- callab GetTrainerClassName
+ callfar GetTrainerClassName
ld hl, StringBuffer1
ld de, wBugContestWinnerName
ld bc, TRAINER_CLASS_NAME_LENGTH
@@ -120,7 +120,7 @@
; Get the name of the trainer with class c and ID b.
ld a, [hl]
ld b, a
- callab GetTrainerName
+ callfar GetTrainerName
; Append the name to wBugContestWinnerName.
ld hl, StringBuffer1
pop de
--- a/event/catch_tutorial.asm
+++ b/event/catch_tutorial.asm
@@ -41,7 +41,7 @@
ld hl, .AutoInput
ld a, BANK(.AutoInput)
call StartAutoInput
- callab StartBattle
+ callfar StartBattle
call StopAutoInput
pop af
--- a/event/celebi.asm
+++ b/event/celebi.asm
@@ -31,7 +31,7 @@
push de
ld a, $90
ld [wCurrSpriteOAMAddr], a
- callba DoNextFrameForAllSprites
+ farcall DoNextFrameForAllSprites
call CelebiEvent_CountDown
ld c, 2
call DelayFrames
@@ -70,7 +70,7 @@
; 49912
LoadCelebiGFX: ; 49912
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
ld de, SpecialCelebiLeafGFX
ld hl, VTiles1
lb bc, BANK(SpecialCelebiLeafGFX), 4
--- a/event/daycare.asm
+++ b/event/daycare.asm
@@ -30,7 +30,7 @@
jr c, .cancel
call DayCareAskDepositPokemon
jr c, .print_text
- callba DepositMonWithDayCareMan
+ farcall DepositMonWithDayCareMan
ld hl, wDayCareMan
set 0, [hl]
call DayCare_DepositPokemonText
@@ -38,12 +38,12 @@
ret
.AskWithdrawMon:
- callba GetBreedMon1LevelGrowth
+ farcall GetBreedMon1LevelGrowth
ld hl, wBreedMon1Nick
call GetPriceToRetrieveBreedmon
call DayCare_AskWithdrawBreedMon
jr c, .print_text
- callba RetrievePokemonFromDayCareMan
+ farcall RetrievePokemonFromDayCareMan
call DayCare_TakeMoney_PlayCry
ld hl, wDayCareMan
res 0, [hl]
@@ -69,7 +69,7 @@
jr c, .cancel
call DayCareAskDepositPokemon
jr c, .print_text
- callba DepositMonWithDayCareLady
+ farcall DepositMonWithDayCareLady
ld hl, wDayCareLady
set 0, [hl]
call DayCare_DepositPokemonText
@@ -77,12 +77,12 @@
ret
.AskWithdrawMon:
- callba GetBreedMon2LevelGrowth
+ farcall GetBreedMon2LevelGrowth
ld hl, wBreedMon2Nick
call GetPriceToRetrieveBreedmon
call DayCare_AskWithdrawBreedMon
jr c, .print_text
- callba RetrievePokemonFromDayCareLady
+ farcall RetrievePokemonFromDayCareLady
call DayCare_TakeMoney_PlayCry
ld hl, wDayCareLady
res 0, [hl]
@@ -124,12 +124,12 @@
ld a, DAYCARETEXT_WHICH_ONE
call PrintDayCareText
ld b, PARTYMENUACTION_GIVE_MON
- callba SelectTradeOrDayCareMon
+ farcall SelectTradeOrDayCareMon
jr c, .Declined
ld a, [CurPartySpecies]
cp EGG
jr z, .Egg
- callba CheckCurPartyMonFainted
+ farcall CheckCurPartyMonFainted
jr c, .OutOfUsableMons
ld hl, PartyMon1Item
ld bc, PARTYMON_STRUCT_LENGTH
@@ -136,7 +136,7 @@
ld a, [CurPartyMon]
call AddNTimes
ld d, [hl]
- callba ItemIsMail
+ farcall ItemIsMail
jr c, .HoldingMail
ld hl, PartyMonNicknames
ld a, [CurPartyMon]
@@ -209,7 +209,7 @@
.check_money
ld de, Money
ld bc, StringBuffer2 + 2
- callba CompareMoney
+ farcall CompareMoney
jr c, .not_enough_money
ld a, [PartyCount]
cp PARTY_LENGTH
@@ -236,7 +236,7 @@
DayCare_TakeMoney_PlayCry: ; 16850
ld bc, StringBuffer2 + 2
ld de, Money
- callba TakeMoney
+ farcall TakeMoney
ld a, DAYCARETEXT_WITHDRAW
call PrintDayCareText
ld a, [CurPartySpecies]
@@ -596,7 +596,7 @@
ld a, [wDayCareMan]
bit 0, a
ret z
- callab CheckBreedmonCompatibility
+ callfar CheckBreedmonCompatibility
ld a, [wd265]
and a
ret z
@@ -639,7 +639,7 @@
cp DITTO
ld a, $0
jr z, .LoadWhichBreedmonIsTheMother
- callba GetGender
+ farcall GetGender
ld a, $0
jr z, .LoadWhichBreedmonIsTheMother
inc a
@@ -653,8 +653,8 @@
.GotMother:
ld [CurPartySpecies], a
- callab GetPreEvolution
- callab GetPreEvolution
+ callfar GetPreEvolution
+ callfar GetPreEvolution
ld a, EGG_LEVEL
ld [CurPartyLevel], a
@@ -685,7 +685,7 @@
xor a
ld [Buffer1], a
predef FillMoves
- callba InitEggMoves
+ farcall InitEggMoves
ld hl, wEggMonID
ld a, [PlayerID]
ld [hli], a
@@ -693,7 +693,7 @@
ld [hl], a
ld a, [CurPartyLevel]
ld d, a
- callab CalcExpAtLevel
+ callfar CalcExpAtLevel
ld hl, wEggMonExp
ld a, [hMultiplicand]
ld [hli], a
@@ -726,7 +726,7 @@
ld a, TEMPMON
ld [MonType], a
push hl
- callba GetGender
+ farcall GetGender
pop hl
ld de, wBreedMon1DVs
ld bc, wBreedMon2DVs
--- a/event/field_moves.asm
+++ b/event/field_moves.asm
@@ -7,20 +7,20 @@
; 8c7e1
BlindingFlash: ; 8c7e1
- callba FadeOutPalettes
+ farcall FadeOutPalettes
ld hl, StatusFlags
set 2, [hl] ; Flash
- callba ReplaceTimeOfDayPals
- callba UpdateTimeOfDayPal
+ farcall ReplaceTimeOfDayPals
+ farcall UpdateTimeOfDayPal
ld b, SCGB_MAPPALS
call GetSGBLayout
- callba LoadOW_BGPal7
- callba FadeInPalettes
+ farcall LoadOW_BGPal7
+ farcall FadeInPalettes
ret
; 8c80a
ShakeHeadbuttTree: ; 8c80a
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
ld de, CutGrassGFX
ld hl, VTiles1
lb bc, BANK(CutGrassGFX), 4
@@ -37,7 +37,7 @@
ld [hl], $84
ld a, 36 * 4
ld [wCurrSpriteOAMAddr], a
- callba DoNextFrameForAllSprites
+ farcall DoNextFrameForAllSprites
call HideHeadbuttTree
ld a, $20
ld [wcf64], a
@@ -52,7 +52,7 @@
dec [hl]
ld a, 36 * 4
ld [wCurrSpriteOAMAddr], a
- callba DoNextFrameForAllSprites
+ farcall DoNextFrameForAllSprites
call DelayFrame
jr .loop
@@ -61,7 +61,7 @@
call WaitBGMap
xor a
ld [hBGMapMode], a
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
ld hl, Sprites + 36 * 4
ld bc, SpritesEnd - (Sprites + 36 * 4)
xor a
@@ -129,7 +129,7 @@
jr nz, .finish
ld a, 36 * 4
ld [wCurrSpriteOAMAddr], a
- callab DoNextFrameForAllSprites
+ callfar DoNextFrameForAllSprites
call OWCutJumptable
call DelayFrame
jr .loop
@@ -139,7 +139,7 @@
; 8c96d
.LoadCutGFX: ; 8c96d
- callab ClearSpriteAnims ; pointless to farcall
+ callfar ClearSpriteAnims ; pointless to farcall
ld de, CutGrassGFX
ld hl, VTiles1
lb bc, BANK(CutGrassGFX), 4
@@ -343,7 +343,7 @@
jr nz, .exit
ld a, 0 * 4
ld [wCurrSpriteOAMAddr], a
- callab DoNextFrameForAllSprites
+ callfar DoNextFrameForAllSprites
call FlyFunction_FrameTimer
call DelayFrame
jr .loop
@@ -381,7 +381,7 @@
jr nz, .exit
ld a, 0 * 4
ld [wCurrSpriteOAMAddr], a
- callab DoNextFrameForAllSprites
+ callfar DoNextFrameForAllSprites
call FlyFunction_FrameTimer
call DelayFrame
jr .loop
@@ -411,7 +411,7 @@
ret
FlyFunction_InitGFX: ; 8cb9b (23:4b9b)
- callab ClearSpriteAnims
+ callfar ClearSpriteAnims
ld de, CutGrassGFX
ld hl, VTiles1 tile $00
lb bc, BANK(CutGrassGFX), 4
@@ -424,7 +424,7 @@
ld a, [hl]
ld [wd265], a
ld e, $84
- callba FlyFunction_GetMonIcon
+ farcall FlyFunction_GetMonIcon
xor a
ld [wJumptableIndex], a
ret
--- a/event/halloffame.asm
+++ b/event/halloffame.asm
@@ -14,7 +14,7 @@
ld hl, StatusFlags
set 6, [hl] ; hall of fame
- callba HallOfFame_InitSaveIfNeeded
+ farcall HallOfFame_InitSaveIfNeeded
ld hl, wHallOfFameCount
ld a, [hl]
@@ -22,9 +22,9 @@
jr nc, .ok
inc [hl]
.ok
- callba SaveGameData
+ farcall SaveGameData
call GetHallOfFameParty
- callba AddHallOfFameEntry
+ farcall AddHallOfFameEntry
xor a
ld [wGameLogicPaused], a
@@ -31,7 +31,7 @@
call AnimateHallOfFame
pop af
ld b, a
- callba Credits
+ farcall Credits
ret
; 0x86455
@@ -42,11 +42,11 @@
ld [MusicFadeID + 1], a
ld a, 10
ld [MusicFade], a
- callba FadeOutPalettes
+ farcall FadeOutPalettes
xor a
ld [VramState], a
ld [hMapAnims], a
- callba InitDisplayForRedCredits
+ farcall InitDisplayForRedCredits
ld c, 8
call DelayFrames
call DisableSpriteUpdates
@@ -54,7 +54,7 @@
ld [wSpawnAfterChampion], a
ld a, [StatusFlags]
ld b, a
- callba Credits
+ farcall Credits
ret
; 8648e
@@ -65,11 +65,11 @@
ld [MusicFadeID + 1], a
ld a, 10
ld [MusicFade], a
- callba FadeOutPalettes
+ farcall FadeOutPalettes
xor a
ld [VramState], a
ld [hMapAnims], a
- callba InitDisplayForHallOfFame
+ farcall InitDisplayForHallOfFame
ld c, 100
jp DelayFrames
; 864b4
@@ -232,7 +232,7 @@
AnimateHOFMonEntrance: ; 865b5
push hl
call ClearBGPalettes
- callba ResetDisplayBetweenHallOfFameMons
+ farcall ResetDisplayBetweenHallOfFameMons
pop hl
ld a, [hli]
ld [TempMonSpecies], a
@@ -499,7 +499,7 @@
call PlaceString
ld a, TEMPMON
ld [MonType], a
- callba GetGender
+ farcall GetGender
ld a, " "
jr c, .got_gender
ld a, "♂"
@@ -541,7 +541,7 @@
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
ld a, " "
call ByteFill
- callba GetPlayerBackpic
+ farcall GetPlayerBackpic
ld a, $31
ld [hGraphicStartTile], a
hlcoord 6, 6
@@ -565,7 +565,7 @@
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
ld a, " "
call ByteFill
- callba HOF_LoadTrainerFrontpic
+ farcall HOF_LoadTrainerFrontpic
xor a
ld [hGraphicStartTile], a
hlcoord 12, 5
@@ -612,7 +612,7 @@
lb bc, PRINTNUM_LEADINGZEROS | 1, 2
call PrintNum
call WaitBGMap
- callba ProfOaksPCRating
+ farcall ProfOaksPCRating
ret
; 868ed
--- a/event/happiness_egg.asm
+++ b/event/happiness_egg.asm
@@ -196,7 +196,7 @@
call Random
ld [hl], a
- callab CheckBreedmonCompatibility
+ callfar CheckBreedmonCompatibility
ld a, [wd265]
cp 230
ld b, -1 + 32 percent
--- a/event/itemfinder.asm
+++ b/event/itemfinder.asm
@@ -1,5 +1,5 @@
ItemFinder: ; 12580
- callba CheckForHiddenItems
+ farcall CheckForHiddenItems
jr c, .found_something
ld hl, .Script_FoundNothing
jr .resume
--- a/event/kurt.asm
+++ b/event/kurt.asm
@@ -57,7 +57,7 @@
; 88055
Kurt_SelectApricorn: ; 88055
- callba FindApricornsInBag
+ farcall FindApricornsInBag
jr c, .nope
ld hl, .MenuDataHeader
call CopyMenuDataHeader
@@ -106,7 +106,7 @@
ld a, [MenuSelection]
and a
ret z
- callba PlaceMenuItemName
+ farcall PlaceMenuItemName
ret
; 880ab
@@ -117,7 +117,7 @@
ret z
ld a, [wItemQuantityChangeBuffer]
ld [MenuSelectionQuantity], a
- callba PlaceMenuItemQuantity
+ farcall PlaceMenuItemQuantity
ret
; 880c2
@@ -140,7 +140,7 @@
call .PlaceApricornName
call PlaceApricornQuantity
call ApplyTilemap
- callba Kurt_SelectQuantity_InterpretJoypad
+ farcall Kurt_SelectQuantity_InterpretJoypad
jr nc, .loop
push bc
@@ -171,7 +171,7 @@
add hl, de
ld d, h
ld e, l
- callba PlaceMenuItemName
+ farcall PlaceMenuItemName
ret
; 88126
--- a/event/lucky_number.asm
+++ b/event/lucky_number.asm
@@ -103,7 +103,7 @@
ld a, [ScriptVar]
and a
ret z ; found nothing
- callba TrainerRankings_LuckyNumberShow
+ farcall TrainerRankings_LuckyNumberShow
ld a, [wFoundMatchingIDInParty]
and a
push af
--- a/event/magikarp.asm
+++ b/event/magikarp.asm
@@ -5,7 +5,7 @@
; Returns 0 if the Pokemon you select is not a Magikarp.
; Let's start by selecting a Magikarp.
- callba SelectMonFromParty
+ farcall SelectMonFromParty
jr c, .declined
ld a, [CurPartySpecies]
cp MAGIKARP
@@ -28,7 +28,7 @@
ld c, l
call CalcMagikarpLength
call PrintMagikarpLength
- callba TrainerRankings_MagikarpLength
+ farcall TrainerRankings_MagikarpLength
ld hl, .MeasureItText
call PrintText
--- a/event/magnet_train.asm
+++ b/event/magnet_train.asm
@@ -45,7 +45,7 @@
jr z, .initialize
bit 7, a
jr nz, .done
- callab PlaySpriteAnimations
+ callfar PlaySpriteAnimations
call MagnetTrain_Jumptable
call MagnetTrain_UpdateLYOverrides
call PushLYOverrides
@@ -117,7 +117,7 @@
call ClearBGPalettes
call ClearSprites
call DisableLCD
- callab ClearSpriteAnims
+ callfar ClearSpriteAnims
call SetMagnetTrainPals
call DrawMagnetTrain
ld a, $90
@@ -131,7 +131,7 @@
push af
ld a, $1
ld [rSVBK], a
- callba GetPlayerIcon
+ farcall GetPlayerIcon
pop af
ld [rSVBK], a
ld hl, VTiles0
@@ -423,7 +423,7 @@
; 8ceae
MagnetTrain_Jumptable_FirstRunThrough: ; 8ceae
- callba PlaySpriteAnimations
+ farcall PlaySpriteAnimations
call MagnetTrain_Jumptable
call MagnetTrain_UpdateLYOverrides
call PushLYOverrides
--- a/event/mom.asm
+++ b/event/mom.asm
@@ -161,7 +161,7 @@
jr z, .CancelDeposit
ld de, Money
ld bc, StringBuffer2
- callba CompareMoney
+ farcall CompareMoney
jr c, .DontHaveThatMuchToDeposit
ld hl, StringBuffer2
ld de, StringBuffer2 + 3
@@ -169,11 +169,11 @@
call CopyBytes
ld bc, wMomsMoney
ld de, StringBuffer2
- callba GiveMoney
+ farcall GiveMoney
jr c, .CantDepositThatMuch
ld bc, StringBuffer2 + 3
ld de, Money
- callba TakeMoney
+ farcall TakeMoney
ld hl, StringBuffer2
ld de, wMomsMoney
ld bc, 3
@@ -232,15 +232,15 @@
call CopyBytes
ld de, wMomsMoney
ld bc, StringBuffer2
- callba CompareMoney
+ farcall CompareMoney
jr c, .InsufficientFundsInBank
ld bc, Money
ld de, StringBuffer2
- callba GiveMoney
+ farcall GiveMoney
jr c, .NotEnoughRoomInWallet
ld bc, StringBuffer2 + 3
ld de, wMomsMoney
- callba TakeMoney
+ farcall TakeMoney
ld hl, StringBuffer2
ld de, Money
ld bc, 3
@@ -568,7 +568,7 @@
ld c, l
ld b, h
ld de, StringBuffer2
- callba GiveMoney
+ farcall GiveMoney
ret
.decrementdigit
@@ -577,7 +577,7 @@
ld c, l
ld b, h
ld de, StringBuffer2
- callba TakeMoney
+ farcall TakeMoney
ret
.getdigitquantity
--- a/event/mom_phone.asm
+++ b/event/mom_phone.asm
@@ -20,7 +20,7 @@
ret nc
ld b, BANK(.Script)
ld de, .Script
- callba LoadScriptBDE
+ farcall LoadScriptBDE
scf
ret
; fd00f
@@ -71,7 +71,7 @@
ld [hMoneyTemp + 2], a
ld de, wMomsMoney
ld bc, hMoneyTemp
- callba CompareMoney
+ farcall CompareMoney
jr nc, .have_enough_money
.nope
@@ -91,7 +91,7 @@
.loop
ld de, MomItemTriggerBalance
ld bc, wMomsMoney
- callba CompareMoney
+ farcall CompareMoney
jr z, .exact
jr nc, .less_than
call .AddMoney
@@ -113,7 +113,7 @@
.AddMoney:
ld de, MomItemTriggerBalance
ld bc, hMoneyTemp
- callba AddMoney
+ farcall AddMoney
ret
; fd0a6
@@ -130,7 +130,7 @@
ld [hMoneyTemp + 2], a
ld de, wMomsMoney
ld bc, hMoneyTemp
- callba TakeMoney
+ farcall TakeMoney
ret
@@ -144,7 +144,7 @@
ld a, [hl]
ld c, a
ld b, 1
- callba DecorationFlagAction_c
+ farcall DecorationFlagAction_c
scf
ret
--- a/event/move_deleter.asm
+++ b/event/move_deleter.asm
@@ -5,7 +5,7 @@
jr c, .declined
ld hl, .AskWhichMonText
call PrintText
- callba SelectMonFromParty
+ farcall SelectMonFromParty
jr c, .declined
ld a, [CurPartySpecies]
cp EGG
@@ -20,7 +20,7 @@
ld hl, .AskWhichMoveText
call PrintText
call LoadStandardMenuDataHeader
- callba ChooseMoveToDelete
+ farcall ChooseMoveToDelete
push af
call ReturnToMapWithSpeechTextbox
pop af
--- a/event/move_tutor.asm
+++ b/event/move_tutor.asm
@@ -12,12 +12,12 @@
ld [wPutativeTMHMMove], a
call GetMoveName
call CopyName1
- callba ChooseMonToLearnTMHM
+ farcall ChooseMonToLearnTMHM
jr c, .cancel
jr .enter_loop
.loop
- callba ChooseMonToLearnTMHM_NoRefresh
+ farcall ChooseMonToLearnTMHM_NoRefresh
jr c, .cancel
.enter_loop
call CheckCanLearnMoveTutorMove
@@ -75,7 +75,7 @@
jr .didnt_learn
.can_learn
- callab KnowsMove
+ callfar KnowsMove
jr c, .didnt_learn
predef LearnMove
@@ -84,7 +84,7 @@
jr z, .didnt_learn
ld c, HAPPINESS_LEARNMOVE
- callab ChangeHappiness
+ callfar ChangeHappiness
jr .learned
.didnt_learn
--- a/event/name_rater.asm
+++ b/event/name_rater.asm
@@ -7,7 +7,7 @@
; Select a Pokemon from your party
ld hl, NameRaterWhichMonText
call PrintText
- callba SelectMonFromParty
+ farcall SelectMonFromParty
jr c, .cancel
; He can't rename an egg...
ld a, [CurPartySpecies]
@@ -34,7 +34,7 @@
call GetBaseData
ld b, 0
ld de, StringBuffer2
- callba _NamingScreen
+ farcall _NamingScreen
; If the new name is empty, treat it as unchanged.
call IsNewNameEmpty
ld hl, NameRaterSameAsBeforeText
--- a/event/overworld.asm
+++ b/event/overworld.asm
@@ -37,7 +37,7 @@
; Check engine flag de
; Return carry if flag is not set
ld b, CHECK_FLAG
- callba EngineFlagAction
+ farcall EngineFlagAction
ld a, c
and a
jr nz, .isset
@@ -177,7 +177,7 @@
call GetFacingTileCoord
ld c, a
push de
- callba CheckCutCollision
+ farcall CheckCutCollision
pop de
jr nc, .fail
; Get the location of the current block in OverworldMap.
@@ -233,7 +233,7 @@
call DelayFrame
ld a, [Buffer6] ; Animation type
ld e, a
- callba OWCutAnimation
+ farcall OWCutAnimation
call BufferScreen
call GetMovementPermissions
call UpdateSprites
@@ -290,10 +290,10 @@
.CheckUseFlash: ; c8b5
; Flash
ld de, ENGINE_ZEPHYRBADGE
- callba CheckBadge
+ farcall CheckBadge
jr c, .nozephyrbadge
push hl
- callba SpecialAerodactylChamber
+ farcall SpecialAerodactylChamber
pop hl
jr c, .useflash
ld a, [wTimeOfDayPalset]
@@ -372,7 +372,7 @@
jr nz, .cannotsurf
call CheckDirection
jr c, .cannotsurf
- callba CheckFacingObject
+ farcall CheckFacingObject
jr c, .cannotsurf
ld a, $1
ret
@@ -428,7 +428,7 @@
end
.empty_fn ; c9a2
- callba TrainerRankings_Surf
+ farcall TrainerRankings_Surf
ret
UsedSurfText: ; c9a9
@@ -581,7 +581,7 @@
ld [hMapAnims], a
call LoadStandardMenuDataHeader
call ClearSprites
- callba _FlyMap
+ farcall _FlyMap
ld a, e
cp -1
jr z, .illegal
@@ -634,10 +634,10 @@
end
.ReturnFromFly: ; cacb
- callba Function561d
+ farcall Function561d
call DelayFrame
call ReplaceKrisSprite
- callba LoadOverworldFont
+ farcall LoadOverworldFont
ret
WaterfallFunction: ; cade
@@ -649,7 +649,7 @@
.TryWaterfall: ; cae7
; Waterfall
ld de, ENGINE_RISINGBADGE
- callba CheckBadge
+ farcall CheckBadge
ld a, $80
ret c
call CheckMapCanWaterfall
@@ -701,7 +701,7 @@
ld a, [PlayerStandingTile]
call CheckWaterfallTile
ret z
- callba TrainerRankings_Waterfall
+ farcall TrainerRankings_Waterfall
ld a, $1
ld [ScriptVar], a
ret
@@ -821,7 +821,7 @@
ret
.escaperope
- callba SpecialKabutoChamber
+ farcall SpecialKabutoChamber
ld hl, .UsedEscapeRopeScript
call QueueScript
ld a, $81
@@ -915,7 +915,7 @@
ld d, a
ld a, [wLastSpawnMapNumber]
ld e, a
- callba IsSpawnPoint
+ farcall IsSpawnPoint
jr nc, .nope
ld a, c
ld [DefaultSpawnpoint], a
@@ -1206,7 +1206,7 @@
call OverworldTextModeSwitch
ld a, [Buffer6]
ld e, a
- callba PlayWhirlpoolSound
+ farcall PlayWhirlpoolSound
call BufferScreen
call GetMovementPermissions
ret
@@ -1360,7 +1360,7 @@
ret
GetFacingObject: ; cf0d
- callba CheckFacingObject
+ farcall CheckFacingObject
jr nc, .fail
ld a, [hObjectStructIndexBuffer]
@@ -1495,7 +1495,7 @@
ld d, a
ld a, [Buffer2]
ld e, a
- callba Fish
+ farcall Fish
ld a, d
and a
jr z, .nonibble
--- a/event/poisonstep.asm
+++ b/event/poisonstep.asm
@@ -132,8 +132,8 @@
and %10
jr z, .mon_not_fainted
ld c, HAPPINESS_POISONFAINT
- callba ChangeHappiness
- callba GetPartyNick
+ farcall ChangeHappiness
+ farcall GetPartyNick
ld hl, .PoisonFaintText
call PrintText
--- a/event/poisonstep_pals.asm
+++ b/event/poisonstep_pals.asm
@@ -20,7 +20,7 @@
call DmgToCgbBGPals
ld c, 4
call DelayFrames
- callba _UpdateTimePals
+ farcall _UpdateTimePals
ret
.cgb
@@ -44,5 +44,5 @@
ld [hCGBPalUpdate], a
ld c, 4
call DelayFrames
- callba _UpdateTimePals
+ farcall _UpdateTimePals
ret
--- a/event/poke_seer.asm
+++ b/event/poke_seer.asm
@@ -21,7 +21,7 @@
call JoyWaitAorB
ld b, $6
- callba SelectMonFromParty
+ farcall SelectMonFromParty
jr c, .cancel
ld a, [CurPartySpecies]
@@ -240,7 +240,7 @@
cp $7e
jr z, .fail
ld e, a
- callba GetLandmarkName
+ farcall GetLandmarkName
ld hl, StringBuffer1
ld de, wSeerCaughtLocation
ld bc, 17
--- a/event/print_photo.asm
+++ b/event/print_photo.asm
@@ -1,7 +1,7 @@
PhotoStudio: ; 16dc7
ld hl, .Text_AskWhichMon
call PrintText
- callba SelectMonFromParty
+ farcall SelectMonFromParty
jr c, .cancel
ld a, [CurPartySpecies]
cp EGG
@@ -10,7 +10,7 @@
ld hl, .Text_HoldStill
call PrintText
call DisableSpriteUpdates
- callba PrintPartymon
+ farcall PrintPartymon
call ReturnToMapWithSpeechTextbox
ld a, [hPrinter]
and a
--- a/event/print_unown.asm
+++ b/event/print_unown.asm
@@ -81,7 +81,7 @@
.pressed_a
ld a, [wJumptableIndex]
push af
- callba PrintUnownStamp
+ farcall PrintUnownStamp
call RestartMapMusic
pop af
ld [wJumptableIndex], a
@@ -148,7 +148,7 @@
lb bc, 7, 7
predef PlaceGraphic
ld de, VTiles2 tile $31
- callba RotateUnownFrontpic
+ farcall RotateUnownFrontpic
ret
.Load2bppToSRAM: ; 16cff
--- a/event/special.asm
+++ b/event/special.asm
@@ -15,7 +15,7 @@
; Caught data.
ld b, 0
- callba SetGiftPartyMonCaughtData
+ farcall SetGiftPartyMonCaughtData
; Holding a Berry.
ld bc, PARTYMON_STRUCT_LENGTH
@@ -71,7 +71,7 @@
db "SHUCKIE@"
SpecialReturnShuckle: ; 737e
- callba SelectMonFromParty
+ farcall SelectMonFromParty
jr c, .refused
ld a, [CurPartySpecies]
@@ -107,7 +107,7 @@
jr .CheckOT
.done
- callba CheckCurPartyMonFainted
+ farcall CheckCurPartyMonFainted
jr c, .fainted
ld a, [CurPartyMon]
ld hl, PartyMon1Happiness
@@ -119,7 +119,7 @@
jr nc, .HappyToStayWithYou
xor a ; take from pc
ld [wPokemonWithdrawDepositParameter], a
- callab RemoveMonFromPartyOrBox
+ callfar RemoveMonFromPartyOrBox
ld a, $2
.HappyToStayWithYou:
ld [ScriptVar], a
@@ -141,7 +141,7 @@
ret
Special_BillsGrandfather: ; 73f7
- callba SelectMonFromParty
+ farcall SelectMonFromParty
jr c, .cancel
ld a, [CurPartySpecies]
ld [ScriptVar], a
@@ -167,7 +167,7 @@
MassageOrHaircut: ; 7420
push hl
- callba SelectMonFromParty
+ farcall SelectMonFromParty
pop hl
jr c, .nope
ld a, [CurPartySpecies]
--- a/event/squirtbottle.asm
+++ b/event/squirtbottle.asm
@@ -29,7 +29,7 @@
cp MAP_ROUTE_36
jr nz, .nope
- callba GetFacingObject
+ farcall GetFacingObject
jr c, .nope
ld a, d
--- a/event/sweet_scent.asm
+++ b/event/sweet_scent.asm
@@ -34,21 +34,21 @@
; 0x506ef
SweetScentEncounter: ; 506ef
- callba CanUseSweetScent
+ farcall CanUseSweetScent
jr nc, .no_battle
ld hl, StatusFlags2
bit 2, [hl]
jr nz, .not_in_bug_contest
- callba GetMapEncounterRate
+ farcall GetMapEncounterRate
ld a, b
and a
jr z, .no_battle
- callba ChooseWildEncounter
+ farcall ChooseWildEncounter
jr nz, .no_battle
jr .start_battle
.not_in_bug_contest
- callba ChooseWildEncounter_BugContest
+ farcall ChooseWildEncounter_BugContest
.start_battle
ld a, $1
--- a/event/whiteout.asm
+++ b/event/whiteout.asm
@@ -49,7 +49,7 @@
; 12513
HalveMoney: ; 12513
- callba TrainerRankings_WhiteOuts
+ farcall TrainerRankings_WhiteOuts
; Halve the player's money.
ld hl, Money
@@ -71,7 +71,7 @@
ld d, a
ld a, [wLastSpawnMapNumber]
ld e, a
- callba IsSpawnPoint
+ farcall IsSpawnPoint
ld a, c
jr c, .yes
xor a ; SPAWN_HOME
--- a/gfx/mail.asm
+++ b/gfx/mail.asm
@@ -16,7 +16,7 @@
push de
ld a, BANK(sPartyMail)
call GetSRAMBank
- callba IsMailEuropean
+ farcall IsMailEuropean
call CloseSRAM
ld a, c
ld de, StandardEnglishFont
@@ -37,7 +37,7 @@
call WaitBGMap
ld a, [Buffer3]
ld e, a
- callba LoadMailPalettes
+ farcall LoadMailPalettes
call SetPalettes
xor a
ld [hJoyPressed], a
@@ -59,7 +59,7 @@
.pressed_start
ld a, [wJumptableIndex]
push af
- callab PrintMail ; printer
+ callfar PrintMail ; printer
pop af
ld [wJumptableIndex], a
jr .loop
--- a/gfx/pics/animation.asm
+++ b/gfx/pics/animation.asm
@@ -93,7 +93,7 @@
.loop
call SetUpPokeAnim
push af
- callba HDMATransferTileMapToWRAMBank3
+ farcall HDMATransferTileMapToWRAMBank3
pop af
jr nc, .loop
ret
@@ -282,9 +282,9 @@
ld a, $2
ld [rSVBK], a
call PokeAnim_PlaceGraphic
- callba HDMATransferTileMapToWRAMBank3
+ farcall HDMATransferTileMapToWRAMBank3
call PokeAnim_SetVBank0
- callba HDMATransferAttrMapToWRAMBank3
+ farcall HDMATransferAttrMapToWRAMBank3
pop af
ld [rSVBK], a
ret
@@ -881,7 +881,7 @@
xor a
ld [hBGMapMode], a
call .SetFlag
- callba HDMATransferAttrMapToWRAMBank3
+ farcall HDMATransferAttrMapToWRAMBank3
pop af
ld [rSVBK], a
ret
--- a/home.asm
+++ b/home.asm
@@ -553,7 +553,7 @@
; 323f
; XXX
- callba HDMATransferAttrMapAndTileMapToWRAMBank3
+ farcall HDMATransferAttrMapAndTileMapToWRAMBank3
ret
; 3246
@@ -869,7 +869,7 @@
call .IsObjectInStoneTable
jr nc, .nope
call CallMapScript
- callba EnableScriptMode
+ farcall EnableScriptMode
scf
ret
@@ -1213,7 +1213,7 @@
call CopyBytes
pop de
- callab CheckNickErrors
+ callfar CheckNickErrors
pop bc
pop hl
--- a/home/battle.asm
+++ b/home/battle.asm
@@ -130,8 +130,8 @@
; 39d4
UpdateBattleHuds:: ; 39d4
- callba UpdatePlayerHUD
- callba UpdateEnemyHUD
+ farcall UpdatePlayerHUD
+ farcall UpdateEnemyHUD
ret
; 39e1
--- a/home/copy.asm
+++ b/home/copy.asm
@@ -101,7 +101,7 @@
ReplaceKrisSprite:: ; e4a
- callba _ReplaceKrisSprite
+ farcall _ReplaceKrisSprite
ret
; e51
@@ -108,12 +108,12 @@
LoadStandardFont:: ; e51
- callba _LoadStandardFont
+ farcall _LoadStandardFont
ret
; e58
LoadFontsBattleExtra:: ; e58
- callba _LoadFontsBattleExtra
+ farcall _LoadFontsBattleExtra
ret
; e5f
@@ -120,13 +120,13 @@
LoadFontsExtra:: ; e5f
- callba _LoadFontsExtra1
- callba _LoadFontsExtra2
+ farcall _LoadFontsExtra1
+ farcall _LoadFontsExtra2
ret
; e6c
LoadFontsExtra2:: ; e6c
- callba _LoadFontsExtra2
+ farcall _LoadFontsExtra2
ret
; e73
--- a/home/flag.asm
+++ b/home/flag.asm
@@ -105,7 +105,7 @@
CheckReceivedDex:: ; 2ead
ld de, ENGINE_POKEDEX
ld b, CHECK_FLAG
- callba EngineFlagAction
+ farcall EngineFlagAction
ld a, c
and a
ret
--- a/home/init.asm
+++ b/home/init.asm
@@ -139,7 +139,7 @@
ld a, -1
ld [hLinkPlayerNumber], a
- callba InitCGBPals
+ farcall InitCGBPals
ld a, VBGMap1 / $100
ld [hBGMapAddress + 1], a
@@ -146,7 +146,7 @@
xor a ; VBGMap1 % $100
ld [hBGMapAddress], a
- callba StartClock
+ farcall StartClock
xor a
ld [MBC3LatchClock], a
--- a/home/item.asm
+++ b/home/item.asm
@@ -1,5 +1,5 @@
DoItemEffect:: ; 2f3f
- callba _DoItemEffect
+ farcall _DoItemEffect
ret
; 2f46
@@ -7,7 +7,7 @@
push hl
push de
push bc
- callba _CheckTossableItem
+ farcall _CheckTossableItem
pop bc
pop de
pop hl
--- a/home/joypad.asm
+++ b/home/joypad.asm
@@ -414,7 +414,7 @@
ld a, [InputType]
or a
jr z, .input_wait_loop
- callba _DudeAutoInput_A
+ farcall _DudeAutoInput_A
.input_wait_loop
call .blink_cursor
--- a/home/map.asm
+++ b/home/map.asm
@@ -215,7 +215,7 @@
ReturnToMapFromSubmenu:: ; 222a
ld a, MAPSETUP_SUBMENU
ld [hMapEntryMethod], a
- callba RunMapSetupScript
+ farcall RunMapSetupScript
xor a
ld [hMapEntryMethod], a
ret
@@ -226,7 +226,7 @@
ret nc
push bc
- callba CheckDirectionalWarp
+ farcall CheckDirectionalWarp
pop bc
ret nc
@@ -243,7 +243,7 @@
; 2252
GetDestinationWarpNumber:: ; 2252
- callba CheckWarpCollision
+ farcall CheckWarpCollision
ret nc
ld a, [hROMBank]
@@ -717,7 +717,7 @@
call .backup
.skip
- callba GetCoordOfUpperLeftCorner
+ farcall GetCoordOfUpperLeftCorner
ret
; 24ba
@@ -1050,7 +1050,7 @@
ExecuteCallbackScript:: ; 2674
; Do map callback de and return to script bank b.
- callba CallCallback
+ farcall CallCallback
ld a, [ScriptMode]
push af
ld hl, ScriptFlags
@@ -1057,8 +1057,8 @@
ld a, [hl]
push af
set 1, [hl]
- callba EnableScriptMode
- callba ScriptEvents
+ farcall EnableScriptMode
+ farcall ScriptEvents
pop af
ld [ScriptFlags], a
pop af
@@ -1439,7 +1439,7 @@
jr .skip_roof
.load_roof
- callba LoadMapGroupRoof
+ farcall LoadMapGroupRoof
.skip_roof
xor a
@@ -1983,7 +1983,7 @@
xor a
ld [hBGMapMode], a
call LoadStandardMenuDataHeader
- callba FadeOutPalettes
+ farcall FadeOutPalettes
call ClearSprites
call DisableSpriteUpdates
ret
@@ -2007,9 +2007,9 @@
FinishExitMenu:: ; 2b5c
ld b, SCGB_MAPPALS
call GetSGBLayout
- callba LoadOW_BGPal7
+ farcall LoadOW_BGPal7
call WaitBGMap2
- callba FadeInPalettes
+ farcall FadeInPalettes
call EnableSpriteUpdates
ret
; 2b74
@@ -2030,7 +2030,7 @@
call WaitBGMap2
ld b, SCGB_MAPPALS
call GetSGBLayout
- callba LoadOW_BGPal7
+ farcall LoadOW_BGPal7
call UpdateTimePals
call DelayFrame
ld a, $1
@@ -2042,7 +2042,7 @@
ReloadTilesetAndPalettes:: ; 2bae
call DisableLCD
call ClearSprites
- callba RefreshSprites
+ farcall RefreshSprites
call LoadStandardFont
call LoadFontsExtra
ld a, [hROMBank]
@@ -2052,7 +2052,7 @@
ld a, [MapNumber]
ld c, a
call SwitchToAnyMapBank
- callba UpdateTimeOfDayPal
+ farcall UpdateTimeOfDayPal
call OverworldTextModeSwitch
call LoadTileset
ld a, 9
@@ -2296,7 +2296,7 @@
jr z, .mahoganymart
bit RADIO_TOWER_MUSIC_F, c
jr nz, .radiotower
- callba Function8b342
+ farcall Function8b342
ld e, c
ld d, 0
.done
--- a/home/map_objects.asm
+++ b/home/map_objects.asm
@@ -6,7 +6,7 @@
push bc
ld c, a
- callba _GetSpritePalette
+ farcall _GetSpritePalette
ld a, c
pop bc
@@ -328,7 +328,7 @@
call UnmaskObject
ld a, [hMapObjectIndexBuffer]
call GetMapObject
- callba CopyObjectStruct
+ farcall CopyObjectStruct
ret
; 1967
@@ -345,7 +345,7 @@
call .CheckStopFollow
pop af
call GetObjectStruct
- callba DeleteMapObject
+ farcall DeleteMapObject
ret
.CheckStopFollow:
@@ -356,7 +356,7 @@
cp [hl]
ret nz
.ok
- callba StopFollow
+ farcall StopFollow
ld a, -1
ld [wObjectFollow_Leader], a
ld [wObjectFollow_Follower], a
@@ -409,7 +409,7 @@
.ok
ld a, b
call GetObjectStruct
- callba DeleteMapObject
+ farcall DeleteMapObject
ret
; 19e9
@@ -620,8 +620,8 @@
bit 0, a
ret z
- callba Function55e0
- callba _UpdateSprites
+ farcall Function55e0
+ farcall _UpdateSprites
ret
; 1ae5
--- a/home/math.asm
+++ b/home/math.asm
@@ -45,7 +45,7 @@
push hl
push bc
- callab _Multiply
+ callfar _Multiply
pop bc
pop hl
--- a/home/menu.asm
+++ b/home/menu.asm
@@ -569,7 +569,7 @@
_2DMenu:: ; 202a
ld a, [hROMBank]
ld [wMenuData2_2DMenuItemStringsBank], a
- callba _2DMenu_
+ farcall _2DMenu_
ld a, [wMenuCursorBuffer]
ret
; 2039
@@ -577,7 +577,7 @@
InterpretBattleMenu:: ; 2039
ld a, [hROMBank]
ld [wMenuData2_2DMenuItemStringsBank], a
- callba _InterpretBattleMenu
+ farcall _InterpretBattleMenu
ld a, [wMenuCursorBuffer]
ret
; 2048
@@ -585,7 +585,7 @@
InterpretMobileMenu:: ; 2048
ld a, [hROMBank]
ld [wMenuData2_2DMenuItemStringsBank], a
- callba _InterpretMobileMenu
+ farcall _InterpretMobileMenu
ld a, [wMenuCursorBuffer]
ret
; 2057
--- a/home/movement.asm
+++ b/home/movement.asm
@@ -159,13 +159,13 @@
; 1bc9
StaticMenuJoypad:: ; 1bc9
- callab _StaticMenuJoypad
+ callfar _StaticMenuJoypad
call GetMenuJoypad
ret
; 1bd3
ScrollingMenuJoypad:: ; 1bd3
- callab _ScrollingMenuJoypad
+ callfar _ScrollingMenuJoypad
call GetMenuJoypad
ret
; 1bdd
--- a/home/names.asm
+++ b/home/names.asm
@@ -206,7 +206,7 @@
push de
ld a, [wd265]
ld c, a
- callab GetTMHMNumber
+ callfar GetTMHMNumber
pop de
; HM numbers start from 51, not 1
--- a/home/rtc.asm
+++ b/home/rtc.asm
@@ -14,11 +14,11 @@
ret z
TimeOfDayPals:: ; 47e
- callab _TimeOfDayPals
+ callfar _TimeOfDayPals
ret
; 485
UpdateTimePals:: ; 485
- callab _UpdateTimePals
+ callfar _UpdateTimePals
ret
; 48c
--- a/home/serial.asm
+++ b/home/serial.asm
@@ -277,7 +277,7 @@
Function862:: ; 862
call LoadTileMapToTempTileMap
- callab PlaceWaitingText
+ callfar PlaceWaitingText
call WaitLinkTransfer
jp Call_LoadTempTileMapToTileMap
; 871
@@ -285,7 +285,7 @@
Function871:: ; 871
call LoadTileMapToTempTileMap
- callab PlaceWaitingText
+ callfar PlaceWaitingText
jp WaitLinkTransfer
; 87d
--- a/home/text.asm
+++ b/home/text.asm
@@ -315,7 +315,7 @@
Char15:: ; 117b
ld c, l
ld b, h
- callba Function17f036
+ farcall Function17f036
jp PlaceNextChar
; 1186
@@ -391,7 +391,7 @@
ld de, String12a2
call PlaceString
push bc
- callab Battle_GetTrainerName
+ callfar Battle_GetTrainerName
pop hl
ld de, StringBuffer1
jr PlaceCommandCharacter
--- a/home/tilemap.asm
+++ b/home/tilemap.asm
@@ -1,16 +1,16 @@
PushWindow:: ; 1c00
- callab _PushWindow
+ callfar _PushWindow
ret
; 1c07
ExitMenu:: ; 0x1c07
push af
- callab _ExitMenu
+ callfar _ExitMenu
pop af
ret
InitVerticalMenuCursor:: ; 0x1c10
- callab _InitVerticalMenuCursor
+ callfar _InitVerticalMenuCursor
ret
CloseWindow:: ; 0x1c17
--- a/home/time.asm
+++ b/home/time.asm
@@ -28,7 +28,7 @@
call GetClock
call FixDays
call FixTime
- callba GetTimeOfDay
+ farcall GetTimeOfDay
ret
; 5b7
@@ -205,7 +205,7 @@
jr InitTime ; useless
InitTime:: ; 677
- callba _InitTime
+ farcall _InitTime
ret
; 67e
--- a/home/window.asm
+++ b/home/window.asm
@@ -43,8 +43,8 @@
ld a, $90
ld [hWY], a
call ReplaceKrisSprite
- callba ReturnFromMapSetupScript
- callba LoadOverworldFont
+ farcall ReturnFromMapSetupScript
+ farcall LoadOverworldFont
ret
; 2e08
@@ -71,7 +71,7 @@
ld a, $1
ld [hOAMUpdate], a
- callba OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
+ farcall OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
pop af
ld [hOAMUpdate], a
--- a/macros/code.asm
+++ b/macros/code.asm
@@ -14,7 +14,7 @@
else
lb \1, \2 * 8, \3 * 8
endc
-endm
+ ENDM
depixel EQUS "ldpixel de,"
bcpixel EQUS "ldpixel bc,"
@@ -33,7 +33,7 @@
ld h, [hl]
ld l, a
jp hl
-endm
+ ENDM
; Many mobile functions were dummied out in localization.
mobile EQUS "ret"
@@ -47,9 +47,9 @@
; jr nc, .loop
x = 1
rept 8
-IF \1 > x
+if \1 > x
x = (x + 1) * 2 +- 1
-ENDC
+endc
endr
and x
-endm
+ ENDM
--- a/macros/rst.asm
+++ b/macros/rst.asm
@@ -8,22 +8,22 @@
rst FarCall
ENDM
-callba EQUS "farcall"
-
-callab: MACRO ; address, bank
+callfar: MACRO ; address, bank
ld hl, \1
ld a, BANK(\1)
rst FarCall
ENDM
+; legacy support for pre-2018 pokecrystal
+callba EQUS "farcall"
+callab EQUS "callfar"
+
homecall: MACRO
ld a, [hROMBank]
push af
ld a, BANK(\1)
rst Bankswitch
-
call \1
-
pop af
rst Bankswitch
-ENDM
+ ENDM
--- a/main.asm
+++ b/main.asm
@@ -153,7 +153,7 @@
cp -1
ret z
decoord 1, 14
- callba PrintItemDescription
+ farcall PrintItemDescription
ret
INCLUDE "engine/pokepic.asm"
@@ -186,7 +186,7 @@
ld c, HAPPINESS_GAINLEVELATHOME
.ok
- callab ChangeHappiness
+ callfar ChangeHappiness
ret
INCLUDE "data/trainers/trainer_dvs.asm"
@@ -197,14 +197,14 @@
ld a, [BattleType]
cp BATTLETYPE_TUTORIAL
jr z, .gettutorialbackpic
- callba GetMonBackpic
+ farcall GetMonBackpic
jr .continue
.gettutorialbackpic
- callba GetTrainerBackpic
+ farcall GetTrainerBackpic
.continue
- callba GetMonFrontpic
- callba _LoadBattleFontsHPBar
+ farcall GetMonFrontpic
+ farcall _LoadBattleFontsHPBar
call GetMemSGBLayout
call CloseWindow
call LoadStandardMenuDataHeader
@@ -546,10 +546,10 @@
call ClearScreen
call ClearBGPalettes
call MaxVolume
- callba LoadTradeScreenBorder
- callba Link_WaitBGMap
- callba InitTradeSpeciesList
- callba SetTradeRoomBGPals
+ farcall LoadTradeScreenBorder
+ farcall Link_WaitBGMap
+ farcall InitTradeSpeciesList
+ farcall SetTradeRoomBGPals
call WaitBGMap2
ret
@@ -974,13 +974,13 @@
SECTION "bank5E", ROMX
_UpdateBattleHUDs:
- callba DrawPlayerHUD
+ farcall DrawPlayerHUD
ld hl, PlayerHPPal
call SetHPPal
- callba DrawEnemyHUD
+ farcall DrawEnemyHUD
ld hl, EnemyHPPal
call SetHPPal
- callba FinishBattleAnim
+ farcall FinishBattleAnim
ret
--- a/mobile/battle_tower_5c.asm
+++ b/mobile/battle_tower_5c.asm
@@ -1,13 +1,13 @@
BattleTowerRoomMenu: ; 1700b0
; special
call InitBattleTowerChallengeRAM
- callba _BattleTowerRoomMenu
+ farcall _BattleTowerRoomMenu
ret
; 1700ba
Function1700ba: ; 1700ba
call InitBattleTowerChallengeRAM
- callba Function11811a
+ farcall Function11811a
ret
; 1700c4
@@ -56,7 +56,7 @@
Function170114: ; 170114
call InitBattleTowerChallengeRAM
call .Function170121
- callba Function11805f
+ farcall Function11805f
ret
; 170121
@@ -111,7 +111,7 @@
call CopyBytes
ld bc, PlayerID
ld de, PlayerGender
- callba GetMobileOTTrainerClass
+ farcall GetMobileOTTrainerClass
ld de, wBT_OTTempPkmn1CaughtGender
ld a, c
ld [de], a
@@ -243,15 +243,15 @@
xor a
ld [wLinkMode], a
- callba TrainerRankings_Healings
- callba HealParty
+ farcall TrainerRankings_Healings
+ farcall HealParty
call ReadBTTrainerParty
call Clears5_a89a
predef StartBattle
- callba LoadPokemonData
- callba HealParty
+ farcall LoadPokemonData
+ farcall HealParty
ld a, [wBattleResult]
ld [ScriptVar], a
and a
@@ -286,7 +286,7 @@
; with their species names.
ld de, wBT_OTTempPkmn1Name ; $c643
ld c, PKMN_NAME_LENGTH
- callba CheckStringForErrors
+ farcall CheckStringForErrors
jr nc, .skip_mon_1
ld a, [wBT_OTTempPkmn1]
@@ -301,7 +301,7 @@
.skip_mon_1
ld de, wBT_OTTempPkmn2Name ; $c67e
ld c, PKMN_NAME_LENGTH
- callba CheckStringForErrors
+ farcall CheckStringForErrors
jr nc, .skip_mon_2
ld a, [wBT_OTTempPkmn2] ; [$c64e]
ld [wNamedObjectIndexBuffer], a
@@ -315,7 +315,7 @@
.skip_mon_2
ld de, wBT_OTTempPkmn3Name ; $c686 + 51 = $c6b9
ld c, PKMN_NAME_LENGTH
- callba CheckStringForErrors
+ farcall CheckStringForErrors
jr nc, .skip_mon_3
ld a, [wBT_OTTempPkmn3] ; [$c689]
ld [wNamedObjectIndexBuffer], a
@@ -337,7 +337,7 @@
; Repair the trainer name if needed, then copy it to OTPlayerName
ld de, wBT_OTTempName
ld c, NAME_LENGTH - 1
- callba CheckStringForErrors
+ farcall CheckStringForErrors
jr nc, .trainer_name_okay
ld hl, BT_ChrisName
jr .done_trainer_name
@@ -675,7 +675,7 @@
bit 7, a
jr nz, .done
call .DoJumptable
- callba ReloadMapPart
+ farcall ReloadMapPart
jr .loop
.done
@@ -1049,7 +1049,7 @@
ret
BattleTower_SaveOptions: ; 170737 (5c:4737) BattleTowerAction $1f
- callba SaveOptions
+ farcall SaveOptions
ret
BattleTower_RandomlyChooseReward: ; 17073e (5c:473e) BattleTowerAction $1e
@@ -1256,7 +1256,7 @@
ld a, [wSaveFileExists]
and a
jr z, .nope
- callba CompareLoadedAndSavedPlayerID
+ farcall CompareLoadedAndSavedPlayerID
jr z, .yes
xor a
jr .nope
@@ -1486,8 +1486,8 @@
ld a, [$a826]
ld [wcd31], a
call CloseSRAM
- callba Function11b6b4
- callba Function17d0f3
+ farcall Function11b6b4
+ farcall Function17d0f3
ld a, $1
ld [ScriptVar], a
ret
@@ -1611,7 +1611,7 @@
ld [wcd4f], a
xor a
ld [ScriptVar], a
- callba BattleTower_LevelCheck ; level check
+ farcall BattleTower_LevelCheck ; level check
ret nc
ld a, $5
call GetSRAMBank
@@ -1631,7 +1631,7 @@
ld [wcd4f], a
xor a
ld [ScriptVar], a
- callba BattleTower_UbersCheck
+ farcall BattleTower_UbersCheck
ret nc
ld a, $5
call GetSRAMBank
@@ -1641,7 +1641,7 @@
ret
Function_LoadOpponentTrainerAndPokemonsWithOTSprite: ; 0x170b44
- callba Function_LoadOpponentTrainerAndPokemons
+ farcall Function_LoadOpponentTrainerAndPokemons
ld a, [rSVBK]
push af
ld a, $3
@@ -1681,7 +1681,7 @@
ld [hUsedSpriteIndex], a
ld a, [hl]
ld [hUsedSpriteTile], a
- callba GetUsedSprite
+ farcall GetUsedSprite
ret
; 170b90
@@ -1758,7 +1758,7 @@
; 170bd3
SpecialCheckForBattleTowerRules: ; 170bd3
- callba CheckForBattleTowerRules
+ farcall CheckForBattleTowerRules
jr c, .asm_170bde
xor a
jr .asm_170be0
--- a/mobile/fixed_words.asm
+++ b/mobile/fixed_words.asm
@@ -329,10 +329,10 @@
ld de, VTiles0
call Decompress
call EnableLCD
- callba ReloadMapPart
- callba ClearSpriteAnims
- callba LoadPokemonData
- callba Pokedex_ABCMode
+ farcall ReloadMapPart
+ farcall ClearSpriteAnims
+ farcall LoadPokemonData
+ farcall Pokedex_ABCMode
ld a, [rSVBK]
push af
ld a, $5
@@ -385,12 +385,12 @@
bit 7, a
jr nz, .exit
call .DoJumptableFunction
- callba PlaySpriteAnimations
- callba ReloadMapPart
+ farcall PlaySpriteAnimations
+ farcall ReloadMapPart
jr .loop
.exit
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
call ClearSprites
ret
; 11c2ac
@@ -719,7 +719,7 @@
hlcoord 0, 14, AttrMap
ld bc, $28
call ByteFill
- callba ReloadMapPart
+ farcall ReloadMapPart
ret
; 11c4db (47:44db)
@@ -918,7 +918,7 @@
hlcoord 0, 6, AttrMap
ld bc, $c8
call ByteFill
- callba ReloadMapPart
+ farcall ReloadMapPart
ret
; 11c62a (47:462a)
@@ -1372,7 +1372,7 @@
xor a
ld [hDividend + 2], a
push hl
- callba Function11a80c
+ farcall Function11a80c
pop hl
ld a, [wcd63]
add "0"
@@ -1530,7 +1530,7 @@
hlcoord 0, 6, AttrMap
ld bc, $c8
call ByteFill
- callba ReloadMapPart
+ farcall ReloadMapPart
ret
Function11c9bd: ; 11c9bd (47:49bd)
@@ -1620,7 +1620,7 @@
add hl, de
dec c
jr nz, .asm_11ca22
- callba ReloadMapPart
+ farcall ReloadMapPart
ret
; 11ca38 (47:4a38)
@@ -2043,7 +2043,7 @@
hlcoord 0, 12, AttrMap
ld bc, 4 * SCREEN_WIDTH
call ByteFill
- callba ReloadMapPart
+ farcall ReloadMapPart
ret
; 11cdc7 (47:4dc7)
--- a/mobile/mobile_12.asm
+++ b/mobile/mobile_12.asm
@@ -359,7 +359,7 @@
ld a, $29
.asm_4833f
ld [wMenuScrollPosition], a
- callba Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
+ farcall Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
.asm_48348
call ScrollingMenu
ld de, $629
@@ -385,7 +385,7 @@
ld [wd003], a
.asm_48377
call Function48187
- callba Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
+ farcall Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
jp Function4840c
Function48383: ; 48383 (12:4383)
@@ -1626,7 +1626,7 @@
ld hl, $d02a
ld d, h
ld e, l
- callba Function48c63
+ farcall Function48c63
hlcoord 10, 7
call PlaceString
call WaitBGMap
--- a/mobile/mobile_12_2.asm
+++ b/mobile/mobile_12_2.asm
@@ -311,17 +311,17 @@
call ClearBGPalettes
Function4aa25: ; 4aa25
- callba LoadPartyMenuGFX
- callba InitPartyMenuWithCancel
+ farcall LoadPartyMenuGFX
+ farcall InitPartyMenuWithCancel
call Function4aad3
Function4aa34: ; 4aa34
ld a, PARTYMENUACTION_MOBILE
ld [PartyMenuActionText], a
- callba WritePartyMenuTilemap
+ farcall WritePartyMenuTilemap
xor a
ld [PartyMenuActionText], a
- callba PrintPartyMenuText
+ farcall PrintPartyMenuText
call Function4aab6
call WaitBGMap
call SetPalettes
@@ -443,7 +443,7 @@
push bc
push hl
ld e, 0
- callba LoadMenuMonIcon
+ farcall LoadMenuMonIcon
ld a, [hObjectStructIndexBuffer]
inc a
ld [hObjectStructIndexBuffer], a
@@ -453,7 +453,7 @@
jr nz, .loop
call Function4aa7a
- callba PlaySpriteAnimations
+ farcall PlaySpriteAnimations
ret
; 4aafb
@@ -683,7 +683,7 @@
lb bc, 2, 18
hlcoord 1, 15
call ClearBox
- callba FreezeMonIcons
+ farcall FreezeMonIcons
ld hl, MenuDataHeader_0x4aca2
call LoadMenuDataHeader
ld hl, wd019
@@ -823,13 +823,13 @@
; 0x4ad56
Function4ad56: ; 4ad56
- callba OpenPartyStats
+ farcall OpenPartyStats
call WaitBGMap2
ret
; 4ad60
Function4ad60: ; 4ad60
- callba ManagePokemonMoves
+ farcall ManagePokemonMoves
ret
; 4ad67
--- a/mobile/mobile_22.asm
+++ b/mobile/mobile_22.asm
@@ -99,7 +99,7 @@
Function891ab: ; 891ab
call Mobile22_SetBGMapMode1
- callba ReloadMapPart
+ farcall ReloadMapPart
call Mobile22_SetBGMapMode0
ret
; 891b8
@@ -218,9 +218,9 @@
Function89245: ; 89245 (22:5245)
- callba TryLoadSaveFile
+ farcall TryLoadSaveFile
ret c
- callba _LoadData
+ farcall _LoadData
and a
ret
@@ -777,7 +777,7 @@
add hl, bc
ld b, h
ld c, l
- callba GetMobileOTTrainerClass
+ farcall GetMobileOTTrainerClass
ld a, c
ld [TrainerClass], a
ld a, [rSVBK]
@@ -1222,13 +1222,13 @@
add hl, bc
ld b, h
ld c, l
- callba GetMobileOTTrainerClass
+ farcall GetMobileOTTrainerClass
ld a, c
ld [TrainerClass], a
xor a
ld [CurPartySpecies], a
ld de, VTiles2 tile $37
- callba GetTrainerPic
+ farcall GetTrainerPic
pop bc
ret
; 897d5
@@ -1616,7 +1616,7 @@
jr c, .asm_89a1c
ld d, h
ld e, l
- callba Function11c08f
+ farcall Function11c08f
ret
.asm_89a1c
@@ -1793,7 +1793,7 @@
Function89b00: ; 89b00 (22:5b00)
- callba MG_Mobile_Layout_LoadPals
+ farcall MG_Mobile_Layout_LoadPals
ret
; 89b07 (22:5b07)
@@ -1800,7 +1800,7 @@
Function89b07: ; 89b07
call Mobile22_SetBGMapMode0
call DelayFrame
- callba Function4a3a7
+ farcall Function4a3a7
ret
; 89b14
@@ -1812,7 +1812,7 @@
; 89b1e
Function89b1e: ; 89b1e (22:5b1e)
- callba Function4a485
+ farcall Function4a485
call Function89b00
ret
@@ -1827,7 +1827,7 @@
Function89b3b: ; 89b3b (22:5b3b)
call Mobile22_SetBGMapMode0
- callba Function48cda
+ farcall Function48cda
ret
Function89b45: ; 89b45
@@ -2180,7 +2180,7 @@
ld [rSVBK], a
call SetPalettes
- callba PrintMail_
+ farcall PrintMail_
call Mobile22_SetBGMapMode1
ld c, 24
call DelayFrames
@@ -2218,7 +2218,7 @@
push hl
call Mobile22_SetBGMapMode0
call _hl_
- callba Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
+ farcall Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
pop hl
jr asm_89d90
@@ -2249,7 +2249,7 @@
Function89dab: ; 89dab (22:5dab)
call Mobile22_SetBGMapMode0
- callba MobileMenuJoypad
+ farcall MobileMenuJoypad
call Mobile22_SetBGMapMode0
ld a, c
ld hl, wMenuJoypadFilter
@@ -2429,8 +2429,8 @@
call ClearBGPalettes
call Function893e2
call Mobile22_SetBGMapMode0
- callba Function4a3a7
- callba MG_Mobile_Layout_CreatePalBoxes
+ farcall Function4a3a7
+ farcall MG_Mobile_Layout_CreatePalBoxes
hlcoord 1, 0
call Function8a53d
ret
@@ -2958,8 +2958,8 @@
call ClearBGPalettes
call Function893e2
call Mobile22_SetBGMapMode0
- callba Function4a3a7
- callba MG_Mobile_Layout_CreatePalBoxes
+ farcall Function4a3a7
+ farcall MG_Mobile_Layout_CreatePalBoxes
hlcoord 1, 0
call Function8a53d
hlcoord 12, 4
@@ -3052,8 +3052,8 @@
Function8a31c: ; 8a31c (22:631c)
push bc
call Mobile22_SetBGMapMode0
- callba Function4a3a7
- callba MG_Mobile_Layout_CreatePalBoxes
+ farcall Function4a3a7
+ farcall MG_Mobile_Layout_CreatePalBoxes
hlcoord 1, 0
call Function8a53d
hlcoord 12, 4
@@ -3095,7 +3095,7 @@
ret
Function8a383: ; 8a383 (22:6383)
- callba MobileMenuJoypad
+ farcall MobileMenuJoypad
ld a, c
ld hl, wMenuJoypadFilter
and [hl]
@@ -3656,7 +3656,7 @@
call Function891fe
ld de, wd002
ld b, $5
- callba NamingScreen
+ farcall NamingScreen
call OpenSRAMBank4
call Function8931b
push bc
@@ -3685,7 +3685,7 @@
call Function891de
ld de, wd008
ld c, $0
- callba Function17a68f
+ farcall Function17a68f
jr c, .asm_8a7f4
ld hl, wd008
ld a, $ff
@@ -4027,7 +4027,7 @@
call Function891de
ld de, wd008
ld c, $0
- callba Function17a68f
+ farcall Function17a68f
jr c, .asm_8aa9d
ld hl, wd008
ld a, $ff
@@ -4157,7 +4157,7 @@
Function8ab93: ; 8ab93 (22:6b93)
call ClearBGPalettes
call LoadStandardMenuDataHeader
- callba Function105688
+ farcall Function105688
call ClearSprites
call Function891fe
call Function89b28
--- a/mobile/mobile_22_2.asm
+++ b/mobile/mobile_22_2.asm
@@ -48,7 +48,7 @@
Function8b363: ; 8b363
push bc
- callba Mobile_AlwaysReturnNotCarry
+ farcall Mobile_AlwaysReturnNotCarry
pop bc
ret
; 8b36c
--- a/mobile/mobile_40.asm
+++ b/mobile/mobile_40.asm
@@ -39,10 +39,10 @@
ld [wcd23], a
ld a, b
ld [wcd24], a
- callba Function10127e
- callba MobileFunc_106462
- callba Function106464 ; load broken gfx
- callba Function11615a ; init RAM
+ farcall Function10127e
+ farcall MobileFunc_106462
+ farcall Function106464 ; load broken gfx
+ farcall Function11615a ; init RAM
ld hl, VramState
set 1, [hl]
ret
@@ -144,7 +144,7 @@
ld hl, wcd29
bit 7, [hl]
ret z
- callba Function115dd3
+ farcall Function115dd3
ld hl, wcd29
set 6, [hl]
ret
@@ -160,7 +160,7 @@
ld a, [wcd2b]
and a
jr nz, .asm_100117
- callba Function11619d
+ farcall Function11619d
ld hl, wcd29
set 6, [hl]
ret
@@ -183,7 +183,7 @@
ld [wLinkMode], a
ld a, $04
ld [wc314 + 5], a
- callba Function11619d
+ farcall Function11619d
ld hl, wcd29
set 6, [hl]
pop af
@@ -206,7 +206,7 @@
ret z
res 2, [hl]
res 6, [hl]
- callba HDMATransferTileMapToWRAMBank3
+ farcall HDMATransferTileMapToWRAMBank3
ret
; 100163
@@ -318,8 +318,8 @@
Function10020b: ; 10020b
xor a
ld [wc303], a
- callba FadeOutPalettes
- callba Function106464
+ farcall FadeOutPalettes
+ farcall Function106464
call HideSprites
call DelayFrame
@@ -328,7 +328,7 @@
ld a, $01
ld [rSVBK], a
- callba DisplayMobileError
+ farcall DisplayMobileError
pop af
ld [rSVBK], a
@@ -337,7 +337,7 @@
Function100232: ; 100232
push de
- callba Function106464
+ farcall Function106464
call Function3f20
call UpdateSprites
hlcoord 1, 2
@@ -378,7 +378,7 @@
ret
.asm_100296
- callba Script_reloadmappart
+ farcall Script_reloadmappart
ld c, $04
ret
@@ -388,7 +388,7 @@
ret
.asm_1002a5
- callba Script_reloadmappart
+ farcall Script_reloadmappart
call Function1002ed
ld c, $03
ret
@@ -412,8 +412,8 @@
ld hl, wcd2a
bit 0, [hl]
ret z
- callba CleanUpBattleRAM
- callba LoadPokemonData
+ farcall CleanUpBattleRAM
+ farcall LoadPokemonData
ret
; 1002dc
@@ -420,7 +420,7 @@
Function1002dc: ; 1002dc
ld a, MAPSETUP_LINKRETURN
ld [hMapEntryMethod], a
- callba RunMapSetupScript
+ farcall RunMapSetupScript
xor a
ld [hMapEntryMethod], a
call LoadStandardFont
@@ -428,8 +428,8 @@
; 1002ed
Function1002ed: ; 1002ed
- callba LoadOW_BGPal7
- callba ApplyPals
+ farcall LoadOW_BGPal7
+ farcall ApplyPals
ld a, $01
ld [hCGBPalUpdate], a
call DelayFrame
@@ -440,9 +440,9 @@
ld hl, wcd2a
bit 1, [hl]
ret z
- callba Function106464
- callba Function10202c
- callba Function115dd3
+ farcall Function106464
+ farcall Function10202c
+ farcall Function115dd3
call Function100320
call JoyWaitAorB
ret
@@ -449,12 +449,12 @@
; 100320
Function100320: ; 100320
- callba Mobile_ReloadMapPart
+ farcall Mobile_ReloadMapPart
ret
; 100327
Function100327: ; 100327
- callba HDMATransferTileMapToWRAMBank3
+ farcall HDMATransferTileMapToWRAMBank3
ret
; 100327
@@ -858,7 +858,7 @@
; 10054d
Function10054d: ; 10054d
- callba MobileMenuJoypad
+ farcall MobileMenuJoypad
ld a, c
ld hl, wMenuJoypadFilter
and [hl]
@@ -1500,7 +1500,7 @@
call PrintNum
ld de, SFX_TWO_PC_BEEPS
call PlaySFX
- callba ReloadMapPart
+ farcall ReloadMapPart
ld c, $3c
call DelayFrames
ret
@@ -1511,7 +1511,7 @@
call PlaceString
ld de, SFX_4_NOTE_DITTY
call PlaySFX
- callba ReloadMapPart
+ farcall ReloadMapPart
ld c, 120
call DelayFrames
ret
@@ -1541,7 +1541,7 @@
decoord 0, 0
call Function1009a5
call Function1009ae
- callba ReloadMapPart
+ farcall ReloadMapPart
ld hl, w3_dd68
decoord 0, 0, AttrMap
call Function1009a5
@@ -1628,7 +1628,7 @@
_LinkBattleSendReceiveAction: ; 100a09
call .StageForSend
ld [wd431], a
- callba PlaceWaitingText
+ farcall PlaceWaitingText
ld a, [wLinkMode]
cp LINK_MOBILE
jr nz, .not_mobile
@@ -1635,7 +1635,7 @@
call .MobileBattle_SendReceiveAction
call Function100da5
- callba FinishBattleAnim
+ farcall FinishBattleAnim
jr .done
.not_mobile
@@ -1711,7 +1711,7 @@
.asm_100a92
call DelayFrame
call GetJoypad
- callba Function100382
+ farcall Function100382
ld c, $01
ld b, $03
push bc
@@ -1810,7 +1810,7 @@
ld [wMenuCursorBuffer], a
call Function100e72
call Function100b45
- callba InitPartyMenuBGPal7
+ farcall InitPartyMenuBGPal7
call Function100ed4
ld a, [wMenuCursorBuffer]
ld [wBattleMenuCursorBuffer], a
@@ -1822,9 +1822,9 @@
call Function100b7a
.loop
call Mobile_SetOverworldDelay
- callba MobileMenuJoypad
+ farcall MobileMenuJoypad
push bc
- callba HDMATransferTileMapToWRAMBank3
+ farcall HDMATransferTileMapToWRAMBank3
call Function100e2d
pop bc
jr c, .asm_100b6b
@@ -1831,7 +1831,7 @@
ld a, [wMenuJoypadFilter]
and c
jr z, .loop
- callba Mobile_GetMenuSelection
+ farcall Mobile_GetMenuSelection
ret
.asm_100b6b
@@ -1848,11 +1848,11 @@
ld hl, CopyMenuData2
ld a, [wMenuData2_2DMenuItemStringsBank]
rst FarCall
- callba Draw2DMenu
- callba MobileTextBorder
+ farcall Draw2DMenu
+ farcall MobileTextBorder
call UpdateSprites
call ApplyTilemap
- callba Init2DMenuCursorPosition
+ farcall Init2DMenuCursorPosition
ld hl, w2DMenuFlags1
set 7, [hl]
ret
@@ -1861,7 +1861,7 @@
MobileMoveSelectionScreen: ; 100b9f
xor a
ld [wMoveSwapBuffer], a
- callba CheckPlayerHasUsableMoves
+ farcall CheckPlayerHasUsableMoves
ret z
call Function100dd8
jp c, xor_a_dec_a
@@ -1868,7 +1868,7 @@
call Function100e72
call .GetMoveSelection
push af
- callba InitPartyMenuBGPal7
+ farcall InitPartyMenuBGPal7
call Function100ed4
pop af
ret
@@ -1880,12 +1880,12 @@
call Function100c74
call Function100c98
.master_loop
- callba MoveInfoBox
+ farcall MoveInfoBox
.loop
call Mobile_SetOverworldDelay
- callba MobileMenuJoypad
+ farcall MobileMenuJoypad
push bc
- callba HDMATransferTileMapToWRAMBank3
+ farcall HDMATransferTileMapToWRAMBank3
call Function100e2d
pop bc
jr c, .b_button
@@ -2016,10 +2016,10 @@
res 6, [hl]
.loop
call Mobile_SetOverworldDelay
- callba MobileMenuJoypad
+ farcall MobileMenuJoypad
push bc
- callba PlaySpriteAnimations
- callba HDMATransferTileMapToWRAMBank3
+ farcall PlaySpriteAnimations
+ farcall HDMATransferTileMapToWRAMBank3
call MobileComms_CheckInactivityTimer
pop bc
jr c, .done
@@ -2070,10 +2070,10 @@
res 6, [hl]
.asm_100d30
call Mobile_SetOverworldDelay
- callba MobileMenuJoypad
+ farcall MobileMenuJoypad
push bc
- callba PlaySpriteAnimations
- callba HDMATransferTileMapToWRAMBank3
+ farcall PlaySpriteAnimations
+ farcall HDMATransferTileMapToWRAMBank3
call MobileComms_CheckInactivityTimer
pop bc
jr c, .asm_100d54
@@ -2181,13 +2181,13 @@
Function100dd8: ; 100dd8
ld c, $01
ld b, $03
- callba AdvanceMobileInactivityTimerAndCheckExpired
+ farcall AdvanceMobileInactivityTimerAndCheckExpired
jr c, .asm_100dfb
ld c, $3c
ld b, $01
call Function10079c
jr c, .asm_100dfb
- callba Function10032e
+ farcall Function10032e
ld a, [wcd2b]
and a
jr nz, .asm_100dfb
@@ -2207,7 +2207,7 @@
ld c, a
ld b, 3
push bc
- callba AdvanceMobileInactivityTimerAndCheckExpired ; useless to farcall
+ farcall AdvanceMobileInactivityTimerAndCheckExpired ; useless to farcall
pop bc
jr c, .quit
ld b, 1
@@ -2215,7 +2215,7 @@
jr c, .quit
call Function1009f3
jr c, .quit
- callba Function10032e ; useless to farcall
+ farcall Function10032e ; useless to farcall
ld a, [wcd2b]
and a
jr nz, .quit
@@ -2235,7 +2235,7 @@
ld c, a
ld b, 3
push bc
- callba AdvanceMobileInactivityTimerAndCheckExpired
+ farcall AdvanceMobileInactivityTimerAndCheckExpired
pop bc
jr c, .asm_100e61
ld b, 1
@@ -2243,7 +2243,7 @@
jr c, .asm_100e61
call Function1009f3
jr c, .asm_100e61
- callba Function10032e
+ farcall Function10032e
ld a, [wcd2b]
and a
jr nz, .asm_100e61
@@ -2340,13 +2340,13 @@
; 100eca
Function100eca: ; 100eca
- callba Mobile_InitPartyMenuBGPal7
+ farcall Mobile_InitPartyMenuBGPal7
call Function100ed4
ret
; 100ed4
Function100ed4: ; 100ed4
- callba ApplyPals
+ farcall ApplyPals
ld a, $01
ld [hCGBPalUpdate], a
ret
@@ -2884,7 +2884,7 @@
Function10126c: ; 10126c
call UpdateSprites
- callba Script_reloadmappart
+ farcall Script_reloadmappart
ld hl, UnknownText_0x1021f4
call Function1021e0
ret
@@ -3042,7 +3042,7 @@
; 10138b
Function10138b: ; 10138b
- callba Function8adcc
+ farcall Function8adcc
ld c, 0
jr c, .asm_101396
inc c
@@ -3069,7 +3069,7 @@
call ClearBGPalettes
call Call_ExitMenu
call ReloadTilesetAndPalettes
- callba Function106464
+ farcall Function106464
call UpdateSprites
call FinishExitMenu
ret
@@ -3076,15 +3076,15 @@
; 1013c0
Function1013c0: ; 1013c0
- callba BlankScreen
- callba MobileFunc_106462
- callba Function106464
+ farcall BlankScreen
+ farcall MobileFunc_106462
+ farcall Function106464
call FinishExitMenu
ret
; 1013d6
Function1013d6: ; 1013d6
- callba HDMATransferAttrMapAndTileMapToWRAMBank3
+ farcall HDMATransferAttrMapAndTileMapToWRAMBank3
ret
; 1013dd
@@ -3177,7 +3177,7 @@
Function10142c: ; 10142c
ld a, $01
ld [wc305], a
- callba Function115e18
+ farcall Function115e18
ret
; 101438
@@ -3277,8 +3277,8 @@
; 1014ce
Function1014ce: ; 1014ce
- callba Function100720
- callba StartMobileInactivityTimer
+ farcall Function100720
+ farcall StartMobileInactivityTimer
ld a, [wMobileCommsJumptableIndex]
inc a
ld [wMobileCommsJumptableIndex], a
@@ -3297,7 +3297,7 @@
; 1014f4
Function1014f4: ; 1014f4
- callba EnableMobile
+ farcall EnableMobile
ld hl, wcd29
set 6, [hl]
ld a, [wMobileCommsJumptableIndex]
@@ -3346,7 +3346,7 @@
; 101544
Function101544: ; 101544
- callba StartMobileInactivityTimer
+ farcall StartMobileInactivityTimer
ld a, $12
call Function3e32
ld a, [wMobileCommsJumptableIndex]
@@ -3356,7 +3356,7 @@
; 101557
Function101557: ; 101557
- callba StartMobileInactivityTimer
+ farcall StartMobileInactivityTimer
ld hl, wcd53
ld a, $08
call Function3e32
@@ -3371,7 +3371,7 @@
ret c
Function101571: ; 101571
- callba Function10032e
+ farcall Function10032e
ret c
ret z
ld a, e
@@ -3388,7 +3388,7 @@
; 10158a
Function10158a: ; 10158a
- callba IncrementMobileInactivityTimerBy1Frame
+ farcall IncrementMobileInactivityTimerBy1Frame
ld a, [wMobileInactivityTimerMinutes]
cp $0a
jr c, Function10156d
@@ -3399,7 +3399,7 @@
Function10159d: ; 10159d
ld de, wc608
- callba Function100edf
+ farcall Function100edf
ld de, wc608
ld a, $05
ld hl, w5_d800
@@ -3414,7 +3414,7 @@
Function1015be: ; 1015be
ld de, wc608
- callba Function100eed
+ farcall Function100eed
ld de, wc608
ld a, $05
ld hl, w5_d800
@@ -3429,7 +3429,7 @@
Function1015df: ; 1015df
ld de, wc608
- callba Function100ef4
+ farcall Function100ef4
ld de, wc608
ld a, $05
ld hl, w5_d800
@@ -3449,7 +3449,7 @@
ld a, $05
call FarCopyWRAM
ld de, wc608
- callba Function100ee6
+ farcall Function100ee6
ld a, [wMobileCommsJumptableIndex]
inc a
ld [wMobileCommsJumptableIndex], a
@@ -3536,11 +3536,11 @@
Function10168e: ; 10168e
ld b, 0
ld c, $01
- callba Function10079c
+ farcall Function10079c
ret c
ld c, $01
ld b, $03
- callba AdvanceMobileInactivityTimerAndCheckExpired
+ farcall AdvanceMobileInactivityTimerAndCheckExpired
ret c
ld a, [wcd26]
ld hl, Jumptable_1016c3
@@ -3604,7 +3604,7 @@
; 101705
Function101705: ; 101705
- callba Function100382
+ farcall Function100382
ld a, [wcd27]
bit 7, a
ret z
@@ -3769,13 +3769,13 @@
Function1017f5: ; 1017f5
ld b, 0
ld c, $01
- callba Function10079c
+ farcall Function10079c
ret c
ld c, $01
ld b, $03
- callba AdvanceMobileInactivityTimerAndCheckExpired
+ farcall AdvanceMobileInactivityTimerAndCheckExpired
ret c
- callba Function100382
+ farcall Function100382
ld a, [wcd27]
bit 7, a
jr nz, .next
@@ -3808,7 +3808,7 @@
ret
.asm_101844
- callba Function103654
+ farcall Function103654
ld a, c
ld hl, Unknown_101882
cp $01
@@ -3965,7 +3965,7 @@
Function10194b: ; 10194b
call DisableSpriteUpdates
call ClearSprites
- callba Function1021f9
+ farcall Function1021f9
ld hl, wcd29
bit 3, [hl]
jr nz, .asm_101967
@@ -3981,8 +3981,8 @@
; 10196d
_SelectMonsForMobileBattle: ; 10196d
- callba BlankScreen
- callba Mobile_CommunicationStandby
+ farcall BlankScreen
+ farcall Mobile_CommunicationStandby
ld hl, wcd29
set 5, [hl]
ld hl, wcd2a
@@ -4008,16 +4008,16 @@
_StartMobileBattle: ; 1019ab
call CopyOtherPlayersBattleMonSelection
- callba Function100754
+ farcall Function100754
xor a
ld [wdc5f], a
ld [wdc60], a
- callba BlankScreen
+ farcall BlankScreen
call SpeechTextBox
- callba Function100846
+ farcall Function100846
ld c, 120
call DelayFrames
- callba ClearTileMap
+ farcall ClearTileMap
call .CopyOTDetails
call StartMobileBattle
ld a, [wcd2b]
@@ -4040,7 +4040,7 @@
ld bc, w5_dc0d
ld de, w5_dc11
- callba GetMobileOTTrainerClass
+ farcall GetMobileOTTrainerClass
pop af
ld [rSVBK], a
@@ -4071,9 +4071,9 @@
ld [hl], a
ld a, 1
ld [wDisableTextAcceleration], a
- callba BattleIntro
- callba DoBattle
- callba ShowLinkBattleParticipantsAfterEnd
+ farcall BattleIntro
+ farcall DoBattle
+ farcall ShowLinkBattleParticipantsAfterEnd
xor a
ld [wDisableTextAcceleration], a
ld a, $ff
@@ -4086,11 +4086,11 @@
Function101a4f: ; 101a4f
ld a, 1
ld [wDisableTextAcceleration], a
- callba DisplayLinkBattleResult
+ farcall DisplayLinkBattleResult
xor a
ld [wDisableTextAcceleration], a
- callba CleanUpBattleRAM
- callba LoadPokemonData
+ farcall CleanUpBattleRAM
+ farcall LoadPokemonData
call Function1013c0
ld a, [wMobileCommsJumptableIndex]
inc a
@@ -4104,14 +4104,14 @@
ld bc, 3
call CopyBytes
ld de, wcc64
- callba Function100772
- callba Function101050
- callba LoadSelectedPartiesForColosseum
+ farcall Function100772
+ farcall Function101050
+ farcall LoadSelectedPartiesForColosseum
ret
; 101a97
Function101a97: ; 101a97
- callba Function115d99
+ farcall Function115d99
ld hl, wcd29
set 7, [hl]
ld c, $02
@@ -4136,7 +4136,7 @@
; 101ac6
Function101ac6: ; 101ac6
- callba Function115d99
+ farcall Function115d99
ld hl, wcd29
set 7, [hl]
ld c, $02
@@ -4154,7 +4154,7 @@
; 101aed
Function101aed: ; 101aed
- callba Function115d99
+ farcall Function115d99
ld hl, wcd29
set 7, [hl]
ld c, $02
@@ -4185,7 +4185,7 @@
; 101b2b
Function101b2b: ; 101b2b
- callba Function100579
+ farcall Function100579
ld hl, wcd29
set 2, [hl]
ld a, [wcd26]
@@ -4238,7 +4238,7 @@
; 101b8f
Function101b8f: ; 101b8f
- callba Function1005c3
+ farcall Function1005c3
ld hl, wcd29
set 2, [hl]
ld a, [wcd26]
@@ -4282,7 +4282,7 @@
; 101be5
Function101be5: ; 101be5
- callba Function100579
+ farcall Function100579
ld hl, wcd29
set 2, [hl]
ld a, [wcd26]
@@ -4352,7 +4352,7 @@
; 101c62
Function101c62: ; 101c62
- callba Function115d99
+ farcall Function115d99
ld hl, wcd29
set 7, [hl]
ld c, $01
@@ -4374,7 +4374,7 @@
; 101c92
Function101c92: ; 101c92
- callba Function100675
+ farcall Function100675
ld a, [wMobileCommsJumptableIndex]
inc a
ld [wMobileCommsJumptableIndex], a
@@ -4520,7 +4520,7 @@
; 101d7b
Function101d7b: ; 101d7b
- callba Function10138b
+ farcall Function10138b
ld b, 0
ld hl, Unknown_101d8d
add hl, bc
@@ -4550,7 +4550,7 @@
; 101db2
Function101db2: ; 101db2
- callba Function103302
+ farcall Function103302
call ExitMenu
ld hl, wcd29
set 5, [hl]
@@ -4701,7 +4701,7 @@
Function101e98: ; 101e98
call ClearSprites
- callba Function8adb3
+ farcall Function8adb3
ret c
ld hl, GameTimerPause
set 7, [hl]
@@ -4741,7 +4741,7 @@
Function101ed3: ; 101ed3
call Function1013aa
- callba Function115d99
+ farcall Function115d99
ld hl, wcd29
set 7, [hl]
ret
@@ -4758,7 +4758,7 @@
ld a, [hli]
ld d, [hl]
ld e, a
- callba Function100504
+ farcall Function100504
ret
; 101ef5
@@ -4835,7 +4835,7 @@
; 10202c
Function10202c: ; 10202c
- callba Function115d99
+ farcall Function115d99
ld hl, wcd29
set 7, [hl]
ld c, $02
@@ -4930,7 +4930,7 @@
call Function10209c
ld c, $01
ld de, wdc42
- callba Function17a68f
+ farcall Function17a68f
ret c
call Function10208e
call Function102068
@@ -4940,7 +4940,7 @@
Function1020bf: ; 1020bf
call ClearSprites
- callba Function8aba9
+ farcall Function8aba9
ld a, c
and a
jr z, .asm_1020e8
@@ -5074,7 +5074,7 @@
call FadeToMenu
call Function10218d
ld de, wc608 + 1
- callba Function8ac4e
+ farcall Function8ac4e
call JoyWaitAorB
call PlayClickSFX
call Function1013aa
@@ -5085,7 +5085,7 @@
call FadeToMenu
call Function10218d
ld de, wPlayerMoveStruct
- callba Function8ac70
+ farcall Function8ac70
ld a, c
ld [StringBuffer1], a
push af
@@ -5191,7 +5191,7 @@
.asm_10225e
res 1, [hl]
res 2, [hl]
- callba Mobile_ReloadMapPart
+ farcall Mobile_ReloadMapPart
scf
ret
; 10226a
@@ -5267,7 +5267,7 @@
; 1022d0
Function1022d0: ; 1022d0
- callba Function10032e
+ farcall Function10032e
ld a, [wcd2b]
and a
jr nz, .asm_1022f3
@@ -5278,7 +5278,7 @@
sub c
ld c, a
ld b, $03
- callba AdvanceMobileInactivityTimerAndCheckExpired
+ farcall AdvanceMobileInactivityTimerAndCheckExpired
jr c, .asm_1022f3
xor a
ret
@@ -5413,7 +5413,7 @@
ld [CurPartyMon], a
xor a
ld [wPokemonWithdrawDepositParameter], a
- callba RemoveMonFromPartyOrBox
+ farcall RemoveMonFromPartyOrBox
ld hl, PartyCount
inc [hl]
ld a, [hli]
@@ -5453,9 +5453,9 @@
Function102423: ; 102423
call Function102921
ret nc
- callba SaveAfterLinkTrade
- callba TrainerRankings_Trades
- callba BackupMobileEventIndex
+ farcall SaveAfterLinkTrade
+ farcall TrainerRankings_Trades
+ farcall BackupMobileEventIndex
ld hl, wcd4b
set 1, [hl]
ld a, 0
@@ -5523,7 +5523,7 @@
; 1024a8
Function1024a8: ; 1024a8
- callba Function1009f3
+ farcall Function1009f3
ret c
Function1024af: ; 1024af
@@ -5608,7 +5608,7 @@
call Function102b9c
call Function102bdc
jr c, .asm_10256d
- callba Functionfb5dd
+ farcall Functionfb5dd
jr c, .asm_102568
ld hl, wcd4b
set 1, [hl]
@@ -5726,9 +5726,9 @@
Function1025ff: ; 1025ff
ld hl, wcd4b
set 2, [hl]
- callba Function1009f3
+ farcall Function1009f3
ret c
- callba MobileMenuJoypad
+ farcall MobileMenuJoypad
ld a, [wMenuJoypadFilter]
and c
ret z
@@ -5788,9 +5788,9 @@
Function10266b: ; 10266b
ld hl, wcd4b
set 2, [hl]
- callba Function1009f3
+ farcall Function1009f3
ret c
- callba MobileMenuJoypad
+ farcall MobileMenuJoypad
ld a, [wMenuJoypadFilter]
and c
ret z
@@ -5840,7 +5840,7 @@
Function1026c8: ; 1026c8
call GetJoypad
- callba Function1009f3
+ farcall Function1009f3
ret c
ld a, [wcd4a]
ld hl, Jumptable_1026da
@@ -5920,7 +5920,7 @@
Function102754: ; 102754
call GetJoypad
- callba Function1009f3
+ farcall Function1009f3
ret c
ld a, [wcd4a]
ld hl, Jumptable_102766
@@ -6017,7 +6017,7 @@
ld c, 18
ld d, h
ld e, l
- callba _LinkTextbox
+ farcall _LinkTextbox
ld de, .Stats_Trade
hlcoord 2, 16
call PlaceString
@@ -6154,7 +6154,7 @@
ld hl, wcd4b
res 6, [hl]
ld [wcd50], a
- callba StartMobileInactivityTimer
+ farcall StartMobileInactivityTimer
ld a, 0
ld [wcd4a], a
ret
@@ -6162,7 +6162,7 @@
Function1028fc: ; 1028fc
call GetJoypad
- callba Function1009f3
+ farcall Function1009f3
jr nc, .asm_102909
and a
ret
@@ -6238,7 +6238,7 @@
; 10296e
Function10296e: ; 10296e
- callba Function100382
+ farcall Function100382
and a
ld a, [wcd27]
bit 7, a
@@ -6251,7 +6251,7 @@
; 102984
Function102984: ; 102984
- callba Function100382
+ farcall Function100382
and a
ld a, [wcd27]
bit 7, a
@@ -6313,7 +6313,7 @@
ld c, 8
ld d, h
ld e, l
- callba _LinkTextbox
+ farcall _LinkTextbox
ld de, String_102a26
hlcoord 12, 8
call PlaceString
@@ -6329,9 +6329,9 @@
; 1029fe
Function1029fe: ; 1029fe
- callba Function1009f3
+ farcall Function1009f3
ret c
- callba MobileMenuJoypad
+ farcall MobileMenuJoypad
ld a, c
ld hl, wMenuJoypadFilter
and [hl]
@@ -6410,7 +6410,7 @@
call GetPartyLocation
ld b, h
ld c, l
- callba GetCaughtGender
+ farcall GetCaughtGender
ld a, c
ld [wPlayerTrademonCaughtData], a
ld hl, OTPlayerName
@@ -6455,7 +6455,7 @@
call GetPartyLocation
ld b, h
ld c, l
- callba GetCaughtGender
+ farcall GetCaughtGender
ld a, c
ld [wOTTrademonCaughtData], a
ret
@@ -6469,11 +6469,11 @@
ld a, [wcd2f]
and a
jr nz, .asm_102b2b
- callba Function108026
+ farcall Function108026
jr .asm_102b31
.asm_102b2b
- callba Function10802a
+ farcall Function10802a
.asm_102b31
ret
@@ -6485,7 +6485,7 @@
ld [CurPartyMon], a
ld a, $01
ld [wForceEvolution], a
- callba EvolvePokemon
+ farcall EvolvePokemon
call Function102d9a
call Function102dd3
call Function102dec
@@ -6558,7 +6558,7 @@
ld [CurPartyMon], a
call LowVolume
call ClearSprites
- callba _MobileStatsScreenInit
+ farcall _MobileStatsScreenInit
ld a, [CurPartyMon]
inc a
ld [wMenuCursorY], a
@@ -6645,7 +6645,7 @@
; 102c48
Function102c48: ; 102c48
- callba Function10165a
+ farcall Function10165a
ld a, 0
call GetSRAMBank
ld hl, $a600
@@ -6797,7 +6797,7 @@
ld hl, PartyMon1DVs
call AddNTimes
predef GetUnownLetter
- callba UpdateUnownDex
+ farcall UpdateUnownDex
ld a, [wFirstUnownSeen]
and a
jr nz, .asm_102d98
@@ -6818,7 +6818,7 @@
hlcoord 0, 0, AttrMap
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
call ByteFill
- callba HDMATransferAttrMapAndTileMapToWRAMBank3
+ farcall HDMATransferAttrMapAndTileMapToWRAMBank3
ret
; 102db7
@@ -6836,7 +6836,7 @@
ld c, 18
ld d, h
ld e, l
- callba _LinkTextbox
+ farcall _LinkTextbox
ret
; 102dd3
@@ -6846,7 +6846,7 @@
ld hl, VTiles0
lb bc, BANK(GFX_1032a2), 4
call Get2bpp
- callba __LoadTradeScreenBorder
+ farcall __LoadTradeScreenBorder
call EnableLCD
ret
; 102dec
@@ -6857,7 +6857,7 @@
ld bc, 4 palettes
ld a, $05
call FarCopyWRAM
- callba Function49742
+ farcall Function49742
call SetPalettes
call DelayFrame
ret
@@ -6880,7 +6880,7 @@
ld c, 11
ld d, h
ld e, l
- callba _LinkTextbox
+ farcall _LinkTextbox
.okay
ld de, .waiting
@@ -6905,8 +6905,8 @@
; 102e4f
Function102e4f: ; 102e4f
- callba Function16d42e
- callba _InitMG_Mobile_LinkTradePalMap
+ farcall Function16d42e
+ farcall _InitMG_Mobile_LinkTradePalMap
ld de, PlayerName
hlcoord 4, 0
call PlaceString
@@ -7399,7 +7399,7 @@
ld [wd1ee], a
call Function1034be
call UpdateSprites
- callba HDMATransferAttrMapAndTileMapToWRAMBank3
+ farcall HDMATransferAttrMapAndTileMapToWRAMBank3
ld a, $01
ld [wd1f0], a
call Function10339a
@@ -7413,7 +7413,7 @@
call Function1033af
call Function10339a
call Function10342c
- callba HDMATransferTileMapToWRAMBank3
+ farcall HDMATransferTileMapToWRAMBank3
ld a, [Buffer2]
bit 7, a
jr z, .asm_103362
@@ -7707,7 +7707,7 @@
; 1035c6
Function1035c6: ; 1035c6
- callba Function10138b
+ farcall Function10138b
ld b, 0
ld hl, Unknown_1035d7
add hl, bc
@@ -7799,7 +7799,7 @@
; 103654
Function103654: ; 103654
- callba Mobile_AlwaysReturnNotCarry
+ farcall Mobile_AlwaysReturnNotCarry
bit 7, c
jr nz, .asm_103666
ld hl, wcd2a
@@ -7815,7 +7815,7 @@
; 10366e
Mobile_SelectThreeMons: ; 10366e
- callba Mobile_AlwaysReturnNotCarry
+ farcall Mobile_AlwaysReturnNotCarry
bit 7, c
jr z, .asm_10369b
ld hl, UnknownText_0x10375d
@@ -7822,7 +7822,7 @@
call PrintText
call YesNoBox
jr c, .asm_103696
- callba CheckForMobileBattleRules
+ farcall CheckForMobileBattleRules
jr nc, .asm_103690
call JoyWaitAorB
jr .asm_103696
@@ -7867,7 +7867,7 @@
jr .asm_1036b5
.asm_1036d9
- callba CheckForMobileBattleRules
+ farcall CheckForMobileBattleRules
jr nc, .asm_1036e6
call JoyWaitAorB
jr .asm_1036f4
@@ -7899,7 +7899,7 @@
ld hl, SwarmFlags
bit 4, [hl]
jr z, .asm_10370f
- callba Function1008a6
+ farcall Function1008a6
.asm_10370f
ld a, c
@@ -8003,7 +8003,7 @@
.already_set
push bc
- callba Link_SaveGame
+ farcall Link_SaveGame
pop bc
jr c, .failed_to_save
ld a, $01
@@ -8011,7 +8011,7 @@
ld a, c
and a
ret z
- callba Function1006fd
+ farcall Function1006fd
ret
.failed_to_save
@@ -8089,10 +8089,10 @@
; 0x103823
Function103823: ; 103823
- callba Mobile_AlwaysReturnNotCarry
+ farcall Mobile_AlwaysReturnNotCarry
bit 7, c
jr nz, .asm_103838
- callba Function1008a6
+ farcall Function1008a6
ld a, c
cp $01
jr c, .asm_10383a
@@ -8117,8 +8117,8 @@
ld hl, UnknownText_0x103876
call PrintText
call JoyWaitAorB
- callba Script_reloadmappart
- callba Function4a94e
+ farcall Script_reloadmappart
+ farcall Function4a94e
jr c, .asm_103870
ld hl, wd002
ld de, wPlayerMonSelection
@@ -8140,10 +8140,10 @@
; 0x10387b
Function10387b: ; 10387b
- callba Mobile_AlwaysReturnNotCarry
+ farcall Mobile_AlwaysReturnNotCarry
bit 7, c
ret nz
- callba Function1008a6
+ farcall Function1008a6
ld a, c
ld [StringBuffer2], a
ld hl, UnknownText_0x103898
--- a/mobile/mobile_41.asm
+++ b/mobile/mobile_41.asm
@@ -1027,7 +1027,7 @@
ld hl, VTiles2 tile $6b
ld b, $f ; XXX no graphics at 0f:40b0
call Get2bpp
- callba LoadFrame
+ farcall LoadFrame
ret
; 10649b
--- a/mobile/mobile_42.asm
+++ b/mobile/mobile_42.asm
@@ -175,7 +175,7 @@
ld [hWX], a
ld a, $90
ld [hWY], a
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
call DelayFrame
@@ -237,7 +237,7 @@
ld [hWX], a
ld a, $90
ld [hWY], a
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
xor a
ld hl, wSpriteAnimDict
ld [hli], a
@@ -361,8 +361,8 @@
ld [hWY], a
call LoadStandardFont
call LoadFontsBattleExtra
- callba MobileFunc_106462
- callba Function106464
+ farcall MobileFunc_106462
+ farcall Function106464
scf
ret
; 10827b
@@ -433,7 +433,7 @@
WaitMobileTradeSpriteAnims: ; 1082cc
.loop
push bc
- callba PlaySpriteAnimations
+ farcall PlaySpriteAnimations
pop bc
call DelayFrame
dec c
@@ -443,9 +443,9 @@
Function1082db: ; 1082db
.loop
- callba PlaySpriteAnimations
- callba SetUpPokeAnim
- callba HDMATransferTileMapToWRAMBank3
+ farcall PlaySpriteAnimations
+ farcall SetUpPokeAnim
+ farcall HDMATransferTileMapToWRAMBank3
jr nc, .loop
ret
; 1082f0
@@ -464,7 +464,7 @@
call Function108b78
push hl
push bc
- callba PlaySpriteAnimations
+ farcall PlaySpriteAnimations
pop bc
pop hl
call DelayFrame
@@ -552,7 +552,7 @@
ld de, VTiles2
call Function108201
call EnableLCD
- callba DeinitializeAllSprites
+ farcall DeinitializeAllSprites
xor a
ld [hSCX], a
ld [hSCY], a
@@ -687,7 +687,7 @@
ld de, VTiles2
call Function108201
call EnableLCD
- callba DeinitializeAllSprites
+ farcall DeinitializeAllSprites
call DelayFrame
ld de, TradeBallGFX
ld hl, VTiles0
@@ -756,7 +756,7 @@
ld de, VTiles2
call Function108201
call EnableLCD
- callba DeinitializeAllSprites
+ farcall DeinitializeAllSprites
call DelayFrame
ld de, TradeBallGFX
ld hl, VTiles0
@@ -813,7 +813,7 @@
; 108638
MobileTradeAnim_02: ; 108638
- callba DeinitializeAllSprites
+ farcall DeinitializeAllSprites
call ClearBGPalettes
call ClearSprites
call ClearTileMap
@@ -849,7 +849,7 @@
; 108689
MobileTradeAnim_10: ; 108689
- callba DeinitializeAllSprites
+ farcall DeinitializeAllSprites
call ClearBGPalettes
call ClearSprites
call ClearTileMap
@@ -1097,7 +1097,7 @@
jr .loop
.done
- callba DeinitializeAllSprites
+ farcall DeinitializeAllSprites
depixel 9, 10, 2, 0
ld a, SPRITE_ANIM_INDEX_MOBILE_25
call _InitSpriteAnimStruct
@@ -1189,7 +1189,7 @@
MobileTradeAnim_0f: ; 108919
ld c, 40
call WaitMobileTradeSpriteAnims
- callba DeinitializeAllSprites
+ farcall DeinitializeAllSprites
call ClearBGPalettes
call ClearSprites
call ClearTileMap
@@ -1571,7 +1571,7 @@
; 108bbd
MobileTradeAnim_DeleteSprites: ; 108bbd
- callba DeinitializeAllSprites
+ farcall DeinitializeAllSprites
call ClearSprites
ret
; 108bc7
@@ -1590,7 +1590,7 @@
ret
.delete
- callba DeinitializeSprite
+ farcall DeinitializeSprite
ret
Function108be0: ; 108be0 (42:4be0)
--- a/mobile/mobile_45.asm
+++ b/mobile/mobile_45.asm
@@ -6838,7 +6838,7 @@
SECTION "Mobile Stadium", ROMX
Special_GiveOddEgg: ; 117656
- callba GiveOddEgg
+ farcall GiveOddEgg
ret
; 11765d
@@ -6898,9 +6898,9 @@
call ByteFill
call ClearBGPalettes
call ClearSprites
- callba Function171c87
- callba ReloadMapPart
- callba ClearSpriteAnims
+ farcall Function171c87
+ farcall ReloadMapPart
+ farcall ClearSpriteAnims
ret
Function1176ee: ; 1176ee (45:76ee)
@@ -6910,12 +6910,12 @@
bit 7, a
jr nz, .quit
call Function117719
- callba PlaySpriteAnimations
- callba ReloadMapPart
+ farcall PlaySpriteAnimations
+ farcall ReloadMapPart
jr .loop
.quit
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
call ClearBGPalettes
call ClearScreen
call ClearSprites
@@ -6945,7 +6945,7 @@
Function117738: ; 117738 (45:7738)
- callba Function171ccd
+ farcall Function171ccd
depixel 6, 3
ld a, $1d
call _InitSpriteAnimStruct
@@ -7004,7 +7004,7 @@
ret
Function117764_select: ; 1177a5 (45:77a5)
- callba Function171cf0
+ farcall Function171cf0
ret
Function117764_start: ; 1177ac (45:77ac)
@@ -7176,7 +7176,7 @@
call LoadMenuDataHeader
call MenuBox
call MenuBoxCoord2Tile
- callba ReloadMapPart
+ farcall ReloadMapPart
hlcoord 16, 8
ld de, YessNoString_1179c5
call PlaceString
@@ -7278,7 +7278,7 @@
call LoadMenuDataHeader
call MenuBox
call MenuBoxCoord2Tile
- callba ReloadMapPart
+ farcall ReloadMapPart
hlcoord 1, 14
ld de, NotAPokemonPasswordString
call PlaceString
@@ -7379,8 +7379,8 @@
ld [wcf66], a
call ClearBGPalettes
call ClearSprites
- callba Function172e78
- callba HDMATransferAttrMapAndTileMapToWRAMBank3
+ farcall Function172e78
+ farcall HDMATransferAttrMapAndTileMapToWRAMBank3
ret
; 0x117ab4
@@ -7388,9 +7388,9 @@
Function117ab4: ; 0x117ab4
call ClearBGPalettes
call ClearSprites
- callba Function172e78
- callba Function172eb9
- callba ReloadMapPart
+ farcall Function172e78
+ farcall Function172eb9
+ farcall ReloadMapPart
ret
; 0x117acd
@@ -7401,7 +7401,7 @@
bit 7, a
jr nz, .asm_117ae2
call Function117ae9
- callba HDMATransferAttrMapAndTileMapToWRAMBank3
+ farcall HDMATransferAttrMapAndTileMapToWRAMBank3
jr Function117acd
.asm_117ae2
@@ -7431,7 +7431,7 @@
dw Function117c4a
Function117b06:
- callba Function172eb9
+ farcall Function172eb9
ld a, $10
ld [wcf64], a
jp MobileStudium_JumptableIncrement
@@ -7508,13 +7508,13 @@
jr nz, .b_button
call ExitMenu
call ExitMenu
- callba ReloadMapPart
+ farcall ReloadMapPart
jp MobileStudium_JumptableIncrement
.b_button
call ExitMenu
call ExitMenu
- callba ReloadMapPart
+ farcall ReloadMapPart
ld a, $80
ld [wJumptableIndex], a
ret
@@ -7523,7 +7523,7 @@
call Function117c89
ld a, $1
ld [hBGMapMode], a
- callba Function118284
+ farcall Function118284
call ClearSprites
ld a, [wc300]
and a
@@ -7533,7 +7533,7 @@
.asm_117bd0
ld a, $2
ld [wc303], a
- callba DisplayMobileError
+ farcall DisplayMobileError
ld a, $80
ld [wJumptableIndex], a
ret
@@ -7580,7 +7580,7 @@
.asm_117c20
pop af
ld [rSVBK], a
- callba Function172eb9
+ farcall Function172eb9
ld a, [rSVBK]
push af
ld a, $3
@@ -7601,7 +7601,7 @@
call LoadMenuDataHeader
call MenuBox
call MenuBoxCoord2Tile
- callba ReloadMapPart
+ farcall ReloadMapPart
ld hl, MobileStadiumSuccessText
call PrintText
ld a, [rSVBK]
--- a/mobile/mobile_45_sprite_engine.asm
+++ b/mobile/mobile_45_sprite_engine.asm
@@ -491,7 +491,7 @@
pop af
ld [rSVBK], a
- callba ReloadMapPart
+ farcall ReloadMapPart
ld a, $8
ld [MusicFade], a
ld de, MUSIC_MOBILE_ADAPTER
@@ -515,7 +515,7 @@
; 116294
Function116294: ; 116294
- callba Function170d02
+ farcall Function170d02
ld a, [$c319]
inc a
ld [$c319], a
@@ -541,7 +541,7 @@
; 1162cb
Function1162cb: ; 1162cb
- callba Function170cc6
+ farcall Function170cc6
ld a, [$c319]
inc a
ld [$c319], a
@@ -676,7 +676,7 @@
call UpdateSprites
pop af
ld [rSVBK], a
- callba ReloadMapPart
+ farcall ReloadMapPart
ld a, $8
ld [MusicFade], a
ld a, [wMapMusic]
@@ -700,7 +700,7 @@
ld bc, 16 * 4
call ByteFill
call DelayFrame
- callba Function14146
+ farcall Function14146
ld b, SCGB_MAPPALS
call GetSGBLayout
ld a, [rSVBK]
@@ -718,10 +718,10 @@
ld a, $90
ld [hWY], a
call UpdateSprites
- callba Function14157
+ farcall Function14157
pop af
ld [rSVBK], a
- callba ReloadMapPart
+ farcall ReloadMapPart
ld a, [wLinkMode]
cp $4
jr z, .asm_11642a
@@ -750,10 +750,10 @@
; 116441
Function116441: ; 116441
- callba Function17d405
+ farcall Function17d405
ld a, $90
ld [hWY], a
- callba ReloadMapPart
+ farcall ReloadMapPart
ld a, $8
ld [MusicFade], a
ld a, [wMapMusic]
--- a/mobile/mobile_46.asm
+++ b/mobile/mobile_46.asm
@@ -33,8 +33,8 @@
.skip
call Function1184a5
call BattleTowerRoomMenu_WriteMessage
- callba Function115dd3
- callba Function11619d
+ farcall Function115dd3
+ farcall Function11619d
call DelayFrame
ld a, [wcf66]
ld hl, wcd33
@@ -74,8 +74,8 @@
.asm_118090
call Function11857c
call BattleTowerRoomMenu_WriteMessage
- callba Function115dd3
- callba Function11619d
+ farcall Function115dd3
+ farcall Function11619d
call DelayFrame
ld a, [wcf66]
ld hl, wcd33
@@ -120,8 +120,8 @@
.asm_1180f2
call Function1184ec
call BattleTowerRoomMenu_WriteMessage
- callba Function115dd3
- callba Function11619d
+ farcall Function115dd3
+ farcall Function11619d
call DelayFrame
ld a, [wcf66]
ld hl, wcd33
@@ -165,8 +165,8 @@
.skip
call BattleTowerRoomMenu_Jumptable
call BattleTowerRoomMenu_WriteMessage
- callba Function115dd3
- callba Function11619d
+ farcall Function115dd3
+ farcall Function11619d
call DelayFrame
ld a, [wcf66]
ld hl, wcd33
@@ -203,12 +203,12 @@
ld de, w3_d202
ld c, $96
- callba CheckStringForErrors_IgnoreTerminator
+ farcall CheckStringForErrors_IgnoreTerminator
jr c, .return_d3
ld de, w3_d202
lb bc, 1, $96
- callba CheckStringContainsLessThanBNextCharacters
+ farcall CheckStringContainsLessThanBNextCharacters
jr c, .return_d3
ld hl, w3_d202
@@ -254,8 +254,8 @@
.asm_11820b
call Function1185c3
call BattleTowerRoomMenu_WriteMessage
- callba Function115dd3
- callba Function11619d
+ farcall Function115dd3
+ farcall Function11619d
call DelayFrame
ld a, [wcf66]
ld hl, wcd33
@@ -292,8 +292,8 @@
.asm_11825f
call Function118624
call BattleTowerRoomMenu_WriteMessage
- callba Function115dd3
- callba Function11619d
+ farcall Function115dd3
+ farcall Function11619d
call DelayFrame
ld a, [wcf66]
ld hl, wcd33
@@ -328,8 +328,8 @@
.asm_1182b0
call Function1186f5
call BattleTowerRoomMenu_WriteMessage
- callba Function115dd3
- callba Function11619d
+ farcall Function115dd3
+ farcall Function11619d
call DelayFrame
ld a, [wcf66]
ld hl, wcd33
@@ -366,8 +366,8 @@
.asm_118301
call Function118746
call BattleTowerRoomMenu_WriteMessage
- callba Function115dd3
- callba Function11619d
+ farcall Function115dd3
+ farcall Function11619d
call DelayFrame
ld a, [wcf66]
ld hl, wcd33
@@ -404,8 +404,8 @@
.asm_118355
call Function118671
call BattleTowerRoomMenu_WriteMessage
- callba Function115dd3
- callba Function11619d
+ farcall Function115dd3
+ farcall Function11619d
call DelayFrame
ld a, [wcf66]
ld hl, wcd33
@@ -441,8 +441,8 @@
.asm_1183a6
call Function1186b2
call BattleTowerRoomMenu_WriteMessage
- callba Function115dd3
- callba Function11619d
+ farcall Function115dd3
+ farcall Function11619d
call DelayFrame
ld a, [wcf66]
ld hl, wcd33
@@ -487,10 +487,10 @@
ld [hMobileReceive], a
ld [hMobile], a
ei
- callba MobileFunc_106462
- callba Function106464
- callba Function115d99
- callba Function11615a
+ farcall MobileFunc_106462
+ farcall Function106464
+ farcall Function115d99
+ farcall Function11615a
ld a, $5
call GetSRAMBank
xor a
@@ -1154,7 +1154,7 @@
ld a, [wc3f0]
ld [$c319], a
ld c, $1
- callba Function115e18
+ farcall Function115e18
ld a, $8
ld [wcd3c], a
call BattleTowerRoomMenu2
@@ -1583,8 +1583,8 @@
ld a, b
ld [$b2fb], a
call CloseSRAM
- callba Function170be4
- callba Function1700c4
+ farcall Function170be4
+ farcall Function1700c4
jr .asm_118d78
.asm_118d6e
@@ -1673,7 +1673,7 @@
push af
ld a, $1
ld [rSVBK], a
- callba Function11b93b
+ farcall Function11b93b
pop af
ld [rSVBK], a
@@ -3259,7 +3259,7 @@
ld a, $1
ld [rSVBK], a
call FadeToMenu
- callba Function10803d
+ farcall Function10803d
call Function11a9ce
call RestartMapMusic
ld a, $3
@@ -3272,7 +3272,7 @@
ld [wcf64], a
pop af
ld [wJumptableIndex], a
- callba Function115dc3
+ farcall Function115dc3
jp BattleTowerRoomMenu_IncrementJumptable
; 11984e
@@ -3283,7 +3283,7 @@
ld a, [wcd38]
and a
jr nz, .asm_1198a8
- callba Function170000
+ farcall Function170000
ld a, [wJumptableIndex]
push af
ld a, [wcf64]
@@ -3295,7 +3295,7 @@
ld a, $1
ld [rSVBK], a
call FadeToMenu
- callba MobileTradeAnimation_SendGivemonToGTS
+ farcall MobileTradeAnimation_SendGivemonToGTS
call Function11a9ce
call RestartMapMusic
ld a, $3
@@ -3308,7 +3308,7 @@
ld [wcf64], a
pop af
ld [wJumptableIndex], a
- callba Function115dc3
+ farcall Function115dc3
jp BattleTowerRoomMenu_IncrementJumptable
.asm_1198a0
@@ -3317,7 +3317,7 @@
jp BattleTowerRoomMenu_IncrementJumptable
.asm_1198a8
- callba Function17005a
+ farcall Function17005a
ld a, [wJumptableIndex]
push af
ld a, [wcf64]
@@ -3329,7 +3329,7 @@
ld a, $1
ld [rSVBK], a
call FadeToMenu
- callba MobileTradeAnimation_RetrieveGivemonFromGTS
+ farcall MobileTradeAnimation_RetrieveGivemonFromGTS
call Function11a9ce
call RestartMapMusic
ld a, $3
@@ -3342,7 +3342,7 @@
ld [wcf64], a
pop af
ld [wJumptableIndex], a
- callba Function115dc3
+ farcall Function115dc3
jp BattleTowerRoomMenu_IncrementJumptable
; 1198ee
@@ -3386,7 +3386,7 @@
; 119937
Function119937: ; 119937
- callba Function1707f4
+ farcall Function1707f4
jp BattleTowerRoomMenu_IncrementJumptable
; 119940
@@ -4366,8 +4366,8 @@
and a
jr z, .asm_119fd4
call ExitMenu
- callba ReloadMapPart
- callba Function115dc3
+ farcall ReloadMapPart
+ farcall Function115dc3
ld a, [wcd33]
ld [wcf66], a
ld a, $a
@@ -4383,7 +4383,7 @@
ld [wc30d], a
ld a, $1
ld [wc314], a
- callba ReloadMapPart
+ farcall ReloadMapPart
and a
ret
@@ -4390,10 +4390,10 @@
.asm_119fef
call ExitMenu
call ExitMenu
- callba ReloadMapPart
+ farcall ReloadMapPart
ld a, [wMobileInactivityTimerSeconds]
ld [wcf66], a
- callba Function115dc3
+ farcall Function115dc3
ld a, $a
ld [wc300], a
scf
@@ -4434,7 +4434,7 @@
ld a, $1
ld [rSVBK], a
call FadeToMenu
- callba Function11765d
+ farcall Function11765d
call Function11a9ce
ld a, $3
ld [rSVBK], a
@@ -4444,9 +4444,9 @@
call CopyBytes
ld a, $1
ld [rSVBK], a
- callba Function115d99
+ farcall Function115d99
ld c, $0
- callba Function115e18
+ farcall Function115e18
ld a, $1
ld [wc305], a
ret
@@ -4460,15 +4460,15 @@
ld a, $5
ld [wMenuBorderBottomCoord], a
call PushWindow
- callba Function11765d
- callba Function117ab4
- callba MobileFunc_106462
- callba Function106464
+ farcall Function11765d
+ farcall Function117ab4
+ farcall MobileFunc_106462
+ farcall Function106464
call ExitMenu
- callba ReloadMapPart
- callba Function115d99
+ farcall ReloadMapPart
+ farcall Function115d99
ld c, $0
- callba Function115e18
+ farcall Function115e18
ld a, $1
ld [wc305], a
ret
@@ -4483,15 +4483,15 @@
ld a, $11
ld [wMenuBorderBottomCoord], a
call PushWindow
- callba Function11765d
- callba Function17d3f6
- callba MobileFunc_106462
- callba Function106464
+ farcall Function11765d
+ farcall Function17d3f6
+ farcall MobileFunc_106462
+ farcall Function106464
call ExitMenu
- callba ReloadMapPart
- callba Function115d99
+ farcall ReloadMapPart
+ farcall Function115d99
ld c, $0
- callba Function115e18
+ farcall Function115e18
ld a, $1
ld [wc305], a
ret
@@ -4500,7 +4500,7 @@
Function11a113: ; 11a113
call Function11a63c
ld c, $1
- callba Function115e18
+ farcall Function115e18
hlcoord 4, 2
ld de, String_11a6c8
call PlaceString
@@ -4580,7 +4580,7 @@
and a
jr nz, .asm_11a1b6
call ExitMenu
- callba ReloadMapPart
+ farcall ReloadMapPart
call Function11a63c
hlcoord 4, 2
ld de, String_11a6d2
@@ -4590,7 +4590,7 @@
.asm_11a1b6
call ExitMenu
- callba ReloadMapPart
+ farcall ReloadMapPart
ld a, [wMobileInactivityTimerSeconds]
ld [wcf66], a
ld [wcd80], a
@@ -4721,7 +4721,7 @@
and a
jr nz, .exit_no_carry
call ExitMenu
- callba ReloadMapPart
+ farcall ReloadMapPart
ld a, [wMobileInactivityTimerFrames]
cp $0
jr z, .asm_11a2b4
@@ -4743,7 +4743,7 @@
.exit_no_carry
call ExitMenu
- callba ReloadMapPart
+ farcall ReloadMapPart
and a
ret
; 11a2cf
@@ -4775,7 +4775,7 @@
Function11a2e6: ; 11a2e6
call Function11a63c
ld c, $2
- callba Function115e18
+ farcall Function115e18
hlcoord 4, 2
ld de, String_11a71e
call PlaceString
@@ -4822,8 +4822,8 @@
.asm_11a346
call ExitMenu
- callba ReloadMapPart
- callba Function115dc3
+ farcall ReloadMapPart
+ farcall Function115dc3
and a
ret
; 11a357
@@ -4866,7 +4866,7 @@
and a
jr nz, .asm_11a3b1
call ExitMenu
- callba ReloadMapPart
+ farcall ReloadMapPart
call Function11a63c
hlcoord 4, 2
ld de, String_11a6d2
@@ -4876,7 +4876,7 @@
.asm_11a3b1
call ExitMenu
- callba ReloadMapPart
+ farcall ReloadMapPart
ld a, [wMobileInactivityTimerSeconds]
ld [wcf66], a
ld [wcd80], a
@@ -4941,7 +4941,7 @@
and a
jr nz, .asm_11a43f
call ExitMenu
- callba ReloadMapPart
+ farcall ReloadMapPart
call Function11a63c
hlcoord 4, 2
ld de, String_11a6d2
@@ -4951,7 +4951,7 @@
.asm_11a43f
call ExitMenu
- callba ReloadMapPart
+ farcall ReloadMapPart
ld a, $1c
ld [wcf66], a
ld [wcd80], a
@@ -5012,7 +5012,7 @@
and a
jr nz, .asm_11a4c7
call ExitMenu
- callba ReloadMapPart
+ farcall ReloadMapPart
call Function11a63c
hlcoord 4, 2
ld de, String_11a6d2
@@ -5024,7 +5024,7 @@
.asm_11a4c7
call ExitMenu
- callba ReloadMapPart
+ farcall ReloadMapPart
ld a, [wMobileInactivityTimerFrames]
ld [wcf66], a
ld [wcd80], a
@@ -5059,7 +5059,7 @@
and a
jr nz, .asm_11a522
call ExitMenu
- callba ReloadMapPart
+ farcall ReloadMapPart
call Function11a63c
hlcoord 4, 2
ld de, String_11a6d2
@@ -5069,7 +5069,7 @@
.asm_11a522
call ExitMenu
- callba ReloadMapPart
+ farcall ReloadMapPart
ld a, [wMobileInactivityTimerSeconds]
ld [wcf66], a
ld [wcd80], a
@@ -5098,7 +5098,7 @@
call Function11a9f0
jr nz, .asm_11a562
call ExitMenu
- callba ReloadMapPart
+ farcall ReloadMapPart
.asm_11a562
scf
@@ -5174,10 +5174,10 @@
ld b, $4
ld c, $12
call Function3eea
- callba ReloadMapPart
+ farcall ReloadMapPart
call UpdateSprites
ld c, $0
- callba Function115e18
+ farcall Function115e18
ld a, $1
ld [wc305], a
ret
@@ -5209,7 +5209,7 @@
hlcoord 15, 7
ld a, $ed
ld [hl], a
- callba ReloadMapPart
+ farcall ReloadMapPart
ret
; 11a63c
@@ -5578,10 +5578,10 @@
call ClearBGPalettes
call ReloadTilesetAndPalettes
call Call_ExitMenu
- callba MobileFunc_106462
- callba Function106464
+ farcall MobileFunc_106462
+ farcall Function106464
call ret_d90
- callba FinishExitMenu
+ farcall FinishExitMenu
call UpdateSprites
ret
; 11a9f0
@@ -5733,7 +5733,7 @@
Function11ac3e: ; 11ac3e
call SpeechTextBox
call FadeToMenu
- callab ClearSpriteAnims2
+ callfar ClearSpriteAnims2
call Function11ac51
call CloseSubmenu
ret
@@ -5773,8 +5773,8 @@
call Function11ad6e
ld a, 30 * 4
ld [wCurrSpriteOAMAddr], a
- callba DoNextFrameForAllSprites
- callba ReloadMapPart
+ farcall DoNextFrameForAllSprites
+ farcall ReloadMapPart
jr .loop
.asm_11aca8
@@ -5845,7 +5845,7 @@
call ClearBGPalettes
call ClearSprites
call ClearTileMap
- callba Function17c000
+ farcall Function17c000
ld a, [wMenuCursorY]
ld [wcd82], a
dec a
@@ -5872,7 +5872,7 @@
ld [wcd30], a
ld a, $2
ld [wc7d4], a
- callba Pokedex_OrderMonsByMode
+ farcall Pokedex_OrderMonsByMode
ret
; 11ad6e
@@ -5917,7 +5917,7 @@
hlcoord 10, 10, AttrMap
lb bc, 8, 8
call Function11afd6
- callba ReloadMapPart
+ farcall ReloadMapPart
call Function11ad8a
ld a, $1
ld [wMenuCursorY], a
@@ -5996,7 +5996,7 @@
.asm_11ae2e
call ExitMenu
- callba ReloadMapPart
+ farcall ReloadMapPart
ret
; 11ae38
@@ -6034,7 +6034,7 @@
hlcoord 9, 12, AttrMap
lb bc, 6, 11
call Function11afd6
- callba ReloadMapPart
+ farcall ReloadMapPart
call Function11ad8a
ld a, $1
ld [wMenuCursorY], a
@@ -6102,7 +6102,7 @@
.asm_11aef7
call ExitMenu
call ExitMenu
- callba ReloadMapPart
+ farcall ReloadMapPart
ret
; 11af04
@@ -6125,7 +6125,7 @@
hlcoord 9, 12, AttrMap
lb bc, 6, 11
call Function11afd6
- callba ReloadMapPart
+ farcall ReloadMapPart
call Function11ad8a
ld a, $2
ld [wMenuCursorY], a
@@ -6193,7 +6193,7 @@
.asm_11afaa
call ExitMenu
call ExitMenu
- callba ReloadMapPart
+ farcall ReloadMapPart
ret
; 11afb7
@@ -6697,7 +6697,7 @@
call PlaceString
xor a
ld [MonType], a
- callba GetGender
+ farcall GetGender
hlcoord 1, 4
ld a, [CurPartySpecies]
ld bc, wcd2f
@@ -6771,7 +6771,7 @@
ld hl, $0003
add hl, bc
ld e, [hl]
- callba FlyFunction_GetMonIcon
+ farcall FlyFunction_GetMonIcon
hlcoord 4, 14
push hl
call GetPokemonName
@@ -7335,9 +7335,9 @@
ld [CurPartyMon], a
xor a
ld [wPokemonWithdrawDepositParameter], a
- callba RemoveMonFromPartyOrBox
- callba Function170807
- callba SaveAfterLinkTrade
+ farcall RemoveMonFromPartyOrBox
+ farcall Function170807
+ farcall SaveAfterLinkTrade
jp Function11ad8a
; 11b5e0
@@ -7425,7 +7425,7 @@
jr .asm_11b6b0
.asm_11b691
- callba Function17081d
+ farcall Function17081d
ld a, [ScriptVar]
and a
jr z, .asm_11b6b0
@@ -7486,42 +7486,42 @@
ld de, $c63d
ld c, 5
- callba CheckStringForErrors
+ farcall CheckStringForErrors
jr nc, .length_check_OT
- callba Mobile_CopyDefaultOTName
+ farcall Mobile_CopyDefaultOTName
.length_check_OT
ld de, $c63d
lb bc, 1, 5
- callba CheckStringContainsLessThanBNextCharacters
+ farcall CheckStringContainsLessThanBNextCharacters
jr nc, .error_check_nick
- callba Mobile_CopyDefaultOTName
+ farcall Mobile_CopyDefaultOTName
.error_check_nick
ld de, $c642
ld c, 5
- callba CheckStringForErrors
+ farcall CheckStringForErrors
jr nc, .length_check_nick
- callba Mobile_CopyDefaultNickname
+ farcall Mobile_CopyDefaultNickname
.length_check_nick
ld de, $c642
lb bc, 1, 5
- callba CheckStringContainsLessThanBNextCharacters
+ farcall CheckStringContainsLessThanBNextCharacters
jr nc, .error_check_mail
- callba Mobile_CopyDefaultNickname
+ farcall Mobile_CopyDefaultNickname
.error_check_mail
ld de, $c647
ld c, MAIL_MSG_LENGTH + 1
- callba CheckStringForErrors
+ farcall CheckStringForErrors
jr nc, .length_check_mail
- callba Mobile_CopyDefaultMail
+ farcall Mobile_CopyDefaultMail
.length_check_mail
ld de, $c647
lb bc, 2, MAIL_MSG_LENGTH + 1
- callba CheckStringContainsLessThanBNextCharacters
+ farcall CheckStringContainsLessThanBNextCharacters
jr c, .fix_mail
ld a, b
cp $2
@@ -7528,21 +7528,21 @@
jr nz, .mail_ok
.fix_mail
- callba Mobile_CopyDefaultMail
+ farcall Mobile_CopyDefaultMail
.mail_ok
ld de, $c668
ld c, $5
- callba CheckStringForErrors
+ farcall CheckStringForErrors
jr nc, .length_check_author
- callba Mobile_CopyDefaultMailAuthor
+ farcall Mobile_CopyDefaultMailAuthor
.length_check_author
ld de, $c668
lb bc, 1, 5
- callba CheckStringContainsLessThanBNextCharacters
+ farcall CheckStringContainsLessThanBNextCharacters
jr nc, .author_okay
- callba Mobile_CopyDefaultMailAuthor
+ farcall Mobile_CopyDefaultMailAuthor
.author_okay
ld a, [$c60e]
@@ -7608,21 +7608,21 @@
ld a, [hl]
ld [wOTTrademonDVs + 1], a
ld bc, $c60d ; pokemon_data_start
- callba GetCaughtGender
+ farcall GetCaughtGender
ld a, c
ld [wOTTrademonCaughtData], a
call SpeechTextBox
call FadeToMenu
- callba MobileTradeAnimation_ReceiveGetmonFromGTS
- callba Function17d1f1
+ farcall MobileTradeAnimation_ReceiveGetmonFromGTS
+ farcall Function17d1f1
ld a, $1
ld [wForceEvolution], a
ld a, $2
ld [wLinkMode], a
- callba EvolvePokemon
+ farcall EvolvePokemon
xor a
ld [wLinkMode], a
- callba SaveAfterLinkTrade
+ farcall SaveAfterLinkTrade
ld a, $5
call GetSRAMBank
ld a, $5
@@ -7646,7 +7646,7 @@
; 11b879
Function11b879: ; 11b879
- callba BattleTower_CheckSaveFileExistsAndIsYours
+ farcall BattleTower_CheckSaveFileExistsAndIsYours
ld a, [ScriptVar]
and a
ret z
@@ -7787,7 +7787,7 @@
ld a, $c64b / $100
ld [wMobileMonMailPointerBuffer + 1], a
call AddMobileMonToParty
- callba SaveAfterLinkTrade
+ farcall SaveAfterLinkTrade
ret
; 11b98f
@@ -7896,7 +7896,7 @@
; 11ba38
Function11ba38: ; 11ba38
- callba CheckCurPartyMonFainted
+ farcall CheckCurPartyMonFainted
ret c
xor a
ld [ScriptVar], a
--- a/mobile/mobile_5b.asm
+++ b/mobile/mobile_5b.asm
@@ -15,10 +15,10 @@
ld [wcfbe], a
; Do stuff
call MobileSystemSplashScreen_InitGFX ; Load GFX
- callba SetRAMStateForMobile
- callba EnableMobile
+ farcall SetRAMStateForMobile
+ farcall EnableMobile
call .RunJumptable
- callba DisableMobile
+ farcall DisableMobile
; Prevent this routine from running again
; until the next time the syatem is turned on
xor a
@@ -37,7 +37,7 @@
ld [wd003], a
.loop
call DelayFrame
- callba Function10635c
+ farcall Function10635c
ld a, [wd002]
ld hl, .Jumptable
rst JumpTable
@@ -192,7 +192,7 @@
ld bc, 8
ld a, $5
call FarCopyWRAM
- callba ApplyPals
+ farcall ApplyPals
ret
; 16c145
@@ -331,7 +331,7 @@
ld a, e
cp $8
jr nz, .asm_16c969
- callba ApplyPals
+ farcall ApplyPals
call SetPalettes
ld a, [rSVBK]
push af
@@ -361,7 +361,7 @@
ld a, [wd003]
and a
jr nz, .asm_16ca1d
- callba ApplyPals
+ farcall ApplyPals
.asm_16ca1d
ld a, [rSVBK]
@@ -433,7 +433,7 @@
ld a, e
cp $8
jr nz, .asm_16ca28
- callba ApplyPals
+ farcall ApplyPals
call SetPalettes
ld a, [rSVBK]
push af
@@ -686,7 +686,7 @@
ld bc, 2
ld a, $5
call FarCopyWRAM
- callba ApplyPals
+ farcall ApplyPals
ld a, $1
ld [hCGBPalUpdate], a
ret
--- a/mobile/mobile_5c.asm
+++ b/mobile/mobile_5c.asm
@@ -24,7 +24,7 @@
ld a, [hl]
ld [wPlayerTrademonID + 1], a
ld bc, $c633
- callba GetCaughtGender
+ farcall GetCaughtGender
ld a, c
ld [wPlayerTrademonCaughtData], a
ld a, [wcd81]
@@ -65,7 +65,7 @@
ld a, [hl]
ld [wOTTrademonID + 1], a
ld bc, $a82c
- callba GetCaughtGender
+ farcall GetCaughtGender
ld a, c
ld [wOTTrademonCaughtData], a
ld a, [wcd81]
@@ -324,7 +324,7 @@
ret
Function1719d6: ; 1719d6 (5c:59d6)
- callba BattleTowerRoomMenu_InitRAM
+ farcall BattleTowerRoomMenu_InitRAM
call Function1719ed
ld a, [rSVBK]
push af
@@ -343,9 +343,9 @@
ld [wcd4b], a
call ClearBGPalettes
call ClearSprites
- callba Function171d2b
- callba ReloadMapPart
- callba ClearSpriteAnims
+ farcall Function171d2b
+ farcall ReloadMapPart
+ farcall ClearSpriteAnims
ret
Function171a11: ; 171a11 (5c:5a11)
@@ -355,11 +355,11 @@
bit 7, a
jr nz, .done
call Function171a36
- callba PlaySpriteAnimations
- callba ReloadMapPart
+ farcall PlaySpriteAnimations
+ farcall ReloadMapPart
jr .loop
.done
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
call ClearSprites
ret
@@ -412,7 +412,7 @@
push af
ld a, $1
ld [rSVBK], a
- callba BattleTowerRoomMenu_Cleanup
+ farcall BattleTowerRoomMenu_Cleanup
pop af
ld [rSVBK], a
ld a, $a
@@ -420,7 +420,7 @@
ret
Function171a95: ; 171a95 (5c:5a95)
- callba Function171ccd
+ farcall Function171ccd
hlcoord 2, 8
ld de, String_171aa7
call PlaceString
@@ -457,7 +457,7 @@
push af
ld a, $1
ld [rSVBK], a
- callba BattleTowerRoomMenu_Cleanup
+ farcall BattleTowerRoomMenu_Cleanup
pop af
ld [rSVBK], a
hlcoord 2, 6
@@ -619,7 +619,7 @@
call LoadMenuDataHeader
call MenuBox
call MenuBoxCoord2Tile
- callba ReloadMapPart
+ farcall ReloadMapPart
hlcoord 1, 14
ld de, String_171c73
call PlaceString
@@ -654,11 +654,11 @@
dec [hl]
ret nz
call ClearBGPalettes
- callba MobileFunc_106462
- callba Function106464
+ farcall MobileFunc_106462
+ farcall Function106464
ld a, $2
ld [wc303], a
- callba DisplayMobileError
+ farcall DisplayMobileError
asm_171c60: ; 171c60 (5c:5c60)
ld a, $80
ld [wcd49], a
--- a/mobile/mobile_5e.asm
+++ b/mobile/mobile_5e.asm
@@ -39,12 +39,12 @@
pop de
call Function17a6f5
call Function17aba0
- callba Function106464
+ farcall Function106464
call Function17ac0c
- callba HDMATransferAttrMapAndTileMapToWRAMBank3
+ farcall HDMATransferAttrMapAndTileMapToWRAMBank3
call Function17abcf
- callba LoadOW_BGPal7
- callba Function49420
+ farcall LoadOW_BGPal7
+ farcall Function49420
call SetPalettes
call DelayFrame
ret
@@ -163,11 +163,11 @@
bit 7, [hl]
res 7, [hl]
jr nz, .asm_17a79f
- callba HDMATransferTileMapToWRAMBank3
+ farcall HDMATransferTileMapToWRAMBank3
ret
.asm_17a79f
- callba ReloadMapPart
+ farcall ReloadMapPart
ret
; 17a7a6 (5e:67a6)
--- a/mobile/mobile_5f.asm
+++ b/mobile/mobile_5f.asm
@@ -77,7 +77,7 @@
ld [rVBK], a
call EnableLCD
- callba ReloadMapPart
+ farcall ReloadMapPart
ret
; 17c083
@@ -290,21 +290,21 @@
ld a, [hl]
ld [wOTTrademonDVs + 1], a
ld bc, $c608 + 5
- callba GetCaughtGender
+ farcall GetCaughtGender
ld a, c
ld [wOTTrademonCaughtData], a
call SpeechTextBox
call FadeToMenu
- callba Function10804d
- callba Function17d1f1
+ farcall Function10804d
+ farcall Function17d1f1
ld a, $1
ld [wForceEvolution], a
ld a, $2
ld [wLinkMode], a
- callba EvolvePokemon
+ farcall EvolvePokemon
xor a
ld [wLinkMode], a
- callba SaveAfterLinkTrade
+ farcall SaveAfterLinkTrade
ld a, $5
call GetSRAMBank
ld a, $5
@@ -413,7 +413,7 @@
ld bc, PARTYMON_STRUCT_LENGTH
call AddNTimes
predef GetUnownLetter
- callab UpdateUnownDex
+ callfar UpdateUnownDex
ld a, [wFirstUnownSeen]
and a
jr nz, .asm_17d223
@@ -515,7 +515,7 @@
Function17d2b6: ; 17d2b6
call Function17d2c0
- callba Function1181da
+ farcall Function1181da
ret
; 17d2c0
@@ -627,7 +627,7 @@
call ClearBGPalettes
call ClearSprites
call ClearScreen
- callba ReloadMapPart
+ farcall ReloadMapPart
call DisableLCD
ld hl, VTiles1 tile $6e
ld de, $c608
@@ -673,7 +673,7 @@
call ClearBGPalettes
call ClearSprites
call ClearScreen
- callba ReloadMapPart
+ farcall ReloadMapPart
Function17d405:
call DisableLCD
@@ -719,7 +719,7 @@
bit 7, a
jr nz, .asm_17d46f
call Function17d474
- callba ReloadMapPart
+ farcall ReloadMapPart
jr .asm_17d45a
.asm_17d46f
@@ -921,7 +921,7 @@
call Function17e451
call Function17e55b
call Function17e5af
- callba ReloadMapPart
+ farcall ReloadMapPart
jp Function17e438
; 17d5be
@@ -1330,7 +1330,7 @@
add hl, de
ld e, l
ld d, h
- callba Function11c08f
+ farcall Function11c08f
call Function17e349
ret
; 17d85d
@@ -1422,7 +1422,7 @@
ld [wcd3b], a
xor a
ld [wcf66], a
- callba Function118329
+ farcall Function118329
ld a, [wc300]
and a
jr z, .asm_17d8fe
@@ -1457,7 +1457,7 @@
jr nz, .asm_17d918
xor a
ld [wcf66], a
- callba Function11837a
+ farcall Function11837a
ld a, [wc300]
and a
jr z, .asm_17d936
@@ -1488,7 +1488,7 @@
ld [CurPartySpecies], a
ld a, [$c70c]
ld e, a
- callba LoadMonPaletteAsNthBGPal
+ farcall LoadMonPaletteAsNthBGPal
call SetPalettes
ld a, [$c708]
ld l, a
@@ -1500,7 +1500,7 @@
add hl, de
ld e, l
ld d, h
- callba HOF_AnimateFrontpic
+ farcall HOF_AnimateFrontpic
pop af
ld [rSVBK], a
call Function17e349
@@ -1524,7 +1524,7 @@
ld [TrainerClass], a
ld a, [$c70b]
ld e, a
- callba LoadTrainerClassPaletteAsNthBGPal
+ farcall LoadTrainerClassPaletteAsNthBGPal
call SetPalettes
ld a, [$c708]
ld e, a
@@ -1532,7 +1532,7 @@
ld d, a
push de
ld de, VTiles2
- callba GetTrainerPic
+ farcall GetTrainerPic
pop hl
decoord 0, 0
add hl, de
@@ -2340,7 +2340,7 @@
push hl
push bc
predef TryAddMonToParty
- callba SetCaughtData
+ farcall SetCaughtData
pop bc
pop hl
bit 1, b
@@ -2378,7 +2378,7 @@
ld a, [hli]
ld b, a
push hl
- callba SetGiftPartyMonCaughtData
+ farcall SetGiftPartyMonCaughtData
pop hl
pop bc
jr .asm_17df5e
@@ -2444,7 +2444,7 @@
ld e, l
push hl
ld b, $0
- callba CalcPkmnStats
+ farcall CalcPkmnStats
ld a, [PartyCount]
dec a
ld hl, PartyMon1HP
@@ -2532,9 +2532,9 @@
jp z, .asm_17e0ea
push bc
push hl
- callba LoadEnemyMon
- callba SentPkmnIntoBox
- callba SetBoxMonCaughtData
+ farcall LoadEnemyMon
+ farcall SentPkmnIntoBox
+ farcall SetBoxMonCaughtData
pop hl
pop bc
ld a, BANK(sBoxMonNicknames)
@@ -2563,7 +2563,7 @@
ld b, a
push hl
call CloseSRAM
- callba SetGiftBoxMonCaughtData
+ farcall SetGiftBoxMonCaughtData
ld a, $1
call GetSRAMBank
pop hl
@@ -2702,7 +2702,7 @@
ld a, [hli]
ld [ScriptVar], a
push hl
- callba MobileCheckOwnMonAnywhere
+ farcall MobileCheckOwnMonAnywhere
pop hl
jr c, .asm_17e159
inc hl
@@ -2950,7 +2950,7 @@
call Function17e32b
xor a
ld [wcf66], a
- callba Function118233
+ farcall Function118233
ld de, GFX_17eb7e
ld hl, VTiles2 tile $60
lb bc, BANK(GFX_17eb7e), 1
@@ -2999,7 +2999,7 @@
call ClearScreen
call Function17e349
call Function17d5f6
- callba DisplayMobileError
+ farcall DisplayMobileError
call Function17e349
call Function17dcaf
xor a
@@ -3042,7 +3042,7 @@
push af
ld a, $1
ld [rSVBK], a
- callba SaveGameData_
+ farcall SaveGameData_
pop af
ld [rSVBK], a
ret
@@ -3055,7 +3055,7 @@
push af
ld a, $1
ld [rSVBK], a
- callba SaveAfterLinkTrade
+ farcall SaveAfterLinkTrade
pop af
ld [rSVBK], a
ret
@@ -3068,7 +3068,7 @@
push af
ld a, $1
ld [rSVBK], a
- callba SaveBox
+ farcall SaveBox
pop af
ld [rSVBK], a
ret
@@ -3081,7 +3081,7 @@
push af
ld a, $1
ld [rSVBK], a
- callba SaveChecksum
+ farcall SaveChecksum
pop af
ld [rSVBK], a
ret
@@ -3094,8 +3094,8 @@
push af
ld a, $1
ld [rSVBK], a
- callba UpdateTrainerRankingsChecksum2
- callba BackupMobileEventIndex
+ farcall UpdateTrainerRankingsChecksum2
+ farcall BackupMobileEventIndex
pop af
ld [rSVBK], a
ret
@@ -3947,7 +3947,7 @@
ld c, l
ld b, h
pop de
- callba Function11c08f
+ farcall Function11c08f
ld c, l
ld b, h
pop de
@@ -3995,7 +3995,7 @@
ld a, [hl]
ld c, a
ld de, $c608
- callba Function48c63
+ farcall Function48c63
pop hl
ld de, $c608
call PlaceString
@@ -4279,7 +4279,7 @@
ld c, a
call CloseSRAM
ld de, $c608
- callba Function48c63
+ farcall Function48c63
pop hl
ld de, $c608
call PlaceString
@@ -4346,7 +4346,7 @@
call CopyBytes
pop de
ld c, $0
- callba Function11c075
+ farcall Function11c075
push hl
ld hl, $c708
ld de, wcd36
@@ -4643,7 +4643,7 @@
ld a, [wc303]
bit 7, a
jr nz, .quit
- callba HDMATransferAttrMapAndTileMapToWRAMBank3
+ farcall HDMATransferAttrMapAndTileMapToWRAMBank3
jr .loop
.quit
@@ -4704,7 +4704,7 @@
Function17f5c3: ; 17f5c3
call Function17f5e4
- callba FinishExitMenu
+ farcall FinishExitMenu
ld a, $1
ld [wc303], a
ret
@@ -4712,7 +4712,7 @@
Function17f5d2: ; 17f5d2
call Function17f5e4
- callba HDMATransferAttrMapAndTileMapToWRAMBank3
+ farcall HDMATransferAttrMapAndTileMapToWRAMBank3
call SetPalettes
ld a, $1
ld [wc303], a
--- a/mobile/mobile_menu.asm
+++ b/mobile/mobile_menu.asm
@@ -172,7 +172,7 @@
call PlaceHollowCursor
call WaitBGMap
call LoadStandardMenuDataHeader
- callba Function89de0
+ farcall Function89de0
call Call_ExitMenu
call MG_Mobile_Layout_LoadPals
call Function4a485
@@ -195,7 +195,7 @@
ld bc, NAME_LENGTH_JAPANESE
call CopyBytes
call CloseSRAM
- callba _LoadData
+ farcall _LoadData
ld c, 2
call DelayFrames
ld c, $1
@@ -205,7 +205,7 @@
pop af
and a
jr nz, .skip_save
- callba _SaveData
+ farcall _SaveData
.skip_save
ld c, 5
call DelayFrames
@@ -280,7 +280,7 @@
call ClearBox
hlcoord 1, 14
call PlaceString
- callba Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
+ farcall Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
call SetPalettes
call StaticMenuJoypad
ld hl, wMenuCursorY
@@ -347,7 +347,7 @@
Function4a20e: ; 4a20e (12:620e)
ld a, $1
call MenuClickSound
- callba Function1719c8
+ farcall Function1719c8
call ClearBGPalettes
call DelayFrame
jr Function4a239
@@ -403,7 +403,7 @@
hlcoord 14, 1
ld de, String_4a34b
call PlaceString
- callba Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
+ farcall Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
call Function4a118
call ScrollingMenuJoypad
push af
@@ -417,7 +417,7 @@
cp $3
jr z, .quit
.asm_4a2df
- callba Function11765d
+ farcall Function11765d
call ClearBGPalettes
call Call_ExitMenu
call LoadFontsExtra
@@ -432,7 +432,7 @@
ld b, 3
ld c, 4
call TextBox
- callba Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
+ farcall Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
ld hl, DeletePassword_YesNo_MenuDataHeader
call LoadMenuDataHeader
call VerticalMenu
@@ -455,7 +455,7 @@
call ExitMenu
.quit
call Call_ExitMenu
- callba Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
+ farcall Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
xor a
ret
; 4a346 (12:6346)
@@ -649,7 +649,7 @@
ld e, a
push bc
push de
- callba MobileStudium
+ farcall MobileStudium
call ClearBGPalettes
pop de
pop bc
@@ -847,7 +847,7 @@
call ClearBGPalettes
ld b, SCGB_DIPLOMA
call GetSGBLayout
- callba Function11c1ab
+ farcall Function11c1ab
pop bc
call LoadFontsExtra
jp Function4a4c4
--- a/mobile/print_opp_message.asm
+++ b/mobile/print_opp_message.asm
@@ -20,7 +20,7 @@
ld bc, wMobileOpponentBattleMessage
decoord 1, 14
- callba PrintEZChatBattleMessage
+ farcall PrintEZChatBattleMessage
pop af
ld [rSVBK], a