callba/callab → farcall/callfar

This commit is contained in:
Remy Oukaour 2017-12-24 12:47:30 -05:00
parent d787c66374
commit c66d195089
170 changed files with 1751 additions and 1751 deletions

View File

@ -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

View File

@ -12,7 +12,7 @@ AIChooseMove: ; 440ce
ret nz
; No use picking a move if there's no choice.
callba CheckEnemyLockedIn
farcall CheckEnemyLockedIn
ret nz

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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]

View File

@ -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

View File

@ -1,5 +1,5 @@
DetermineLinkBattleResult: ; 2b930
callba UpdateEnemyMonInParty
farcall UpdateEnemyMonInParty
ld hl, PartyMon1HP
call .CountMonsRemaining
push bc

View File

@ -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

View File

@ -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)

View File

@ -259,7 +259,7 @@ _ShowLinkBattleParticipants: ; 2c1b2
ld a, "<BOLD_V>"
ld [hli], a
ld [hl], "<BOLD_S>"
callba LinkBattle_TrainerHuds ; no need to callba
farcall LinkBattle_TrainerHuds ; no need to farcall
ld b, SCGB_DIPLOMA
call GetSGBLayout
call SetPalettes

View File

@ -32,7 +32,7 @@ UsedMoveText: ; 105db9
ld [wd265], a
push hl
callba CheckUserIsCharging
farcall CheckUserIsCharging
pop hl
jr nz, .grammar

View File

@ -7,7 +7,7 @@ PrintItemDescription: ; 0x1c8955
ld [CurItem], a
push de
callba GetTMHMItemMove
farcall GetTMHMItemMove
pop hl
ld a, [wd265]
ld [CurSpecies], a

View File

@ -293,7 +293,7 @@ HPBarAnim_PaletteUpdate: ; d7b4
call SetHPPal
ld a, [wCurHPAnimPal]
ld c, a
callba ApplyHPBarPals
farcall ApplyHPBarPals
ret
; d7c9

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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]

View File

@ -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

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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]

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1368,7 +1368,7 @@ _GetDecorationSprite: ; 27085
ld c, a
push de
push hl
callba GetDecorationSprite
farcall GetDecorationSprite
pop hl
pop de
ld a, c

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -58,7 +58,7 @@ CheckFruitTree: ; 44055
; 4405f
PickedFruitTree: ; 4405f
callba TrainerRankings_FruitPicked
farcall TrainerRankings_FruitPicked
ld b, 1
jp GetFruitTreeFlag
; 4406a

View File

@ -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

View File

@ -49,7 +49,7 @@ HealPartyMon: ; c677
ld a, [hl]
ld [bc], a
callba RestoreAllPP
farcall RestoreAllPP
ret
ComputeHPBarPixels: ; c699

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -276,7 +276,7 @@ ListMovePP: ; 50c50
push af
ld [hl], b
push hl
callab GetMaxPPOfMove
callfar GetMaxPPOfMove
pop hl
pop af
ld [hl], a

View File

@ -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

View File

@ -34,7 +34,7 @@ InsertPokemonIntoBox: ; 51322
call CopyBytes
ld a, [CurPartyMon]
ld b, a
callba RestorePPofDepositedPokemon
farcall RestorePPofDepositedPokemon
jp CloseSRAM
InsertPokemonIntoParty: ; 5138b

View File

@ -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)

View File

@ -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

View File

@ -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]

View File

@ -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

View File

@ -86,7 +86,7 @@ GiveOddEgg: ; 1fb4b6
ld [wMobileMonNicknamePointerBuffer], a
ld a, wOddEggName / $100
ld [wMobileMonNicknamePointerBuffer + 1], a
callba AddMobileMonToParty
farcall AddMobileMonToParty
ret
; 1fb546

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -23,7 +23,7 @@ PlaySlowCry: ; fb841
ld [CryLength], a
ld a, h
ld [CryLength + 1], a
callba _PlayCryHeader
farcall _PlayCryHeader
call WaitSFX
.done

View File

@ -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

View File

@ -77,7 +77,7 @@ HandlePlayerStep: ; d4e5 (3:54e5)
ret
.mobile ; d509 (3:5509)
callba TrainerRankings_StepCount
farcall TrainerRankings_StepCount
ret
.fail2 ; d510 (3:5510)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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], "<SHINY>"

View File

@ -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, "♂"

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -120,7 +120,7 @@ CheckRegisteredItem: ; 13345
UseRegisteredItem: ; 133c3
callba CheckItemMenu
farcall CheckItemMenu
ld a, [wItemAttributeParamBuffer]
ld hl, .SwitchTo
rst JumpTable

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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], "<SHINY>"
@ -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]

View File

@ -19,7 +19,7 @@ CopyPkmnToTempMon: ; 5084a
cp OTPARTYMON
jr z, .copywholestruct
ld bc, BOXMON_STRUCT_LENGTH
callab CopyBoxmonToTempMon
callfar CopyBoxmonToTempMon
jr .done
.copywholestruct

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -34,7 +34,7 @@ TrainerCard: ; 25105
call ClearTileMap
call DisableLCD
callba GetCardPic
farcall GetCardPic
ld hl, CardRightCornerGFX
ld de, VTiles2 tile $1c

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

Some files were not shown because too many files have changed in this diff Show More