diff --git a/battle/ai/items.asm b/battle/ai/items.asm index 5346bf8f2..09595077a 100644 --- a/battle/ai/items.asm +++ b/battle/ai/items.asm @@ -9,7 +9,7 @@ AI_SwitchOrTryItem: ; 38000 and a ret nz - callba CheckEnemyLockedIn + farcall CheckEnemyLockedIn ret nz ld a, [PlayerSubStatus5] @@ -44,7 +44,7 @@ DontSwitch: ; 38041 ; 38045 SwitchOften: ; 38045 - callab CheckAbleToSwitch + callfar CheckAbleToSwitch ld a, [wEnemySwitchMonParam] and $f0 jp z, DontSwitch @@ -80,7 +80,7 @@ SwitchOften: ; 38045 ; 38083 SwitchRarely: ; 38083 - callab CheckAbleToSwitch + callfar CheckAbleToSwitch ld a, [wEnemySwitchMonParam] and $f0 jp z, DontSwitch @@ -115,7 +115,7 @@ SwitchRarely: ; 38083 ; 380c1 SwitchSometimes: ; 380c1 - callab CheckAbleToSwitch + callfar CheckAbleToSwitch ld a, [wEnemySwitchMonParam] and $f0 jp z, DontSwitch @@ -358,12 +358,12 @@ AI_Items: ; 39196 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 @@ AI_Items: ; 39196 jp .DontUse .CheckQuarterHP: ; 38254 (e:4254) - callab AICheckEnemyQuarterHP + callfar AICheckEnemyQuarterHP jp c, .DontUse call Random cp -1 + 20 percent @@ -379,9 +379,9 @@ AI_Items: ; 39196 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 @@ AI_Items: ; 39196 ; 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 @@ AI_Items: ; 39196 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 @@ AI_Items: ; 39196 AIUpdateHUD: ; 38387 call UpdateEnemyMonInParty - callba UpdateEnemyHUD + farcall UpdateEnemyHUD ld a, $1 ld [hBGMapMode], a ld hl, wEnemyItemState @@ -705,7 +705,7 @@ AI_Switch: ; 3846c res SUBSTATUS_RAGE, [hl] xor a ld [hBattleTurn], a - callab PursuitSwitch + callfar PursuitSwitch push af ld a, [CurOTMon] @@ -726,12 +726,12 @@ AI_Switch: ; 3846c .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 @@ EnemyUsedXItem: push bc call PrintText_UsedItemOn pop bc - callba CheckIfStatCanBeRaised + farcall CheckIfStatCanBeRaised jp AIUpdateHUD ; 38568 diff --git a/battle/ai/move.asm b/battle/ai/move.asm index 6e5aca358..11586c0da 100755 --- a/battle/ai/move.asm +++ b/battle/ai/move.asm @@ -12,7 +12,7 @@ AIChooseMove: ; 440ce ret nz ; No use picking a move if there's no choice. - callba CheckEnemyLockedIn + farcall CheckEnemyLockedIn ret nz diff --git a/battle/ai/redundant.asm b/battle/ai/redundant.asm index e3dda8c4b..2e8f7c6df 100755 --- a/battle/ai/redundant.asm +++ b/battle/ai/redundant.asm @@ -141,7 +141,7 @@ AI_Redundant: ; 2c41a jr .NotRedundant .Attract: ; 2c4fe - callba CheckOppositeGender + farcall CheckOppositeGender jr c, .Redundant ld a, [PlayerSubStatus1] bit SUBSTATUS_IN_LOVE, a @@ -184,7 +184,7 @@ AI_Redundant: ; 2c41a .MorningSun: .Synthesis: .Moonlight: ; 2c539 - callba AICheckEnemyMaxHP + farcall AICheckEnemyMaxHP jr nc, .NotRedundant .Teleport: diff --git a/battle/ai/scoring.asm b/battle/ai/scoring.asm index 4e462656c..6391e3b29 100644 --- a/battle/ai/scoring.asm +++ b/battle/ai/scoring.asm @@ -29,7 +29,7 @@ AI_Basic: ; 38591 push hl push de push bc - callba AI_Redundant + farcall AI_Redundant pop bc pop de pop hl @@ -176,7 +176,7 @@ AI_Types: ; 38635 push de ld a, 1 ld [hBattleTurn], a - callab BattleCheckTypeMatchup + callfar BattleCheckTypeMatchup pop de pop bc pop hl @@ -429,7 +429,7 @@ AI_Smart_LeechHit: ; 387f7 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 @@ AI_Smart_LockOn: ; 3881d push hl push bc - callba BattleCheckTypeMatchup + farcall BattleCheckTypeMatchup ld a, [wd265] cp $a pop bc @@ -572,7 +572,7 @@ AI_Smart_Selfdestruct: ; 388a6 ; Unless this is the enemy's last Pokemon... push hl - callba FindAliveEnemyMons + farcall FindAliveEnemyMons pop hl jr nc, .asm_388b7 @@ -970,7 +970,7 @@ AI_Smart_ForceSwitch: ; 38a2a ; 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 @@ AI_Smart_Mimic: ; 38ba8 ld a, $1 ld [hBattleTurn], a - callab BattleCheckTypeMatchup + callfar BattleCheckTypeMatchup ld a, [wd265] cp $a @@ -1763,9 +1763,9 @@ AI_Smart_PriorityHit: ; 38d5a 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 @@ AI_Smart_Conversion2: ; 38d98 xor a ld [hBattleTurn], a - callab BattleCheckTypeMatchup + callfar BattleCheckTypeMatchup ld a, [wd265] cp $a @@ -1890,7 +1890,7 @@ AI_Smart_MeanLook: ; 38dfb ; 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 @@ AI_Smart_Curse: ; 38e5c jp nz, AIDiscourageMove push hl - callba FindAliveEnemyMons + farcall FindAliveEnemyMons pop hl jr nc, .asm_38eb0 @@ -2137,7 +2137,7 @@ AI_Smart_Foresight: ; 38f1d AI_Smart_PerishSong: ; 38f4a push hl - callab FindAliveEnemyMons + callfar FindAliveEnemyMons pop hl jr c, .no @@ -2146,7 +2146,7 @@ AI_Smart_PerishSong: ; 38f4a jr nz, .yes push hl - callab CheckPlayerMoveTypeMatchups + callfar CheckPlayerMoveTypeMatchups ld a, [wEnemyAISwitchScore] cp 10 ; 1.0 pop hl @@ -2404,7 +2404,7 @@ AI_Smart_BatonPass: ; 39062 ; 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 @@ AI_Smart_HiddenPower: ; 3909e 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 @@ AIDamageCalc: ; 393e7 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 @@ AI_Status: ; 39453 push de ld a, 1 ld [hBattleTurn], a - callab BattleCheckTypeMatchup + callfar BattleCheckTypeMatchup pop de pop bc pop hl diff --git a/battle/anim_commands.asm b/battle/anim_commands.asm index 530f30d2b..561d509d7 100644 --- a/battle/anim_commands.asm +++ b/battle/anim_commands.asm @@ -61,7 +61,7 @@ BattleAnimRunScript: ; cc11c and a jr nz, .hi_byte - callba CheckBattleScene + farcall CheckBattleScene jr c, .disabled call BattleAnimClearHud @@ -169,7 +169,7 @@ BattleAnimRestoreHuds: ; cc1bb 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 @@ BattleAnimCmd_PlayerHeadObj: ; cc57e (33:457e) ret BattleAnimCmd_CheckPokeball: ; cc5d0 (33:45d0) - callab GetPokeBallWobble + callfar GetPokeBallWobble ld a, c ld [BattleAnimVar], a ret @@ -1128,11 +1128,11 @@ BattleAnimCmd_DropSub: ; cc750 (33:4750) and a jr z, .player - callab DropEnemySub + callfar DropEnemySub jr .done .player - callab DropPlayerSub + callfar DropPlayerSub .done pop af @@ -1221,7 +1221,7 @@ BattleAnimCmd_Sound: ; cc7cd (33:47cd) call GetBattleAnimByte ld e, a ld d, 0 - callab PlayStereoSFX + callfar PlayStereoSFX ret ; cc7f8 (33:47f8) @@ -1311,7 +1311,7 @@ endr ld a, 1 ld [wStereoPanningMask], a - callab _PlayCryHeader + callfar _PlayCryHeader .done pop af diff --git a/battle/bg_effects.asm b/battle/bg_effects.asm index fdb27af13..cfd342df7 100644 --- a/battle/bg_effects.asm +++ b/battle/bg_effects.asm @@ -550,7 +550,7 @@ BattleBGEffect_HeadFollow: ; c8281 (32:4281) ret _QueueBattleAnimation: ; c82ee (32:42ee) - callab QueueBattleAnimation + callfar QueueBattleAnimation ret BattleBGEffect_27: ; c82f5 (32:42f5) @@ -2944,13 +2944,13 @@ BattleBGEffects_CheckSGB: ; c9059 (32:5059) 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 diff --git a/battle/core.asm b/battle/core.asm index 438c08f08..593caf649 100644 --- a/battle/core.asm +++ b/battle/core.asm @@ -175,13 +175,13 @@ BattleTurn: ; 3c12f 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 @@ HandleBerserkGene: ; 3c27c .go push de push bc - callab GetUserItem + callfar GetUserItem ld a, [hl] ld [wd265], a sub BERSERK_GENE @@ -405,14 +405,14 @@ HandleBerserkGene: ; 3c27c ld [hl], a ld [AttackMissed], a ld [EffectFailed], a - callba BattleCommand_AttackUp2 + farcall BattleCommand_AttackUp2 pop af pop hl ld [hl], a 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 @@ DetermineMoveOrder: ; 3c314 jp .player_first .switch - callab AI_Switch + callfar AI_Switch call SetEnemyTurn call SpikesDamage jp .enemy_first @@ -489,9 +489,9 @@ DetermineMoveOrder: ; 3c314 .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 @@ ParsePlayerAction: ; 3c434 .encored call SetPlayerTurn - callab UpdateMoveData + callfar UpdateMoveData xor a ld [wPlayerCharging], a ld a, [wPlayerMoveStruct + MOVE_EFFECT] @@ -894,7 +894,7 @@ Battle_EnemyFirst: ; 3c5fe 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 @@ Battle_PlayerFirst: ; 3c664 xor a ld [wEnemyGoesFirst], a call SetEnemyTurn - callab AI_SwitchOrTryItem + callfar AI_SwitchOrTryItem push af call PlayerTurn_EndOpponentProtectEndureDestinyBond pop bc @@ -984,14 +984,14 @@ Battle_PlayerFirst: ; 3c664 PlayerTurn_EndOpponentProtectEndureDestinyBond: ; 3c6cf call SetPlayerTurn call EndUserDestinyBond - callab DoPlayerTurn + callfar DoPlayerTurn jp EndOpponentProtectEndureDestinyBond ; 3c6de EnemyTurn_EndOpponentProtectEndureDestinyBond: ; 3c6de call SetEnemyTurn call EndUserDestinyBond - callab DoEnemyTurn + callfar DoEnemyTurn jp EndOpponentProtectEndureDestinyBond ; 3c6ed @@ -1323,7 +1323,7 @@ HandleLeftovers: ; 3c8eb call SetPlayerTurn .do_it - callab GetUserItem + callfar GetUserItem ld a, [hl] ld [wd265], a call GetItemName @@ -1373,7 +1373,7 @@ HandleMysteryberry: ; 3c93c call SetPlayerTurn .do_it - callab GetUserItem + callfar GetUserItem ld a, b cp HELD_RESTORE_PP jr nz, .quit @@ -1470,7 +1470,7 @@ HandleMysteryberry: ; 3c93c add b ld [de], a .skip_checks - callab GetUserItem + callfar GetUserItem ld a, [hl] ld [wd265], a xor a @@ -1536,13 +1536,13 @@ HandleFutureSight: ; 3ca26 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 @@ HandleEnemySwitch: ; 3cf4a 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 @@ WinTrainerBattle: ; 3cfa4 and a ld a, b call z, PlayVictoryMusic - callab Battle_GetTrainerName + callfar Battle_GetTrainerName ld hl, BattleText_EnemyWasDefeated call StdBattleTextBox @@ -2452,7 +2452,7 @@ WinTrainerBattle: ; 3cfa4 ld c, 40 call DelayFrames ld c, $4 ; win - callba Mobile_PrintOpponentBattleMessage + farcall Mobile_PrintOpponentBattleMessage ret .battle_tower @@ -2461,7 +2461,7 @@ WinTrainerBattle: ; 3cfa4 call DelayFrames call EmptyBattleTextBox ld c, $3 - callba BattleTowerText + farcall BattleTowerText call WaitPressAorB_BlinkCursor ld hl, wPayDayMoney ld a, [hli] @@ -2589,7 +2589,7 @@ AddBattleMoneyToAccount: ; 3d0be push bc ld b, h ld c, l - callba TrainerRankings_AddToBattlePayouts + farcall TrainerRankings_AddToBattlePayouts pop bc pop hl .loop @@ -2783,7 +2783,7 @@ PlayerMonFaintHappinessMod: ; 3d1aa .got_param ld a, [CurBattleMon] ld [CurPartyMon], a - callab ChangeHappiness + callfar ChangeHappiness ld a, [wBattleResult] and %11000000 add $1 @@ -2932,16 +2932,16 @@ IsMobileBattle: ; 3d2f1 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 @@ JumpToPartyMenuAndPrintText: ; 3d313 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 @@ LostBattle: ; 3d38e call EmptyBattleTextBox ld c, 2 - callba BattleTowerText + farcall BattleTowerText call WaitPressAorB_BlinkCursor call ClearTileMap call ClearBGPalettes @@ -3118,7 +3118,7 @@ LostBattle: ; 3d38e call DelayFrames ld c, $3 ; lost - callba Mobile_PrintOpponentBattleMessage + farcall Mobile_PrintOpponentBattleMessage scf ret ; 3d432 @@ -3424,7 +3424,7 @@ LookUpTheEffectivenessOfEveryMove: ; 3d5d7 ld a, BANK(Moves) call FarCopyBytes call SetEnemyTurn - callab BattleCheckTypeMatchup + callfar BattleCheckTypeMatchup pop bc pop de pop hl @@ -3460,13 +3460,13 @@ IsThePlayerPkmnTypesEffectiveAgainstOTPkmn: ; 3d618 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 @@ CheckWhetherToAskSwitch: ; 3d714 push af ld a, [CurBattleMon] ld [CurPartyMon], a - callba CheckCurPartyMonFainted + farcall CheckCurPartyMonFainted pop bc ld a, b ld [CurPartyMon], a @@ -3624,7 +3624,7 @@ CheckWhetherToAskSwitch: ; 3d714 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 @@ ClearEnemyMonBox: ; 3d7a0 ; 3d7b8 Function_BattleTextEnemySentOut: ; 3d7b8 - callab Battle_GetTrainerName + callfar Battle_GetTrainerName ld hl, BattleText_EnemySentOut call StdBattleTextBox jp WaitBGMap @@ -3707,9 +3707,9 @@ Function_SetEnemyPkmnAndSendOutAnimation: ; 3d7c7 .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 @@ TryToRunAwayFromBattle: ; 3d8b3 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 @@ BattleCheckEnemyShininess: ; 3da79 BattleCheckShininess: ; 3da7c ld b, h ld c, l - callab CheckShininess + callfar CheckShininess ret ; 3da85 @@ -4208,7 +4208,7 @@ SendOutPlayerMon: ; 3db5f 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 @@ HandleHealingItems: ; 3dcf9 ; 3dd2f HandleHPHealingItem: ; 3dd2f - callab GetOpponentItem + callfar GetOpponentItem ld a, b cp HELD_BERRY ret nz @@ -4502,11 +4502,11 @@ HandleHPHealingItem: ; 3dd2f 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 @@ ItemRecoveryAnim: ; 3ddc8 ; 3dde9 UseHeldStatusHealingItem: ; 3dde9 - callab GetOpponentItem + callfar GetOpponentItem ld hl, .Statuses .loop ld a, [hli] @@ -4600,7 +4600,7 @@ UseConfusionHealingItem: ; 3de51 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 @@ HandleStatBoostingHeldItems: ; 3de97 push bc ld a, [bc] ld b, a - callab GetItemHeldEffect + callfar GetItemHeldEffect ld hl, .StatUpItems .loop ld a, [hli] @@ -4699,7 +4699,7 @@ HandleStatBoostingHeldItems: ; 3de97 call GetItemName ld hl, BattleText_UsersStringBuffer1Activated call StdBattleTextBox - callab BattleCommand_StatUpMessage + callfar BattleCommand_StatUpMessage ret .finish @@ -4774,7 +4774,7 @@ DrawPlayerHUD: ; 3df58 lb bc, 5, 11 call ClearBox - callba DrawPlayerHUDBorder + farcall DrawPlayerHUDBorder hlcoord 18, 9 ld [hl], $73 ; vertical bar @@ -4867,7 +4867,7 @@ PrintPlayerHUD: ; 3dfbf ld a, TEMPMON ld [MonType], a - callab GetGender + callfar GetGender ld a, " " jr c, .got_gender_char ld a, "♂" @@ -4916,7 +4916,7 @@ DrawEnemyHUD: ; 3e043 lb bc, 4, 11 call ClearBox - callba DrawEnemyHUDBorder + farcall DrawEnemyHUDBorder ld a, [TempEnemyMonSpecies] ld [CurSpecies], a @@ -4945,7 +4945,7 @@ DrawEnemyHUD: ; 3e043 ld a, TEMPMON ld [MonType], a - callab GetGender + callfar GetGender ld a, " " jr c, .got_gender ld a, "♂" @@ -5080,7 +5080,7 @@ BattleMenu: ; 3e139 ld a, [BattleType] cp BATTLETYPE_CONTEST jr nz, .not_contest - callba ContestBattleMenu + farcall ContestBattleMenu jr .next .not_contest @@ -5088,7 +5088,7 @@ BattleMenu: ; 3e139 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 @@ LoadBattleMenu2: ; 3e19b 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,14 +5159,14 @@ BattleMenu_Pack: ; 3e1c7 cp BATTLETYPE_CONTEST jr z, .contest - callba BattlePack + farcall BattlePack ld a, [wPlayerAction] and a jr z, .didnt_use_item jr .got_item .tutorial - callba TutorialPack + farcall TutorialPack ld a, POKE_BALL ld [CurItem], a call DoItemEffect @@ -5204,7 +5204,7 @@ BattleMenu_Pack: ; 3e1c7 ld a, [wWildMon] and a jr nz, .run - callab CheckItemPocket + callfar CheckItemPocket ld a, [wItemAttributeParamBuffer] cp BALL jr z, .ball @@ -5259,7 +5259,7 @@ BattleMenuPKMN_Loop: call SelectBattleMon jr c, .Cancel .loop - callba FreezeMonIcons + farcall FreezeMonIcons call .GetMenu jr c, .PressedB call PlaceHollowCursor @@ -5298,11 +5298,11 @@ BattleMenuPKMN_Loop: .GetMenu: ; 3e2f5 call IsMobileBattle jr z, .mobile - callba BattleMonMenu + farcall BattleMonMenu ret .mobile - callba MobileBattleMonMenu + farcall MobileBattleMonMenu ret ; 3e308 @@ -5325,7 +5325,7 @@ Battle_StatsScreen: ; 3e308 call LowVolume xor a ; PARTYMON ld [MonType], a - callba BattleStatsScreenInit + farcall BattleStatsScreenInit call MaxVolume call DisableLCD @@ -5434,7 +5434,7 @@ PlayerSwitch: ; 3e3ad ; 3e3ff EnemyMonEntrance: ; 3e3ff - callab AI_Switch + callfar AI_Switch call SetEnemyTurn jp SpikesDamage ; 3e40b @@ -5517,7 +5517,7 @@ BattleMenu_Run: ; 3e489 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 @@ CheckAmuletCoin: ; 3e4a8 MoveSelectionScreen: ; 3e4bc call IsMobileBattle jr nz, .not_mobile - callba MobileMoveSelectionScreen + farcall MobileMoveSelectionScreen ret .not_mobile @@ -5884,7 +5884,7 @@ MoveInfoBox: ; 3e6c8 ld [CurPartyMon], a ld a, WILDMON ld [MonType], a - callab GetMaxPPOfMove + callfar GetMaxPPOfMove ld hl, wMenuCursorY ld c, [hl] @@ -5904,7 +5904,7 @@ MoveInfoBox: ; 3e6c8 hlcoord 7, 11 ld [hl], "/" - callab UpdateMoveData + callfar UpdateMoveData ld a, [wPlayerMoveStruct + MOVE_ANIM] ld b, a hlcoord 2, 10 @@ -6104,7 +6104,7 @@ ParseEnemyAction: ; 3e7c1 .skip_load call SetEnemyTurn - callab UpdateMoveData + callfar UpdateMoveData call CheckEnemyLockedIn jr nz, .raging xor a @@ -6167,7 +6167,7 @@ CheckEnemyLockedIn: ; 3e8d1 ; 3e8e4 LinkBattleSendReceiveAction: ; 3e8e4 - callba _LinkBattleSendReceiveAction + farcall _LinkBattleSendReceiveAction ret ; 3e8eb @@ -6276,7 +6276,7 @@ LoadEnemyMon: ; 3e8eb ; 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 @@ LoadEnemyMon: ; 3e8eb ; 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 @@ BattleWinSlideInEnemyTrainerFrontpic: ; 3ebd8 ld a, [OtherTrainerClass] ld [TrainerClass], a ld de, VTiles2 - callab GetTrainerPic + callfar GetTrainerPic hlcoord 19, 0 ld c, 0 @@ -7144,12 +7144,12 @@ BoostStat: ; 3ed7c ; 3ed9f _LoadBattleFontsHPBar: ; 3ed9f - callab LoadBattleFontsHPBar + callfar LoadBattleFontsHPBar ret ; 3eda6 _LoadHPBar: ; 3eda6 - callab LoadHPBar + callfar LoadHPBar ret ; 3edad @@ -7455,7 +7455,7 @@ GiveExperiencePoints: ; 3ee3b 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 @@ GiveExperiencePoints: ; 3ee3b xor a ; PARTYMON ld [MonType], a predef CopyPkmnToTempMon - callab CalcLevel + callfar CalcLevel pop bc ld hl, MON_LEVEL add hl, bc @@ -7571,16 +7571,16 @@ GiveExperiencePoints: ; 3ee3b 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 ld [hBGMapMode], a .skip_animation - callba LevelUpHappinessMod + farcall LevelUpHappinessMod ld a, [CurBattleMon] ld b, a ld a, [CurPartyMon] @@ -7781,7 +7781,7 @@ AnimateExpBar: ; 3f136 .NoOverflow: ld d, MAX_LEVEL - callab CalcExpAtLevel + callfar CalcExpAtLevel ld a, [hProduct + 1] ld b, a ld a, [hProduct + 2] @@ -7804,7 +7804,7 @@ AnimateExpBar: ; 3f136 ld [hld], a .AlreadyAtMaxExp: - callab CalcLevel + callfar CalcLevel ld a, d pop bc pop de @@ -7836,7 +7836,7 @@ AnimateExpBar: ; 3f136 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 @@ CalcExpBar: ; 3f39c 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 @@ CalcExpBar: ; 3f39c 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,18 +8369,18 @@ _DoBattle: ; 3f4d9 ; 3f4dd BattleIntro: ; 3f4dd - callba TrainerRankings_Battles ; mobile + farcall TrainerRankings_Battles ; mobile call LoadTrainerOrWildMonPic xor a ld [TempBattleMonSpecies], a 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 @@ BackUpVBGMap2: ; 3f568 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 @@ InitEnemyTrainer: ; 3f594 .ok ld de, VTiles2 - callab GetTrainerPic + callfar GetTrainerPic xor a ld [hGraphicStartTile], a dec a @@ -8495,7 +8495,7 @@ InitEnemyTrainer: ; 3f594 or [hl] jr z, .skipfaintedmon ld c, HAPPINESS_GYMBATTLE - callab ChangeHappiness + callfar ChangeHappiness .skipfaintedmon pop bc dec b @@ -8510,7 +8510,7 @@ InitEnemyTrainer: ; 3f594 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 @@ ExitBattle: ; 3f69e xor a ld [wForceEvolution], a predef EvolveAfterBattle - callba GivePokerusAndConvertBerries + farcall GivePokerusAndConvertBerries ret ; 3f6d0 @@ -8693,20 +8693,20 @@ CheckPayDay: ; 3f71d ; 3f759 ShowLinkBattleParticipantsAfterEnd: ; 3f759 - callba TrainerRankings_LinkBattles - callba BackupMobileEventIndex + farcall TrainerRankings_LinkBattles + farcall BackupMobileEventIndex ld a, [CurOTMon] ld hl, OTPartyMon1Status call GetPartyLocation 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 @@ DisplayLinkBattleResult: ; 3f77c bit 4, [hl] jr z, .proceed - callba DetermineLinkBattleResult + farcall DetermineLinkBattleResult .proceed ld a, [wBattleResult] @@ -8723,24 +8723,24 @@ DisplayLinkBattleResult: ; 3f77c 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 .store_result hlcoord 6, 8 call PlaceString - callba BackupMobileEventIndex + farcall BackupMobileEventIndex ld c, 200 call DelayFrames @@ -8977,7 +8977,7 @@ BattleEnd_HandleRoamMons: ; 3f998 ret nz .update_roam_mons - callab UpdateRoamMons + callfar UpdateRoamMons ret ; 3f9d1 @@ -9269,7 +9269,7 @@ InitBattleDisplay: ; 3fb6c 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 @@ InitBattleDisplay: ; 3fb6c call WaitBGMap xor a ld [hBGMapMode], a - callba BattleIntroSlidingPics + farcall BattleIntroSlidingPics ld a, $1 ld [hBGMapMode], a ld a, $31 @@ -9354,7 +9354,7 @@ GetTrainerBackpic: ; 3fbff jr z, .Chris ; It's a girl. - callba GetKrisBackpic + farcall GetKrisBackpic ret .Chris: @@ -9439,7 +9439,7 @@ BattleStartMessage: ; 3fc8b ld c, 20 call DelayFrames - callba Battle_GetTrainerName + farcall Battle_GetTrainerName ld hl, WantsToBattleText jr .PlaceBattleStartText @@ -9458,10 +9458,10 @@ BattleStartMessage: ; 3fc8b 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 @@ BattleStartMessage: ; 3fc8b cp BATTLETYPE_FISH jr nz, .NotFishing - callba TrainerRankings_HookedEncounters + farcall TrainerRankings_HookedEncounters ld hl, HookedPokemonAttackedText jr .PlaceBattleStartText @@ -9497,7 +9497,7 @@ BattleStartMessage: ; 3fc8b .PlaceBattleStartText: push hl - callba BattleStart_TrainerHuds + farcall BattleStart_TrainerHuds pop hl call StdBattleTextBox @@ -9505,7 +9505,7 @@ BattleStartMessage: ; 3fc8b ret nz ld c, $2 ; start - callba Mobile_PrintOpponentBattleMessage + farcall Mobile_PrintOpponentBattleMessage ret ; 3fd26 diff --git a/battle/effect_commands.asm b/battle/effect_commands.asm index 57e4c574f..d04da6b52 100644 --- a/battle/effect_commands.asm +++ b/battle/effect_commands.asm @@ -1016,7 +1016,7 @@ IgnoreSleepOnly: ; 3451f BattleCommand_UsedMoveText: ; 34541 ; usedmovetext - callba DisplayUsedMoveText + farcall DisplayUsedMoveText ret ; 34548 @@ -1385,14 +1385,14 @@ BattleCommand_Stab: ; 346d2 push hl push de push bc - callba DoWeatherModifiers + farcall DoWeatherModifiers pop bc pop de pop hl push de push bc - callba DoBadgeTypeBoosts + farcall DoBadgeTypeBoosts pop bc pop de @@ -3862,7 +3862,7 @@ BattleCommand_Counter: ; 35813 ret z ld b, a - callab GetMoveEffect + callfar GetMoveEffect ld a, b cp EFFECT_COUNTER ret z @@ -4068,7 +4068,7 @@ BattleCommand_PainSplit: ; 35926 call ResetDamage hlcoord 2, 2 predef AnimateHPBar - callba _UpdateBattleHUDs + farcall _UpdateBattleHUDs ld hl, SharedPainText jp StdBattleTextBox @@ -4518,7 +4518,7 @@ BattleCommand_SleepTalk: ; 35b33 push bc ld b, a - callab GetMoveEffect + callfar GetMoveEffect ld a, b pop bc @@ -4747,7 +4747,7 @@ PlayFXAnimID: ; 35d08 ld c, 3 call DelayFrames - callab PlayBattleAnim + callfar PlayBattleAnim ret @@ -5017,7 +5017,7 @@ BattleCommand_SleepTarget: ; 35e5c ld hl, FellAsleepText call StdBattleTextBox - callba UseHeldStatusHealingItem + farcall UseHeldStatusHealingItem jp z, OpponentCantMove ret @@ -5094,7 +5094,7 @@ BattleCommand_PoisonTarget: ; 35eee ld hl, WasPoisonedText call StdBattleTextBox - callba UseHeldStatusHealingItem + farcall UseHeldStatusHealingItem ret ; 35f2c @@ -5179,7 +5179,7 @@ BattleCommand_Poison: ; 35f2c call StdBattleTextBox .finished - callba UseHeldStatusHealingItem + farcall UseHeldStatusHealingItem ret .failed @@ -5382,7 +5382,7 @@ BattleCommand_BurnTarget: ; 3608c ld hl, WasBurnedText call StdBattleTextBox - callba UseHeldStatusHealingItem + farcall UseHeldStatusHealingItem ret ; 360dd @@ -5455,7 +5455,7 @@ BattleCommand_FreezeTarget: ; 36102 ld hl, WasFrozenText call StdBattleTextBox - callba UseHeldStatusHealingItem + farcall UseHeldStatusHealingItem ret nz call OpponentCantMove @@ -6816,7 +6816,7 @@ BattleCommand_ForceSwitch: ; 3680f ld a, d inc a ld [wEnemySwitchMonIndex], a - callab ForceEnemySwitch + callfar ForceEnemySwitch ld hl, DraggedOutText call StdBattleTextBox @@ -8081,7 +8081,7 @@ BattleCommand_LeechSeed: ; 36f9d BattleCommand_Splash: ; 36fe1 call AnimateCurrentMove - callba TrainerRankings_Splash + farcall TrainerRankings_Splash jp PrintNothingHappened ; 36fed @@ -8285,7 +8285,7 @@ BattleCommand_Conversion: ; 3707f inc de ld [de], a ld [wNamedObjectIndexBuffer], a - callba GetTypeName + farcall GetTypeName call AnimateCurrentMove ld hl, TransformedTypeText jp StdBattleTextBox @@ -8608,7 +8608,7 @@ CheckSubstituteOpp: ; 37378 BattleCommand_Selfdestruct: ; 37380 - callba TrainerRankings_Selfdestruct + farcall TrainerRankings_Selfdestruct ld a, BATTLEANIM_PLAYER_DAMAGE ld [wNumHits], a ld c, 3 @@ -8632,8 +8632,8 @@ BattleCommand_Selfdestruct: ; 37380 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 @@ BattleCommand_BatonPass: ; 379c9 ; 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 @@ BattleCommand_BatonPass: ; 379c9 call BatonPass_LinkPlayerSwitch ; Mobile link battles handle entrances differently - callba CheckMobileBattleError + farcall CheckMobileBattleError jp c, EndMoveEffect ld hl, PassedBattleMonEntrance @@ -9075,7 +9075,7 @@ BattleCommand_BatonPass: ; 379c9 call BatonPass_LinkEnemySwitch ; Mobile link battles handle entrances differently - callba CheckMobileBattleError + farcall CheckMobileBattleError jp c, EndMoveEffect ; Passed enemy PartyMon entrance @@ -9403,7 +9403,7 @@ BattleCommand_TimeBasedHealContinue: ; 37b7e call AnimateCurrentMove call BattleCommand_SwitchTurn - callab RestoreHP + callfar RestoreHP call BattleCommand_SwitchTurn call UpdateUserInParty @@ -9433,7 +9433,7 @@ BattleCommand_HiddenPower: ; 37be8 ld a, [AttackMissed] and a ret nz - callba HiddenPowerDamage + farcall HiddenPowerDamage ret ; 37bf4 @@ -9475,14 +9475,14 @@ BattleCommand_BellyDrum: ; 37c1a 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 @@ BattleCommand_MirrorCoat: ; 37c95 ret z ld b, a - callab GetMoveEffect + callfar GetMoveEffect ld a, b cp EFFECT_MIRROR_COAT ret z @@ -9914,7 +9914,7 @@ PlayUserBattleAnim: ; 37e47 push hl push de push bc - callab PlayBattleAnim + callfar PlayBattleAnim pop bc pop de pop hl @@ -9936,7 +9936,7 @@ PlayOpponentBattleAnim: ; 37e54 push bc call BattleCommand_SwitchTurn - callab PlayBattleAnim + callfar PlayBattleAnim call BattleCommand_SwitchTurn pop bc @@ -10035,21 +10035,21 @@ GetMoveByte: ; 37ebb DisappearUser: ; 37ec0 - callba _DisappearUser + farcall _DisappearUser ret ; 37ec7 AppearUserLowerSub: ; 37ec7 - callba _AppearUserLowerSub + farcall _AppearUserLowerSub ret ; 37ece AppearUserRaiseSub: ; 37ece - callba _AppearUserRaiseSub + farcall _AppearUserRaiseSub ret ; 37ed5 @@ -10060,7 +10060,7 @@ _CheckBattleScene: ; 37ed5 push hl push de push bc - callba CheckBattleScene + farcall CheckBattleScene pop bc pop de pop hl diff --git a/battle/effects/attract.asm b/battle/effects/attract.asm index f1bc590eb..0a6d7c975 100755 --- a/battle/effects/attract.asm +++ b/battle/effects/attract.asm @@ -35,7 +35,7 @@ CheckOppositeGender: ; 377f5 xor a ld [MonType], a - callba GetGender + farcall GetGender jr c, .genderless_samegender ld b, 1 @@ -58,7 +58,7 @@ CheckOppositeGender: ; 377f5 ld [TempMonDVs + 1], a ld a, 3 ld [MonType], a - callba GetGender + farcall GetGender pop bc jr c, .genderless_samegender diff --git a/battle/effects/thief.asm b/battle/effects/thief.asm index f344edef9..6d32d68d4 100644 --- a/battle/effects/thief.asm +++ b/battle/effects/thief.asm @@ -23,7 +23,7 @@ BattleCommand_Thief: ; 37492 ld [wd265], a ld d, a - callba ItemIsMail + farcall ItemIsMail ret c ld a, [EffectFailed] @@ -71,7 +71,7 @@ BattleCommand_Thief: ; 37492 ld [wd265], a ld d, a - callba ItemIsMail + farcall ItemIsMail ret c ld a, [EffectFailed] diff --git a/battle/hidden_power.asm b/battle/hidden_power.asm index 184c597d0..c75a67ab3 100644 --- a/battle/hidden_power.asm +++ b/battle/hidden_power.asm @@ -104,7 +104,7 @@ HiddenPowerDamage: ; fbced ; 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 diff --git a/battle/link_result.asm b/battle/link_result.asm index 5739bbdc0..cf6102acc 100755 --- 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 diff --git a/battle/misc.asm b/battle/misc.asm index 0fed74e38..b05dc8071 100644 --- a/battle/misc.asm +++ b/battle/misc.asm @@ -13,11 +13,11 @@ _DisappearUser: ; fbd54 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 diff --git a/battle/objects/engine.asm b/battle/objects/engine.asm index 9e6c3329a..6a4f86902 100755 --- a/battle/objects/engine.asm +++ b/battle/objects/engine.asm @@ -302,13 +302,13 @@ GetBattleAnimTileOffset: ; ccb31 (33:4b31) ret _ExecuteBGEffects: ; ccb48 - callab ExecuteBGEffects + callfar ExecuteBGEffects ret ; ccb4f _QueueBGEffect: ; ccb4f (33:4b4f) - callab QueueBGEffect + callfar QueueBGEffect ret ; ccb56 (33:4b56) diff --git a/battle/trainer_huds.asm b/battle/trainer_huds.asm index 60be946fa..9efe08414 100755 --- a/battle/trainer_huds.asm +++ b/battle/trainer_huds.asm @@ -259,7 +259,7 @@ _ShowLinkBattleParticipants: ; 2c1b2 ld a, "" ld [hli], a ld [hl], "" - callba LinkBattle_TrainerHuds ; no need to callba + farcall LinkBattle_TrainerHuds ; no need to farcall ld b, SCGB_DIPLOMA call GetSGBLayout call SetPalettes diff --git a/battle/used_move_text.asm b/battle/used_move_text.asm index 5b7fcef1a..ea2351005 100755 --- a/battle/used_move_text.asm +++ b/battle/used_move_text.asm @@ -32,7 +32,7 @@ UsedMoveText: ; 105db9 ld [wd265], a push hl - callba CheckUserIsCharging + farcall CheckUserIsCharging pop hl jr nz, .grammar diff --git a/data/items/item_descriptions.asm b/data/items/item_descriptions.asm index 40e91b2c9..e5b01e8fd 100644 --- a/data/items/item_descriptions.asm +++ b/data/items/item_descriptions.asm @@ -7,7 +7,7 @@ PrintItemDescription: ; 0x1c8955 ld [CurItem], a push de - callba GetTMHMItemMove + farcall GetTMHMItemMove pop hl ld a, [wd265] ld [CurSpecies], a diff --git a/engine/anim_hp_bar.asm b/engine/anim_hp_bar.asm index a26c40b91..78062b547 100755 --- a/engine/anim_hp_bar.asm +++ b/engine/anim_hp_bar.asm @@ -293,7 +293,7 @@ HPBarAnim_PaletteUpdate: ; d7b4 call SetHPPal ld a, [wCurHPAnimPal] ld c, a - callba ApplyHPBarPals + farcall ApplyHPBarPals ret ; d7c9 diff --git a/engine/battle_transition.asm b/engine/battle_transition.asm index f8756649b..194f7998b 100644 --- a/engine/battle_transition.asm +++ b/engine/battle_transition.asm @@ -56,7 +56,7 @@ Predef_StartBattle: ; 8c20f 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 @@ StartTrainerBattle_Flash: ; 8c3ab (23:43ab) ; 8c3e8 StartTrainerBattle_SetUpForWavyOutro: ; 8c3e8 (23:43e8) - callba Function5602 + farcall Function5602 ld a, $5 ; BANK(LYOverrides) ld [rSVBK], a @@ -355,7 +355,7 @@ StartTrainerBattle_SineWave: ; 8c408 (23:4408) 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 @@ ENDM ; 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 @@ StartTrainerBattle_DrawSineWave: ; 8c6f7 (23:46f7) ; 8c768 StartTrainerBattle_ZoomToBlack: ; 8c768 (23:4768) - callba Function5602 + farcall Function5602 ld de, .boxes .loop diff --git a/engine/billspc.asm b/engine/billspc.asm index 9595bffc6..0bdacf436 100755 --- a/engine/billspc.asm +++ b/engine/billspc.asm @@ -208,7 +208,7 @@ BillsPCDepositFuncRelease: ; e24e0 (38:64e0) 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 @@ BillsPC_Withdraw: ; e2675 (38:6675) 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 @@ PCMonInfo: ; e2ac6 (38:6ac6) ld a, $3 ld [MonType], a - callba GetGender + farcall GetGender jr c, .skip_gender ld a, "♂" jr nz, .printgender @@ -1140,7 +1140,7 @@ PCMonInfo: ; e2ac6 (38:6ac6) ret z ld d, a - callab ItemIsMail + callfar ItemIsMail jr c, .mail ld a, $5d ; item icon jr .printitem @@ -1656,7 +1656,7 @@ BillsPC_CheckMail_PreventBlackout: ; e2f18 (38:6f18) 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 @@ BillsPC_CopyMon: ; e2fd6 (38:6fd6) ld bc, PARTYMON_STRUCT_LENGTH call CopyBytes call CloseSRAM - callba CalcwBufferMonStats + farcall CalcwBufferMonStats ret .party @@ -1816,7 +1816,7 @@ BillsPC_CopyMon: ; e2fd6 (38:6fd6) ld bc, BOXMON_STRUCT_LENGTH call CopyMonToTemp call CloseSRAM - callba CalcwBufferMonStats + farcall CalcwBufferMonStats ret DepositPokemon: ; e307c (38:707c) @@ -1833,7 +1833,7 @@ DepositPokemon: ; e307c (38:707c) 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 @@ TryWithdrawPokemon: ; e30fa (38:70fa) 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 @@ MovePKMNWitoutMail_InsertMon: ; e31e7 .dw_return ; e322a pop af ld e, a - callba MovePkmnWOMail_InsertMon_SaveGame + farcall MovePkmnWOMail_InsertMon_SaveGame ret ; e3233 @@ -2056,7 +2056,7 @@ MovePKMNWitoutMail_InsertMon: ; e31e7 call .CopyFromParty ld a, $1 ld [wGameLogicPaused], a - callba SaveGameData + farcall SaveGameData xor a ld [wGameLogicPaused], a call .CopyToBox @@ -2106,7 +2106,7 @@ MovePKMNWitoutMail_InsertMon: ; e31e7 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 @@ MovePKMNWitoutMail_InsertMon: ; e31e7 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 @@ MovePKMNWitoutMail_InsertMon: ; e31e7 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 @@ MovePKMNWitoutMail_InsertMon: ; e31e7 call CopyMonToTemp xor a ld [wPokemonWithdrawDepositParameter], a - callba RemoveMonFromPartyOrBox + farcall RemoveMonFromPartyOrBox ret ; e3346 @@ -2168,7 +2168,7 @@ MovePKMNWitoutMail_InsertMon: ; e31e7 ld hl, wBillsPC_ScrollPosition add [hl] ld [CurPartyMon], a - callba InsertPokemonIntoParty + farcall InsertPokemonIntoParty ret ; e3357 @@ -2523,7 +2523,7 @@ BillsPC_ChangeBoxSubmenu: ; e36f9 (38:76f9) ld a, [MenuSelection] dec a ld c, a - callba PrintPCBox + farcall PrintPCBox call BillsPC_ClearTilemap and a ret @@ -2540,13 +2540,13 @@ BillsPC_ChangeBoxSubmenu: ; e36f9 (38:76f9) 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 diff --git a/engine/billspctop.asm b/engine/billspctop.asm index eda83c28e..c36cbe45d 100755 --- a/engine/billspctop.asm +++ b/engine/billspctop.asm @@ -111,16 +111,16 @@ BillsPC_SeeYa: ; e4cb BillsPC_MovePKMNMenu: ; e4cd call LoadStandardMenuDataHeader - callba IsAnyMonHoldingMail + farcall IsAnyMonHoldingMail jr nc, .no_mail ld hl, .Text_MonHoldingMail call PrintText 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_MovePKMNMenu: ; e4cd BillsPC_DepositMenu: ; e4fe (3:64fe) call LoadStandardMenuDataHeader - callba _DepositPKMN + farcall _DepositPKMN call ReturnToMapFromSubmenu call ClearPCItemScreen call CloseWindow @@ -205,7 +205,7 @@ CheckCurPartyMonFainted: ; e538 BillsPC_WithdrawMenu: ; e559 (3:6559) call LoadStandardMenuDataHeader - callba _WithdrawPKMN + farcall _WithdrawPKMN call ReturnToMapFromSubmenu call ClearPCItemScreen call CloseWindow @@ -231,7 +231,7 @@ UnknownText_0xe57e: ; 0xe57e db "@" BillsPC_ChangeBoxMenu: ; e583 (3:6583) - callba _ChangeBox + farcall _ChangeBox and a ret diff --git a/engine/breeding.asm b/engine/breeding.asm index b402f99f1..517908902 100755 --- a/engine/breeding.asm +++ b/engine/breeding.asm @@ -231,8 +231,8 @@ HatchEggs: ; 16f70 (5:6f70) 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 @@ HatchEggs: ; 16f70 (5:6f70) ld [MonType], a push de ld b, $0 - callba NamingScreen + farcall NamingScreen pop hl ld de, StringBuffer1 call InitName @@ -687,7 +687,7 @@ EggHatch_DoAnimFrame: ; 1727f (5:727f) push hl push de push bc - callab PlaySpriteAnimations + callfar PlaySpriteAnimations call DelayFrame pop bc pop de @@ -701,14 +701,14 @@ EggHatch_AnimationSequence: ; 1728f (5:728f) push af ld de, MUSIC_NONE call PlayMusic - callba BlankScreen + farcall BlankScreen call DisableLCD ld hl, EggHatchGFX ld de, VTiles0 tile $00 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 @@ INCBIN "gfx/evo/egg_hatch.2bpp" ; 173b3 Hatch_InitShellFragments: ; 173b3 (5:73b3) - callba ClearSpriteAnims + farcall ClearSpriteAnims ld hl, .SpriteData .loop ld a, [hli] diff --git a/engine/buy_sell_toss.asm b/engine/buy_sell_toss.asm index bd18cc83a..37bee86b1 100755 --- a/engine/buy_sell_toss.asm +++ b/engine/buy_sell_toss.asm @@ -6,7 +6,7 @@ SelectQuantityToToss: ; 24fbf ; 24fc9 SelectQuantityToBuy: ; 24fc9 - callba GetItemPrice + farcall GetItemPrice RooftopSale_SelectQuantityToBuy: ; 24fcf ld a, d ld [Buffer1], a @@ -19,7 +19,7 @@ RooftopSale_SelectQuantityToBuy: ; 24fcf ; 24fe1 SelectQuantityToSell: ; 24fe1 - callba GetItemPrice + farcall GetItemPrice ld a, d ld [Buffer1], a ld a, e diff --git a/engine/caught_data.asm b/engine/caught_data.asm index c079009ae..961782908 100644 --- a/engine/caught_data.asm +++ b/engine/caught_data.asm @@ -52,7 +52,7 @@ CheckPartyFullAfterContest: ; 4d9e5 xor a ld [MonType], a ld de, wMonOrItemNameBuffer - callab InitNickname + callfar InitNickname .Party_SkipNickname: ld a, [PartyCount] @@ -103,7 +103,7 @@ CheckPartyFullAfterContest: ; 4d9e5 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 @@ CheckPartyFullAfterContest: ; 4d9e5 ld a, BOXMON ld [MonType], a ld de, wMonOrItemNameBuffer - callab InitNickname + callfar InitNickname ld hl, wMonOrItemNameBuffer .Box_SkipNickname: diff --git a/engine/cgb_layouts.asm b/engine/cgb_layouts.asm index 18fda6170..05834d35f 100644 --- a/engine/cgb_layouts.asm +++ b/engine/cgb_layouts.asm @@ -156,7 +156,7 @@ _CGB_FinishBattleScreenLayout: ; 8e23 InitPartyMenuBGPal7: ; 8e85 - callba Function100dc0 + farcall Function100dc0 Mobile_InitPartyMenuBGPal7: ; 8e8b ld hl, Palette_b311 jr nc, .not_mobile @@ -170,7 +170,7 @@ Mobile_InitPartyMenuBGPal7: ; 8e8b ; 8e9f InitPartyMenuBGPal0: ; 8e9f - callba Function100dc0 + farcall Function100dc0 ld hl, Palette_b311 jr nc, .not_mobile ld hl, Palette_b309 diff --git a/engine/clock_reset.asm b/engine/clock_reset.asm index 7b1d84302..c81271442 100755 --- a/engine/clock_reset.asm +++ b/engine/clock_reset.asm @@ -202,13 +202,13 @@ RestartClock: ; 20021 (8:4021) 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 diff --git a/engine/color.asm b/engine/color.asm index 12f22d4c1..e360f101d 100644 --- a/engine/color.asm +++ b/engine/color.asm @@ -691,7 +691,7 @@ InitPartyMenuOBPals: GetBattlemonBackpicPalettePointer: push de - callba GetPartyMonDVs + farcall GetPartyMonDVs ld c, l ld b, h ld a, [TempBattleMonSpecies] @@ -701,7 +701,7 @@ GetBattlemonBackpicPalettePointer: GetEnemyFrontpicPalettePointer: push de - callba GetEnemyMonDVs + farcall GetEnemyMonDVs ld c, l ld b, h ld a, [TempEnemyMonSpecies] @@ -1306,7 +1306,7 @@ INCLUDE "gfx/pics/palette_pointers.asm" 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 diff --git a/engine/consume_held_item.asm b/engine/consume_held_item.asm index 52d7894cd..a6f7766fb 100644 --- a/engine/consume_held_item.asm +++ b/engine/consume_held_item.asm @@ -17,7 +17,7 @@ ConsumeHeldItem: ; 27192 push af ld a, [de] ld b, a - callba GetItemHeldEffect + farcall GetItemHeldEffect ld hl, .ConsumableEffects .loop ld a, [hli] diff --git a/engine/crystal_colors.asm b/engine/crystal_colors.asm index f8c1a6781..43841a201 100755 --- a/engine/crystal_colors.asm +++ b/engine/crystal_colors.asm @@ -5,7 +5,7 @@ GetMysteryGift_MobileAdapterLayout: ; 4930f (mobile) ld a, [SGBPredef] .not_ram push af - callba ResetBGPals + farcall ResetBGPals pop af ld l, a ld h, 0 @@ -70,8 +70,8 @@ MG_Mobile_Layout00: ; 4936e (12:536e) 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 @@ MG_Mobile_Layout01: ; 4942f call Function49496 .asm_49467 - callba ApplyAttrMap - callba ApplyPals + farcall ApplyAttrMap + farcall ApplyPals ld a, $1 ld [hCGBPalUpdate], a ret @@ -215,9 +215,9 @@ MG_Mobile_Layout02: ; 49706 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 @@ Function49742: ; 49742 ld bc, $40 ld a, $5 call FarCopyWRAM - callba ApplyPals + farcall ApplyPals ret ; 49757 @@ -312,7 +312,7 @@ LoadTradeRoomBGPals: ; 49811 ld bc, 6 palettes ld a, BANK(UnknBGPals) call FarCopyWRAM - callba ApplyPals + farcall ApplyPals ret ; 49826 diff --git a/engine/crystal_intro.asm b/engine/crystal_intro.asm index b417044eb..52b07331e 100755 --- a/engine/crystal_intro.asm +++ b/engine/crystal_intro.asm @@ -18,12 +18,12 @@ Copyright_GFPresents: ; e4579 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 @@ Copyright_GFPresents: ; e4579 bit 7, a jr nz, .finish call PlaceGameFreakPresents - callba PlaySpriteAnimations + farcall PlaySpriteAnimations call DelayFrame jr .joy_loop @@ -78,7 +78,7 @@ Copyright_GFPresents: ; e4579 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 @@ Copyright_GFPresents: ; e4579 ; e465e .StopGamefreakAnim: ; e465e - callba ClearSpriteAnims + farcall ClearSpriteAnims call ClearTileMap call ClearSprites ld c, 16 @@ -253,7 +253,7 @@ GameFreakLogoScene2: ; e470d (39:470d) 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 @@ CrystalIntro: ; e48ac bit 7, a jr nz, .done call IntroSceneJumper - callba PlaySpriteAnimations + farcall PlaySpriteAnimations call DelayFrame jp .loop @@ -499,7 +499,7 @@ IntroScene1: ; e495b (39:495b) 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 @@ IntroScene5: ; e4a7a (39:4a7a) 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 @@ IntroScene7: ; e4b3f (39:4b3f) 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 @@ IntroScene8: ; e4bd3 (39:4bd3) .finish ld de, SFX_INTRO_SUICUNE_2 call PlaySFX - callba DeinitializeAllSprites + farcall DeinitializeAllSprites call NextIntroScene ret @@ -903,7 +903,7 @@ IntroScene11: ; e4c86 (39:4c86) 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 @@ IntroScene13: ; e4d6d (39:4d6d) 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 @@ IntroScene14: ; e4dfa (39:4dfa) ret .asm_e4e2c - callba DeinitializeAllSprites + farcall DeinitializeAllSprites ret .asm_e4e33 @@ -1140,7 +1140,7 @@ IntroScene15: ; e4e40 (39:4e40) 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 @@ IntroScene17: ; e4ef5 (39:4ef5) 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 @@ IntroScene19: ; e4f7e (39:4f7e) 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 @@ IntroScene22: ; e5072 (39:5072) jr nc, .done ret .done - callba DeinitializeAllSprites + farcall DeinitializeAllSprites call NextIntroScene ret @@ -1457,7 +1457,7 @@ IntroScene26: ; e50bb (39:50bb) ld [hWX], a ld a, $90 ld [hWY], a - callba ClearSpriteAnims + farcall ClearSpriteAnims call Intro_SetCGBPalUpdate xor a ld [wIntroSceneFrameCounter], a diff --git a/engine/debug.asm b/engine/debug.asm index bcd53c021..65f2cfb36 100755 --- a/engine/debug.asm +++ b/engine/debug.asm @@ -341,12 +341,12 @@ Function81adb: ; 81adb .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 diff --git a/engine/decorations.asm b/engine/decorations.asm index 160022b93..1e9effe97 100755 --- a/engine/decorations.asm +++ b/engine/decorations.asm @@ -1368,7 +1368,7 @@ _GetDecorationSprite: ; 27085 ld c, a push de push hl - callba GetDecorationSprite + farcall GetDecorationSprite pop hl pop de ld a, c diff --git a/engine/delete_save_change_clock.asm b/engine/delete_save_change_clock.asm index 782b95425..e77874e1c 100755 --- 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 @@ ClockResetPassword: ; 4d41e ret _DeleteSaveData: ; 4d54c - callba BlankScreen + farcall BlankScreen ld b, SCGB_DIPLOMA call GetSGBLayout call LoadStandardFont @@ -276,7 +276,7 @@ _DeleteSaveData: ; 4d54c ld a, [wMenuCursorY] cp $1 ret z - callba EmptyAllSRAMBanks + farcall EmptyAllSRAMBanks ret .Text_ClearAllSaveData: ; 0x4d580 diff --git a/engine/dummy_game.asm b/engine/dummy_game.asm index 3ff1888dc..c315b8f38 100755 --- a/engine/dummy_game.asm +++ b/engine/dummy_game.asm @@ -10,7 +10,7 @@ _DummyGame: ; e1e5b (38:5e5b) 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 @@ _DummyGame: ; e1e5b (38:5e5b) bit 7, a jr nz, .quit call .ExecuteJumptable - callab PlaySpriteAnimations + callfar PlaySpriteAnimations call DelayFrame and a ret diff --git a/engine/events.asm b/engine/events.asm index b78010d1d..d8e4883ae 100644 --- a/engine/events.asm +++ b/engine/events.asm @@ -120,14 +120,14 @@ StartMap: ; 96724 ld hl, MapStatus ld bc, wMapStatusEnd - MapStatus call ByteFill - callba InitCallReceiveDelay + farcall InitCallReceiveDelay call ClearJoypad EnterMap: ; 9673e xor a ld [wXYComparePointer], a ld [wXYComparePointer + 1], a call SetUpFiveStepWildEncounterCooldown - callba RunMapSetupScript + farcall RunMapSetupScript call DisableEvents ld a, [hMapEntryMethod] @@ -159,7 +159,7 @@ UnusedWait30Frames: ; 9676d 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 @@ MapEvents: ; 96795 .events ; 967a1 call PlayerEvents call DisableEvents - callba ScriptEvents + farcall ScriptEvents ret ; 967ae @@ -227,16 +227,16 @@ HandleMapTimeAndJoypad: ; 967c1 ; 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 @@ _CheckObjectEnteringVisibleRange: ; 96812 ld hl, wPlayerStepFlags bit 6, [hl] ret z - callba CheckObjectEnteringVisibleRange + farcall CheckObjectEnteringVisibleRange ret ; 9681f @@ -300,7 +300,7 @@ PlayerEvents: ; 9681f .ok push af - callba EnableScriptMode + farcall EnableScriptMode pop af ld [ScriptRunning], a @@ -340,7 +340,7 @@ CheckTileEvent: ; 96874 call CheckWarpConnxnScriptFlag jr z, .connections_disabled - callba CheckMovingOffEdgeOfMap + farcall CheckMovingOffEdgeOfMap jr c, .map_connection call CheckWarpTile @@ -465,8 +465,8 @@ endr ld hl, ScriptFlags res 3, [hl] - callba EnableScriptMode - callba ScriptEvents + farcall EnableScriptMode + farcall ScriptEvents ld hl, ScriptFlags bit 3, [hl] @@ -495,15 +495,15 @@ CheckTimeEvents: ; 9693a 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 @@ OWPlayerInput: ; 96974 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 @@ OWPlayerInput: ; 96974 .Action: push af - callba StopPlayerForEvent + farcall StopPlayerForEvent pop af scf ret @@ -576,7 +576,7 @@ PlayTalkObject: ; 969ac ; 969b5 TryObjectEvent: ; 969b5 - callba CheckFacingObject + farcall CheckFacingObject jr c, .IsObject xor a ret @@ -804,7 +804,7 @@ CheckSignFlag: ; 96ad8 ; 96af0 PlayerMovement: ; 96af0 - callba DoPlayerMovement + farcall DoPlayerMovement ld a, c ld hl, .pointers rst JumpTable @@ -934,7 +934,7 @@ CountStep: ; 96b79 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 @@ CountStep: ; 96b79 ; 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 @@ CountStep: ; 96b79 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 @@ CountStep: ; 96b79 jr c, .skip_poison ld [hl], 0 - callba DoPoisonStep + farcall DoPoisonStep jr c, .doscript .skip_poison - callba DoBikeStep + farcall DoBikeStep .done xor a diff --git a/engine/events_2.asm b/engine/events_2.asm index e141b6638..6a2a79013 100644 --- a/engine/events_2.asm +++ b/engine/events_2.asm @@ -54,38 +54,38 @@ CheckFacingTileEvent:: ; 97c5f 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 ld a, [EngineBuffer1] call CheckWhirlpoolTile jr nz, .waterfall - callba TryWhirlpoolOW + farcall TryWhirlpoolOW jr .done .waterfall ld a, [EngineBuffer1] call CheckWaterfallTile jr nz, .headbutt - callba TryWaterfallOW + farcall TryWaterfallOW jr .done .headbutt 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 @@ RandomEncounter:: ; 97cc0 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 @@ CanUseSweetScent:: ; 97cfd jr z, .ice_check cp DUNGEON jr z, .ice_check - callba CheckGrassCollision + farcall CheckGrassCollision jr nc, .no .ice_check @@ -176,7 +176,7 @@ _TryWildEncounter_BugContest: ; 97d23 call TryWildEncounter_BugContest ret nc call ChooseWildEncounter_BugContest - callba CheckRepelEffect + farcall CheckRepelEffect ret ; 97d31 @@ -242,8 +242,8 @@ TryWildEncounter_BugContest: ; 97d64 ld b, 20 percent .ok - callba ApplyMusicEffectOnEncounterRate - callba ApplyCleanseTagEffectOnEncounterRate + farcall ApplyMusicEffectOnEncounterRate + farcall ApplyCleanseTagEffectOnEncounterRate call Random ld a, [hRandomAdd] cp b diff --git a/engine/events_3.asm b/engine/events_3.asm index f53297d61..1b4a4f233 100755 --- 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 @@ ReturnFromMapSetupScript:: ; b8000 ld [wLandmarkSignTimer], a call LoadMapNameSignGFX call InitMapNameFrame - callba HDMATransfer_OnlyTopFourRows + farcall HDMATransfer_OnlyTopFourRows ret .dont_do_map_sign @@ -113,7 +113,7 @@ PlaceMapNameSign:: ; b8098 (2e:4098) jr nz, .skip2 call InitMapNameFrame call PlaceMapNameCenterAlign - callba HDMATransfer_OnlyTopFourRows + farcall HDMATransfer_OnlyTopFourRows .skip2 ld a, $80 ld a, $70 @@ -151,7 +151,7 @@ InitMapNameFrame: ; b80d3 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 @@ CheckForHiddenItems: ; b8172 TreeMonEncounter: ; b81ea - callba TrainerRankings_TreeEncounters + farcall TrainerRankings_TreeEncounters xor a ld [TempWildMonSpecies], a diff --git a/engine/evolution_animation.asm b/engine/evolution_animation.asm index 173a31bf2..e2713fceb 100755 --- a/engine/evolution_animation.asm +++ b/engine/evolution_animation.asm @@ -36,7 +36,7 @@ EvolutionAnimation: ; 4e5e1 ld de, MUSIC_NONE call PlayMusic - callba ClearSpriteAnims + farcall ClearSpriteAnims ld de, .GFX ld hl, VTiles0 @@ -106,7 +106,7 @@ EvolutionAnimation: ; 4e5e1 ld c, $0 call .GetSGBLayout call .PlayEvolvedSFX - callba ClearSpriteAnims + farcall ClearSpriteAnims call .check_statused jr c, .no_anim @@ -143,7 +143,7 @@ EvolutionAnimation: ; 4e5e1 ld c, $0 call .GetSGBLayout call .PlayEvolvedSFX - callba ClearSpriteAnims + farcall ClearSpriteAnims call .check_statused ret c @@ -263,7 +263,7 @@ EvolutionAnimation: ; 4e5e1 call GetPartyLocation ld b, h ld c, l - callba CheckFaintedFrzSlp + farcall CheckFaintedFrzSlp ret ; 4e7a6 @@ -337,7 +337,7 @@ EvolutionAnimation: ; 4e5e1 .AnimateBallsOfLight: ; 4e80c push bc - callab PlaySpriteAnimations + callfar PlaySpriteAnimations ; a = (([hVBlankCounter] + 4) / 2) % NUM_PALETTES ld a, [hVBlankCounter] and %1110 diff --git a/engine/evolve.asm b/engine/evolve.asm index ada1e2f5f..c335229d6 100755 --- a/engine/evolve.asm +++ b/engine/evolve.asm @@ -225,7 +225,7 @@ EvolveAfterBattle_MasterLoop ld [hBGMapMode], a call ClearSprites - callba EvolutionAnimation + farcall EvolutionAnimation push af call ClearSprites @@ -247,7 +247,7 @@ EvolveAfterBattle_MasterLoop push hl ld hl, Text_EvolvedIntoPKMN call PrintTextBoxText - callba TrainerRankings_MonsEvolved + farcall TrainerRankings_MonsEvolved ld de, MUSIC_NONE call PlayMusic @@ -312,7 +312,7 @@ EvolveAfterBattle_MasterLoop ld hl, TempMonDVs predef GetUnownLetter - callab UpdateUnownDex + callfar UpdateUnownDex .skip_unown pop de diff --git a/engine/fruit_trees.asm b/engine/fruit_trees.asm index 4f9de8300..595e41824 100644 --- a/engine/fruit_trees.asm +++ b/engine/fruit_trees.asm @@ -58,7 +58,7 @@ CheckFruitTree: ; 44055 ; 4405f PickedFruitTree: ; 4405f - callba TrainerRankings_FruitPicked + farcall TrainerRankings_FruitPicked ld b, 1 jp GetFruitTreeFlag ; 4406a diff --git a/engine/get_breedmon_growth.asm b/engine/get_breedmon_growth.asm index 20c546315..b029043d6 100644 --- a/engine/get_breedmon_growth.asm +++ b/engine/get_breedmon_growth.asm @@ -3,7 +3,7 @@ GetBreedMon1LevelGrowth: ; e698 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 @@ GetBreedMon2LevelGrowth: ; e6b3 ld de, TempMon ld bc, BOXMON_STRUCT_LENGTH call CopyBytes - callab CalcLevel + callfar CalcLevel ld a, [wBreedMon2Level] ld b, a ld a, d diff --git a/engine/health.asm b/engine/health.asm index 1c926f677..0f7ba156d 100755 --- a/engine/health.asm +++ b/engine/health.asm @@ -49,7 +49,7 @@ HealPartyMon: ; c677 ld a, [hl] ld [bc], a - callba RestoreAllPP + farcall RestoreAllPP ret ComputeHPBarPixels: ; c699 diff --git a/engine/init_gender.asm b/engine/init_gender.asm index dfb3fbdd4..092a1c9ea 100755 --- a/engine/init_gender.asm +++ b/engine/init_gender.asm @@ -92,7 +92,7 @@ LoadGenderScreenPal: ; 48e47 (12:4e47) ld bc, 1 palettes ld a, $5 call FarCopyWRAM - callba ApplyPals + farcall ApplyPals ret ; 48e5c (12:4e5c) diff --git a/engine/init_map.asm b/engine/init_map.asm index 5dd6c7b8a..d73a5acf5 100644 --- a/engine/init_map.asm +++ b/engine/init_map.asm @@ -30,14 +30,14 @@ ReanchorBGMap_NoOAMUpdate:: ; 6454 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 diff --git a/engine/intro_menu.asm b/engine/intro_menu.asm index 5127a9895..c73535459 100755 --- a/engine/intro_menu.asm +++ b/engine/intro_menu.asm @@ -6,7 +6,7 @@ _MainMenu: ; 5ae8 ld a, e ld [wMapMusic], a call PlayMusic - callba MainMenu + farcall MainMenu jp StartTitleScreen ; 5b04 @@ -56,13 +56,13 @@ NewGame_ClearTileMapEtc: ; 5b44 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 @@ NewGame: ; 5b6b ; 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 @@ ENDC call InitializeNPCNames - callba InitDecorations + farcall InitDecorations - callba DeletePartyMonMail + farcall DeletePartyMonMail - callba DeleteMobileEventIndex + farcall DeleteMobileEventIndex call ResetGameTime ret @@ -316,8 +316,8 @@ InitializeNPCNames: ; 5ce9 InitializeWorld: ; 5d23 call ShrinkPlayer - callba SpawnPlayer - callba _InitializeStartDay + farcall SpawnPlayer + farcall _InitializeStartDay ret ; 5d33 @@ -349,9 +349,9 @@ LoadOrRegenerateLuckyIDNumber: ; 5d33 ; 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 @@ Continue: ; 5d65 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 @@ PostCreditsSpawn: ; 5de7 ; 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 @@ Continue_MobileAdapterMenu: ; 5df0 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 @@ Continue_CheckRTC_RestartClock: ; 5e48 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 @@ FinishContinueFunction: ; 5e5d 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 @@ Continue_DisplayGameTime: ; 5f84 OakSpeech: ; 0x5f99 - callba InitClock + farcall InitClock call RotateFourPalettesLeft call ClearTileMap @@ -735,7 +735,7 @@ OakSpeech: ; 0x5f99 xor a ld [CurPartySpecies], a - callba DrawIntroPlayerPic + farcall DrawIntroPlayerPic ld b, SCGB_TRAINER_OR_MON_FRONTPIC_PALS call GetSGBLayout @@ -782,20 +782,20 @@ OakText7: ; 0x606f 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 @@ NamePlayer: ; 0x6074 xor a ld [CurPartySpecies], a - callba DrawIntroPlayerPic + farcall DrawIntroPlayerPic ld b, SCGB_TRAINER_OR_MON_FRONTPIC_PALS call GetSGBLayout @@ -943,7 +943,7 @@ Intro_WipeInFrontpic: ; 6182 Intro_PrepTrainerPic: ; 619c ld de, VTiles2 - callba GetTrainerPic + farcall GetTrainerPic xor a ld [hGraphicStartTile], a hlcoord 6, 4 @@ -966,7 +966,7 @@ ShrinkFrame: ; 61b4 Intro_PlacePlayerSprite: ; 61cd - callba GetPlayerIcon + farcall GetPlayerIcon ld c, $c ld hl, VTiles0 call Request2bpp @@ -1012,9 +1012,9 @@ Intro_PlacePlayerSprite: ; 61cd CrystalIntroSequence: ; 620b - callab Copyright_GFPresents + callfar Copyright_GFPresents jr c, StartTitleScreen - callba CrystalIntro + farcall CrystalIntro StartTitleScreen: ; 6219 ld a, [rSVBK] @@ -1075,7 +1075,7 @@ StartTitleScreen: ; 6219 .TitleScreen: ; 6274 - callba _TitleScreen + farcall _TitleScreen ret ; 627b @@ -1084,7 +1084,7 @@ RunTitleScreen: ; 627b bit 7, a jr nz, .done_title call TitleScreenScene - callba SuicuneFrameIterator + farcall SuicuneFrameIterator call DelayFrame and a ret @@ -1162,7 +1162,7 @@ TitleScreenEntrance: ; 62bc dec b jr nz, .loop - callba AnimateTitleCrystal + farcall AnimateTitleCrystal ret .done @@ -1320,12 +1320,12 @@ TitleScreenEnd: ; 6375 ; 6389 DeleteSaveData: ; 6389 - callba _DeleteSaveData + farcall _DeleteSaveData jp Init ; 6392 ResetClock: ; 6392 - callba _ResetClock + farcall _ResetClock jp Init ; 639b @@ -1401,7 +1401,7 @@ CopyrightString: ; 63fd ; 642e GameInit:: ; 642e - callba TryLoadSaveData + farcall TryLoadSaveData call ClearWindowData call ClearBGPalettes call ClearTileMap diff --git a/engine/item_effects.asm b/engine/item_effects.asm index e881f6338..2d7aa4c69 100644 --- a/engine/item_effects.asm +++ b/engine/item_effects.asm @@ -358,7 +358,7 @@ ParkBall: ; e8a2 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 @@ ParkBall: ; e8a2 ld a, [BattleMonItem] ; ld b, a - callba GetItemHeldEffect + farcall GetItemHeldEffect ld a, b cp HELD_CATCH_CHANCE @@ -478,7 +478,7 @@ ParkBall: ; e8a2 ld [CurPartySpecies], a ld a, [EnemyMonLevel] ld [CurPartyLevel], a - callba LoadEnemyMon + farcall LoadEnemyMon pop af ld [EnemySubStatus5], a @@ -517,7 +517,7 @@ ParkBall: ; e8a2 cp BATTLETYPE_TUTORIAL jp z, .FinishTutorial - callba TrainerRankings_WildMonsCaught + farcall TrainerRankings_WildMonsCaught ld hl, Text_GotchaMonWasCaught call PrintText @@ -569,7 +569,7 @@ ParkBall: ; e8a2 predef TryAddMonToParty - callba SetCaughtData + farcall SetCaughtData ld a, [CurItem] cp FRIEND_BALL @@ -608,7 +608,7 @@ ParkBall: ; e8a2 xor a ; PARTYMON ld [MonType], a ld b, 0 - callba NamingScreen + farcall NamingScreen call RotateThreePalettesRight @@ -625,7 +625,7 @@ ParkBall: ; e8a2 predef SentPkmnIntoBox - callba SetBoxMonCaughtData + farcall SetBoxMonCaughtData ld a, BANK(sBoxCount) call GetSRAMBank @@ -661,7 +661,7 @@ ParkBall: ; e8a2 ld [MonType], a ld de, wMonOrItemNameBuffer ld b, $0 - callba NamingScreen + farcall NamingScreen ld a, BANK(sBoxMonNicknames) call GetSRAMBank @@ -696,7 +696,7 @@ ParkBall: ; e8a2 jr .return_from_capture .catch_bug_contest_mon - callba BugContest_SetCaughtContestMon + farcall BugContest_SetCaughtContestMon jr .return_from_capture .FinishTutorial: @@ -985,7 +985,7 @@ LoveBallMultiplier: 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 @@ LoveBallMultiplier: 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 @@ Text_AskNicknameNewlyCaughtMon: ; 0xedf5 ; 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 @@ SunStone: ; ee0f ld a, $1 ld [wForceEvolution], a - callba EvolvePokemon + farcall EvolvePokemon ld a, [wMonTriedToEvolve] and a @@ -1269,7 +1269,7 @@ Calcium: ; ee3d call PrintText ld c, HAPPINESS_USEDITEM - callba ChangeHappiness + farcall ChangeHappiness jp UseDisposableItem @@ -1383,7 +1383,7 @@ RareCandy: ; ef14 ld [CurPartyLevel], a push de ld d, a - callba CalcExpAtLevel + farcall CalcExpAtLevel pop de ld a, MON_EXP @@ -1421,7 +1421,7 @@ RareCandy: ; ef14 ld a, [hl] adc b ld [hl], a - callba LevelUpHappinessMod + farcall LevelUpHappinessMod ld a, PARTYMENUTEXT_LEVEL_UP call ItemActionText @@ -1449,7 +1449,7 @@ RareCandy: ; ef14 xor a ld [wForceEvolution], a - callba EvolvePokemon + farcall EvolvePokemon jp UseDisposableItem ; efad @@ -1466,7 +1466,7 @@ HealPowder: ; efad cp $0 jr nz, .asm_efc9 ld c, HAPPINESS_BITTERPOWDER - callba ChangeHappiness + farcall ChangeHappiness call LooksBitterMessage @@ -1569,7 +1569,7 @@ HealStatus: ; f030 (3:7030) res SUBSTATUS_CONFUSED, [hl] .not_full_heal push bc - callba CalcPlayerStats + farcall CalcPlayerStats pop bc ret @@ -1635,7 +1635,7 @@ RevivalHerb: ; f0a9 jr nz, .asm_f0c5 ld c, HAPPINESS_REVIVALHERB - callba ChangeHappiness + farcall ChangeHappiness call LooksBitterMessage ld a, 0 @@ -1797,7 +1797,7 @@ EnergypowderEnergyRootCommon: ; f192 cp 0 jr nz, .skip_happiness - callba ChangeHappiness + farcall ChangeHappiness call LooksBitterMessage ld a, 0 @@ -1876,15 +1876,15 @@ UseItem_SelectMon: ; f1f9 (3:71f9) 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 @@ ItemActionText: ; f24a (3:724a) push hl push de push bc - callba WritePartyMenuTilemap - callba PrintPartyMenuActionText + farcall WritePartyMenuTilemap + farcall PrintPartyMenuActionText call WaitBGMap call SetPalettes call DelayFrame @@ -2234,7 +2234,7 @@ Softboiled_MilkDrinkFunction: ; f3df (3:73df) EscapeRope: ; f44f xor a ld [wItemEffectSucceeded], a - callba EscapeRopeFunction + farcall EscapeRopeFunction ld a, [wItemEffectSucceeded] cp 1 @@ -2344,16 +2344,16 @@ XSpecial: ; f4c5 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 @@ SuperRod: ; f5ad ; f5b1 UseRod: ; f5b1 - callba FishFunction + farcall FishFunction ret ; f5b8 Itemfinder: ; f5b8 - callba ItemFinder + farcall ItemFinder ret ; f5bf @@ -2547,7 +2547,7 @@ Mysteryberry: ; f5bf ld [CurMoveNum], a ld a, $2 ld [wMoveSelectionMenuType], a - callba MoveSelectionScreen + farcall MoveSelectionScreen pop bc ld a, b @@ -2782,25 +2782,25 @@ UnknownText_0xf739: ; 0xf739 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 @@ NormalBox: ; f763 GorgeousBox: ; f767 ld c, DECOFLAG_GOLD_TROPHY_DOLL OpenBox: ; f769 - callba SetSpecificDecorationFlag + farcall SetSpecificDecorationFlag ld hl, .text call PrintText diff --git a/engine/link.asm b/engine/link.asm index 619d5bae3..390855338 100755 --- a/engine/link.asm +++ b/engine/link.asm @@ -14,14 +14,14 @@ LinkCommunications: ; 28000 call UpdateSprites call LoadStandardFont call LoadFontsBattleExtra - callba LinkComms_LoadPleaseWaitTextboxBorderGFX + farcall LinkComms_LoadPleaseWaitTextboxBorderGFX call WaitBGMap2 hlcoord 3, 8 ld b, 2 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 @@ TimeCapsule: ; 2805d ld [wd265], a push hl push de - callab ConvertMon_1to2 + callfar ConvertMon_1to2 pop de pop hl ld a, [wd265] @@ -362,19 +362,19 @@ Gen2ToGen2LinkComms: ; 28177 .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 @@ Gen2ToGen2LinkComms: ; 28177 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 @@ Gen2ToGen2LinkComms: ; 28177 ld [wDisableTextAcceleration], a pop af ld [Options], a - callba LoadPokemonData + farcall LoadPokemonData jp Function28b22 .ready_to_trade @@ -491,7 +491,7 @@ LinkTimeout: ; 283b2 push de ld d, h ld e, l - callba LinkTextbox2 + farcall LinkTextbox2 pop de pop hl bccoord 1, 14 @@ -658,7 +658,7 @@ Link_PrepPartyData_Gen1: ; 28499 ld [wd265], a push hl push de - callab ConvertMon_2to1 + callfar ConvertMon_2to1 pop de pop hl ld a, [wd265] @@ -698,7 +698,7 @@ Link_PrepPartyData_Gen1: ; 28499 push bc ld a, [hl] ld [wd265], a - callab ConvertMon_2to1 + callfar ConvertMon_2to1 pop bc pop de ld a, [wd265] @@ -882,20 +882,20 @@ Link_PrepPartyData_Gen2: ; 28595 push hl push de push hl - callba IsMailEuropean + farcall IsMailEuropean pop de ld a, c or a 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 @@ Function2868a: ; 2868a push bc push de ld [wd265], a - callab ConvertMon_1to2 + callfar ConvertMon_1to2 pop de pop bc ld a, [wd265] @@ -1195,7 +1195,7 @@ Link_FindFirstNonControlCharacter_AllowZero: ; 287d8 InitTradeMenuDisplay: ; 287e3 call ClearScreen call LoadTradeScreenBorder - callba InitTradeSpeciesList + farcall InitTradeSpeciesList xor a ld hl, wOtherPlayerLinkMode ld [hli], a @@ -1232,7 +1232,7 @@ LinkTrade_OTPartyMenu: ; 28803 ld [w2DMenuFlags2], a LinkTradeOTPartymonMenuLoop: ; 28835 - callba LinkTradeMenu + farcall LinkTradeMenu ld a, d and a jp z, LinkTradePartiesMenuMasterLoop @@ -1240,9 +1240,9 @@ LinkTradeOTPartymonMenuLoop: ; 28835 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 @@ LinkTradeOTPartymonMenuLoop: ; 28835 ; 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 @@ LinkTrade_PlayerPartyMenu: ; 2888b call WaitBGMap2 LinkTradePartymonMenuLoop: ; 288c5 - callba LinkTradeMenu + farcall LinkTradeMenu ld a, d and a jr nz, .check_joypad @@ -1366,7 +1366,7 @@ Function28926: ; 28926 hlcoord 2, 16 ld de, .String_Stats_Trade call PlaceString - callba Link_WaitBGMap + farcall Link_WaitBGMap .joy_loop ld a, " " @@ -1433,8 +1433,8 @@ Function28926: ; 28926 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 @@ Function28926: ; 28926 dec a ld [wd002], a ld [wPlayerLinkAction], a - callba Function16d6ce + farcall Function16d6ce ld a, [wOtherPlayerLinkMode] cp $f jp z, InitTradeMenuDisplay @@ -1461,9 +1461,9 @@ Function28926: ; 28926 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 @@ Function28926: ; 28926 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 @@ Function28926: ; 28926 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 @@ Function28926: ; 28926 call PlaceString ld a, $1 ld [wPlayerLinkAction], a - callba Function16d6ce + farcall Function16d6ce ld c, 100 call DelayFrames jp InitTradeMenuDisplay @@ -1575,7 +1575,7 @@ Function28ade: ; 28ade 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 @@ LinkTrade: ; 28b87 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 @@ LinkTrade: ; 28b87 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 @@ LinkTrade: ; 28b87 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 @@ LinkTrade: ; 28b87 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 @@ LinkTrade: ; 28b87 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 @@ LinkTrade: ; 28b87 ld [wd002], a xor a ld [wPokemonWithdrawDepositParameter], a - callab RemoveMonFromPartyOrBox + callfar RemoveMonFromPartyOrBox ld a, [PartyCount] dec a ld [CurPartyMon], a @@ -1918,11 +1918,11 @@ LinkTrade: ; 28b87 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 @@ LinkTrade: ; 28b87 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 @@ LinkTrade: ; 28b87 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 @@ String_TooBadTheTradeWasCanceled: ; 28ece 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 @@ Function28f09: ; 28f09 ld b, 6 ld c, 18 call Predef_LinkTextbox - callba PlaceTradePartnerNamesAndParty + farcall PlaceTradePartnerNamesAndParty ret ; 28f24 @@ -2064,7 +2064,7 @@ Special_CheckTimeCapsuleCompatibility: ; 29bfb push hl push bc ld d, [hl] - callba ItemIsMail + farcall ItemIsMail pop bc pop hl jr c, .mon_has_mail @@ -2435,7 +2435,7 @@ Link_CheckCommunicationError: ; 29e0c 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 @@ Special_TimeCapsule: ; 29eaf ld a, LINK_TIMECAPSULE ld [wLinkMode], a call DisableSpriteUpdates - callab LinkCommunications + callfar LinkCommunications call EnableSpriteUpdates xor a ld [hVBlank], a @@ -2490,7 +2490,7 @@ Special_TradeCenter: ; 29ec4 ld a, LINK_TRADECENTER ld [wLinkMode], a call DisableSpriteUpdates - callab LinkCommunications + callfar LinkCommunications call EnableSpriteUpdates xor a ld [hVBlank], a @@ -2501,7 +2501,7 @@ Special_Colosseum: ; 29ed9 ld a, LINK_COLOSSEUM ld [wLinkMode], a call DisableSpriteUpdates - callab LinkCommunications + callfar LinkCommunications call EnableSpriteUpdates xor a ld [hVBlank], a diff --git a/engine/link_trade.asm b/engine/link_trade.asm index 3983dfd1d..bb2765b50 100755 --- a/engine/link_trade.asm +++ b/engine/link_trade.asm @@ -23,8 +23,8 @@ Function16d43b: ; 16d43b 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 @@ _LinkTextbox: ; 16d61d 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 @@ LinkComms_LoadPleaseWaitTextboxBorderGFX: ; 16d69a ; 16d6a7 LoadTradeRoomBGPals_: ; 16d6a7 - callba LoadTradeRoomBGPals + farcall LoadTradeRoomBGPals ret ; 16d6ae @@ -171,7 +171,7 @@ LinkTextbox: ; 16d6ca Function16d6ce: ; 16d6ce call LoadStandardMenuDataHeader call Function16d6e1 - callba WaitLinkTransfer + farcall WaitLinkTransfer call Call_ExitMenu call WaitBGMap2 ret @@ -233,7 +233,7 @@ LinkTradeMenu: ; 16d70c call .UpdateBGMapAndOAM call .loop2 jr nc, .done - callba _2DMenuInterpretJoypad + farcall _2DMenuInterpretJoypad jr c, .done ld a, [w2DMenuFlags1] bit 7, a @@ -352,7 +352,7 @@ LinkTradeMenu: ; 16d70c ld a, [w2DMenuFlags1] bit 6, a jr z, .skip_anims - callba PlaySpriteAnimationsAndDelayFrame + farcall PlaySpriteAnimationsAndDelayFrame .skip_anims call JoyTextDelay call .GetJoypad diff --git a/engine/mail.asm b/engine/mail.asm index 840e0a925..392405b20 100755 --- a/engine/mail.asm +++ b/engine/mail.asm @@ -2,7 +2,7 @@ SendMailToPC: ; 4456e 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 @@ ReadMailMessage: ; 445f4 call AddNTimes ld d, h ld e, l - callba ReadAnyMail + farcall ReadAnyMail ret MoveMailFromPCToParty: ; 44607 @@ -127,7 +127,7 @@ GetMailboxCount: ; 44648 CheckPokeItem:: ; 44654 push bc push de - callba SelectMonFromParty + farcall SelectMonFromParty ld a, $2 jr c, .pop_return @@ -136,7 +136,7 @@ CheckPokeItem:: ; 44654 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 @@ CheckPokeItem:: ; 44654 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 @@ IsAnyMonHoldingMail: ; 44781 ld d, [hl] push hl push de - callba ItemIsMail + farcall ItemIsMail pop de pop hl ret c @@ -503,15 +503,15 @@ MailboxPC: ; 0x44806 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 diff --git a/engine/main_menu.asm b/engine/main_menu.asm index c3b30d2d0..92a16f5b6 100755 --- a/engine/main_menu.asm +++ b/engine/main_menu.asm @@ -271,7 +271,7 @@ MainMenu_PrintCurrentTimeAndDay: ; 49e09 decoord 4, 16 ld a, [hHours] ld c, a - callba PrintHour + farcall PrintHour ld [hl], ":" inc hl ld de, hMinutes @@ -341,21 +341,21 @@ Function49ed0: ; 49ed0 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 diff --git a/engine/map_objects.asm b/engine/map_objects.asm index 4b8adb75f..971435fb0 100644 --- a/engine/map_objects.asm +++ b/engine/map_objects.asm @@ -1699,7 +1699,7 @@ StepType0f: ; 4ecd 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 @@ InitTempObject: ; 55ac ret nc ld d, h ld e, l - callba CopyTempObjectToObjectStruct + farcall CopyTempObjectToObjectStruct ret ; 55b9 @@ -2306,7 +2306,7 @@ Function565c: ; 565c call Function56a3 jr c, SetFacing_Standing call Function5688 - callba Function4440 + farcall Function4440 xor a ret ; 5673 @@ -2314,7 +2314,7 @@ Function565c: ; 565c 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 @@ Function5688: ; 5688 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 @@ RefreshPlayerSprite: ; 579d ld [wPlayerTurningDirection], a ld [PlayerObjectStepFrame], a call .TryResetPlayerAction - callba CheckWarpFacingDown + farcall CheckWarpFacingDown call c, SpawnInFacingDown call .SpawnInCustomFacing ret @@ -2596,7 +2596,7 @@ StartFollow:: ; 5803 ret c ld a, c call SetFollowerIfVisible - callba QueueFollowerFirstStep + farcall QueueFollowerFirstStep ret ; 5815 @@ -2642,7 +2642,7 @@ ResetFollower: ; 5847 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 diff --git a/engine/map_setup.asm b/engine/map_setup.asm index 72fe9c07f..6360178e1 100644 --- a/engine/map_setup.asm +++ b/engine/map_setup.asm @@ -308,8 +308,8 @@ SuspendMapAnims: ; 154d3 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 @@ FadeOldMapMusic: ; 15567 ; 1556d RetainOldPalettes: ; 1556d - callba _UpdateTimePals + farcall _UpdateTimePals ret RotatePalettesRightMapAndMusic: ; 15574 diff --git a/engine/mart.asm b/engine/mart.asm index b091c9ef1..55c184737 100755 --- a/engine/mart.asm +++ b/engine/mart.asm @@ -252,7 +252,7 @@ GetMartItemPrice: ; 15be5 ; 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 @@ INCLUDE "data/items/bargain_shop.asm" BuyMenu: ; 15c62 call FadeToMenu - callba BlankScreen + farcall BlankScreen xor a ld [wMenuScrollPositionBackup], a ld a, 1 @@ -443,7 +443,7 @@ GetMartDialogGroup: ; 15ca3 BuyMenuLoop: ; 15cef - callba PlaceMoneyTopRight + farcall PlaceMoneyTopRight call UpdateSprites ld hl, MenuDataHeader_Buy call CopyMenuDataHeader @@ -519,7 +519,7 @@ StandardMartAskPurchaseQuantity: ld [wItemQuantityBuffer], a ld a, MARTTEXT_HOW_MANY call LoadBuyMenuText - callba SelectQuantityToBuy + farcall SelectQuantityToBuy call ExitMenu ret ; 15d97 @@ -579,7 +579,7 @@ RooftopSaleAskPurchaseQuantity: call .GetSalePrice ld a, 99 ld [wItemQuantityBuffer], a - callba RooftopSale_SelectQuantityToBuy + farcall RooftopSale_SelectQuantityToBuy call ExitMenu ret ; 15df9 @@ -782,9 +782,9 @@ Text_Pharmacist_ComeAgain: ; 0x15eae 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 @@ SellMenu: ; 15eb3 .TryToSellItem: ; 15ee0 - callba CheckItemMenu + farcall CheckItemMenu ld a, [wItemAttributeParamBuffer] ld hl, .dw rst JumpTable @@ -835,7 +835,7 @@ SellMenu: ; 15eb3 .try_sell ; 15efd - callba _CheckTossableItem + farcall _CheckTossableItem ld a, [wItemAttributeParamBuffer] and a jr z, .okay_to_sell @@ -847,8 +847,8 @@ SellMenu: ; 15eb3 .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 @@ SellMenu: ; 15eb3 ld hl, Text_Mart_SoldForAmount call PrintTextBoxText call PlayTransactionSound - callba PlaceMoneyBottomLeft + farcall PlaceMoneyBottomLeft call JoyWaitAorB .declined diff --git a/engine/menu.asm b/engine/menu.asm index e84d8d597..6fbed2848 100755 --- a/engine/menu.asm +++ b/engine/menu.asm @@ -16,7 +16,7 @@ _InterpretBattleMenu:: ; 24022 rst FarCall call Draw2DMenu - callba MobileTextBorder + farcall MobileTextBorder call UpdateSprites call ApplyTilemap call Get2DMenuSelection @@ -29,7 +29,7 @@ _InterpretMobileMenu:: ; 2403c rst FarCall call Draw2DMenu - callba MobileTextBorder + farcall MobileTextBorder call UpdateSprites call ApplyTilemap call Init2DMenuCursorPosition @@ -37,7 +37,7 @@ _InterpretMobileMenu:: ; 2403c set 7, [hl] .loop call DelayFrame - callba Function10032e + farcall Function10032e ld a, [wcd2b] and a jr nz, .quit @@ -322,7 +322,7 @@ Function241d5: ; 241d5 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 @@ Menu_WasButtonPressed: ; 24259 ld a, [w2DMenuFlags1] bit 6, a jr z, .skip_to_joypad - callab PlaySpriteAnimationsAndDelayFrame + callfar PlaySpriteAnimationsAndDelayFrame .skip_to_joypad call JoyTextDelay diff --git a/engine/menu_2.asm b/engine/menu_2.asm index 13568f3c5..d88b75152 100644 --- a/engine/menu_2.asm +++ b/engine/menu_2.asm @@ -11,7 +11,7 @@ PlaceMenuItemQuantity: ; 0x24ac3 push de ld a, [MenuSelection] ld [CurItem], a - callba _CheckTossableItem + farcall _CheckTossableItem ld a, [wItemAttributeParamBuffer] pop hl and a diff --git a/engine/mon_icons.asm b/engine/mon_icons.asm index 18dc4f94b..965d9f0ef 100755 --- a/engine/mon_icons.asm +++ b/engine/mon_icons.asm @@ -66,7 +66,7 @@ LoadMenuMonIcon: ; 8e83f push hl push bc ld d, a - callab ItemIsMail + callfar ItemIsMail pop bc pop hl jr c, .not_mail @@ -140,7 +140,7 @@ PartyMenu_InitAnimatedMonIcon: ; 8e8d5 (23:68d5) push hl push bc ld d, a - callab ItemIsMail + callfar ItemIsMail pop bc pop hl jr c, .mail @@ -204,7 +204,7 @@ SetPartyMonIconAnimSpeed: ; 8e936 (23:6936) ret .getspeed ; 8e94c (23:694c) - callba PlacePartymonHPBar + farcall PlacePartymonHPBar call GetHPPal ld e, d ld d, 0 diff --git a/engine/mon_menu.asm b/engine/mon_menu.asm index fbeffe3ed..dc6cd5cc8 100755 --- a/engine/mon_menu.asm +++ b/engine/mon_menu.asm @@ -39,7 +39,7 @@ MonSubmenu: ; 24d19 xor a ld [hBGMapMode], a call GetMonSubmenuItems - callba FreezeMonIcons + farcall FreezeMonIcons ld hl, .MenuDataHeader call LoadMenuDataHeader call .GetTopCoord @@ -202,7 +202,7 @@ GetMonSubmenuItems: ; 24dd4 ld a, MON_ITEM call GetPartyParamLocation ld d, [hl] - callba ItemIsMail + farcall ItemIsMail pop hl ld a, MONMENU_MAIL jr c, .ok diff --git a/engine/mon_stats.asm b/engine/mon_stats.asm index ec468be16..a3039eefd 100644 --- a/engine/mon_stats.asm +++ b/engine/mon_stats.asm @@ -276,7 +276,7 @@ ListMovePP: ; 50c50 push af ld [hl], b push hl - callab GetMaxPPOfMove + callfar GetMaxPPOfMove pop hl pop af ld [hl], a diff --git a/engine/move_mon.asm b/engine/move_mon.asm index 2a5baac50..2225a80ab 100755 --- a/engine/move_mon.asm +++ b/engine/move_mon.asm @@ -136,7 +136,7 @@ endr 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 @@ endr and $f jr z, .generateDVs push hl - callba GetTrainerDVs + farcall GetTrainerDVs pop hl jr .initializetrainermonstats @@ -312,7 +312,7 @@ endr 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 @@ AddTempmonToParty: ; da96 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 @@ SentGetPkmnIntoFromBox: ; db3f add $2 ld [MonType], a predef CopyPkmnToTempMon - callab CalcLevel + callfar CalcLevel ld a, d ld [CurPartyLevel], a pop hl @@ -708,7 +708,7 @@ RestorePPofDepositedPokemon: ; dcb6 push bc push hl push de - callba GetMaxPPOfMove + farcall GetMaxPPOfMove pop de pop hl ld a, [wd265] @@ -844,10 +844,10 @@ Functiondd64: ; dd64 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 @@ SentPkmnIntoBox: ; de6e 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 @@ SentPkmnIntoBox: ; de6e jr nz, .not_unown ld hl, sBoxMon1DVs predef GetUnownLetter - callab UpdateUnownDex + callfar UpdateUnownDex .not_unown ld hl, sBoxMon1Moves @@ -1089,8 +1089,8 @@ ShiftBoxMon: ; df47 GiveEgg:: ; df8c ld a, [CurPartySpecies] push af - callab GetPreEvolution - callab GetPreEvolution + callfar GetPreEvolution + callfar GetPreEvolution ld a, [CurPartySpecies] dec a @@ -1433,7 +1433,7 @@ CalcPkmnStatC: ; e17b ld a, [hld] ld e, a ld d, [hl] - callba GetSquareRoot + farcall GetSquareRoot pop de .no_stat_exp @@ -1625,7 +1625,7 @@ GivePoke:: ; e277 .failed ld a, [CurPartySpecies] ld [TempEnemyMonSpecies], a - callab LoadEnemyMon + callfar LoadEnemyMon call SentPkmnIntoBox jp nc, .FailedToGiveMon ld a, BOXMON @@ -1706,7 +1706,7 @@ GivePoke:: ; e277 ld [hli], a ld [hl], 01001 % $100 pop bc - callba SetGiftPartyMonCaughtData + farcall SetGiftPartyMonCaughtData jr .skip_nickname .send_to_box @@ -1730,7 +1730,7 @@ GivePoke:: ; e277 call Random ld [hl], a call CloseSRAM - callba SetGiftBoxMonCaughtData + farcall SetGiftBoxMonCaughtData jr .skip_nickname .wildmon @@ -1741,13 +1741,13 @@ GivePoke:: ; e277 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 @@ InitNickname: ; e3de pop de push de ld b, $0 - callba NamingScreen + farcall NamingScreen pop hl ld de, StringBuffer1 call InitName diff --git a/engine/move_mon_wo_mail.asm b/engine/move_mon_wo_mail.asm index d3b4e78a5..c96823d28 100755 --- a/engine/move_mon_wo_mail.asm +++ b/engine/move_mon_wo_mail.asm @@ -34,7 +34,7 @@ InsertPokemonIntoBox: ; 51322 call CopyBytes ld a, [CurPartyMon] ld b, a - callba RestorePPofDepositedPokemon + farcall RestorePPofDepositedPokemon jp CloseSRAM InsertPokemonIntoParty: ; 5138b diff --git a/engine/mystery_gift.asm b/engine/mystery_gift.asm index 8204ab332..a8bad8935 100755 --- a/engine/mystery_gift.asm +++ b/engine/mystery_gift.asm @@ -7,7 +7,7 @@ DoMysteryGift: ; 1048ba (41:48ba) ld de, .String_PressAToLink_BToCancel call PlaceString call WaitBGMap - callba PrepMysteryGiftDataToSend + farcall PrepMysteryGiftDataToSend call MysteryGift_ClearTrainerData ld a, $2 ld [wca01], a @@ -62,21 +62,21 @@ DoMysteryGift: ; 1048ba (41:48ba) 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 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 @@ DoMysteryGift: ; 1048ba (41:48ba) 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 @@ DoMysteryGift: ; 1048ba (41:48ba) Function104a95: ; 104a95 (41:4a95) di - callba ClearChannels + farcall ClearChannels call Function104d5e .loop2 @@ -421,7 +421,7 @@ Function104bd0: ; 104bd0 (41:4bd0) 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 @@ Function104bd0: ; 104bd0 (41:4bd0) Function104c2d: ; 104c2d (41:4c2d) di - callba ClearChannels + farcall ClearChannels call Function104d5e .asm_104c37 call Function104d96 @@ -1148,7 +1148,7 @@ MysteryGift_CopyReceivedDecosToPC: ; 105091 (41:5091) pop bc jr z, .skip push bc - callab SetSpecificDecorationFlag + callfar SetSpecificDecorationFlag pop bc .skip inc c @@ -1447,7 +1447,7 @@ Function105688: ; 105688 (41:5688) 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 @@ Function1057d7: ; 1057d7 (41:57d7) call EnableLCD call WaitBGMap ld b, $2 - callba GetMysteryGift_MobileAdapterLayout + farcall GetMysteryGift_MobileAdapterLayout jp SetPalettes .Load6Row: ; 1058c6 (41:58c6) diff --git a/engine/namingscreen.asm b/engine/namingscreen.asm index 0bc613709..484bbe753 100755 --- a/engine/namingscreen.asm +++ b/engine/namingscreen.asm @@ -103,7 +103,7 @@ NamingScreen: ; 116c1 inc de hlcoord 5, 4 call PlaceString - callba GetGender + farcall GetGender jr c, .genderless ld a, "♂" jr nz, .place_gender @@ -124,7 +124,7 @@ NamingScreen: ; 116c1 ; 1178d .Player: ; 1178d (4:578d) - callba GetPlayerIcon + farcall GetPlayerIcon call .LoadSprite hlcoord 5, 2 ld de, .PlayerNameString @@ -352,14 +352,14 @@ NamingScreenJoypadLoop: ; 11915 bit 7, a jr nz, .quit call .RunJumptable - callba PlaySpriteAnimationsAndDelayFrame + farcall PlaySpriteAnimationsAndDelayFrame call .UpdateStringEntry call DelayFrame and a ret .quit - callab ClearSpriteAnims + callfar ClearSpriteAnims call ClearSprites xor a ld [hSCX], a @@ -900,7 +900,7 @@ NamingScreen_GetLastCharacter: ; 11c11 (4:5c11) LoadNamingScreenGFX: ; 11c51 call ClearSprites - callab ClearSpriteAnims + callfar ClearSpriteAnims call LoadStandardFont call LoadFontsExtra @@ -1096,14 +1096,14 @@ INCBIN "gfx/icon/mail2.2bpp" bit 7, a jr nz, .exit_mail call .DoJumptable - callba PlaySpriteAnimationsAndDelayFrame + farcall PlaySpriteAnimationsAndDelayFrame call .Update call DelayFrame and a ret .exit_mail - callab ClearSpriteAnims + callfar ClearSpriteAnims call ClearSprites xor a ld [hSCX], a diff --git a/engine/new_pokedex_entry.asm b/engine/new_pokedex_entry.asm index 012052530..acf9fca7b 100644 --- a/engine/new_pokedex_entry.asm +++ b/engine/new_pokedex_entry.asm @@ -15,11 +15,11 @@ NewPokedexEntry: ; fb877 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 @@ NewPokedexEntry: ; fb877 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] diff --git a/engine/npctrade.asm b/engine/npctrade.asm index fab504ab3..1455dce62 100755 --- a/engine/npctrade.asm +++ b/engine/npctrade.asm @@ -24,7 +24,7 @@ NPCTrade:: ; fcba8 ; Select givemon from party ld b, PARTYMENUACTION_GIVE_MON - callba SelectTradeOrDayCareMon + farcall SelectTradeOrDayCareMon ld a, TRADE_CANCEL jr c, .done @@ -88,12 +88,12 @@ CheckTradeGender: ; fcc23 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 @@ DoNPCTrade: ; fcc63 call Trade_GetAttributeOfCurrentPartymon ld b, h ld c, l - callba GetCaughtGender + farcall GetCaughtGender ld a, c ld [wPlayerTrademonCaughtData], a @@ -195,7 +195,7 @@ DoNPCTrade: ; fcc63 xor a ld [MonType], a ld [wPokemonWithdrawDepositParameter], a - callab RemoveMonFromPartyOrBox + callfar RemoveMonFromPartyOrBox predef TryAddMonToParty ld e, TRADE_DIALOG @@ -206,7 +206,7 @@ DoNPCTrade: ; fcc63 jr c, .incomplete ld b, SET_FLAG .incomplete - callba SetGiftPartyMonCaughtData + farcall SetGiftPartyMonCaughtData ld e, TRADE_NICK call GetTradeAttribute @@ -275,7 +275,7 @@ DoNPCTrade: ; fcc63 ld a, [PartyCount] dec a ld [CurPartyMon], a - callba ComputeNPCTrademonStats + farcall ComputeNPCTrademonStats pop af ld [CurPartyMon], a pop hl diff --git a/engine/odd_eggs.asm b/engine/odd_eggs.asm index 93d753dfb..5d67358f0 100644 --- a/engine/odd_eggs.asm +++ b/engine/odd_eggs.asm @@ -86,7 +86,7 @@ GiveOddEgg: ; 1fb4b6 ld [wMobileMonNicknamePointerBuffer], a ld a, wOddEggName / $100 ld [wMobileMonNicknamePointerBuffer + 1], a - callba AddMobileMonToParty + farcall AddMobileMonToParty ret ; 1fb546 diff --git a/engine/overworld.asm b/engine/overworld.asm index a085d1d5a..523021c32 100755 --- a/engine/overworld.asm +++ b/engine/overworld.asm @@ -178,14 +178,14 @@ MapCallbackSprites_LoadUsedSpritesGFX: ; 14209 ret nz ld c, EMOTE_SHADOW - callba LoadEmote + farcall LoadEmote call GetMapPermission call CheckOutdoorMap ld c, EMOTE_GRASS_RUSTLE jr z, .outdoor ld c, EMOTE_BOULDER_DUST .outdoor - callba LoadEmote + farcall LoadEmote ret ; 14236 @@ -265,7 +265,7 @@ GetMonSprite: ; 14259 and a jr z, .NoBreedmon - callba LoadOverworldMonIcon + farcall LoadOverworldMonIcon ld l, 1 ld h, 0 diff --git a/engine/pack.asm b/engine/pack.asm index 858548771..2b0d04aba 100644 --- a/engine/pack.asm +++ b/engine/pack.asm @@ -118,12 +118,12 @@ Pack: ; 10000 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 @@ Pack: ; 10000 ; 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,29 +240,29 @@ Pack: ; 10000 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 jr .unusable .selectable - callba CheckItemMenu + farcall CheckItemMenu ld a, [wItemAttributeParamBuffer] and a jr nz, .selectable_usable jr .selectable_unusable .tossable - callba CheckSelectableItem + farcall CheckSelectableItem ld a, [wItemAttributeParamBuffer] and a jr nz, .tossable_selectable @@ -455,7 +455,7 @@ Jumptable_GiveTossQuit: ; 1030b ; 10311 UseItem: ; 10311 - callba CheckItemMenu + farcall CheckItemMenu ld a, [wItemAttributeParamBuffer] ld hl, .dw rst JumpTable @@ -512,7 +512,7 @@ UseItem: ; 10311 TossMenu: ; 10364 ld hl, Text_ThrowAwayHowMany call Pack_PrintTextNoScroll - callba SelectQuantityToToss + farcall SelectQuantityToToss push af call ExitMenu pop af @@ -566,7 +566,7 @@ ResetPocketCursorPositions: ; 1039d ; 103c2 RegisterItem: ; 103c2 - callba CheckSelectableItem + farcall CheckSelectableItem ld a, [wItemAttributeParamBuffer] and a jr nz, .cant_register @@ -606,16 +606,16 @@ GiveItem: ; 103fd 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 @@ BattlePack: ; 10493 ret .TMHMPocketMenu: ; 10581 (4:4581) - callba TMHMPocket + farcall TMHMPocket ld b, $5 ld c, $1 call Pack_InterpretJoypad @@ -824,7 +824,7 @@ BattlePack: ; 10493 ret ItemSubmenu: ; 105d3 (4:45d3) - callba CheckItemContext + farcall CheckItemContext ld a, [wItemAttributeParamBuffer] TMHMSubmenu: ; 105dc (4:45dc) and a @@ -890,7 +890,7 @@ TMHMSubmenu: ; 105dc (4:45dc) ; 10629 .Use: ; 10629 - callba CheckItemContext + farcall CheckItemContext ld a, [wItemAttributeParamBuffer] ld hl, .ItemFunctionJumptable rst JumpTable @@ -1043,7 +1043,7 @@ DepositSellPack: ; 106be ld a, 3 call InitPocket call WaitBGMap_DrawPackGFX - callba TMHMPocket + farcall TMHMPocket ld a, [CurItem] ld [CurItem], a ret @@ -1130,7 +1130,7 @@ TutorialPack: ; 107bb ld a, [InputType] or a jr z, .loop - callba _DudeAutoInput_RightA + farcall _DudeAutoInput_RightA .loop call .RunJumptable call DepositSellTutorial_InterpretJoypad @@ -1207,7 +1207,7 @@ TutorialPack: ; 107bb ld a, 3 call InitPocket call WaitBGMap_DrawPackGFX - callba TMHMPocket + farcall TMHMPocket ld a, [CurItem] ld [CurItem], a ret @@ -1310,7 +1310,7 @@ DrawPackGFX: ; 1089d ret .female - callba DrawKrisPackGFX + farcall DrawKrisPackGFX ret ; 108cc @@ -1377,7 +1377,7 @@ Pack_InterpretJoypad: ; 108d4 (4:48d4) ret .select - callba SwitchItemsInBag + farcall SwitchItemsInBag ld hl, Text_MoveItemWhere call Pack_PrintTextNoScroll scf @@ -1394,7 +1394,7 @@ Pack_InterpretJoypad: ; 108d4 (4:48d4) ret .place_insert - callba SwitchItemsInBag + farcall SwitchItemsInBag ld de, SFX_SWITCH_POKEMON call WaitPlaySFX ld de, SFX_SWITCH_POKEMON diff --git a/engine/party_menu.asm b/engine/party_menu.asm index 94b0bb0a2..e89fdab19 100644 --- a/engine/party_menu.asm +++ b/engine/party_menu.asm @@ -40,8 +40,8 @@ InitPartyMenuLayout: ; 5003f LoadPartyMenuGFX: ; 5004f call LoadFontsBattleExtra - callab InitPartyMenuPalettes ; engine/color.asm - callab ClearSpriteAnims2 + callfar InitPartyMenuPalettes ; engine/color.asm + callfar ClearSpriteAnims2 ret ; 5005f @@ -662,7 +662,7 @@ InitPartyMenuGFX: ; 503e0 pop bc dec c jr nz, .loop - callab PlaySpriteAnimations + callfar PlaySpriteAnimations ret ; 50405 diff --git a/engine/phone/phone.asm b/engine/phone/phone.asm index 1a26a6f5b..e49d73c1a 100644 --- a/engine/phone/phone.asm +++ b/engine/phone/phone.asm @@ -154,7 +154,7 @@ CheckPhoneCall:: ; 90074 (24:4074) ret .timecheck ; 900a6 (24:40a6) - callba CheckReceiveCallTimer + farcall CheckReceiveCallTimer ret CheckPhoneContactTimeOfDay: ; 900ad (24:40ad) @@ -163,7 +163,7 @@ CheckPhoneContactTimeOfDay: ; 900ad (24:40ad) push de push af - callba CheckTime + farcall CheckTime pop af and MORN | DAY | NITE and c @@ -201,7 +201,7 @@ ChooseRandomCaller: ; 900bf (24:40bf) ret GetAvailableCallers: ; 900de (24:40de) - callba CheckTime + farcall CheckTime ld a, c ld [EngineBuffer1], a ld hl, EngineBuffer3 @@ -471,7 +471,7 @@ UnknownScript_0x90261: ; 0x90261 RingTwice_StartCall: ; 9026f call .Ring call .Ring - callba TrainerRankings_PhoneCalls + farcall TrainerRankings_PhoneCalls ret ; 9027c @@ -500,7 +500,7 @@ PhoneCall:: ; 9029a ld [PhoneCaller + 1], a call Phone_FirstOfTwoRings call Phone_FirstOfTwoRings - callba TrainerRankings_PhoneCalls + farcall TrainerRankings_PhoneCalls ret ; 902b3 @@ -599,7 +599,7 @@ Phone_StartRinging: ; 9033f call PlaySFX call Phone_CallerTextbox call UpdateSprites - callba PhoneRing_LoadEDTile + farcall PhoneRing_LoadEDTile ret ; 90355 @@ -609,7 +609,7 @@ HangUp_Wait20Frames: ; 90355 Phone_Wait20Frames ld c, 20 call DelayFrames - callba PhoneRing_LoadEDTile + farcall PhoneRing_LoadEDTile ret ; 90363 @@ -725,7 +725,7 @@ NonTrainerCallerNames: ; 903d6 Phone_GetTrainerName: ; 90423 (24:4423) push hl push bc - callba GetTrainerName + farcall GetTrainerName pop bc pop hl ret @@ -733,7 +733,7 @@ Phone_GetTrainerName: ; 90423 (24:4423) Phone_GetTrainerClassName: ; 9042e (24:442e) push hl push bc - callba GetTrainerClassName + farcall GetTrainerClassName pop bc pop hl ret @@ -754,7 +754,7 @@ GetCallerLocation: ; 90439 push bc call GetWorldMapLocation ld e, a - callba GetLandmarkName + farcall GetLandmarkName pop bc pop de ret diff --git a/engine/play_slow_cry.asm b/engine/play_slow_cry.asm index 322fd21cc..3cc347a55 100644 --- a/engine/play_slow_cry.asm +++ b/engine/play_slow_cry.asm @@ -23,7 +23,7 @@ PlaySlowCry: ; fb841 ld [CryLength], a ld a, h ld [CryLength + 1], a - callba _PlayCryHeader + farcall _PlayCryHeader call WaitSFX .done diff --git a/engine/player_movement.asm b/engine/player_movement.asm index 34ca81fe9..db0c07801 100755 --- a/engine/player_movement.asm +++ b/engine/player_movement.asm @@ -653,7 +653,7 @@ DoPlayerMovement:: ; 80000 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 diff --git a/engine/player_step.asm b/engine/player_step.asm index 83158c1b7..bdd6d9907 100755 --- a/engine/player_step.asm +++ b/engine/player_step.asm @@ -77,7 +77,7 @@ HandlePlayerStep: ; d4e5 (3:54e5) ret .mobile ; d509 (3:5509) - callba TrainerRankings_StepCount + farcall TrainerRankings_StepCount ret .fail2 ; d510 (3:5510) diff --git a/engine/pokecenter_pc.asm b/engine/pokecenter_pc.asm index 8203ffa19..7045dc1c8 100755 --- a/engine/pokecenter_pc.asm +++ b/engine/pokecenter_pc.asm @@ -105,7 +105,7 @@ BillsPC: ; 15668 call PC_PlayChoosePCSound ld hl, PokecenterPCText_AccessedBillsPC call PC_DisplayText - callba _BillsPC + farcall _BillsPC and a ret ; 15679 (5:5679) @@ -124,7 +124,7 @@ OaksPC: ; 15689 call PC_PlayChoosePCSound ld hl, PokecenterPCText_AccessedOaksPC call PC_DisplayText - callba ProfOaksPC + farcall ProfOaksPC and a ret ; 1569a @@ -132,7 +132,7 @@ OaksPC: ; 15689 HallOfFamePC: ; 1569a call PC_PlayChoosePCSound call FadeToMenu - callba _HallOfFamePC + farcall _HallOfFamePC call CloseSubmenu and a ret @@ -308,7 +308,7 @@ UnknownText_0x157cc: ; 0x157cc KrisWithdrawItemMenu: ; 0x157d1 call LoadStandardMenuDataHeader - callba ClearPCItemScreen + farcall ClearPCItemScreen .loop call PCItemsJoypad jr c, .quit @@ -322,7 +322,7 @@ KrisWithdrawItemMenu: ; 0x157d1 .Submenu: ; check if the item has a quantity - callba _CheckTossableItem + farcall _CheckTossableItem ld a, [wItemAttributeParamBuffer] and a jr z, .askquantity @@ -335,7 +335,7 @@ KrisWithdrawItemMenu: ; 0x157d1 .askquantity ld hl, .HowManyText call MenuTextBox - callba SelectQuantityToToss + farcall SelectQuantityToToss call ExitMenu call ExitMenu jr c, .done @@ -384,12 +384,12 @@ KrisWithdrawItemMenu: ; 0x157d1 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 @@ KrisTossItemMenu: ; 0x1585f ; 0x1587d KrisDecorationMenu: ; 0x1587d - callba _KrisDecorationMenu + farcall _KrisDecorationMenu ld a, c and a ret z @@ -418,14 +418,14 @@ KrisDepositItemMenu: ; 0x1588b 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 @@ KrisDepositItemMenu: ; 0x1588b ret .CheckItemsInBag: - callba HasNoItems + farcall HasNoItems ret nc ld hl, .NoItemsInBag call MenuTextBoxBackup @@ -453,7 +453,7 @@ KrisDepositItemMenu: ; 0x1588b push af ld a, $0 ld [wSpriteUpdatesEnabled], a - callba CheckItemMenu + farcall CheckItemMenu ld a, [wItemAttributeParamBuffer] ld hl, .dw rst JumpTable @@ -486,7 +486,7 @@ KrisDepositItemMenu: ; 0x1588b ret .DepositItem_: - callba _CheckTossableItem + farcall _CheckTossableItem ld a, [wItemAttributeParamBuffer] and a jr z, .AskQuantity @@ -497,7 +497,7 @@ KrisDepositItemMenu: ; 0x1588b .AskQuantity: ld hl, .HowManyText call MenuTextBox - callba SelectQuantityToToss + farcall SelectQuantityToToss push af call ExitMenu call ExitMenu @@ -545,7 +545,7 @@ KrisDepositItemMenu: ; 0x1588b db "@" KrisMailBoxMenu: ; 0x1597d - callba _KrisMailBoxMenu + farcall _KrisMailBoxMenu xor a ret ; 0x15985 @@ -605,12 +605,12 @@ PCItemsJoypad: ; 0x15985 .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 diff --git a/engine/pokedex.asm b/engine/pokedex.asm index a7a7a4860..eef9c707a 100644 --- a/engine/pokedex.asm +++ b/engine/pokedex.asm @@ -98,7 +98,7 @@ InitPokedex: ; 40063 call Pokedex_OrderMonsByMode call Pokedex_InitCursorPosition call Pokedex_GetLandmark - callba DrawDexEntryScreenRightEdge + farcall DrawDexEntryScreenRightEdge call Pokedex_ResetBGMapMode ret @@ -220,7 +220,7 @@ Pokedex_InitMainScreen: ; 4013c (10:413c) 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 @@ Pokedex_InitMainScreen: ; 4013c (10:413c) 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 @@ Pokedex_InitDexEntryScreen: ; 40217 (10:4217) 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 @@ Pokedex_Page: ; 40292 ld [wPokedexStatus], a call Pokedex_GetSelectedMon ld [wLastDexEntry], a - callba DisplayDexEntry + farcall DisplayDexEntry call WaitBGMap ret @@ -403,7 +403,7 @@ Pokedex_ReinitDexEntryScreen: ; 402aa (10:42aa) 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 @@ DexEntryScreen_MenuActionJumptable: ; 402f2 push af ld a, [wJumptableIndex] push af - callba PrintDexEntry + farcall PrintDexEntry pop af ld [wJumptableIndex], a pop af @@ -502,7 +502,7 @@ DexEntryScreen_MenuActionJumptable: ; 402f2 Pokedex_RedisplayDexEntry: ; 4038d call Pokedex_DrawDexEntryScreenBG call Pokedex_GetSelectedMon - callba DisplayDexEntry + farcall DisplayDexEntry call Pokedex_DrawFootprint ret @@ -622,7 +622,7 @@ Pokedex_InitSearchScreen: ; 40443 (10:4443) 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 @@ Pokedex_UpdateSearchScreen: ; 40471 (10:4471) .MenuAction_BeginSearch: ; 404b7 call Pokedex_SearchForMons - callba AnimateDexSearchSlowpoke + farcall AnimateDexSearchSlowpoke ld a, [wDexSearchResultCount] and a jr nz, .show_search_results @@ -722,7 +722,7 @@ Pokedex_InitSearchResultsScreen: ; 4050a (10:450a) 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 @@ Pokedex_InitSearchResultsScreen: ; 4050a (10:450a) 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 @@ Pokedex_InitUnownMode: ; 405bd (10:45bd) 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 @@ Pokedex_UpdateUnownMode: ; 405df (10:45df) call DelayFrame call Pokedex_CheckSGB jr nz, .decompress - callba LoadSGBPokedexGFX2 + farcall LoadSGBPokedexGFX2 jr .done .decompress @@ -873,7 +873,7 @@ Pokedex_UnownModeHandleDPadInput: ; 40610 (10:4610) 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 @@ Pokedex_LoadSelectedMonTiles: ; 4143b .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 @@ Pokedex_LoadGFX: ; 414b7 call Pokedex_InvertTiles call Pokedex_CheckSGB jr nz, .LoadPokedexLZ - callba LoadSGBPokedexGFX + farcall LoadSGBPokedexGFX jr .LoadPokedexSlowpokeLZ .LoadPokedexLZ: @@ -2564,7 +2564,7 @@ Pokedex_LoadUnownFrontpicTiles: ; 41a58 (10:5a58) _NewPokedexEntry: ; 41a7f xor a ld [hBGMapMode], a - callba DrawDexEntryScreenRightEdge + farcall DrawDexEntryScreenRightEdge call Pokedex_ResetBGMapMode call DisableLCD call LoadStandardFont @@ -2581,7 +2581,7 @@ _NewPokedexEntry: ; 41a7f ld bc, 19 ld a, " " call ByteFill - callba DisplayDexEntry + farcall DisplayDexEntry call EnableLCD call WaitBGMap call GetBaseData diff --git a/engine/pokegear.asm b/engine/pokegear.asm index bf2c2b40e..d38f8c6a8 100755 --- a/engine/pokegear.asm +++ b/engine/pokegear.asm @@ -20,7 +20,7 @@ PokeGear: ; 90b8d (24:4b8d) bit 7, a jr nz, .done call PokegearJumptable - callba PlaySpriteAnimations + farcall PlaySpriteAnimations call DelayFrame jr .loop @@ -55,7 +55,7 @@ PokeGear: ; 90b8d (24:4b8d) ld a, $7 ld [hWX], a call Pokegear_LoadGFX - callba ClearSpriteAnims + farcall ClearSpriteAnims call InitPokegearModeIndicatorArrow ld a, 8 call SkipMusic @@ -106,7 +106,7 @@ Pokegear_LoadGFX: ; 90c4e call GetWorldMapLocation cp FAST_SHIP jr z, .ssaqua - callba GetPlayerIcon + farcall GetPlayerIcon push de ld h, d ld l, e @@ -239,7 +239,7 @@ InitPokegearTilemap: ; 90da8 (24:4da8) .return_from_jumptable call Pokegear_FinishTilemap - callba TownMapPals + farcall TownMapPals ld a, [wcf65] and a jr nz, .kanto_0 @@ -319,7 +319,7 @@ InitPokegearTilemap: ; 90da8 (24:4da8) .kanto ld e, 1 .ok - callba PokegearMap + farcall PokegearMap ld a, $7 ld bc, $12 hlcoord 1, 2 @@ -513,7 +513,7 @@ Pokegear_UpdateClock: ; 90f86 (24:4f86) 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 @@ PokegearMap_InitPlayerIcon: ; 9106a pop af ld e, a push bc - callba GetLandmarkCoords + farcall GetLandmarkCoords pop bc ld hl, SPRITEANIMSTRUCT_XCOORD add hl, bc @@ -709,9 +709,9 @@ PokegearMap_UpdateLandmarkName: ; 910b4 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_UpdateLandmarkName: ; 910b4 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 @@ PokegearPhone_MakePhoneCall: ; 911eb (24:51eb) ret .no_service - callba Phone_NoSignal + farcall Phone_NoSignal ld hl, .OutOfServiceArea call PrintText ld a, $8 @@ -958,7 +958,7 @@ PokegearPhone_FinishPhoneCall: ; 91256 (24:5256) 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 @@ PokegearPhoneContactSubmenu: ; 91342 (24:5342) 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 @@ _TownMap: ; 9191c call ClearSprites call DisableLCD call Pokegear_LoadGFX - callba ClearSpriteAnims + farcall ClearSpriteAnims ld a, 8 call SkipMusic ld a, $e3 @@ -1919,7 +1919,7 @@ _TownMap: ; 9191c jr nz, .pressed_down .loop2 push de - callba PlaySpriteAnimations + farcall PlaySpriteAnimations pop de call DelayFrame jr .loop @@ -1973,7 +1973,7 @@ _TownMap: ; 9191c .kanto2 ld e, $1 .okay_tilemap - callba PokegearMap + farcall PokegearMap ld a, $7 ld bc, 6 hlcoord 1, 0 @@ -1994,7 +1994,7 @@ _TownMap: ; 9191c ld [hl], $17 ld a, [wTownMapCursorLandmark] call PokegearMap_UpdateLandmarkName - callba TownMapPals + farcall TownMapPals ret ; 91a53 @@ -2116,7 +2116,7 @@ _FlyMap: ; 91af3 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 @@ _FlyMap: ; 91af3 jr nz, .pressedA call FlyMapScroll call GetMapCursorCoordinates - callba PlaySpriteAnimations + farcall PlaySpriteAnimations call DelayFrame jr .loop @@ -2276,7 +2276,7 @@ TownMapBubble: ; 91bb5 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 @@ GetMapCursorCoordinates: ; 91c17 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 @@ _Area: ; 91d11 .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 @@ _Area: ; 91d11 push de ld e, a push hl - callba GetLandmarkCoords + farcall GetLandmarkCoords pop hl ; load into OAM ld a, d @@ -2637,7 +2637,7 @@ _Area: ; 91d11 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 @@ _Area: ; 91d11 ld a, [wTownMapPlayerIconLandmark] cp FAST_SHIP jr z, .FastShip - callba GetPlayerIcon + farcall GetPlayerIcon ret .FastShip: @@ -2851,7 +2851,7 @@ TownMapMon: ; 91f7b 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 @@ TownMapMon: ; 91f7b 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 @@ TownMapPlayerIcon: ; 91fa6 pop af ld e, a push bc - callba GetLandmarkCoords + farcall GetLandmarkCoords pop bc ld hl, SPRITEANIMSTRUCT_XCOORD add hl, bc @@ -2945,7 +2945,7 @@ INCBIN "gfx/pokegear/flymap_label_border.1bpp" 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 @@ INCBIN "gfx/pokegear/flymap_label_border.1bpp" jr nz, .pressedA call .HandleDPad call GetMapCursorCoordinates - callba PlaySpriteAnimations + farcall PlaySpriteAnimations call DelayFrame jr .loop diff --git a/engine/print_party.asm b/engine/print_party.asm index 9bf98767b..69bda8d52 100755 --- a/engine/print_party.asm +++ b/engine/print_party.asm @@ -31,7 +31,7 @@ PrintPage1: ; 1dc1b0 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 @@ PrintPage2: ; 1dc213 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 @@ PrintPartyMonPage1: ; 1dc381 xor a ld [MonType], a - callba CopyPkmnToTempMon + farcall CopyPkmnToTempMon hlcoord 0, 7 ld b, 9 ld c, 18 @@ -241,7 +241,7 @@ PrintPartyMonPage2: ; 1dc47b call LoadFontsBattleExtra xor a ld [MonType], a - callba CopyPkmnToTempMon + farcall CopyPkmnToTempMon hlcoord 0, 0 ld b, 15 ld c, 18 @@ -316,7 +316,7 @@ Function1dc51a: ; 1dc51a ; 1dc52c Function1dc52c: ; 1dc52c - callba GetGender + farcall GetGender ld a, " " jr c, .got_gender ld a, "♂" @@ -327,7 +327,7 @@ Function1dc52c: ; 1dc52c hlcoord 17, 2 ld [hl], a ld bc, TempMonDVs - callba CheckShininess + farcall CheckShininess ret nc hlcoord 18, 2 ld [hl], "" diff --git a/engine/printer.asm b/engine/printer.asm index 777ea9269..b72f99375 100755 --- a/engine/printer.asm +++ b/engine/printer.asm @@ -68,7 +68,7 @@ PrintDexEntry: ; 8442c call Printer_StartTransmission ld a, $10 ld [wcbfa], a - callba PrintPage1 + farcall PrintPage1 call ClearTileMap ld a, %11100100 call DmgToCgbBGPals @@ -94,7 +94,7 @@ PrintDexEntry: ; 8442c 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 @@ PrintUnownStamp: ; 84560 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 @@ PrintPartymon: ; 8461a xor a ld [hBGMapMode], a - callba PrintPartyMonPage1 + farcall PrintPartyMonPage1 ld a, $10 ; to be loaded to wcbfa call Printer_PrepareTileMapForPrint @@ -362,7 +362,7 @@ PrintPartymon: ; 8461a xor a ld [hBGMapMode], a - callba PrintPartyMonPage2 + farcall PrintPartyMonPage2 ld a, $3 ; to be loaded to wcbfa call Printer_PrepareTileMapForPrint @@ -391,7 +391,7 @@ _PrintDiploma: ; 84688 ld a, [wPrinterQueueLength] push af - callba PlaceDiplomaOnScreen + farcall PlaceDiplomaOnScreen xor a ld [hPrinter], a @@ -425,7 +425,7 @@ _PrintDiploma: ; 84688 xor a ld [hBGMapMode], a - callba PrintDiplomaPage2 + farcall PrintDiplomaPage2 ld a, $3 ; to be loaded to wcbfa call Printer_PrepareTileMapForPrint @@ -861,7 +861,7 @@ Printer_GetMonGender: ; 8498a (21:498a) ld [CurPartyMon], a ld a, TEMPMON ld [MonType], a - callba GetGender + farcall GetGender ld a, " " jr c, .got_gender ld a, "♂" diff --git a/engine/radio.asm b/engine/radio.asm index 58e953e55..b5c1e075f 100644 --- a/engine/radio.asm +++ b/engine/radio.asm @@ -278,7 +278,7 @@ endr 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 @@ OaksPkmnTalk9: db "@" OaksPkmnTalk10: - callba RadioMusicRestartPokemonChannel + farcall RadioMusicRestartPokemonChannel ld hl, OPT_RestartText call PrintText call WaitBGMap @@ -653,7 +653,7 @@ OaksPkmnTalk14: 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 @@ StartPokemonMusicChannel: jr z, .SunTueThurSun ld de, MUSIC_POKEMON_LULLABY .SunTueThurSun: - callab RadioMusicRestartDE + callfar RadioMusicRestartDE ret BenIntroText1: @@ -978,9 +978,9 @@ BenFernText3B: 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 @@ PeoplePlaces4: ; People 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 @@ PeoplePlaces6: ; Places 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 @@ BuenasPassword19: 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 @@ StartRadioStation: ld e, [hl] inc hl ld d, [hl] - callab RadioMusicRestartDE + callfar RadioMusicRestartDE ret RadioChannelSongs: diff --git a/engine/rtc.asm b/engine/rtc.asm index f69dc1f6d..e2699a637 100755 --- a/engine/rtc.asm +++ b/engine/rtc.asm @@ -143,8 +143,8 @@ Function140ae: ; 140ae jr c, .dont_update .time_overflow - callba ClearDailyTimers - callba Function170923 + farcall ClearDailyTimers + farcall Function170923 ; mobile ld a, $5 call GetSRAMBank diff --git a/engine/save.asm b/engine/save.asm index 65339e0bb..6ee92bcee 100644 --- 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 @@ SaveMenu: ; 14a1a .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 @@ MovePkmnWOMail_InsertMon_SaveGame: ; 14ad5 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 @@ MovePkmnWOMail_InsertMon_SaveGame: ; 14ad5 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 @@ SavedTheGame: ; 14be6 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 @@ SaveGameData_: ; 14c10 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 @@ TryLoadSaveFile: ; 14ea5 (5:4ea5) 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 @@ TryLoadSaveFile: ; 14ea5 (5:4ea5) call LoadBackupPlayerData call LoadBackupPokemonData call LoadBox - callba RestorePartyMonMail - callba RestoreMobileEventIndex - callba RestoreMysteryGift + farcall RestorePartyMonMail + farcall RestoreMobileEventIndex + farcall RestoreMysteryGift call ValidateSave call SaveOptions call SavePlayerData diff --git a/engine/scripting.asm b/engine/scripting.asm index ed6221d6e..c5b0fd982 100644 --- a/engine/scripting.asm +++ b/engine/scripting.asm @@ -35,7 +35,7 @@ WaitScript: dec [hl] ret nz - callba Function58b9 + farcall Function58b9 ld a, SCRIPT_READ ld [ScriptMode], a @@ -49,7 +49,7 @@ WaitScriptMovement: bit 7, [hl] ret nz - callba Function58b9 + farcall Function58b9 ld a, SCRIPT_READ ld [ScriptMode], a @@ -277,7 +277,7 @@ Script_special: ld e, a call GetScriptByte ld d, a - callba Special + farcall Special ret Script_ptcallasm: @@ -475,13 +475,13 @@ Script_pokepic: 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 @@ Script_battletowertext: call SetUpTextBox call GetScriptByte ld c, a - callba BattleTowerText + farcall BattleTowerText ret Script_verbosegiveitem: @@ -615,7 +615,7 @@ Script_pocketisfull: Script_specialsound: ; script command 0x88 - callba CheckItemPocket + farcall CheckItemPocket ld a, [wItemAttributeParamBuffer] cp TM_HM ld de, SFX_GET_TM @@ -628,7 +628,7 @@ Script_specialsound: GetPocketName: - callba CheckItemPocket + farcall CheckItemPocket ld a, [wItemAttributeParamBuffer] dec a ld hl, .Pockets @@ -689,7 +689,7 @@ Script_pokemart: ld d, a ld a, [ScriptBank] ld b, a - callba OpenMartDialog + farcall OpenMartDialog ret Script_elevator: @@ -705,7 +705,7 @@ Script_elevator: 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 @@ Script_trade: call GetScriptByte ld e, a - callba NPCTrade + farcall NPCTrade ret Script_phonecall: @@ -732,13 +732,13 @@ Script_phonecall: 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 @@ Script_askforphonenumber: jr c, .refused call GetScriptByte ld c, a - callba AddPhoneNumber + farcall AddPhoneNumber jr c, .phonefull xor a jr .done @@ -771,7 +771,7 @@ Script_describedecoration: call GetScriptByte ld b, a - callba DescribeDecoration + farcall DescribeDecoration ld h, d ld l, e jp ScriptJump @@ -800,7 +800,7 @@ Script_swarm: ld d, a call GetScriptByte ld e, a - callba StoreSwarmMapIndices + farcall StoreSwarmMapIndices ret Script_trainertext: @@ -897,7 +897,7 @@ Script_encountermusic: ld a, [OtherTrainerClass] ld e, a - callba PlayTrainerEncounterMusic + farcall PlayTrainerEncounterMusic ret Script_playmapmusic: @@ -959,7 +959,7 @@ Script_waitsfx: Script_warpsound: ; script command 0x87 - callba GetWarpSFX + farcall GetWarpSFX call PlaySFX ret @@ -1010,7 +1010,7 @@ Script_applymovement: ApplyMovement: push bc ld a, c - callba SetFlagsForMovement_1 + farcall SetFlagsForMovement_1 pop bc push bc @@ -1032,7 +1032,7 @@ ApplyMovement: ret SetFlagsForMovement_2: - callba _SetFlagsForMovement_2 + farcall _SetFlagsForMovement_2 ret Script_applymovement2: @@ -1054,7 +1054,7 @@ Script_faceplayer: ld d, $0 ld a, [hLastTalked] ld e, a - callba GetRelativeFacing + farcall GetRelativeFacing ld a, d add a add a @@ -1085,7 +1085,7 @@ Script_faceperson: .ok2 ld d, a push de - callba GetRelativeFacing + farcall GetRelativeFacing pop bc ret c ld a, d @@ -1204,7 +1204,7 @@ Script_disappear: ld a, [hMapObjectIndexBuffer] ld b, 1 ; set call ApplyEventActionAppearDisappear - callba _UpdateSprites + farcall _UpdateSprites ret ApplyEventActionAppearDisappear: @@ -1239,13 +1239,13 @@ Script_follow: 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 @@ Script_moveperson: call GetScriptByte add 4 ld e, a - callba CopyDECoordsToMapObject + farcall CopyDECoordsToMapObject ret Script_writepersonxy: @@ -1279,7 +1279,7 @@ Script_writepersonxy: ld a, [hLastTalked] .ok ld b, a - callba WritePersonXY + farcall WritePersonXY ret Script_follownotexact: @@ -1294,7 +1294,7 @@ Script_follownotexact: call GetScriptByte call GetScriptPerson ld c, a - callba FollowNotExact + farcall FollowNotExact ret Script_loademote: @@ -1308,7 +1308,7 @@ Script_loademote: ld a, [ScriptVar] .not_var_emote ld c, a - callba LoadEmote + farcall LoadEmote ret Script_showemote: @@ -1451,7 +1451,7 @@ Script_catchtutorial: call GetScriptByte ld [BattleType], a call BufferScreen - callba CatchTutorial + farcall CatchTutorial jp Script_reloadmap Script_reloadmapafterbattle: @@ -1471,7 +1471,7 @@ Script_reloadmapafterbattle: .notblackedout bit 0, d jr z, .was_wild - callba MomTriesToBuySomething + farcall MomTriesToBuySomething jr .done .was_wild @@ -1480,7 +1480,7 @@ Script_reloadmapafterbattle: jr z, .done ld b, BANK(Script_SpecialBillCall) ld de, Script_SpecialBillCall - callba LoadScriptBDE + farcall LoadScriptBDE .done jp Script_reloadmap @@ -1969,7 +1969,7 @@ Script_writecode: GetVarAction: ld c, a - callba _GetVarAction + farcall _GetVarAction ret Script_checkver: @@ -2040,7 +2040,7 @@ Script_mapnametotext: ConvertLandmarkToText: ld e, a - callba GetLandmarkName + farcall GetLandmarkName ld de, StringBuffer1 jp ConvertMemToText @@ -2064,7 +2064,7 @@ Script_trainertotext: ld c, a call GetScriptByte ld b, a - callba GetTrainerName + farcall GetTrainerName jr ConvertMemToText Script_name: @@ -2176,7 +2176,7 @@ Script_givepokeitem: ld a, [ScriptBank] call FarCopyBytes pop bc - callba GivePokeItem + farcall GivePokeItem ret Script_checkpokeitem: @@ -2190,7 +2190,7 @@ Script_checkpokeitem: ld d, a ld a, [ScriptBank] ld b, a - callba CheckPokeItem + farcall CheckPokeItem ret Script_giveitem: @@ -2263,7 +2263,7 @@ Script_givemoney: call GetMoneyAccount call LoadMoneyAmountToMem - callba GiveMoney + farcall GiveMoney ret Script_takemoney: @@ -2274,7 +2274,7 @@ Script_takemoney: call GetMoneyAccount call LoadMoneyAmountToMem - callba TakeMoney + farcall TakeMoney ret Script_checkmoney: @@ -2285,7 +2285,7 @@ Script_checkmoney: call GetMoneyAccount call LoadMoneyAmountToMem - callba CompareMoney + farcall CompareMoney CompareMoneyAction: jr c, .two @@ -2329,7 +2329,7 @@ Script_givecoins: ; coins (CoinByteParam) call LoadCoinAmountToMem - callba GiveCoins + farcall GiveCoins ret Script_takecoins: @@ -2338,7 +2338,7 @@ Script_takecoins: ; coins (CoinByteParam) call LoadCoinAmountToMem - callba TakeCoins + farcall TakeCoins ret Script_checkcoins: @@ -2347,7 +2347,7 @@ Script_checkcoins: ; coins (CoinByteParam) call LoadCoinAmountToMem - callba CheckCoins + farcall CheckCoins jr CompareMoneyAction LoadCoinAmountToMem: @@ -2365,7 +2365,7 @@ Script_checktime: xor a ld [ScriptVar], a - callba CheckTime + farcall CheckTime call GetScriptByte and c ret z @@ -2398,7 +2398,7 @@ Script_addcellnum: ld [ScriptVar], a call GetScriptByte ld c, a - callba AddPhoneNumber + farcall AddPhoneNumber ret nc ld a, TRUE ld [ScriptVar], a @@ -2413,7 +2413,7 @@ Script_delcellnum: ld [ScriptVar], a call GetScriptByte ld c, a - callba DelCellNum + farcall DelCellNum ret nc ld a, TRUE ld [ScriptVar], a @@ -2429,7 +2429,7 @@ Script_checkcellnum: ld [ScriptVar], a call GetScriptByte ld c, a - callba CheckCellNum + farcall CheckCellNum ret nc ld a, TRUE ld [ScriptVar], a @@ -2487,7 +2487,7 @@ Script_givepoke: call GetScriptByte call GetScriptByte .ok - callba GivePoke + farcall GivePoke ld a, b ld [ScriptVar], a ret @@ -2506,7 +2506,7 @@ Script_giveegg: ld [CurPartySpecies], a call GetScriptByte ld [CurPartyLevel], a - callba GiveEgg + farcall GiveEgg ret nc ld a, 2 ld [ScriptVar], a @@ -2603,7 +2603,7 @@ Script_checkflag: ret _EngineFlagAction: - callba EngineFlagAction + farcall EngineFlagAction ret Script_wildoff: @@ -2735,7 +2735,7 @@ Script_writecmdqueue: 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 @@ Script_delcmdqueue: 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 @@ Script_reloadmappart:: ld [hBGMapMode], a call OverworldTextModeSwitch call GetMovementPermissions - callba ReloadMapPart + farcall ReloadMapPart call UpdateSprites ret @@ -2803,11 +2803,11 @@ Script_warpcheck: call WarpCheck ret nc - callba EnableEvents + farcall EnableEvents ret Script_enableevents: ; unreferenced - callba EnableEvents + farcall EnableEvents ret Script_newloadmap: @@ -2993,9 +2993,9 @@ Script_halloffame: 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_halloffame: Script_credits: ; script command 0xa2 - callba RedCredits + farcall RedCredits ReturnFromCredits: call Script_end_all ld a, $3 @@ -3031,7 +3031,7 @@ Script_wait: Script_check_save: ; script command 0xa9 - callba CheckSave + farcall CheckSave ld a, c ld [ScriptVar], a ret diff --git a/engine/select_menu.asm b/engine/select_menu.asm index 5d3b5ff0a..e92c3ee50 100755 --- a/engine/select_menu.asm +++ b/engine/select_menu.asm @@ -120,7 +120,7 @@ CheckRegisteredItem: ; 13345 UseRegisteredItem: ; 133c3 - callba CheckItemMenu + farcall CheckItemMenu ld a, [wItemAttributeParamBuffer] ld hl, .SwitchTo rst JumpTable diff --git a/engine/slot_machine.asm b/engine/slot_machine.asm index e23b760cd..383573c03 100755 --- a/engine/slot_machine.asm +++ b/engine/slot_machine.asm @@ -20,7 +20,7 @@ _SlotMachine: 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 @@ _SlotMachine: 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 @@ SlotsLoop: ; 927af (24:67af) call Slots_SpinReels xor a ld [wCurrSpriteOAMAddr], a - callab DoNextFrameForFirst16Sprites + callfar DoNextFrameForFirst16Sprites call .PrintCoinsAndPayout call .DummyFunc call DelayFrame @@ -1812,7 +1812,7 @@ SlotGetPayout: ; 93124 (24:7124) ld a, [hl] ld [wPayout], a ld d, a - callba TrainerRankings_AddToSlotsPayouts + farcall TrainerRankings_AddToSlotsPayouts ret .PayoutTable: @@ -1836,7 +1836,7 @@ SlotPayoutText: ; 93158 (24:7158) jr nz, .MatchedSomething ld hl, .Text_Darn call PrintText - callba TrainerRankings_EndSlotsWinStreak + farcall TrainerRankings_EndSlotsWinStreak ret .MatchedSomething: @@ -1860,7 +1860,7 @@ SlotPayoutText: ; 93158 (24:7158) .return ld hl, .Text_PrintPayout call PrintText - callba TrainerRankings_AddToSlotsWinStreak + farcall TrainerRankings_AddToSlotsWinStreak ret ; 93195 (24:7195) @@ -2001,7 +2001,7 @@ SlotMachine_AnimateGolem: ; 9321d (24:721d) 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 diff --git a/engine/specials.asm b/engine/specials.asm index e4f4533c6..95f7cdf03 100644 --- a/engine/specials.asm +++ b/engine/specials.asm @@ -200,7 +200,7 @@ SpecialNone: ; c224 Special_SetPlayerPalette: ; c225 ld a, [ScriptVar] ld d, a - callba SetPlayerPalette + farcall SetPlayerPalette ret ; c230 @@ -215,7 +215,7 @@ Special_GameCornerPrizeMonCheckDex: ; c230 call FadeToMenu ld a, [ScriptVar] ld [wd265], a - callba NewPokedexEntry + farcall NewPokedexEntry call ExitAllMenus ret ; c252 @@ -230,28 +230,28 @@ SpecialSeenMon: ; c252 Special_FindGreaterThanThatLevel: ; c25a ld a, [ScriptVar] ld b, a - callba _FindGreaterThanThatLevel + farcall _FindGreaterThanThatLevel jr z, FoundNone jr FoundOne Special_FindAtLeastThatHappy: ; c268 ld a, [ScriptVar] ld b, a - callba _FindAtLeastThatHappy + farcall _FindAtLeastThatHappy jr z, FoundNone jr FoundOne Special_FindThatSpecies: ; c276 ld a, [ScriptVar] ld b, a - callba _FindThatSpecies + farcall _FindThatSpecies jr z, FoundNone jr FoundOne Special_FindThatSpeciesYourTrainerID: ; c284 ld a, [ScriptVar] ld b, a - callba _FindThatSpeciesYourTrainerID + farcall _FindThatSpeciesYourTrainerID jr z, FoundNone jr FoundOne @@ -269,7 +269,7 @@ FoundNone: ; c298 SpecialNameRival: ; 0xc29d ld b, $2 ; rival ld de, RivalName - callba _NamingScreen + farcall _NamingScreen ; default to "SILVER" ld hl, RivalName ld de, DefaultRivalName @@ -281,27 +281,27 @@ DefaultRivalName: ; 0xc2b2 db "SILVER@" SpecialNameRater: ; c2b9 - callba NameRater + farcall NameRater ret ; c2c0 Special_TownMap: ; c2c0 call FadeToMenu - callba _TownMap + farcall _TownMap call ExitAllMenus ret ; c2cd Special_UnownPrinter: ; c2cd call FadeToMenu - callba UnownPrinter + farcall UnownPrinter call ExitAllMenus ret ; c2da Special_DisplayLinkRecord: ; c2da call FadeToMenu - callba DisplayLinkRecord + farcall DisplayLinkRecord call ExitAllMenus ret ; c2e7 @@ -309,7 +309,7 @@ Special_DisplayLinkRecord: ; c2da Special_KrissHousePC: ; c2e7 xor a ld [ScriptVar], a - callba _KrissHousePC + farcall _KrissHousePC ld a, c ld [ScriptVar], a ret @@ -365,7 +365,7 @@ Special_GetMysteryGiftItem: ; c309 ; 0xc34a BugContestJudging: ; c34a - callba _BugContestJudging + farcall _BugContestJudging ld a, b ld [ScriptVar], a ret @@ -374,13 +374,13 @@ BugContestJudging: ; c34a 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 @@ ScriptReturnCarry: ; c3e2 ; c3ef Special_CheckUnusedTwoDayTimer: ; c3ef - callba CheckUnusedTwoDayTimer + farcall CheckUnusedTwoDayTimer ld a, [wUnusedTwoDayTimer] ld [ScriptVar], a ret @@ -520,20 +520,20 @@ StoreSwarmMapIndices:: ; c403 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,14 +628,14 @@ Special_FadeOutMusic: ; c48f Diploma: ; c49f call FadeToMenu - callba _Diploma + farcall _Diploma call ExitAllMenus ret ; c4ac PrintDiploma: ; c4ac call FadeToMenu - callba _PrintDiploma + farcall _PrintDiploma call ExitAllMenus ret ; c4b9 diff --git a/engine/sprite_anims.asm b/engine/sprite_anims.asm index 32c91b07f..1b3fb9a0d 100755 --- a/engine/sprite_anims.asm +++ b/engine/sprite_anims.asm @@ -218,15 +218,15 @@ DoAnimFrame: ; 8d24b 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 @@ DoAnimFrame: ; 8d24b 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 @@ DoAnimFrame: ; 8d24b 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 @@ DoAnimFrame: ; 8d24b ret .TrademonInTube ; 8d543 (23:5543) - callab TradeAnim_AnimateTrademonInTube + callfar TradeAnim_AnimateTrademonInTube ret .RevealNewMon: ; 8d54a (23:554a) @@ -607,7 +607,7 @@ DoAnimFrame: ; 8d24b ret .RadioTuningKnob: ; 8d578 (23:5578) - callab AnimateTuningKnob + callfar AnimateTuningKnob ret .CutLeaves ; 8d57f (23:557f) @@ -750,11 +750,11 @@ DoAnimFrame: ; 8d24b 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 @@ DoAnimFrame: ; 8d24b 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) diff --git a/engine/start_battle.asm b/engine/start_battle.asm index 51f46b3f2..d23fe1f15 100644 --- a/engine/start_battle.asm +++ b/engine/start_battle.asm @@ -5,7 +5,7 @@ ShowLinkBattleParticipants: ; 2ee18 and a ret z - callba _ShowLinkBattleParticipants + farcall _ShowLinkBattleParticipants ld c, 150 call DelayFrames call ClearTileMap @@ -34,7 +34,7 @@ FindFirstAliveMonAndStartBattle: ; 2ee2f 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 @@ PlayBattleMusic: ; 2ee6c and a jr nz, .trainermusic - callba RegionCheck + farcall RegionCheck ld a, e and a jr nz, .kantowild @@ -101,11 +101,11 @@ PlayBattleMusic: ; 2ee6c 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 @@ PlayBattleMusic: ; 2ee6c and a jr nz, .johtotrainer - callba RegionCheck + farcall RegionCheck ld a, e and a jr nz, .kantotrainer @@ -186,7 +186,7 @@ ClearBattleRAM: ; 2ef18 xor a call ByteFill - callab ResetEnemyStatLevels + callfar ResetEnemyStatLevels call ClearWindowData diff --git a/engine/start_menu.asm b/engine/start_menu.asm index 871da86be..d8fbad82d 100755 --- a/engine/start_menu.asm +++ b/engine/start_menu.asm @@ -5,7 +5,7 @@ StartMenu:: ; 125cd 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 @@ StartMenu:: ; 125cd call .DrawBugContestStatusBox call SafeUpdateSprites call _OpenAndCloseMenu_HDMATransferTileMapAndAttrMap - callba LoadFonts_NoOAMUpdate + farcall LoadFonts_NoOAMUpdate call .DrawBugContestStatus call UpdateTimePals jr .Select @@ -393,7 +393,7 @@ endr ld hl, StatusFlags2 bit 2, [hl] ; bug catching contest ret z - callba StartMenu_DrawBugContestStatusBox + farcall StartMenu_DrawBugContestStatusBox ret ; 128de @@ -403,7 +403,7 @@ endr jr nz, .contest ret .contest - callba StartMenu_PrintBugContestStatus + farcall StartMenu_PrintBugContestStatus ret ; 128ed @@ -442,7 +442,7 @@ StartMenu_Save: ; 1290b ; Save the game. call BufferScreen - callba SaveMenu + farcall SaveMenu jr nc, .asm_12919 ld a, 0 ret @@ -456,7 +456,7 @@ StartMenu_Option: ; 1291c ; Game options. call FadeToMenu - callba OptionsMenu + farcall OptionsMenu ld a, 6 ret ; 12928 @@ -466,7 +466,7 @@ StartMenu_Status: ; 12928 ; Player status. call FadeToMenu - callba TrainerCard + farcall TrainerCard call CloseSubmenu ld a, 0 ret @@ -480,7 +480,7 @@ StartMenu_Pokedex: ; 12937 jr z, .asm_12949 call FadeToMenu - callba Pokedex + farcall Pokedex call CloseSubmenu .asm_12949 @@ -492,7 +492,7 @@ StartMenu_Pokedex: ; 12937 StartMenu_Pokegear: ; 1294c call FadeToMenu - callba PokeGear + farcall PokeGear call CloseSubmenu ld a, 0 ret @@ -502,7 +502,7 @@ StartMenu_Pokegear: ; 1294c StartMenu_Pack: ; 1295b call FadeToMenu - callba Pack + farcall Pack ld a, [wcf66] and a jr nz, .used_item @@ -531,17 +531,17 @@ StartMenu_Pokemon: ; 12976 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 @@ HasNoItems: ; 129d5 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 @@ PartyMonItemName: ; 12a6c CancelPokemonAction: ; 12a79 - callba InitPartyMenuWithCancel - callba UnfreezeMonIcons + farcall InitPartyMenuWithCancel + farcall UnfreezeMonIcons ld a, 1 ret ; 12a88 @@ -689,7 +689,7 @@ PokemonActionSubmenu: ; 12a88 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 @@ SwitchPartyMons: ; 12aec 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 @@ SwitchPartyMons: ; 12aec 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 @@ GiveTakePartyMonItem: ; 12b60 .GiveItem: - callba DepositSellInitPackBuffers + farcall DepositSellInitPackBuffers .loop - callba DepositSellPack + farcall DepositSellPack ld a, [wcf66] and a @@ -870,7 +870,7 @@ TryGiveItemToPartymon: ; 12bd9 push hl ld d, a - callba ItemIsMail + farcall ItemIsMail pop hl jr c, .please_remove_mail ld a, [hl] @@ -930,7 +930,7 @@ GivePartyItem: ; 12c4c ld a, [CurItem] ld [hl], a ld d, a - callba ItemIsMail + farcall ItemIsMail jr nc, .done call ComposeMailMessage @@ -951,7 +951,7 @@ TakePartyItem: ; 12c60 call ReceiveItemFromPokemon jr nc, .asm_12c94 - callba ItemIsMail + farcall ItemIsMail call GetPartyItemLocation ld a, [hl] ld [wd265], a @@ -1063,7 +1063,7 @@ StartMenuYesNo: ; 12cf5 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 @@ MonMailAction: ; 12d45 jp .done .read - callba ReadPartyMonMail + farcall ReadPartyMonMail ld a, $0 ret @@ -1126,7 +1126,7 @@ MonMailAction: ; 12d45 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 @@ OpenPartyStats: ; 12e00 MonMenu_Cut: ; 12e1b - callba CutFunction + farcall CutFunction ld a, [wFieldMoveSucceeded] cp $1 jr nz, .Fail @@ -1249,13 +1249,13 @@ MonMenu_Cut: ; 12e1b 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 @@ MonMenu_Fly: ; 12e30 ; 12e55 MonMenu_Flash: ; 12e55 - callba OWFlash + farcall OWFlash ld a, [wFieldMoveSucceeded] cp $1 jr nz, .Fail @@ -1288,7 +1288,7 @@ MonMenu_Flash: ; 12e55 ; 12e6a MonMenu_Strength: ; 12e6a - callba StrengthFunction + farcall StrengthFunction ld a, [wFieldMoveSucceeded] cp $1 jr nz, .Fail @@ -1302,7 +1302,7 @@ MonMenu_Strength: ; 12e6a ; 12e7f MonMenu_Whirlpool: ; 12e7f - callba WhirlpoolFunction + farcall WhirlpoolFunction ld a, [wFieldMoveSucceeded] cp $1 jr nz, .Fail @@ -1316,7 +1316,7 @@ MonMenu_Whirlpool: ; 12e7f ; 12e94 MonMenu_Waterfall: ; 12e94 - callba WaterfallFunction + farcall WaterfallFunction ld a, [wFieldMoveSucceeded] cp $1 jr nz, .Fail @@ -1330,7 +1330,7 @@ MonMenu_Waterfall: ; 12e94 ; 12ea9 MonMenu_Teleport: ; 12ea9 - callba TeleportFunction + farcall TeleportFunction ld a, [wFieldMoveSucceeded] and a jr z, .Fail @@ -1344,7 +1344,7 @@ MonMenu_Teleport: ; 12ea9 ; 12ebd MonMenu_Surf: ; 12ebd - callba SurfFunction + farcall SurfFunction ld a, [wFieldMoveSucceeded] and a jr z, .Fail @@ -1358,7 +1358,7 @@ MonMenu_Surf: ; 12ebd ; 12ed1 MonMenu_Dig: ; 12ed1 - callba DigFunction + farcall DigFunction ld a, [wFieldMoveSucceeded] cp $1 jr nz, .Fail @@ -1374,7 +1374,7 @@ MonMenu_Dig: ; 12ed1 MonMenu_Softboiled_MilkDrink: ; 12ee6 call .CheckMonHasEnoughHP jr nc, .NotEnoughHP - callba Softboiled_MilkDrinkFunction + farcall Softboiled_MilkDrinkFunction jr .finish .NotEnoughHP: @@ -1417,7 +1417,7 @@ MonMenu_Softboiled_MilkDrink: ; 12ee6 ; 12f26 MonMenu_Headbutt: ; 12f26 - callba HeadbuttFunction + farcall HeadbuttFunction ld a, [wFieldMoveSucceeded] cp $1 jr nz, .Fail @@ -1431,7 +1431,7 @@ MonMenu_Headbutt: ; 12f26 ; 12f3b MonMenu_RockSmash: ; 12f3b - callba RockSmashFunction + farcall RockSmashFunction ld a, [wFieldMoveSucceeded] cp $1 jr nz, .Fail @@ -1445,7 +1445,7 @@ MonMenu_RockSmash: ; 12f3b ; 12f50 MonMenu_SweetScent: ; 12f50 - callba SweetScentFromMenu + farcall SweetScentFromMenu ld b, $4 ld a, $2 ret @@ -1762,8 +1762,8 @@ SetUpMoveScreenBG: ; 13172 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 @@ SetUpMoveScreenBG: ; 13172 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 @@ SetUpMoveScreenBG: ; 13172 hlcoord 5, 1 call PlaceString push bc - callba CopyPkmnToTempMon + farcall CopyPkmnToTempMon pop hl call PrintLevel ld hl, PlayerHPPal diff --git a/engine/stats_screen.asm b/engine/stats_screen.asm index 14a0c1d47..842e5ea2c 100755 --- a/engine/stats_screen.asm +++ b/engine/stats_screen.asm @@ -33,7 +33,7 @@ StatsScreenInit_gotaddress: ; 4dc94 call ClearBGPalettes call ClearTileMap call UpdateSprites - callba StatsScreen_LoadFont + farcall StatsScreen_LoadFont pop hl call _hl_ call ClearBGPalettes @@ -83,13 +83,13 @@ StatsScreenMobile: ; 4dcf7 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,14 +121,14 @@ StatsScreen_WaitAnim: ; 4dd3a (13:5d3a) ret .try_anim - callba SetUpPokeAnim + farcall SetUpPokeAnim jr nc, .finish ld hl, wcf64 res 6, [hl] .finish ld hl, wcf64 res 5, [hl] - callba HDMATransferTileMapToWRAMBank3 + farcall HDMATransferTileMapToWRAMBank3 ret StatsScreen_SetJumptableIndex: ; 4dd62 (13:5d62) @@ -148,7 +148,7 @@ MonStatsInit: ; 4dd72 (13:5d72) res 6, [hl] call ClearBGPalettes call ClearTileMap - callba HDMATransferTileMapToWRAMBank3 + farcall HDMATransferTileMapToWRAMBank3 call StatsScreen_CopyToTempMon ld a, [CurPartySpecies] cp EGG @@ -234,14 +234,14 @@ StatsScreen_CopyToTempMon: ; 4ddf2 (13:5df2) jr .done .breedmon - callba CopyPkmnToTempMon + farcall CopyPkmnToTempMon ld a, [CurPartySpecies] cp EGG jr z, .done ld a, [MonType] cp BOXMON jr c, .done - callba CalcTempmonStats + farcall CalcTempmonStats .done and a ret @@ -254,7 +254,7 @@ StatsScreen_GetJoypad: ; 4de2c (13:5e2c) push hl push de push bc - callba StatsScreenDPad + farcall StatsScreenDPad pop bc pop de pop hl @@ -419,7 +419,7 @@ StatsScreen_InitUpperHalf: ; 4deea (13:5eea) 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 @@ StatsScreen_InitUpperHalf: ; 4deea (13:5eea) .PlaceGenderChar: ; 4df66 (13:5f66) push hl - callba GetGender + farcall GetGender pop hl ret c ld a, "♂" @@ -480,7 +480,7 @@ StatsScreen_PlacePageSwitchArrows: ; 4df9b (13:5f9b) StatsScreen_PlaceShinyIcon: ; 4dfa6 (13:5fa6) ld bc, TempMonDVs - callba CheckShininess + farcall CheckShininess ret nc hlcoord 19, 0 ld [hl], "" @@ -519,7 +519,7 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6) ld a, [wcf64] and $3 ld c, a - callba LoadStatsScreenPals + farcall LoadStatsScreenPals call DelayFrame ld hl, wcf64 set 5, [hl] @@ -639,7 +639,7 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6) 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 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6) 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 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6) ld hl, .OTNamePointers call GetNicknamePointer call CopyNickname - callba CheckNickErrors + farcall CheckNickErrors hlcoord 2, 13 call PlaceString ld a, [TempMonCaughtGender] @@ -1013,7 +1013,7 @@ EggStatsScreen: ; 4e33a call DelayFrame hlcoord 0, 0 call PrepMonFrontpic - callba HDMATransferTileMapToWRAMBank3 + farcall HDMATransferTileMapToWRAMBank3 call StatsScreen_AnimateEgg ld a, [TempMonHappiness] diff --git a/engine/tempmon.asm b/engine/tempmon.asm index 332cb0c6c..be989d14b 100644 --- a/engine/tempmon.asm +++ b/engine/tempmon.asm @@ -19,7 +19,7 @@ CopyPkmnToTempMon: ; 5084a cp OTPARTYMON jr z, .copywholestruct ld bc, BOXMON_STRUCT_LENGTH - callab CopyBoxmonToTempMon + callfar CopyBoxmonToTempMon jr .done .copywholestruct diff --git a/engine/time.asm b/engine/time.asm index 296cc335d..61ef614c3 100755 --- a/engine/time.asm +++ b/engine/time.asm @@ -200,7 +200,7 @@ CheckPokerusTick:: ; 114e7 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 @@ DoMysteryGiftIfDayHasPassed: ; 11548 ld hl, Buffer1 call InitOneDayCountdown call CloseSRAM - callba Function1050c8 + farcall Function1050c8 .not_timed_out ld a, BANK(sMysteryGiftTimer) diff --git a/engine/timeset.asm b/engine/timeset.asm index 09c5b3a75..417517005 100755 --- a/engine/timeset.asm +++ b/engine/timeset.asm @@ -590,7 +590,7 @@ Special_InitialSetDSTFlag: ; 90a54 ld a, [hMinutes] ld c, a decoord 1, 14 - callba PrintHoursMins + farcall PrintHoursMins ld hl, .DSTIsThatOK ret ; 90a83 (24:4a83) @@ -621,7 +621,7 @@ Special_InitialClearDSTFlag: ; 90a88 ld a, [hMinutes] ld c, a decoord 1, 14 - callba PrintHoursMins + farcall PrintHoursMins ld hl, .IsThatOK ret ; 90ab7 diff --git a/engine/tmhm2.asm b/engine/tmhm2.asm index 8d19aaf81..c111fa7f9 100755 --- a/engine/tmhm2.asm +++ b/engine/tmhm2.asm @@ -23,7 +23,7 @@ TMHMPocket: ; 2c76f (b:476f) .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 @@ TMHMPocket: ; 2c76f (b:476f) 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 @@ ChooseMonToLearnTMHM: ; 2c7fb 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 @@ TeachTMHM: ; 2c867 jr .nope .compatible - callab KnowsMove + callfar KnowsMove jr c, .nope predef LearnMove @@ -146,13 +146,13 @@ TeachTMHM: ; 2c867 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 diff --git a/engine/trade_animation.asm b/engine/trade_animation.asm index 7100bd558..2fc8df854 100755 --- a/engine/trade_animation.asm +++ b/engine/trade_animation.asm @@ -143,7 +143,7 @@ RunTradeAnimScript: ; 28fa1 call ClearTileMap call DisableLCD call LoadFontsBattleExtra - callab ClearSpriteAnims + callfar ClearSpriteAnims ld a, [hCGB] and a jr z, .NotCGB @@ -181,7 +181,7 @@ RunTradeAnimScript: ; 28fa1 ld [hWX], a ld a, $90 ld [hWY], a - callba GetTrademonFrontpic + farcall GetTrademonFrontpic call EnableLCD call LoadTradeBallAndCableGFX ld a, [wPlayerTrademonSpecies] @@ -208,7 +208,7 @@ DoTradeAnimation: ; 29082 bit 7, a jr nz, .finished call .DoTradeAnimCommand - callab PlaySpriteAnimations + callfar PlaySpriteAnimations ld hl, wcf65 inc [hl] call DelayFrame @@ -342,7 +342,7 @@ TradeAnim_InitTubeAnim: ; 2914e push af call DisableLCD - callab ClearSpriteAnims + callfar ClearSpriteAnims hlbgcoord 20, 3 ld bc, 12 ld a, $60 @@ -488,7 +488,7 @@ TradeAnim_TubeToPlayer8: ; 29229 call ClearTileMap call ClearSprites call DisableLCD - callab ClearSpriteAnims + callfar ClearSpriteAnims hlbgcoord 0, 0 ld bc, sScratch - VBGMap0 ld a, " " @@ -862,7 +862,7 @@ TradeAnim_ShowGetmonData: ; 29461 ; 29487 TradeAnim_AnimateFrontpic: ; 29487 - callba AnimateTrademonFrontpic + farcall AnimateTrademonFrontpic call TradeAnim_AdvanceScriptPointer ret @@ -1521,7 +1521,7 @@ LoadTradeBallAndCableGFX: ; 2982b LoadTradeBubbleGFX: ; 2985a call DelayFrame ld e, $3 - callab LoadMenuMonIcon + callfar LoadMenuMonIcon ld de, TradeBubbleGFX ld hl, VTiles0 tile $72 lb bc, BANK(TradeBubbleGFX), $4 diff --git a/engine/trademon_frontpic.asm b/engine/trademon_frontpic.asm index 1641443ea..bf1c2965c 100644 --- a/engine/trademon_frontpic.asm +++ b/engine/trademon_frontpic.asm @@ -17,7 +17,7 @@ AnimateTrademonFrontpic: ; 4d81e ld a, [wOTTrademonSpecies] call IsAPokemon ret c - callba ShowOTTrademonStats + farcall ShowOTTrademonStats ld a, [wOTTrademonSpecies] ld [CurPartySpecies], a ld a, [wOTTrademonDVs] @@ -28,7 +28,7 @@ AnimateTrademonFrontpic: ; 4d81e 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 diff --git a/engine/trainer_card.asm b/engine/trainer_card.asm index 6ed9f6ea6..01a033650 100755 --- a/engine/trainer_card.asm +++ b/engine/trainer_card.asm @@ -34,7 +34,7 @@ TrainerCard: ; 25105 call ClearTileMap call DisableLCD - callba GetCardPic + farcall GetCardPic ld hl, CardRightCornerGFX ld de, VTiles2 tile $1c diff --git a/engine/unused_correct_party.asm b/engine/unused_correct_party.asm index dd2e1111c..2fa98a545 100644 --- a/engine/unused_correct_party.asm +++ b/engine/unused_correct_party.asm @@ -107,7 +107,7 @@ CorrectErrorsInPlayerParty: ; unreferenced push bc call .GetLengthOfStringWith6CharCap push de - callba CheckStringForErrors + farcall CheckStringForErrors pop hl pop bc jr nc, .valid_nickname @@ -145,7 +145,7 @@ CorrectErrorsInPlayerParty: ; unreferenced push bc call .GetLengthOfStringWith6CharCap push de - callba CheckStringForErrors + farcall CheckStringForErrors pop hl jr nc, .valid_ot_name ld d, h diff --git a/engine/warp_connection.asm b/engine/warp_connection.asm index 365e24ea6..6dec2ec78 100755 --- a/engine/warp_connection.asm +++ b/engine/warp_connection.asm @@ -8,7 +8,7 @@ HandleNewMap: ; 1045b0 ld a, MAPCALLBACK_NEWMAP call RunMapCallback InitCommandQueue: ; 1045c4 - callba ClearCmdQueue + farcall ClearCmdQueue ld a, MAPCALLBACK_CMDQUEUE call RunMapCallback call GetMapHeaderTimeOfDayNybble @@ -225,8 +225,8 @@ LoadMapTimeOfDay: ; 104750 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 @@ LoadMapTimeOfDay: ; 104750 ld [wBGMapAnchor], a ld [hSCY], a ld [hSCX], a - callba ApplyBGMapAnchorToObjects + farcall ApplyBGMapAnchorToObjects ld a, [rVBK] push af @@ -298,9 +298,9 @@ LoadGraphics: ; 1047cf 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 @@ LoadMapPalettes: ; 1047eb 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 diff --git a/engine/wildmons.asm b/engine/wildmons.asm index 1b6a88f6f..9aed7017a 100755 --- a/engine/wildmons.asm +++ b/engine/wildmons.asm @@ -805,7 +805,7 @@ ValidateTempWildMonSpecies: ; 2a4a0 ; 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 @@ RandomUnseenWildMon: ; 2a4ab ; 0x2a51f RandomPhoneWildMon: ; 2a51f - callba GetCallerLocation + farcall GetCallerLocation ld d, b ld e, c ld hl, JohtoGrassWildMons @@ -919,7 +919,7 @@ RandomPhoneWildMon: ; 2a51f 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 diff --git a/event/buena.asm b/event/buena.asm index 2cb3b5a63..1227593eb 100644 --- a/event/buena.asm +++ b/event/buena.asm @@ -5,14 +5,14 @@ SpecialBuenasPassword: ; 8af6b call CopyMenuDataHeader ld a, [wBuenasPassword] ld c, a - callba GetBuenasPassword + farcall GetBuenasPassword ld a, [wMenuBorderLeftCoord] add c add $2 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 @@ SpecialBuenasPassword: ; 8af6b ld a, [MenuSelection] add c ld c, a - callba GetBuenasPassword + farcall GetBuenasPassword pop hl call PlaceString ret diff --git a/event/bug_contest/caught_mon.asm b/event/bug_contest/caught_mon.asm index 729033d8b..5d423f466 100644 --- a/event/bug_contest/caught_mon.asm +++ b/event/bug_contest/caught_mon.asm @@ -3,8 +3,8 @@ BugContest_SetCaughtContestMon: ; e6ce and a jr z, .firstcatch ld [wd265], a - callba DisplayAlreadyCaughtText - callba DisplayCaughtContestMonStats + farcall DisplayAlreadyCaughtText + farcall DisplayCaughtContestMonStats lb bc, 14, 7 call PlaceYesNoBox ret c diff --git a/event/bug_contest/contest.asm b/event/bug_contest/contest.asm index 2cb88ad30..ba561abf2 100644 --- a/event/bug_contest/contest.asm +++ b/event/bug_contest/contest.asm @@ -3,7 +3,7 @@ Special_GiveParkBalls: ; 135db ld [wContestMon], a ld a, 20 ld [wParkBallsRemaining], a - callba StartBugContestTimer + farcall StartBugContestTimer ret BugCatchingContestBattleScript:: ; 0x135eb diff --git a/event/bug_contest/judging.asm b/event/bug_contest/judging.asm index a7a9eb022..fea442a65 100755 --- 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 @@ LoadContestantName: ; 13730 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 @@ LoadContestantName: ; 13730 ; 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 diff --git a/event/catch_tutorial.asm b/event/catch_tutorial.asm index 8340d8c13..b9352ccd6 100644 --- a/event/catch_tutorial.asm +++ b/event/catch_tutorial.asm @@ -41,7 +41,7 @@ CatchTutorial:: ; 4e554 ld hl, .AutoInput ld a, BANK(.AutoInput) call StartAutoInput - callab StartBattle + callfar StartBattle call StopAutoInput pop af diff --git a/event/celebi.asm b/event/celebi.asm index ab0a333f2..b7bf95145 100755 --- a/event/celebi.asm +++ b/event/celebi.asm @@ -31,7 +31,7 @@ Special_CelebiShrineEvent: ; 4989a push de ld a, $90 ld [wCurrSpriteOAMAddr], a - callba DoNextFrameForAllSprites + farcall DoNextFrameForAllSprites call CelebiEvent_CountDown ld c, 2 call DelayFrames @@ -70,7 +70,7 @@ Special_CelebiShrineEvent: ; 4989a ; 49912 LoadCelebiGFX: ; 49912 - callba ClearSpriteAnims + farcall ClearSpriteAnims ld de, SpecialCelebiLeafGFX ld hl, VTiles1 lb bc, BANK(SpecialCelebiLeafGFX), 4 diff --git a/event/daycare.asm b/event/daycare.asm index 128cf674a..6395a40fb 100755 --- a/event/daycare.asm +++ b/event/daycare.asm @@ -30,7 +30,7 @@ Special_DayCareMan: ; 166d6 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 @@ Special_DayCareMan: ; 166d6 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 @@ Special_DayCareLady: ; 1672a 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 @@ Special_DayCareLady: ; 1672a 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,19 +124,19 @@ DayCareAskDepositPokemon: ; 16798 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 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 @@ DayCare_AskWithdrawBreedMon: ; 16807 .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_AskWithdrawBreedMon: ; 16807 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 @@ DayCare_InitBreeding: ; 16a3b ld a, [wDayCareMan] bit 0, a ret z - callab CheckBreedmonCompatibility + callfar CheckBreedmonCompatibility ld a, [wd265] and a ret z @@ -639,7 +639,7 @@ DayCare_InitBreeding: ; 16a3b cp DITTO ld a, $0 jr z, .LoadWhichBreedmonIsTheMother - callba GetGender + farcall GetGender ld a, $0 jr z, .LoadWhichBreedmonIsTheMother inc a @@ -653,8 +653,8 @@ DayCare_InitBreeding: ; 16a3b .GotMother: ld [CurPartySpecies], a - callab GetPreEvolution - callab GetPreEvolution + callfar GetPreEvolution + callfar GetPreEvolution ld a, EGG_LEVEL ld [CurPartyLevel], a @@ -685,7 +685,7 @@ DayCare_InitBreeding: ; 16a3b xor a ld [Buffer1], a predef FillMoves - callba InitEggMoves + farcall InitEggMoves ld hl, wEggMonID ld a, [PlayerID] ld [hli], a @@ -693,7 +693,7 @@ DayCare_InitBreeding: ; 16a3b 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 @@ DayCare_InitBreeding: ; 16a3b ld a, TEMPMON ld [MonType], a push hl - callba GetGender + farcall GetGender pop hl ld de, wBreedMon1DVs ld bc, wBreedMon2DVs diff --git a/event/field_moves.asm b/event/field_moves.asm index 4c4b8cfc1..1c21f4995 100755 --- a/event/field_moves.asm +++ b/event/field_moves.asm @@ -7,20 +7,20 @@ PlayWhirlpoolSound: ; 8c7d4 ; 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 @@ ShakeHeadbuttTree: ; 8c80a 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 @@ ShakeHeadbuttTree: ; 8c80a dec [hl] ld a, 36 * 4 ld [wCurrSpriteOAMAddr], a - callba DoNextFrameForAllSprites + farcall DoNextFrameForAllSprites call DelayFrame jr .loop @@ -61,7 +61,7 @@ ShakeHeadbuttTree: ; 8c80a 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 @@ OWCutAnimation: ; 8c940 jr nz, .finish ld a, 36 * 4 ld [wCurrSpriteOAMAddr], a - callab DoNextFrameForAllSprites + callfar DoNextFrameForAllSprites call OWCutJumptable call DelayFrame jr .loop @@ -139,7 +139,7 @@ OWCutAnimation: ; 8c940 ; 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 @@ FlyFromAnim: ; 8caed 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 @@ FlyToAnim: ; 8cb33 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 @@ FlyToAnim: ; 8cb33 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 @@ FlyFunction_InitGFX: ; 8cb9b (23:4b9b) ld a, [hl] ld [wd265], a ld e, $84 - callba FlyFunction_GetMonIcon + farcall FlyFunction_GetMonIcon xor a ld [wJumptableIndex], a ret diff --git a/event/halloffame.asm b/event/halloffame.asm index 4f37200a4..986c49096 100755 --- a/event/halloffame.asm +++ b/event/halloffame.asm @@ -14,7 +14,7 @@ HallOfFame:: ; 0x8640e ld hl, StatusFlags set 6, [hl] ; hall of fame - callba HallOfFame_InitSaveIfNeeded + farcall HallOfFame_InitSaveIfNeeded ld hl, wHallOfFameCount ld a, [hl] @@ -22,16 +22,16 @@ HallOfFame:: ; 0x8640e jr nc, .ok inc [hl] .ok - callba SaveGameData + farcall SaveGameData call GetHallOfFameParty - callba AddHallOfFameEntry + farcall AddHallOfFameEntry xor a ld [wGameLogicPaused], a call AnimateHallOfFame pop af ld b, a - callba Credits + farcall Credits ret ; 0x86455 @@ -42,11 +42,11 @@ RedCredits:: ; 86455 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 @@ RedCredits:: ; 86455 ld [wSpawnAfterChampion], a ld a, [StatusFlags] ld b, a - callba Credits + farcall Credits ret ; 8648e @@ -65,11 +65,11 @@ HallOfFame_FadeOutMusic: ; 8648e 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 @@ GetHallOfFameParty: ; 8653f AnimateHOFMonEntrance: ; 865b5 push hl call ClearBGPalettes - callba ResetDisplayBetweenHallOfFameMons + farcall ResetDisplayBetweenHallOfFameMons pop hl ld a, [hli] ld [TempMonSpecies], a @@ -499,7 +499,7 @@ DisplayHOFMon: ; 86748 call PlaceString ld a, TEMPMON ld [MonType], a - callba GetGender + farcall GetGender ld a, " " jr c, .got_gender ld a, "♂" @@ -541,7 +541,7 @@ HOF_AnimatePlayerPic: ; 86810 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 @@ HOF_AnimatePlayerPic: ; 86810 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 @@ HOF_AnimatePlayerPic: ; 86810 lb bc, PRINTNUM_LEADINGZEROS | 1, 2 call PrintNum call WaitBGMap - callba ProfOaksPCRating + farcall ProfOaksPCRating ret ; 868ed diff --git a/event/happiness_egg.asm b/event/happiness_egg.asm index a00d471bb..0c9b5a4df 100755 --- a/event/happiness_egg.asm +++ b/event/happiness_egg.asm @@ -196,7 +196,7 @@ DayCareStep:: ; 7282 call Random ld [hl], a - callab CheckBreedmonCompatibility + callfar CheckBreedmonCompatibility ld a, [wd265] cp 230 ld b, -1 + 32 percent diff --git a/event/itemfinder.asm b/event/itemfinder.asm index 5356a1f86..71aaa5b69 100755 --- 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 diff --git a/event/kurt.asm b/event/kurt.asm index e1fff12c0..9bc06a613 100644 --- a/event/kurt.asm +++ b/event/kurt.asm @@ -57,7 +57,7 @@ Special_SelectApricornForKurt: ; 88018 ; 88055 Kurt_SelectApricorn: ; 88055 - callba FindApricornsInBag + farcall FindApricornsInBag jr c, .nope ld hl, .MenuDataHeader call CopyMenuDataHeader @@ -106,7 +106,7 @@ Kurt_SelectApricorn: ; 88055 ld a, [MenuSelection] and a ret z - callba PlaceMenuItemName + farcall PlaceMenuItemName ret ; 880ab @@ -117,7 +117,7 @@ Kurt_SelectApricorn: ; 88055 ret z ld a, [wItemQuantityChangeBuffer] ld [MenuSelectionQuantity], a - callba PlaceMenuItemQuantity + farcall PlaceMenuItemQuantity ret ; 880c2 @@ -140,7 +140,7 @@ Kurt_SelectQuantity: ; 880c2 call .PlaceApricornName call PlaceApricornQuantity call ApplyTilemap - callba Kurt_SelectQuantity_InterpretJoypad + farcall Kurt_SelectQuantity_InterpretJoypad jr nc, .loop push bc @@ -171,7 +171,7 @@ Kurt_SelectQuantity: ; 880c2 add hl, de ld d, h ld e, l - callba PlaceMenuItemName + farcall PlaceMenuItemName ret ; 88126 diff --git a/event/lucky_number.asm b/event/lucky_number.asm index 8cec7599d..4488cfcc9 100644 --- a/event/lucky_number.asm +++ b/event/lucky_number.asm @@ -103,7 +103,7 @@ Special_CheckForLuckyNumberWinners: ; 4d87a ld a, [ScriptVar] and a ret z ; found nothing - callba TrainerRankings_LuckyNumberShow + farcall TrainerRankings_LuckyNumberShow ld a, [wFoundMatchingIDInParty] and a push af diff --git a/event/magikarp.asm b/event/magikarp.asm index e18d087dd..4dab89816 100644 --- a/event/magikarp.asm +++ b/event/magikarp.asm @@ -5,7 +5,7 @@ Special_CheckMagikarpLength: ; fbb32 ; 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 @@ Special_CheckMagikarpLength: ; fbb32 ld c, l call CalcMagikarpLength call PrintMagikarpLength - callba TrainerRankings_MagikarpLength + farcall TrainerRankings_MagikarpLength ld hl, .MeasureItText call PrintText diff --git a/event/magnet_train.asm b/event/magnet_train.asm index c6c6da846..567e0392e 100755 --- a/event/magnet_train.asm +++ b/event/magnet_train.asm @@ -45,7 +45,7 @@ Special_MagnetTrain: ; 8cc04 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 @@ MagntTrain_LoadGFX_PlayMusic: ; 8ccc9 call ClearBGPalettes call ClearSprites call DisableLCD - callab ClearSpriteAnims + callfar ClearSpriteAnims call SetMagnetTrainPals call DrawMagnetTrain ld a, $90 @@ -131,7 +131,7 @@ MagntTrain_LoadGFX_PlayMusic: ; 8ccc9 push af ld a, $1 ld [rSVBK], a - callba GetPlayerIcon + farcall GetPlayerIcon pop af ld [rSVBK], a ld hl, VTiles0 @@ -423,7 +423,7 @@ MagnetTrain_Jumptable: ; 8cdf7 ; 8ceae MagnetTrain_Jumptable_FirstRunThrough: ; 8ceae - callba PlaySpriteAnimations + farcall PlaySpriteAnimations call MagnetTrain_Jumptable call MagnetTrain_UpdateLYOverrides call PushLYOverrides diff --git a/event/mom.asm b/event/mom.asm index 80513e5fb..a23b55256 100644 --- a/event/mom.asm +++ b/event/mom.asm @@ -161,7 +161,7 @@ Special_BankOfMom: ; 16218 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 @@ Special_BankOfMom: ; 16218 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 @@ Special_BankOfMom: ; 16218 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 @@ Mom_WithdrawDepositMenuJoypad: ; 16571 ld c, l ld b, h ld de, StringBuffer2 - callba GiveMoney + farcall GiveMoney ret .decrementdigit @@ -577,7 +577,7 @@ Mom_WithdrawDepositMenuJoypad: ; 16571 ld c, l ld b, h ld de, StringBuffer2 - callba TakeMoney + farcall TakeMoney ret .getdigitquantity diff --git a/event/mom_phone.asm b/event/mom_phone.asm index aab4abe4b..35021dd42 100755 --- a/event/mom_phone.asm +++ b/event/mom_phone.asm @@ -20,7 +20,7 @@ MomTriesToBuySomething:: ; fcfec ret nc ld b, BANK(.Script) ld de, .Script - callba LoadScriptBDE + farcall LoadScriptBDE scf ret ; fd00f @@ -71,7 +71,7 @@ CheckBalance_MomItem2: ; fd044 ld [hMoneyTemp + 2], a ld de, wMomsMoney ld bc, hMoneyTemp - callba CompareMoney + farcall CompareMoney jr nc, .have_enough_money .nope @@ -91,7 +91,7 @@ CheckBalance_MomItem2: ; fd044 .loop ld de, MomItemTriggerBalance ld bc, wMomsMoney - callba CompareMoney + farcall CompareMoney jr z, .exact jr nc, .less_than call .AddMoney @@ -113,7 +113,7 @@ CheckBalance_MomItem2: ; fd044 .AddMoney: ld de, MomItemTriggerBalance ld bc, hMoneyTemp - callba AddMoney + farcall AddMoney ret ; fd0a6 @@ -130,7 +130,7 @@ MomBuysItem_DeductFunds: ; fd0a6 (3f:50a6) ld [hMoneyTemp + 2], a ld de, wMomsMoney ld bc, hMoneyTemp - callba TakeMoney + farcall TakeMoney ret @@ -144,7 +144,7 @@ Mom_GiveItemOrDoll: ; fd0c3 ld a, [hl] ld c, a ld b, 1 - callba DecorationFlagAction_c + farcall DecorationFlagAction_c scf ret diff --git a/event/move_deleter.asm b/event/move_deleter.asm index aa8a1e915..95fc0f1d8 100644 --- a/event/move_deleter.asm +++ b/event/move_deleter.asm @@ -5,7 +5,7 @@ MoveDeletion: jr c, .declined ld hl, .AskWhichMonText call PrintText - callba SelectMonFromParty + farcall SelectMonFromParty jr c, .declined ld a, [CurPartySpecies] cp EGG @@ -20,7 +20,7 @@ MoveDeletion: ld hl, .AskWhichMoveText call PrintText call LoadStandardMenuDataHeader - callba ChooseMoveToDelete + farcall ChooseMoveToDelete push af call ReturnToMapWithSpeechTextbox pop af diff --git a/event/move_tutor.asm b/event/move_tutor.asm index b26114dd0..a15ecaf93 100644 --- a/event/move_tutor.asm +++ b/event/move_tutor.asm @@ -12,12 +12,12 @@ Special_MoveTutor: ; 4925b 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 @@ CheckCanLearnMoveTutorMove: ; 492b9 jr .didnt_learn .can_learn - callab KnowsMove + callfar KnowsMove jr c, .didnt_learn predef LearnMove @@ -84,7 +84,7 @@ CheckCanLearnMoveTutorMove: ; 492b9 jr z, .didnt_learn ld c, HAPPINESS_LEARNMOVE - callab ChangeHappiness + callfar ChangeHappiness jr .learned .didnt_learn diff --git a/event/name_rater.asm b/event/name_rater.asm index 96d0ee363..771c5090a 100644 --- a/event/name_rater.asm +++ b/event/name_rater.asm @@ -7,7 +7,7 @@ NameRater: ; fb6ed ; 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 @@ NameRater: ; fb6ed 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 diff --git a/event/overworld.asm b/event/overworld.asm index d50c158e9..eff2702b2 100755 --- a/event/overworld.asm +++ b/event/overworld.asm @@ -37,7 +37,7 @@ CheckEngineFlag: ; c721 ; 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 @@ CheckMapForSomethingToCut: ; c7ce 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 @@ CutDownTreeOrGrass: ; c810 call DelayFrame ld a, [Buffer6] ; Animation type ld e, a - callba OWCutAnimation + farcall OWCutAnimation call BufferScreen call GetMovementPermissions call UpdateSprites @@ -290,10 +290,10 @@ OWFlash: ; c8ac .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 @@ SurfFunction: ; c909 jr nz, .cannotsurf call CheckDirection jr c, .cannotsurf - callba CheckFacingObject + farcall CheckFacingObject jr c, .cannotsurf ld a, $1 ret @@ -428,7 +428,7 @@ UsedSurfScript: ; c986 end .empty_fn ; c9a2 - callba TrainerRankings_Surf + farcall TrainerRankings_Surf ret UsedSurfText: ; c9a9 @@ -581,7 +581,7 @@ FlyFunction: ; ca3b ld [hMapAnims], a call LoadStandardMenuDataHeader call ClearSprites - callba _FlyMap + farcall _FlyMap ld a, e cp -1 jr z, .illegal @@ -634,10 +634,10 @@ FlyFunction: ; ca3b end .ReturnFromFly: ; cacb - callba Function561d + farcall Function561d call DelayFrame call ReplaceKrisSprite - callba LoadOverworldFont + farcall LoadOverworldFont ret WaterfallFunction: ; cade @@ -649,7 +649,7 @@ WaterfallFunction: ; cade .TryWaterfall: ; cae7 ; Waterfall ld de, ENGINE_RISINGBADGE - callba CheckBadge + farcall CheckBadge ld a, $80 ret c call CheckMapCanWaterfall @@ -701,7 +701,7 @@ Script_UsedWaterfall: ; 0xcb20 ld a, [PlayerStandingTile] call CheckWaterfallTile ret z - callba TrainerRankings_Waterfall + farcall TrainerRankings_Waterfall ld a, $1 ld [ScriptVar], a ret @@ -821,7 +821,7 @@ dig_incave ret .escaperope - callba SpecialKabutoChamber + farcall SpecialKabutoChamber ld hl, .UsedEscapeRopeScript call QueueScript ld a, $81 @@ -915,7 +915,7 @@ TeleportFunction: ; cc61 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 @@ DisappearWhirlpool: ; ce1d call OverworldTextModeSwitch ld a, [Buffer6] ld e, a - callba PlayWhirlpoolSound + farcall PlayWhirlpoolSound call BufferScreen call GetMovementPermissions ret @@ -1360,7 +1360,7 @@ TryRockSmashFromMenu: ; cef4 ret GetFacingObject: ; cf0d - callba CheckFacingObject + farcall CheckFacingObject jr nc, .fail ld a, [hObjectStructIndexBuffer] @@ -1495,7 +1495,7 @@ FishFunction: ; cf8e ld d, a ld a, [Buffer2] ld e, a - callba Fish + farcall Fish ld a, d and a jr z, .nonibble diff --git a/event/poisonstep.asm b/event/poisonstep.asm index 1e81e188f..00c7477bc 100755 --- a/event/poisonstep.asm +++ b/event/poisonstep.asm @@ -132,8 +132,8 @@ DoPoisonStep:: ; 505da and %10 jr z, .mon_not_fainted ld c, HAPPINESS_POISONFAINT - callba ChangeHappiness - callba GetPartyNick + farcall ChangeHappiness + farcall GetPartyNick ld hl, .PoisonFaintText call PrintText diff --git a/event/poisonstep_pals.asm b/event/poisonstep_pals.asm index c556ba498..8930d4c5d 100644 --- a/event/poisonstep_pals.asm +++ b/event/poisonstep_pals.asm @@ -20,7 +20,7 @@ LoadPoisonBGPals: ; cbcdd call DmgToCgbBGPals ld c, 4 call DelayFrames - callba _UpdateTimePals + farcall _UpdateTimePals ret .cgb @@ -44,5 +44,5 @@ LoadPoisonBGPals: ; cbcdd ld [hCGBPalUpdate], a ld c, 4 call DelayFrames - callba _UpdateTimePals + farcall _UpdateTimePals ret diff --git a/event/poke_seer.asm b/event/poke_seer.asm index 5e93acc5d..d6e335298 100644 --- a/event/poke_seer.asm +++ b/event/poke_seer.asm @@ -21,7 +21,7 @@ SpecialPokeSeer: ; 4f0bc call JoyWaitAorB ld b, $6 - callba SelectMonFromParty + farcall SelectMonFromParty jr c, .cancel ld a, [CurPartySpecies] @@ -240,7 +240,7 @@ GetCaughtLocation: ; 4f20a cp $7e jr z, .fail ld e, a - callba GetLandmarkName + farcall GetLandmarkName ld hl, StringBuffer1 ld de, wSeerCaughtLocation ld bc, 17 diff --git a/event/print_photo.asm b/event/print_photo.asm index 448910355..06b01bbcf 100755 --- 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 @@ PhotoStudio: ; 16dc7 ld hl, .Text_HoldStill call PrintText call DisableSpriteUpdates - callba PrintPartymon + farcall PrintPartymon call ReturnToMapWithSpeechTextbox ld a, [hPrinter] and a diff --git a/event/print_unown.asm b/event/print_unown.asm index 5e0162bad..5d3966585 100644 --- a/event/print_unown.asm +++ b/event/print_unown.asm @@ -81,7 +81,7 @@ UnownPrinter: ; 16be4 .pressed_a ld a, [wJumptableIndex] push af - callba PrintUnownStamp + farcall PrintUnownStamp call RestartMapMusic pop af ld [wJumptableIndex], a @@ -148,7 +148,7 @@ UnownPrinter: ; 16be4 lb bc, 7, 7 predef PlaceGraphic ld de, VTiles2 tile $31 - callba RotateUnownFrontpic + farcall RotateUnownFrontpic ret .Load2bppToSRAM: ; 16cff diff --git a/event/special.asm b/event/special.asm index 71323499e..8937698f5 100755 --- a/event/special.asm +++ b/event/special.asm @@ -15,7 +15,7 @@ SpecialGiveShuckle: ; 7305 ; Caught data. ld b, 0 - callba SetGiftPartyMonCaughtData + farcall SetGiftPartyMonCaughtData ; Holding a Berry. ld bc, PARTYMON_STRUCT_LENGTH @@ -71,7 +71,7 @@ SpecialShuckleNick: db "SHUCKIE@" SpecialReturnShuckle: ; 737e - callba SelectMonFromParty + farcall SelectMonFromParty jr c, .refused ld a, [CurPartySpecies] @@ -107,7 +107,7 @@ SpecialReturnShuckle: ; 737e jr .CheckOT .done - callba CheckCurPartyMonFainted + farcall CheckCurPartyMonFainted jr c, .fainted ld a, [CurPartyMon] ld hl, PartyMon1Happiness @@ -119,7 +119,7 @@ SpecialReturnShuckle: ; 737e 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 @@ SpecialReturnShuckle: ; 737e ret Special_BillsGrandfather: ; 73f7 - callba SelectMonFromParty + farcall SelectMonFromParty jr c, .cancel ld a, [CurPartySpecies] ld [ScriptVar], a @@ -167,7 +167,7 @@ Special_DaisyMassage: ; 741d MassageOrHaircut: ; 7420 push hl - callba SelectMonFromParty + farcall SelectMonFromParty pop hl jr c, .nope ld a, [CurPartySpecies] diff --git a/event/squirtbottle.asm b/event/squirtbottle.asm index 7b47a96f6..1134f1bb0 100755 --- a/event/squirtbottle.asm +++ b/event/squirtbottle.asm @@ -29,7 +29,7 @@ _Squirtbottle: ; 50730 cp MAP_ROUTE_36 jr nz, .nope - callba GetFacingObject + farcall GetFacingObject jr c, .nope ld a, d diff --git a/event/sweet_scent.asm b/event/sweet_scent.asm index 63eec9922..77567488c 100755 --- a/event/sweet_scent.asm +++ b/event/sweet_scent.asm @@ -34,21 +34,21 @@ SweetScentNothing: ; 0x506e9 ; 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 diff --git a/event/whiteout.asm b/event/whiteout.asm index 159f3a519..a9d6f900e 100755 --- a/event/whiteout.asm +++ b/event/whiteout.asm @@ -49,7 +49,7 @@ BattleBGMap: ; 1250a ; 12513 HalveMoney: ; 12513 - callba TrainerRankings_WhiteOuts + farcall TrainerRankings_WhiteOuts ; Halve the player's money. ld hl, Money @@ -71,7 +71,7 @@ GetWhiteoutSpawn: ; 12527 ld d, a ld a, [wLastSpawnMapNumber] ld e, a - callba IsSpawnPoint + farcall IsSpawnPoint ld a, c jr c, .yes xor a ; SPAWN_HOME diff --git a/gfx/mail.asm b/gfx/mail.asm index d4fde366e..c8770468d 100755 --- a/gfx/mail.asm +++ b/gfx/mail.asm @@ -16,7 +16,7 @@ ReadAnyMail: ; b9237 push de ld a, BANK(sPartyMail) call GetSRAMBank - callba IsMailEuropean + farcall IsMailEuropean call CloseSRAM ld a, c ld de, StandardEnglishFont @@ -37,7 +37,7 @@ ReadAnyMail: ; b9237 call WaitBGMap ld a, [Buffer3] ld e, a - callba LoadMailPalettes + farcall LoadMailPalettes call SetPalettes xor a ld [hJoyPressed], a @@ -59,7 +59,7 @@ ReadAnyMail: ; b9237 .pressed_start ld a, [wJumptableIndex] push af - callab PrintMail ; printer + callfar PrintMail ; printer pop af ld [wJumptableIndex], a jr .loop diff --git a/gfx/pics/animation.asm b/gfx/pics/animation.asm index 2f348fbfb..eeaaa49ad 100644 --- a/gfx/pics/animation.asm +++ b/gfx/pics/animation.asm @@ -93,7 +93,7 @@ AnimateFrontpic: ; d008e .loop call SetUpPokeAnim push af - callba HDMATransferTileMapToWRAMBank3 + farcall HDMATransferTileMapToWRAMBank3 pop af jr nc, .loop ret @@ -282,9 +282,9 @@ PokeAnim_DeinitFrames: ; d01a9 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 @@ PokeAnim_SetVBank1: ; d0504 xor a ld [hBGMapMode], a call .SetFlag - callba HDMATransferAttrMapToWRAMBank3 + farcall HDMATransferAttrMapToWRAMBank3 pop af ld [rSVBK], a ret diff --git a/home.asm b/home.asm index dc03faa2c..71cb0c190 100644 --- a/home.asm +++ b/home.asm @@ -553,7 +553,7 @@ LoadEDTile:: ; 323d ; 323f ; XXX - callba HDMATransferAttrMapAndTileMapToWRAMBank3 + farcall HDMATransferAttrMapAndTileMapToWRAMBank3 ret ; 3246 @@ -869,7 +869,7 @@ HandleStoneQueue:: ; 3567 call .IsObjectInStoneTable jr nc, .nope call CallMapScript - callba EnableScriptMode + farcall EnableScriptMode scf ret @@ -1213,7 +1213,7 @@ GetNick:: ; 38a2 call CopyBytes pop de - callab CheckNickErrors + callfar CheckNickErrors pop bc pop hl diff --git a/home/battle.asm b/home/battle.asm index 3c2e4de43..30096fd4a 100644 --- a/home/battle.asm +++ b/home/battle.asm @@ -130,8 +130,8 @@ RefreshBattleHuds:: ; 39c9 ; 39d4 UpdateBattleHuds:: ; 39d4 - callba UpdatePlayerHUD - callba UpdateEnemyHUD + farcall UpdatePlayerHUD + farcall UpdateEnemyHUD ret ; 39e1 diff --git a/home/copy.asm b/home/copy.asm index 8a307b3df..8ee1c90f9 100644 --- a/home/copy.asm +++ b/home/copy.asm @@ -101,32 +101,32 @@ OldDMATransfer:: ; dfd ReplaceKrisSprite:: ; e4a - callba _ReplaceKrisSprite + farcall _ReplaceKrisSprite ret ; e51 LoadStandardFont:: ; e51 - callba _LoadStandardFont + farcall _LoadStandardFont ret ; e58 LoadFontsBattleExtra:: ; e58 - callba _LoadFontsBattleExtra + farcall _LoadFontsBattleExtra ret ; e5f LoadFontsExtra:: ; e5f - callba _LoadFontsExtra1 - callba _LoadFontsExtra2 + farcall _LoadFontsExtra1 + farcall _LoadFontsExtra2 ret ; e6c LoadFontsExtra2:: ; e6c - callba _LoadFontsExtra2 + farcall _LoadFontsExtra2 ret ; e73 diff --git a/home/flag.asm b/home/flag.asm index d2b70731a..ddd3eb235 100644 --- a/home/flag.asm +++ b/home/flag.asm @@ -105,7 +105,7 @@ FlagAction:: ; 0x2e76 CheckReceivedDex:: ; 2ead ld de, ENGINE_POKEDEX ld b, CHECK_FLAG - callba EngineFlagAction + farcall EngineFlagAction ld a, c and a ret diff --git a/home/init.asm b/home/init.asm index 087a26f12..630cfe622 100644 --- a/home/init.asm +++ b/home/init.asm @@ -139,14 +139,14 @@ Init:: ; 17d ld a, -1 ld [hLinkPlayerNumber], a - callba InitCGBPals + farcall InitCGBPals ld a, VBGMap1 / $100 ld [hBGMapAddress + 1], a xor a ; VBGMap1 % $100 ld [hBGMapAddress], a - callba StartClock + farcall StartClock xor a ld [MBC3LatchClock], a diff --git a/home/item.asm b/home/item.asm index 92d74c350..2f550a200 100644 --- a/home/item.asm +++ b/home/item.asm @@ -1,5 +1,5 @@ DoItemEffect:: ; 2f3f - callba _DoItemEffect + farcall _DoItemEffect ret ; 2f46 @@ -7,7 +7,7 @@ CheckTossableItem:: ; 2f46 push hl push de push bc - callba _CheckTossableItem + farcall _CheckTossableItem pop bc pop de pop hl diff --git a/home/joypad.asm b/home/joypad.asm index 0f5060c63..3d5f0aed5 100644 --- a/home/joypad.asm +++ b/home/joypad.asm @@ -414,7 +414,7 @@ ButtonSound:: ; aaf ld a, [InputType] or a jr z, .input_wait_loop - callba _DudeAutoInput_A + farcall _DudeAutoInput_A .input_wait_loop call .blink_cursor diff --git a/home/map.asm b/home/map.asm index 8b6d8f1e4..11f3fdf83 100644 --- a/home/map.asm +++ b/home/map.asm @@ -215,7 +215,7 @@ endr ReturnToMapFromSubmenu:: ; 222a ld a, MAPSETUP_SUBMENU ld [hMapEntryMethod], a - callba RunMapSetupScript + farcall RunMapSetupScript xor a ld [hMapEntryMethod], a ret @@ -226,7 +226,7 @@ CheckWarpTile:: ; 2238 ret nc push bc - callba CheckDirectionalWarp + farcall CheckDirectionalWarp pop bc ret nc @@ -243,7 +243,7 @@ WarpCheck:: ; 224a ; 2252 GetDestinationWarpNumber:: ; 2252 - callba CheckWarpCollision + farcall CheckWarpCollision ret nc ld a, [hROMBank] @@ -717,7 +717,7 @@ RestoreFacingAfterWarp:: ; 248a call .backup .skip - callba GetCoordOfUpperLeftCorner + farcall GetCoordOfUpperLeftCorner ret ; 24ba @@ -1050,15 +1050,15 @@ RunMapCallback:: ; 263b ExecuteCallbackScript:: ; 2674 ; Do map callback de and return to script bank b. - callba CallCallback + farcall CallCallback ld a, [ScriptMode] push af ld hl, ScriptFlags 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 @@ LoadTileset:: ; 2821 jr .skip_roof .load_roof - callba LoadMapGroupRoof + farcall LoadMapGroupRoof .skip_roof xor a @@ -1983,7 +1983,7 @@ FadeToMenu:: ; 2b29 xor a ld [hBGMapMode], a call LoadStandardMenuDataHeader - callba FadeOutPalettes + farcall FadeOutPalettes call ClearSprites call DisableSpriteUpdates ret @@ -2007,9 +2007,9 @@ ExitAllMenus:: ; 2b4d 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 @@ ReturnToMapWithSpeechTextbox:: ; 0x2b74 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 @@ ReturnToMapWithSpeechTextbox:: ; 0x2b74 ReloadTilesetAndPalettes:: ; 2bae call DisableLCD call ClearSprites - callba RefreshSprites + farcall RefreshSprites call LoadStandardFont call LoadFontsExtra ld a, [hROMBank] @@ -2052,7 +2052,7 @@ ReloadTilesetAndPalettes:: ; 2bae ld a, [MapNumber] ld c, a call SwitchToAnyMapBank - callba UpdateTimeOfDayPal + farcall UpdateTimeOfDayPal call OverworldTextModeSwitch call LoadTileset ld a, 9 @@ -2296,7 +2296,7 @@ GetMapHeaderMusic:: ; 2cbd jr z, .mahoganymart bit RADIO_TOWER_MUSIC_F, c jr nz, .radiotower - callba Function8b342 + farcall Function8b342 ld e, c ld d, 0 .done diff --git a/home/map_objects.asm b/home/map_objects.asm index 2285c8c76..4e88a050a 100644 --- a/home/map_objects.asm +++ b/home/map_objects.asm @@ -6,7 +6,7 @@ GetSpritePalette:: ; 17ff push bc ld c, a - callba _GetSpritePalette + farcall _GetSpritePalette ld a, c pop bc @@ -328,7 +328,7 @@ _CopyObjectStruct:: ; 1956 call UnmaskObject ld a, [hMapObjectIndexBuffer] call GetMapObject - callba CopyObjectStruct + farcall CopyObjectStruct ret ; 1967 @@ -345,7 +345,7 @@ ApplyDeletionToMapObject:: ; 1967 call .CheckStopFollow pop af call GetObjectStruct - callba DeleteMapObject + farcall DeleteMapObject ret .CheckStopFollow: @@ -356,7 +356,7 @@ ApplyDeletionToMapObject:: ; 1967 cp [hl] ret nz .ok - callba StopFollow + farcall StopFollow ld a, -1 ld [wObjectFollow_Leader], a ld [wObjectFollow_Follower], a @@ -409,7 +409,7 @@ CopyPlayerObjectTemplate:: ; 19a6 .ok ld a, b call GetObjectStruct - callba DeleteMapObject + farcall DeleteMapObject ret ; 19e9 @@ -620,8 +620,8 @@ UpdateSprites:: ; 1ad2 bit 0, a ret z - callba Function55e0 - callba _UpdateSprites + farcall Function55e0 + farcall _UpdateSprites ret ; 1ae5 diff --git a/home/math.asm b/home/math.asm index 01aea6b72..6a779e378 100644 --- a/home/math.asm +++ b/home/math.asm @@ -45,7 +45,7 @@ Multiply:: ; 3119 push hl push bc - callab _Multiply + callfar _Multiply pop bc pop hl diff --git a/home/menu.asm b/home/menu.asm index 53e4457e3..ba1b568c1 100644 --- a/home/menu.asm +++ b/home/menu.asm @@ -569,7 +569,7 @@ Place2DMenuItemName:: ; 201c _2DMenu:: ; 202a ld a, [hROMBank] ld [wMenuData2_2DMenuItemStringsBank], a - callba _2DMenu_ + farcall _2DMenu_ ld a, [wMenuCursorBuffer] ret ; 2039 @@ -577,7 +577,7 @@ _2DMenu:: ; 202a InterpretBattleMenu:: ; 2039 ld a, [hROMBank] ld [wMenuData2_2DMenuItemStringsBank], a - callba _InterpretBattleMenu + farcall _InterpretBattleMenu ld a, [wMenuCursorBuffer] ret ; 2048 @@ -585,7 +585,7 @@ InterpretBattleMenu:: ; 2039 InterpretMobileMenu:: ; 2048 ld a, [hROMBank] ld [wMenuData2_2DMenuItemStringsBank], a - callba _InterpretMobileMenu + farcall _InterpretMobileMenu ld a, [wMenuCursorBuffer] ret ; 2057 diff --git a/home/movement.asm b/home/movement.asm index 781a368a9..f006916a4 100644 --- a/home/movement.asm +++ b/home/movement.asm @@ -159,13 +159,13 @@ SetMenuAttributes:: ; 1bb1 ; 1bc9 StaticMenuJoypad:: ; 1bc9 - callab _StaticMenuJoypad + callfar _StaticMenuJoypad call GetMenuJoypad ret ; 1bd3 ScrollingMenuJoypad:: ; 1bd3 - callab _ScrollingMenuJoypad + callfar _ScrollingMenuJoypad call GetMenuJoypad ret ; 1bdd diff --git a/home/names.asm b/home/names.asm index bd90f7828..c8f873c3f 100644 --- a/home/names.asm +++ b/home/names.asm @@ -206,7 +206,7 @@ GetTMHMName:: ; 3487 push de ld a, [wd265] ld c, a - callab GetTMHMNumber + callfar GetTMHMNumber pop de ; HM numbers start from 51, not 1 diff --git a/home/rtc.asm b/home/rtc.asm index d343d118d..5b83f1079 100644 --- a/home/rtc.asm +++ b/home/rtc.asm @@ -14,11 +14,11 @@ RTC:: ; 46f ret z TimeOfDayPals:: ; 47e - callab _TimeOfDayPals + callfar _TimeOfDayPals ret ; 485 UpdateTimePals:: ; 485 - callab _UpdateTimePals + callfar _UpdateTimePals ret ; 48c diff --git a/home/serial.asm b/home/serial.asm index e60704f3d..b0151eae2 100644 --- a/home/serial.asm +++ b/home/serial.asm @@ -277,7 +277,7 @@ Function83b:: ; 83b Function862:: ; 862 call LoadTileMapToTempTileMap - callab PlaceWaitingText + callfar PlaceWaitingText call WaitLinkTransfer jp Call_LoadTempTileMapToTileMap ; 871 @@ -285,7 +285,7 @@ Function862:: ; 862 Function871:: ; 871 call LoadTileMapToTempTileMap - callab PlaceWaitingText + callfar PlaceWaitingText jp WaitLinkTransfer ; 87d diff --git a/home/text.asm b/home/text.asm index 3401eba50..4b0d0d5df 100644 --- a/home/text.asm +++ b/home/text.asm @@ -315,7 +315,7 @@ endm Char15:: ; 117b ld c, l ld b, h - callba Function17f036 + farcall Function17f036 jp PlaceNextChar ; 1186 @@ -391,7 +391,7 @@ PlaceEnemysName:: ; 121b ld de, String12a2 call PlaceString push bc - callab Battle_GetTrainerName + callfar Battle_GetTrainerName pop hl ld de, StringBuffer1 jr PlaceCommandCharacter diff --git a/home/tilemap.asm b/home/tilemap.asm index 1d7998130..9e15ed85b 100644 --- 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 diff --git a/home/time.asm b/home/time.asm index abdd34fe2..9ed703686 100644 --- a/home/time.asm +++ b/home/time.asm @@ -28,7 +28,7 @@ UpdateTime:: ; 5a7 call GetClock call FixDays call FixTime - callba GetTimeOfDay + farcall GetTimeOfDay ret ; 5b7 @@ -205,7 +205,7 @@ SetDayOfWeek:: ; 663 jr InitTime ; useless InitTime:: ; 677 - callba _InitTime + farcall _InitTime ret ; 67e diff --git a/home/window.asm b/home/window.asm index ff7d766e2..0570bbb01 100644 --- a/home/window.asm +++ b/home/window.asm @@ -43,8 +43,8 @@ CloseText:: ; 2dcf ld a, $90 ld [hWY], a call ReplaceKrisSprite - callba ReturnFromMapSetupScript - callba LoadOverworldFont + farcall ReturnFromMapSetupScript + farcall LoadOverworldFont ret ; 2e08 @@ -71,7 +71,7 @@ _OpenAndCloseMenu_HDMATransferTileMapAndAttrMap:: ; 2e20 ld a, $1 ld [hOAMUpdate], a - callba OpenAndCloseMenu_HDMATransferTileMapAndAttrMap + farcall OpenAndCloseMenu_HDMATransferTileMapAndAttrMap pop af ld [hOAMUpdate], a diff --git a/macros/code.asm b/macros/code.asm index 5e247e9a3..93b35bd94 100644 --- a/macros/code.asm +++ b/macros/code.asm @@ -14,7 +14,7 @@ if _NARG >= 5 else lb \1, \2 * 8, \3 * 8 endc -endm + ENDM depixel EQUS "ldpixel de," bcpixel EQUS "ldpixel bc," @@ -33,7 +33,7 @@ jumptable: MACRO 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 @@ maskbits: macro ; 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 diff --git a/macros/rst.asm b/macros/rst.asm index fe7e42723..cf4cc5314 100644 --- a/macros/rst.asm +++ b/macros/rst.asm @@ -8,22 +8,22 @@ farcall: MACRO ; bank, address 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 diff --git a/main.asm b/main.asm index bc6e5f902..357b1223c 100644 --- a/main.asm +++ b/main.asm @@ -153,7 +153,7 @@ UpdateItemDescription: ; 0x244c3 cp -1 ret z decoord 1, 14 - callba PrintItemDescription + farcall PrintItemDescription ret INCLUDE "engine/pokepic.asm" @@ -186,7 +186,7 @@ LevelUpHappinessMod: ; 2709e ld c, HAPPINESS_GAINLEVELATHOME .ok - callab ChangeHappiness + callfar ChangeHappiness ret INCLUDE "data/trainers/trainer_dvs.asm" @@ -197,14 +197,14 @@ _ReturnToBattle_UseBall: ; 2715c 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 @@ LinkMonStatsScreen: ; 4d319 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 @@ INCLUDE "text/phone/extra2.asm" 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 diff --git a/mobile/battle_tower_5c.asm b/mobile/battle_tower_5c.asm index 4ab57ea2c..b5ef96fdd 100755 --- 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 @@ Function1700c4: ; 1700c4 Function170114: ; 170114 call InitBattleTowerChallengeRAM call .Function170121 - callba Function11805f + farcall Function11805f ret ; 170121 @@ -111,7 +111,7 @@ Function170139: ; 170139 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 @@ RunBattleTowerTrainer: ; 17024d 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 @@ ReadBTTrainerParty: ; 1702b7 ; 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 @@ ReadBTTrainerParty: ; 1702b7 .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 @@ ReadBTTrainerParty: ; 1702b7 .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 @@ ReadBTTrainerParty: ; 1702b7 ; 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 @@ Function1704e1: ; 1704e1 bit 7, a jr nz, .done call .DoJumptable - callba ReloadMapPart + farcall ReloadMapPart jr .loop .done @@ -1049,7 +1049,7 @@ Function170729: ; 170729 (5c:4729) BattleTowerAction $1d ret BattleTower_SaveOptions: ; 170737 (5c:4737) BattleTowerAction $1f - callba SaveOptions + farcall SaveOptions ret BattleTower_RandomlyChooseReward: ; 17073e (5c:473e) BattleTowerAction $1e @@ -1256,7 +1256,7 @@ BattleTower_CheckSaveFileExistsAndIsYours: ; 17089a BattleTowerAction $09 ld a, [wSaveFileExists] and a jr z, .nope - callba CompareLoadedAndSavedPlayerID + farcall CompareLoadedAndSavedPlayerID jr z, .yes xor a jr .nope @@ -1486,8 +1486,8 @@ Jumptable_1709e7: ; 1709e7 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 @@ BattleTowerAction_LevelCheck: ; 170ae8 (5c:4ae8) BattleTowerAction $18 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 @@ BattleTowerAction_UbersCheck: ; 170b16 (5c:4b16) BattleTowerAction $19 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 @@ BattleTowerAction_UbersCheck: ; 170b16 (5c:4b16) BattleTowerAction $19 ret Function_LoadOpponentTrainerAndPokemonsWithOTSprite: ; 0x170b44 - callba Function_LoadOpponentTrainerAndPokemons + farcall Function_LoadOpponentTrainerAndPokemons ld a, [rSVBK] push af ld a, $3 @@ -1681,7 +1681,7 @@ Function_LoadOpponentTrainerAndPokemonsWithOTSprite: ; 0x170b44 ld [hUsedSpriteIndex], a ld a, [hl] ld [hUsedSpriteTile], a - callba GetUsedSprite + farcall GetUsedSprite ret ; 170b90 @@ -1758,7 +1758,7 @@ ret_170bd2: ; 170bd2 ; 170bd3 SpecialCheckForBattleTowerRules: ; 170bd3 - callba CheckForBattleTowerRules + farcall CheckForBattleTowerRules jr c, .asm_170bde xor a jr .asm_170be0 diff --git a/mobile/fixed_words.asm b/mobile/fixed_words.asm index d98470095..5f6fc1808 100755 --- a/mobile/fixed_words.asm +++ b/mobile/fixed_words.asm @@ -329,10 +329,10 @@ Function11c1b9: ; 11c1b9 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 @@ EZChat_MasterLoop: ; 11c283 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 @@ Function11c4be: ; 11c4be (47:44be) hlcoord 0, 14, AttrMap ld bc, $28 call ByteFill - callba ReloadMapPart + farcall ReloadMapPart ret ; 11c4db (47:44db) @@ -918,7 +918,7 @@ Function11c618: ; 11c618 (47:4618) hlcoord 0, 6, AttrMap ld bc, $c8 call ByteFill - callba ReloadMapPart + farcall ReloadMapPart ret ; 11c62a (47:462a) @@ -1372,7 +1372,7 @@ BCD2String: ; 11c8c7 xor a ld [hDividend + 2], a push hl - callba Function11a80c + farcall Function11a80c pop hl ld a, [wcd63] add "0" @@ -1530,7 +1530,7 @@ Function11c9ab: ; 11c9ab (47:49ab) hlcoord 0, 6, AttrMap ld bc, $c8 call ByteFill - callba ReloadMapPart + farcall ReloadMapPart ret Function11c9bd: ; 11c9bd (47:49bd) @@ -1620,7 +1620,7 @@ Function11ca19: ; 11ca19 (47:4a19) add hl, de dec c jr nz, .asm_11ca22 - callba ReloadMapPart + farcall ReloadMapPart ret ; 11ca38 (47:4a38) @@ -2043,7 +2043,7 @@ Function11cdaa: ; 11cdaa (47:4daa) hlcoord 0, 12, AttrMap ld bc, 4 * SCREEN_WIDTH call ByteFill - callba ReloadMapPart + farcall ReloadMapPart ret ; 11cdc7 (47:4dc7) diff --git a/mobile/mobile_12.asm b/mobile/mobile_12.asm index 8b21bb6a6..d3c1c0be3 100755 --- a/mobile/mobile_12.asm +++ b/mobile/mobile_12.asm @@ -359,7 +359,7 @@ Function48304: ; 48304 (12:4304) 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 @@ Function48304: ; 48304 (12:4304) 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 @@ Function48c8e: ; 48c8e ld hl, $d02a ld d, h ld e, l - callba Function48c63 + farcall Function48c63 hlcoord 10, 7 call PlaceString call WaitBGMap diff --git a/mobile/mobile_12_2.asm b/mobile/mobile_12_2.asm index 37179c122..ba663cf86 100755 --- a/mobile/mobile_12_2.asm +++ b/mobile/mobile_12_2.asm @@ -311,17 +311,17 @@ Function4aa22: ; 4aa22 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 @@ Function4aad3: ; 4aad3 push bc push hl ld e, 0 - callba LoadMenuMonIcon + farcall LoadMenuMonIcon ld a, [hObjectStructIndexBuffer] inc a ld [hObjectStructIndexBuffer], a @@ -453,7 +453,7 @@ Function4aad3: ; 4aad3 jr nz, .loop call Function4aa7a - callba PlaySpriteAnimations + farcall PlaySpriteAnimations ret ; 4aafb @@ -683,7 +683,7 @@ Function4ac58: ; 4ac58 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 @@ UnknownText_0x4ad51: ; 0x4ad51 ; 0x4ad56 Function4ad56: ; 4ad56 - callba OpenPartyStats + farcall OpenPartyStats call WaitBGMap2 ret ; 4ad60 Function4ad60: ; 4ad60 - callba ManagePokemonMoves + farcall ManagePokemonMoves ret ; 4ad67 diff --git a/mobile/mobile_22.asm b/mobile/mobile_22.asm index 59a858bcd..416f62df8 100644 --- a/mobile/mobile_22.asm +++ b/mobile/mobile_22.asm @@ -99,7 +99,7 @@ Function8919e: ; 8919e (22:519e) Function891ab: ; 891ab call Mobile22_SetBGMapMode1 - callba ReloadMapPart + farcall ReloadMapPart call Mobile22_SetBGMapMode0 ret ; 891b8 @@ -218,9 +218,9 @@ Mobile22_SetBGMapMode1: ; 89240 Function89245: ; 89245 (22:5245) - callba TryLoadSaveFile + farcall TryLoadSaveFile ret c - callba _LoadData + farcall _LoadData and a ret @@ -777,7 +777,7 @@ Function8956f: ; 8956f 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 @@ Function897af: ; 897af 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 @@ Function89a0c: ; 89a0c jr c, .asm_89a1c ld d, h ld e, l - callba Function11c08f + farcall Function11c08f ret .asm_89a1c @@ -1793,14 +1793,14 @@ Function89a57: ; 89a57 Function89b00: ; 89b00 (22:5b00) - callba MG_Mobile_Layout_LoadPals + farcall MG_Mobile_Layout_LoadPals ret ; 89b07 (22:5b07) Function89b07: ; 89b07 call Mobile22_SetBGMapMode0 call DelayFrame - callba Function4a3a7 + farcall Function4a3a7 ret ; 89b14 @@ -1812,7 +1812,7 @@ Function89b14: ; 89b14 ; 89b1e Function89b1e: ; 89b1e (22:5b1e) - callba Function4a485 + farcall Function4a485 call Function89b00 ret @@ -1827,7 +1827,7 @@ Function89b28: ; 89b28 (22:5b28) Function89b3b: ; 89b3b (22:5b3b) call Mobile22_SetBGMapMode0 - callba Function48cda + farcall Function48cda ret Function89b45: ; 89b45 @@ -2180,7 +2180,7 @@ Function89d0d: ; 89d0d (22:5d0d) ld [rSVBK], a call SetPalettes - callba PrintMail_ + farcall PrintMail_ call Mobile22_SetBGMapMode1 ld c, 24 call DelayFrames @@ -2218,7 +2218,7 @@ Function89d75: ; 89d75 (22:5d75) push hl call Mobile22_SetBGMapMode0 call _hl_ - callba Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap + farcall Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap pop hl jr asm_89d90 @@ -2249,7 +2249,7 @@ asm_89d90: ; 89d90 (22:5d90) Function89dab: ; 89dab (22:5dab) call Mobile22_SetBGMapMode0 - callba MobileMenuJoypad + farcall MobileMenuJoypad call Mobile22_SetBGMapMode0 ld a, c ld hl, wMenuJoypadFilter @@ -2429,8 +2429,8 @@ Function89ee1: ; 89ee1 (22:5ee1) 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 @@ Function8a262: ; 8a262 (22:6262) 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 @@ Function8a313: ; 8a313 (22:6313) 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 @@ Function8a31c: ; 8a31c (22:631c) ret Function8a383: ; 8a383 (22:6383) - callba MobileMenuJoypad + farcall MobileMenuJoypad ld a, c ld hl, wMenuJoypadFilter and [hl] @@ -3656,7 +3656,7 @@ Function8a78c: ; 8a78c (22:678c) call Function891fe ld de, wd002 ld b, $5 - callba NamingScreen + farcall NamingScreen call OpenSRAMBank4 call Function8931b push bc @@ -3685,7 +3685,7 @@ Function8a7cb: ; 8a7cb (22:67cb) 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 @@ Function8aa73: ; 8aa73 (22:6a73) 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 @@ Function8ab3b: ; 8ab3b (22:6b3b) Function8ab93: ; 8ab93 (22:6b93) call ClearBGPalettes call LoadStandardMenuDataHeader - callba Function105688 + farcall Function105688 call ClearSprites call Function891fe call Function89b28 diff --git a/mobile/mobile_22_2.asm b/mobile/mobile_22_2.asm index 321998dc7..dfba961e4 100644 --- a/mobile/mobile_22_2.asm +++ b/mobile/mobile_22_2.asm @@ -48,7 +48,7 @@ Function8b35d: ; 8b35d Function8b363: ; 8b363 push bc - callba Mobile_AlwaysReturnNotCarry + farcall Mobile_AlwaysReturnNotCarry pop bc ret ; 8b36c diff --git a/mobile/mobile_40.asm b/mobile/mobile_40.asm index 79cba8310..a8a60343c 100644 --- a/mobile/mobile_40.asm +++ b/mobile/mobile_40.asm @@ -39,10 +39,10 @@ Function100022: ; 100022 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 @@ Function1000e8: ; 1000e8 ld hl, wcd29 bit 7, [hl] ret z - callba Function115dd3 + farcall Function115dd3 ld hl, wcd29 set 6, [hl] ret @@ -160,7 +160,7 @@ Function1000fa: ; 1000fa ld a, [wcd2b] and a jr nz, .asm_100117 - callba Function11619d + farcall Function11619d ld hl, wcd29 set 6, [hl] ret @@ -183,7 +183,7 @@ Function1000fa: ; 1000fa 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 @@ Function100144: ; 100144 ret z res 2, [hl] res 6, [hl] - callba HDMATransferTileMapToWRAMBank3 + farcall HDMATransferTileMapToWRAMBank3 ret ; 100163 @@ -318,8 +318,8 @@ Function10016f: ; 10016f Function10020b: ; 10020b xor a ld [wc303], a - callba FadeOutPalettes - callba Function106464 + farcall FadeOutPalettes + farcall Function106464 call HideSprites call DelayFrame @@ -328,7 +328,7 @@ Function10020b: ; 10020b ld a, $01 ld [rSVBK], a - callba DisplayMobileError + farcall DisplayMobileError pop af ld [rSVBK], a @@ -337,7 +337,7 @@ Function10020b: ; 10020b Function100232: ; 100232 push de - callba Function106464 + farcall Function106464 call Function3f20 call UpdateSprites hlcoord 1, 2 @@ -378,7 +378,7 @@ Function100276: ; 100276 ret .asm_100296 - callba Script_reloadmappart + farcall Script_reloadmappart ld c, $04 ret @@ -388,7 +388,7 @@ Function100276: ; 100276 ret .asm_1002a5 - callba Script_reloadmappart + farcall Script_reloadmappart call Function1002ed ld c, $03 ret @@ -412,15 +412,15 @@ Function1002c9: ; 1002c9 ld hl, wcd2a bit 0, [hl] ret z - callba CleanUpBattleRAM - callba LoadPokemonData + farcall CleanUpBattleRAM + farcall LoadPokemonData ret ; 1002dc Function1002dc: ; 1002dc ld a, MAPSETUP_LINKRETURN ld [hMapEntryMethod], a - callba RunMapSetupScript + farcall RunMapSetupScript xor a ld [hMapEntryMethod], a call LoadStandardFont @@ -428,8 +428,8 @@ Function1002dc: ; 1002dc ; 1002ed Function1002ed: ; 1002ed - callba LoadOW_BGPal7 - callba ApplyPals + farcall LoadOW_BGPal7 + farcall ApplyPals ld a, $01 ld [hCGBPalUpdate], a call DelayFrame @@ -440,21 +440,21 @@ Function100301: ; 100301 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 ; 100320 Function100320: ; 100320 - callba Mobile_ReloadMapPart + farcall Mobile_ReloadMapPart ret ; 100327 Function100327: ; 100327 - callba HDMATransferTileMapToWRAMBank3 + farcall HDMATransferTileMapToWRAMBank3 ret ; 100327 @@ -858,7 +858,7 @@ Function100545: ; 100545 ; 10054d Function10054d: ; 10054d - callba MobileMenuJoypad + farcall MobileMenuJoypad ld a, c ld hl, wMenuJoypadFilter and [hl] @@ -1500,7 +1500,7 @@ Function100902: ; 100902 call PrintNum ld de, SFX_TWO_PC_BEEPS call PlaySFX - callba ReloadMapPart + farcall ReloadMapPart ld c, $3c call DelayFrames ret @@ -1511,7 +1511,7 @@ Function100902: ; 100902 call PlaceString ld de, SFX_4_NOTE_DITTY call PlaySFX - callba ReloadMapPart + farcall ReloadMapPart ld c, 120 call DelayFrames ret @@ -1541,7 +1541,7 @@ Function100989: ; 100989 decoord 0, 0 call Function1009a5 call Function1009ae - callba ReloadMapPart + farcall ReloadMapPart ld hl, w3_dd68 decoord 0, 0, AttrMap call Function1009a5 @@ -1628,14 +1628,14 @@ Function1009f3: ; 1009f3 _LinkBattleSendReceiveAction: ; 100a09 call .StageForSend ld [wd431], a - callba PlaceWaitingText + farcall PlaceWaitingText ld a, [wLinkMode] cp LINK_MOBILE jr nz, .not_mobile call .MobileBattle_SendReceiveAction call Function100da5 - callba FinishBattleAnim + farcall FinishBattleAnim jr .done .not_mobile @@ -1711,7 +1711,7 @@ _LinkBattleSendReceiveAction: ; 100a09 .asm_100a92 call DelayFrame call GetJoypad - callba Function100382 + farcall Function100382 ld c, $01 ld b, $03 push bc @@ -1810,7 +1810,7 @@ Function100b12: ; 100b12 ld [wMenuCursorBuffer], a call Function100e72 call Function100b45 - callba InitPartyMenuBGPal7 + farcall InitPartyMenuBGPal7 call Function100ed4 ld a, [wMenuCursorBuffer] ld [wBattleMenuCursorBuffer], a @@ -1822,16 +1822,16 @@ Function100b45: ; 100b45 call Function100b7a .loop call Mobile_SetOverworldDelay - callba MobileMenuJoypad + farcall MobileMenuJoypad push bc - callba HDMATransferTileMapToWRAMBank3 + farcall HDMATransferTileMapToWRAMBank3 call Function100e2d pop bc jr c, .asm_100b6b ld a, [wMenuJoypadFilter] and c jr z, .loop - callba Mobile_GetMenuSelection + farcall Mobile_GetMenuSelection ret .asm_100b6b @@ -1848,11 +1848,11 @@ Function100b7a: ; 100b7a 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,14 +1861,14 @@ Function100b7a: ; 100b7a MobileMoveSelectionScreen: ; 100b9f xor a ld [wMoveSwapBuffer], a - callba CheckPlayerHasUsableMoves + farcall CheckPlayerHasUsableMoves ret z call Function100dd8 jp c, xor_a_dec_a call Function100e72 call .GetMoveSelection push af - callba InitPartyMenuBGPal7 + farcall InitPartyMenuBGPal7 call Function100ed4 pop af ret @@ -1880,12 +1880,12 @@ MobileMoveSelectionScreen: ; 100b9f 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 @@ Mobile_PartyMenuSelect: ; 100cb5 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 @@ MobileBattleMonMenu: ; 100d22 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 @@ Mobile_SetOverworldDelay: ; 100dd2 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 @@ MobileComms_CheckInactivityTimer: ; 100dfd 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 @@ MobileComms_CheckInactivityTimer: ; 100dfd 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 @@ Function100e2d: ; 100e2d 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 @@ Function100e2d: ; 100e2d 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 @@ Function100ec5 ; 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 @@ Function101265: ; 101265 Function10126c: ; 10126c call UpdateSprites - callba Script_reloadmappart + farcall Script_reloadmappart ld hl, UnknownText_0x1021f4 call Function1021e0 ret @@ -3042,7 +3042,7 @@ Jumptable_101297: ; 101297 ; 10138b Function10138b: ; 10138b - callba Function8adcc + farcall Function8adcc ld c, 0 jr c, .asm_101396 inc c @@ -3069,22 +3069,22 @@ Function1013aa: ; 1013aa call ClearBGPalettes call Call_ExitMenu call ReloadTilesetAndPalettes - callba Function106464 + farcall Function106464 call UpdateSprites call FinishExitMenu ret ; 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 @@ Function101418: ; 101418 Function10142c: ; 10142c ld a, $01 ld [wc305], a - callba Function115e18 + farcall Function115e18 ret ; 101438 @@ -3277,8 +3277,8 @@ Function1014b7: ; 1014b7 ; 1014ce Function1014ce: ; 1014ce - callba Function100720 - callba StartMobileInactivityTimer + farcall Function100720 + farcall StartMobileInactivityTimer ld a, [wMobileCommsJumptableIndex] inc a ld [wMobileCommsJumptableIndex], a @@ -3297,7 +3297,7 @@ Function1014e2: ; 1014e2 ; 1014f4 Function1014f4: ; 1014f4 - callba EnableMobile + farcall EnableMobile ld hl, wcd29 set 6, [hl] ld a, [wMobileCommsJumptableIndex] @@ -3346,7 +3346,7 @@ Function101537: ; 101537 ; 101544 Function101544: ; 101544 - callba StartMobileInactivityTimer + farcall StartMobileInactivityTimer ld a, $12 call Function3e32 ld a, [wMobileCommsJumptableIndex] @@ -3356,7 +3356,7 @@ Function101544: ; 101544 ; 101557 Function101557: ; 101557 - callba StartMobileInactivityTimer + farcall StartMobileInactivityTimer ld hl, wcd53 ld a, $08 call Function3e32 @@ -3371,7 +3371,7 @@ Function10156d: ; 10156d ret c Function101571: ; 101571 - callba Function10032e + farcall Function10032e ret c ret z ld a, e @@ -3388,7 +3388,7 @@ Function101571: ; 101571 ; 10158a Function10158a: ; 10158a - callba IncrementMobileInactivityTimerBy1Frame + farcall IncrementMobileInactivityTimerBy1Frame ld a, [wMobileInactivityTimerMinutes] cp $0a jr c, Function10156d @@ -3399,7 +3399,7 @@ Function10158a: ; 10158a Function10159d: ; 10159d ld de, wc608 - callba Function100edf + farcall Function100edf ld de, wc608 ld a, $05 ld hl, w5_d800 @@ -3414,7 +3414,7 @@ Function10159d: ; 10159d Function1015be: ; 1015be ld de, wc608 - callba Function100eed + farcall Function100eed ld de, wc608 ld a, $05 ld hl, w5_d800 @@ -3429,7 +3429,7 @@ Function1015be: ; 1015be Function1015df: ; 1015df ld de, wc608 - callba Function100ef4 + farcall Function100ef4 ld de, wc608 ld a, $05 ld hl, w5_d800 @@ -3449,7 +3449,7 @@ Function101600: ; 101600 ld a, $05 call FarCopyWRAM ld de, wc608 - callba Function100ee6 + farcall Function100ee6 ld a, [wMobileCommsJumptableIndex] inc a ld [wMobileCommsJumptableIndex], a @@ -3536,11 +3536,11 @@ Function10168a: ; 10168a 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 @@ Function1016f8: ; 1016f8 ; 101705 Function101705: ; 101705 - callba Function100382 + farcall Function100382 ld a, [wcd27] bit 7, a ret z @@ -3769,13 +3769,13 @@ Function1017f1: ; 1017f1 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 @@ Function101826: ; 101826 ret .asm_101844 - callba Function103654 + farcall Function103654 ld a, c ld hl, Unknown_101882 cp $01 @@ -3965,7 +3965,7 @@ Function101913: ; 101913 Function10194b: ; 10194b call DisableSpriteUpdates call ClearSprites - callba Function1021f9 + farcall Function1021f9 ld hl, wcd29 bit 3, [hl] jr nz, .asm_101967 @@ -3981,8 +3981,8 @@ Function10194b: ; 10194b ; 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 @@ _SelectMonsForMobileBattle: ; 10196d _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 @@ _StartMobileBattle: ; 1019ab ld bc, w5_dc0d ld de, w5_dc11 - callba GetMobileOTTrainerClass + farcall GetMobileOTTrainerClass pop af ld [rSVBK], a @@ -4071,9 +4071,9 @@ StartMobileBattle: ; 101a21 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 @@ StartMobileBattle: ; 101a21 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 @@ CopyOtherPlayersBattleMonSelection: ; 101a75 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 @@ Function101ab4: ; 101ab4 ; 101ac6 Function101ac6: ; 101ac6 - callba Function115d99 + farcall Function115d99 ld hl, wcd29 set 7, [hl] ld c, $02 @@ -4154,7 +4154,7 @@ Function101ac6: ; 101ac6 ; 101aed Function101aed: ; 101aed - callba Function115d99 + farcall Function115d99 ld hl, wcd29 set 7, [hl] ld c, $02 @@ -4185,7 +4185,7 @@ Function101b0f: ; 101b0f ; 101b2b Function101b2b: ; 101b2b - callba Function100579 + farcall Function100579 ld hl, wcd29 set 2, [hl] ld a, [wcd26] @@ -4238,7 +4238,7 @@ Function101b70: ; 101b70 ; 101b8f Function101b8f: ; 101b8f - callba Function1005c3 + farcall Function1005c3 ld hl, wcd29 set 2, [hl] ld a, [wcd26] @@ -4282,7 +4282,7 @@ Function101bc8: ; 101bc8 ; 101be5 Function101be5: ; 101be5 - callba Function100579 + farcall Function100579 ld hl, wcd29 set 2, [hl] ld a, [wcd26] @@ -4352,7 +4352,7 @@ Function101c50: ; 101c50 ; 101c62 Function101c62: ; 101c62 - callba Function115d99 + farcall Function115d99 ld hl, wcd29 set 7, [hl] ld c, $01 @@ -4374,7 +4374,7 @@ Function101c62: ; 101c62 ; 101c92 Function101c92: ; 101c92 - callba Function100675 + farcall Function100675 ld a, [wMobileCommsJumptableIndex] inc a ld [wMobileCommsJumptableIndex], a @@ -4520,7 +4520,7 @@ Function101d6b: ; 101d6b ; 101d7b Function101d7b: ; 101d7b - callba Function10138b + farcall Function10138b ld b, 0 ld hl, Unknown_101d8d add hl, bc @@ -4550,7 +4550,7 @@ Function101d95: ; 101d95 ; 101db2 Function101db2: ; 101db2 - callba Function103302 + farcall Function103302 call ExitMenu ld hl, wcd29 set 5, [hl] @@ -4701,7 +4701,7 @@ Function101e8d: ; 101e8d ; unreferenced Function101e98: ; 101e98 call ClearSprites - callba Function8adb3 + farcall Function8adb3 ret c ld hl, GameTimerPause set 7, [hl] @@ -4741,7 +4741,7 @@ Function101ecc: ; 101ecc Function101ed3: ; 101ed3 call Function1013aa - callba Function115d99 + farcall Function115d99 ld hl, wcd29 set 7, [hl] ret @@ -4758,7 +4758,7 @@ Function101ee4: ; 101ee4 ld a, [hli] ld d, [hl] ld e, a - callba Function100504 + farcall Function100504 ret ; 101ef5 @@ -4835,7 +4835,7 @@ String_102014: ; 102014 ; 10202c Function10202c: ; 10202c - callba Function115d99 + farcall Function115d99 ld hl, wcd29 set 7, [hl] ld c, $02 @@ -4930,7 +4930,7 @@ Function1020a8: ; 1020a8 call Function10209c ld c, $01 ld de, wdc42 - callba Function17a68f + farcall Function17a68f ret c call Function10208e call Function102068 @@ -4940,7 +4940,7 @@ Function1020a8: ; 1020a8 Function1020bf: ; 1020bf call ClearSprites - callba Function8aba9 + farcall Function8aba9 ld a, c and a jr z, .asm_1020e8 @@ -5074,7 +5074,7 @@ Function10219f: ; 10219f call FadeToMenu call Function10218d ld de, wc608 + 1 - callba Function8ac4e + farcall Function8ac4e call JoyWaitAorB call PlayClickSFX call Function1013aa @@ -5085,7 +5085,7 @@ Function1021b8: ; 1021b8 call FadeToMenu call Function10218d ld de, wPlayerMoveStruct - callba Function8ac70 + farcall Function8ac70 ld a, c ld [StringBuffer1], a push af @@ -5191,7 +5191,7 @@ Function10224b: ; 10224b .asm_10225e res 1, [hl] res 2, [hl] - callba Mobile_ReloadMapPart + farcall Mobile_ReloadMapPart scf ret ; 10226a @@ -5267,7 +5267,7 @@ Function1022ca: ; 1022ca ; 1022d0 Function1022d0: ; 1022d0 - callba Function10032e + farcall Function10032e ld a, [wcd2b] and a jr nz, .asm_1022f3 @@ -5278,7 +5278,7 @@ Function1022d0: ; 1022d0 sub c ld c, a ld b, $03 - callba AdvanceMobileInactivityTimerAndCheckExpired + farcall AdvanceMobileInactivityTimerAndCheckExpired jr c, .asm_1022f3 xor a ret @@ -5413,7 +5413,7 @@ Function1023c6: ; 1023c6 ld [CurPartyMon], a xor a ld [wPokemonWithdrawDepositParameter], a - callba RemoveMonFromPartyOrBox + farcall RemoveMonFromPartyOrBox ld hl, PartyCount inc [hl] ld a, [hli] @@ -5453,9 +5453,9 @@ Function102416: ; 102416 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 @@ Function102496: ; 102496 ; 1024a8 Function1024a8: ; 1024a8 - callba Function1009f3 + farcall Function1009f3 ret c Function1024af: ; 1024af @@ -5608,7 +5608,7 @@ Function10250c: ; 10250c 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 @@ Function1025e9: ; 1025e9 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 @@ Function102652: ; 102652 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 @@ Function1026b7: ; 1026b7 Function1026c8: ; 1026c8 call GetJoypad - callba Function1009f3 + farcall Function1009f3 ret c ld a, [wcd4a] ld hl, Jumptable_1026da @@ -5920,7 +5920,7 @@ Function102738: ; 102738 Function102754: ; 102754 call GetJoypad - callba Function1009f3 + farcall Function1009f3 ret c ld a, [wcd4a] ld hl, Jumptable_102766 @@ -6017,7 +6017,7 @@ Function1027eb: ; 1027eb 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 @@ Function1028e8: ; 1028e8 ld hl, wcd4b res 6, [hl] ld [wcd50], a - callba StartMobileInactivityTimer + farcall StartMobileInactivityTimer ld a, 0 ld [wcd4a], a ret @@ -6162,7 +6162,7 @@ Function1028e8: ; 1028e8 Function1028fc: ; 1028fc call GetJoypad - callba Function1009f3 + farcall Function1009f3 jr nc, .asm_102909 and a ret @@ -6238,7 +6238,7 @@ Function10295d: ; 10295d ; 10296e Function10296e: ; 10296e - callba Function100382 + farcall Function100382 and a ld a, [wcd27] bit 7, a @@ -6251,7 +6251,7 @@ Function10296e: ; 10296e ; 102984 Function102984: ; 102984 - callba Function100382 + farcall Function100382 and a ld a, [wcd27] bit 7, a @@ -6313,7 +6313,7 @@ Function1029cf: ; 1029cf 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 @@ Function1029cf: ; 1029cf ; 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 @@ Function102a3b: ; 102a3b 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 @@ Function102a3b: ; 102a3b call GetPartyLocation ld b, h ld c, l - callba GetCaughtGender + farcall GetCaughtGender ld a, c ld [wOTTrademonCaughtData], a ret @@ -6469,11 +6469,11 @@ Function102b12: ; 102b12 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 @@ Function102b32: ; 102b32 ld [CurPartyMon], a ld a, $01 ld [wForceEvolution], a - callba EvolvePokemon + farcall EvolvePokemon call Function102d9a call Function102dd3 call Function102dec @@ -6558,7 +6558,7 @@ Function102bac: ; 102bac ld [CurPartyMon], a call LowVolume call ClearSprites - callba _MobileStatsScreenInit + farcall _MobileStatsScreenInit ld a, [CurPartyMon] inc a ld [wMenuCursorY], a @@ -6645,7 +6645,7 @@ Function102c3b: ; 102c3b ; 102c48 Function102c48: ; 102c48 - callba Function10165a + farcall Function10165a ld a, 0 call GetSRAMBank ld hl, $a600 @@ -6797,7 +6797,7 @@ Function102d48: ; 102d48 ld hl, PartyMon1DVs call AddNTimes predef GetUnownLetter - callba UpdateUnownDex + farcall UpdateUnownDex ld a, [wFirstUnownSeen] and a jr nz, .asm_102d98 @@ -6818,7 +6818,7 @@ Function102d9a: ; 102d9a hlcoord 0, 0, AttrMap ld bc, SCREEN_WIDTH * SCREEN_HEIGHT call ByteFill - callba HDMATransferAttrMapAndTileMapToWRAMBank3 + farcall HDMATransferAttrMapAndTileMapToWRAMBank3 ret ; 102db7 @@ -6836,7 +6836,7 @@ Function102dc3: ; 102dc3 ld c, 18 ld d, h ld e, l - callba _LinkTextbox + farcall _LinkTextbox ret ; 102dd3 @@ -6846,7 +6846,7 @@ Function102dd3: ; 102dd3 ld hl, VTiles0 lb bc, BANK(GFX_1032a2), 4 call Get2bpp - callba __LoadTradeScreenBorder + farcall __LoadTradeScreenBorder call EnableLCD ret ; 102dec @@ -6857,7 +6857,7 @@ Function102dec: ; 102dec ld bc, 4 palettes ld a, $05 call FarCopyWRAM - callba Function49742 + farcall Function49742 call SetPalettes call DelayFrame ret @@ -6880,7 +6880,7 @@ Function102e07: ; 102e07 ld c, 11 ld d, h ld e, l - callba _LinkTextbox + farcall _LinkTextbox .okay ld de, .waiting @@ -6905,8 +6905,8 @@ Function102e3e: ; 102e3e ; 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 @@ Function103309: ; 103309 ld [wd1ee], a call Function1034be call UpdateSprites - callba HDMATransferAttrMapAndTileMapToWRAMBank3 + farcall HDMATransferAttrMapAndTileMapToWRAMBank3 ld a, $01 ld [wd1f0], a call Function10339a @@ -7413,7 +7413,7 @@ Function103362: ; 103362 call Function1033af call Function10339a call Function10342c - callba HDMATransferTileMapToWRAMBank3 + farcall HDMATransferTileMapToWRAMBank3 ld a, [Buffer2] bit 7, a jr z, .asm_103362 @@ -7707,7 +7707,7 @@ String_1035c1: db "けってい@" ; 1035c6 Function1035c6: ; 1035c6 - callba Function10138b + farcall Function10138b ld b, 0 ld hl, Unknown_1035d7 add hl, bc @@ -7799,7 +7799,7 @@ MenuData2_103648: ; 103648 ; 103654 Function103654: ; 103654 - callba Mobile_AlwaysReturnNotCarry + farcall Mobile_AlwaysReturnNotCarry bit 7, c jr nz, .asm_103666 ld hl, wcd2a @@ -7815,14 +7815,14 @@ Function103654: ; 103654 ; 10366e Mobile_SelectThreeMons: ; 10366e - callba Mobile_AlwaysReturnNotCarry + farcall Mobile_AlwaysReturnNotCarry bit 7, c jr z, .asm_10369b ld hl, UnknownText_0x10375d 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 @@ Mobile_SelectThreeMons: ; 10366e jr .asm_1036b5 .asm_1036d9 - callba CheckForMobileBattleRules + farcall CheckForMobileBattleRules jr nc, .asm_1036e6 call JoyWaitAorB jr .asm_1036f4 @@ -7899,7 +7899,7 @@ Function103700: ; 103700 ld hl, SwarmFlags bit 4, [hl] jr z, .asm_10370f - callba Function1008a6 + farcall Function1008a6 .asm_10370f ld a, c @@ -8003,7 +8003,7 @@ Function10378c: ; 10378c .already_set push bc - callba Link_SaveGame + farcall Link_SaveGame pop bc jr c, .failed_to_save ld a, $01 @@ -8011,7 +8011,7 @@ Function10378c: ; 10378c ld a, c and a ret z - callba Function1006fd + farcall Function1006fd ret .failed_to_save @@ -8089,10 +8089,10 @@ UnknownText_0x10381e: ; 0x10381e ; 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 @@ Function10383c: ; 10383c 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 @@ UnknownText_0x103876: ; 0x103876 ; 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 diff --git a/mobile/mobile_41.asm b/mobile/mobile_41.asm index 9ab9f7ed2..7e1d20db6 100755 --- a/mobile/mobile_41.asm +++ b/mobile/mobile_41.asm @@ -1027,7 +1027,7 @@ Function106464:: ; 106464 ld hl, VTiles2 tile $6b ld b, $f ; XXX no graphics at 0f:40b0 call Get2bpp - callba LoadFrame + farcall LoadFrame ret ; 10649b diff --git a/mobile/mobile_42.asm b/mobile/mobile_42.asm index 98bbcf485..6b9db7741 100644 --- a/mobile/mobile_42.asm +++ b/mobile/mobile_42.asm @@ -175,7 +175,7 @@ Function1080b7: ; 1080b7 ld [hWX], a ld a, $90 ld [hWY], a - callba ClearSpriteAnims + farcall ClearSpriteAnims call DelayFrame @@ -237,7 +237,7 @@ Function108157: ; 108157 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 @@ MobileTradeAnim_JumptableLoop: ; 10824b ld [hWY], a call LoadStandardFont call LoadFontsBattleExtra - callba MobileFunc_106462 - callba Function106464 + farcall MobileFunc_106462 + farcall Function106464 scf ret ; 10827b @@ -433,7 +433,7 @@ EndMobileTradeAnim: ; 1082c6 WaitMobileTradeSpriteAnims: ; 1082cc .loop push bc - callba PlaySpriteAnimations + farcall PlaySpriteAnimations pop bc call DelayFrame dec c @@ -443,9 +443,9 @@ WaitMobileTradeSpriteAnims: ; 1082cc Function1082db: ; 1082db .loop - callba PlaySpriteAnimations - callba SetUpPokeAnim - callba HDMATransferTileMapToWRAMBank3 + farcall PlaySpriteAnimations + farcall SetUpPokeAnim + farcall HDMATransferTileMapToWRAMBank3 jr nc, .loop ret ; 1082f0 @@ -464,7 +464,7 @@ Function1082fa: ; 1082fa call Function108b78 push hl push bc - callba PlaySpriteAnimations + farcall PlaySpriteAnimations pop bc pop hl call DelayFrame @@ -552,7 +552,7 @@ MobileTradeAnim_ShowOTMonFromTrade: ; 10839b ld de, VTiles2 call Function108201 call EnableLCD - callba DeinitializeAllSprites + farcall DeinitializeAllSprites xor a ld [hSCX], a ld [hSCY], a @@ -687,7 +687,7 @@ MobileTradeAnim_ShowOTMonFromGTS: ; 1084d7 ld de, VTiles2 call Function108201 call EnableLCD - callba DeinitializeAllSprites + farcall DeinitializeAllSprites call DelayFrame ld de, TradeBallGFX ld hl, VTiles0 @@ -756,7 +756,7 @@ MobileTradeAnim_GetOddEgg: ; 108589 ld de, VTiles2 call Function108201 call EnableLCD - callba DeinitializeAllSprites + farcall DeinitializeAllSprites call DelayFrame ld de, TradeBallGFX ld hl, VTiles0 @@ -813,7 +813,7 @@ MobileTradeAnim_GetOddEgg: ; 108589 ; 108638 MobileTradeAnim_02: ; 108638 - callba DeinitializeAllSprites + farcall DeinitializeAllSprites call ClearBGPalettes call ClearSprites call ClearTileMap @@ -849,7 +849,7 @@ MobileTradeAnim_02: ; 108638 ; 108689 MobileTradeAnim_10: ; 108689 - callba DeinitializeAllSprites + farcall DeinitializeAllSprites call ClearBGPalettes call ClearSprites call ClearTileMap @@ -1097,7 +1097,7 @@ MobileTradeAnim_GetTrademon1: ; 108863 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_GetTrademon3: ; 10890a MobileTradeAnim_0f: ; 108919 ld c, 40 call WaitMobileTradeSpriteAnims - callba DeinitializeAllSprites + farcall DeinitializeAllSprites call ClearBGPalettes call ClearSprites call ClearTileMap @@ -1571,7 +1571,7 @@ Function108b98: ; 108b98 ; 108bbd MobileTradeAnim_DeleteSprites: ; 108bbd - callba DeinitializeAllSprites + farcall DeinitializeAllSprites call ClearSprites ret ; 108bc7 @@ -1590,7 +1590,7 @@ Function108bc7: ; 108bc7 (42:4bc7) ret .delete - callba DeinitializeSprite + farcall DeinitializeSprite ret Function108be0: ; 108be0 (42:4be0) diff --git a/mobile/mobile_45.asm b/mobile/mobile_45.asm index 6c581de87..b804bb473 100644 --- a/mobile/mobile_45.asm +++ b/mobile/mobile_45.asm @@ -6838,7 +6838,7 @@ Unknown_117356: ; 117356 SECTION "Mobile Stadium", ROMX Special_GiveOddEgg: ; 117656 - callba GiveOddEgg + farcall GiveOddEgg ret ; 11765d @@ -6898,9 +6898,9 @@ Function117699: ; 117699 (45:7699) 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 @@ Function1176ee: ; 1176ee (45:76ee) 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 @@ Jumptable_117728: ; 117728 (45:7728) Function117738: ; 117738 (45:7738) - callba Function171ccd + farcall Function171ccd depixel 6, 3 ld a, $1d call _InitSpriteAnimStruct @@ -7004,7 +7004,7 @@ Function117764: ; 117764 (45:7764) ret Function117764_select: ; 1177a5 (45:77a5) - callba Function171cf0 + farcall Function171cf0 ret Function117764_start: ; 1177ac (45:77ac) @@ -7176,7 +7176,7 @@ Function1178aa: ; 1178aa (45:78aa) call LoadMenuDataHeader call MenuBox call MenuBoxCoord2Tile - callba ReloadMapPart + farcall ReloadMapPart hlcoord 16, 8 ld de, YessNoString_1179c5 call PlaceString @@ -7278,7 +7278,7 @@ Function117984: ; 117984 (45:7984) call LoadMenuDataHeader call MenuBox call MenuBoxCoord2Tile - callba ReloadMapPart + farcall ReloadMapPart hlcoord 1, 14 ld de, NotAPokemonPasswordString call PlaceString @@ -7379,8 +7379,8 @@ Function117a94: ; 0x117a94 ld [wcf66], a call ClearBGPalettes call ClearSprites - callba Function172e78 - callba HDMATransferAttrMapAndTileMapToWRAMBank3 + farcall Function172e78 + farcall HDMATransferAttrMapAndTileMapToWRAMBank3 ret ; 0x117ab4 @@ -7388,9 +7388,9 @@ Function117a94: ; 0x117a94 Function117ab4: ; 0x117ab4 call ClearBGPalettes call ClearSprites - callba Function172e78 - callba Function172eb9 - callba ReloadMapPart + farcall Function172e78 + farcall Function172eb9 + farcall ReloadMapPart ret ; 0x117acd @@ -7401,7 +7401,7 @@ Function117acd: ; 0x117acd bit 7, a jr nz, .asm_117ae2 call Function117ae9 - callba HDMATransferAttrMapAndTileMapToWRAMBank3 + farcall HDMATransferAttrMapAndTileMapToWRAMBank3 jr Function117acd .asm_117ae2 @@ -7431,7 +7431,7 @@ Function117ae9: ; 0x117ae9 dw Function117c4a Function117b06: - callba Function172eb9 + farcall Function172eb9 ld a, $10 ld [wcf64], a jp MobileStudium_JumptableIncrement @@ -7508,13 +7508,13 @@ Function117b4f: 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 @@ Function117bb6: call Function117c89 ld a, $1 ld [hBGMapMode], a - callba Function118284 + farcall Function118284 call ClearSprites ld a, [wc300] and a @@ -7533,7 +7533,7 @@ Function117bb6: .asm_117bd0 ld a, $2 ld [wc303], a - callba DisplayMobileError + farcall DisplayMobileError ld a, $80 ld [wJumptableIndex], a ret @@ -7580,7 +7580,7 @@ Function117bb6: .asm_117c20 pop af ld [rSVBK], a - callba Function172eb9 + farcall Function172eb9 ld a, [rSVBK] push af ld a, $3 @@ -7601,7 +7601,7 @@ Function117c4a: call LoadMenuDataHeader call MenuBox call MenuBoxCoord2Tile - callba ReloadMapPart + farcall ReloadMapPart ld hl, MobileStadiumSuccessText call PrintText ld a, [rSVBK] diff --git a/mobile/mobile_45_sprite_engine.asm b/mobile/mobile_45_sprite_engine.asm index 8493a3cf8..e2382fc38 100755 --- a/mobile/mobile_45_sprite_engine.asm +++ b/mobile/mobile_45_sprite_engine.asm @@ -491,7 +491,7 @@ Function1161d5: ; 1161d5 pop af ld [rSVBK], a - callba ReloadMapPart + farcall ReloadMapPart ld a, $8 ld [MusicFade], a ld de, MUSIC_MOBILE_ADAPTER @@ -515,7 +515,7 @@ MenuDataHeader_11628c: ; 11628c ; 116294 Function116294: ; 116294 - callba Function170d02 + farcall Function170d02 ld a, [$c319] inc a ld [$c319], a @@ -541,7 +541,7 @@ Function116294: ; 116294 ; 1162cb Function1162cb: ; 1162cb - callba Function170cc6 + farcall Function170cc6 ld a, [$c319] inc a ld [$c319], a @@ -676,7 +676,7 @@ Function11636e: ; 11636e call UpdateSprites pop af ld [rSVBK], a - callba ReloadMapPart + farcall ReloadMapPart ld a, $8 ld [MusicFade], a ld a, [wMapMusic] @@ -700,7 +700,7 @@ Function1163c0: ; 1163c0 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 @@ Function1163c0: ; 1163c0 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 @@ Function1163c0: ; 1163c0 ; 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] diff --git a/mobile/mobile_46.asm b/mobile/mobile_46.asm index 19b255c34..6e0aed218 100755 --- a/mobile/mobile_46.asm +++ b/mobile/mobile_46.asm @@ -33,8 +33,8 @@ asm_11800b .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 @@ Function11805f: ; 11805f .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 @@ Function1180b8: ; 1180b8 .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 @@ Function118125: ; 118125 .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 @@ Function118180: ; 118180 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 @@ Function1181da: ; 1181da .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 @@ Function118233: ; 118233 .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 @@ Function118284: ; 118284 .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 @@ Function1182d5: ; 1182d5 .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 @@ Function118329: ; 118329 .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 @@ Function11837a: ; 11837a .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 @@ BattleTowerRoomMenu_InitRAM: ; 1183cb 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 @@ Function118903: ; 118903 (46:4903) 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 @@ Function118d35: ; 118d35 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 @@ Function118ded: ; 118ded push af ld a, $1 ld [rSVBK], a - callba Function11b93b + farcall Function11b93b pop af ld [rSVBK], a @@ -3259,7 +3259,7 @@ Function119800: ; 119800 ld a, $1 ld [rSVBK], a call FadeToMenu - callba Function10803d + farcall Function10803d call Function11a9ce call RestartMapMusic ld a, $3 @@ -3272,7 +3272,7 @@ Function119800: ; 119800 ld [wcf64], a pop af ld [wJumptableIndex], a - callba Function115dc3 + farcall Function115dc3 jp BattleTowerRoomMenu_IncrementJumptable ; 11984e @@ -3283,7 +3283,7 @@ Function11984e: ; 11984e 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 @@ Function11984e: ; 11984e 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 @@ Function11984e: ; 11984e ld [wcf64], a pop af ld [wJumptableIndex], a - callba Function115dc3 + farcall Function115dc3 jp BattleTowerRoomMenu_IncrementJumptable .asm_1198a0 @@ -3317,7 +3317,7 @@ Function11984e: ; 11984e jp BattleTowerRoomMenu_IncrementJumptable .asm_1198a8 - callba Function17005a + farcall Function17005a ld a, [wJumptableIndex] push af ld a, [wcf64] @@ -3329,7 +3329,7 @@ Function11984e: ; 11984e 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 @@ Function11984e: ; 11984e ld [wcf64], a pop af ld [wJumptableIndex], a - callba Function115dc3 + farcall Function115dc3 jp BattleTowerRoomMenu_IncrementJumptable ; 1198ee @@ -3386,7 +3386,7 @@ Function1198f7: ; 119937 Function119937: ; 119937 - callba Function1707f4 + farcall Function1707f4 jp BattleTowerRoomMenu_IncrementJumptable ; 119940 @@ -4366,8 +4366,8 @@ Function119f98: ; 119f98 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,17 +4383,17 @@ Function119f98: ; 119f98 ld [wc30d], a ld a, $1 ld [wc314], a - callba ReloadMapPart + farcall ReloadMapPart and a ret .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 @@ Function11a00e: ; 11a00e ld a, $1 ld [rSVBK], a call FadeToMenu - callba Function11765d + farcall Function11765d call Function11a9ce ld a, $3 ld [rSVBK], a @@ -4444,9 +4444,9 @@ Function11a00e: ; 11a00e 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 @@ Function11a00e: ; 11a00e 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 @@ Function11a0ca: ; 11a0ca 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 @@ Function11a0ca: ; 11a0ca Function11a113: ; 11a113 call Function11a63c ld c, $1 - callba Function115e18 + farcall Function115e18 hlcoord 4, 2 ld de, String_11a6c8 call PlaceString @@ -4580,7 +4580,7 @@ Function11a192: ; 11a192 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 @@ Function11a192: ; 11a192 .asm_11a1b6 call ExitMenu - callba ReloadMapPart + farcall ReloadMapPart ld a, [wMobileInactivityTimerSeconds] ld [wcf66], a ld [wcd80], a @@ -4721,7 +4721,7 @@ BattleTowerRoomMenu2_UpdateYesNoMenu: ; 11a235 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 @@ BattleTowerRoomMenu2_UpdateYesNoMenu: ; 11a235 .exit_no_carry call ExitMenu - callba ReloadMapPart + farcall ReloadMapPart and a ret ; 11a2cf @@ -4775,7 +4775,7 @@ MenuDataHeader_11a2de: ; 11a2de Function11a2e6: ; 11a2e6 call Function11a63c ld c, $2 - callba Function115e18 + farcall Function115e18 hlcoord 4, 2 ld de, String_11a71e call PlaceString @@ -4822,8 +4822,8 @@ Function11a33a: ; 11a33a .asm_11a346 call ExitMenu - callba ReloadMapPart - callba Function115dc3 + farcall ReloadMapPart + farcall Function115dc3 and a ret ; 11a357 @@ -4866,7 +4866,7 @@ Function11a38d: ; 11a38d 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 @@ Function11a38d: ; 11a38d .asm_11a3b1 call ExitMenu - callba ReloadMapPart + farcall ReloadMapPart ld a, [wMobileInactivityTimerSeconds] ld [wcf66], a ld [wcd80], a @@ -4941,7 +4941,7 @@ Function11a41b: ; 11a41b 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 @@ Function11a41b: ; 11a41b .asm_11a43f call ExitMenu - callba ReloadMapPart + farcall ReloadMapPart ld a, $1c ld [wcf66], a ld [wcd80], a @@ -5012,7 +5012,7 @@ Function11a49e: ; 11a49e 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 @@ Function11a49e: ; 11a49e .asm_11a4c7 call ExitMenu - callba ReloadMapPart + farcall ReloadMapPart ld a, [wMobileInactivityTimerFrames] ld [wcf66], a ld [wcd80], a @@ -5059,7 +5059,7 @@ Function11a4fe: ; 11a4fe 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 @@ Function11a4fe: ; 11a4fe .asm_11a522 call ExitMenu - callba ReloadMapPart + farcall ReloadMapPart ld a, [wMobileInactivityTimerSeconds] ld [wcf66], a ld [wcd80], a @@ -5098,7 +5098,7 @@ Function11a536: ; 11a536 call Function11a9f0 jr nz, .asm_11a562 call ExitMenu - callba ReloadMapPart + farcall ReloadMapPart .asm_11a562 scf @@ -5174,10 +5174,10 @@ Function11a5b9: ; 11a5b9 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 @@ Function11a5f5: ; 11a5f5 hlcoord 15, 7 ld a, $ed ld [hl], a - callba ReloadMapPart + farcall ReloadMapPart ret ; 11a63c @@ -5578,10 +5578,10 @@ Function11a9ce: ; 11a9ce 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 @@ Text_ThisBattleRoomPleaseWait: ; 0x11ac1f Function11ac3e: ; 11ac3e call SpeechTextBox call FadeToMenu - callab ClearSpriteAnims2 + callfar ClearSpriteAnims2 call Function11ac51 call CloseSubmenu ret @@ -5773,8 +5773,8 @@ Function11ac51: ; 11ac51 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 @@ Function11ad1b: ; 11ad1b call ClearBGPalettes call ClearSprites call ClearTileMap - callba Function17c000 + farcall Function17c000 ld a, [wMenuCursorY] ld [wcd82], a dec a @@ -5872,7 +5872,7 @@ Function11ad1b: ; 11ad1b ld [wcd30], a ld a, $2 ld [wc7d4], a - callba Pokedex_OrderMonsByMode + farcall Pokedex_OrderMonsByMode ret ; 11ad6e @@ -5917,7 +5917,7 @@ Function11ad95: ; 11ad95 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 @@ Function11adc4: .asm_11ae2e call ExitMenu - callba ReloadMapPart + farcall ReloadMapPart ret ; 11ae38 @@ -6034,7 +6034,7 @@ Function11ae4e: ; 11ae4e 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 @@ Function11ae98: .asm_11aef7 call ExitMenu call ExitMenu - callba ReloadMapPart + farcall ReloadMapPart ret ; 11af04 @@ -6125,7 +6125,7 @@ Function11af04: ; 11af04 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 @@ Function11af4e: .asm_11afaa call ExitMenu call ExitMenu - callba ReloadMapPart + farcall ReloadMapPart ret ; 11afb7 @@ -6697,7 +6697,7 @@ Function11b242: ; 11b242 call PlaceString xor a ld [MonType], a - callba GetGender + farcall GetGender hlcoord 1, 4 ld a, [CurPartySpecies] ld bc, wcd2f @@ -6771,7 +6771,7 @@ Function11b295: ; 11b295 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 @@ Function11b5c0: ; 11b5c0 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 @@ Function11b66d: ; 11b66d jr .asm_11b6b0 .asm_11b691 - callba Function17081d + farcall Function17081d ld a, [ScriptVar] and a jr z, .asm_11b6b0 @@ -7486,63 +7486,63 @@ Function11b6b4: ; 11b6b4 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 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 @@ Function11b7e5: ; 11b7e5 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 @@ Function11b7e5: ; 11b7e5 ; 11b879 Function11b879: ; 11b879 - callba BattleTower_CheckSaveFileExistsAndIsYours + farcall BattleTower_CheckSaveFileExistsAndIsYours ld a, [ScriptVar] and a ret z @@ -7787,7 +7787,7 @@ Function11b93b: ; 11b93b ld a, $c64b / $100 ld [wMobileMonMailPointerBuffer + 1], a call AddMobileMonToParty - callba SaveAfterLinkTrade + farcall SaveAfterLinkTrade ret ; 11b98f @@ -7896,7 +7896,7 @@ AddMobileMonToParty: ; 11b98f ; 11ba38 Function11ba38: ; 11ba38 - callba CheckCurPartyMonFainted + farcall CheckCurPartyMonFainted ret c xor a ld [ScriptVar], a diff --git a/mobile/mobile_5b.asm b/mobile/mobile_5b.asm index 041c071b4..08cb86426 100755 --- a/mobile/mobile_5b.asm +++ b/mobile/mobile_5b.asm @@ -15,10 +15,10 @@ Function16c000: ; 16c000 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 @@ Function16c000: ; 16c000 ld [wd003], a .loop call DelayFrame - callba Function10635c + farcall Function10635c ld a, [wd002] ld hl, .Jumptable rst JumpTable @@ -192,7 +192,7 @@ MobileSystemSplashScreen_InitGFX: ; 16c108 ld bc, 8 ld a, $5 call FarCopyWRAM - callba ApplyPals + farcall ApplyPals ret ; 16c145 @@ -331,7 +331,7 @@ Function16c943: ; 16c943 ld a, e cp $8 jr nz, .asm_16c969 - callba ApplyPals + farcall ApplyPals call SetPalettes ld a, [rSVBK] push af @@ -361,7 +361,7 @@ Function16ca11: ; 16ca11 ld a, [wd003] and a jr nz, .asm_16ca1d - callba ApplyPals + farcall ApplyPals .asm_16ca1d ld a, [rSVBK] @@ -433,7 +433,7 @@ Function16ca11: ; 16ca11 ld a, e cp $8 jr nz, .asm_16ca28 - callba ApplyPals + farcall ApplyPals call SetPalettes ld a, [rSVBK] push af @@ -686,7 +686,7 @@ Function16cbd1: ; 16cbd1 ld bc, 2 ld a, $5 call FarCopyWRAM - callba ApplyPals + farcall ApplyPals ld a, $1 ld [hCGBPalUpdate], a ret diff --git a/mobile/mobile_5c.asm b/mobile/mobile_5c.asm index 3294cc3dc..005bb1a1b 100755 --- a/mobile/mobile_5c.asm +++ b/mobile/mobile_5c.asm @@ -24,7 +24,7 @@ Function170000: ; 170000 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 @@ Function17005a: ; 17005a 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 @@ Function1719c8: ; 1719c8 (5c:59c8) ret Function1719d6: ; 1719d6 (5c:59d6) - callba BattleTowerRoomMenu_InitRAM + farcall BattleTowerRoomMenu_InitRAM call Function1719ed ld a, [rSVBK] push af @@ -343,9 +343,9 @@ Function1719ed: ; 1719ed (5c:59ed) 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 @@ Function171a11: ; 171a11 (5c:5a11) 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 @@ Function171a5d: ; 171a5d (5c:5a5d) 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 @@ Function171a5d: ; 171a5d (5c:5a5d) ret Function171a95: ; 171a95 (5c:5a95) - callba Function171ccd + farcall Function171ccd hlcoord 2, 8 ld de, String_171aa7 call PlaceString @@ -457,7 +457,7 @@ Function171aec: ; 171aec (5c:5aec) 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 @@ Function171beb: ; 171beb (5c:5beb) call LoadMenuDataHeader call MenuBox call MenuBoxCoord2Tile - callba ReloadMapPart + farcall ReloadMapPart hlcoord 1, 14 ld de, String_171c73 call PlaceString @@ -654,11 +654,11 @@ Function171c41: ; 171c41 (5c:5c41) 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 diff --git a/mobile/mobile_5e.asm b/mobile/mobile_5e.asm index baf247fe2..c8cae6654 100644 --- a/mobile/mobile_5e.asm +++ b/mobile/mobile_5e.asm @@ -39,12 +39,12 @@ Function17a6a8: ; 17a6a8 (5e:66a8) 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 @@ Function17a78f: ; 17a78f (5e:678f) 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) diff --git a/mobile/mobile_5f.asm b/mobile/mobile_5f.asm index 9b0c5455b..cf779e56a 100644 --- a/mobile/mobile_5f.asm +++ b/mobile/mobile_5f.asm @@ -77,7 +77,7 @@ Function17c000: ; 17c000 ld [rVBK], a call EnableLCD - callba ReloadMapPart + farcall ReloadMapPart ret ; 17c083 @@ -290,21 +290,21 @@ Function17d0f3: ; 17d0f3 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 @@ Function17d1f1: ; 17d1f1 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 @@ MenuData2_ChallengeExplanationCancel: ; 17d297 Function17d2b6: ; 17d2b6 call Function17d2c0 - callba Function1181da + farcall Function1181da ret ; 17d2c0 @@ -627,7 +627,7 @@ Function17d370: ; 17d370 call ClearBGPalettes call ClearSprites call ClearScreen - callba ReloadMapPart + farcall ReloadMapPart call DisableLCD ld hl, VTiles1 tile $6e ld de, $c608 @@ -673,7 +673,7 @@ Function17d3f6: ; 17d3f6 call ClearBGPalettes call ClearSprites call ClearScreen - callba ReloadMapPart + farcall ReloadMapPart Function17d405: call DisableLCD @@ -719,7 +719,7 @@ Function17d45a: ; 17d45a bit 7, a jr nz, .asm_17d46f call Function17d474 - callba ReloadMapPart + farcall ReloadMapPart jr .asm_17d45a .asm_17d46f @@ -921,7 +921,7 @@ Function17d48d: ; 17d48d call Function17e451 call Function17e55b call Function17e5af - callba ReloadMapPart + farcall ReloadMapPart jp Function17e438 ; 17d5be @@ -1330,7 +1330,7 @@ Function17d833: ; 17d833 add hl, de ld e, l ld d, h - callba Function11c08f + farcall Function11c08f call Function17e349 ret ; 17d85d @@ -1422,7 +1422,7 @@ Function17d85d: ; 17d85d 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 @@ Function17d902: ; 17d902 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 @@ Function17d93a: ; 17d93a 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 @@ Function17d93a: ; 17d93a 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 @@ Function17d98b: ; 17d98b 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 @@ Function17d98b: ; 17d98b ld d, a push de ld de, VTiles2 - callba GetTrainerPic + farcall GetTrainerPic pop hl decoord 0, 0 add hl, de @@ -2340,7 +2340,7 @@ Function17ded9: ; 17ded9 push hl push bc predef TryAddMonToParty - callba SetCaughtData + farcall SetCaughtData pop bc pop hl bit 1, b @@ -2378,7 +2378,7 @@ Function17ded9: ; 17ded9 ld a, [hli] ld b, a push hl - callba SetGiftPartyMonCaughtData + farcall SetGiftPartyMonCaughtData pop hl pop bc jr .asm_17df5e @@ -2444,7 +2444,7 @@ Function17ded9: ; 17ded9 ld e, l push hl ld b, $0 - callba CalcPkmnStats + farcall CalcPkmnStats ld a, [PartyCount] dec a ld hl, PartyMon1HP @@ -2532,9 +2532,9 @@ Function17e026: ; 17e026 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 @@ Function17e026: ; 17e026 ld b, a push hl call CloseSRAM - callba SetGiftBoxMonCaughtData + farcall SetGiftBoxMonCaughtData ld a, $1 call GetSRAMBank pop hl @@ -2702,7 +2702,7 @@ Function17e133: ; 17e133 ld a, [hli] ld [ScriptVar], a push hl - callba MobileCheckOwnMonAnywhere + farcall MobileCheckOwnMonAnywhere pop hl jr c, .asm_17e159 inc hl @@ -2950,7 +2950,7 @@ Function17e2a7: ; 17e2a7 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 @@ Function17e309: ; 17e309 call ClearScreen call Function17e349 call Function17d5f6 - callba DisplayMobileError + farcall DisplayMobileError call Function17e349 call Function17dcaf xor a @@ -3042,7 +3042,7 @@ Function17e367: ; 17e367 push af ld a, $1 ld [rSVBK], a - callba SaveGameData_ + farcall SaveGameData_ pop af ld [rSVBK], a ret @@ -3055,7 +3055,7 @@ Function17e37e: ; 17e37e push af ld a, $1 ld [rSVBK], a - callba SaveAfterLinkTrade + farcall SaveAfterLinkTrade pop af ld [rSVBK], a ret @@ -3068,7 +3068,7 @@ Function17e395: ; 17e395 push af ld a, $1 ld [rSVBK], a - callba SaveBox + farcall SaveBox pop af ld [rSVBK], a ret @@ -3081,7 +3081,7 @@ Function17e3ac: ; 17e3ac push af ld a, $1 ld [rSVBK], a - callba SaveChecksum + farcall SaveChecksum pop af ld [rSVBK], a ret @@ -3094,8 +3094,8 @@ Function17e3c3: ; 17e3c3 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 @@ Function17f154: ; 17f154 ld c, l ld b, h pop de - callba Function11c08f + farcall Function11c08f ld c, l ld b, h pop de @@ -3995,7 +3995,7 @@ Function17f181: ; 17f181 ld a, [hl] ld c, a ld de, $c608 - callba Function48c63 + farcall Function48c63 pop hl ld de, $c608 call PlaceString @@ -4279,7 +4279,7 @@ Function17f334: ; 17f334 ld c, a call CloseSRAM ld de, $c608 - callba Function48c63 + farcall Function48c63 pop hl ld de, $c608 call PlaceString @@ -4346,7 +4346,7 @@ Function17f3c9: ; 17f3c9 call CopyBytes pop de ld c, $0 - callba Function11c075 + farcall Function11c075 push hl ld hl, $c708 ld de, wcd36 @@ -4643,7 +4643,7 @@ DisplayMobileError: ; 17f555 ld a, [wc303] bit 7, a jr nz, .quit - callba HDMATransferAttrMapAndTileMapToWRAMBank3 + farcall HDMATransferAttrMapAndTileMapToWRAMBank3 jr .loop .quit @@ -4704,7 +4704,7 @@ DisplayMobileError: ; 17f555 Function17f5c3: ; 17f5c3 call Function17f5e4 - callba FinishExitMenu + farcall FinishExitMenu ld a, $1 ld [wc303], a ret @@ -4712,7 +4712,7 @@ Function17f5c3: ; 17f5c3 Function17f5d2: ; 17f5d2 call Function17f5e4 - callba HDMATransferAttrMapAndTileMapToWRAMBank3 + farcall HDMATransferAttrMapAndTileMapToWRAMBank3 call SetPalettes ld a, $1 ld [wc303], a diff --git a/mobile/mobile_menu.asm b/mobile/mobile_menu.asm index 6a4e6cf61..468d77fff 100755 --- a/mobile/mobile_menu.asm +++ b/mobile/mobile_menu.asm @@ -172,7 +172,7 @@ Function4a098: ; 4a098 (12:6098) call PlaceHollowCursor call WaitBGMap call LoadStandardMenuDataHeader - callba Function89de0 + farcall Function89de0 call Call_ExitMenu call MG_Mobile_Layout_LoadPals call Function4a485 @@ -195,7 +195,7 @@ Function4a0c2: ; 4a0c2 (12:60c2) 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 @@ Function4a0c2: ; 4a0c2 (12:60c2) pop af and a jr nz, .skip_save - callba _SaveData + farcall _SaveData .skip_save ld c, 5 call DelayFrames @@ -280,7 +280,7 @@ Function4a149: ; 4a149 (12:6149) 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 @@ String_4a1ef: ; 4a1ef Function4a20e: ; 4a20e (12:620e) ld a, $1 call MenuClickSound - callba Function1719c8 + farcall Function1719c8 call ClearBGPalettes call DelayFrame jr Function4a239 @@ -403,7 +403,7 @@ Function4a28a: ; 4a28a (12:628a) 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 @@ Function4a28a: ; 4a28a (12:628a) cp $3 jr z, .quit .asm_4a2df - callba Function11765d + farcall Function11765d call ClearBGPalettes call Call_ExitMenu call LoadFontsExtra @@ -432,7 +432,7 @@ Function4a28a: ; 4a28a (12:628a) 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 @@ Function4a28a: ; 4a28a (12:628a) call ExitMenu .quit call Call_ExitMenu - callba Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap + farcall Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap xor a ret ; 4a346 (12:6346) @@ -649,7 +649,7 @@ MainMenu_MobileStudium: ; 4a496 ld e, a push bc push de - callba MobileStudium + farcall MobileStudium call ClearBGPalettes pop de pop bc @@ -847,7 +847,7 @@ Function4a6ab: ; 4a6ab (12:66ab) call ClearBGPalettes ld b, SCGB_DIPLOMA call GetSGBLayout - callba Function11c1ab + farcall Function11c1ab pop bc call LoadFontsExtra jp Function4a4c4 diff --git a/mobile/print_opp_message.asm b/mobile/print_opp_message.asm index 0be18acae..612a1b78d 100644 --- a/mobile/print_opp_message.asm +++ b/mobile/print_opp_message.asm @@ -20,7 +20,7 @@ Mobile_PrintOpponentBattleMessage: ; 4ea0a ld bc, wMobileOpponentBattleMessage decoord 1, 14 - callba PrintEZChatBattleMessage + farcall PrintEZChatBattleMessage pop af ld [rSVBK], a