callba/callab -> farcall/callfar; jpba/jpab -> farjp/jpfar

This commit is contained in:
Rangi 2020-07-06 21:18:22 -04:00
parent 77ed5f3820
commit 06db7ec55b
90 changed files with 251 additions and 253 deletions

View file

@ -24,7 +24,7 @@ PrintBeginningBattleText:
ld hl, TrainerWantsToFightText
.wildBattle
push hl
callab DrawAllPokeballs
callfar DrawAllPokeballs
pop hl
call PrintText
jr .done
@ -38,7 +38,7 @@ PrintBeginningBattleText:
ld a, b
and a
jr z, .noSilphScope
callab LoadEnemyMonData
callfar LoadEnemyMonData
jr .notPokemonTower
.noSilphScope
ld hl, EnemyAppearedText
@ -54,8 +54,8 @@ PrintBeginningBattleText:
call PrintText
ld hl, UnveiledGhostText
call PrintText
callab LoadEnemyMonData
callab MarowakAnim
callfar LoadEnemyMonData
callfar MarowakAnim
ld hl, WildMonAppearedText
call PrintText

View file

@ -97,7 +97,7 @@ SlidePlayerAndEnemySilhouettesOnScreen:
ld b, SET_PAL_BATTLE
call RunPaletteCommand
call HideSprites
jpab PrintBeginningBattleText
jpfar PrintBeginningBattleText
; when a battle is starting, silhouettes of the player's pic and the enemy's pic are slid onto the screen
; the lower of the player's pic (his body) is part of the background, but his head is a sprite
@ -178,7 +178,7 @@ StartBattle:
ld hl, .outOfSafariBallsText
jp PrintText
.notOutOfSafariBalls
callab PrintSafariZoneBattleText
callfar PrintSafariZoneBattleText
ld a, [wEnemyMonSpeed + 1]
add a
ld b, a ; init b (which is later compared with random value) to (enemy speed % 256) * 2
@ -267,7 +267,7 @@ EnemyRan:
call PlaySoundWaitForCurrent
xor a
ldh [hWhoseTurn], a
jpab AnimationSlideEnemyMonOff
jpfar AnimationSlideEnemyMonOff
WildRanText:
text_far _WildRanText
@ -365,7 +365,7 @@ MainInBattleLoop:
jr nz, .specialMoveNotUsed
ld [wPlayerSelectedMove], a
.specialMoveNotUsed
callab SwitchEnemyMon
callfar SwitchEnemyMon
.noLinkBattle
ld a, [wPlayerSelectedMove]
cp QUICK_ATTACK
@ -413,7 +413,7 @@ MainInBattleLoop:
.enemyMovesFirst
ld a, $1
ldh [hWhoseTurn], a
callab TrainerAI
callfar TrainerAI
jr c, .AIActionUsedEnemyFirst
call ExecuteEnemyMove
ld a, [wEscapedFromBattle]
@ -451,7 +451,7 @@ MainInBattleLoop:
call DrawHUDsAndHPBars
ld a, $1
ldh [hWhoseTurn], a
callab TrainerAI
callfar TrainerAI
jr c, .AIActionUsedPlayerFirst
call ExecuteEnemyMove
ld a, [wEscapedFromBattle]
@ -837,7 +837,7 @@ FaintEnemyPokemon:
.giveExpToMonsThatFought
xor a
ld [wBoostExpByExpAll], a
callab GainExperience
callfar GainExperience
pop af
ret z ; return if no exp all
@ -855,7 +855,7 @@ FaintEnemyPokemon:
jr nz, .gainExpFlagsLoop
ld a, b
ld [wPartyGainExpFlags], a
jpab GainExperience
jpfar GainExperience
EnemyMonFaintedText:
text_far _EnemyMonFaintedText
@ -893,7 +893,7 @@ ReplaceFaintedEnemyMon:
ld hl, wEnemyHPBarColor
ld e, $30
call GetBattleHealthBarColor
callab DrawEnemyPokeballs
callfar DrawEnemyPokeballs
ld a, [wLinkState]
cp LINK_STATE_BATTLING
jr nz, .notLinkBattle
@ -1720,7 +1720,7 @@ LoadEnemyMonFromParty:
ret
SendOutMon:
callab PrintSendOutMonMessage
callfar PrintSendOutMonMessage
ld hl, wEnemyMonHP
ld a, [hli]
or [hl] ; is enemy mon HP zero?
@ -1816,7 +1816,7 @@ DrawPlayerHUDAndHPBar:
coord hl, 9, 7
lb bc, 5, 11
call ClearScreenArea
callab PlacePlayerHUDTiles
callfar PlacePlayerHUDTiles
coord hl, 18, 9
ld [hl], $73
ld de, wBattleMonNick
@ -1877,7 +1877,7 @@ DrawEnemyHUDAndHPBar:
coord hl, 0, 0
lb bc, 4, 12
call ClearScreenArea
callab PlaceEnemyHUDTiles
callfar PlaceEnemyHUDTiles
ld de, wEnemyMonNick
coord hl, 1, 0
call CenterMonName
@ -2411,7 +2411,7 @@ PartyMenuOrRockOrRun:
; fall through to SwitchPlayerMon
SwitchPlayerMon:
callab RetreatMon
callfar RetreatMon
ld c, 50
call DelayFrames
call AnimateRetreatingPlayerMon
@ -2464,7 +2464,7 @@ MoveSelectionMenu:
ld de, wMoves
ld bc, NUM_MOVES
call CopyData
callab FormatMovesString
callfar FormatMovesString
ret
.writemoves
@ -2860,7 +2860,7 @@ PrintMenuItem:
ld [wWhichPokemon], a
ld a, BATTLE_MON_DATA
ld [wMonDataLocation], a
callab GetMaxPP
callfar GetMaxPP
ld hl, wCurrentMenuItem
ld c, [hl]
inc [hl]
@ -2955,7 +2955,7 @@ SelectEnemyMove:
ld a, [wIsInBattle]
dec a
jr z, .chooseRandomMove ; wild encounter
callab AIEnemyTrainerChooseMoves
callfar AIEnemyTrainerChooseMoves
.chooseRandomMove
push hl
call BattleRandom
@ -3020,7 +3020,7 @@ LinkBattleExchangeData:
ld a, b
.doExchange
ld [wSerialExchangeNybbleSendData], a
callab PrintWaitingText
callfar PrintWaitingText
.syncLoop1
call Serial_ExchangeNybble
call DelayFrame
@ -3196,7 +3196,7 @@ MirrorMoveCheck:
.moveDidNotMiss
call ApplyAttackToEnemyPokemon
call PrintCriticalOHKOText
callab DisplayEffectiveness
callfar DisplayEffectiveness
ld a, 1
ld [wMoveDidntMiss], a
.notDone
@ -4988,7 +4988,7 @@ AttackSubstitute:
ldh a, [hWhoseTurn]
xor $01
ldh [hWhoseTurn], a
callab HideSubstituteShowMonAnim ; animate the substitute breaking
callfar HideSubstituteShowMonAnim ; animate the substitute breaking
; flip the turn back to the way it was
ldh a, [hWhoseTurn]
xor $01
@ -5726,7 +5726,7 @@ EnemyCheckIfMirrorMoveEffect:
.moveDidNotMiss
call ApplyAttackToPlayerPokemon
call PrintCriticalOHKOText
callab DisplayEffectiveness
callfar DisplayEffectiveness
ld a, 1
ld [wMoveDidntMiss], a
.handleExplosionMiss
@ -6254,14 +6254,14 @@ DoBattleTransitionAndInitBattleVariables:
; link battle
xor a
ld [wMenuJoypadPollCount], a
callab DisplayLinkBattleVersusTextBox
callfar DisplayLinkBattleVersusTextBox
ld a, $1
ld [wUpdateSpritesEnabled], a
call ClearScreen
.next
call DelayFrame
predef BattleTransition
callab LoadHudAndHpBarAndStatusTilePatterns
callfar LoadHudAndHpBarAndStatusTilePatterns
ld a, $1
ldh [hAutoBGTransferEnabled], a
ld a, $ff
@ -6359,11 +6359,11 @@ LoadPlayerBackPic:
; does nothing since no stats are ever selected (barring glitches)
DoubleOrHalveSelectedStats:
callab DoubleSelectedStats
jpab HalveSelectedStats
callfar DoubleSelectedStats
jpfar HalveSelectedStats
ScrollTrainerPicAfterBattle:
jpab _ScrollTrainerPicAfterBattle
jpfar _ScrollTrainerPicAfterBattle
ApplyBurnAndParalysisPenaltiesToPlayer:
ld a, $1
@ -6747,7 +6747,7 @@ DetermineWildOpponent:
ld a, [wNumberOfNoRandomBattleStepsLeft]
and a
ret nz
callab TryDoWildEncounter
callfar TryDoWildEncounter
ret nz
InitBattleCommon:
ld a, [wMapPalOffset]
@ -6756,13 +6756,13 @@ InitBattleCommon:
ld a, [hl]
push af
res 1, [hl]
callab InitBattleVariables
callfar InitBattleVariables
ld a, [wEnemyMonSpecies2]
sub OPP_ID_OFFSET
jp c, InitWildBattle
ld [wTrainerClass], a
call GetTrainerInformation
callab ReadTrainer
callfar ReadTrainer
call DoBattleTransitionAndInitBattleVariables
call _LoadTrainerPic
xor a
@ -6857,7 +6857,7 @@ _InitBattleCommon:
dec a ; is it a wild battle?
call z, DrawEnemyHUDAndHPBar ; draw enemy HUD and HP bar if it's a wild battle
call StartBattle
callab EndOfBattle
callfar EndOfBattle
pop af
ld [wLetterPrintingDelayFlags], a
pop af

View file

@ -170,7 +170,7 @@ BadlyPoisonedText:
text_end
DrainHPEffect:
jpab DrainHPEffect_
jpfar DrainHPEffect_
ExplodeEffect:
ld hl, wBattleMonHP
@ -987,7 +987,7 @@ FlinchSideEffect:
ret
OneHitKOEffect:
jpab OneHitKOEffect_
jpfar OneHitKOEffect_
ChargeEffect:
ld hl, wPlayerBattleStatus1
@ -1097,13 +1097,13 @@ TrappingEffect:
ret
MistEffect:
jpab MistEffect_
jpfar MistEffect_
FocusEnergyEffect:
jpab FocusEnergyEffect_
jpfar FocusEnergyEffect_
RecoilEffect:
jpab RecoilEffect_
jpfar RecoilEffect_
ConfusionSideEffect:
call BattleRandom
@ -1157,10 +1157,10 @@ ConfusionEffectFailed:
jp ConditionalPrintButItFailed
ParalyzeEffect:
jpab ParalyzeEffect_
jpfar ParalyzeEffect_
SubstituteEffect:
jpab SubstituteEffect_
jpfar SubstituteEffect_
HyperBeamEffect:
ld hl, wPlayerBattleStatus2
@ -1271,7 +1271,7 @@ MimicLearnedMoveText:
text_end
LeechSeedEffect:
jpab LeechSeedEffect_
jpfar LeechSeedEffect_
SplashEffect:
call PlayCurrentMoveAnimation
@ -1365,22 +1365,22 @@ MoveWasDisabledText:
text_end
PayDayEffect:
jpab PayDayEffect_
jpfar PayDayEffect_
ConversionEffect:
jpab ConversionEffect_
jpfar ConversionEffect_
HazeEffect:
jpab HazeEffect_
jpfar HazeEffect_
HealEffect:
jpab HealEffect_
jpfar HealEffect_
TransformEffect:
jpab TransformEffect_
jpfar TransformEffect_
ReflectLightScreenEffect:
jpab ReflectLightScreenEffect_
jpfar ReflectLightScreenEffect_
NothingHappenedText:
text_far _NothingHappenedText

View file

@ -10,7 +10,7 @@ EndOfBattle:
ld a, [wEnemyMonStatus]
ld [hl], a
call ClearScreen
callab DisplayLinkBattleVersusTextBox
callfar DisplayLinkBattleVersusTextBox
ld a, [wBattleResult]
cp $1
ld de, YouWinText

View file

@ -117,7 +117,7 @@ GainExperience:
ld [wd0b5], a
call GetMonHeader
ld d, MAX_LEVEL
callab CalcExperience ; get max exp
callfar CalcExperience ; get max exp
; compare max exp with current exp
ldh a, [hExperience]
ld b, a
@ -155,7 +155,7 @@ GainExperience:
ld bc, wPartyMon1Level - wPartyMon1Exp
add hl, bc
push hl
callba CalcLevelFromExperience
farcall CalcLevelFromExperience
pop hl
ld a, [hl] ; current level
cp d
@ -233,11 +233,11 @@ GainExperience:
.recalcStatChanges
xor a ; battle mon
ld [wCalculateWhoseStats], a
callab CalculateModifiedStats
callab ApplyBurnAndParalysisPenaltiesToPlayer
callab ApplyBadgeStatBoosts
callab DrawPlayerHUDAndHPBar
callab PrintEmptyString
callfar CalculateModifiedStats
callfar ApplyBurnAndParalysisPenaltiesToPlayer
callfar ApplyBadgeStatBoosts
callfar DrawPlayerHUDAndHPBar
callfar PrintEmptyString
call SaveScreenTilesToBuffer1
.printGrewLevelText
ld hl, GrewLevelText
@ -246,7 +246,7 @@ GainExperience:
ld [wMonDataLocation], a
call LoadMonData
ld d, $1
callab PrintStatsBox
callfar PrintStatsBox
call WaitForTextScrollButtonPress
call LoadScreenTilesFromBuffer1
xor a ; PLAYER_PARTY_DATA

View file

@ -15,7 +15,7 @@ MarowakAnim:
ld [wChangeMonPicEnemyTurnSpecies], a
ld a, $1
ldh [hWhoseTurn], a
callab ChangeMonPic
callfar ChangeMonPic
; alternate between black and light grey 8 times.
; this makes the ghost's body appear to flash
ld d, $80

View file

@ -35,4 +35,4 @@ InitBattleVariables:
ld a, BATTLE_TYPE_SAFARI
ld [wBattleType], a
.notSafariBattle
jpab PlayBattleMusic
jpfar PlayBattleMusic

View file

@ -18,6 +18,6 @@ DisplayLinkBattleVersusTextBox:
ld [hl], $6a
xor a
ld [wUpdateSpritesEnabled], a
callab SetupPlayerAndEnemyPokeballs
callfar SetupPlayerAndEnemyPokeballs
ld c, 150
jp DelayFrames

View file

@ -81,7 +81,7 @@ DrainHPEffect_:
predef UpdateHPBar2
predef DrawPlayerHUDAndHPBar
predef DrawEnemyHUDAndHPBar
callab ReadPlayerMonCurHPAndStatus
callfar ReadPlayerMonCurHPAndStatus
ld hl, SuckedHealthText
ldh a, [hWhoseTurn]
and a

View file

@ -8,13 +8,13 @@ FocusEnergyEffect_:
bit GETTING_PUMPED, [hl] ; is mon already using focus energy?
jr nz, .alreadyUsing
set GETTING_PUMPED, [hl] ; mon is now using focus energy
callab PlayCurrentMoveAnimation
callfar PlayCurrentMoveAnimation
ld hl, GettingPumpedText
jp PrintText
.alreadyUsing
ld c, 50
call DelayFrames
jpab PrintButItFailedText_
jpfar PrintButItFailedText_
GettingPumpedText:
text_pause

View file

@ -1,5 +1,5 @@
LeechSeedEffect_:
callab MoveHitTest
callfar MoveHitTest
ld a, [wMoveMissed]
and a
jr nz, .moveMissed
@ -22,7 +22,7 @@ LeechSeedEffect_:
bit SEEDED, [hl]
jr nz, .moveMissed
set SEEDED, [hl]
callab PlayCurrentMoveAnimation
callfar PlayCurrentMoveAnimation
ld hl, WasSeededText
jp PrintText
.moveMissed

View file

@ -8,11 +8,11 @@ MistEffect_:
bit PROTECTED_BY_MIST, [hl] ; is mon protected by mist?
jr nz, .mistAlreadyInUse
set PROTECTED_BY_MIST, [hl] ; mon is now protected by mist
callab PlayCurrentMoveAnimation
callfar PlayCurrentMoveAnimation
ld hl, ShroudedInMistText
jp PrintText
.mistAlreadyInUse
jpab PrintButItFailedText_
jpfar PrintButItFailedText_
ShroudedInMistText:
text_far _ShroudedInMistText

View file

@ -26,22 +26,22 @@ ParalyzeEffect_:
jr z, .doesntAffect
.hitTest
push hl
callab MoveHitTest
callfar MoveHitTest
pop hl
ld a, [wMoveMissed]
and a
jr nz, .didntAffect
set PAR, [hl]
callab QuarterSpeedDueToParalysis
callfar QuarterSpeedDueToParalysis
ld c, 30
call DelayFrames
callab PlayCurrentMoveAnimation
jpab PrintMayNotAttackText
callfar PlayCurrentMoveAnimation
jpfar PrintMayNotAttackText
.didntAffect
ld c, 50
call DelayFrames
jpab PrintDidntAffectText
jpfar PrintDidntAffectText
.doesntAffect
ld c, 50
call DelayFrames
jpab PrintDoesntAffectText
jpfar PrintDoesntAffectText

View file

@ -55,7 +55,7 @@ SubstituteEffect_:
call Bankswitch ; jump to routine depending on animation setting
ld hl, SubstituteText
call PrintText
jpab DrawHUDsAndHPBars
jpfar DrawHUDsAndHPBars
.alreadyHasSubstitute
ld hl, HasSubstituteText
jr .printText

View file

@ -5,7 +5,7 @@ _ScrollTrainerPicAfterBattle:
ld [wEnemyMonSpecies2], a
ld b, SET_PAL_BATTLE
call RunPaletteCommand
callab _LoadTrainerPic
callfar _LoadTrainerPic
coord hl, 19, 0
ld c, $0
.scrollLoop

View file

@ -204,7 +204,7 @@ AIMoveChoiceModification3:
push hl
push bc
push de
callab AIGetTypeEffectiveness
callfar AIGetTypeEffectiveness
pop de
pop bc
pop hl
@ -599,7 +599,7 @@ SwitchEnemyMon:
; switching in a new mon in response to this switch.
ld a, 1
ld [wFirstMonsNotOutYet], a
callab EnemySendOut
callfar EnemySendOut
xor a
ld [wFirstMonsNotOutYet], a
@ -713,7 +713,7 @@ AIIncreaseStat:
ld a, ANIM_AF
ld [hli], a
ld [hl], b
callab StatModifierUpEffect
callfar StatModifierUpEffect
pop hl
pop af
ld [hli], a

View file

@ -7,14 +7,14 @@ TryDoWildEncounter:
ld a, [wd736]
and a
ret nz
callab IsPlayerStandingOnDoorTileOrWarpTile
callfar IsPlayerStandingOnDoorTileOrWarpTile
jr nc, .notStandingOnDoorOrWarpTile
.CantEncounter
ld a, $1
and a
ret
.notStandingOnDoorOrWarpTile
callab IsPlayerJustOutsideMap
callfar IsPlayerJustOutsideMap
jr z, .CantEncounter
ld a, [wRepelRemainingSteps]
and a

View file

@ -62,7 +62,7 @@ GiveFossilToCinnabarLab::
call PrintText
ld a, [wFossilItem]
ldh [hItemToRemoveID], a
callba RemoveItemByID
farcall RemoveItemByID
ld hl, LabFossil_610b8
call PrintText
SetEvents EVENT_GAVE_FOSSIL_TO_LAB, EVENT_LAB_STILL_REVIVING_FOSSIL

View file

@ -38,7 +38,7 @@ DisplayDiploma::
coord hl, 10, 4
ld de, wPlayerName
call PlaceString
callba DrawPlayerCharacter
farcall DrawPlayerCharacter
; Move the player 33 pixels right and set the priority bit so he appears
; behind the background layer.
@ -56,7 +56,7 @@ DisplayDiploma::
jr nz, .adjustPlayerGfxLoop
call EnableLCD
callba LoadTrainerInfoTextBoxTiles
farcall LoadTrainerInfoTextBoxTiles
ld b, SET_PAL_GENERIC
call RunPaletteCommand
call Delay3

View file

@ -38,7 +38,7 @@ EvolveTradeMon:
ld [wForceEvolution], a
ld a, LINK_STATE_TRADING
ld [wLinkState], a
callab TryEvolvingMon
callfar TryEvolvingMon
xor a ; LINK_STATE_NONE
ld [wLinkState], a
jp PlayDefaultMusic

View file

@ -15,9 +15,9 @@ _GivePokemon::
ld [wEnemyBattleStatus3], a
ld a, [wcf91]
ld [wEnemyMonSpecies2], a
callab LoadEnemyMonData
callfar LoadEnemyMonData
call SetPokedexOwnedFlag
callab SendNewMonToBox
callfar SendNewMonToBox
ld hl, wcf4b
ld a, [wCurrentBoxNum]
and $7f

View file

@ -34,6 +34,6 @@ PrintBookshelfText::
.noMatch
ld a, $ff
ldh [hFFDB], a
jpba PrintCardKeyText
farjp PrintCardKeyText
INCLUDE "data/tilesets/bookshelf_tile_ids.asm"

View file

@ -12,7 +12,7 @@ TownMapText::
inc a
ldh [hAutoBGTransferEnabled], a
call LoadFontTilePatterns
callba DisplayTownMap
farcall DisplayTownMap
ld hl, wd730
res 6, [hl]
ld de, TextScriptEnd

View file

@ -137,10 +137,10 @@ InGameTrade_DoTrade:
ld [wMonDataLocation], a
call AddPartyMon
call InGameTrade_CopyDataToReceivedMon
callab EvolveTradeMon
callfar EvolveTradeMon
call ClearScreen
call InGameTrade_RestoreScreen
callba RedrawMapView
farcall RedrawMapView
and a
ld a, $3
jr .tradeSucceeded
@ -159,7 +159,7 @@ InGameTrade_RestoreScreen:
call LoadGBPal
ld c, 10
call DelayFrames
jpba LoadWildData
farjp LoadWildData
InGameTrade_PrepareTradeData:
ld hl, wTradedPlayerMonSpecies

View file

@ -22,7 +22,7 @@ DisplayPokemonCenterDialogue_::
ld [wSprite01StateData1ImageIndex], a ; make the nurse turn to face the machine
call Delay3
predef HealParty
callba AnimateHealingMachine ; do the healing machine animation
farcall AnimateHealingMachine ; do the healing machine animation
xor a
ld [wAudioFadeOutControl], a
ld a, [wAudioSavedROMBank]

View file

@ -30,7 +30,7 @@ DisplayDexRating:
call PrintText
pop hl
call PrintText
callba PlayPokedexRatingSfx
farcall PlayPokedexRatingSfx
jp WaitForTextScrollButtonPress
.hallOfFame
ld de, wDexRatingNumMonsSeen

View file

@ -42,7 +42,7 @@ DisplayPokemartDialogue_::
ld [wPrintItemPrices], a
ld a, INIT_BAG_ITEM_LIST
ld [wInitListType], a
callab InitList
callfar InitList
ld a, [wNumBagItems]
and a
@ -126,7 +126,7 @@ DisplayPokemartDialogue_::
ld [wPrintItemPrices], a
ld a, INIT_OTHER_ITEM_LIST
ld [wInitListType], a
callab InitList
callfar InitList
ld hl, PokemartBuyingGreetingText
call PrintText

View file

@ -10,6 +10,6 @@ RemoveGuardDrink::
call IsItemInBag
pop hl
jr z, .drinkLoop
jpba RemoveItemByID
farjp RemoveItemByID
INCLUDE "data/items/guard_drink_items.asm"

View file

@ -147,7 +147,7 @@ ItemUseBall:
; If the player is fighting an unidentified ghost, set the value that indicates
; the Pokémon can't be caught and skip the capture calculations.
callab IsGhostBattle
callfar IsGhostBattle
ld b, $10 ; can't be caught value
jp z, .setAnimData
@ -495,7 +495,7 @@ ItemUseBall:
ld [wcf91], a
ld a, [wEnemyMonLevel]
ld [wCurEnemyLVL], a
callab LoadEnemyMonData
callfar LoadEnemyMonData
pop af
ld [wcf91], a
pop hl
@ -632,7 +632,7 @@ ItemUseTownMap:
ld a, [wIsInBattle]
and a
jp nz, ItemUseNotTime
jpba DisplayTownMap
farjp DisplayTownMap
ItemUseBicycle:
ld a, [wIsInBattle]
@ -778,7 +778,7 @@ ItemUseEvoStone:
ld a, SFX_HEAL_AILMENT
call PlaySoundWaitForCurrent
call WaitForSoundToFinish
callab TryEvolvingMon ; try to evolve pokemon
callfar TryEvolvingMon ; try to evolve pokemon
ld a, [wEvolutionOccurred]
and a
jr z, .noEffect
@ -1341,7 +1341,7 @@ ItemUseMedicine:
push hl
push de
ld d, a
callab CalcExperience ; calculate experience for next level and store it at hExperience
callfar CalcExperience ; calculate experience for next level and store it at hExperience
pop de
pop hl
ld bc, wPartyMon1Exp - wPartyMon1Level
@ -1400,14 +1400,14 @@ ItemUseMedicine:
ld [wMonDataLocation], a
call LoadMonData
ld d, $01
callab PrintStatsBox ; display new stats text box
callfar PrintStatsBox ; display new stats text box
call WaitForTextScrollButtonPress ; wait for button press
xor a ; PLAYER_PARTY_DATA
ld [wMonDataLocation], a
predef LearnMoveFromLevelUp ; learn level up move, if any
xor a
ld [wForceEvolution], a
callab TryEvolvingMon ; evolve pokemon, if appropriate
callfar TryEvolvingMon ; evolve pokemon, if appropriate
ld a, $01
ld [wUpdateSpritesEnabled], a
pop af
@ -1699,7 +1699,7 @@ ItemUseXStat:
call Delay3
xor a
ldh [hWhoseTurn], a ; set turn to player's turn
callba StatModifierUpEffect ; do stat increase move
farcall StatModifierUpEffect ; do stat increase move
pop hl
pop af
ld [hld], a ; restore [wPlayerMoveEffect]
@ -1775,7 +1775,7 @@ ItemUsePokeflute:
and $80
jr nz, .skipMusic
call WaitForSoundToFinish ; wait for sound to end
callba Music_PokeFluteInBattle ; play in-battle pokeflute music
farcall Music_PokeFluteInBattle ; play in-battle pokeflute music
.musicWaitLoop ; wait for music to finish playing
ld a, [wChannelSoundIDs + Ch7]
and a ; music off?
@ -1927,7 +1927,7 @@ RodResponse:
push af
push hl
ld [hl], 0
callba FishingAnim
farcall FishingAnim
pop hl
pop af
ld [hl], a
@ -1968,7 +1968,7 @@ ItemUseItemfinder:
and a
jp nz, ItemUseNotTime
call ItemUseReloadOverworldData
callba HiddenItemNear ; check for hidden items
farcall HiddenItemNear ; check for hidden items
ld hl, ItemfinderFoundNothingText
jr nc, .printText ; if no hidden items
ld c, 4
@ -2024,7 +2024,7 @@ ItemUsePPRestore:
call PrintText
xor a
ld [wPlayerMoveListIndex], a
callab MoveSelectionMenu ; move selection menu
callfar MoveSelectionMenu ; move selection menu
ld a, 0
ld [wPlayerMoveListIndex], a
jr nz, .chooseMon
@ -2278,7 +2278,7 @@ ItemUseTMHM:
call PrintText
jr .chooseMon
.checkIfAlreadyLearnedMove
callab CheckIfMoveIsKnown ; check if the pokemon already knows the move
callfar CheckIfMoveIsKnown ; check if the pokemon already knows the move
jr c, .chooseMon
predef LearnMove ; teach move
pop af
@ -2820,7 +2820,7 @@ SendNewMonToBox:
push de
ld a, [wCurEnemyLVL]
ld d, a
callab CalcExperience
callfar CalcExperience
pop de
ldh a, [hExperience]
ld [de], a

View file

@ -366,7 +366,7 @@ DrawPlayerOrBirdSprite:
jp CopyData
DisplayWildLocations:
callba FindWildLocationsOfMon
farcall FindWildLocationsOfMon
call ZeroOutDuplicatesInList
ld hl, wOAMBuffer
ld de, wTownMapCoords

View file

@ -359,7 +359,7 @@ TradeCenter_SelectMon:
.displayEnemyMonStats
ld a, INIT_ENEMYOT_LIST
ld [wInitListType], a
callab InitList ; the list isn't used
callfar InitList ; the list isn't used
ld hl, wEnemyMons
call TradeCenter_DisplayStats
jp .getNewInput
@ -418,7 +418,7 @@ TradeCenter_SelectMon:
; unreachable code
ld a, INIT_PLAYEROT_LIST
ld [wInitListType], a
callab InitList ; the list isn't used
callfar InitList ; the list isn't used
call TradeCenter_DisplayStats
jp .getNewInput
.playerMonMenu_ANotPressed
@ -513,7 +513,7 @@ TradeCenter_SelectMon:
ld [wCurrentMenuItem], a
ld a, INIT_PLAYEROT_LIST
ld [wInitListType], a
callab InitList ; the list isn't used
callfar InitList ; the list isn't used
call TradeCenter_DisplayStats
call LoadScreenTilesFromBuffer1
jp .playerMonMenu
@ -588,7 +588,7 @@ ReturnToCableClubRoom:
dec a
ld [wDestinationWarpID], a
call LoadMapData
callba ClearVariablesOnEnterMap
farcall ClearVariablesOnEnterMap
pop hl
pop af
ld [hl], a
@ -845,7 +845,7 @@ TradeCenter_Trade:
.usingExternalClock
predef ExternalClockTradeAnim
.tradeCompleted
callab TryEvolvingMon
callfar TryEvolvingMon
call ClearScreen
call LoadTrainerInfoTextBoxTiles
call Serial_PrintWaitingTextAndSyncAndExchangeNybble

View file

@ -54,7 +54,7 @@ CableClubNPC::
ld a, [wCurrentMenuItem]
and a
jr nz, .choseNo
callab SaveSAVtoSRAM
callfar SaveSAVtoSRAM
call WaitForSoundToFinish
ld a, SFX_SAVE
call PlaySoundWaitForCurrent
@ -107,7 +107,7 @@ CableClubNPC::
xor a
ld [hld], a
ld [hl], a
jpab LinkMenu
jpfar LinkMenu
CableClubNPCAreaReservedFor2FriendsLinkedByCableText:
text_far _CableClubNPCAreaReservedFor2FriendsLinkedByCableText

View file

@ -29,7 +29,7 @@ PKMNLeaguePC:
push bc
ld a, [wHoFTeamIndex2]
ld [wHoFTeamIndex], a
callba LoadHallOfFameTeams
farcall LoadHallOfFameTeams
call LeaguePCShowTeam
pop bc
jr c, .doneShowingTeams
@ -110,7 +110,7 @@ LeaguePCShowMon:
ld de, wHoFTeamNo
lb bc, 1, 3
call PrintNumber
jpba HoFDisplayMonInfo
farjp HoFDisplayMonInfo
HallOfFameNoText:
db "HALL OF FAME No @"

View file

@ -92,7 +92,7 @@ DisplayNamingScreen:
call RunPaletteCommand
call LoadHpBarAndStatusTilePatterns
call LoadEDTile
callba LoadMonPartySpriteGfx
farcall LoadMonPartySpriteGfx
coord hl, 0, 4
ld b, 9
ld c, 18
@ -128,7 +128,7 @@ DisplayNamingScreen:
.inputLoop
ld a, [wCurrentMenuItem]
push af
callba AnimatePartyMon_ForceSpeed1
farcall AnimatePartyMon_ForceSpeed1
pop af
ld [wCurrentMenuItem], a
call JoypadLowSensitivity
@ -172,7 +172,7 @@ DisplayNamingScreen:
ld a, [wIsInBattle]
and a
jp z, LoadTextBoxTilePatterns
jpab LoadHudTilePatterns
jpfar LoadHudTilePatterns
.namingScreenButtonFunctions
dw .dPadReturnPoint
@ -461,7 +461,7 @@ PrintNamingText:
ld a, [wcf91]
ld [wMonPartySpriteSpecies], a
push af
callba WriteMonPartySpriteOAMBySpecies
farcall WriteMonPartySpriteOAMBySpecies
pop af
ld [wd11e], a
call GetMonName

View file

@ -22,14 +22,14 @@ DrawPartyMenu_::
ldh [hAutoBGTransferEnabled], a
call ClearScreen
call UpdateSprites
callba LoadMonPartySpriteGfxWithLCDDisabled ; load pokemon icon graphics
farcall LoadMonPartySpriteGfxWithLCDDisabled ; load pokemon icon graphics
RedrawPartyMenu_::
ld a, [wPartyMenuTypeOrMessageID]
cp SWAP_MONS_PARTY_MENU
jp z, .printMessage
call ErasePartyMenuCursors
callba InitPartyMenuBlkPacket
farcall InitPartyMenuBlkPacket
coord hl, 3, 0
ld de, wPartySpecies
xor a
@ -49,7 +49,7 @@ RedrawPartyMenu_::
call GetPartyMonName
pop hl
call PlaceString ; print the pokemon's name
callba WriteMonPartySpriteOAMByPartyIndex ; place the appropriate pokemon icon
farcall WriteMonPartySpriteOAMByPartyIndex ; place the appropriate pokemon icon
ldh a, [hPartyMonIndex]
ld [wWhichPokemon], a
inc a

View file

@ -10,7 +10,7 @@ ActivatePC::
call LoadScreenTilesFromBuffer2
call Delay3
PCMainMenu:
callba DisplayPCMainMenu
farcall DisplayPCMainMenu
ld hl, wFlags_0xcd60
set 5, [hl]
call HandleMenuInput
@ -56,19 +56,19 @@ PCMainMenu:
call WaitForSoundToFinish
ld hl, AccessedMyPCText
call PrintText
callba PlayerPC
farcall PlayerPC
jr ReloadMainMenu
OaksPC:
ld a, SFX_ENTER_PC
call PlaySound
call WaitForSoundToFinish
callba OpenOaksPC
farcall OpenOaksPC
jr ReloadMainMenu
PKMNLeague:
ld a, SFX_ENTER_PC
call PlaySound
call WaitForSoundToFinish
callba PKMNLeaguePC
farcall PKMNLeaguePC
jr ReloadMainMenu
BillsPC:
ld a, SFX_ENTER_PC
@ -82,7 +82,7 @@ BillsPC:
ld hl, AccessedBillsPCText
.printText
call PrintText
callba BillsPC_
farcall BillsPC_
ReloadMainMenu:
xor a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a

View file

@ -14,7 +14,7 @@ ShowPokedexMenu:
.setUpGraphics
ld b, SET_PAL_GENERIC
call RunPaletteCommand
callab LoadPokedexTilePatterns
callfar LoadPokedexTilePatterns
.doPokemonListMenu
ld hl, wTopMenuItemY
ld a, 3
@ -393,7 +393,7 @@ ShowPokedexData:
call GBPalWhiteOutWithDelay3
call ClearScreen
call UpdateSprites
callab LoadPokedexTilePatterns ; load pokedex tiles
callfar LoadPokedexTilePatterns ; load pokedex tiles
; function to display pokedex data from inside the pokedex
ShowPokedexDataInternal:

View file

@ -138,7 +138,7 @@ LoadSAVIgnoreBadCheckSum:
jp LoadSAV2
SaveSAV:
callba PrintSaveScreenText
farcall PrintSaveScreenText
ld hl, WouldYouLikeToSaveText
call SaveSAVConfirm
and a ;|0 = Yes|1 = No|

View file

@ -160,7 +160,7 @@ StartMenu_Pokemon::
.surf
bit 4, a ; does the player have the Soul Badge?
jp z, .newBadgeRequired
callba IsSurfingAllowed
farcall IsSurfingAllowed
ld hl, wd728
bit 1, [hl]
res 1, [hl]
@ -651,7 +651,7 @@ StartMenu_Option::
ldh [hAutoBGTransferEnabled], a
call ClearScreen
call UpdateSprites
callab DisplayOptionMenu
callfar DisplayOptionMenu
call LoadScreenTilesFromBuffer2 ; restore saved screen
call LoadTextBoxTilePatterns
call UpdateSprites

View file

@ -1,5 +1,5 @@
HallOfFamePC:
callba AnimateHallOfFame
farcall AnimateHallOfFame
call ClearScreen
ld c, 100
call DelayFrames
@ -235,7 +235,7 @@ Credits:
jr .nextCreditsScreen
.showCopyrightText
push de
callba LoadCopyrightTiles
farcall LoadCopyrightTiles
pop de
pop de
jr .nextCreditsCommand

View file

@ -311,7 +311,7 @@ LoadIntroGraphics:
PlayShootingStar:
ld b, SET_PAL_GAME_FREAK_INTRO
call RunPaletteCommand
callba LoadCopyrightAndTextBoxTiles
farcall LoadCopyrightAndTextBoxTiles
ldPal a, BLACK, DARK_GRAY, LIGHT_GRAY, WHITE
ldh [rBGP], a
ld c, 180
@ -328,7 +328,7 @@ PlayShootingStar:
set 3, [hl]
ld c, 64
call DelayFrames
callba AnimateShootingStar
farcall AnimateShootingStar
push af
pop af
jr c, .next ; skip the delay if the user interrupted the animation

View file

@ -15,7 +15,7 @@ DoClearSaveDialogue:
ld a, [wCurrentMenuItem]
and a
jp z, Init
callba ClearSAV
farcall ClearSAV
jp Init
ClearSaveDataText:

View file

@ -226,7 +226,7 @@ ENDC
ld c, 1
call CheckForUserInterruption
jr c, .finishedWaiting
callba TitleScreenAnimateBallIfStarterOut
farcall TitleScreenAnimateBallIfStarterOut
call TitleScreenPickNewMon
jr .awaitUserInterruptionLoop
@ -255,7 +255,7 @@ ENDC
jp MainMenu
.doClearSaveDialogue
jpba DoClearSaveDialogue
farjp DoClearSaveDialogue
TitleScreenPickNewMon:
ld a, vBGMap0 / $100
@ -282,12 +282,12 @@ TitleScreenPickNewMon:
ld a, $90
ldh [hWY], a
ld d, 1 ; scroll out
callba TitleScroll
farcall TitleScroll
ret
TitleScreenScrollInMon:
ld d, 0 ; scroll in
callba TitleScroll
farcall TitleScroll
xor a
ldh [hWY], a
ret

View file

@ -199,7 +199,7 @@ LoadTradingGFXAndMonNames:
Trade_LoadMonPartySpriteGfx:
ld a, %11010000
ldh [rOBP1], a
jpba LoadMonPartySpriteGfx
farjp LoadMonPartySpriteGfx
Trade_SwapNames:
ld hl, wPlayerName
@ -615,7 +615,7 @@ Trade_AnimCircledMon:
ret
Trade_WriteCircledMonOAM:
callba WriteMonPartySpriteOAMBySpecies
farcall WriteMonPartySpriteOAMBySpecies
call Trade_WriteCircleOAM
Trade_AddOffsetsToOAMCoords:

View file

@ -57,7 +57,7 @@ UsedCut:
ld de, CutTreeBlockSwaps
call ReplaceTreeTileBlock
call RedrawMapView
callba AnimCut
farcall AnimCut
ld a, $1
ld [wUpdateSpritesEnabled], a
ld a, SFX_CUT

View file

@ -8,7 +8,7 @@ AnimateBoulderDust:
ld a, %11100100
ldh [rOBP1], a
call LoadSmokeTileFourTimes
callba WriteCutOrBoulderDustAnimationOAMBlock
farcall WriteCutOrBoulderDustAnimationOAMBlock
ld c, 8 ; number of steps in animation
.loop
push bc

View file

@ -192,7 +192,7 @@ IsPlayerStandingOnDoorTileOrWarpTile::
push hl
push de
push bc
callba IsPlayerStandingOnDoorTile
farcall IsPlayerStandingOnDoorTile
jr c, .done
ld a, [wCurMapTileset]
add a

View file

@ -86,7 +86,7 @@ DoBoulderDustAnimation::
ld a, [wd730]
bit 0, a
ret nz
callab AnimateBoulderDust
callfar AnimateBoulderDust
call DiscardButtonPresses
ld [wJoyIgnore], a
call ResetBoulderPushFlags

View file

@ -201,7 +201,7 @@ _AddPartyMon::
push de
ld a, [wCurEnemyLVL]
ld d, a
callab CalcExperience
callfar CalcExperience
pop de
inc de
ldh a, [hExperience] ; write experience
@ -498,7 +498,7 @@ _MoveMon::
add $2
ld [wMonDataLocation], a
call LoadMonData
callba CalcLevelFromExperience
farcall CalcLevelFromExperience
ld a, d
ld [wCurEnemyLVL], a
pop hl

View file

@ -318,7 +318,7 @@ BillsPCRelease:
jp BillsPCMenu
BillsPCChangeBox:
callba ChangeBox
farcall ChangeBox
jp BillsPCMenu
DisplayMonListMenu:

View file

@ -129,7 +129,7 @@ Evolution_PartyMonLoop: ; loop over party mons
ld a, $ff
ld [wUpdateSpritesEnabled], a
call ClearSprites
callab EvolveMon
callfar EvolveMon
jp c, CancelledEvolution
ld hl, EvolvedText
call PrintText

View file

@ -114,7 +114,7 @@ TryingToLearn:
ld de, wMoves
ld bc, NUM_MOVES
call CopyData
callab FormatMovesString
callfar FormatMovesString
pop hl
.loop
push hl

View file

@ -15,7 +15,7 @@ LoadMonData_::
ld a, [wWhichPokemon]
ld e, a
callab GetMonSpecies
callfar GetMonSpecies
.GetMonHeader
ld a, [wcf91]

View file

@ -310,7 +310,7 @@ StatusScreen2:
ld de, wMoves
ld bc, NUM_MOVES
call CopyData
callab FormatMovesString
callfar FormatMovesString
coord hl, 9, 2
lb bc, 5, 10
call ClearScreenArea ; Clear under name
@ -356,7 +356,7 @@ StatusScreen2:
ld a, b
ld [hl], a
push hl
callab GetMaxPP
callfar GetMaxPP
pop hl
pop af
ld [hl], a
@ -445,7 +445,7 @@ CalcExpToLevelUp:
jr z, .atMaxLevel
inc a
ld d, a
callab CalcExperience
callfar CalcExperience
ld hl, wLoadedMonExp + 2
ldh a, [hExperience + 2]
sub [hl]

View file

@ -6,7 +6,7 @@ StartSlotMachine:
jr z, .printOutToLunch
cp $ff
jr z, .printSomeonesKeys
callba AbleToPlaySlotsCheck
farcall AbleToPlaySlotsCheck
ld a, [wCanPlaySlots]
and a
ret z