mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
callba/callab → farcall/callfar
This commit is contained in:
parent
d787c66374
commit
c66d195089
@ -9,7 +9,7 @@ AI_SwitchOrTryItem: ; 38000
|
|||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
callba CheckEnemyLockedIn
|
farcall CheckEnemyLockedIn
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
ld a, [PlayerSubStatus5]
|
ld a, [PlayerSubStatus5]
|
||||||
@ -44,7 +44,7 @@ DontSwitch: ; 38041
|
|||||||
; 38045
|
; 38045
|
||||||
|
|
||||||
SwitchOften: ; 38045
|
SwitchOften: ; 38045
|
||||||
callab CheckAbleToSwitch
|
callfar CheckAbleToSwitch
|
||||||
ld a, [wEnemySwitchMonParam]
|
ld a, [wEnemySwitchMonParam]
|
||||||
and $f0
|
and $f0
|
||||||
jp z, DontSwitch
|
jp z, DontSwitch
|
||||||
@ -80,7 +80,7 @@ SwitchOften: ; 38045
|
|||||||
; 38083
|
; 38083
|
||||||
|
|
||||||
SwitchRarely: ; 38083
|
SwitchRarely: ; 38083
|
||||||
callab CheckAbleToSwitch
|
callfar CheckAbleToSwitch
|
||||||
ld a, [wEnemySwitchMonParam]
|
ld a, [wEnemySwitchMonParam]
|
||||||
and $f0
|
and $f0
|
||||||
jp z, DontSwitch
|
jp z, DontSwitch
|
||||||
@ -115,7 +115,7 @@ SwitchRarely: ; 38083
|
|||||||
; 380c1
|
; 380c1
|
||||||
|
|
||||||
SwitchSometimes: ; 380c1
|
SwitchSometimes: ; 380c1
|
||||||
callab CheckAbleToSwitch
|
callfar CheckAbleToSwitch
|
||||||
ld a, [wEnemySwitchMonParam]
|
ld a, [wEnemySwitchMonParam]
|
||||||
and $f0
|
and $f0
|
||||||
jp z, DontSwitch
|
jp z, DontSwitch
|
||||||
@ -358,12 +358,12 @@ AI_Items: ; 39196
|
|||||||
ld a, [bc]
|
ld a, [bc]
|
||||||
bit CONTEXT_USE_F, a
|
bit CONTEXT_USE_F, a
|
||||||
jr nz, .CheckHalfOrQuarterHP
|
jr nz, .CheckHalfOrQuarterHP
|
||||||
callab AICheckEnemyHalfHP
|
callfar AICheckEnemyHalfHP
|
||||||
jp c, .DontUse
|
jp c, .DontUse
|
||||||
ld a, [bc]
|
ld a, [bc]
|
||||||
bit UNKNOWN_USE_F, a
|
bit UNKNOWN_USE_F, a
|
||||||
jp nz, .CheckQuarterHP
|
jp nz, .CheckQuarterHP
|
||||||
callab AICheckEnemyQuarterHP
|
callfar AICheckEnemyQuarterHP
|
||||||
jp nc, .UseHealItem
|
jp nc, .UseHealItem
|
||||||
call Random
|
call Random
|
||||||
cp 1 + 50 percent
|
cp 1 + 50 percent
|
||||||
@ -371,7 +371,7 @@ AI_Items: ; 39196
|
|||||||
jp .DontUse
|
jp .DontUse
|
||||||
|
|
||||||
.CheckQuarterHP: ; 38254 (e:4254)
|
.CheckQuarterHP: ; 38254 (e:4254)
|
||||||
callab AICheckEnemyQuarterHP
|
callfar AICheckEnemyQuarterHP
|
||||||
jp c, .DontUse
|
jp c, .DontUse
|
||||||
call Random
|
call Random
|
||||||
cp -1 + 20 percent
|
cp -1 + 20 percent
|
||||||
@ -379,9 +379,9 @@ AI_Items: ; 39196
|
|||||||
jr .UseHealItem
|
jr .UseHealItem
|
||||||
|
|
||||||
.CheckHalfOrQuarterHP: ; 38267 (e:4267)
|
.CheckHalfOrQuarterHP: ; 38267 (e:4267)
|
||||||
callab AICheckEnemyHalfHP
|
callfar AICheckEnemyHalfHP
|
||||||
jp c, .DontUse
|
jp c, .DontUse
|
||||||
callab AICheckEnemyQuarterHP
|
callfar AICheckEnemyQuarterHP
|
||||||
jp nc, .UseHealItem
|
jp nc, .UseHealItem
|
||||||
call Random
|
call Random
|
||||||
cp -1 + 20 percent
|
cp -1 + 20 percent
|
||||||
@ -416,7 +416,7 @@ AI_Items: ; 39196
|
|||||||
; 382ae
|
; 382ae
|
||||||
|
|
||||||
.asm_382ae ; This appears to be unused
|
.asm_382ae ; This appears to be unused
|
||||||
callab AICheckEnemyMaxHP
|
callfar AICheckEnemyMaxHP
|
||||||
jr c, .dont_use
|
jr c, .dont_use
|
||||||
push bc
|
push bc
|
||||||
ld de, EnemyMonMaxHP + 1
|
ld de, EnemyMonMaxHP + 1
|
||||||
@ -433,7 +433,7 @@ AI_Items: ; 39196
|
|||||||
ld a, c
|
ld a, c
|
||||||
cp b
|
cp b
|
||||||
jp c, .check_50_percent
|
jp c, .check_50_percent
|
||||||
callab AICheckEnemyQuarterHP
|
callfar AICheckEnemyQuarterHP
|
||||||
jr c, .check_40_percent
|
jr c, .check_40_percent
|
||||||
|
|
||||||
.check_50_percent
|
.check_50_percent
|
||||||
@ -545,7 +545,7 @@ AI_Items: ; 39196
|
|||||||
|
|
||||||
AIUpdateHUD: ; 38387
|
AIUpdateHUD: ; 38387
|
||||||
call UpdateEnemyMonInParty
|
call UpdateEnemyMonInParty
|
||||||
callba UpdateEnemyHUD
|
farcall UpdateEnemyHUD
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
ld hl, wEnemyItemState
|
ld hl, wEnemyItemState
|
||||||
@ -705,7 +705,7 @@ AI_Switch: ; 3846c
|
|||||||
res SUBSTATUS_RAGE, [hl]
|
res SUBSTATUS_RAGE, [hl]
|
||||||
xor a
|
xor a
|
||||||
ld [hBattleTurn], a
|
ld [hBattleTurn], a
|
||||||
callab PursuitSwitch
|
callfar PursuitSwitch
|
||||||
|
|
||||||
push af
|
push af
|
||||||
ld a, [CurOTMon]
|
ld a, [CurOTMon]
|
||||||
@ -726,12 +726,12 @@ AI_Switch: ; 3846c
|
|||||||
.skiptext
|
.skiptext
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wBattleHasJustStarted], a
|
ld [wBattleHasJustStarted], a
|
||||||
callab NewEnemyMonStatus
|
callfar NewEnemyMonStatus
|
||||||
callab ResetEnemyStatLevels
|
callfar ResetEnemyStatLevels
|
||||||
ld hl, PlayerSubStatus1
|
ld hl, PlayerSubStatus1
|
||||||
res SUBSTATUS_IN_LOVE, [hl]
|
res SUBSTATUS_IN_LOVE, [hl]
|
||||||
callba EnemySwitch
|
farcall EnemySwitch
|
||||||
callba ResetBattleParticipants
|
farcall ResetBattleParticipants
|
||||||
xor a
|
xor a
|
||||||
ld [wBattleHasJustStarted], a
|
ld [wBattleHasJustStarted], a
|
||||||
ld a, [wLinkMode]
|
ld a, [wLinkMode]
|
||||||
@ -851,7 +851,7 @@ EnemyUsedXItem:
|
|||||||
push bc
|
push bc
|
||||||
call PrintText_UsedItemOn
|
call PrintText_UsedItemOn
|
||||||
pop bc
|
pop bc
|
||||||
callba CheckIfStatCanBeRaised
|
farcall CheckIfStatCanBeRaised
|
||||||
jp AIUpdateHUD
|
jp AIUpdateHUD
|
||||||
; 38568
|
; 38568
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ AIChooseMove: ; 440ce
|
|||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
; No use picking a move if there's no choice.
|
; No use picking a move if there's no choice.
|
||||||
callba CheckEnemyLockedIn
|
farcall CheckEnemyLockedIn
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
|
|
||||||
|
@ -141,7 +141,7 @@ AI_Redundant: ; 2c41a
|
|||||||
jr .NotRedundant
|
jr .NotRedundant
|
||||||
|
|
||||||
.Attract: ; 2c4fe
|
.Attract: ; 2c4fe
|
||||||
callba CheckOppositeGender
|
farcall CheckOppositeGender
|
||||||
jr c, .Redundant
|
jr c, .Redundant
|
||||||
ld a, [PlayerSubStatus1]
|
ld a, [PlayerSubStatus1]
|
||||||
bit SUBSTATUS_IN_LOVE, a
|
bit SUBSTATUS_IN_LOVE, a
|
||||||
@ -184,7 +184,7 @@ AI_Redundant: ; 2c41a
|
|||||||
.MorningSun:
|
.MorningSun:
|
||||||
.Synthesis:
|
.Synthesis:
|
||||||
.Moonlight: ; 2c539
|
.Moonlight: ; 2c539
|
||||||
callba AICheckEnemyMaxHP
|
farcall AICheckEnemyMaxHP
|
||||||
jr nc, .NotRedundant
|
jr nc, .NotRedundant
|
||||||
|
|
||||||
.Teleport:
|
.Teleport:
|
||||||
|
@ -29,7 +29,7 @@ AI_Basic: ; 38591
|
|||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
callba AI_Redundant
|
farcall AI_Redundant
|
||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
pop hl
|
pop hl
|
||||||
@ -176,7 +176,7 @@ AI_Types: ; 38635
|
|||||||
push de
|
push de
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [hBattleTurn], a
|
ld [hBattleTurn], a
|
||||||
callab BattleCheckTypeMatchup
|
callfar BattleCheckTypeMatchup
|
||||||
pop de
|
pop de
|
||||||
pop bc
|
pop bc
|
||||||
pop hl
|
pop hl
|
||||||
@ -429,7 +429,7 @@ AI_Smart_LeechHit: ; 387f7
|
|||||||
push hl
|
push hl
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [hBattleTurn], a
|
ld [hBattleTurn], a
|
||||||
callab BattleCheckTypeMatchup
|
callfar BattleCheckTypeMatchup
|
||||||
pop hl
|
pop hl
|
||||||
|
|
||||||
; 60% chance to discourage this move if not very effective.
|
; 60% chance to discourage this move if not very effective.
|
||||||
@ -510,7 +510,7 @@ AI_Smart_LockOn: ; 3881d
|
|||||||
|
|
||||||
push hl
|
push hl
|
||||||
push bc
|
push bc
|
||||||
callba BattleCheckTypeMatchup
|
farcall BattleCheckTypeMatchup
|
||||||
ld a, [wd265]
|
ld a, [wd265]
|
||||||
cp $a
|
cp $a
|
||||||
pop bc
|
pop bc
|
||||||
@ -572,7 +572,7 @@ AI_Smart_Selfdestruct: ; 388a6
|
|||||||
|
|
||||||
; Unless this is the enemy's last Pokemon...
|
; Unless this is the enemy's last Pokemon...
|
||||||
push hl
|
push hl
|
||||||
callba FindAliveEnemyMons
|
farcall FindAliveEnemyMons
|
||||||
pop hl
|
pop hl
|
||||||
jr nc, .asm_388b7
|
jr nc, .asm_388b7
|
||||||
|
|
||||||
@ -970,7 +970,7 @@ AI_Smart_ForceSwitch: ; 38a2a
|
|||||||
; Consider player's type(s) if its moves are unknown.
|
; Consider player's type(s) if its moves are unknown.
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
callab CheckPlayerMoveTypeMatchups
|
callfar CheckPlayerMoveTypeMatchups
|
||||||
ld a, [wEnemyAISwitchScore]
|
ld a, [wEnemyAISwitchScore]
|
||||||
cp 10 ; neutral
|
cp 10 ; neutral
|
||||||
pop hl
|
pop hl
|
||||||
@ -1368,7 +1368,7 @@ AI_Smart_Mimic: ; 38ba8
|
|||||||
|
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBattleTurn], a
|
ld [hBattleTurn], a
|
||||||
callab BattleCheckTypeMatchup
|
callfar BattleCheckTypeMatchup
|
||||||
|
|
||||||
ld a, [wd265]
|
ld a, [wd265]
|
||||||
cp $a
|
cp $a
|
||||||
@ -1763,9 +1763,9 @@ AI_Smart_PriorityHit: ; 38d5a
|
|||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBattleTurn], a
|
ld [hBattleTurn], a
|
||||||
push hl
|
push hl
|
||||||
callab EnemyAttackDamage
|
callfar EnemyAttackDamage
|
||||||
callab BattleCommand_DamageCalc
|
callfar BattleCommand_DamageCalc
|
||||||
callab BattleCommand_Stab
|
callfar BattleCommand_Stab
|
||||||
pop hl
|
pop hl
|
||||||
ld a, [CurDamage + 1]
|
ld a, [CurDamage + 1]
|
||||||
ld c, a
|
ld c, a
|
||||||
@ -1811,7 +1811,7 @@ AI_Smart_Conversion2: ; 38d98
|
|||||||
xor a
|
xor a
|
||||||
ld [hBattleTurn], a
|
ld [hBattleTurn], a
|
||||||
|
|
||||||
callab BattleCheckTypeMatchup
|
callfar BattleCheckTypeMatchup
|
||||||
|
|
||||||
ld a, [wd265]
|
ld a, [wd265]
|
||||||
cp $a
|
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.
|
; Otherwise, discourage this move unless the player only has not very effective moves against the enemy.
|
||||||
push hl
|
push hl
|
||||||
callab CheckPlayerMoveTypeMatchups
|
callfar CheckPlayerMoveTypeMatchups
|
||||||
ld a, [wEnemyAISwitchScore]
|
ld a, [wEnemyAISwitchScore]
|
||||||
cp $b ; not very effective
|
cp $b ; not very effective
|
||||||
pop hl
|
pop hl
|
||||||
@ -2008,7 +2008,7 @@ AI_Smart_Curse: ; 38e5c
|
|||||||
jp nz, AIDiscourageMove
|
jp nz, AIDiscourageMove
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
callba FindAliveEnemyMons
|
farcall FindAliveEnemyMons
|
||||||
pop hl
|
pop hl
|
||||||
jr nc, .asm_38eb0
|
jr nc, .asm_38eb0
|
||||||
|
|
||||||
@ -2137,7 +2137,7 @@ AI_Smart_Foresight: ; 38f1d
|
|||||||
|
|
||||||
AI_Smart_PerishSong: ; 38f4a
|
AI_Smart_PerishSong: ; 38f4a
|
||||||
push hl
|
push hl
|
||||||
callab FindAliveEnemyMons
|
callfar FindAliveEnemyMons
|
||||||
pop hl
|
pop hl
|
||||||
jr c, .no
|
jr c, .no
|
||||||
|
|
||||||
@ -2146,7 +2146,7 @@ AI_Smart_PerishSong: ; 38f4a
|
|||||||
jr nz, .yes
|
jr nz, .yes
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
callab CheckPlayerMoveTypeMatchups
|
callfar CheckPlayerMoveTypeMatchups
|
||||||
ld a, [wEnemyAISwitchScore]
|
ld a, [wEnemyAISwitchScore]
|
||||||
cp 10 ; 1.0
|
cp 10 ; 1.0
|
||||||
pop hl
|
pop hl
|
||||||
@ -2404,7 +2404,7 @@ AI_Smart_BatonPass: ; 39062
|
|||||||
; Consider player's type(s) if its moves are unknown.
|
; Consider player's type(s) if its moves are unknown.
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
callab CheckPlayerMoveTypeMatchups
|
callfar CheckPlayerMoveTypeMatchups
|
||||||
ld a, [wEnemyAISwitchScore]
|
ld a, [wEnemyAISwitchScore]
|
||||||
cp 10 ; neutral
|
cp 10 ; neutral
|
||||||
pop hl
|
pop hl
|
||||||
@ -2466,8 +2466,8 @@ AI_Smart_HiddenPower: ; 3909e
|
|||||||
ld [hBattleTurn], a
|
ld [hBattleTurn], a
|
||||||
|
|
||||||
; Calculate Hidden Power's type and base power based on enemy's DVs.
|
; Calculate Hidden Power's type and base power based on enemy's DVs.
|
||||||
callab HiddenPowerDamage
|
callfar HiddenPowerDamage
|
||||||
callab BattleCheckTypeMatchup
|
callfar BattleCheckTypeMatchup
|
||||||
pop hl
|
pop hl
|
||||||
|
|
||||||
; Discourage Hidden Power if not very effective.
|
; Discourage Hidden Power if not very effective.
|
||||||
@ -3336,13 +3336,13 @@ AIDamageCalc: ; 393e7
|
|||||||
ld hl, .ConstantDamageEffects
|
ld hl, .ConstantDamageEffects
|
||||||
call IsInArray
|
call IsInArray
|
||||||
jr nc, .asm_39400
|
jr nc, .asm_39400
|
||||||
callab BattleCommand_ConstantDamage
|
callfar BattleCommand_ConstantDamage
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_39400
|
.asm_39400
|
||||||
callab EnemyAttackDamage
|
callfar EnemyAttackDamage
|
||||||
callab BattleCommand_DamageCalc
|
callfar BattleCommand_DamageCalc
|
||||||
callab BattleCommand_Stab
|
callfar BattleCommand_Stab
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.ConstantDamageEffects:
|
.ConstantDamageEffects:
|
||||||
@ -3459,7 +3459,7 @@ AI_Status: ; 39453
|
|||||||
push de
|
push de
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [hBattleTurn], a
|
ld [hBattleTurn], a
|
||||||
callab BattleCheckTypeMatchup
|
callfar BattleCheckTypeMatchup
|
||||||
pop de
|
pop de
|
||||||
pop bc
|
pop bc
|
||||||
pop hl
|
pop hl
|
||||||
|
@ -61,7 +61,7 @@ BattleAnimRunScript: ; cc11c
|
|||||||
and a
|
and a
|
||||||
jr nz, .hi_byte
|
jr nz, .hi_byte
|
||||||
|
|
||||||
callba CheckBattleScene
|
farcall CheckBattleScene
|
||||||
jr c, .disabled
|
jr c, .disabled
|
||||||
|
|
||||||
call BattleAnimClearHud
|
call BattleAnimClearHud
|
||||||
@ -169,7 +169,7 @@ BattleAnimRestoreHuds: ; cc1bb
|
|||||||
|
|
||||||
ld hl, UpdateBattleHuds
|
ld hl, UpdateBattleHuds
|
||||||
ld a, BANK(UpdatePlayerHUD)
|
ld a, BANK(UpdatePlayerHUD)
|
||||||
rst FarCall ; Why the heck is this a callab?
|
rst FarCall ; Why not "call UpdateBattleHuds"?
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
@ -907,7 +907,7 @@ BattleAnimCmd_PlayerHeadObj: ; cc57e (33:457e)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
BattleAnimCmd_CheckPokeball: ; cc5d0 (33:45d0)
|
BattleAnimCmd_CheckPokeball: ; cc5d0 (33:45d0)
|
||||||
callab GetPokeBallWobble
|
callfar GetPokeBallWobble
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [BattleAnimVar], a
|
ld [BattleAnimVar], a
|
||||||
ret
|
ret
|
||||||
@ -1128,11 +1128,11 @@ BattleAnimCmd_DropSub: ; cc750 (33:4750)
|
|||||||
and a
|
and a
|
||||||
jr z, .player
|
jr z, .player
|
||||||
|
|
||||||
callab DropEnemySub
|
callfar DropEnemySub
|
||||||
jr .done
|
jr .done
|
||||||
|
|
||||||
.player
|
.player
|
||||||
callab DropPlayerSub
|
callfar DropPlayerSub
|
||||||
|
|
||||||
.done
|
.done
|
||||||
pop af
|
pop af
|
||||||
@ -1221,7 +1221,7 @@ BattleAnimCmd_Sound: ; cc7cd (33:47cd)
|
|||||||
call GetBattleAnimByte
|
call GetBattleAnimByte
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
callab PlayStereoSFX
|
callfar PlayStereoSFX
|
||||||
|
|
||||||
ret
|
ret
|
||||||
; cc7f8 (33:47f8)
|
; cc7f8 (33:47f8)
|
||||||
@ -1311,7 +1311,7 @@ endr
|
|||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wStereoPanningMask], a
|
ld [wStereoPanningMask], a
|
||||||
|
|
||||||
callab _PlayCryHeader
|
callfar _PlayCryHeader
|
||||||
|
|
||||||
.done
|
.done
|
||||||
pop af
|
pop af
|
||||||
|
@ -550,7 +550,7 @@ BattleBGEffect_HeadFollow: ; c8281 (32:4281)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
_QueueBattleAnimation: ; c82ee (32:42ee)
|
_QueueBattleAnimation: ; c82ee (32:42ee)
|
||||||
callab QueueBattleAnimation
|
callfar QueueBattleAnimation
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleBGEffect_27: ; c82f5 (32:42f5)
|
BattleBGEffect_27: ; c82f5 (32:42f5)
|
||||||
@ -2944,13 +2944,13 @@ BattleBGEffects_CheckSGB: ; c9059 (32:5059)
|
|||||||
|
|
||||||
BattleBGEffects_Sine: ; c905d (32:505d)
|
BattleBGEffects_Sine: ; c905d (32:505d)
|
||||||
ld e, a
|
ld e, a
|
||||||
callab BattleAnim_Sine_e
|
callfar BattleAnim_Sine_e
|
||||||
ld a, e
|
ld a, e
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleBGEffects_Cosine: ; c9066 (32:5066)
|
BattleBGEffects_Cosine: ; c9066 (32:5066)
|
||||||
ld e, a
|
ld e, a
|
||||||
callab BattleAnim_Cosine_e
|
callfar BattleAnim_Cosine_e
|
||||||
ld a, e
|
ld a, e
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
246
battle/core.asm
246
battle/core.asm
@ -175,13 +175,13 @@ BattleTurn: ; 3c12f
|
|||||||
|
|
||||||
call HandleBerserkGene
|
call HandleBerserkGene
|
||||||
call UpdateBattleMonInParty
|
call UpdateBattleMonInParty
|
||||||
callba AIChooseMove
|
farcall AIChooseMove
|
||||||
|
|
||||||
call IsMobileBattle
|
call IsMobileBattle
|
||||||
jr nz, .not_disconnected
|
jr nz, .not_disconnected
|
||||||
callba Function100da5
|
farcall Function100da5
|
||||||
callba StartMobileInactivityTimer
|
farcall StartMobileInactivityTimer
|
||||||
callba Function100dd8
|
farcall Function100dd8
|
||||||
jp c, .quit
|
jp c, .quit
|
||||||
.not_disconnected
|
.not_disconnected
|
||||||
|
|
||||||
@ -377,7 +377,7 @@ HandleBerserkGene: ; 3c27c
|
|||||||
.go
|
.go
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
callab GetUserItem
|
callfar GetUserItem
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
sub BERSERK_GENE
|
sub BERSERK_GENE
|
||||||
@ -405,14 +405,14 @@ HandleBerserkGene: ; 3c27c
|
|||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld [AttackMissed], a
|
ld [AttackMissed], a
|
||||||
ld [EffectFailed], a
|
ld [EffectFailed], a
|
||||||
callba BattleCommand_AttackUp2
|
farcall BattleCommand_AttackUp2
|
||||||
pop af
|
pop af
|
||||||
pop hl
|
pop hl
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
call GetItemName
|
call GetItemName
|
||||||
ld hl, BattleText_UsersStringBuffer1Activated
|
ld hl, BattleText_UsersStringBuffer1Activated
|
||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
callab BattleCommand_StatUpMessage
|
callfar BattleCommand_StatUpMessage
|
||||||
pop af
|
pop af
|
||||||
bit SUBSTATUS_CONFUSED, a
|
bit SUBSTATUS_CONFUSED, a
|
||||||
ret nz
|
ret nz
|
||||||
@ -473,7 +473,7 @@ DetermineMoveOrder: ; 3c314
|
|||||||
jp .player_first
|
jp .player_first
|
||||||
|
|
||||||
.switch
|
.switch
|
||||||
callab AI_Switch
|
callfar AI_Switch
|
||||||
call SetEnemyTurn
|
call SetEnemyTurn
|
||||||
call SpikesDamage
|
call SpikesDamage
|
||||||
jp .enemy_first
|
jp .enemy_first
|
||||||
@ -489,9 +489,9 @@ DetermineMoveOrder: ; 3c314
|
|||||||
|
|
||||||
.equal_priority
|
.equal_priority
|
||||||
call SetPlayerTurn
|
call SetPlayerTurn
|
||||||
callab GetUserItem
|
callfar GetUserItem
|
||||||
push bc
|
push bc
|
||||||
callab GetOpponentItem
|
callfar GetOpponentItem
|
||||||
pop de
|
pop de
|
||||||
ld a, d
|
ld a, d
|
||||||
cp HELD_QUICK_CLAW
|
cp HELD_QUICK_CLAW
|
||||||
@ -651,7 +651,7 @@ ParsePlayerAction: ; 3c434
|
|||||||
|
|
||||||
.encored
|
.encored
|
||||||
call SetPlayerTurn
|
call SetPlayerTurn
|
||||||
callab UpdateMoveData
|
callfar UpdateMoveData
|
||||||
xor a
|
xor a
|
||||||
ld [wPlayerCharging], a
|
ld [wPlayerCharging], a
|
||||||
ld a, [wPlayerMoveStruct + MOVE_EFFECT]
|
ld a, [wPlayerMoveStruct + MOVE_EFFECT]
|
||||||
@ -894,7 +894,7 @@ Battle_EnemyFirst: ; 3c5fe
|
|||||||
call SetEnemyTurn
|
call SetEnemyTurn
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wEnemyGoesFirst], a
|
ld [wEnemyGoesFirst], a
|
||||||
callab AI_SwitchOrTryItem
|
callfar AI_SwitchOrTryItem
|
||||||
jr c, .switch_item
|
jr c, .switch_item
|
||||||
call EnemyTurn_EndOpponentProtectEndureDestinyBond
|
call EnemyTurn_EndOpponentProtectEndureDestinyBond
|
||||||
call CheckMobileBattleError
|
call CheckMobileBattleError
|
||||||
@ -935,7 +935,7 @@ Battle_PlayerFirst: ; 3c664
|
|||||||
xor a
|
xor a
|
||||||
ld [wEnemyGoesFirst], a
|
ld [wEnemyGoesFirst], a
|
||||||
call SetEnemyTurn
|
call SetEnemyTurn
|
||||||
callab AI_SwitchOrTryItem
|
callfar AI_SwitchOrTryItem
|
||||||
push af
|
push af
|
||||||
call PlayerTurn_EndOpponentProtectEndureDestinyBond
|
call PlayerTurn_EndOpponentProtectEndureDestinyBond
|
||||||
pop bc
|
pop bc
|
||||||
@ -984,14 +984,14 @@ Battle_PlayerFirst: ; 3c664
|
|||||||
PlayerTurn_EndOpponentProtectEndureDestinyBond: ; 3c6cf
|
PlayerTurn_EndOpponentProtectEndureDestinyBond: ; 3c6cf
|
||||||
call SetPlayerTurn
|
call SetPlayerTurn
|
||||||
call EndUserDestinyBond
|
call EndUserDestinyBond
|
||||||
callab DoPlayerTurn
|
callfar DoPlayerTurn
|
||||||
jp EndOpponentProtectEndureDestinyBond
|
jp EndOpponentProtectEndureDestinyBond
|
||||||
; 3c6de
|
; 3c6de
|
||||||
|
|
||||||
EnemyTurn_EndOpponentProtectEndureDestinyBond: ; 3c6de
|
EnemyTurn_EndOpponentProtectEndureDestinyBond: ; 3c6de
|
||||||
call SetEnemyTurn
|
call SetEnemyTurn
|
||||||
call EndUserDestinyBond
|
call EndUserDestinyBond
|
||||||
callab DoEnemyTurn
|
callfar DoEnemyTurn
|
||||||
jp EndOpponentProtectEndureDestinyBond
|
jp EndOpponentProtectEndureDestinyBond
|
||||||
; 3c6ed
|
; 3c6ed
|
||||||
|
|
||||||
@ -1323,7 +1323,7 @@ HandleLeftovers: ; 3c8eb
|
|||||||
call SetPlayerTurn
|
call SetPlayerTurn
|
||||||
.do_it
|
.do_it
|
||||||
|
|
||||||
callab GetUserItem
|
callfar GetUserItem
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
call GetItemName
|
call GetItemName
|
||||||
@ -1373,7 +1373,7 @@ HandleMysteryberry: ; 3c93c
|
|||||||
call SetPlayerTurn
|
call SetPlayerTurn
|
||||||
|
|
||||||
.do_it
|
.do_it
|
||||||
callab GetUserItem
|
callfar GetUserItem
|
||||||
ld a, b
|
ld a, b
|
||||||
cp HELD_RESTORE_PP
|
cp HELD_RESTORE_PP
|
||||||
jr nz, .quit
|
jr nz, .quit
|
||||||
@ -1470,7 +1470,7 @@ HandleMysteryberry: ; 3c93c
|
|||||||
add b
|
add b
|
||||||
ld [de], a
|
ld [de], a
|
||||||
.skip_checks
|
.skip_checks
|
||||||
callab GetUserItem
|
callfar GetUserItem
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
xor a
|
xor a
|
||||||
@ -1536,13 +1536,13 @@ HandleFutureSight: ; 3ca26
|
|||||||
ld a, FUTURE_SIGHT
|
ld a, FUTURE_SIGHT
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
|
||||||
callab UpdateMoveData
|
callfar UpdateMoveData
|
||||||
xor a
|
xor a
|
||||||
ld [AttackMissed], a
|
ld [AttackMissed], a
|
||||||
ld [AlreadyDisobeyed], a
|
ld [AlreadyDisobeyed], a
|
||||||
ld a, 10
|
ld a, 10
|
||||||
ld [TypeModifier], a
|
ld [TypeModifier], a
|
||||||
callab DoMove
|
callfar DoMove
|
||||||
xor a
|
xor a
|
||||||
ld [CurDamage], a
|
ld [CurDamage], a
|
||||||
ld [CurDamage + 1], a
|
ld [CurDamage + 1], a
|
||||||
@ -2359,7 +2359,7 @@ HandleEnemySwitch: ; 3cf4a
|
|||||||
ld e, HP_BAR_LENGTH_PX
|
ld e, HP_BAR_LENGTH_PX
|
||||||
call UpdateHPPal
|
call UpdateHPPal
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
callba EnemySwitch_TrainerHud
|
farcall EnemySwitch_TrainerHud
|
||||||
ld a, [wLinkMode]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
jr z, .not_linked
|
jr z, .not_linked
|
||||||
@ -2417,7 +2417,7 @@ WinTrainerBattle: ; 3cfa4
|
|||||||
and a
|
and a
|
||||||
ld a, b
|
ld a, b
|
||||||
call z, PlayVictoryMusic
|
call z, PlayVictoryMusic
|
||||||
callab Battle_GetTrainerName
|
callfar Battle_GetTrainerName
|
||||||
ld hl, BattleText_EnemyWasDefeated
|
ld hl, BattleText_EnemyWasDefeated
|
||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
|
|
||||||
@ -2452,7 +2452,7 @@ WinTrainerBattle: ; 3cfa4
|
|||||||
ld c, 40
|
ld c, 40
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
ld c, $4 ; win
|
ld c, $4 ; win
|
||||||
callba Mobile_PrintOpponentBattleMessage
|
farcall Mobile_PrintOpponentBattleMessage
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.battle_tower
|
.battle_tower
|
||||||
@ -2461,7 +2461,7 @@ WinTrainerBattle: ; 3cfa4
|
|||||||
call DelayFrames
|
call DelayFrames
|
||||||
call EmptyBattleTextBox
|
call EmptyBattleTextBox
|
||||||
ld c, $3
|
ld c, $3
|
||||||
callba BattleTowerText
|
farcall BattleTowerText
|
||||||
call WaitPressAorB_BlinkCursor
|
call WaitPressAorB_BlinkCursor
|
||||||
ld hl, wPayDayMoney
|
ld hl, wPayDayMoney
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
@ -2589,7 +2589,7 @@ AddBattleMoneyToAccount: ; 3d0be
|
|||||||
push bc
|
push bc
|
||||||
ld b, h
|
ld b, h
|
||||||
ld c, l
|
ld c, l
|
||||||
callba TrainerRankings_AddToBattlePayouts
|
farcall TrainerRankings_AddToBattlePayouts
|
||||||
pop bc
|
pop bc
|
||||||
pop hl
|
pop hl
|
||||||
.loop
|
.loop
|
||||||
@ -2783,7 +2783,7 @@ PlayerMonFaintHappinessMod: ; 3d1aa
|
|||||||
.got_param
|
.got_param
|
||||||
ld a, [CurBattleMon]
|
ld a, [CurBattleMon]
|
||||||
ld [CurPartyMon], a
|
ld [CurPartyMon], a
|
||||||
callab ChangeHappiness
|
callfar ChangeHappiness
|
||||||
ld a, [wBattleResult]
|
ld a, [wBattleResult]
|
||||||
and %11000000
|
and %11000000
|
||||||
add $1
|
add $1
|
||||||
@ -2932,16 +2932,16 @@ IsMobileBattle: ; 3d2f1
|
|||||||
SetUpBattlePartyMenu_NoLoop: ; 3d2f7
|
SetUpBattlePartyMenu_NoLoop: ; 3d2f7
|
||||||
call ClearBGPalettes
|
call ClearBGPalettes
|
||||||
SetUpBattlePartyMenu: ; switch to fullscreen menu?
|
SetUpBattlePartyMenu: ; switch to fullscreen menu?
|
||||||
callba LoadPartyMenuGFX
|
farcall LoadPartyMenuGFX
|
||||||
callba InitPartyMenuWithCancel
|
farcall InitPartyMenuWithCancel
|
||||||
callba InitPartyMenuBGPal7
|
farcall InitPartyMenuBGPal7
|
||||||
callba InitPartyMenuGFX
|
farcall InitPartyMenuGFX
|
||||||
ret
|
ret
|
||||||
; 3d313
|
; 3d313
|
||||||
|
|
||||||
JumpToPartyMenuAndPrintText: ; 3d313
|
JumpToPartyMenuAndPrintText: ; 3d313
|
||||||
callba WritePartyMenuTilemap
|
farcall WritePartyMenuTilemap
|
||||||
callba PrintPartyMenuText
|
farcall PrintPartyMenuText
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
call SetPalettes
|
call SetPalettes
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
@ -2951,11 +2951,11 @@ JumpToPartyMenuAndPrintText: ; 3d313
|
|||||||
SelectBattleMon: ; 3d329
|
SelectBattleMon: ; 3d329
|
||||||
call IsMobileBattle
|
call IsMobileBattle
|
||||||
jr z, .mobile
|
jr z, .mobile
|
||||||
callba PartyMenuSelect
|
farcall PartyMenuSelect
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.mobile
|
.mobile
|
||||||
callba Mobile_PartyMenuSelect
|
farcall Mobile_PartyMenuSelect
|
||||||
ret
|
ret
|
||||||
; 3d33c
|
; 3d33c
|
||||||
|
|
||||||
@ -3067,7 +3067,7 @@ LostBattle: ; 3d38e
|
|||||||
|
|
||||||
call EmptyBattleTextBox
|
call EmptyBattleTextBox
|
||||||
ld c, 2
|
ld c, 2
|
||||||
callba BattleTowerText
|
farcall BattleTowerText
|
||||||
call WaitPressAorB_BlinkCursor
|
call WaitPressAorB_BlinkCursor
|
||||||
call ClearTileMap
|
call ClearTileMap
|
||||||
call ClearBGPalettes
|
call ClearBGPalettes
|
||||||
@ -3118,7 +3118,7 @@ LostBattle: ; 3d38e
|
|||||||
call DelayFrames
|
call DelayFrames
|
||||||
|
|
||||||
ld c, $3 ; lost
|
ld c, $3 ; lost
|
||||||
callba Mobile_PrintOpponentBattleMessage
|
farcall Mobile_PrintOpponentBattleMessage
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
; 3d432
|
; 3d432
|
||||||
@ -3424,7 +3424,7 @@ LookUpTheEffectivenessOfEveryMove: ; 3d5d7
|
|||||||
ld a, BANK(Moves)
|
ld a, BANK(Moves)
|
||||||
call FarCopyBytes
|
call FarCopyBytes
|
||||||
call SetEnemyTurn
|
call SetEnemyTurn
|
||||||
callab BattleCheckTypeMatchup
|
callfar BattleCheckTypeMatchup
|
||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
pop hl
|
pop hl
|
||||||
@ -3460,13 +3460,13 @@ IsThePlayerPkmnTypesEffectiveAgainstOTPkmn: ; 3d618
|
|||||||
ld a, [BattleMonType1]
|
ld a, [BattleMonType1]
|
||||||
ld [wPlayerMoveStruct + MOVE_TYPE], a
|
ld [wPlayerMoveStruct + MOVE_TYPE], a
|
||||||
call SetPlayerTurn
|
call SetPlayerTurn
|
||||||
callab BattleCheckTypeMatchup
|
callfar BattleCheckTypeMatchup
|
||||||
ld a, [wd265]
|
ld a, [wd265]
|
||||||
cp 10 + 1 ; 1.0 + 0.1
|
cp 10 + 1 ; 1.0 + 0.1
|
||||||
jr nc, .super_effective
|
jr nc, .super_effective
|
||||||
ld a, [BattleMonType2]
|
ld a, [BattleMonType2]
|
||||||
ld [wPlayerMoveStruct + MOVE_TYPE], a
|
ld [wPlayerMoveStruct + MOVE_TYPE], a
|
||||||
callab BattleCheckTypeMatchup
|
callfar BattleCheckTypeMatchup
|
||||||
ld a, [wd265]
|
ld a, [wd265]
|
||||||
cp 10 + 1 ; 1.0 + 0.1
|
cp 10 + 1 ; 1.0 + 0.1
|
||||||
jr nc, .super_effective
|
jr nc, .super_effective
|
||||||
@ -3608,7 +3608,7 @@ CheckWhetherToAskSwitch: ; 3d714
|
|||||||
push af
|
push af
|
||||||
ld a, [CurBattleMon]
|
ld a, [CurBattleMon]
|
||||||
ld [CurPartyMon], a
|
ld [CurPartyMon], a
|
||||||
callba CheckCurPartyMonFainted
|
farcall CheckCurPartyMonFainted
|
||||||
pop bc
|
pop bc
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [CurPartyMon], a
|
ld [CurPartyMon], a
|
||||||
@ -3624,7 +3624,7 @@ CheckWhetherToAskSwitch: ; 3d714
|
|||||||
OfferSwitch: ; 3d74b
|
OfferSwitch: ; 3d74b
|
||||||
ld a, [CurPartyMon]
|
ld a, [CurPartyMon]
|
||||||
push af
|
push af
|
||||||
callab Battle_GetTrainerName
|
callfar Battle_GetTrainerName
|
||||||
ld hl, BattleText_EnemyIsAboutToUseWillPlayerChangePkmn
|
ld hl, BattleText_EnemyIsAboutToUseWillPlayerChangePkmn
|
||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
lb bc, 1, 7
|
lb bc, 1, 7
|
||||||
@ -3675,7 +3675,7 @@ ClearEnemyMonBox: ; 3d7a0
|
|||||||
; 3d7b8
|
; 3d7b8
|
||||||
|
|
||||||
Function_BattleTextEnemySentOut: ; 3d7b8
|
Function_BattleTextEnemySentOut: ; 3d7b8
|
||||||
callab Battle_GetTrainerName
|
callfar Battle_GetTrainerName
|
||||||
ld hl, BattleText_EnemySentOut
|
ld hl, BattleText_EnemySentOut
|
||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
jp WaitBGMap
|
jp WaitBGMap
|
||||||
@ -3707,9 +3707,9 @@ Function_SetEnemyPkmnAndSendOutAnimation: ; 3d7c7
|
|||||||
.not_shiny
|
.not_shiny
|
||||||
|
|
||||||
ld bc, TempMonSpecies
|
ld bc, TempMonSpecies
|
||||||
callba CheckFaintedFrzSlp
|
farcall CheckFaintedFrzSlp
|
||||||
jr c, .skip_cry
|
jr c, .skip_cry
|
||||||
callba CheckBattleScene
|
farcall CheckBattleScene
|
||||||
jr c, .cry_no_anim
|
jr c, .cry_no_anim
|
||||||
hlcoord 12, 0
|
hlcoord 12, 0
|
||||||
ld d, $0
|
ld d, $0
|
||||||
@ -3851,7 +3851,7 @@ TryToRunAwayFromBattle: ; 3d8b3
|
|||||||
ld a, [BattleMonItem]
|
ld a, [BattleMonItem]
|
||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
ld b, a
|
ld b, a
|
||||||
callab GetItemHeldEffect
|
callfar GetItemHeldEffect
|
||||||
ld a, b
|
ld a, b
|
||||||
cp HELD_ESCAPE
|
cp HELD_ESCAPE
|
||||||
pop de
|
pop de
|
||||||
@ -4054,7 +4054,7 @@ BattleCheckEnemyShininess: ; 3da79
|
|||||||
BattleCheckShininess: ; 3da7c
|
BattleCheckShininess: ; 3da7c
|
||||||
ld b, h
|
ld b, h
|
||||||
ld c, l
|
ld c, l
|
||||||
callab CheckShininess
|
callfar CheckShininess
|
||||||
ret
|
ret
|
||||||
; 3da85
|
; 3da85
|
||||||
|
|
||||||
@ -4208,7 +4208,7 @@ SendOutPlayerMon: ; 3db5f
|
|||||||
call GetPartyParamLocation
|
call GetPartyParamLocation
|
||||||
ld b, h
|
ld b, h
|
||||||
ld c, l
|
ld c, l
|
||||||
callba CheckFaintedFrzSlp
|
farcall CheckFaintedFrzSlp
|
||||||
jr c, .statused
|
jr c, .statused
|
||||||
ld a, $f0
|
ld a, $f0
|
||||||
ld [CryTracks], a
|
ld [CryTracks], a
|
||||||
@ -4418,7 +4418,7 @@ HandleHealingItems: ; 3dcf9
|
|||||||
; 3dd2f
|
; 3dd2f
|
||||||
|
|
||||||
HandleHPHealingItem: ; 3dd2f
|
HandleHPHealingItem: ; 3dd2f
|
||||||
callab GetOpponentItem
|
callfar GetOpponentItem
|
||||||
ld a, b
|
ld a, b
|
||||||
cp HELD_BERRY
|
cp HELD_BERRY
|
||||||
ret nz
|
ret nz
|
||||||
@ -4502,11 +4502,11 @@ HandleHPHealingItem: ; 3dd2f
|
|||||||
predef AnimateHPBar
|
predef AnimateHPBar
|
||||||
UseOpponentItem:
|
UseOpponentItem:
|
||||||
call RefreshBattleHuds
|
call RefreshBattleHuds
|
||||||
callab GetOpponentItem
|
callfar GetOpponentItem
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
call GetItemName
|
call GetItemName
|
||||||
callab ConsumeHeldItem
|
callfar ConsumeHeldItem
|
||||||
ld hl, RecoveredUsingText
|
ld hl, RecoveredUsingText
|
||||||
jp StdBattleTextBox
|
jp StdBattleTextBox
|
||||||
; 3ddc8
|
; 3ddc8
|
||||||
@ -4531,7 +4531,7 @@ ItemRecoveryAnim: ; 3ddc8
|
|||||||
; 3dde9
|
; 3dde9
|
||||||
|
|
||||||
UseHeldStatusHealingItem: ; 3dde9
|
UseHeldStatusHealingItem: ; 3dde9
|
||||||
callab GetOpponentItem
|
callfar GetOpponentItem
|
||||||
ld hl, .Statuses
|
ld hl, .Statuses
|
||||||
.loop
|
.loop
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
@ -4600,7 +4600,7 @@ UseConfusionHealingItem: ; 3de51
|
|||||||
call GetBattleVar
|
call GetBattleVar
|
||||||
bit SUBSTATUS_CONFUSED, a
|
bit SUBSTATUS_CONFUSED, a
|
||||||
ret z
|
ret z
|
||||||
callab GetOpponentItem
|
callfar GetOpponentItem
|
||||||
ld a, b
|
ld a, b
|
||||||
cp HELD_HEAL_CONFUSION
|
cp HELD_HEAL_CONFUSION
|
||||||
jr z, .heal_status
|
jr z, .heal_status
|
||||||
@ -4667,7 +4667,7 @@ HandleStatBoostingHeldItems: ; 3de97
|
|||||||
push bc
|
push bc
|
||||||
ld a, [bc]
|
ld a, [bc]
|
||||||
ld b, a
|
ld b, a
|
||||||
callab GetItemHeldEffect
|
callfar GetItemHeldEffect
|
||||||
ld hl, .StatUpItems
|
ld hl, .StatUpItems
|
||||||
.loop
|
.loop
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
@ -4699,7 +4699,7 @@ HandleStatBoostingHeldItems: ; 3de97
|
|||||||
call GetItemName
|
call GetItemName
|
||||||
ld hl, BattleText_UsersStringBuffer1Activated
|
ld hl, BattleText_UsersStringBuffer1Activated
|
||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
callab BattleCommand_StatUpMessage
|
callfar BattleCommand_StatUpMessage
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.finish
|
.finish
|
||||||
@ -4774,7 +4774,7 @@ DrawPlayerHUD: ; 3df58
|
|||||||
lb bc, 5, 11
|
lb bc, 5, 11
|
||||||
call ClearBox
|
call ClearBox
|
||||||
|
|
||||||
callba DrawPlayerHUDBorder
|
farcall DrawPlayerHUDBorder
|
||||||
|
|
||||||
hlcoord 18, 9
|
hlcoord 18, 9
|
||||||
ld [hl], $73 ; vertical bar
|
ld [hl], $73 ; vertical bar
|
||||||
@ -4867,7 +4867,7 @@ PrintPlayerHUD: ; 3dfbf
|
|||||||
|
|
||||||
ld a, TEMPMON
|
ld a, TEMPMON
|
||||||
ld [MonType], a
|
ld [MonType], a
|
||||||
callab GetGender
|
callfar GetGender
|
||||||
ld a, " "
|
ld a, " "
|
||||||
jr c, .got_gender_char
|
jr c, .got_gender_char
|
||||||
ld a, "♂"
|
ld a, "♂"
|
||||||
@ -4916,7 +4916,7 @@ DrawEnemyHUD: ; 3e043
|
|||||||
lb bc, 4, 11
|
lb bc, 4, 11
|
||||||
call ClearBox
|
call ClearBox
|
||||||
|
|
||||||
callba DrawEnemyHUDBorder
|
farcall DrawEnemyHUDBorder
|
||||||
|
|
||||||
ld a, [TempEnemyMonSpecies]
|
ld a, [TempEnemyMonSpecies]
|
||||||
ld [CurSpecies], a
|
ld [CurSpecies], a
|
||||||
@ -4945,7 +4945,7 @@ DrawEnemyHUD: ; 3e043
|
|||||||
|
|
||||||
ld a, TEMPMON
|
ld a, TEMPMON
|
||||||
ld [MonType], a
|
ld [MonType], a
|
||||||
callab GetGender
|
callfar GetGender
|
||||||
ld a, " "
|
ld a, " "
|
||||||
jr c, .got_gender
|
jr c, .got_gender
|
||||||
ld a, "♂"
|
ld a, "♂"
|
||||||
@ -5080,7 +5080,7 @@ BattleMenu: ; 3e139
|
|||||||
ld a, [BattleType]
|
ld a, [BattleType]
|
||||||
cp BATTLETYPE_CONTEST
|
cp BATTLETYPE_CONTEST
|
||||||
jr nz, .not_contest
|
jr nz, .not_contest
|
||||||
callba ContestBattleMenu
|
farcall ContestBattleMenu
|
||||||
jr .next
|
jr .next
|
||||||
.not_contest
|
.not_contest
|
||||||
|
|
||||||
@ -5088,7 +5088,7 @@ BattleMenu: ; 3e139
|
|||||||
ld a, [InputType]
|
ld a, [InputType]
|
||||||
or a
|
or a
|
||||||
jr z, .skip_dude_pack_select
|
jr z, .skip_dude_pack_select
|
||||||
callba _DudeAutoInput_DownA
|
farcall _DudeAutoInput_DownA
|
||||||
.skip_dude_pack_select
|
.skip_dude_pack_select
|
||||||
call LoadBattleMenu2
|
call LoadBattleMenu2
|
||||||
ret c
|
ret c
|
||||||
@ -5120,12 +5120,12 @@ LoadBattleMenu2: ; 3e19b
|
|||||||
call IsMobileBattle
|
call IsMobileBattle
|
||||||
jr z, .mobile
|
jr z, .mobile
|
||||||
|
|
||||||
callba LoadBattleMenu
|
farcall LoadBattleMenu
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.mobile
|
.mobile
|
||||||
callba Function100b12
|
farcall Function100b12
|
||||||
ld a, [wcd2b]
|
ld a, [wcd2b]
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
@ -5159,14 +5159,14 @@ BattleMenu_Pack: ; 3e1c7
|
|||||||
cp BATTLETYPE_CONTEST
|
cp BATTLETYPE_CONTEST
|
||||||
jr z, .contest
|
jr z, .contest
|
||||||
|
|
||||||
callba BattlePack
|
farcall BattlePack
|
||||||
ld a, [wPlayerAction]
|
ld a, [wPlayerAction]
|
||||||
and a
|
and a
|
||||||
jr z, .didnt_use_item
|
jr z, .didnt_use_item
|
||||||
jr .got_item
|
jr .got_item
|
||||||
|
|
||||||
.tutorial
|
.tutorial
|
||||||
callba TutorialPack
|
farcall TutorialPack
|
||||||
ld a, POKE_BALL
|
ld a, POKE_BALL
|
||||||
ld [CurItem], a
|
ld [CurItem], a
|
||||||
call DoItemEffect
|
call DoItemEffect
|
||||||
@ -5204,7 +5204,7 @@ BattleMenu_Pack: ; 3e1c7
|
|||||||
ld a, [wWildMon]
|
ld a, [wWildMon]
|
||||||
and a
|
and a
|
||||||
jr nz, .run
|
jr nz, .run
|
||||||
callab CheckItemPocket
|
callfar CheckItemPocket
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeParamBuffer]
|
||||||
cp BALL
|
cp BALL
|
||||||
jr z, .ball
|
jr z, .ball
|
||||||
@ -5259,7 +5259,7 @@ BattleMenuPKMN_Loop:
|
|||||||
call SelectBattleMon
|
call SelectBattleMon
|
||||||
jr c, .Cancel
|
jr c, .Cancel
|
||||||
.loop
|
.loop
|
||||||
callba FreezeMonIcons
|
farcall FreezeMonIcons
|
||||||
call .GetMenu
|
call .GetMenu
|
||||||
jr c, .PressedB
|
jr c, .PressedB
|
||||||
call PlaceHollowCursor
|
call PlaceHollowCursor
|
||||||
@ -5298,11 +5298,11 @@ BattleMenuPKMN_Loop:
|
|||||||
.GetMenu: ; 3e2f5
|
.GetMenu: ; 3e2f5
|
||||||
call IsMobileBattle
|
call IsMobileBattle
|
||||||
jr z, .mobile
|
jr z, .mobile
|
||||||
callba BattleMonMenu
|
farcall BattleMonMenu
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.mobile
|
.mobile
|
||||||
callba MobileBattleMonMenu
|
farcall MobileBattleMonMenu
|
||||||
ret
|
ret
|
||||||
; 3e308
|
; 3e308
|
||||||
|
|
||||||
@ -5325,7 +5325,7 @@ Battle_StatsScreen: ; 3e308
|
|||||||
call LowVolume
|
call LowVolume
|
||||||
xor a ; PARTYMON
|
xor a ; PARTYMON
|
||||||
ld [MonType], a
|
ld [MonType], a
|
||||||
callba BattleStatsScreenInit
|
farcall BattleStatsScreenInit
|
||||||
call MaxVolume
|
call MaxVolume
|
||||||
|
|
||||||
call DisableLCD
|
call DisableLCD
|
||||||
@ -5434,7 +5434,7 @@ PlayerSwitch: ; 3e3ad
|
|||||||
; 3e3ff
|
; 3e3ff
|
||||||
|
|
||||||
EnemyMonEntrance: ; 3e3ff
|
EnemyMonEntrance: ; 3e3ff
|
||||||
callab AI_Switch
|
callfar AI_Switch
|
||||||
call SetEnemyTurn
|
call SetEnemyTurn
|
||||||
jp SpikesDamage
|
jp SpikesDamage
|
||||||
; 3e40b
|
; 3e40b
|
||||||
@ -5517,7 +5517,7 @@ BattleMenu_Run: ; 3e489
|
|||||||
CheckAmuletCoin: ; 3e4a8
|
CheckAmuletCoin: ; 3e4a8
|
||||||
ld a, [BattleMonItem]
|
ld a, [BattleMonItem]
|
||||||
ld b, a
|
ld b, a
|
||||||
callab GetItemHeldEffect
|
callfar GetItemHeldEffect
|
||||||
ld a, b
|
ld a, b
|
||||||
cp HELD_AMULET_COIN
|
cp HELD_AMULET_COIN
|
||||||
ret nz
|
ret nz
|
||||||
@ -5529,7 +5529,7 @@ CheckAmuletCoin: ; 3e4a8
|
|||||||
MoveSelectionScreen: ; 3e4bc
|
MoveSelectionScreen: ; 3e4bc
|
||||||
call IsMobileBattle
|
call IsMobileBattle
|
||||||
jr nz, .not_mobile
|
jr nz, .not_mobile
|
||||||
callba MobileMoveSelectionScreen
|
farcall MobileMoveSelectionScreen
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.not_mobile
|
.not_mobile
|
||||||
@ -5884,7 +5884,7 @@ MoveInfoBox: ; 3e6c8
|
|||||||
ld [CurPartyMon], a
|
ld [CurPartyMon], a
|
||||||
ld a, WILDMON
|
ld a, WILDMON
|
||||||
ld [MonType], a
|
ld [MonType], a
|
||||||
callab GetMaxPPOfMove
|
callfar GetMaxPPOfMove
|
||||||
|
|
||||||
ld hl, wMenuCursorY
|
ld hl, wMenuCursorY
|
||||||
ld c, [hl]
|
ld c, [hl]
|
||||||
@ -5904,7 +5904,7 @@ MoveInfoBox: ; 3e6c8
|
|||||||
hlcoord 7, 11
|
hlcoord 7, 11
|
||||||
ld [hl], "/"
|
ld [hl], "/"
|
||||||
|
|
||||||
callab UpdateMoveData
|
callfar UpdateMoveData
|
||||||
ld a, [wPlayerMoveStruct + MOVE_ANIM]
|
ld a, [wPlayerMoveStruct + MOVE_ANIM]
|
||||||
ld b, a
|
ld b, a
|
||||||
hlcoord 2, 10
|
hlcoord 2, 10
|
||||||
@ -6104,7 +6104,7 @@ ParseEnemyAction: ; 3e7c1
|
|||||||
|
|
||||||
.skip_load
|
.skip_load
|
||||||
call SetEnemyTurn
|
call SetEnemyTurn
|
||||||
callab UpdateMoveData
|
callfar UpdateMoveData
|
||||||
call CheckEnemyLockedIn
|
call CheckEnemyLockedIn
|
||||||
jr nz, .raging
|
jr nz, .raging
|
||||||
xor a
|
xor a
|
||||||
@ -6167,7 +6167,7 @@ CheckEnemyLockedIn: ; 3e8d1
|
|||||||
; 3e8e4
|
; 3e8e4
|
||||||
|
|
||||||
LinkBattleSendReceiveAction: ; 3e8e4
|
LinkBattleSendReceiveAction: ; 3e8e4
|
||||||
callba _LinkBattleSendReceiveAction
|
farcall _LinkBattleSendReceiveAction
|
||||||
ret
|
ret
|
||||||
; 3e8eb
|
; 3e8eb
|
||||||
|
|
||||||
@ -6276,7 +6276,7 @@ LoadEnemyMon: ; 3e8eb
|
|||||||
|
|
||||||
; All trainers have preset DVs, determined by class
|
; All trainers have preset DVs, determined by class
|
||||||
; See GetTrainerDVs for more on that
|
; 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
|
; These are the DVs we'll use if we're actually in a trainer battle
|
||||||
ld a, [wBattleMode]
|
ld a, [wBattleMode]
|
||||||
dec a
|
dec a
|
||||||
@ -6380,7 +6380,7 @@ LoadEnemyMon: ; 3e8eb
|
|||||||
; Get Magikarp's length
|
; Get Magikarp's length
|
||||||
ld de, EnemyMonDVs
|
ld de, EnemyMonDVs
|
||||||
ld bc, PlayerID
|
ld bc, PlayerID
|
||||||
callab CalcMagikarpLength
|
callfar CalcMagikarpLength
|
||||||
|
|
||||||
; We're clear if the length is < 1536
|
; We're clear if the length is < 1536
|
||||||
ld a, [wMagikarpLength]
|
ld a, [wMagikarpLength]
|
||||||
@ -6780,7 +6780,7 @@ BattleWinSlideInEnemyTrainerFrontpic: ; 3ebd8
|
|||||||
ld a, [OtherTrainerClass]
|
ld a, [OtherTrainerClass]
|
||||||
ld [TrainerClass], a
|
ld [TrainerClass], a
|
||||||
ld de, VTiles2
|
ld de, VTiles2
|
||||||
callab GetTrainerPic
|
callfar GetTrainerPic
|
||||||
hlcoord 19, 0
|
hlcoord 19, 0
|
||||||
ld c, 0
|
ld c, 0
|
||||||
|
|
||||||
@ -7144,12 +7144,12 @@ BoostStat: ; 3ed7c
|
|||||||
; 3ed9f
|
; 3ed9f
|
||||||
|
|
||||||
_LoadBattleFontsHPBar: ; 3ed9f
|
_LoadBattleFontsHPBar: ; 3ed9f
|
||||||
callab LoadBattleFontsHPBar
|
callfar LoadBattleFontsHPBar
|
||||||
ret
|
ret
|
||||||
; 3eda6
|
; 3eda6
|
||||||
|
|
||||||
_LoadHPBar: ; 3eda6
|
_LoadHPBar: ; 3eda6
|
||||||
callab LoadHPBar
|
callfar LoadHPBar
|
||||||
ret
|
ret
|
||||||
; 3edad
|
; 3edad
|
||||||
|
|
||||||
@ -7455,7 +7455,7 @@ GiveExperiencePoints: ; 3ee3b
|
|||||||
call GetBaseData
|
call GetBaseData
|
||||||
push bc
|
push bc
|
||||||
ld d, MAX_LEVEL
|
ld d, MAX_LEVEL
|
||||||
callab CalcExpAtLevel
|
callfar CalcExpAtLevel
|
||||||
pop bc
|
pop bc
|
||||||
ld hl, MON_STAT_EXP - 1
|
ld hl, MON_STAT_EXP - 1
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -7484,7 +7484,7 @@ GiveExperiencePoints: ; 3ee3b
|
|||||||
xor a ; PARTYMON
|
xor a ; PARTYMON
|
||||||
ld [MonType], a
|
ld [MonType], a
|
||||||
predef CopyPkmnToTempMon
|
predef CopyPkmnToTempMon
|
||||||
callab CalcLevel
|
callfar CalcLevel
|
||||||
pop bc
|
pop bc
|
||||||
ld hl, MON_LEVEL
|
ld hl, MON_LEVEL
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -7571,16 +7571,16 @@ GiveExperiencePoints: ; 3ee3b
|
|||||||
xor a
|
xor a
|
||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
call ApplyStatLevelMultiplierOnAllStats
|
call ApplyStatLevelMultiplierOnAllStats
|
||||||
callab ApplyStatusEffectOnPlayerStats
|
callfar ApplyStatusEffectOnPlayerStats
|
||||||
callab BadgeStatBoosts
|
callfar BadgeStatBoosts
|
||||||
callab UpdatePlayerHUD
|
callfar UpdatePlayerHUD
|
||||||
call EmptyBattleTextBox
|
call EmptyBattleTextBox
|
||||||
call LoadTileMapToTempTileMap
|
call LoadTileMapToTempTileMap
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
|
|
||||||
.skip_animation
|
.skip_animation
|
||||||
callba LevelUpHappinessMod
|
farcall LevelUpHappinessMod
|
||||||
ld a, [CurBattleMon]
|
ld a, [CurBattleMon]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [CurPartyMon]
|
ld a, [CurPartyMon]
|
||||||
@ -7781,7 +7781,7 @@ AnimateExpBar: ; 3f136
|
|||||||
|
|
||||||
.NoOverflow:
|
.NoOverflow:
|
||||||
ld d, MAX_LEVEL
|
ld d, MAX_LEVEL
|
||||||
callab CalcExpAtLevel
|
callfar CalcExpAtLevel
|
||||||
ld a, [hProduct + 1]
|
ld a, [hProduct + 1]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [hProduct + 2]
|
ld a, [hProduct + 2]
|
||||||
@ -7804,7 +7804,7 @@ AnimateExpBar: ; 3f136
|
|||||||
ld [hld], a
|
ld [hld], a
|
||||||
|
|
||||||
.AlreadyAtMaxExp:
|
.AlreadyAtMaxExp:
|
||||||
callab CalcLevel
|
callfar CalcLevel
|
||||||
ld a, d
|
ld a, d
|
||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
@ -7836,7 +7836,7 @@ AnimateExpBar: ; 3f136
|
|||||||
call TerminateExpBarSound
|
call TerminateExpBarSound
|
||||||
ld de, SFX_HIT_END_OF_EXP_BAR
|
ld de, SFX_HIT_END_OF_EXP_BAR
|
||||||
call PlaySFX
|
call PlaySFX
|
||||||
callba AnimateEndOfExpBar
|
farcall AnimateEndOfExpBar
|
||||||
call WaitSFX
|
call WaitSFX
|
||||||
ld hl, BattleText_StringBuffer1GrewToLevel
|
ld hl, BattleText_StringBuffer1GrewToLevel
|
||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
@ -8142,7 +8142,7 @@ CalcExpBar: ; 3f39c
|
|||||||
push de
|
push de
|
||||||
ld d, b
|
ld d, b
|
||||||
push de
|
push de
|
||||||
callab CalcExpAtLevel
|
callfar CalcExpAtLevel
|
||||||
pop de
|
pop de
|
||||||
; exp at current level gets pushed to the stack
|
; exp at current level gets pushed to the stack
|
||||||
ld hl, hMultiplicand
|
ld hl, hMultiplicand
|
||||||
@ -8154,7 +8154,7 @@ CalcExpBar: ; 3f39c
|
|||||||
push af
|
push af
|
||||||
; next level
|
; next level
|
||||||
inc d
|
inc d
|
||||||
callab CalcExpAtLevel
|
callfar CalcExpAtLevel
|
||||||
; back up the next level exp, and subtract the two levels
|
; back up the next level exp, and subtract the two levels
|
||||||
ld hl, hMultiplicand + 2
|
ld hl, hMultiplicand + 2
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
@ -8369,18 +8369,18 @@ _DoBattle: ; 3f4d9
|
|||||||
; 3f4dd
|
; 3f4dd
|
||||||
|
|
||||||
BattleIntro: ; 3f4dd
|
BattleIntro: ; 3f4dd
|
||||||
callba TrainerRankings_Battles ; mobile
|
farcall TrainerRankings_Battles ; mobile
|
||||||
call LoadTrainerOrWildMonPic
|
call LoadTrainerOrWildMonPic
|
||||||
xor a
|
xor a
|
||||||
ld [TempBattleMonSpecies], a
|
ld [TempBattleMonSpecies], a
|
||||||
ld [wBattleMenuCursorBuffer], a
|
ld [wBattleMenuCursorBuffer], a
|
||||||
xor a
|
xor a
|
||||||
ld [hMapAnims], a
|
ld [hMapAnims], a
|
||||||
callba PlayBattleMusic
|
farcall PlayBattleMusic
|
||||||
callba ShowLinkBattleParticipants
|
farcall ShowLinkBattleParticipants
|
||||||
callba FindFirstAliveMonAndStartBattle
|
farcall FindFirstAliveMonAndStartBattle
|
||||||
call DisableSpriteUpdates
|
call DisableSpriteUpdates
|
||||||
callba ClearBattleRAM
|
farcall ClearBattleRAM
|
||||||
call InitEnemy
|
call InitEnemy
|
||||||
call BackUpVBGMap2
|
call BackUpVBGMap2
|
||||||
ld b, SCGB_BATTLE_GRAYSCALE
|
ld b, SCGB_BATTLE_GRAYSCALE
|
||||||
@ -8454,11 +8454,11 @@ BackUpVBGMap2: ; 3f568
|
|||||||
|
|
||||||
InitEnemyTrainer: ; 3f594
|
InitEnemyTrainer: ; 3f594
|
||||||
ld [TrainerClass], a
|
ld [TrainerClass], a
|
||||||
callba TrainerRankings_TrainerBattles
|
farcall TrainerRankings_TrainerBattles
|
||||||
xor a
|
xor a
|
||||||
ld [TempEnemyMonSpecies], a
|
ld [TempEnemyMonSpecies], a
|
||||||
callab GetTrainerAttributes
|
callfar GetTrainerAttributes
|
||||||
callab ReadTrainerParty
|
callfar ReadTrainerParty
|
||||||
|
|
||||||
ld a, [TrainerClass]
|
ld a, [TrainerClass]
|
||||||
cp RIVAL1
|
cp RIVAL1
|
||||||
@ -8468,7 +8468,7 @@ InitEnemyTrainer: ; 3f594
|
|||||||
.ok
|
.ok
|
||||||
|
|
||||||
ld de, VTiles2
|
ld de, VTiles2
|
||||||
callab GetTrainerPic
|
callfar GetTrainerPic
|
||||||
xor a
|
xor a
|
||||||
ld [hGraphicStartTile], a
|
ld [hGraphicStartTile], a
|
||||||
dec a
|
dec a
|
||||||
@ -8495,7 +8495,7 @@ InitEnemyTrainer: ; 3f594
|
|||||||
or [hl]
|
or [hl]
|
||||||
jr z, .skipfaintedmon
|
jr z, .skipfaintedmon
|
||||||
ld c, HAPPINESS_GYMBATTLE
|
ld c, HAPPINESS_GYMBATTLE
|
||||||
callab ChangeHappiness
|
callfar ChangeHappiness
|
||||||
.skipfaintedmon
|
.skipfaintedmon
|
||||||
pop bc
|
pop bc
|
||||||
dec b
|
dec b
|
||||||
@ -8510,7 +8510,7 @@ InitEnemyTrainer: ; 3f594
|
|||||||
InitEnemyWildmon: ; 3f607
|
InitEnemyWildmon: ; 3f607
|
||||||
ld a, WILD_BATTLE
|
ld a, WILD_BATTLE
|
||||||
ld [wBattleMode], a
|
ld [wBattleMode], a
|
||||||
callba TrainerRankings_WildBattles
|
farcall TrainerRankings_WildBattles
|
||||||
call LoadEnemyMon
|
call LoadEnemyMon
|
||||||
ld hl, EnemyMonMoves
|
ld hl, EnemyMonMoves
|
||||||
ld de, wWildMonMoves
|
ld de, wWildMonMoves
|
||||||
@ -8619,7 +8619,7 @@ ExitBattle: ; 3f69e
|
|||||||
xor a
|
xor a
|
||||||
ld [wForceEvolution], a
|
ld [wForceEvolution], a
|
||||||
predef EvolveAfterBattle
|
predef EvolveAfterBattle
|
||||||
callba GivePokerusAndConvertBerries
|
farcall GivePokerusAndConvertBerries
|
||||||
ret
|
ret
|
||||||
; 3f6d0
|
; 3f6d0
|
||||||
|
|
||||||
@ -8693,20 +8693,20 @@ CheckPayDay: ; 3f71d
|
|||||||
; 3f759
|
; 3f759
|
||||||
|
|
||||||
ShowLinkBattleParticipantsAfterEnd: ; 3f759
|
ShowLinkBattleParticipantsAfterEnd: ; 3f759
|
||||||
callba TrainerRankings_LinkBattles
|
farcall TrainerRankings_LinkBattles
|
||||||
callba BackupMobileEventIndex
|
farcall BackupMobileEventIndex
|
||||||
ld a, [CurOTMon]
|
ld a, [CurOTMon]
|
||||||
ld hl, OTPartyMon1Status
|
ld hl, OTPartyMon1Status
|
||||||
call GetPartyLocation
|
call GetPartyLocation
|
||||||
ld a, [EnemyMonStatus]
|
ld a, [EnemyMonStatus]
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
call ClearTileMap
|
call ClearTileMap
|
||||||
callba _ShowLinkBattleParticipants
|
farcall _ShowLinkBattleParticipants
|
||||||
ret
|
ret
|
||||||
; 3f77c
|
; 3f77c
|
||||||
|
|
||||||
DisplayLinkBattleResult: ; 3f77c
|
DisplayLinkBattleResult: ; 3f77c
|
||||||
callba CheckMobileBattleError
|
farcall CheckMobileBattleError
|
||||||
jp c, .Mobile_InvalidBattle
|
jp c, .Mobile_InvalidBattle
|
||||||
call IsMobileBattle2
|
call IsMobileBattle2
|
||||||
jr nz, .proceed
|
jr nz, .proceed
|
||||||
@ -8715,7 +8715,7 @@ DisplayLinkBattleResult: ; 3f77c
|
|||||||
bit 4, [hl]
|
bit 4, [hl]
|
||||||
jr z, .proceed
|
jr z, .proceed
|
||||||
|
|
||||||
callba DetermineLinkBattleResult
|
farcall DetermineLinkBattleResult
|
||||||
|
|
||||||
.proceed
|
.proceed
|
||||||
ld a, [wBattleResult]
|
ld a, [wBattleResult]
|
||||||
@ -8723,24 +8723,24 @@ DisplayLinkBattleResult: ; 3f77c
|
|||||||
cp $1
|
cp $1
|
||||||
jr c, .victory
|
jr c, .victory
|
||||||
jr z, .loss
|
jr z, .loss
|
||||||
callba TrainerRankings_ColosseumDraws
|
farcall TrainerRankings_ColosseumDraws
|
||||||
ld de, .Draw
|
ld de, .Draw
|
||||||
jr .store_result
|
jr .store_result
|
||||||
|
|
||||||
.victory
|
.victory
|
||||||
callba TrainerRankings_ColosseumWins
|
farcall TrainerRankings_ColosseumWins
|
||||||
ld de, .Win
|
ld de, .Win
|
||||||
jr .store_result
|
jr .store_result
|
||||||
|
|
||||||
.loss
|
.loss
|
||||||
callba TrainerRankings_ColosseumLosses
|
farcall TrainerRankings_ColosseumLosses
|
||||||
ld de, .Lose
|
ld de, .Lose
|
||||||
jr .store_result
|
jr .store_result
|
||||||
|
|
||||||
.store_result
|
.store_result
|
||||||
hlcoord 6, 8
|
hlcoord 6, 8
|
||||||
call PlaceString
|
call PlaceString
|
||||||
callba BackupMobileEventIndex
|
farcall BackupMobileEventIndex
|
||||||
ld c, 200
|
ld c, 200
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
|
|
||||||
@ -8977,7 +8977,7 @@ BattleEnd_HandleRoamMons: ; 3f998
|
|||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
.update_roam_mons
|
.update_roam_mons
|
||||||
callab UpdateRoamMons
|
callfar UpdateRoamMons
|
||||||
ret
|
ret
|
||||||
; 3f9d1
|
; 3f9d1
|
||||||
|
|
||||||
@ -9269,7 +9269,7 @@ InitBattleDisplay: ; 3fb6c
|
|||||||
ld b, 4
|
ld b, 4
|
||||||
ld c, 18
|
ld c, 18
|
||||||
call TextBox
|
call TextBox
|
||||||
callba MobileTextBorder
|
farcall MobileTextBorder
|
||||||
hlcoord 1, 5
|
hlcoord 1, 5
|
||||||
lb bc, 3, 7
|
lb bc, 3, 7
|
||||||
call ClearBox
|
call ClearBox
|
||||||
@ -9285,7 +9285,7 @@ InitBattleDisplay: ; 3fb6c
|
|||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
callba BattleIntroSlidingPics
|
farcall BattleIntroSlidingPics
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
ld a, $31
|
ld a, $31
|
||||||
@ -9354,7 +9354,7 @@ GetTrainerBackpic: ; 3fbff
|
|||||||
jr z, .Chris
|
jr z, .Chris
|
||||||
|
|
||||||
; It's a girl.
|
; It's a girl.
|
||||||
callba GetKrisBackpic
|
farcall GetKrisBackpic
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.Chris:
|
.Chris:
|
||||||
@ -9439,7 +9439,7 @@ BattleStartMessage: ; 3fc8b
|
|||||||
ld c, 20
|
ld c, 20
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
|
|
||||||
callba Battle_GetTrainerName
|
farcall Battle_GetTrainerName
|
||||||
|
|
||||||
ld hl, WantsToBattleText
|
ld hl, WantsToBattleText
|
||||||
jr .PlaceBattleStartText
|
jr .PlaceBattleStartText
|
||||||
@ -9458,10 +9458,10 @@ BattleStartMessage: ; 3fc8b
|
|||||||
call Call_PlayBattleAnim
|
call Call_PlayBattleAnim
|
||||||
|
|
||||||
.not_shiny
|
.not_shiny
|
||||||
callba CheckSleepingTreeMon
|
farcall CheckSleepingTreeMon
|
||||||
jr c, .skip_cry
|
jr c, .skip_cry
|
||||||
|
|
||||||
callba CheckBattleScene
|
farcall CheckBattleScene
|
||||||
jr c, .cry_no_anim
|
jr c, .cry_no_anim
|
||||||
|
|
||||||
hlcoord 12, 0
|
hlcoord 12, 0
|
||||||
@ -9481,7 +9481,7 @@ BattleStartMessage: ; 3fc8b
|
|||||||
cp BATTLETYPE_FISH
|
cp BATTLETYPE_FISH
|
||||||
jr nz, .NotFishing
|
jr nz, .NotFishing
|
||||||
|
|
||||||
callba TrainerRankings_HookedEncounters
|
farcall TrainerRankings_HookedEncounters
|
||||||
|
|
||||||
ld hl, HookedPokemonAttackedText
|
ld hl, HookedPokemonAttackedText
|
||||||
jr .PlaceBattleStartText
|
jr .PlaceBattleStartText
|
||||||
@ -9497,7 +9497,7 @@ BattleStartMessage: ; 3fc8b
|
|||||||
|
|
||||||
.PlaceBattleStartText:
|
.PlaceBattleStartText:
|
||||||
push hl
|
push hl
|
||||||
callba BattleStart_TrainerHuds
|
farcall BattleStart_TrainerHuds
|
||||||
pop hl
|
pop hl
|
||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
|
|
||||||
@ -9505,7 +9505,7 @@ BattleStartMessage: ; 3fc8b
|
|||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
ld c, $2 ; start
|
ld c, $2 ; start
|
||||||
callba Mobile_PrintOpponentBattleMessage
|
farcall Mobile_PrintOpponentBattleMessage
|
||||||
|
|
||||||
ret
|
ret
|
||||||
; 3fd26
|
; 3fd26
|
||||||
|
@ -1016,7 +1016,7 @@ IgnoreSleepOnly: ; 3451f
|
|||||||
|
|
||||||
BattleCommand_UsedMoveText: ; 34541
|
BattleCommand_UsedMoveText: ; 34541
|
||||||
; usedmovetext
|
; usedmovetext
|
||||||
callba DisplayUsedMoveText
|
farcall DisplayUsedMoveText
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; 34548
|
; 34548
|
||||||
@ -1385,14 +1385,14 @@ BattleCommand_Stab: ; 346d2
|
|||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
callba DoWeatherModifiers
|
farcall DoWeatherModifiers
|
||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
pop hl
|
pop hl
|
||||||
|
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
callba DoBadgeTypeBoosts
|
farcall DoBadgeTypeBoosts
|
||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
|
|
||||||
@ -3862,7 +3862,7 @@ BattleCommand_Counter: ; 35813
|
|||||||
ret z
|
ret z
|
||||||
|
|
||||||
ld b, a
|
ld b, a
|
||||||
callab GetMoveEffect
|
callfar GetMoveEffect
|
||||||
ld a, b
|
ld a, b
|
||||||
cp EFFECT_COUNTER
|
cp EFFECT_COUNTER
|
||||||
ret z
|
ret z
|
||||||
@ -4068,7 +4068,7 @@ BattleCommand_PainSplit: ; 35926
|
|||||||
call ResetDamage
|
call ResetDamage
|
||||||
hlcoord 2, 2
|
hlcoord 2, 2
|
||||||
predef AnimateHPBar
|
predef AnimateHPBar
|
||||||
callba _UpdateBattleHUDs
|
farcall _UpdateBattleHUDs
|
||||||
|
|
||||||
ld hl, SharedPainText
|
ld hl, SharedPainText
|
||||||
jp StdBattleTextBox
|
jp StdBattleTextBox
|
||||||
@ -4518,7 +4518,7 @@ BattleCommand_SleepTalk: ; 35b33
|
|||||||
push bc
|
push bc
|
||||||
|
|
||||||
ld b, a
|
ld b, a
|
||||||
callab GetMoveEffect
|
callfar GetMoveEffect
|
||||||
ld a, b
|
ld a, b
|
||||||
|
|
||||||
pop bc
|
pop bc
|
||||||
@ -4747,7 +4747,7 @@ PlayFXAnimID: ; 35d08
|
|||||||
ld c, 3
|
ld c, 3
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
|
|
||||||
callab PlayBattleAnim
|
callfar PlayBattleAnim
|
||||||
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -5017,7 +5017,7 @@ BattleCommand_SleepTarget: ; 35e5c
|
|||||||
ld hl, FellAsleepText
|
ld hl, FellAsleepText
|
||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
|
|
||||||
callba UseHeldStatusHealingItem
|
farcall UseHeldStatusHealingItem
|
||||||
|
|
||||||
jp z, OpponentCantMove
|
jp z, OpponentCantMove
|
||||||
ret
|
ret
|
||||||
@ -5094,7 +5094,7 @@ BattleCommand_PoisonTarget: ; 35eee
|
|||||||
ld hl, WasPoisonedText
|
ld hl, WasPoisonedText
|
||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
|
|
||||||
callba UseHeldStatusHealingItem
|
farcall UseHeldStatusHealingItem
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; 35f2c
|
; 35f2c
|
||||||
@ -5179,7 +5179,7 @@ BattleCommand_Poison: ; 35f2c
|
|||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
|
|
||||||
.finished
|
.finished
|
||||||
callba UseHeldStatusHealingItem
|
farcall UseHeldStatusHealingItem
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.failed
|
.failed
|
||||||
@ -5382,7 +5382,7 @@ BattleCommand_BurnTarget: ; 3608c
|
|||||||
ld hl, WasBurnedText
|
ld hl, WasBurnedText
|
||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
|
|
||||||
callba UseHeldStatusHealingItem
|
farcall UseHeldStatusHealingItem
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; 360dd
|
; 360dd
|
||||||
@ -5455,7 +5455,7 @@ BattleCommand_FreezeTarget: ; 36102
|
|||||||
ld hl, WasFrozenText
|
ld hl, WasFrozenText
|
||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
|
|
||||||
callba UseHeldStatusHealingItem
|
farcall UseHeldStatusHealingItem
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
call OpponentCantMove
|
call OpponentCantMove
|
||||||
@ -6816,7 +6816,7 @@ BattleCommand_ForceSwitch: ; 3680f
|
|||||||
ld a, d
|
ld a, d
|
||||||
inc a
|
inc a
|
||||||
ld [wEnemySwitchMonIndex], a
|
ld [wEnemySwitchMonIndex], a
|
||||||
callab ForceEnemySwitch
|
callfar ForceEnemySwitch
|
||||||
|
|
||||||
ld hl, DraggedOutText
|
ld hl, DraggedOutText
|
||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
@ -8081,7 +8081,7 @@ BattleCommand_LeechSeed: ; 36f9d
|
|||||||
|
|
||||||
BattleCommand_Splash: ; 36fe1
|
BattleCommand_Splash: ; 36fe1
|
||||||
call AnimateCurrentMove
|
call AnimateCurrentMove
|
||||||
callba TrainerRankings_Splash
|
farcall TrainerRankings_Splash
|
||||||
jp PrintNothingHappened
|
jp PrintNothingHappened
|
||||||
|
|
||||||
; 36fed
|
; 36fed
|
||||||
@ -8285,7 +8285,7 @@ BattleCommand_Conversion: ; 3707f
|
|||||||
inc de
|
inc de
|
||||||
ld [de], a
|
ld [de], a
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
callba GetTypeName
|
farcall GetTypeName
|
||||||
call AnimateCurrentMove
|
call AnimateCurrentMove
|
||||||
ld hl, TransformedTypeText
|
ld hl, TransformedTypeText
|
||||||
jp StdBattleTextBox
|
jp StdBattleTextBox
|
||||||
@ -8608,7 +8608,7 @@ CheckSubstituteOpp: ; 37378
|
|||||||
|
|
||||||
|
|
||||||
BattleCommand_Selfdestruct: ; 37380
|
BattleCommand_Selfdestruct: ; 37380
|
||||||
callba TrainerRankings_Selfdestruct
|
farcall TrainerRankings_Selfdestruct
|
||||||
ld a, BATTLEANIM_PLAYER_DAMAGE
|
ld a, BATTLEANIM_PLAYER_DAMAGE
|
||||||
ld [wNumHits], a
|
ld [wNumHits], a
|
||||||
ld c, 3
|
ld c, 3
|
||||||
@ -8632,8 +8632,8 @@ BattleCommand_Selfdestruct: ; 37380
|
|||||||
res SUBSTATUS_DESTINY_BOND, [hl]
|
res SUBSTATUS_DESTINY_BOND, [hl]
|
||||||
call _CheckBattleScene
|
call _CheckBattleScene
|
||||||
ret nc
|
ret nc
|
||||||
callba DrawPlayerHUD
|
farcall DrawPlayerHUD
|
||||||
callba DrawEnemyHUD
|
farcall DrawEnemyHUD
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
jp RefreshBattleHuds
|
jp RefreshBattleHuds
|
||||||
|
|
||||||
@ -9032,13 +9032,13 @@ BattleCommand_BatonPass: ; 379c9
|
|||||||
|
|
||||||
; Transition into switchmon menu
|
; Transition into switchmon menu
|
||||||
call LoadStandardMenuDataHeader
|
call LoadStandardMenuDataHeader
|
||||||
callba SetUpBattlePartyMenu_NoLoop
|
farcall SetUpBattlePartyMenu_NoLoop
|
||||||
|
|
||||||
callba ForcePickSwitchMonInBattle
|
farcall ForcePickSwitchMonInBattle
|
||||||
|
|
||||||
; Return to battle scene
|
; Return to battle scene
|
||||||
call ClearPalettes
|
call ClearPalettes
|
||||||
callba _LoadBattleFontsHPBar
|
farcall _LoadBattleFontsHPBar
|
||||||
call CloseWindow
|
call CloseWindow
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
hlcoord 1, 0
|
hlcoord 1, 0
|
||||||
@ -9050,7 +9050,7 @@ BattleCommand_BatonPass: ; 379c9
|
|||||||
call BatonPass_LinkPlayerSwitch
|
call BatonPass_LinkPlayerSwitch
|
||||||
|
|
||||||
; Mobile link battles handle entrances differently
|
; Mobile link battles handle entrances differently
|
||||||
callba CheckMobileBattleError
|
farcall CheckMobileBattleError
|
||||||
jp c, EndMoveEffect
|
jp c, EndMoveEffect
|
||||||
|
|
||||||
ld hl, PassedBattleMonEntrance
|
ld hl, PassedBattleMonEntrance
|
||||||
@ -9075,7 +9075,7 @@ BattleCommand_BatonPass: ; 379c9
|
|||||||
call BatonPass_LinkEnemySwitch
|
call BatonPass_LinkEnemySwitch
|
||||||
|
|
||||||
; Mobile link battles handle entrances differently
|
; Mobile link battles handle entrances differently
|
||||||
callba CheckMobileBattleError
|
farcall CheckMobileBattleError
|
||||||
jp c, EndMoveEffect
|
jp c, EndMoveEffect
|
||||||
|
|
||||||
; Passed enemy PartyMon entrance
|
; Passed enemy PartyMon entrance
|
||||||
@ -9403,7 +9403,7 @@ BattleCommand_TimeBasedHealContinue: ; 37b7e
|
|||||||
call AnimateCurrentMove
|
call AnimateCurrentMove
|
||||||
call BattleCommand_SwitchTurn
|
call BattleCommand_SwitchTurn
|
||||||
|
|
||||||
callab RestoreHP
|
callfar RestoreHP
|
||||||
|
|
||||||
call BattleCommand_SwitchTurn
|
call BattleCommand_SwitchTurn
|
||||||
call UpdateUserInParty
|
call UpdateUserInParty
|
||||||
@ -9433,7 +9433,7 @@ BattleCommand_HiddenPower: ; 37be8
|
|||||||
ld a, [AttackMissed]
|
ld a, [AttackMissed]
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
callba HiddenPowerDamage
|
farcall HiddenPowerDamage
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; 37bf4
|
; 37bf4
|
||||||
@ -9475,14 +9475,14 @@ BattleCommand_BellyDrum: ; 37c1a
|
|||||||
and a
|
and a
|
||||||
jr nz, .failed
|
jr nz, .failed
|
||||||
|
|
||||||
callab GetHalfMaxHP
|
callfar GetHalfMaxHP
|
||||||
callab CheckUserHasEnoughHP
|
callfar CheckUserHasEnoughHP
|
||||||
jr nc, .failed
|
jr nc, .failed
|
||||||
|
|
||||||
push bc
|
push bc
|
||||||
call AnimateCurrentMove
|
call AnimateCurrentMove
|
||||||
pop bc
|
pop bc
|
||||||
callab SubtractHPFromUser
|
callfar SubtractHPFromUser
|
||||||
call UpdateUserInParty
|
call UpdateUserInParty
|
||||||
ld a, 5
|
ld a, 5
|
||||||
|
|
||||||
@ -9568,7 +9568,7 @@ BattleCommand_MirrorCoat: ; 37c95
|
|||||||
ret z
|
ret z
|
||||||
|
|
||||||
ld b, a
|
ld b, a
|
||||||
callab GetMoveEffect
|
callfar GetMoveEffect
|
||||||
ld a, b
|
ld a, b
|
||||||
cp EFFECT_MIRROR_COAT
|
cp EFFECT_MIRROR_COAT
|
||||||
ret z
|
ret z
|
||||||
@ -9914,7 +9914,7 @@ PlayUserBattleAnim: ; 37e47
|
|||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
callab PlayBattleAnim
|
callfar PlayBattleAnim
|
||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
pop hl
|
pop hl
|
||||||
@ -9936,7 +9936,7 @@ PlayOpponentBattleAnim: ; 37e54
|
|||||||
push bc
|
push bc
|
||||||
call BattleCommand_SwitchTurn
|
call BattleCommand_SwitchTurn
|
||||||
|
|
||||||
callab PlayBattleAnim
|
callfar PlayBattleAnim
|
||||||
|
|
||||||
call BattleCommand_SwitchTurn
|
call BattleCommand_SwitchTurn
|
||||||
pop bc
|
pop bc
|
||||||
@ -10035,21 +10035,21 @@ GetMoveByte: ; 37ebb
|
|||||||
|
|
||||||
|
|
||||||
DisappearUser: ; 37ec0
|
DisappearUser: ; 37ec0
|
||||||
callba _DisappearUser
|
farcall _DisappearUser
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; 37ec7
|
; 37ec7
|
||||||
|
|
||||||
|
|
||||||
AppearUserLowerSub: ; 37ec7
|
AppearUserLowerSub: ; 37ec7
|
||||||
callba _AppearUserLowerSub
|
farcall _AppearUserLowerSub
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; 37ece
|
; 37ece
|
||||||
|
|
||||||
|
|
||||||
AppearUserRaiseSub: ; 37ece
|
AppearUserRaiseSub: ; 37ece
|
||||||
callba _AppearUserRaiseSub
|
farcall _AppearUserRaiseSub
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; 37ed5
|
; 37ed5
|
||||||
@ -10060,7 +10060,7 @@ _CheckBattleScene: ; 37ed5
|
|||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
callba CheckBattleScene
|
farcall CheckBattleScene
|
||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
pop hl
|
pop hl
|
||||||
|
@ -35,7 +35,7 @@ CheckOppositeGender: ; 377f5
|
|||||||
xor a
|
xor a
|
||||||
ld [MonType], a
|
ld [MonType], a
|
||||||
|
|
||||||
callba GetGender
|
farcall GetGender
|
||||||
jr c, .genderless_samegender
|
jr c, .genderless_samegender
|
||||||
|
|
||||||
ld b, 1
|
ld b, 1
|
||||||
@ -58,7 +58,7 @@ CheckOppositeGender: ; 377f5
|
|||||||
ld [TempMonDVs + 1], a
|
ld [TempMonDVs + 1], a
|
||||||
ld a, 3
|
ld a, 3
|
||||||
ld [MonType], a
|
ld [MonType], a
|
||||||
callba GetGender
|
farcall GetGender
|
||||||
pop bc
|
pop bc
|
||||||
jr c, .genderless_samegender
|
jr c, .genderless_samegender
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ BattleCommand_Thief: ; 37492
|
|||||||
|
|
||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
ld d, a
|
ld d, a
|
||||||
callba ItemIsMail
|
farcall ItemIsMail
|
||||||
ret c
|
ret c
|
||||||
|
|
||||||
ld a, [EffectFailed]
|
ld a, [EffectFailed]
|
||||||
@ -71,7 +71,7 @@ BattleCommand_Thief: ; 37492
|
|||||||
|
|
||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
ld d, a
|
ld d, a
|
||||||
callba ItemIsMail
|
farcall ItemIsMail
|
||||||
ret c
|
ret c
|
||||||
|
|
||||||
ld a, [EffectFailed]
|
ld a, [EffectFailed]
|
||||||
|
@ -104,7 +104,7 @@ HiddenPowerDamage: ; fbced
|
|||||||
; based on the new type, but keep base power.
|
; based on the new type, but keep base power.
|
||||||
ld a, d
|
ld a, d
|
||||||
push af
|
push af
|
||||||
callba BattleCommand_DamageStats ; damagestats
|
farcall BattleCommand_DamageStats ; damagestats
|
||||||
pop af
|
pop af
|
||||||
ld d, a
|
ld d, a
|
||||||
ret
|
ret
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
DetermineLinkBattleResult: ; 2b930
|
DetermineLinkBattleResult: ; 2b930
|
||||||
callba UpdateEnemyMonInParty
|
farcall UpdateEnemyMonInParty
|
||||||
ld hl, PartyMon1HP
|
ld hl, PartyMon1HP
|
||||||
call .CountMonsRemaining
|
call .CountMonsRemaining
|
||||||
push bc
|
push bc
|
||||||
|
@ -13,11 +13,11 @@ _DisappearUser: ; fbd54
|
|||||||
jr FinishAppearDisappearUser
|
jr FinishAppearDisappearUser
|
||||||
|
|
||||||
_AppearUserRaiseSub: ; fbd69 (3e:7d69)
|
_AppearUserRaiseSub: ; fbd69 (3e:7d69)
|
||||||
callba BattleCommand_RaiseSubNoAnim
|
farcall BattleCommand_RaiseSubNoAnim
|
||||||
jr AppearUser
|
jr AppearUser
|
||||||
|
|
||||||
_AppearUserLowerSub: ; fbd71 (3e:7d71)
|
_AppearUserLowerSub: ; fbd71 (3e:7d71)
|
||||||
callba BattleCommand_LowerSubNoAnim
|
farcall BattleCommand_LowerSubNoAnim
|
||||||
|
|
||||||
AppearUser: ; fbd77 (3e:7d77)
|
AppearUser: ; fbd77 (3e:7d77)
|
||||||
xor a
|
xor a
|
||||||
|
@ -302,13 +302,13 @@ GetBattleAnimTileOffset: ; ccb31 (33:4b31)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
_ExecuteBGEffects: ; ccb48
|
_ExecuteBGEffects: ; ccb48
|
||||||
callab ExecuteBGEffects
|
callfar ExecuteBGEffects
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; ccb4f
|
; ccb4f
|
||||||
|
|
||||||
_QueueBGEffect: ; ccb4f (33:4b4f)
|
_QueueBGEffect: ; ccb4f (33:4b4f)
|
||||||
callab QueueBGEffect
|
callfar QueueBGEffect
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; ccb56 (33:4b56)
|
; ccb56 (33:4b56)
|
||||||
|
@ -259,7 +259,7 @@ _ShowLinkBattleParticipants: ; 2c1b2
|
|||||||
ld a, "<BOLD_V>"
|
ld a, "<BOLD_V>"
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld [hl], "<BOLD_S>"
|
ld [hl], "<BOLD_S>"
|
||||||
callba LinkBattle_TrainerHuds ; no need to callba
|
farcall LinkBattle_TrainerHuds ; no need to farcall
|
||||||
ld b, SCGB_DIPLOMA
|
ld b, SCGB_DIPLOMA
|
||||||
call GetSGBLayout
|
call GetSGBLayout
|
||||||
call SetPalettes
|
call SetPalettes
|
||||||
|
@ -32,7 +32,7 @@ UsedMoveText: ; 105db9
|
|||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
callba CheckUserIsCharging
|
farcall CheckUserIsCharging
|
||||||
pop hl
|
pop hl
|
||||||
jr nz, .grammar
|
jr nz, .grammar
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ PrintItemDescription: ; 0x1c8955
|
|||||||
|
|
||||||
ld [CurItem], a
|
ld [CurItem], a
|
||||||
push de
|
push de
|
||||||
callba GetTMHMItemMove
|
farcall GetTMHMItemMove
|
||||||
pop hl
|
pop hl
|
||||||
ld a, [wd265]
|
ld a, [wd265]
|
||||||
ld [CurSpecies], a
|
ld [CurSpecies], a
|
||||||
|
@ -293,7 +293,7 @@ HPBarAnim_PaletteUpdate: ; d7b4
|
|||||||
call SetHPPal
|
call SetHPPal
|
||||||
ld a, [wCurHPAnimPal]
|
ld a, [wCurHPAnimPal]
|
||||||
ld c, a
|
ld c, a
|
||||||
callba ApplyHPBarPals
|
farcall ApplyHPBarPals
|
||||||
ret
|
ret
|
||||||
; d7c9
|
; d7c9
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ Predef_StartBattle: ; 8c20f
|
|||||||
ld a, [wLinkMode]
|
ld a, [wLinkMode]
|
||||||
cp LINK_MOBILE
|
cp LINK_MOBILE
|
||||||
jr z, .mobile
|
jr z, .mobile
|
||||||
callba ReanchorBGMap_NoOAMUpdate
|
farcall ReanchorBGMap_NoOAMUpdate
|
||||||
call UpdateSprites
|
call UpdateSprites
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
call .NonMobile_LoadPokeballTiles
|
call .NonMobile_LoadPokeballTiles
|
||||||
@ -297,7 +297,7 @@ StartTrainerBattle_Flash: ; 8c3ab (23:43ab)
|
|||||||
; 8c3e8
|
; 8c3e8
|
||||||
|
|
||||||
StartTrainerBattle_SetUpForWavyOutro: ; 8c3e8 (23:43e8)
|
StartTrainerBattle_SetUpForWavyOutro: ; 8c3e8 (23:43e8)
|
||||||
callba Function5602
|
farcall Function5602
|
||||||
ld a, $5 ; BANK(LYOverrides)
|
ld a, $5 ; BANK(LYOverrides)
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
|
|
||||||
@ -355,7 +355,7 @@ StartTrainerBattle_SineWave: ; 8c408 (23:4408)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
StartTrainerBattle_SetUpForSpinOutro: ; 8c43d (23:443d)
|
StartTrainerBattle_SetUpForSpinOutro: ; 8c43d (23:443d)
|
||||||
callba Function5602
|
farcall Function5602
|
||||||
ld a, $5 ; BANK(LYOverrides)
|
ld a, $5 ; BANK(LYOverrides)
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
call StartTrainerBattle_NextScene
|
call StartTrainerBattle_NextScene
|
||||||
@ -497,7 +497,7 @@ ENDM
|
|||||||
; 8c578
|
; 8c578
|
||||||
|
|
||||||
StartTrainerBattle_SetUpForRandomScatterOutro: ; 8c578 (23:4578)
|
StartTrainerBattle_SetUpForRandomScatterOutro: ; 8c578 (23:4578)
|
||||||
callba Function5602
|
farcall Function5602
|
||||||
ld a, $5 ; BANK(LYOverrides)
|
ld a, $5 ; BANK(LYOverrides)
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
call StartTrainerBattle_NextScene
|
call StartTrainerBattle_NextScene
|
||||||
@ -797,7 +797,7 @@ StartTrainerBattle_DrawSineWave: ; 8c6f7 (23:46f7)
|
|||||||
; 8c768
|
; 8c768
|
||||||
|
|
||||||
StartTrainerBattle_ZoomToBlack: ; 8c768 (23:4768)
|
StartTrainerBattle_ZoomToBlack: ; 8c768 (23:4768)
|
||||||
callba Function5602
|
farcall Function5602
|
||||||
ld de, .boxes
|
ld de, .boxes
|
||||||
|
|
||||||
.loop
|
.loop
|
||||||
|
@ -208,7 +208,7 @@ BillsPCDepositFuncRelease: ; e24e0 (38:64e0)
|
|||||||
ld [CurPartyMon], a
|
ld [CurPartyMon], a
|
||||||
xor a
|
xor a
|
||||||
ld [wPokemonWithdrawDepositParameter], a
|
ld [wPokemonWithdrawDepositParameter], a
|
||||||
callba RemoveMonFromPartyOrBox
|
farcall RemoveMonFromPartyOrBox
|
||||||
call ReleasePKMN_ByePKMN
|
call ReleasePKMN_ByePKMN
|
||||||
ld a, $0
|
ld a, $0
|
||||||
ld [wJumptableIndex], a
|
ld [wJumptableIndex], a
|
||||||
@ -472,7 +472,7 @@ BillsPC_Withdraw: ; e2675 (38:6675)
|
|||||||
ld [CurPartyMon], a
|
ld [CurPartyMon], a
|
||||||
ld a, PC_DEPOSIT
|
ld a, PC_DEPOSIT
|
||||||
ld [wPokemonWithdrawDepositParameter], a
|
ld [wPokemonWithdrawDepositParameter], a
|
||||||
callba RemoveMonFromPartyOrBox
|
farcall RemoveMonFromPartyOrBox
|
||||||
call ReleasePKMN_ByePKMN
|
call ReleasePKMN_ByePKMN
|
||||||
ld a, $0
|
ld a, $0
|
||||||
ld [wJumptableIndex], a
|
ld [wJumptableIndex], a
|
||||||
@ -1125,7 +1125,7 @@ PCMonInfo: ; e2ac6 (38:6ac6)
|
|||||||
|
|
||||||
ld a, $3
|
ld a, $3
|
||||||
ld [MonType], a
|
ld [MonType], a
|
||||||
callba GetGender
|
farcall GetGender
|
||||||
jr c, .skip_gender
|
jr c, .skip_gender
|
||||||
ld a, "♂"
|
ld a, "♂"
|
||||||
jr nz, .printgender
|
jr nz, .printgender
|
||||||
@ -1140,7 +1140,7 @@ PCMonInfo: ; e2ac6 (38:6ac6)
|
|||||||
ret z
|
ret z
|
||||||
|
|
||||||
ld d, a
|
ld d, a
|
||||||
callab ItemIsMail
|
callfar ItemIsMail
|
||||||
jr c, .mail
|
jr c, .mail
|
||||||
ld a, $5d ; item icon
|
ld a, $5d ; item icon
|
||||||
jr .printitem
|
jr .printitem
|
||||||
@ -1656,7 +1656,7 @@ BillsPC_CheckMail_PreventBlackout: ; e2f18 (38:6f18)
|
|||||||
ld hl, wBillsPC_ScrollPosition
|
ld hl, wBillsPC_ScrollPosition
|
||||||
add [hl]
|
add [hl]
|
||||||
ld [CurPartyMon], a
|
ld [CurPartyMon], a
|
||||||
callba CheckCurPartyMonFainted
|
farcall CheckCurPartyMonFainted
|
||||||
jr c, .AllOthersFainted
|
jr c, .AllOthersFainted
|
||||||
ld a, [wBillsPC_MonHasMail]
|
ld a, [wBillsPC_MonHasMail]
|
||||||
and a
|
and a
|
||||||
@ -1773,7 +1773,7 @@ BillsPC_CopyMon: ; e2fd6 (38:6fd6)
|
|||||||
ld bc, PARTYMON_STRUCT_LENGTH
|
ld bc, PARTYMON_STRUCT_LENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
callba CalcwBufferMonStats
|
farcall CalcwBufferMonStats
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.party
|
.party
|
||||||
@ -1816,7 +1816,7 @@ BillsPC_CopyMon: ; e2fd6 (38:6fd6)
|
|||||||
ld bc, BOXMON_STRUCT_LENGTH
|
ld bc, BOXMON_STRUCT_LENGTH
|
||||||
call CopyMonToTemp
|
call CopyMonToTemp
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
callba CalcwBufferMonStats
|
farcall CalcwBufferMonStats
|
||||||
ret
|
ret
|
||||||
|
|
||||||
DepositPokemon: ; e307c (38:707c)
|
DepositPokemon: ; e307c (38:707c)
|
||||||
@ -1833,7 +1833,7 @@ DepositPokemon: ; e307c (38:707c)
|
|||||||
jr c, .asm_boxisfull
|
jr c, .asm_boxisfull
|
||||||
xor a
|
xor a
|
||||||
ld [wPokemonWithdrawDepositParameter], a
|
ld [wPokemonWithdrawDepositParameter], a
|
||||||
callba RemoveMonFromPartyOrBox
|
farcall RemoveMonFromPartyOrBox
|
||||||
ld a, [CurPartySpecies]
|
ld a, [CurPartySpecies]
|
||||||
call PlayCry
|
call PlayCry
|
||||||
hlcoord 0, 0
|
hlcoord 0, 0
|
||||||
@ -1888,7 +1888,7 @@ TryWithdrawPokemon: ; e30fa (38:70fa)
|
|||||||
jr c, .PartyFull
|
jr c, .PartyFull
|
||||||
ld a, PC_DEPOSIT
|
ld a, PC_DEPOSIT
|
||||||
ld [wPokemonWithdrawDepositParameter], a
|
ld [wPokemonWithdrawDepositParameter], a
|
||||||
callba RemoveMonFromPartyOrBox
|
farcall RemoveMonFromPartyOrBox
|
||||||
ld a, [CurPartySpecies]
|
ld a, [CurPartySpecies]
|
||||||
call PlayCry
|
call PlayCry
|
||||||
hlcoord 0, 0
|
hlcoord 0, 0
|
||||||
@ -2020,7 +2020,7 @@ MovePKMNWitoutMail_InsertMon: ; e31e7
|
|||||||
.dw_return ; e322a
|
.dw_return ; e322a
|
||||||
pop af
|
pop af
|
||||||
ld e, a
|
ld e, a
|
||||||
callba MovePkmnWOMail_InsertMon_SaveGame
|
farcall MovePkmnWOMail_InsertMon_SaveGame
|
||||||
ret
|
ret
|
||||||
; e3233
|
; e3233
|
||||||
|
|
||||||
@ -2056,7 +2056,7 @@ MovePKMNWitoutMail_InsertMon: ; e31e7
|
|||||||
call .CopyFromParty
|
call .CopyFromParty
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wGameLogicPaused], a
|
ld [wGameLogicPaused], a
|
||||||
callba SaveGameData
|
farcall SaveGameData
|
||||||
xor a
|
xor a
|
||||||
ld [wGameLogicPaused], a
|
ld [wGameLogicPaused], a
|
||||||
call .CopyToBox
|
call .CopyToBox
|
||||||
@ -2106,7 +2106,7 @@ MovePKMNWitoutMail_InsertMon: ; e31e7
|
|||||||
ld a, [wBillsPC_BackupLoadedBox]
|
ld a, [wBillsPC_BackupLoadedBox]
|
||||||
dec a
|
dec a
|
||||||
ld e, a
|
ld e, a
|
||||||
callba MovePkmnWOMail_SaveGame
|
farcall MovePkmnWOMail_SaveGame
|
||||||
ld a, [wBillsPC_BackupCursorPosition]
|
ld a, [wBillsPC_BackupCursorPosition]
|
||||||
ld hl, wBillsPC_BackupScrollPosition
|
ld hl, wBillsPC_BackupScrollPosition
|
||||||
add [hl]
|
add [hl]
|
||||||
@ -2123,10 +2123,10 @@ MovePKMNWitoutMail_InsertMon: ; e31e7
|
|||||||
ld bc, BOXMON_STRUCT_LENGTH
|
ld bc, BOXMON_STRUCT_LENGTH
|
||||||
call CopyMonToTemp
|
call CopyMonToTemp
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
callba CalcwBufferMonStats
|
farcall CalcwBufferMonStats
|
||||||
ld a, PC_DEPOSIT
|
ld a, PC_DEPOSIT
|
||||||
ld [wPokemonWithdrawDepositParameter], a
|
ld [wPokemonWithdrawDepositParameter], a
|
||||||
callba RemoveMonFromPartyOrBox
|
farcall RemoveMonFromPartyOrBox
|
||||||
ret
|
ret
|
||||||
; e32fa
|
; e32fa
|
||||||
|
|
||||||
@ -2134,12 +2134,12 @@ MovePKMNWitoutMail_InsertMon: ; e31e7
|
|||||||
ld a, [wBillsPC_LoadedBox]
|
ld a, [wBillsPC_LoadedBox]
|
||||||
dec a
|
dec a
|
||||||
ld e, a
|
ld e, a
|
||||||
callba MovePkmnWOMail_SaveGame
|
farcall MovePkmnWOMail_SaveGame
|
||||||
ld a, [wBillsPC_CursorPosition]
|
ld a, [wBillsPC_CursorPosition]
|
||||||
ld hl, wBillsPC_ScrollPosition
|
ld hl, wBillsPC_ScrollPosition
|
||||||
add [hl]
|
add [hl]
|
||||||
ld [CurPartyMon], a
|
ld [CurPartyMon], a
|
||||||
callba InsertPokemonIntoBox
|
farcall InsertPokemonIntoBox
|
||||||
ret
|
ret
|
||||||
; e3316
|
; e3316
|
||||||
|
|
||||||
@ -2159,7 +2159,7 @@ MovePKMNWitoutMail_InsertMon: ; e31e7
|
|||||||
call CopyMonToTemp
|
call CopyMonToTemp
|
||||||
xor a
|
xor a
|
||||||
ld [wPokemonWithdrawDepositParameter], a
|
ld [wPokemonWithdrawDepositParameter], a
|
||||||
callba RemoveMonFromPartyOrBox
|
farcall RemoveMonFromPartyOrBox
|
||||||
ret
|
ret
|
||||||
; e3346
|
; e3346
|
||||||
|
|
||||||
@ -2168,7 +2168,7 @@ MovePKMNWitoutMail_InsertMon: ; e31e7
|
|||||||
ld hl, wBillsPC_ScrollPosition
|
ld hl, wBillsPC_ScrollPosition
|
||||||
add [hl]
|
add [hl]
|
||||||
ld [CurPartyMon], a
|
ld [CurPartyMon], a
|
||||||
callba InsertPokemonIntoParty
|
farcall InsertPokemonIntoParty
|
||||||
ret
|
ret
|
||||||
; e3357
|
; e3357
|
||||||
|
|
||||||
@ -2523,7 +2523,7 @@ BillsPC_ChangeBoxSubmenu: ; e36f9 (38:76f9)
|
|||||||
ld a, [MenuSelection]
|
ld a, [MenuSelection]
|
||||||
dec a
|
dec a
|
||||||
ld c, a
|
ld c, a
|
||||||
callba PrintPCBox
|
farcall PrintPCBox
|
||||||
call BillsPC_ClearTilemap
|
call BillsPC_ClearTilemap
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
@ -2540,13 +2540,13 @@ BillsPC_ChangeBoxSubmenu: ; e36f9 (38:76f9)
|
|||||||
ld a, [wCurBox]
|
ld a, [wCurBox]
|
||||||
cp e
|
cp e
|
||||||
ret z
|
ret z
|
||||||
callba ChangeBoxSaveGame
|
farcall ChangeBoxSaveGame
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.Name:
|
.Name:
|
||||||
ld b, $4 ; box
|
ld b, $4 ; box
|
||||||
ld de, wd002
|
ld de, wd002
|
||||||
callba NamingScreen
|
farcall NamingScreen
|
||||||
call ClearTileMap
|
call ClearTileMap
|
||||||
call LoadStandardFont
|
call LoadStandardFont
|
||||||
call LoadFontsBattleExtra
|
call LoadFontsBattleExtra
|
||||||
|
@ -111,16 +111,16 @@ BillsPC_SeeYa: ; e4cb
|
|||||||
|
|
||||||
BillsPC_MovePKMNMenu: ; e4cd
|
BillsPC_MovePKMNMenu: ; e4cd
|
||||||
call LoadStandardMenuDataHeader
|
call LoadStandardMenuDataHeader
|
||||||
callba IsAnyMonHoldingMail
|
farcall IsAnyMonHoldingMail
|
||||||
jr nc, .no_mail
|
jr nc, .no_mail
|
||||||
ld hl, .Text_MonHoldingMail
|
ld hl, .Text_MonHoldingMail
|
||||||
call PrintText
|
call PrintText
|
||||||
jr .quit
|
jr .quit
|
||||||
|
|
||||||
.no_mail
|
.no_mail
|
||||||
callba StartMovePkmnWOMail_SaveGame
|
farcall StartMovePkmnWOMail_SaveGame
|
||||||
jr c, .quit
|
jr c, .quit
|
||||||
callba _MovePKMNWithoutMail
|
farcall _MovePKMNWithoutMail
|
||||||
call ReturnToMapFromSubmenu
|
call ReturnToMapFromSubmenu
|
||||||
call ClearPCItemScreen
|
call ClearPCItemScreen
|
||||||
|
|
||||||
@ -136,7 +136,7 @@ BillsPC_MovePKMNMenu: ; e4cd
|
|||||||
|
|
||||||
BillsPC_DepositMenu: ; e4fe (3:64fe)
|
BillsPC_DepositMenu: ; e4fe (3:64fe)
|
||||||
call LoadStandardMenuDataHeader
|
call LoadStandardMenuDataHeader
|
||||||
callba _DepositPKMN
|
farcall _DepositPKMN
|
||||||
call ReturnToMapFromSubmenu
|
call ReturnToMapFromSubmenu
|
||||||
call ClearPCItemScreen
|
call ClearPCItemScreen
|
||||||
call CloseWindow
|
call CloseWindow
|
||||||
@ -205,7 +205,7 @@ CheckCurPartyMonFainted: ; e538
|
|||||||
|
|
||||||
BillsPC_WithdrawMenu: ; e559 (3:6559)
|
BillsPC_WithdrawMenu: ; e559 (3:6559)
|
||||||
call LoadStandardMenuDataHeader
|
call LoadStandardMenuDataHeader
|
||||||
callba _WithdrawPKMN
|
farcall _WithdrawPKMN
|
||||||
call ReturnToMapFromSubmenu
|
call ReturnToMapFromSubmenu
|
||||||
call ClearPCItemScreen
|
call ClearPCItemScreen
|
||||||
call CloseWindow
|
call CloseWindow
|
||||||
@ -231,7 +231,7 @@ UnknownText_0xe57e: ; 0xe57e
|
|||||||
db "@"
|
db "@"
|
||||||
|
|
||||||
BillsPC_ChangeBoxMenu: ; e583 (3:6583)
|
BillsPC_ChangeBoxMenu: ; e583 (3:6583)
|
||||||
callba _ChangeBox
|
farcall _ChangeBox
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
@ -231,8 +231,8 @@ HatchEggs: ; 16f70 (5:6f70)
|
|||||||
|
|
||||||
push de
|
push de
|
||||||
|
|
||||||
callba SetEggMonCaughtData
|
farcall SetEggMonCaughtData
|
||||||
callba TrainerRankings_EggsHatched
|
farcall TrainerRankings_EggsHatched
|
||||||
ld a, [CurPartyMon]
|
ld a, [CurPartyMon]
|
||||||
ld hl, PartyMon1Species
|
ld hl, PartyMon1Species
|
||||||
ld bc, PARTYMON_STRUCT_LENGTH
|
ld bc, PARTYMON_STRUCT_LENGTH
|
||||||
@ -337,7 +337,7 @@ HatchEggs: ; 16f70 (5:6f70)
|
|||||||
ld [MonType], a
|
ld [MonType], a
|
||||||
push de
|
push de
|
||||||
ld b, $0
|
ld b, $0
|
||||||
callba NamingScreen
|
farcall NamingScreen
|
||||||
pop hl
|
pop hl
|
||||||
ld de, StringBuffer1
|
ld de, StringBuffer1
|
||||||
call InitName
|
call InitName
|
||||||
@ -687,7 +687,7 @@ EggHatch_DoAnimFrame: ; 1727f (5:727f)
|
|||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
callab PlaySpriteAnimations
|
callfar PlaySpriteAnimations
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
@ -701,14 +701,14 @@ EggHatch_AnimationSequence: ; 1728f (5:728f)
|
|||||||
push af
|
push af
|
||||||
ld de, MUSIC_NONE
|
ld de, MUSIC_NONE
|
||||||
call PlayMusic
|
call PlayMusic
|
||||||
callba BlankScreen
|
farcall BlankScreen
|
||||||
call DisableLCD
|
call DisableLCD
|
||||||
ld hl, EggHatchGFX
|
ld hl, EggHatchGFX
|
||||||
ld de, VTiles0 tile $00
|
ld de, VTiles0 tile $00
|
||||||
ld bc, $20
|
ld bc, $20
|
||||||
ld a, BANK(EggHatchGFX)
|
ld a, BANK(EggHatchGFX)
|
||||||
call FarCopyBytes
|
call FarCopyBytes
|
||||||
callba ClearSpriteAnims
|
farcall ClearSpriteAnims
|
||||||
ld de, VTiles2 tile $00
|
ld de, VTiles2 tile $00
|
||||||
ld a, [wJumptableIndex]
|
ld a, [wJumptableIndex]
|
||||||
call GetHatchlingFrontpic
|
call GetHatchlingFrontpic
|
||||||
@ -817,7 +817,7 @@ INCBIN "gfx/evo/egg_hatch.2bpp"
|
|||||||
; 173b3
|
; 173b3
|
||||||
|
|
||||||
Hatch_InitShellFragments: ; 173b3 (5:73b3)
|
Hatch_InitShellFragments: ; 173b3 (5:73b3)
|
||||||
callba ClearSpriteAnims
|
farcall ClearSpriteAnims
|
||||||
ld hl, .SpriteData
|
ld hl, .SpriteData
|
||||||
.loop
|
.loop
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
|
@ -6,7 +6,7 @@ SelectQuantityToToss: ; 24fbf
|
|||||||
; 24fc9
|
; 24fc9
|
||||||
|
|
||||||
SelectQuantityToBuy: ; 24fc9
|
SelectQuantityToBuy: ; 24fc9
|
||||||
callba GetItemPrice
|
farcall GetItemPrice
|
||||||
RooftopSale_SelectQuantityToBuy: ; 24fcf
|
RooftopSale_SelectQuantityToBuy: ; 24fcf
|
||||||
ld a, d
|
ld a, d
|
||||||
ld [Buffer1], a
|
ld [Buffer1], a
|
||||||
@ -19,7 +19,7 @@ RooftopSale_SelectQuantityToBuy: ; 24fcf
|
|||||||
; 24fe1
|
; 24fe1
|
||||||
|
|
||||||
SelectQuantityToSell: ; 24fe1
|
SelectQuantityToSell: ; 24fe1
|
||||||
callba GetItemPrice
|
farcall GetItemPrice
|
||||||
ld a, d
|
ld a, d
|
||||||
ld [Buffer1], a
|
ld [Buffer1], a
|
||||||
ld a, e
|
ld a, e
|
||||||
|
@ -52,7 +52,7 @@ CheckPartyFullAfterContest: ; 4d9e5
|
|||||||
xor a
|
xor a
|
||||||
ld [MonType], a
|
ld [MonType], a
|
||||||
ld de, wMonOrItemNameBuffer
|
ld de, wMonOrItemNameBuffer
|
||||||
callab InitNickname
|
callfar InitNickname
|
||||||
|
|
||||||
.Party_SkipNickname:
|
.Party_SkipNickname:
|
||||||
ld a, [PartyCount]
|
ld a, [PartyCount]
|
||||||
@ -103,7 +103,7 @@ CheckPartyFullAfterContest: ; 4d9e5
|
|||||||
ld de, wBufferMonOT
|
ld de, wBufferMonOT
|
||||||
ld bc, NAME_LENGTH
|
ld bc, NAME_LENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
callab InsertPokemonIntoBox
|
callfar InsertPokemonIntoBox
|
||||||
ld a, [CurPartySpecies]
|
ld a, [CurPartySpecies]
|
||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
@ -113,7 +113,7 @@ CheckPartyFullAfterContest: ; 4d9e5
|
|||||||
ld a, BOXMON
|
ld a, BOXMON
|
||||||
ld [MonType], a
|
ld [MonType], a
|
||||||
ld de, wMonOrItemNameBuffer
|
ld de, wMonOrItemNameBuffer
|
||||||
callab InitNickname
|
callfar InitNickname
|
||||||
ld hl, wMonOrItemNameBuffer
|
ld hl, wMonOrItemNameBuffer
|
||||||
|
|
||||||
.Box_SkipNickname:
|
.Box_SkipNickname:
|
||||||
|
@ -156,7 +156,7 @@ _CGB_FinishBattleScreenLayout: ; 8e23
|
|||||||
|
|
||||||
|
|
||||||
InitPartyMenuBGPal7: ; 8e85
|
InitPartyMenuBGPal7: ; 8e85
|
||||||
callba Function100dc0
|
farcall Function100dc0
|
||||||
Mobile_InitPartyMenuBGPal7: ; 8e8b
|
Mobile_InitPartyMenuBGPal7: ; 8e8b
|
||||||
ld hl, Palette_b311
|
ld hl, Palette_b311
|
||||||
jr nc, .not_mobile
|
jr nc, .not_mobile
|
||||||
@ -170,7 +170,7 @@ Mobile_InitPartyMenuBGPal7: ; 8e8b
|
|||||||
; 8e9f
|
; 8e9f
|
||||||
|
|
||||||
InitPartyMenuBGPal0: ; 8e9f
|
InitPartyMenuBGPal0: ; 8e9f
|
||||||
callba Function100dc0
|
farcall Function100dc0
|
||||||
ld hl, Palette_b311
|
ld hl, Palette_b311
|
||||||
jr nc, .not_mobile
|
jr nc, .not_mobile
|
||||||
ld hl, Palette_b309
|
ld hl, Palette_b309
|
||||||
|
@ -202,13 +202,13 @@ RestartClock: ; 20021 (8:4021)
|
|||||||
decoord 1, 8
|
decoord 1, 8
|
||||||
ld a, [Buffer4]
|
ld a, [Buffer4]
|
||||||
ld b, a
|
ld b, a
|
||||||
callba PrintDayOfWeek
|
farcall PrintDayOfWeek
|
||||||
ld a, [Buffer5]
|
ld a, [Buffer5]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [Buffer6]
|
ld a, [Buffer6]
|
||||||
ld c, a
|
ld c, a
|
||||||
decoord 11, 8
|
decoord 11, 8
|
||||||
callba PrintHoursMins
|
farcall PrintHoursMins
|
||||||
ld a, [Buffer2]
|
ld a, [Buffer2]
|
||||||
lb de, " ", " "
|
lb de, " ", " "
|
||||||
call .PlaceChars
|
call .PlaceChars
|
||||||
|
@ -691,7 +691,7 @@ InitPartyMenuOBPals:
|
|||||||
|
|
||||||
GetBattlemonBackpicPalettePointer:
|
GetBattlemonBackpicPalettePointer:
|
||||||
push de
|
push de
|
||||||
callba GetPartyMonDVs
|
farcall GetPartyMonDVs
|
||||||
ld c, l
|
ld c, l
|
||||||
ld b, h
|
ld b, h
|
||||||
ld a, [TempBattleMonSpecies]
|
ld a, [TempBattleMonSpecies]
|
||||||
@ -701,7 +701,7 @@ GetBattlemonBackpicPalettePointer:
|
|||||||
|
|
||||||
GetEnemyFrontpicPalettePointer:
|
GetEnemyFrontpicPalettePointer:
|
||||||
push de
|
push de
|
||||||
callba GetEnemyMonDVs
|
farcall GetEnemyMonDVs
|
||||||
ld c, l
|
ld c, l
|
||||||
ld b, h
|
ld b, h
|
||||||
ld a, [TempEnemyMonSpecies]
|
ld a, [TempEnemyMonSpecies]
|
||||||
@ -1306,7 +1306,7 @@ INCLUDE "gfx/pics/palette_pointers.asm"
|
|||||||
INCLUDE "gfx/trainer_palettes.asm"
|
INCLUDE "gfx/trainer_palettes.asm"
|
||||||
|
|
||||||
LoadMapPals:
|
LoadMapPals:
|
||||||
callba LoadSpecialMapPalette
|
farcall LoadSpecialMapPalette
|
||||||
jr c, .got_pals
|
jr c, .got_pals
|
||||||
|
|
||||||
; Which palette group is based on whether we're outside or inside
|
; Which palette group is based on whether we're outside or inside
|
||||||
|
@ -17,7 +17,7 @@ ConsumeHeldItem: ; 27192
|
|||||||
push af
|
push af
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
ld b, a
|
ld b, a
|
||||||
callba GetItemHeldEffect
|
farcall GetItemHeldEffect
|
||||||
ld hl, .ConsumableEffects
|
ld hl, .ConsumableEffects
|
||||||
.loop
|
.loop
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
|
@ -5,7 +5,7 @@ GetMysteryGift_MobileAdapterLayout: ; 4930f (mobile)
|
|||||||
ld a, [SGBPredef]
|
ld a, [SGBPredef]
|
||||||
.not_ram
|
.not_ram
|
||||||
push af
|
push af
|
||||||
callba ResetBGPals
|
farcall ResetBGPals
|
||||||
pop af
|
pop af
|
||||||
ld l, a
|
ld l, a
|
||||||
ld h, 0
|
ld h, 0
|
||||||
@ -70,8 +70,8 @@ MG_Mobile_Layout00: ; 4936e (12:536e)
|
|||||||
call MG_Mobile_Layout_LoadPals
|
call MG_Mobile_Layout_LoadPals
|
||||||
call MG_Mobile_Layout_WipeAttrMap
|
call MG_Mobile_Layout_WipeAttrMap
|
||||||
call MG_Mobile_Layout_CreatePalBoxes
|
call MG_Mobile_Layout_CreatePalBoxes
|
||||||
callba ApplyAttrMap
|
farcall ApplyAttrMap
|
||||||
callba ApplyPals
|
farcall ApplyPals
|
||||||
ret
|
ret
|
||||||
|
|
||||||
MG_Mobile_Layout_CreatePalBoxes: ; 49384 (12:5384)
|
MG_Mobile_Layout_CreatePalBoxes: ; 49384 (12:5384)
|
||||||
@ -167,8 +167,8 @@ MG_Mobile_Layout01: ; 4942f
|
|||||||
call Function49496
|
call Function49496
|
||||||
|
|
||||||
.asm_49467
|
.asm_49467
|
||||||
callba ApplyAttrMap
|
farcall ApplyAttrMap
|
||||||
callba ApplyPals
|
farcall ApplyPals
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hCGBPalUpdate], a
|
ld [hCGBPalUpdate], a
|
||||||
ret
|
ret
|
||||||
@ -215,9 +215,9 @@ MG_Mobile_Layout02: ; 49706
|
|||||||
ld bc, 1 palettes
|
ld bc, 1 palettes
|
||||||
ld a, BANK(UnknBGPals)
|
ld a, BANK(UnknBGPals)
|
||||||
call FarCopyWRAM
|
call FarCopyWRAM
|
||||||
callba ApplyPals
|
farcall ApplyPals
|
||||||
call MG_Mobile_Layout_WipeAttrMap
|
call MG_Mobile_Layout_WipeAttrMap
|
||||||
callba ApplyAttrMap
|
farcall ApplyAttrMap
|
||||||
ld hl, Palette_4973a
|
ld hl, Palette_4973a
|
||||||
ld de, UnknOBPals
|
ld de, UnknOBPals
|
||||||
ld bc, 1 palettes
|
ld bc, 1 palettes
|
||||||
@ -246,7 +246,7 @@ Function49742: ; 49742
|
|||||||
ld bc, $40
|
ld bc, $40
|
||||||
ld a, $5
|
ld a, $5
|
||||||
call FarCopyWRAM
|
call FarCopyWRAM
|
||||||
callba ApplyPals
|
farcall ApplyPals
|
||||||
ret
|
ret
|
||||||
; 49757
|
; 49757
|
||||||
|
|
||||||
@ -312,7 +312,7 @@ LoadTradeRoomBGPals: ; 49811
|
|||||||
ld bc, 6 palettes
|
ld bc, 6 palettes
|
||||||
ld a, BANK(UnknBGPals)
|
ld a, BANK(UnknBGPals)
|
||||||
call FarCopyWRAM
|
call FarCopyWRAM
|
||||||
callba ApplyPals
|
farcall ApplyPals
|
||||||
ret
|
ret
|
||||||
; 49826
|
; 49826
|
||||||
|
|
||||||
|
@ -18,12 +18,12 @@ Copyright_GFPresents: ; e4579
|
|||||||
call SetPalettes
|
call SetPalettes
|
||||||
ld c, 10
|
ld c, 10
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
callab Copyright
|
callfar Copyright
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
ld c, 100
|
ld c, 100
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
call ClearTileMap
|
call ClearTileMap
|
||||||
callba GBCOnlyScreen
|
farcall GBCOnlyScreen
|
||||||
call .GetGFLogoGFX
|
call .GetGFLogoGFX
|
||||||
.joy_loop
|
.joy_loop
|
||||||
call JoyTextDelay
|
call JoyTextDelay
|
||||||
@ -34,7 +34,7 @@ Copyright_GFPresents: ; e4579
|
|||||||
bit 7, a
|
bit 7, a
|
||||||
jr nz, .finish
|
jr nz, .finish
|
||||||
call PlaceGameFreakPresents
|
call PlaceGameFreakPresents
|
||||||
callba PlaySpriteAnimations
|
farcall PlaySpriteAnimations
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
jr .joy_loop
|
jr .joy_loop
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ Copyright_GFPresents: ; e4579
|
|||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
|
|
||||||
callba ClearSpriteAnims
|
farcall ClearSpriteAnims
|
||||||
depixel 10, 11, 4, 0
|
depixel 10, 11, 4, 0
|
||||||
ld a, SPRITE_ANIM_INDEX_GAMEFREAK_LOGO
|
ld a, SPRITE_ANIM_INDEX_GAMEFREAK_LOGO
|
||||||
call _InitSpriteAnimStruct
|
call _InitSpriteAnimStruct
|
||||||
@ -107,7 +107,7 @@ Copyright_GFPresents: ; e4579
|
|||||||
; e465e
|
; e465e
|
||||||
|
|
||||||
.StopGamefreakAnim: ; e465e
|
.StopGamefreakAnim: ; e465e
|
||||||
callba ClearSpriteAnims
|
farcall ClearSpriteAnims
|
||||||
call ClearTileMap
|
call ClearTileMap
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
ld c, 16
|
ld c, 16
|
||||||
@ -253,7 +253,7 @@ GameFreakLogoScene2: ; e470d (39:470d)
|
|||||||
add $20
|
add $20
|
||||||
.asm_e4723
|
.asm_e4723
|
||||||
ld e, a
|
ld e, a
|
||||||
callba BattleAnim_Sine_e
|
farcall BattleAnim_Sine_e
|
||||||
ld hl, SPRITEANIMSTRUCT_YOFFSET
|
ld hl, SPRITEANIMSTRUCT_YOFFSET
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], e
|
ld [hl], e
|
||||||
@ -368,7 +368,7 @@ CrystalIntro: ; e48ac
|
|||||||
bit 7, a
|
bit 7, a
|
||||||
jr nz, .done
|
jr nz, .done
|
||||||
call IntroSceneJumper
|
call IntroSceneJumper
|
||||||
callba PlaySpriteAnimations
|
farcall PlaySpriteAnimations
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
jp .loop
|
jp .loop
|
||||||
|
|
||||||
@ -499,7 +499,7 @@ IntroScene1: ; e495b (39:495b)
|
|||||||
ld [hWX], a
|
ld [hWX], a
|
||||||
ld a, $90
|
ld a, $90
|
||||||
ld [hWY], a
|
ld [hWY], a
|
||||||
callba ClearSpriteAnims
|
farcall ClearSpriteAnims
|
||||||
call Intro_SetCGBPalUpdate
|
call Intro_SetCGBPalUpdate
|
||||||
xor a
|
xor a
|
||||||
ld [wIntroSceneFrameCounter], a
|
ld [wIntroSceneFrameCounter], a
|
||||||
@ -638,7 +638,7 @@ IntroScene5: ; e4a7a (39:4a7a)
|
|||||||
ld [hWX], a
|
ld [hWX], a
|
||||||
ld a, $90
|
ld a, $90
|
||||||
ld [hWY], a
|
ld [hWY], a
|
||||||
callba ClearSpriteAnims
|
farcall ClearSpriteAnims
|
||||||
call Intro_SetCGBPalUpdate
|
call Intro_SetCGBPalUpdate
|
||||||
xor a
|
xor a
|
||||||
ld [wIntroSceneFrameCounter], a
|
ld [wIntroSceneFrameCounter], a
|
||||||
@ -749,7 +749,7 @@ IntroScene7: ; e4b3f (39:4b3f)
|
|||||||
ld a, $90
|
ld a, $90
|
||||||
ld [hWY], a
|
ld [hWY], a
|
||||||
call Intro_ResetLYOverrides
|
call Intro_ResetLYOverrides
|
||||||
callba ClearSpriteAnims
|
farcall ClearSpriteAnims
|
||||||
depixel 13, 27, 4, 0
|
depixel 13, 27, 4, 0
|
||||||
ld a, SPRITE_ANIM_INDEX_INTRO_SUICUNE
|
ld a, SPRITE_ANIM_INDEX_INTRO_SUICUNE
|
||||||
call _InitSpriteAnimStruct
|
call _InitSpriteAnimStruct
|
||||||
@ -787,7 +787,7 @@ IntroScene8: ; e4bd3 (39:4bd3)
|
|||||||
.finish
|
.finish
|
||||||
ld de, SFX_INTRO_SUICUNE_2
|
ld de, SFX_INTRO_SUICUNE_2
|
||||||
call PlaySFX
|
call PlaySFX
|
||||||
callba DeinitializeAllSprites
|
farcall DeinitializeAllSprites
|
||||||
call NextIntroScene
|
call NextIntroScene
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -903,7 +903,7 @@ IntroScene11: ; e4c86 (39:4c86)
|
|||||||
ld [hWX], a
|
ld [hWX], a
|
||||||
ld a, $90
|
ld a, $90
|
||||||
ld [hWY], a
|
ld [hWY], a
|
||||||
callba ClearSpriteAnims
|
farcall ClearSpriteAnims
|
||||||
call Intro_SetCGBPalUpdate
|
call Intro_SetCGBPalUpdate
|
||||||
xor a
|
xor a
|
||||||
ld [wIntroSceneFrameCounter], a
|
ld [wIntroSceneFrameCounter], a
|
||||||
@ -1030,7 +1030,7 @@ IntroScene13: ; e4d6d (39:4d6d)
|
|||||||
ld [hWX], a
|
ld [hWX], a
|
||||||
ld a, $90
|
ld a, $90
|
||||||
ld [hWY], a
|
ld [hWY], a
|
||||||
callba ClearSpriteAnims
|
farcall ClearSpriteAnims
|
||||||
depixel 13, 11, 4, 0
|
depixel 13, 11, 4, 0
|
||||||
ld a, SPRITE_ANIM_INDEX_INTRO_SUICUNE
|
ld a, SPRITE_ANIM_INDEX_INTRO_SUICUNE
|
||||||
call _InitSpriteAnimStruct
|
call _InitSpriteAnimStruct
|
||||||
@ -1077,7 +1077,7 @@ IntroScene14: ; e4dfa (39:4dfa)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_e4e2c
|
.asm_e4e2c
|
||||||
callba DeinitializeAllSprites
|
farcall DeinitializeAllSprites
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_e4e33
|
.asm_e4e33
|
||||||
@ -1140,7 +1140,7 @@ IntroScene15: ; e4e40 (39:4e40)
|
|||||||
ld [hWX], a
|
ld [hWX], a
|
||||||
ld a, $90
|
ld a, $90
|
||||||
ld [hWY], a
|
ld [hWY], a
|
||||||
callba ClearSpriteAnims
|
farcall ClearSpriteAnims
|
||||||
call Intro_SetCGBPalUpdate
|
call Intro_SetCGBPalUpdate
|
||||||
depixel 8, 5
|
depixel 8, 5
|
||||||
ld a, SPRITE_ANIM_INDEX_INTRO_UNOWN_F
|
ld a, SPRITE_ANIM_INDEX_INTRO_UNOWN_F
|
||||||
@ -1213,7 +1213,7 @@ IntroScene17: ; e4ef5 (39:4ef5)
|
|||||||
ld [hWX], a
|
ld [hWX], a
|
||||||
ld a, $90
|
ld a, $90
|
||||||
ld [hWY], a
|
ld [hWY], a
|
||||||
callba ClearSpriteAnims
|
farcall ClearSpriteAnims
|
||||||
call Intro_SetCGBPalUpdate
|
call Intro_SetCGBPalUpdate
|
||||||
xor a
|
xor a
|
||||||
ld [wIntroSceneFrameCounter], a
|
ld [wIntroSceneFrameCounter], a
|
||||||
@ -1288,7 +1288,7 @@ IntroScene19: ; e4f7e (39:4f7e)
|
|||||||
ld [hWX], a
|
ld [hWX], a
|
||||||
ld a, $90
|
ld a, $90
|
||||||
ld [hWY], a
|
ld [hWY], a
|
||||||
callba ClearSpriteAnims
|
farcall ClearSpriteAnims
|
||||||
ld hl, wSpriteAnimDict
|
ld hl, wSpriteAnimDict
|
||||||
xor a
|
xor a
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
@ -1370,7 +1370,7 @@ IntroScene22: ; e5072 (39:5072)
|
|||||||
jr nc, .done
|
jr nc, .done
|
||||||
ret
|
ret
|
||||||
.done
|
.done
|
||||||
callba DeinitializeAllSprites
|
farcall DeinitializeAllSprites
|
||||||
call NextIntroScene
|
call NextIntroScene
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -1457,7 +1457,7 @@ IntroScene26: ; e50bb (39:50bb)
|
|||||||
ld [hWX], a
|
ld [hWX], a
|
||||||
ld a, $90
|
ld a, $90
|
||||||
ld [hWY], a
|
ld [hWY], a
|
||||||
callba ClearSpriteAnims
|
farcall ClearSpriteAnims
|
||||||
call Intro_SetCGBPalUpdate
|
call Intro_SetCGBPalUpdate
|
||||||
xor a
|
xor a
|
||||||
ld [wIntroSceneFrameCounter], a
|
ld [wIntroSceneFrameCounter], a
|
||||||
|
@ -341,12 +341,12 @@ Function81adb: ; 81adb
|
|||||||
.asm_81b7a
|
.asm_81b7a
|
||||||
ld a, [wd265]
|
ld a, [wd265]
|
||||||
ld [TrainerClass], a
|
ld [TrainerClass], a
|
||||||
callab GetTrainerAttributes
|
callfar GetTrainerAttributes
|
||||||
ld de, StringBuffer1
|
ld de, StringBuffer1
|
||||||
hlcoord 4, 1
|
hlcoord 4, 1
|
||||||
call PlaceString
|
call PlaceString
|
||||||
ld de, VTiles2
|
ld de, VTiles2
|
||||||
callab GetTrainerPic
|
callfar GetTrainerPic
|
||||||
xor a
|
xor a
|
||||||
ld [TempEnemyMonSpecies], a
|
ld [TempEnemyMonSpecies], a
|
||||||
ld [hGraphicStartTile], a
|
ld [hGraphicStartTile], a
|
||||||
|
@ -1368,7 +1368,7 @@ _GetDecorationSprite: ; 27085
|
|||||||
ld c, a
|
ld c, a
|
||||||
push de
|
push de
|
||||||
push hl
|
push hl
|
||||||
callba GetDecorationSprite
|
farcall GetDecorationSprite
|
||||||
pop hl
|
pop hl
|
||||||
pop de
|
pop de
|
||||||
ld a, c
|
ld a, c
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
_ResetClock: ; 4d3b1
|
_ResetClock: ; 4d3b1
|
||||||
callba BlankScreen
|
farcall BlankScreen
|
||||||
ld b, SCGB_DIPLOMA
|
ld b, SCGB_DIPLOMA
|
||||||
call GetSGBLayout
|
call GetSGBLayout
|
||||||
call LoadStandardFont
|
call LoadStandardFont
|
||||||
@ -260,7 +260,7 @@ ClockResetPassword: ; 4d41e
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
_DeleteSaveData: ; 4d54c
|
_DeleteSaveData: ; 4d54c
|
||||||
callba BlankScreen
|
farcall BlankScreen
|
||||||
ld b, SCGB_DIPLOMA
|
ld b, SCGB_DIPLOMA
|
||||||
call GetSGBLayout
|
call GetSGBLayout
|
||||||
call LoadStandardFont
|
call LoadStandardFont
|
||||||
@ -276,7 +276,7 @@ _DeleteSaveData: ; 4d54c
|
|||||||
ld a, [wMenuCursorY]
|
ld a, [wMenuCursorY]
|
||||||
cp $1
|
cp $1
|
||||||
ret z
|
ret z
|
||||||
callba EmptyAllSRAMBanks
|
farcall EmptyAllSRAMBanks
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.Text_ClearAllSaveData: ; 0x4d580
|
.Text_ClearAllSaveData: ; 0x4d580
|
||||||
|
@ -10,7 +10,7 @@ _DummyGame: ; e1e5b (38:5e5b)
|
|||||||
call DisableLCD
|
call DisableLCD
|
||||||
ld b, SCGB_DIPLOMA
|
ld b, SCGB_DIPLOMA
|
||||||
call GetSGBLayout
|
call GetSGBLayout
|
||||||
callab ClearSpriteAnims
|
callfar ClearSpriteAnims
|
||||||
ld hl, LZ_e2221
|
ld hl, LZ_e2221
|
||||||
ld de, VTiles2 tile $00
|
ld de, VTiles2 tile $00
|
||||||
call Decompress
|
call Decompress
|
||||||
@ -47,7 +47,7 @@ _DummyGame: ; e1e5b (38:5e5b)
|
|||||||
bit 7, a
|
bit 7, a
|
||||||
jr nz, .quit
|
jr nz, .quit
|
||||||
call .ExecuteJumptable
|
call .ExecuteJumptable
|
||||||
callab PlaySpriteAnimations
|
callfar PlaySpriteAnimations
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
|
@ -120,14 +120,14 @@ StartMap: ; 96724
|
|||||||
ld hl, MapStatus
|
ld hl, MapStatus
|
||||||
ld bc, wMapStatusEnd - MapStatus
|
ld bc, wMapStatusEnd - MapStatus
|
||||||
call ByteFill
|
call ByteFill
|
||||||
callba InitCallReceiveDelay
|
farcall InitCallReceiveDelay
|
||||||
call ClearJoypad
|
call ClearJoypad
|
||||||
EnterMap: ; 9673e
|
EnterMap: ; 9673e
|
||||||
xor a
|
xor a
|
||||||
ld [wXYComparePointer], a
|
ld [wXYComparePointer], a
|
||||||
ld [wXYComparePointer + 1], a
|
ld [wXYComparePointer + 1], a
|
||||||
call SetUpFiveStepWildEncounterCooldown
|
call SetUpFiveStepWildEncounterCooldown
|
||||||
callba RunMapSetupScript
|
farcall RunMapSetupScript
|
||||||
call DisableEvents
|
call DisableEvents
|
||||||
|
|
||||||
ld a, [hMapEntryMethod]
|
ld a, [hMapEntryMethod]
|
||||||
@ -159,7 +159,7 @@ UnusedWait30Frames: ; 9676d
|
|||||||
HandleMap: ; 96773
|
HandleMap: ; 96773
|
||||||
call ResetOverworldDelay
|
call ResetOverworldDelay
|
||||||
call HandleMapTimeAndJoypad
|
call HandleMapTimeAndJoypad
|
||||||
callba HandleCmdQueue ; no need to farcall
|
farcall HandleCmdQueue ; no need to farcall
|
||||||
call MapEvents
|
call MapEvents
|
||||||
|
|
||||||
; Not immediately entering a connected map will cause problems.
|
; Not immediately entering a connected map will cause problems.
|
||||||
@ -188,7 +188,7 @@ MapEvents: ; 96795
|
|||||||
.events ; 967a1
|
.events ; 967a1
|
||||||
call PlayerEvents
|
call PlayerEvents
|
||||||
call DisableEvents
|
call DisableEvents
|
||||||
callba ScriptEvents
|
farcall ScriptEvents
|
||||||
ret
|
ret
|
||||||
; 967ae
|
; 967ae
|
||||||
|
|
||||||
@ -227,16 +227,16 @@ HandleMapTimeAndJoypad: ; 967c1
|
|||||||
; 967d1
|
; 967d1
|
||||||
|
|
||||||
HandleMapObjects: ; 967d1
|
HandleMapObjects: ; 967d1
|
||||||
callba HandleNPCStep ; engine/map_objects.asm
|
farcall HandleNPCStep ; engine/map_objects.asm
|
||||||
callba _HandlePlayerStep
|
farcall _HandlePlayerStep
|
||||||
call _CheckObjectEnteringVisibleRange
|
call _CheckObjectEnteringVisibleRange
|
||||||
ret
|
ret
|
||||||
; 967e1
|
; 967e1
|
||||||
|
|
||||||
HandleMapBackground: ; 967e1
|
HandleMapBackground: ; 967e1
|
||||||
callba _UpdateSprites
|
farcall _UpdateSprites
|
||||||
callba ScrollScreen
|
farcall ScrollScreen
|
||||||
callba PlaceMapNameSign
|
farcall PlaceMapNameSign
|
||||||
ret
|
ret
|
||||||
; 967f4
|
; 967f4
|
||||||
|
|
||||||
@ -264,7 +264,7 @@ _CheckObjectEnteringVisibleRange: ; 96812
|
|||||||
ld hl, wPlayerStepFlags
|
ld hl, wPlayerStepFlags
|
||||||
bit 6, [hl]
|
bit 6, [hl]
|
||||||
ret z
|
ret z
|
||||||
callba CheckObjectEnteringVisibleRange
|
farcall CheckObjectEnteringVisibleRange
|
||||||
ret
|
ret
|
||||||
; 9681f
|
; 9681f
|
||||||
|
|
||||||
@ -300,7 +300,7 @@ PlayerEvents: ; 9681f
|
|||||||
|
|
||||||
.ok
|
.ok
|
||||||
push af
|
push af
|
||||||
callba EnableScriptMode
|
farcall EnableScriptMode
|
||||||
pop af
|
pop af
|
||||||
|
|
||||||
ld [ScriptRunning], a
|
ld [ScriptRunning], a
|
||||||
@ -340,7 +340,7 @@ CheckTileEvent: ; 96874
|
|||||||
call CheckWarpConnxnScriptFlag
|
call CheckWarpConnxnScriptFlag
|
||||||
jr z, .connections_disabled
|
jr z, .connections_disabled
|
||||||
|
|
||||||
callba CheckMovingOffEdgeOfMap
|
farcall CheckMovingOffEdgeOfMap
|
||||||
jr c, .map_connection
|
jr c, .map_connection
|
||||||
|
|
||||||
call CheckWarpTile
|
call CheckWarpTile
|
||||||
@ -465,8 +465,8 @@ endr
|
|||||||
ld hl, ScriptFlags
|
ld hl, ScriptFlags
|
||||||
res 3, [hl]
|
res 3, [hl]
|
||||||
|
|
||||||
callba EnableScriptMode
|
farcall EnableScriptMode
|
||||||
callba ScriptEvents
|
farcall ScriptEvents
|
||||||
|
|
||||||
ld hl, ScriptFlags
|
ld hl, ScriptFlags
|
||||||
bit 3, [hl]
|
bit 3, [hl]
|
||||||
@ -495,15 +495,15 @@ CheckTimeEvents: ; 9693a
|
|||||||
bit 2, [hl] ; bug contest
|
bit 2, [hl] ; bug contest
|
||||||
jr z, .do_daily
|
jr z, .do_daily
|
||||||
|
|
||||||
callba CheckBugContestTimer
|
farcall CheckBugContestTimer
|
||||||
jr c, .end_bug_contest
|
jr c, .end_bug_contest
|
||||||
xor a
|
xor a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.do_daily
|
.do_daily
|
||||||
callba CheckDailyResetTimer
|
farcall CheckDailyResetTimer
|
||||||
callba CheckPokerusTick
|
farcall CheckPokerusTick
|
||||||
callba CheckPhoneCall
|
farcall CheckPhoneCall
|
||||||
ret c
|
ret c
|
||||||
|
|
||||||
.nothing
|
.nothing
|
||||||
@ -532,7 +532,7 @@ OWPlayerInput: ; 96974
|
|||||||
jr nz, .NoAction
|
jr nz, .NoAction
|
||||||
|
|
||||||
; Can't perform button actions while sliding on ice.
|
; Can't perform button actions while sliding on ice.
|
||||||
callba CheckStandingOnIce
|
farcall CheckStandingOnIce
|
||||||
jr c, .NoAction
|
jr c, .NoAction
|
||||||
|
|
||||||
call CheckAPressOW
|
call CheckAPressOW
|
||||||
@ -547,7 +547,7 @@ OWPlayerInput: ; 96974
|
|||||||
|
|
||||||
.Action:
|
.Action:
|
||||||
push af
|
push af
|
||||||
callba StopPlayerForEvent
|
farcall StopPlayerForEvent
|
||||||
pop af
|
pop af
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
@ -576,7 +576,7 @@ PlayTalkObject: ; 969ac
|
|||||||
; 969b5
|
; 969b5
|
||||||
|
|
||||||
TryObjectEvent: ; 969b5
|
TryObjectEvent: ; 969b5
|
||||||
callba CheckFacingObject
|
farcall CheckFacingObject
|
||||||
jr c, .IsObject
|
jr c, .IsObject
|
||||||
xor a
|
xor a
|
||||||
ret
|
ret
|
||||||
@ -804,7 +804,7 @@ CheckSignFlag: ; 96ad8
|
|||||||
; 96af0
|
; 96af0
|
||||||
|
|
||||||
PlayerMovement: ; 96af0
|
PlayerMovement: ; 96af0
|
||||||
callba DoPlayerMovement
|
farcall DoPlayerMovement
|
||||||
ld a, c
|
ld a, c
|
||||||
ld hl, .pointers
|
ld hl, .pointers
|
||||||
rst JumpTable
|
rst JumpTable
|
||||||
@ -934,7 +934,7 @@ CountStep: ; 96b79
|
|||||||
jr nz, .done
|
jr nz, .done
|
||||||
|
|
||||||
; If there is a special phone call, don't count the step.
|
; If there is a special phone call, don't count the step.
|
||||||
callba CheckSpecialPhoneCall
|
farcall CheckSpecialPhoneCall
|
||||||
jr c, .doscript
|
jr c, .doscript
|
||||||
|
|
||||||
; If Repel wore off, don't count the step.
|
; 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.
|
; Every 256 steps, increase the happiness of all your Pokemon.
|
||||||
jr nz, .skip_happiness
|
jr nz, .skip_happiness
|
||||||
|
|
||||||
callba StepHappiness
|
farcall StepHappiness
|
||||||
|
|
||||||
.skip_happiness
|
.skip_happiness
|
||||||
; Every 256 steps, offset from the happiness incrementor by 128 steps,
|
; Every 256 steps, offset from the happiness incrementor by 128 steps,
|
||||||
@ -959,12 +959,12 @@ CountStep: ; 96b79
|
|||||||
cp $80
|
cp $80
|
||||||
jr nz, .skip_egg
|
jr nz, .skip_egg
|
||||||
|
|
||||||
callba DoEggStep
|
farcall DoEggStep
|
||||||
jr nz, .hatch
|
jr nz, .hatch
|
||||||
|
|
||||||
.skip_egg
|
.skip_egg
|
||||||
; Increase the EXP of (both) DayCare Pokemon by 1.
|
; Increase the EXP of (both) DayCare Pokemon by 1.
|
||||||
callba DayCareStep
|
farcall DayCareStep
|
||||||
|
|
||||||
; Every four steps, deal damage to all Poisoned Pokemon
|
; Every four steps, deal damage to all Poisoned Pokemon
|
||||||
ld hl, PoisonStepCount
|
ld hl, PoisonStepCount
|
||||||
@ -973,11 +973,11 @@ CountStep: ; 96b79
|
|||||||
jr c, .skip_poison
|
jr c, .skip_poison
|
||||||
ld [hl], 0
|
ld [hl], 0
|
||||||
|
|
||||||
callba DoPoisonStep
|
farcall DoPoisonStep
|
||||||
jr c, .doscript
|
jr c, .doscript
|
||||||
|
|
||||||
.skip_poison
|
.skip_poison
|
||||||
callba DoBikeStep
|
farcall DoBikeStep
|
||||||
|
|
||||||
.done
|
.done
|
||||||
xor a
|
xor a
|
||||||
|
@ -54,38 +54,38 @@ CheckFacingTileEvent:: ; 97c5f
|
|||||||
call GetFacingTileCoord
|
call GetFacingTileCoord
|
||||||
ld [EngineBuffer1], a
|
ld [EngineBuffer1], a
|
||||||
ld c, a
|
ld c, a
|
||||||
callba CheckFacingTileForStd
|
farcall CheckFacingTileForStd
|
||||||
jr c, .done
|
jr c, .done
|
||||||
|
|
||||||
call CheckCutTreeTile
|
call CheckCutTreeTile
|
||||||
jr nz, .whirlpool
|
jr nz, .whirlpool
|
||||||
callba TryCutOW
|
farcall TryCutOW
|
||||||
jr .done
|
jr .done
|
||||||
|
|
||||||
.whirlpool
|
.whirlpool
|
||||||
ld a, [EngineBuffer1]
|
ld a, [EngineBuffer1]
|
||||||
call CheckWhirlpoolTile
|
call CheckWhirlpoolTile
|
||||||
jr nz, .waterfall
|
jr nz, .waterfall
|
||||||
callba TryWhirlpoolOW
|
farcall TryWhirlpoolOW
|
||||||
jr .done
|
jr .done
|
||||||
|
|
||||||
.waterfall
|
.waterfall
|
||||||
ld a, [EngineBuffer1]
|
ld a, [EngineBuffer1]
|
||||||
call CheckWaterfallTile
|
call CheckWaterfallTile
|
||||||
jr nz, .headbutt
|
jr nz, .headbutt
|
||||||
callba TryWaterfallOW
|
farcall TryWaterfallOW
|
||||||
jr .done
|
jr .done
|
||||||
|
|
||||||
.headbutt
|
.headbutt
|
||||||
ld a, [EngineBuffer1]
|
ld a, [EngineBuffer1]
|
||||||
call CheckHeadbuttTreeTile
|
call CheckHeadbuttTreeTile
|
||||||
jr nz, .surf
|
jr nz, .surf
|
||||||
callba TryHeadbuttOW
|
farcall TryHeadbuttOW
|
||||||
jr c, .done
|
jr c, .done
|
||||||
jr .noevent
|
jr .noevent
|
||||||
|
|
||||||
.surf
|
.surf
|
||||||
callba TrySurfOW
|
farcall TrySurfOW
|
||||||
jr nc, .noevent
|
jr nc, .noevent
|
||||||
jr .done
|
jr .done
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ RandomEncounter:: ; 97cc0
|
|||||||
ld hl, StatusFlags2
|
ld hl, StatusFlags2
|
||||||
bit 2, [hl] ; bug contest
|
bit 2, [hl] ; bug contest
|
||||||
jr nz, .bug_contest
|
jr nz, .bug_contest
|
||||||
callba TryWildEncounter
|
farcall TryWildEncounter
|
||||||
jr nz, .nope
|
jr nz, .nope
|
||||||
jr .ok
|
jr .ok
|
||||||
|
|
||||||
@ -157,7 +157,7 @@ CanUseSweetScent:: ; 97cfd
|
|||||||
jr z, .ice_check
|
jr z, .ice_check
|
||||||
cp DUNGEON
|
cp DUNGEON
|
||||||
jr z, .ice_check
|
jr z, .ice_check
|
||||||
callba CheckGrassCollision
|
farcall CheckGrassCollision
|
||||||
jr nc, .no
|
jr nc, .no
|
||||||
|
|
||||||
.ice_check
|
.ice_check
|
||||||
@ -176,7 +176,7 @@ _TryWildEncounter_BugContest: ; 97d23
|
|||||||
call TryWildEncounter_BugContest
|
call TryWildEncounter_BugContest
|
||||||
ret nc
|
ret nc
|
||||||
call ChooseWildEncounter_BugContest
|
call ChooseWildEncounter_BugContest
|
||||||
callba CheckRepelEffect
|
farcall CheckRepelEffect
|
||||||
ret
|
ret
|
||||||
; 97d31
|
; 97d31
|
||||||
|
|
||||||
@ -242,8 +242,8 @@ TryWildEncounter_BugContest: ; 97d64
|
|||||||
ld b, 20 percent
|
ld b, 20 percent
|
||||||
|
|
||||||
.ok
|
.ok
|
||||||
callba ApplyMusicEffectOnEncounterRate
|
farcall ApplyMusicEffectOnEncounterRate
|
||||||
callba ApplyCleanseTagEffectOnEncounterRate
|
farcall ApplyCleanseTagEffectOnEncounterRate
|
||||||
call Random
|
call Random
|
||||||
ld a, [hRandomAdd]
|
ld a, [hRandomAdd]
|
||||||
cp b
|
cp b
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
ReturnFromMapSetupScript:: ; b8000
|
ReturnFromMapSetupScript:: ; b8000
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], 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
|
; No other function in the game references the function at 2E:400A, here labeled
|
||||||
; ReturnFromMapSetupScript.inefficientcallba.
|
; ReturnFromMapSetupScript.inefficient_farcall.
|
||||||
callba .inefficientcallba ; this is a waste of 6 ROM bytes and 6 stack bytes
|
farcall .inefficient_farcall ; this is a waste of 6 ROM bytes and 6 stack bytes
|
||||||
ret
|
ret
|
||||||
; b800a
|
; b800a
|
||||||
|
|
||||||
.inefficientcallba ; b800a
|
.inefficient_farcall ; b800a
|
||||||
ld a, [MapGroup]
|
ld a, [MapGroup]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [MapNumber]
|
ld a, [MapNumber]
|
||||||
@ -45,7 +45,7 @@ ReturnFromMapSetupScript:: ; b8000
|
|||||||
ld [wLandmarkSignTimer], a
|
ld [wLandmarkSignTimer], a
|
||||||
call LoadMapNameSignGFX
|
call LoadMapNameSignGFX
|
||||||
call InitMapNameFrame
|
call InitMapNameFrame
|
||||||
callba HDMATransfer_OnlyTopFourRows
|
farcall HDMATransfer_OnlyTopFourRows
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.dont_do_map_sign
|
.dont_do_map_sign
|
||||||
@ -113,7 +113,7 @@ PlaceMapNameSign:: ; b8098 (2e:4098)
|
|||||||
jr nz, .skip2
|
jr nz, .skip2
|
||||||
call InitMapNameFrame
|
call InitMapNameFrame
|
||||||
call PlaceMapNameCenterAlign
|
call PlaceMapNameCenterAlign
|
||||||
callba HDMATransfer_OnlyTopFourRows
|
farcall HDMATransfer_OnlyTopFourRows
|
||||||
.skip2
|
.skip2
|
||||||
ld a, $80
|
ld a, $80
|
||||||
ld a, $70
|
ld a, $70
|
||||||
@ -151,7 +151,7 @@ InitMapNameFrame: ; b80d3
|
|||||||
PlaceMapNameCenterAlign: ; b80e1 (2e:40e1)
|
PlaceMapNameCenterAlign: ; b80e1 (2e:40e1)
|
||||||
ld a, [wCurrentLandmark]
|
ld a, [wCurrentLandmark]
|
||||||
ld e, a
|
ld e, a
|
||||||
callba GetLandmarkName
|
farcall GetLandmarkName
|
||||||
call .GetNameLength
|
call .GetNameLength
|
||||||
ld a, SCREEN_WIDTH
|
ld a, SCREEN_WIDTH
|
||||||
sub c
|
sub c
|
||||||
@ -360,7 +360,7 @@ CheckForHiddenItems: ; b8172
|
|||||||
|
|
||||||
|
|
||||||
TreeMonEncounter: ; b81ea
|
TreeMonEncounter: ; b81ea
|
||||||
callba TrainerRankings_TreeEncounters
|
farcall TrainerRankings_TreeEncounters
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [TempWildMonSpecies], a
|
ld [TempWildMonSpecies], a
|
||||||
|
@ -36,7 +36,7 @@ EvolutionAnimation: ; 4e5e1
|
|||||||
ld de, MUSIC_NONE
|
ld de, MUSIC_NONE
|
||||||
call PlayMusic
|
call PlayMusic
|
||||||
|
|
||||||
callba ClearSpriteAnims
|
farcall ClearSpriteAnims
|
||||||
|
|
||||||
ld de, .GFX
|
ld de, .GFX
|
||||||
ld hl, VTiles0
|
ld hl, VTiles0
|
||||||
@ -106,7 +106,7 @@ EvolutionAnimation: ; 4e5e1
|
|||||||
ld c, $0
|
ld c, $0
|
||||||
call .GetSGBLayout
|
call .GetSGBLayout
|
||||||
call .PlayEvolvedSFX
|
call .PlayEvolvedSFX
|
||||||
callba ClearSpriteAnims
|
farcall ClearSpriteAnims
|
||||||
call .check_statused
|
call .check_statused
|
||||||
jr c, .no_anim
|
jr c, .no_anim
|
||||||
|
|
||||||
@ -143,7 +143,7 @@ EvolutionAnimation: ; 4e5e1
|
|||||||
ld c, $0
|
ld c, $0
|
||||||
call .GetSGBLayout
|
call .GetSGBLayout
|
||||||
call .PlayEvolvedSFX
|
call .PlayEvolvedSFX
|
||||||
callba ClearSpriteAnims
|
farcall ClearSpriteAnims
|
||||||
call .check_statused
|
call .check_statused
|
||||||
ret c
|
ret c
|
||||||
|
|
||||||
@ -263,7 +263,7 @@ EvolutionAnimation: ; 4e5e1
|
|||||||
call GetPartyLocation
|
call GetPartyLocation
|
||||||
ld b, h
|
ld b, h
|
||||||
ld c, l
|
ld c, l
|
||||||
callba CheckFaintedFrzSlp
|
farcall CheckFaintedFrzSlp
|
||||||
ret
|
ret
|
||||||
; 4e7a6
|
; 4e7a6
|
||||||
|
|
||||||
@ -337,7 +337,7 @@ EvolutionAnimation: ; 4e5e1
|
|||||||
|
|
||||||
.AnimateBallsOfLight: ; 4e80c
|
.AnimateBallsOfLight: ; 4e80c
|
||||||
push bc
|
push bc
|
||||||
callab PlaySpriteAnimations
|
callfar PlaySpriteAnimations
|
||||||
; a = (([hVBlankCounter] + 4) / 2) % NUM_PALETTES
|
; a = (([hVBlankCounter] + 4) / 2) % NUM_PALETTES
|
||||||
ld a, [hVBlankCounter]
|
ld a, [hVBlankCounter]
|
||||||
and %1110
|
and %1110
|
||||||
|
@ -225,7 +225,7 @@ EvolveAfterBattle_MasterLoop
|
|||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
|
|
||||||
callba EvolutionAnimation
|
farcall EvolutionAnimation
|
||||||
|
|
||||||
push af
|
push af
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
@ -247,7 +247,7 @@ EvolveAfterBattle_MasterLoop
|
|||||||
push hl
|
push hl
|
||||||
ld hl, Text_EvolvedIntoPKMN
|
ld hl, Text_EvolvedIntoPKMN
|
||||||
call PrintTextBoxText
|
call PrintTextBoxText
|
||||||
callba TrainerRankings_MonsEvolved
|
farcall TrainerRankings_MonsEvolved
|
||||||
|
|
||||||
ld de, MUSIC_NONE
|
ld de, MUSIC_NONE
|
||||||
call PlayMusic
|
call PlayMusic
|
||||||
@ -312,7 +312,7 @@ EvolveAfterBattle_MasterLoop
|
|||||||
|
|
||||||
ld hl, TempMonDVs
|
ld hl, TempMonDVs
|
||||||
predef GetUnownLetter
|
predef GetUnownLetter
|
||||||
callab UpdateUnownDex
|
callfar UpdateUnownDex
|
||||||
|
|
||||||
.skip_unown
|
.skip_unown
|
||||||
pop de
|
pop de
|
||||||
|
@ -58,7 +58,7 @@ CheckFruitTree: ; 44055
|
|||||||
; 4405f
|
; 4405f
|
||||||
|
|
||||||
PickedFruitTree: ; 4405f
|
PickedFruitTree: ; 4405f
|
||||||
callba TrainerRankings_FruitPicked
|
farcall TrainerRankings_FruitPicked
|
||||||
ld b, 1
|
ld b, 1
|
||||||
jp GetFruitTreeFlag
|
jp GetFruitTreeFlag
|
||||||
; 4406a
|
; 4406a
|
||||||
|
@ -3,7 +3,7 @@ GetBreedMon1LevelGrowth: ; e698
|
|||||||
ld de, TempMon
|
ld de, TempMon
|
||||||
ld bc, BOXMON_STRUCT_LENGTH
|
ld bc, BOXMON_STRUCT_LENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
callab CalcLevel
|
callfar CalcLevel
|
||||||
ld a, [wBreedMon1Level]
|
ld a, [wBreedMon1Level]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, d
|
ld a, d
|
||||||
@ -17,7 +17,7 @@ GetBreedMon2LevelGrowth: ; e6b3
|
|||||||
ld de, TempMon
|
ld de, TempMon
|
||||||
ld bc, BOXMON_STRUCT_LENGTH
|
ld bc, BOXMON_STRUCT_LENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
callab CalcLevel
|
callfar CalcLevel
|
||||||
ld a, [wBreedMon2Level]
|
ld a, [wBreedMon2Level]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, d
|
ld a, d
|
||||||
|
@ -49,7 +49,7 @@ HealPartyMon: ; c677
|
|||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [bc], a
|
ld [bc], a
|
||||||
|
|
||||||
callba RestoreAllPP
|
farcall RestoreAllPP
|
||||||
ret
|
ret
|
||||||
|
|
||||||
ComputeHPBarPixels: ; c699
|
ComputeHPBarPixels: ; c699
|
||||||
|
@ -92,7 +92,7 @@ LoadGenderScreenPal: ; 48e47 (12:4e47)
|
|||||||
ld bc, 1 palettes
|
ld bc, 1 palettes
|
||||||
ld a, $5
|
ld a, $5
|
||||||
call FarCopyWRAM
|
call FarCopyWRAM
|
||||||
callba ApplyPals
|
farcall ApplyPals
|
||||||
ret
|
ret
|
||||||
; 48e5c (12:4e5c)
|
; 48e5c (12:4e5c)
|
||||||
|
|
||||||
|
@ -30,14 +30,14 @@ ReanchorBGMap_NoOAMUpdate:: ; 6454
|
|||||||
ld a, VBGMap1 / $100
|
ld a, VBGMap1 / $100
|
||||||
call .LoadBGMapAddrIntoHRAM
|
call .LoadBGMapAddrIntoHRAM
|
||||||
call _OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
|
call _OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
|
||||||
callba LoadOW_BGPal7
|
farcall LoadOW_BGPal7
|
||||||
callba ApplyPals
|
farcall ApplyPals
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hCGBPalUpdate], a
|
ld [hCGBPalUpdate], a
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
ld [hWY], a
|
ld [hWY], a
|
||||||
callba HDMATransfer_FillBGMap0WithBlack ; no need to farcall
|
farcall HDMATransfer_FillBGMap0WithBlack ; no need to farcall
|
||||||
ld a, VBGMap0 / $100
|
ld a, VBGMap0 / $100
|
||||||
call .LoadBGMapAddrIntoHRAM
|
call .LoadBGMapAddrIntoHRAM
|
||||||
xor a
|
xor a
|
||||||
|
@ -6,7 +6,7 @@ _MainMenu: ; 5ae8
|
|||||||
ld a, e
|
ld a, e
|
||||||
ld [wMapMusic], a
|
ld [wMapMusic], a
|
||||||
call PlayMusic
|
call PlayMusic
|
||||||
callba MainMenu
|
farcall MainMenu
|
||||||
jp StartTitleScreen
|
jp StartTitleScreen
|
||||||
; 5b04
|
; 5b04
|
||||||
|
|
||||||
@ -56,13 +56,13 @@ NewGame_ClearTileMapEtc: ; 5b44
|
|||||||
|
|
||||||
MysteryGift: ; 5b54
|
MysteryGift: ; 5b54
|
||||||
call UpdateTime
|
call UpdateTime
|
||||||
callba DoMysteryGiftIfDayHasPassed
|
farcall DoMysteryGiftIfDayHasPassed
|
||||||
callba DoMysteryGift
|
farcall DoMysteryGift
|
||||||
ret
|
ret
|
||||||
; 5b64
|
; 5b64
|
||||||
|
|
||||||
OptionsMenu: ; 5b64
|
OptionsMenu: ; 5b64
|
||||||
callba _OptionsMenu
|
farcall _OptionsMenu
|
||||||
ret
|
ret
|
||||||
; 5b6b
|
; 5b6b
|
||||||
|
|
||||||
@ -86,14 +86,14 @@ NewGame: ; 5b6b
|
|||||||
; 5b8f
|
; 5b8f
|
||||||
|
|
||||||
AreYouABoyOrAreYouAGirl: ; 5b8f
|
AreYouABoyOrAreYouAGirl: ; 5b8f
|
||||||
callba Mobile_AlwaysReturnNotCarry ; some mobile stuff
|
farcall Mobile_AlwaysReturnNotCarry ; some mobile stuff
|
||||||
jr c, .ok
|
jr c, .ok
|
||||||
callba InitGender
|
farcall InitGender
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.ok
|
.ok
|
||||||
ld c, 0
|
ld c, 0
|
||||||
callba InitMobileProfile ; mobile
|
farcall InitMobileProfile ; mobile
|
||||||
ret
|
ret
|
||||||
; 5ba7
|
; 5ba7
|
||||||
|
|
||||||
@ -220,11 +220,11 @@ ENDC
|
|||||||
|
|
||||||
call InitializeNPCNames
|
call InitializeNPCNames
|
||||||
|
|
||||||
callba InitDecorations
|
farcall InitDecorations
|
||||||
|
|
||||||
callba DeletePartyMonMail
|
farcall DeletePartyMonMail
|
||||||
|
|
||||||
callba DeleteMobileEventIndex
|
farcall DeleteMobileEventIndex
|
||||||
|
|
||||||
call ResetGameTime
|
call ResetGameTime
|
||||||
ret
|
ret
|
||||||
@ -316,8 +316,8 @@ InitializeNPCNames: ; 5ce9
|
|||||||
|
|
||||||
InitializeWorld: ; 5d23
|
InitializeWorld: ; 5d23
|
||||||
call ShrinkPlayer
|
call ShrinkPlayer
|
||||||
callba SpawnPlayer
|
farcall SpawnPlayer
|
||||||
callba _InitializeStartDay
|
farcall _InitializeStartDay
|
||||||
ret
|
ret
|
||||||
; 5d33
|
; 5d33
|
||||||
|
|
||||||
@ -349,9 +349,9 @@ LoadOrRegenerateLuckyIDNumber: ; 5d33
|
|||||||
; 5d65
|
; 5d65
|
||||||
|
|
||||||
Continue: ; 5d65
|
Continue: ; 5d65
|
||||||
callba TryLoadSaveFile
|
farcall TryLoadSaveFile
|
||||||
jr c, .FailToLoad
|
jr c, .FailToLoad
|
||||||
callba _LoadData
|
farcall _LoadData
|
||||||
call LoadStandardMenuDataHeader
|
call LoadStandardMenuDataHeader
|
||||||
call DisplaySaveInfoOnContinue
|
call DisplaySaveInfoOnContinue
|
||||||
ld a, $1
|
ld a, $1
|
||||||
@ -382,9 +382,9 @@ Continue: ; 5d65
|
|||||||
call ClearTileMap
|
call ClearTileMap
|
||||||
ld c, 20
|
ld c, 20
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
callba JumpRoamMons
|
farcall JumpRoamMons
|
||||||
callba MysteryGift_CopyReceivedDecosToPC ; Mystery Gift
|
farcall MysteryGift_CopyReceivedDecosToPC ; Mystery Gift
|
||||||
callba Function140ae ; time-related
|
farcall Function140ae ; time-related
|
||||||
ld a, [wSpawnAfterChampion]
|
ld a, [wSpawnAfterChampion]
|
||||||
cp SPAWN_LANCE
|
cp SPAWN_LANCE
|
||||||
jr z, .SpawnAfterE4
|
jr z, .SpawnAfterE4
|
||||||
@ -416,7 +416,7 @@ PostCreditsSpawn: ; 5de7
|
|||||||
; 5df0
|
; 5df0
|
||||||
|
|
||||||
Continue_MobileAdapterMenu: ; 5df0
|
Continue_MobileAdapterMenu: ; 5df0
|
||||||
callba Mobile_AlwaysReturnNotCarry ; mobile check
|
farcall Mobile_AlwaysReturnNotCarry ; mobile check
|
||||||
ret nc
|
ret nc
|
||||||
|
|
||||||
; the rest of this stuff is never reached because
|
; the rest of this stuff is never reached because
|
||||||
@ -433,8 +433,8 @@ Continue_MobileAdapterMenu: ; 5df0
|
|||||||
ld c, 20
|
ld c, 20
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
ld c, $1
|
ld c, $1
|
||||||
callba InitMobileProfile ; mobile
|
farcall InitMobileProfile ; mobile
|
||||||
callba _SaveData
|
farcall _SaveData
|
||||||
ld a, 8
|
ld a, 8
|
||||||
ld [MusicFade], a
|
ld [MusicFade], a
|
||||||
ld a, MUSIC_NONE % $100
|
ld a, MUSIC_NONE % $100
|
||||||
@ -466,7 +466,7 @@ Continue_CheckRTC_RestartClock: ; 5e48
|
|||||||
call CheckRTCStatus
|
call CheckRTCStatus
|
||||||
and %10000000 ; Day count exceeded 16383
|
and %10000000 ; Day count exceeded 16383
|
||||||
jr z, .pass
|
jr z, .pass
|
||||||
callba RestartClock
|
farcall RestartClock
|
||||||
ld a, c
|
ld a, c
|
||||||
and a
|
and a
|
||||||
jr z, .pass
|
jr z, .pass
|
||||||
@ -488,7 +488,7 @@ FinishContinueFunction: ; 5e5d
|
|||||||
res 7, [hl]
|
res 7, [hl]
|
||||||
ld hl, wEnteredMapFromContinue
|
ld hl, wEnteredMapFromContinue
|
||||||
set 1, [hl]
|
set 1, [hl]
|
||||||
callba OverworldLoop
|
farcall OverworldLoop
|
||||||
ld a, [wSpawnAfterChampion]
|
ld a, [wSpawnAfterChampion]
|
||||||
cp SPAWN_RED
|
cp SPAWN_RED
|
||||||
jr z, .AfterRed
|
jr z, .AfterRed
|
||||||
@ -671,7 +671,7 @@ Continue_DisplayGameTime: ; 5f84
|
|||||||
|
|
||||||
|
|
||||||
OakSpeech: ; 0x5f99
|
OakSpeech: ; 0x5f99
|
||||||
callba InitClock
|
farcall InitClock
|
||||||
call RotateFourPalettesLeft
|
call RotateFourPalettesLeft
|
||||||
call ClearTileMap
|
call ClearTileMap
|
||||||
|
|
||||||
@ -735,7 +735,7 @@ OakSpeech: ; 0x5f99
|
|||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [CurPartySpecies], a
|
ld [CurPartySpecies], a
|
||||||
callba DrawIntroPlayerPic
|
farcall DrawIntroPlayerPic
|
||||||
|
|
||||||
ld b, SCGB_TRAINER_OR_MON_FRONTPIC_PALS
|
ld b, SCGB_TRAINER_OR_MON_FRONTPIC_PALS
|
||||||
call GetSGBLayout
|
call GetSGBLayout
|
||||||
@ -782,20 +782,20 @@ OakText7: ; 0x606f
|
|||||||
db "@"
|
db "@"
|
||||||
|
|
||||||
NamePlayer: ; 0x6074
|
NamePlayer: ; 0x6074
|
||||||
callba MovePlayerPicRight
|
farcall MovePlayerPicRight
|
||||||
callba ShowPlayerNamingChoices
|
farcall ShowPlayerNamingChoices
|
||||||
ld a, [wMenuCursorY]
|
ld a, [wMenuCursorY]
|
||||||
dec a
|
dec a
|
||||||
jr z, .NewName
|
jr z, .NewName
|
||||||
call StorePlayerName
|
call StorePlayerName
|
||||||
callba ApplyMonOrTrainerPals
|
farcall ApplyMonOrTrainerPals
|
||||||
callba MovePlayerPicLeft
|
farcall MovePlayerPicLeft
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.NewName:
|
.NewName:
|
||||||
ld b, 1
|
ld b, 1
|
||||||
ld de, PlayerName
|
ld de, PlayerName
|
||||||
callba NamingScreen
|
farcall NamingScreen
|
||||||
|
|
||||||
call RotateThreePalettesRight
|
call RotateThreePalettesRight
|
||||||
call ClearTileMap
|
call ClearTileMap
|
||||||
@ -805,7 +805,7 @@ NamePlayer: ; 0x6074
|
|||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [CurPartySpecies], a
|
ld [CurPartySpecies], a
|
||||||
callba DrawIntroPlayerPic
|
farcall DrawIntroPlayerPic
|
||||||
|
|
||||||
ld b, SCGB_TRAINER_OR_MON_FRONTPIC_PALS
|
ld b, SCGB_TRAINER_OR_MON_FRONTPIC_PALS
|
||||||
call GetSGBLayout
|
call GetSGBLayout
|
||||||
@ -943,7 +943,7 @@ Intro_WipeInFrontpic: ; 6182
|
|||||||
|
|
||||||
Intro_PrepTrainerPic: ; 619c
|
Intro_PrepTrainerPic: ; 619c
|
||||||
ld de, VTiles2
|
ld de, VTiles2
|
||||||
callba GetTrainerPic
|
farcall GetTrainerPic
|
||||||
xor a
|
xor a
|
||||||
ld [hGraphicStartTile], a
|
ld [hGraphicStartTile], a
|
||||||
hlcoord 6, 4
|
hlcoord 6, 4
|
||||||
@ -966,7 +966,7 @@ ShrinkFrame: ; 61b4
|
|||||||
|
|
||||||
Intro_PlacePlayerSprite: ; 61cd
|
Intro_PlacePlayerSprite: ; 61cd
|
||||||
|
|
||||||
callba GetPlayerIcon
|
farcall GetPlayerIcon
|
||||||
ld c, $c
|
ld c, $c
|
||||||
ld hl, VTiles0
|
ld hl, VTiles0
|
||||||
call Request2bpp
|
call Request2bpp
|
||||||
@ -1012,9 +1012,9 @@ Intro_PlacePlayerSprite: ; 61cd
|
|||||||
|
|
||||||
|
|
||||||
CrystalIntroSequence: ; 620b
|
CrystalIntroSequence: ; 620b
|
||||||
callab Copyright_GFPresents
|
callfar Copyright_GFPresents
|
||||||
jr c, StartTitleScreen
|
jr c, StartTitleScreen
|
||||||
callba CrystalIntro
|
farcall CrystalIntro
|
||||||
|
|
||||||
StartTitleScreen: ; 6219
|
StartTitleScreen: ; 6219
|
||||||
ld a, [rSVBK]
|
ld a, [rSVBK]
|
||||||
@ -1075,7 +1075,7 @@ StartTitleScreen: ; 6219
|
|||||||
|
|
||||||
|
|
||||||
.TitleScreen: ; 6274
|
.TitleScreen: ; 6274
|
||||||
callba _TitleScreen
|
farcall _TitleScreen
|
||||||
ret
|
ret
|
||||||
; 627b
|
; 627b
|
||||||
|
|
||||||
@ -1084,7 +1084,7 @@ RunTitleScreen: ; 627b
|
|||||||
bit 7, a
|
bit 7, a
|
||||||
jr nz, .done_title
|
jr nz, .done_title
|
||||||
call TitleScreenScene
|
call TitleScreenScene
|
||||||
callba SuicuneFrameIterator
|
farcall SuicuneFrameIterator
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
@ -1162,7 +1162,7 @@ TitleScreenEntrance: ; 62bc
|
|||||||
dec b
|
dec b
|
||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
|
|
||||||
callba AnimateTitleCrystal
|
farcall AnimateTitleCrystal
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.done
|
.done
|
||||||
@ -1320,12 +1320,12 @@ TitleScreenEnd: ; 6375
|
|||||||
; 6389
|
; 6389
|
||||||
|
|
||||||
DeleteSaveData: ; 6389
|
DeleteSaveData: ; 6389
|
||||||
callba _DeleteSaveData
|
farcall _DeleteSaveData
|
||||||
jp Init
|
jp Init
|
||||||
; 6392
|
; 6392
|
||||||
|
|
||||||
ResetClock: ; 6392
|
ResetClock: ; 6392
|
||||||
callba _ResetClock
|
farcall _ResetClock
|
||||||
jp Init
|
jp Init
|
||||||
; 639b
|
; 639b
|
||||||
|
|
||||||
@ -1401,7 +1401,7 @@ CopyrightString: ; 63fd
|
|||||||
; 642e
|
; 642e
|
||||||
|
|
||||||
GameInit:: ; 642e
|
GameInit:: ; 642e
|
||||||
callba TryLoadSaveData
|
farcall TryLoadSaveData
|
||||||
call ClearWindowData
|
call ClearWindowData
|
||||||
call ClearBGPalettes
|
call ClearBGPalettes
|
||||||
call ClearTileMap
|
call ClearTileMap
|
||||||
|
@ -358,7 +358,7 @@ ParkBall: ; e8a2
|
|||||||
ld d, a
|
ld d, a
|
||||||
push de
|
push de
|
||||||
|
|
||||||
; BUG: callba overwrites a,
|
; BUG: farcall overwrites a,
|
||||||
; and GetItemHeldEffect takes b anyway.
|
; and GetItemHeldEffect takes b anyway.
|
||||||
|
|
||||||
; This is probably the reason
|
; This is probably the reason
|
||||||
@ -369,7 +369,7 @@ ParkBall: ; e8a2
|
|||||||
|
|
||||||
ld a, [BattleMonItem]
|
ld a, [BattleMonItem]
|
||||||
; ld b, a
|
; ld b, a
|
||||||
callba GetItemHeldEffect
|
farcall GetItemHeldEffect
|
||||||
ld a, b
|
ld a, b
|
||||||
cp HELD_CATCH_CHANCE
|
cp HELD_CATCH_CHANCE
|
||||||
|
|
||||||
@ -478,7 +478,7 @@ ParkBall: ; e8a2
|
|||||||
ld [CurPartySpecies], a
|
ld [CurPartySpecies], a
|
||||||
ld a, [EnemyMonLevel]
|
ld a, [EnemyMonLevel]
|
||||||
ld [CurPartyLevel], a
|
ld [CurPartyLevel], a
|
||||||
callba LoadEnemyMon
|
farcall LoadEnemyMon
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
ld [EnemySubStatus5], a
|
ld [EnemySubStatus5], a
|
||||||
@ -517,7 +517,7 @@ ParkBall: ; e8a2
|
|||||||
cp BATTLETYPE_TUTORIAL
|
cp BATTLETYPE_TUTORIAL
|
||||||
jp z, .FinishTutorial
|
jp z, .FinishTutorial
|
||||||
|
|
||||||
callba TrainerRankings_WildMonsCaught
|
farcall TrainerRankings_WildMonsCaught
|
||||||
|
|
||||||
ld hl, Text_GotchaMonWasCaught
|
ld hl, Text_GotchaMonWasCaught
|
||||||
call PrintText
|
call PrintText
|
||||||
@ -569,7 +569,7 @@ ParkBall: ; e8a2
|
|||||||
|
|
||||||
predef TryAddMonToParty
|
predef TryAddMonToParty
|
||||||
|
|
||||||
callba SetCaughtData
|
farcall SetCaughtData
|
||||||
|
|
||||||
ld a, [CurItem]
|
ld a, [CurItem]
|
||||||
cp FRIEND_BALL
|
cp FRIEND_BALL
|
||||||
@ -608,7 +608,7 @@ ParkBall: ; e8a2
|
|||||||
xor a ; PARTYMON
|
xor a ; PARTYMON
|
||||||
ld [MonType], a
|
ld [MonType], a
|
||||||
ld b, 0
|
ld b, 0
|
||||||
callba NamingScreen
|
farcall NamingScreen
|
||||||
|
|
||||||
call RotateThreePalettesRight
|
call RotateThreePalettesRight
|
||||||
|
|
||||||
@ -625,7 +625,7 @@ ParkBall: ; e8a2
|
|||||||
|
|
||||||
predef SentPkmnIntoBox
|
predef SentPkmnIntoBox
|
||||||
|
|
||||||
callba SetBoxMonCaughtData
|
farcall SetBoxMonCaughtData
|
||||||
|
|
||||||
ld a, BANK(sBoxCount)
|
ld a, BANK(sBoxCount)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
@ -661,7 +661,7 @@ ParkBall: ; e8a2
|
|||||||
ld [MonType], a
|
ld [MonType], a
|
||||||
ld de, wMonOrItemNameBuffer
|
ld de, wMonOrItemNameBuffer
|
||||||
ld b, $0
|
ld b, $0
|
||||||
callba NamingScreen
|
farcall NamingScreen
|
||||||
|
|
||||||
ld a, BANK(sBoxMonNicknames)
|
ld a, BANK(sBoxMonNicknames)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
@ -696,7 +696,7 @@ ParkBall: ; e8a2
|
|||||||
jr .return_from_capture
|
jr .return_from_capture
|
||||||
|
|
||||||
.catch_bug_contest_mon
|
.catch_bug_contest_mon
|
||||||
callba BugContest_SetCaughtContestMon
|
farcall BugContest_SetCaughtContestMon
|
||||||
jr .return_from_capture
|
jr .return_from_capture
|
||||||
|
|
||||||
.FinishTutorial:
|
.FinishTutorial:
|
||||||
@ -985,7 +985,7 @@ LoveBallMultiplier:
|
|||||||
ld [MonType], a
|
ld [MonType], a
|
||||||
ld a, [CurBattleMon]
|
ld a, [CurBattleMon]
|
||||||
ld [CurPartyMon], a
|
ld [CurPartyMon], a
|
||||||
callba GetGender
|
farcall GetGender
|
||||||
jr c, .done1 ; no effect on genderless
|
jr c, .done1 ; no effect on genderless
|
||||||
|
|
||||||
ld d, 0 ; male
|
ld d, 0 ; male
|
||||||
@ -999,7 +999,7 @@ LoveBallMultiplier:
|
|||||||
ld [CurPartySpecies], a
|
ld [CurPartySpecies], a
|
||||||
ld a, WILDMON
|
ld a, WILDMON
|
||||||
ld [MonType], a
|
ld [MonType], a
|
||||||
callba GetGender
|
farcall GetGender
|
||||||
jr c, .done2 ; no effect on genderless
|
jr c, .done2 ; no effect on genderless
|
||||||
|
|
||||||
ld d, 0 ; male
|
ld d, 0 ; male
|
||||||
@ -1173,17 +1173,17 @@ Text_AskNicknameNewlyCaughtMon: ; 0xedf5
|
|||||||
; 0xedfa
|
; 0xedfa
|
||||||
|
|
||||||
ReturnToBattle_UseBall: ; edfa (3:6dfa)
|
ReturnToBattle_UseBall: ; edfa (3:6dfa)
|
||||||
callba _ReturnToBattle_UseBall
|
farcall _ReturnToBattle_UseBall
|
||||||
ret
|
ret
|
||||||
|
|
||||||
TownMap: ; ee01
|
TownMap: ; ee01
|
||||||
callba PokegearMap
|
farcall PokegearMap
|
||||||
ret
|
ret
|
||||||
; ee08
|
; ee08
|
||||||
|
|
||||||
|
|
||||||
Bicycle: ; ee08
|
Bicycle: ; ee08
|
||||||
callba BikeFunction
|
farcall BikeFunction
|
||||||
ret
|
ret
|
||||||
; ee0f
|
; ee0f
|
||||||
|
|
||||||
@ -1208,7 +1208,7 @@ SunStone: ; ee0f
|
|||||||
|
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wForceEvolution], a
|
ld [wForceEvolution], a
|
||||||
callba EvolvePokemon
|
farcall EvolvePokemon
|
||||||
|
|
||||||
ld a, [wMonTriedToEvolve]
|
ld a, [wMonTriedToEvolve]
|
||||||
and a
|
and a
|
||||||
@ -1269,7 +1269,7 @@ Calcium: ; ee3d
|
|||||||
call PrintText
|
call PrintText
|
||||||
|
|
||||||
ld c, HAPPINESS_USEDITEM
|
ld c, HAPPINESS_USEDITEM
|
||||||
callba ChangeHappiness
|
farcall ChangeHappiness
|
||||||
|
|
||||||
jp UseDisposableItem
|
jp UseDisposableItem
|
||||||
|
|
||||||
@ -1383,7 +1383,7 @@ RareCandy: ; ef14
|
|||||||
ld [CurPartyLevel], a
|
ld [CurPartyLevel], a
|
||||||
push de
|
push de
|
||||||
ld d, a
|
ld d, a
|
||||||
callba CalcExpAtLevel
|
farcall CalcExpAtLevel
|
||||||
|
|
||||||
pop de
|
pop de
|
||||||
ld a, MON_EXP
|
ld a, MON_EXP
|
||||||
@ -1421,7 +1421,7 @@ RareCandy: ; ef14
|
|||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
adc b
|
adc b
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
callba LevelUpHappinessMod
|
farcall LevelUpHappinessMod
|
||||||
|
|
||||||
ld a, PARTYMENUTEXT_LEVEL_UP
|
ld a, PARTYMENUTEXT_LEVEL_UP
|
||||||
call ItemActionText
|
call ItemActionText
|
||||||
@ -1449,7 +1449,7 @@ RareCandy: ; ef14
|
|||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [wForceEvolution], a
|
ld [wForceEvolution], a
|
||||||
callba EvolvePokemon
|
farcall EvolvePokemon
|
||||||
|
|
||||||
jp UseDisposableItem
|
jp UseDisposableItem
|
||||||
; efad
|
; efad
|
||||||
@ -1466,7 +1466,7 @@ HealPowder: ; efad
|
|||||||
cp $0
|
cp $0
|
||||||
jr nz, .asm_efc9
|
jr nz, .asm_efc9
|
||||||
ld c, HAPPINESS_BITTERPOWDER
|
ld c, HAPPINESS_BITTERPOWDER
|
||||||
callba ChangeHappiness
|
farcall ChangeHappiness
|
||||||
|
|
||||||
call LooksBitterMessage
|
call LooksBitterMessage
|
||||||
|
|
||||||
@ -1569,7 +1569,7 @@ HealStatus: ; f030 (3:7030)
|
|||||||
res SUBSTATUS_CONFUSED, [hl]
|
res SUBSTATUS_CONFUSED, [hl]
|
||||||
.not_full_heal
|
.not_full_heal
|
||||||
push bc
|
push bc
|
||||||
callba CalcPlayerStats
|
farcall CalcPlayerStats
|
||||||
pop bc
|
pop bc
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -1635,7 +1635,7 @@ RevivalHerb: ; f0a9
|
|||||||
jr nz, .asm_f0c5
|
jr nz, .asm_f0c5
|
||||||
|
|
||||||
ld c, HAPPINESS_REVIVALHERB
|
ld c, HAPPINESS_REVIVALHERB
|
||||||
callba ChangeHappiness
|
farcall ChangeHappiness
|
||||||
call LooksBitterMessage
|
call LooksBitterMessage
|
||||||
ld a, 0
|
ld a, 0
|
||||||
|
|
||||||
@ -1797,7 +1797,7 @@ EnergypowderEnergyRootCommon: ; f192
|
|||||||
cp 0
|
cp 0
|
||||||
jr nz, .skip_happiness
|
jr nz, .skip_happiness
|
||||||
|
|
||||||
callba ChangeHappiness
|
farcall ChangeHappiness
|
||||||
call LooksBitterMessage
|
call LooksBitterMessage
|
||||||
ld a, 0
|
ld a, 0
|
||||||
|
|
||||||
@ -1876,15 +1876,15 @@ UseItem_SelectMon: ; f1f9 (3:71f9)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
ChoosePkmnToUseItemOn: ; f21c (3:721c)
|
ChoosePkmnToUseItemOn: ; f21c (3:721c)
|
||||||
callba LoadPartyMenuGFX
|
farcall LoadPartyMenuGFX
|
||||||
callba InitPartyMenuWithCancel
|
farcall InitPartyMenuWithCancel
|
||||||
callba InitPartyMenuGFX
|
farcall InitPartyMenuGFX
|
||||||
callba WritePartyMenuTilemap
|
farcall WritePartyMenuTilemap
|
||||||
callba PrintPartyMenuText
|
farcall PrintPartyMenuText
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
call SetPalettes
|
call SetPalettes
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
callba PartyMenuSelect
|
farcall PartyMenuSelect
|
||||||
ret
|
ret
|
||||||
|
|
||||||
ItemActionText: ; f24a (3:724a)
|
ItemActionText: ; f24a (3:724a)
|
||||||
@ -1896,8 +1896,8 @@ ItemActionText: ; f24a (3:724a)
|
|||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
callba WritePartyMenuTilemap
|
farcall WritePartyMenuTilemap
|
||||||
callba PrintPartyMenuActionText
|
farcall PrintPartyMenuActionText
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
call SetPalettes
|
call SetPalettes
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
@ -2234,7 +2234,7 @@ Softboiled_MilkDrinkFunction: ; f3df (3:73df)
|
|||||||
EscapeRope: ; f44f
|
EscapeRope: ; f44f
|
||||||
xor a
|
xor a
|
||||||
ld [wItemEffectSucceeded], a
|
ld [wItemEffectSucceeded], a
|
||||||
callba EscapeRopeFunction
|
farcall EscapeRopeFunction
|
||||||
|
|
||||||
ld a, [wItemEffectSucceeded]
|
ld a, [wItemEffectSucceeded]
|
||||||
cp 1
|
cp 1
|
||||||
@ -2344,16 +2344,16 @@ XSpecial: ; f4c5
|
|||||||
ld [hBattleTurn], a
|
ld [hBattleTurn], a
|
||||||
ld [AttackMissed], a
|
ld [AttackMissed], a
|
||||||
ld [EffectFailed], a
|
ld [EffectFailed], a
|
||||||
callba CheckIfStatCanBeRaised
|
farcall CheckIfStatCanBeRaised
|
||||||
call WaitSFX
|
call WaitSFX
|
||||||
|
|
||||||
callba BattleCommand_StatUpMessage
|
farcall BattleCommand_StatUpMessage
|
||||||
callba BattleCommand_StatUpFailText
|
farcall BattleCommand_StatUpFailText
|
||||||
|
|
||||||
ld a, [CurBattleMon]
|
ld a, [CurBattleMon]
|
||||||
ld [CurPartyMon], a
|
ld [CurPartyMon], a
|
||||||
ld c, HAPPINESS_USEDXITEM
|
ld c, HAPPINESS_USEDXITEM
|
||||||
callba ChangeHappiness
|
farcall ChangeHappiness
|
||||||
ret
|
ret
|
||||||
; f504
|
; f504
|
||||||
|
|
||||||
@ -2499,13 +2499,13 @@ SuperRod: ; f5ad
|
|||||||
; f5b1
|
; f5b1
|
||||||
|
|
||||||
UseRod: ; f5b1
|
UseRod: ; f5b1
|
||||||
callba FishFunction
|
farcall FishFunction
|
||||||
ret
|
ret
|
||||||
; f5b8
|
; f5b8
|
||||||
|
|
||||||
|
|
||||||
Itemfinder: ; f5b8
|
Itemfinder: ; f5b8
|
||||||
callba ItemFinder
|
farcall ItemFinder
|
||||||
ret
|
ret
|
||||||
; f5bf
|
; f5bf
|
||||||
|
|
||||||
@ -2547,7 +2547,7 @@ Mysteryberry: ; f5bf
|
|||||||
ld [CurMoveNum], a
|
ld [CurMoveNum], a
|
||||||
ld a, $2
|
ld a, $2
|
||||||
ld [wMoveSelectionMenuType], a
|
ld [wMoveSelectionMenuType], a
|
||||||
callba MoveSelectionScreen
|
farcall MoveSelectionScreen
|
||||||
pop bc
|
pop bc
|
||||||
|
|
||||||
ld a, b
|
ld a, b
|
||||||
@ -2782,25 +2782,25 @@ UnknownText_0xf739: ; 0xf739
|
|||||||
|
|
||||||
|
|
||||||
Squirtbottle: ; f73e
|
Squirtbottle: ; f73e
|
||||||
callba _Squirtbottle
|
farcall _Squirtbottle
|
||||||
ret
|
ret
|
||||||
; f745
|
; f745
|
||||||
|
|
||||||
|
|
||||||
CardKey: ; f745
|
CardKey: ; f745
|
||||||
callba _CardKey
|
farcall _CardKey
|
||||||
ret
|
ret
|
||||||
; f74c
|
; f74c
|
||||||
|
|
||||||
|
|
||||||
BasementKey: ; f74c
|
BasementKey: ; f74c
|
||||||
callba _BasementKey
|
farcall _BasementKey
|
||||||
ret
|
ret
|
||||||
; f753
|
; f753
|
||||||
|
|
||||||
|
|
||||||
SacredAsh: ; f753
|
SacredAsh: ; f753
|
||||||
callba _SacredAsh
|
farcall _SacredAsh
|
||||||
ld a, [wItemEffectSucceeded]
|
ld a, [wItemEffectSucceeded]
|
||||||
cp $1
|
cp $1
|
||||||
ret nz
|
ret nz
|
||||||
@ -2817,7 +2817,7 @@ NormalBox: ; f763
|
|||||||
GorgeousBox: ; f767
|
GorgeousBox: ; f767
|
||||||
ld c, DECOFLAG_GOLD_TROPHY_DOLL
|
ld c, DECOFLAG_GOLD_TROPHY_DOLL
|
||||||
OpenBox: ; f769
|
OpenBox: ; f769
|
||||||
callba SetSpecificDecorationFlag
|
farcall SetSpecificDecorationFlag
|
||||||
|
|
||||||
ld hl, .text
|
ld hl, .text
|
||||||
call PrintText
|
call PrintText
|
||||||
|
106
engine/link.asm
106
engine/link.asm
@ -14,14 +14,14 @@ LinkCommunications: ; 28000
|
|||||||
call UpdateSprites
|
call UpdateSprites
|
||||||
call LoadStandardFont
|
call LoadStandardFont
|
||||||
call LoadFontsBattleExtra
|
call LoadFontsBattleExtra
|
||||||
callba LinkComms_LoadPleaseWaitTextboxBorderGFX
|
farcall LinkComms_LoadPleaseWaitTextboxBorderGFX
|
||||||
call WaitBGMap2
|
call WaitBGMap2
|
||||||
hlcoord 3, 8
|
hlcoord 3, 8
|
||||||
ld b, 2
|
ld b, 2
|
||||||
ld c, 12
|
ld c, 12
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
callba LinkTextbox2
|
farcall LinkTextbox2
|
||||||
hlcoord 4, 10
|
hlcoord 4, 10
|
||||||
ld de, String_PleaseWait
|
ld de, String_PleaseWait
|
||||||
call PlaceString
|
call PlaceString
|
||||||
@ -150,7 +150,7 @@ TimeCapsule: ; 2805d
|
|||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
callab ConvertMon_1to2
|
callfar ConvertMon_1to2
|
||||||
pop de
|
pop de
|
||||||
pop hl
|
pop hl
|
||||||
ld a, [wd265]
|
ld a, [wd265]
|
||||||
@ -362,19 +362,19 @@ Gen2ToGen2LinkComms: ; 28177
|
|||||||
.fix_mail_loop
|
.fix_mail_loop
|
||||||
push bc
|
push bc
|
||||||
push de
|
push de
|
||||||
callba IsMailEuropean
|
farcall IsMailEuropean
|
||||||
ld a, c
|
ld a, c
|
||||||
or a
|
or a
|
||||||
jr z, .next
|
jr z, .next
|
||||||
sub $3
|
sub $3
|
||||||
jr nc, .skip
|
jr nc, .skip
|
||||||
callba DeutenEnglischenPost
|
farcall DeutenEnglischenPost
|
||||||
jr .next
|
jr .next
|
||||||
|
|
||||||
.skip
|
.skip
|
||||||
cp $2
|
cp $2
|
||||||
jr nc, .next
|
jr nc, .next
|
||||||
callba HandleSpanishItalianMail
|
farcall HandleSpanishItalianMail
|
||||||
|
|
||||||
.next
|
.next
|
||||||
pop de
|
pop de
|
||||||
@ -419,7 +419,7 @@ Gen2ToGen2LinkComms: ; 28177
|
|||||||
ld a, CAL
|
ld a, CAL
|
||||||
ld [OtherTrainerClass], a
|
ld [OtherTrainerClass], a
|
||||||
call ClearScreen
|
call ClearScreen
|
||||||
callba Link_WaitBGMap
|
farcall Link_WaitBGMap
|
||||||
ld hl, Options
|
ld hl, Options
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
push af
|
push af
|
||||||
@ -463,7 +463,7 @@ Gen2ToGen2LinkComms: ; 28177
|
|||||||
ld [wDisableTextAcceleration], a
|
ld [wDisableTextAcceleration], a
|
||||||
pop af
|
pop af
|
||||||
ld [Options], a
|
ld [Options], a
|
||||||
callba LoadPokemonData
|
farcall LoadPokemonData
|
||||||
jp Function28b22
|
jp Function28b22
|
||||||
|
|
||||||
.ready_to_trade
|
.ready_to_trade
|
||||||
@ -491,7 +491,7 @@ LinkTimeout: ; 283b2
|
|||||||
push de
|
push de
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
callba LinkTextbox2
|
farcall LinkTextbox2
|
||||||
pop de
|
pop de
|
||||||
pop hl
|
pop hl
|
||||||
bccoord 1, 14
|
bccoord 1, 14
|
||||||
@ -658,7 +658,7 @@ Link_PrepPartyData_Gen1: ; 28499
|
|||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
callab ConvertMon_2to1
|
callfar ConvertMon_2to1
|
||||||
pop de
|
pop de
|
||||||
pop hl
|
pop hl
|
||||||
ld a, [wd265]
|
ld a, [wd265]
|
||||||
@ -698,7 +698,7 @@ Link_PrepPartyData_Gen1: ; 28499
|
|||||||
push bc
|
push bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
callab ConvertMon_2to1
|
callfar ConvertMon_2to1
|
||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
ld a, [wd265]
|
ld a, [wd265]
|
||||||
@ -882,20 +882,20 @@ Link_PrepPartyData_Gen2: ; 28595
|
|||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
push hl
|
push hl
|
||||||
callba IsMailEuropean
|
farcall IsMailEuropean
|
||||||
pop de
|
pop de
|
||||||
ld a, c
|
ld a, c
|
||||||
or a
|
or a
|
||||||
jr z, .next
|
jr z, .next
|
||||||
sub $3
|
sub $3
|
||||||
jr nc, .italian_spanish
|
jr nc, .italian_spanish
|
||||||
callba HandleFrenchGermanMail
|
farcall HandleFrenchGermanMail
|
||||||
jr .next
|
jr .next
|
||||||
|
|
||||||
.italian_spanish
|
.italian_spanish
|
||||||
cp $2
|
cp $2
|
||||||
jr nc, .next
|
jr nc, .next
|
||||||
callba HandleSpanishItalianMail
|
farcall HandleSpanishItalianMail
|
||||||
|
|
||||||
.next
|
.next
|
||||||
pop de
|
pop de
|
||||||
@ -993,7 +993,7 @@ Function2868a: ; 2868a
|
|||||||
push bc
|
push bc
|
||||||
push de
|
push de
|
||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
callab ConvertMon_1to2
|
callfar ConvertMon_1to2
|
||||||
pop de
|
pop de
|
||||||
pop bc
|
pop bc
|
||||||
ld a, [wd265]
|
ld a, [wd265]
|
||||||
@ -1195,7 +1195,7 @@ Link_FindFirstNonControlCharacter_AllowZero: ; 287d8
|
|||||||
InitTradeMenuDisplay: ; 287e3
|
InitTradeMenuDisplay: ; 287e3
|
||||||
call ClearScreen
|
call ClearScreen
|
||||||
call LoadTradeScreenBorder
|
call LoadTradeScreenBorder
|
||||||
callba InitTradeSpeciesList
|
farcall InitTradeSpeciesList
|
||||||
xor a
|
xor a
|
||||||
ld hl, wOtherPlayerLinkMode
|
ld hl, wOtherPlayerLinkMode
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
@ -1232,7 +1232,7 @@ LinkTrade_OTPartyMenu: ; 28803
|
|||||||
ld [w2DMenuFlags2], a
|
ld [w2DMenuFlags2], a
|
||||||
|
|
||||||
LinkTradeOTPartymonMenuLoop: ; 28835
|
LinkTradeOTPartymonMenuLoop: ; 28835
|
||||||
callba LinkTradeMenu
|
farcall LinkTradeMenu
|
||||||
ld a, d
|
ld a, d
|
||||||
and a
|
and a
|
||||||
jp z, LinkTradePartiesMenuMasterLoop
|
jp z, LinkTradePartiesMenuMasterLoop
|
||||||
@ -1240,9 +1240,9 @@ LinkTradeOTPartymonMenuLoop: ; 28835
|
|||||||
jr z, .not_a_button
|
jr z, .not_a_button
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wInitListType], a
|
ld [wInitListType], a
|
||||||
callab InitList
|
callfar InitList
|
||||||
ld hl, OTPartyMon1Species
|
ld hl, OTPartyMon1Species
|
||||||
callba LinkMonStatsScreen
|
farcall LinkMonStatsScreen
|
||||||
jp LinkTradePartiesMenuMasterLoop
|
jp LinkTradePartiesMenuMasterLoop
|
||||||
|
|
||||||
.not_a_button
|
.not_a_button
|
||||||
@ -1274,7 +1274,7 @@ LinkTradeOTPartymonMenuLoop: ; 28835
|
|||||||
; 2888b
|
; 2888b
|
||||||
|
|
||||||
LinkTrade_PlayerPartyMenu: ; 2888b
|
LinkTrade_PlayerPartyMenu: ; 2888b
|
||||||
callba InitMG_Mobile_LinkTradePalMap
|
farcall InitMG_Mobile_LinkTradePalMap
|
||||||
xor a
|
xor a
|
||||||
ld [MonType], a
|
ld [MonType], a
|
||||||
ld a, A_BUTTON | D_UP | D_DOWN
|
ld a, A_BUTTON | D_UP | D_DOWN
|
||||||
@ -1298,7 +1298,7 @@ LinkTrade_PlayerPartyMenu: ; 2888b
|
|||||||
call WaitBGMap2
|
call WaitBGMap2
|
||||||
|
|
||||||
LinkTradePartymonMenuLoop: ; 288c5
|
LinkTradePartymonMenuLoop: ; 288c5
|
||||||
callba LinkTradeMenu
|
farcall LinkTradeMenu
|
||||||
ld a, d
|
ld a, d
|
||||||
and a
|
and a
|
||||||
jr nz, .check_joypad
|
jr nz, .check_joypad
|
||||||
@ -1366,7 +1366,7 @@ Function28926: ; 28926
|
|||||||
hlcoord 2, 16
|
hlcoord 2, 16
|
||||||
ld de, .String_Stats_Trade
|
ld de, .String_Stats_Trade
|
||||||
call PlaceString
|
call PlaceString
|
||||||
callba Link_WaitBGMap
|
farcall Link_WaitBGMap
|
||||||
|
|
||||||
.joy_loop
|
.joy_loop
|
||||||
ld a, " "
|
ld a, " "
|
||||||
@ -1433,8 +1433,8 @@ Function28926: ; 28926
|
|||||||
ld [wMenuCursorY], a
|
ld [wMenuCursorY], a
|
||||||
ld a, $4
|
ld a, $4
|
||||||
ld [wInitListType], a
|
ld [wInitListType], a
|
||||||
callab InitList
|
callfar InitList
|
||||||
callba LinkMonStatsScreen
|
farcall LinkMonStatsScreen
|
||||||
call Call_LoadTempTileMapToTileMap
|
call Call_LoadTempTileMapToTileMap
|
||||||
hlcoord 6, 1
|
hlcoord 6, 1
|
||||||
lb bc, 6, 1
|
lb bc, 6, 1
|
||||||
@ -1453,7 +1453,7 @@ Function28926: ; 28926
|
|||||||
dec a
|
dec a
|
||||||
ld [wd002], a
|
ld [wd002], a
|
||||||
ld [wPlayerLinkAction], a
|
ld [wPlayerLinkAction], a
|
||||||
callba Function16d6ce
|
farcall Function16d6ce
|
||||||
ld a, [wOtherPlayerLinkMode]
|
ld a, [wOtherPlayerLinkMode]
|
||||||
cp $f
|
cp $f
|
||||||
jp z, InitTradeMenuDisplay
|
jp z, InitTradeMenuDisplay
|
||||||
@ -1461,9 +1461,9 @@ Function28926: ; 28926
|
|||||||
call Function28b68
|
call Function28b68
|
||||||
ld c, 100
|
ld c, 100
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
callba ValidateOTTrademon
|
farcall ValidateOTTrademon
|
||||||
jr c, .abnormal
|
jr c, .abnormal
|
||||||
callba Functionfb5dd
|
farcall Functionfb5dd
|
||||||
jp nc, LinkTrade
|
jp nc, LinkTrade
|
||||||
xor a
|
xor a
|
||||||
ld [wcf57], a
|
ld [wcf57], a
|
||||||
@ -1472,7 +1472,7 @@ Function28926: ; 28926
|
|||||||
ld b, 4
|
ld b, 4
|
||||||
ld c, 18
|
ld c, 18
|
||||||
call Predef_LinkTextbox
|
call Predef_LinkTextbox
|
||||||
callba Link_WaitBGMap
|
farcall Link_WaitBGMap
|
||||||
ld hl, .Text_CantTradeLastMon
|
ld hl, .Text_CantTradeLastMon
|
||||||
bccoord 1, 14
|
bccoord 1, 14
|
||||||
call PlaceHLTextAtBC
|
call PlaceHLTextAtBC
|
||||||
@ -1494,7 +1494,7 @@ Function28926: ; 28926
|
|||||||
ld b, 4
|
ld b, 4
|
||||||
ld c, 18
|
ld c, 18
|
||||||
call Predef_LinkTextbox
|
call Predef_LinkTextbox
|
||||||
callba Link_WaitBGMap
|
farcall Link_WaitBGMap
|
||||||
ld hl, .Text_Abnormal
|
ld hl, .Text_Abnormal
|
||||||
bccoord 1, 14
|
bccoord 1, 14
|
||||||
call PlaceHLTextAtBC
|
call PlaceHLTextAtBC
|
||||||
@ -1509,7 +1509,7 @@ Function28926: ; 28926
|
|||||||
call PlaceString
|
call PlaceString
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wPlayerLinkAction], a
|
ld [wPlayerLinkAction], a
|
||||||
callba Function16d6ce
|
farcall Function16d6ce
|
||||||
ld c, 100
|
ld c, 100
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
jp InitTradeMenuDisplay
|
jp InitTradeMenuDisplay
|
||||||
@ -1575,7 +1575,7 @@ Function28ade: ; 28ade
|
|||||||
ldcoord_a 9, 17
|
ldcoord_a 9, 17
|
||||||
ld a, $f
|
ld a, $f
|
||||||
ld [wPlayerLinkAction], a
|
ld [wPlayerLinkAction], a
|
||||||
callba Function16d6ce
|
farcall Function16d6ce
|
||||||
ld a, [wOtherPlayerLinkMode]
|
ld a, [wOtherPlayerLinkMode]
|
||||||
cp $f
|
cp $f
|
||||||
jr nz, .loop1
|
jr nz, .loop1
|
||||||
@ -1650,7 +1650,7 @@ LinkTrade: ; 28b87
|
|||||||
ld b, $4
|
ld b, $4
|
||||||
ld c, $12
|
ld c, $12
|
||||||
call Predef_LinkTextbox
|
call Predef_LinkTextbox
|
||||||
callba Link_WaitBGMap
|
farcall Link_WaitBGMap
|
||||||
ld a, [wd002]
|
ld a, [wd002]
|
||||||
ld hl, PartySpecies
|
ld hl, PartySpecies
|
||||||
ld c, a
|
ld c, a
|
||||||
@ -1700,7 +1700,7 @@ LinkTrade: ; 28b87
|
|||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wMenuCursorY], a
|
ld [wMenuCursorY], a
|
||||||
ld [wMenuCursorX], a
|
ld [wMenuCursorX], a
|
||||||
callba Link_WaitBGMap
|
farcall Link_WaitBGMap
|
||||||
call ScrollingMenuJoypad
|
call ScrollingMenuJoypad
|
||||||
push af
|
push af
|
||||||
call Call_ExitMenu
|
call Call_ExitMenu
|
||||||
@ -1722,13 +1722,13 @@ LinkTrade: ; 28b87
|
|||||||
hlcoord 1, 14
|
hlcoord 1, 14
|
||||||
ld de, String_TooBadTheTradeWasCanceled
|
ld de, String_TooBadTheTradeWasCanceled
|
||||||
call PlaceString
|
call PlaceString
|
||||||
callba Function16d6ce
|
farcall Function16d6ce
|
||||||
jp Function28ea3
|
jp Function28ea3
|
||||||
|
|
||||||
.asm_28c54
|
.asm_28c54
|
||||||
ld a, $2
|
ld a, $2
|
||||||
ld [wPlayerLinkAction], a
|
ld [wPlayerLinkAction], a
|
||||||
callba Function16d6ce
|
farcall Function16d6ce
|
||||||
ld a, [wOtherPlayerLinkMode]
|
ld a, [wOtherPlayerLinkMode]
|
||||||
dec a
|
dec a
|
||||||
jr nz, .asm_28c7b
|
jr nz, .asm_28c7b
|
||||||
@ -1817,7 +1817,7 @@ LinkTrade: ; 28b87
|
|||||||
call GetPartyLocation
|
call GetPartyLocation
|
||||||
ld b, h
|
ld b, h
|
||||||
ld c, l
|
ld c, l
|
||||||
callba GetCaughtGender
|
farcall GetCaughtGender
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [wPlayerTrademonCaughtData], a
|
ld [wPlayerTrademonCaughtData], a
|
||||||
ld hl, OTPlayerName
|
ld hl, OTPlayerName
|
||||||
@ -1856,7 +1856,7 @@ LinkTrade: ; 28b87
|
|||||||
call GetPartyLocation
|
call GetPartyLocation
|
||||||
ld b, h
|
ld b, h
|
||||||
ld c, l
|
ld c, l
|
||||||
callba GetCaughtGender
|
farcall GetCaughtGender
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [wOTTrademonCaughtData], a
|
ld [wOTTrademonCaughtData], a
|
||||||
ld a, [wd002]
|
ld a, [wd002]
|
||||||
@ -1869,7 +1869,7 @@ LinkTrade: ; 28b87
|
|||||||
ld [wd002], a
|
ld [wd002], a
|
||||||
xor a
|
xor a
|
||||||
ld [wPokemonWithdrawDepositParameter], a
|
ld [wPokemonWithdrawDepositParameter], a
|
||||||
callab RemoveMonFromPartyOrBox
|
callfar RemoveMonFromPartyOrBox
|
||||||
ld a, [PartyCount]
|
ld a, [PartyCount]
|
||||||
dec a
|
dec a
|
||||||
ld [CurPartyMon], a
|
ld [CurPartyMon], a
|
||||||
@ -1918,11 +1918,11 @@ LinkTrade: ; 28b87
|
|||||||
ld a, [PartyCount]
|
ld a, [PartyCount]
|
||||||
dec a
|
dec a
|
||||||
ld [CurPartyMon], a
|
ld [CurPartyMon], a
|
||||||
callab EvolvePokemon
|
callfar EvolvePokemon
|
||||||
call ClearScreen
|
call ClearScreen
|
||||||
call LoadTradeScreenBorder
|
call LoadTradeScreenBorder
|
||||||
call SetTradeRoomBGPals
|
call SetTradeRoomBGPals
|
||||||
callba Link_WaitBGMap
|
farcall Link_WaitBGMap
|
||||||
ld b, $1
|
ld b, $1
|
||||||
pop af
|
pop af
|
||||||
ld c, a
|
ld c, a
|
||||||
@ -1957,9 +1957,9 @@ LinkTrade: ; 28b87
|
|||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
|
|
||||||
.save
|
.save
|
||||||
callba SaveAfterLinkTrade
|
farcall SaveAfterLinkTrade
|
||||||
callba TrainerRankings_Trades
|
farcall TrainerRankings_Trades
|
||||||
callba BackupMobileEventIndex
|
farcall BackupMobileEventIndex
|
||||||
ld c, 40
|
ld c, 40
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
hlcoord 0, 12
|
hlcoord 0, 12
|
||||||
@ -1969,7 +1969,7 @@ LinkTrade: ; 28b87
|
|||||||
hlcoord 1, 14
|
hlcoord 1, 14
|
||||||
ld de, String28ebd
|
ld de, String28ebd
|
||||||
call PlaceString
|
call PlaceString
|
||||||
callba Link_WaitBGMap
|
farcall Link_WaitBGMap
|
||||||
ld c, 50
|
ld c, 50
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
ld a, [wLinkMode]
|
ld a, [wLinkMode]
|
||||||
@ -2005,17 +2005,17 @@ String_TooBadTheTradeWasCanceled: ; 28ece
|
|||||||
Predef_LinkTextbox: ; 28eef
|
Predef_LinkTextbox: ; 28eef
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
callba LinkTextbox
|
farcall LinkTextbox
|
||||||
ret
|
ret
|
||||||
; 28ef8
|
; 28ef8
|
||||||
|
|
||||||
LoadTradeScreenBorder: ; 28ef8
|
LoadTradeScreenBorder: ; 28ef8
|
||||||
callba _LoadTradeScreenBorder
|
farcall _LoadTradeScreenBorder
|
||||||
ret
|
ret
|
||||||
; 28eff
|
; 28eff
|
||||||
|
|
||||||
SetTradeRoomBGPals: ; 28eff
|
SetTradeRoomBGPals: ; 28eff
|
||||||
callba LoadTradeRoomBGPals_ ; just a nested farcall; so wasteful
|
farcall LoadTradeRoomBGPals_ ; just a nested farcall; so wasteful
|
||||||
call SetPalettes
|
call SetPalettes
|
||||||
ret
|
ret
|
||||||
; 28f09
|
; 28f09
|
||||||
@ -2030,7 +2030,7 @@ Function28f09: ; 28f09
|
|||||||
ld b, 6
|
ld b, 6
|
||||||
ld c, 18
|
ld c, 18
|
||||||
call Predef_LinkTextbox
|
call Predef_LinkTextbox
|
||||||
callba PlaceTradePartnerNamesAndParty
|
farcall PlaceTradePartnerNamesAndParty
|
||||||
ret
|
ret
|
||||||
; 28f24
|
; 28f24
|
||||||
|
|
||||||
@ -2064,7 +2064,7 @@ Special_CheckTimeCapsuleCompatibility: ; 29bfb
|
|||||||
push hl
|
push hl
|
||||||
push bc
|
push bc
|
||||||
ld d, [hl]
|
ld d, [hl]
|
||||||
callba ItemIsMail
|
farcall ItemIsMail
|
||||||
pop bc
|
pop bc
|
||||||
pop hl
|
pop hl
|
||||||
jr c, .mon_has_mail
|
jr c, .mon_has_mail
|
||||||
@ -2435,7 +2435,7 @@ Link_CheckCommunicationError: ; 29e0c
|
|||||||
Special_TryQuickSave: ; 29e66
|
Special_TryQuickSave: ; 29e66
|
||||||
ld a, [wd265]
|
ld a, [wd265]
|
||||||
push af
|
push af
|
||||||
callba Link_SaveGame
|
farcall Link_SaveGame
|
||||||
ld a, $1
|
ld a, $1
|
||||||
jr nc, .return_result
|
jr nc, .return_result
|
||||||
xor a
|
xor a
|
||||||
@ -2479,7 +2479,7 @@ Special_TimeCapsule: ; 29eaf
|
|||||||
ld a, LINK_TIMECAPSULE
|
ld a, LINK_TIMECAPSULE
|
||||||
ld [wLinkMode], a
|
ld [wLinkMode], a
|
||||||
call DisableSpriteUpdates
|
call DisableSpriteUpdates
|
||||||
callab LinkCommunications
|
callfar LinkCommunications
|
||||||
call EnableSpriteUpdates
|
call EnableSpriteUpdates
|
||||||
xor a
|
xor a
|
||||||
ld [hVBlank], a
|
ld [hVBlank], a
|
||||||
@ -2490,7 +2490,7 @@ Special_TradeCenter: ; 29ec4
|
|||||||
ld a, LINK_TRADECENTER
|
ld a, LINK_TRADECENTER
|
||||||
ld [wLinkMode], a
|
ld [wLinkMode], a
|
||||||
call DisableSpriteUpdates
|
call DisableSpriteUpdates
|
||||||
callab LinkCommunications
|
callfar LinkCommunications
|
||||||
call EnableSpriteUpdates
|
call EnableSpriteUpdates
|
||||||
xor a
|
xor a
|
||||||
ld [hVBlank], a
|
ld [hVBlank], a
|
||||||
@ -2501,7 +2501,7 @@ Special_Colosseum: ; 29ed9
|
|||||||
ld a, LINK_COLOSSEUM
|
ld a, LINK_COLOSSEUM
|
||||||
ld [wLinkMode], a
|
ld [wLinkMode], a
|
||||||
call DisableSpriteUpdates
|
call DisableSpriteUpdates
|
||||||
callab LinkCommunications
|
callfar LinkCommunications
|
||||||
call EnableSpriteUpdates
|
call EnableSpriteUpdates
|
||||||
xor a
|
xor a
|
||||||
ld [hVBlank], a
|
ld [hVBlank], a
|
||||||
|
@ -23,8 +23,8 @@ Function16d43b: ; 16d43b
|
|||||||
call ClearBGPalettes
|
call ClearBGPalettes
|
||||||
call ClearTileMap
|
call ClearTileMap
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
callba __LoadTradeScreenBorder ; useless to farcall
|
farcall __LoadTradeScreenBorder ; useless to farcall
|
||||||
callba Function16d42e ; useless to farcall
|
farcall Function16d42e ; useless to farcall
|
||||||
ld b, SCGB_DIPLOMA
|
ld b, SCGB_DIPLOMA
|
||||||
call GetSGBLayout
|
call GetSGBLayout
|
||||||
call SetPalettes
|
call SetPalettes
|
||||||
@ -119,8 +119,8 @@ _LinkTextbox: ; 16d61d
|
|||||||
InitTradeSpeciesList: ; 16d673
|
InitTradeSpeciesList: ; 16d673
|
||||||
call _LoadTradeScreenBorder
|
call _LoadTradeScreenBorder
|
||||||
call Function16d6ae
|
call Function16d6ae
|
||||||
callba InitMG_Mobile_LinkTradePalMap
|
farcall InitMG_Mobile_LinkTradePalMap
|
||||||
callba PlaceTradePartnerNamesAndParty
|
farcall PlaceTradePartnerNamesAndParty
|
||||||
hlcoord 10, 17
|
hlcoord 10, 17
|
||||||
ld de, .CANCEL
|
ld de, .CANCEL
|
||||||
call PlaceString
|
call PlaceString
|
||||||
@ -146,7 +146,7 @@ LinkComms_LoadPleaseWaitTextboxBorderGFX: ; 16d69a
|
|||||||
; 16d6a7
|
; 16d6a7
|
||||||
|
|
||||||
LoadTradeRoomBGPals_: ; 16d6a7
|
LoadTradeRoomBGPals_: ; 16d6a7
|
||||||
callba LoadTradeRoomBGPals
|
farcall LoadTradeRoomBGPals
|
||||||
ret
|
ret
|
||||||
; 16d6ae
|
; 16d6ae
|
||||||
|
|
||||||
@ -171,7 +171,7 @@ LinkTextbox: ; 16d6ca
|
|||||||
Function16d6ce: ; 16d6ce
|
Function16d6ce: ; 16d6ce
|
||||||
call LoadStandardMenuDataHeader
|
call LoadStandardMenuDataHeader
|
||||||
call Function16d6e1
|
call Function16d6e1
|
||||||
callba WaitLinkTransfer
|
farcall WaitLinkTransfer
|
||||||
call Call_ExitMenu
|
call Call_ExitMenu
|
||||||
call WaitBGMap2
|
call WaitBGMap2
|
||||||
ret
|
ret
|
||||||
@ -233,7 +233,7 @@ LinkTradeMenu: ; 16d70c
|
|||||||
call .UpdateBGMapAndOAM
|
call .UpdateBGMapAndOAM
|
||||||
call .loop2
|
call .loop2
|
||||||
jr nc, .done
|
jr nc, .done
|
||||||
callba _2DMenuInterpretJoypad
|
farcall _2DMenuInterpretJoypad
|
||||||
jr c, .done
|
jr c, .done
|
||||||
ld a, [w2DMenuFlags1]
|
ld a, [w2DMenuFlags1]
|
||||||
bit 7, a
|
bit 7, a
|
||||||
@ -352,7 +352,7 @@ LinkTradeMenu: ; 16d70c
|
|||||||
ld a, [w2DMenuFlags1]
|
ld a, [w2DMenuFlags1]
|
||||||
bit 6, a
|
bit 6, a
|
||||||
jr z, .skip_anims
|
jr z, .skip_anims
|
||||||
callba PlaySpriteAnimationsAndDelayFrame
|
farcall PlaySpriteAnimationsAndDelayFrame
|
||||||
.skip_anims
|
.skip_anims
|
||||||
call JoyTextDelay
|
call JoyTextDelay
|
||||||
call .GetJoypad
|
call .GetJoypad
|
||||||
|
@ -2,7 +2,7 @@ SendMailToPC: ; 4456e
|
|||||||
ld a, MON_ITEM
|
ld a, MON_ITEM
|
||||||
call GetPartyParamLocation
|
call GetPartyParamLocation
|
||||||
ld d, [hl]
|
ld d, [hl]
|
||||||
callba ItemIsMail
|
farcall ItemIsMail
|
||||||
jr nc, .full
|
jr nc, .full
|
||||||
call GetMailboxCount
|
call GetMailboxCount
|
||||||
cp MAILBOX_CAPACITY
|
cp MAILBOX_CAPACITY
|
||||||
@ -80,7 +80,7 @@ ReadMailMessage: ; 445f4
|
|||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
callba ReadAnyMail
|
farcall ReadAnyMail
|
||||||
ret
|
ret
|
||||||
|
|
||||||
MoveMailFromPCToParty: ; 44607
|
MoveMailFromPCToParty: ; 44607
|
||||||
@ -127,7 +127,7 @@ GetMailboxCount: ; 44648
|
|||||||
CheckPokeItem:: ; 44654
|
CheckPokeItem:: ; 44654
|
||||||
push bc
|
push bc
|
||||||
push de
|
push de
|
||||||
callba SelectMonFromParty
|
farcall SelectMonFromParty
|
||||||
ld a, $2
|
ld a, $2
|
||||||
jr c, .pop_return
|
jr c, .pop_return
|
||||||
|
|
||||||
@ -136,7 +136,7 @@ CheckPokeItem:: ; 44654
|
|||||||
ld bc, PARTYMON_STRUCT_LENGTH
|
ld bc, PARTYMON_STRUCT_LENGTH
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld d, [hl]
|
ld d, [hl]
|
||||||
callba ItemIsMail
|
farcall ItemIsMail
|
||||||
ld a, $3
|
ld a, $3
|
||||||
jr nc, .pop_return
|
jr nc, .pop_return
|
||||||
|
|
||||||
@ -172,12 +172,12 @@ CheckPokeItem:: ; 44654
|
|||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
|
|
||||||
.done
|
.done
|
||||||
callba CheckCurPartyMonFainted
|
farcall CheckCurPartyMonFainted
|
||||||
ld a, $4
|
ld a, $4
|
||||||
jr c, .close_sram_return
|
jr c, .close_sram_return
|
||||||
xor a
|
xor a
|
||||||
ld [wPokemonWithdrawDepositParameter], a
|
ld [wPokemonWithdrawDepositParameter], a
|
||||||
callba RemoveMonFromPartyOrBox
|
farcall RemoveMonFromPartyOrBox
|
||||||
ld a, $1
|
ld a, $1
|
||||||
|
|
||||||
.close_sram_return
|
.close_sram_return
|
||||||
@ -296,7 +296,7 @@ IsAnyMonHoldingMail: ; 44781
|
|||||||
ld d, [hl]
|
ld d, [hl]
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
callba ItemIsMail
|
farcall ItemIsMail
|
||||||
pop de
|
pop de
|
||||||
pop hl
|
pop hl
|
||||||
ret c
|
ret c
|
||||||
@ -503,15 +503,15 @@ MailboxPC: ; 0x44806
|
|||||||
ld [PartyMenuActionText], a
|
ld [PartyMenuActionText], a
|
||||||
call ClearBGPalettes
|
call ClearBGPalettes
|
||||||
.try_again
|
.try_again
|
||||||
callba LoadPartyMenuGFX
|
farcall LoadPartyMenuGFX
|
||||||
callba InitPartyMenuWithCancel
|
farcall InitPartyMenuWithCancel
|
||||||
callba InitPartyMenuGFX
|
farcall InitPartyMenuGFX
|
||||||
callba WritePartyMenuTilemap
|
farcall WritePartyMenuTilemap
|
||||||
callba PrintPartyMenuText
|
farcall PrintPartyMenuText
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
call SetPalettes
|
call SetPalettes
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
callba PartyMenuSelect
|
farcall PartyMenuSelect
|
||||||
jr c, .exit2
|
jr c, .exit2
|
||||||
ld a, [CurPartySpecies]
|
ld a, [CurPartySpecies]
|
||||||
cp EGG
|
cp EGG
|
||||||
|
@ -271,7 +271,7 @@ MainMenu_PrintCurrentTimeAndDay: ; 49e09
|
|||||||
decoord 4, 16
|
decoord 4, 16
|
||||||
ld a, [hHours]
|
ld a, [hHours]
|
||||||
ld c, a
|
ld c, a
|
||||||
callba PrintHour
|
farcall PrintHour
|
||||||
ld [hl], ":"
|
ld [hl], ":"
|
||||||
inc hl
|
inc hl
|
||||||
ld de, hMinutes
|
ld de, hMinutes
|
||||||
@ -341,21 +341,21 @@ Function49ed0: ; 49ed0
|
|||||||
|
|
||||||
|
|
||||||
MainMenu_NewGame: ; 49ee0
|
MainMenu_NewGame: ; 49ee0
|
||||||
callba NewGame
|
farcall NewGame
|
||||||
ret
|
ret
|
||||||
; 49ee7
|
; 49ee7
|
||||||
|
|
||||||
MainMenu_Options: ; 49ee7
|
MainMenu_Options: ; 49ee7
|
||||||
callba OptionsMenu
|
farcall OptionsMenu
|
||||||
ret
|
ret
|
||||||
; 49eee
|
; 49eee
|
||||||
|
|
||||||
MainMenu_Continue: ; 49eee
|
MainMenu_Continue: ; 49eee
|
||||||
callba Continue
|
farcall Continue
|
||||||
ret
|
ret
|
||||||
; 49ef5
|
; 49ef5
|
||||||
|
|
||||||
MainMenu_MysteryGift: ; 49ef5
|
MainMenu_MysteryGift: ; 49ef5
|
||||||
callba MysteryGift
|
farcall MysteryGift
|
||||||
ret
|
ret
|
||||||
; 49efc
|
; 49efc
|
||||||
|
@ -1699,7 +1699,7 @@ StepType0f: ; 4ecd
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld b, a
|
ld b, a
|
||||||
callba CopyDECoordsToMapObject
|
farcall CopyDECoordsToMapObject
|
||||||
pop bc
|
pop bc
|
||||||
ld hl, OBJECT_FLAGS2
|
ld hl, OBJECT_FLAGS2
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -2177,7 +2177,7 @@ InitTempObject: ; 55ac
|
|||||||
ret nc
|
ret nc
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
callba CopyTempObjectToObjectStruct
|
farcall CopyTempObjectToObjectStruct
|
||||||
ret
|
ret
|
||||||
; 55b9
|
; 55b9
|
||||||
|
|
||||||
@ -2306,7 +2306,7 @@ Function565c: ; 565c
|
|||||||
call Function56a3
|
call Function56a3
|
||||||
jr c, SetFacing_Standing
|
jr c, SetFacing_Standing
|
||||||
call Function5688
|
call Function5688
|
||||||
callba Function4440
|
farcall Function4440
|
||||||
xor a
|
xor a
|
||||||
ret
|
ret
|
||||||
; 5673
|
; 5673
|
||||||
@ -2314,7 +2314,7 @@ Function565c: ; 565c
|
|||||||
Function5673: ; 5673
|
Function5673: ; 5673
|
||||||
call Function56a3
|
call Function56a3
|
||||||
jr c, SetFacing_Standing
|
jr c, SetFacing_Standing
|
||||||
callba Function4440 ; no need to farcall
|
farcall Function4440 ; no need to farcall
|
||||||
xor a
|
xor a
|
||||||
ret
|
ret
|
||||||
; 5680
|
; 5680
|
||||||
@ -2340,7 +2340,7 @@ Function5688: ; 5688
|
|||||||
ld hl, OBJECT_NEXT_TILE
|
ld hl, OBJECT_NEXT_TILE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
callba UpdateTallGrassFlags ; no need to farcall
|
farcall UpdateTallGrassFlags ; no need to farcall
|
||||||
ret
|
ret
|
||||||
; 56a3
|
; 56a3
|
||||||
|
|
||||||
@ -2527,7 +2527,7 @@ RefreshPlayerSprite: ; 579d
|
|||||||
ld [wPlayerTurningDirection], a
|
ld [wPlayerTurningDirection], a
|
||||||
ld [PlayerObjectStepFrame], a
|
ld [PlayerObjectStepFrame], a
|
||||||
call .TryResetPlayerAction
|
call .TryResetPlayerAction
|
||||||
callba CheckWarpFacingDown
|
farcall CheckWarpFacingDown
|
||||||
call c, SpawnInFacingDown
|
call c, SpawnInFacingDown
|
||||||
call .SpawnInCustomFacing
|
call .SpawnInCustomFacing
|
||||||
ret
|
ret
|
||||||
@ -2596,7 +2596,7 @@ StartFollow:: ; 5803
|
|||||||
ret c
|
ret c
|
||||||
ld a, c
|
ld a, c
|
||||||
call SetFollowerIfVisible
|
call SetFollowerIfVisible
|
||||||
callba QueueFollowerFirstStep
|
farcall QueueFollowerFirstStep
|
||||||
ret
|
ret
|
||||||
; 5815
|
; 5815
|
||||||
|
|
||||||
@ -2642,7 +2642,7 @@ ResetFollower: ; 5847
|
|||||||
cp -1
|
cp -1
|
||||||
ret z
|
ret z
|
||||||
call GetObjectStruct
|
call GetObjectStruct
|
||||||
callba Function58e3 ; no need to bankswitch
|
farcall Function58e3 ; no need to bankswitch
|
||||||
ld a, -1
|
ld a, -1
|
||||||
ld [wObjectFollow_Follower], a
|
ld [wObjectFollow_Follower], a
|
||||||
ret
|
ret
|
||||||
|
@ -308,8 +308,8 @@ SuspendMapAnims: ; 154d3
|
|||||||
LoadObjectsRunCallback_02: ; 154d7
|
LoadObjectsRunCallback_02: ; 154d7
|
||||||
ld a, MAPCALLBACK_OBJECTS
|
ld a, MAPCALLBACK_OBJECTS
|
||||||
call RunMapCallback
|
call RunMapCallback
|
||||||
callba LoadObjectMasks
|
farcall LoadObjectMasks
|
||||||
callba InitializeVisibleSprites
|
farcall InitializeVisibleSprites
|
||||||
ret
|
ret
|
||||||
; 154ea (5:54ea)
|
; 154ea (5:54ea)
|
||||||
|
|
||||||
@ -409,7 +409,7 @@ FadeOldMapMusic: ; 15567
|
|||||||
; 1556d
|
; 1556d
|
||||||
|
|
||||||
RetainOldPalettes: ; 1556d
|
RetainOldPalettes: ; 1556d
|
||||||
callba _UpdateTimePals
|
farcall _UpdateTimePals
|
||||||
ret
|
ret
|
||||||
|
|
||||||
RotatePalettesRightMapAndMusic: ; 15574
|
RotatePalettesRightMapAndMusic: ; 15574
|
||||||
|
@ -252,7 +252,7 @@ GetMartItemPrice: ; 15be5
|
|||||||
; Return the price of item a in BCD at hl and in tiles at StringBuffer1.
|
; Return the price of item a in BCD at hl and in tiles at StringBuffer1.
|
||||||
push hl
|
push hl
|
||||||
ld [CurItem], a
|
ld [CurItem], a
|
||||||
callba GetItemPrice
|
farcall GetItemPrice
|
||||||
pop hl
|
pop hl
|
||||||
|
|
||||||
GetMartPrice: ; 15bf0
|
GetMartPrice: ; 15bf0
|
||||||
@ -344,7 +344,7 @@ INCLUDE "data/items/bargain_shop.asm"
|
|||||||
|
|
||||||
BuyMenu: ; 15c62
|
BuyMenu: ; 15c62
|
||||||
call FadeToMenu
|
call FadeToMenu
|
||||||
callba BlankScreen
|
farcall BlankScreen
|
||||||
xor a
|
xor a
|
||||||
ld [wMenuScrollPositionBackup], a
|
ld [wMenuScrollPositionBackup], a
|
||||||
ld a, 1
|
ld a, 1
|
||||||
@ -443,7 +443,7 @@ GetMartDialogGroup: ; 15ca3
|
|||||||
|
|
||||||
|
|
||||||
BuyMenuLoop: ; 15cef
|
BuyMenuLoop: ; 15cef
|
||||||
callba PlaceMoneyTopRight
|
farcall PlaceMoneyTopRight
|
||||||
call UpdateSprites
|
call UpdateSprites
|
||||||
ld hl, MenuDataHeader_Buy
|
ld hl, MenuDataHeader_Buy
|
||||||
call CopyMenuDataHeader
|
call CopyMenuDataHeader
|
||||||
@ -519,7 +519,7 @@ StandardMartAskPurchaseQuantity:
|
|||||||
ld [wItemQuantityBuffer], a
|
ld [wItemQuantityBuffer], a
|
||||||
ld a, MARTTEXT_HOW_MANY
|
ld a, MARTTEXT_HOW_MANY
|
||||||
call LoadBuyMenuText
|
call LoadBuyMenuText
|
||||||
callba SelectQuantityToBuy
|
farcall SelectQuantityToBuy
|
||||||
call ExitMenu
|
call ExitMenu
|
||||||
ret
|
ret
|
||||||
; 15d97
|
; 15d97
|
||||||
@ -579,7 +579,7 @@ RooftopSaleAskPurchaseQuantity:
|
|||||||
call .GetSalePrice
|
call .GetSalePrice
|
||||||
ld a, 99
|
ld a, 99
|
||||||
ld [wItemQuantityBuffer], a
|
ld [wItemQuantityBuffer], a
|
||||||
callba RooftopSale_SelectQuantityToBuy
|
farcall RooftopSale_SelectQuantityToBuy
|
||||||
call ExitMenu
|
call ExitMenu
|
||||||
ret
|
ret
|
||||||
; 15df9
|
; 15df9
|
||||||
@ -782,9 +782,9 @@ Text_Pharmacist_ComeAgain: ; 0x15eae
|
|||||||
|
|
||||||
SellMenu: ; 15eb3
|
SellMenu: ; 15eb3
|
||||||
call DisableSpriteUpdates
|
call DisableSpriteUpdates
|
||||||
callba DepositSellInitPackBuffers
|
farcall DepositSellInitPackBuffers
|
||||||
.loop
|
.loop
|
||||||
callba DepositSellPack
|
farcall DepositSellPack
|
||||||
ld a, [wcf66]
|
ld a, [wcf66]
|
||||||
and a
|
and a
|
||||||
jp z, .quit
|
jp z, .quit
|
||||||
@ -812,7 +812,7 @@ SellMenu: ; 15eb3
|
|||||||
|
|
||||||
|
|
||||||
.TryToSellItem: ; 15ee0
|
.TryToSellItem: ; 15ee0
|
||||||
callba CheckItemMenu
|
farcall CheckItemMenu
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeParamBuffer]
|
||||||
ld hl, .dw
|
ld hl, .dw
|
||||||
rst JumpTable
|
rst JumpTable
|
||||||
@ -835,7 +835,7 @@ SellMenu: ; 15eb3
|
|||||||
|
|
||||||
|
|
||||||
.try_sell ; 15efd
|
.try_sell ; 15efd
|
||||||
callba _CheckTossableItem
|
farcall _CheckTossableItem
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeParamBuffer]
|
||||||
and a
|
and a
|
||||||
jr z, .okay_to_sell
|
jr z, .okay_to_sell
|
||||||
@ -847,8 +847,8 @@ SellMenu: ; 15eb3
|
|||||||
.okay_to_sell
|
.okay_to_sell
|
||||||
ld hl, Text_Mart_SellHowMany
|
ld hl, Text_Mart_SellHowMany
|
||||||
call PrintText
|
call PrintText
|
||||||
callba PlaceMoneyAtTopLeftOfTextbox
|
farcall PlaceMoneyAtTopLeftOfTextbox
|
||||||
callba SelectQuantityToSell
|
farcall SelectQuantityToSell
|
||||||
call ExitMenu
|
call ExitMenu
|
||||||
jr c, .declined
|
jr c, .declined
|
||||||
hlcoord 1, 14
|
hlcoord 1, 14
|
||||||
@ -871,7 +871,7 @@ SellMenu: ; 15eb3
|
|||||||
ld hl, Text_Mart_SoldForAmount
|
ld hl, Text_Mart_SoldForAmount
|
||||||
call PrintTextBoxText
|
call PrintTextBoxText
|
||||||
call PlayTransactionSound
|
call PlayTransactionSound
|
||||||
callba PlaceMoneyBottomLeft
|
farcall PlaceMoneyBottomLeft
|
||||||
call JoyWaitAorB
|
call JoyWaitAorB
|
||||||
|
|
||||||
.declined
|
.declined
|
||||||
|
@ -16,7 +16,7 @@ _InterpretBattleMenu:: ; 24022
|
|||||||
rst FarCall
|
rst FarCall
|
||||||
|
|
||||||
call Draw2DMenu
|
call Draw2DMenu
|
||||||
callba MobileTextBorder
|
farcall MobileTextBorder
|
||||||
call UpdateSprites
|
call UpdateSprites
|
||||||
call ApplyTilemap
|
call ApplyTilemap
|
||||||
call Get2DMenuSelection
|
call Get2DMenuSelection
|
||||||
@ -29,7 +29,7 @@ _InterpretMobileMenu:: ; 2403c
|
|||||||
rst FarCall
|
rst FarCall
|
||||||
|
|
||||||
call Draw2DMenu
|
call Draw2DMenu
|
||||||
callba MobileTextBorder
|
farcall MobileTextBorder
|
||||||
call UpdateSprites
|
call UpdateSprites
|
||||||
call ApplyTilemap
|
call ApplyTilemap
|
||||||
call Init2DMenuCursorPosition
|
call Init2DMenuCursorPosition
|
||||||
@ -37,7 +37,7 @@ _InterpretMobileMenu:: ; 2403c
|
|||||||
set 7, [hl]
|
set 7, [hl]
|
||||||
.loop
|
.loop
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
callba Function10032e
|
farcall Function10032e
|
||||||
ld a, [wcd2b]
|
ld a, [wcd2b]
|
||||||
and a
|
and a
|
||||||
jr nz, .quit
|
jr nz, .quit
|
||||||
@ -322,7 +322,7 @@ Function241d5: ; 241d5
|
|||||||
call AdvanceMobileInactivityTimerAndCheckExpired ; BUG: This function is in another bank.
|
call AdvanceMobileInactivityTimerAndCheckExpired ; BUG: This function is in another bank.
|
||||||
; Pointer in current bank (9) is bogus.
|
; Pointer in current bank (9) is bogus.
|
||||||
ret c
|
ret c
|
||||||
callba Function100337
|
farcall Function100337
|
||||||
ret c
|
ret c
|
||||||
ld a, [w2DMenuFlags1]
|
ld a, [w2DMenuFlags1]
|
||||||
bit 7, a
|
bit 7, a
|
||||||
@ -382,7 +382,7 @@ Menu_WasButtonPressed: ; 24259
|
|||||||
ld a, [w2DMenuFlags1]
|
ld a, [w2DMenuFlags1]
|
||||||
bit 6, a
|
bit 6, a
|
||||||
jr z, .skip_to_joypad
|
jr z, .skip_to_joypad
|
||||||
callab PlaySpriteAnimationsAndDelayFrame
|
callfar PlaySpriteAnimationsAndDelayFrame
|
||||||
|
|
||||||
.skip_to_joypad
|
.skip_to_joypad
|
||||||
call JoyTextDelay
|
call JoyTextDelay
|
||||||
|
@ -11,7 +11,7 @@ PlaceMenuItemQuantity: ; 0x24ac3
|
|||||||
push de
|
push de
|
||||||
ld a, [MenuSelection]
|
ld a, [MenuSelection]
|
||||||
ld [CurItem], a
|
ld [CurItem], a
|
||||||
callba _CheckTossableItem
|
farcall _CheckTossableItem
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeParamBuffer]
|
||||||
pop hl
|
pop hl
|
||||||
and a
|
and a
|
||||||
|
@ -66,7 +66,7 @@ LoadMenuMonIcon: ; 8e83f
|
|||||||
push hl
|
push hl
|
||||||
push bc
|
push bc
|
||||||
ld d, a
|
ld d, a
|
||||||
callab ItemIsMail
|
callfar ItemIsMail
|
||||||
pop bc
|
pop bc
|
||||||
pop hl
|
pop hl
|
||||||
jr c, .not_mail
|
jr c, .not_mail
|
||||||
@ -140,7 +140,7 @@ PartyMenu_InitAnimatedMonIcon: ; 8e8d5 (23:68d5)
|
|||||||
push hl
|
push hl
|
||||||
push bc
|
push bc
|
||||||
ld d, a
|
ld d, a
|
||||||
callab ItemIsMail
|
callfar ItemIsMail
|
||||||
pop bc
|
pop bc
|
||||||
pop hl
|
pop hl
|
||||||
jr c, .mail
|
jr c, .mail
|
||||||
@ -204,7 +204,7 @@ SetPartyMonIconAnimSpeed: ; 8e936 (23:6936)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.getspeed ; 8e94c (23:694c)
|
.getspeed ; 8e94c (23:694c)
|
||||||
callba PlacePartymonHPBar
|
farcall PlacePartymonHPBar
|
||||||
call GetHPPal
|
call GetHPPal
|
||||||
ld e, d
|
ld e, d
|
||||||
ld d, 0
|
ld d, 0
|
||||||
|
@ -39,7 +39,7 @@ MonSubmenu: ; 24d19
|
|||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
call GetMonSubmenuItems
|
call GetMonSubmenuItems
|
||||||
callba FreezeMonIcons
|
farcall FreezeMonIcons
|
||||||
ld hl, .MenuDataHeader
|
ld hl, .MenuDataHeader
|
||||||
call LoadMenuDataHeader
|
call LoadMenuDataHeader
|
||||||
call .GetTopCoord
|
call .GetTopCoord
|
||||||
@ -202,7 +202,7 @@ GetMonSubmenuItems: ; 24dd4
|
|||||||
ld a, MON_ITEM
|
ld a, MON_ITEM
|
||||||
call GetPartyParamLocation
|
call GetPartyParamLocation
|
||||||
ld d, [hl]
|
ld d, [hl]
|
||||||
callba ItemIsMail
|
farcall ItemIsMail
|
||||||
pop hl
|
pop hl
|
||||||
ld a, MONMENU_MAIL
|
ld a, MONMENU_MAIL
|
||||||
jr c, .ok
|
jr c, .ok
|
||||||
|
@ -276,7 +276,7 @@ ListMovePP: ; 50c50
|
|||||||
push af
|
push af
|
||||||
ld [hl], b
|
ld [hl], b
|
||||||
push hl
|
push hl
|
||||||
callab GetMaxPPOfMove
|
callfar GetMaxPPOfMove
|
||||||
pop hl
|
pop hl
|
||||||
pop af
|
pop af
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
@ -136,7 +136,7 @@ endr
|
|||||||
push de
|
push de
|
||||||
ld a, [CurPartyLevel]
|
ld a, [CurPartyLevel]
|
||||||
ld d, a
|
ld d, a
|
||||||
callab CalcExpAtLevel
|
callfar CalcExpAtLevel
|
||||||
pop de
|
pop de
|
||||||
ld a, [hProduct + 1]
|
ld a, [hProduct + 1]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
@ -160,7 +160,7 @@ endr
|
|||||||
and $f
|
and $f
|
||||||
jr z, .generateDVs
|
jr z, .generateDVs
|
||||||
push hl
|
push hl
|
||||||
callba GetTrainerDVs
|
farcall GetTrainerDVs
|
||||||
pop hl
|
pop hl
|
||||||
jr .initializetrainermonstats
|
jr .initializetrainermonstats
|
||||||
|
|
||||||
@ -312,7 +312,7 @@ endr
|
|||||||
ld bc, PARTYMON_STRUCT_LENGTH
|
ld bc, PARTYMON_STRUCT_LENGTH
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
predef GetUnownLetter
|
predef GetUnownLetter
|
||||||
callab UpdateUnownDex
|
callfar UpdateUnownDex
|
||||||
|
|
||||||
.done
|
.done
|
||||||
scf ; When this function returns, the carry flag indicates success vs failure.
|
scf ; When this function returns, the carry flag indicates success vs failure.
|
||||||
@ -423,7 +423,7 @@ AddTempmonToParty: ; da96
|
|||||||
ld bc, PARTYMON_STRUCT_LENGTH
|
ld bc, PARTYMON_STRUCT_LENGTH
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
predef GetUnownLetter
|
predef GetUnownLetter
|
||||||
callab UpdateUnownDex
|
callfar UpdateUnownDex
|
||||||
ld a, [wFirstUnownSeen]
|
ld a, [wFirstUnownSeen]
|
||||||
and a
|
and a
|
||||||
jr nz, .done
|
jr nz, .done
|
||||||
@ -598,7 +598,7 @@ SentGetPkmnIntoFromBox: ; db3f
|
|||||||
add $2
|
add $2
|
||||||
ld [MonType], a
|
ld [MonType], a
|
||||||
predef CopyPkmnToTempMon
|
predef CopyPkmnToTempMon
|
||||||
callab CalcLevel
|
callfar CalcLevel
|
||||||
ld a, d
|
ld a, d
|
||||||
ld [CurPartyLevel], a
|
ld [CurPartyLevel], a
|
||||||
pop hl
|
pop hl
|
||||||
@ -708,7 +708,7 @@ RestorePPofDepositedPokemon: ; dcb6
|
|||||||
push bc
|
push bc
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
callba GetMaxPPOfMove
|
farcall GetMaxPPOfMove
|
||||||
pop de
|
pop de
|
||||||
pop hl
|
pop hl
|
||||||
ld a, [wd265]
|
ld a, [wd265]
|
||||||
@ -844,10 +844,10 @@ Functiondd64: ; dd64
|
|||||||
ld a, [PartyCount]
|
ld a, [PartyCount]
|
||||||
dec a
|
dec a
|
||||||
ld [CurPartyMon], a
|
ld [CurPartyMon], a
|
||||||
callba HealPartyMon
|
farcall HealPartyMon
|
||||||
ld a, [CurPartyLevel]
|
ld a, [CurPartyLevel]
|
||||||
ld d, a
|
ld d, a
|
||||||
callab CalcExpAtLevel
|
callfar CalcExpAtLevel
|
||||||
pop bc
|
pop bc
|
||||||
ld hl, $8
|
ld hl, $8
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -961,7 +961,7 @@ SentPkmnIntoBox: ; de6e
|
|||||||
push de
|
push de
|
||||||
ld a, [CurPartyLevel]
|
ld a, [CurPartyLevel]
|
||||||
ld d, a
|
ld d, a
|
||||||
callab CalcExpAtLevel
|
callfar CalcExpAtLevel
|
||||||
pop de
|
pop de
|
||||||
ld a, [hProduct + 1]
|
ld a, [hProduct + 1]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
@ -1011,7 +1011,7 @@ SentPkmnIntoBox: ; de6e
|
|||||||
jr nz, .not_unown
|
jr nz, .not_unown
|
||||||
ld hl, sBoxMon1DVs
|
ld hl, sBoxMon1DVs
|
||||||
predef GetUnownLetter
|
predef GetUnownLetter
|
||||||
callab UpdateUnownDex
|
callfar UpdateUnownDex
|
||||||
|
|
||||||
.not_unown
|
.not_unown
|
||||||
ld hl, sBoxMon1Moves
|
ld hl, sBoxMon1Moves
|
||||||
@ -1089,8 +1089,8 @@ ShiftBoxMon: ; df47
|
|||||||
GiveEgg:: ; df8c
|
GiveEgg:: ; df8c
|
||||||
ld a, [CurPartySpecies]
|
ld a, [CurPartySpecies]
|
||||||
push af
|
push af
|
||||||
callab GetPreEvolution
|
callfar GetPreEvolution
|
||||||
callab GetPreEvolution
|
callfar GetPreEvolution
|
||||||
ld a, [CurPartySpecies]
|
ld a, [CurPartySpecies]
|
||||||
dec a
|
dec a
|
||||||
|
|
||||||
@ -1433,7 +1433,7 @@ CalcPkmnStatC: ; e17b
|
|||||||
ld a, [hld]
|
ld a, [hld]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, [hl]
|
ld d, [hl]
|
||||||
callba GetSquareRoot
|
farcall GetSquareRoot
|
||||||
pop de
|
pop de
|
||||||
|
|
||||||
.no_stat_exp
|
.no_stat_exp
|
||||||
@ -1625,7 +1625,7 @@ GivePoke:: ; e277
|
|||||||
.failed
|
.failed
|
||||||
ld a, [CurPartySpecies]
|
ld a, [CurPartySpecies]
|
||||||
ld [TempEnemyMonSpecies], a
|
ld [TempEnemyMonSpecies], a
|
||||||
callab LoadEnemyMon
|
callfar LoadEnemyMon
|
||||||
call SentPkmnIntoBox
|
call SentPkmnIntoBox
|
||||||
jp nc, .FailedToGiveMon
|
jp nc, .FailedToGiveMon
|
||||||
ld a, BOXMON
|
ld a, BOXMON
|
||||||
@ -1706,7 +1706,7 @@ GivePoke:: ; e277
|
|||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld [hl], 01001 % $100
|
ld [hl], 01001 % $100
|
||||||
pop bc
|
pop bc
|
||||||
callba SetGiftPartyMonCaughtData
|
farcall SetGiftPartyMonCaughtData
|
||||||
jr .skip_nickname
|
jr .skip_nickname
|
||||||
|
|
||||||
.send_to_box
|
.send_to_box
|
||||||
@ -1730,7 +1730,7 @@ GivePoke:: ; e277
|
|||||||
call Random
|
call Random
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
callba SetGiftBoxMonCaughtData
|
farcall SetGiftBoxMonCaughtData
|
||||||
jr .skip_nickname
|
jr .skip_nickname
|
||||||
|
|
||||||
.wildmon
|
.wildmon
|
||||||
@ -1741,13 +1741,13 @@ GivePoke:: ; e277
|
|||||||
ld a, b
|
ld a, b
|
||||||
and a
|
and a
|
||||||
jr z, .party
|
jr z, .party
|
||||||
callba SetBoxMonCaughtData
|
farcall SetBoxMonCaughtData
|
||||||
jr .set_caught_data
|
jr .set_caught_data
|
||||||
|
|
||||||
.party
|
.party
|
||||||
callba SetCaughtData
|
farcall SetCaughtData
|
||||||
.set_caught_data
|
.set_caught_data
|
||||||
callba GiveANickname_YesNo
|
farcall GiveANickname_YesNo
|
||||||
pop de
|
pop de
|
||||||
jr c, .skip_nickname
|
jr c, .skip_nickname
|
||||||
call InitNickname
|
call InitNickname
|
||||||
@ -1791,7 +1791,7 @@ InitNickname: ; e3de
|
|||||||
pop de
|
pop de
|
||||||
push de
|
push de
|
||||||
ld b, $0
|
ld b, $0
|
||||||
callba NamingScreen
|
farcall NamingScreen
|
||||||
pop hl
|
pop hl
|
||||||
ld de, StringBuffer1
|
ld de, StringBuffer1
|
||||||
call InitName
|
call InitName
|
||||||
|
@ -34,7 +34,7 @@ InsertPokemonIntoBox: ; 51322
|
|||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld a, [CurPartyMon]
|
ld a, [CurPartyMon]
|
||||||
ld b, a
|
ld b, a
|
||||||
callba RestorePPofDepositedPokemon
|
farcall RestorePPofDepositedPokemon
|
||||||
jp CloseSRAM
|
jp CloseSRAM
|
||||||
|
|
||||||
InsertPokemonIntoParty: ; 5138b
|
InsertPokemonIntoParty: ; 5138b
|
||||||
|
@ -7,7 +7,7 @@ DoMysteryGift: ; 1048ba (41:48ba)
|
|||||||
ld de, .String_PressAToLink_BToCancel
|
ld de, .String_PressAToLink_BToCancel
|
||||||
call PlaceString
|
call PlaceString
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
callba PrepMysteryGiftDataToSend
|
farcall PrepMysteryGiftDataToSend
|
||||||
call MysteryGift_ClearTrainerData
|
call MysteryGift_ClearTrainerData
|
||||||
ld a, $2
|
ld a, $2
|
||||||
ld [wca01], a
|
ld [wca01], a
|
||||||
@ -62,21 +62,21 @@ DoMysteryGift: ; 1048ba (41:48ba)
|
|||||||
cp 4
|
cp 4
|
||||||
jr z, .skip_append_save
|
jr z, .skip_append_save
|
||||||
call .SaveMysteryGiftTrainerName
|
call .SaveMysteryGiftTrainerName
|
||||||
callba RestoreMobileEventIndex
|
farcall RestoreMobileEventIndex
|
||||||
callba TrainerRankings_MysteryGift
|
farcall TrainerRankings_MysteryGift
|
||||||
callba BackupMobileEventIndex
|
farcall BackupMobileEventIndex
|
||||||
.skip_append_save
|
.skip_append_save
|
||||||
ld a, [wMysteryGiftPartnerSentDeco]
|
ld a, [wMysteryGiftPartnerSentDeco]
|
||||||
and a
|
and a
|
||||||
jr z, .item
|
jr z, .item
|
||||||
ld a, [wMysteryGiftPartnerWhichDeco]
|
ld a, [wMysteryGiftPartnerWhichDeco]
|
||||||
ld c, a
|
ld c, a
|
||||||
callba MysteryGiftGetDecoration
|
farcall MysteryGiftGetDecoration
|
||||||
push bc
|
push bc
|
||||||
call MysteryGift_CheckAndSetDecorationAlreadyReceived
|
call MysteryGift_CheckAndSetDecorationAlreadyReceived
|
||||||
pop bc
|
pop bc
|
||||||
jr nz, .item
|
jr nz, .item
|
||||||
callab GetDecorationName_c
|
callfar GetDecorationName_c
|
||||||
ld h, d
|
ld h, d
|
||||||
ld l, e
|
ld l, e
|
||||||
ld de, StringBuffer1
|
ld de, StringBuffer1
|
||||||
@ -89,7 +89,7 @@ DoMysteryGift: ; 1048ba (41:48ba)
|
|||||||
call GetMysteryGiftBank
|
call GetMysteryGiftBank
|
||||||
ld a, [wMysteryGiftPartnerWhichItem]
|
ld a, [wMysteryGiftPartnerWhichItem]
|
||||||
ld c, a
|
ld c, a
|
||||||
callba MysteryGiftGetItemHeldEffect
|
farcall MysteryGiftGetItemHeldEffect
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [sBackupMysteryGiftItem], a
|
ld [sBackupMysteryGiftItem], a
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndexBuffer], a
|
||||||
@ -237,7 +237,7 @@ DoMysteryGift: ; 1048ba (41:48ba)
|
|||||||
|
|
||||||
Function104a95: ; 104a95 (41:4a95)
|
Function104a95: ; 104a95 (41:4a95)
|
||||||
di
|
di
|
||||||
callba ClearChannels
|
farcall ClearChannels
|
||||||
call Function104d5e
|
call Function104d5e
|
||||||
|
|
||||||
.loop2
|
.loop2
|
||||||
@ -421,7 +421,7 @@ Function104bd0: ; 104bd0 (41:4bd0)
|
|||||||
ld a, [wMysteryGiftTrainerData]
|
ld a, [wMysteryGiftTrainerData]
|
||||||
cp $3
|
cp $3
|
||||||
jr nc, .quit
|
jr nc, .quit
|
||||||
callba StagePartyDataForMysteryGift
|
farcall StagePartyDataForMysteryGift
|
||||||
call MysteryGift_ClearTrainerData
|
call MysteryGift_ClearTrainerData
|
||||||
ld a, $26
|
ld a, $26
|
||||||
ld [wca02], a
|
ld [wca02], a
|
||||||
@ -453,7 +453,7 @@ Function104bd0: ; 104bd0 (41:4bd0)
|
|||||||
|
|
||||||
Function104c2d: ; 104c2d (41:4c2d)
|
Function104c2d: ; 104c2d (41:4c2d)
|
||||||
di
|
di
|
||||||
callba ClearChannels
|
farcall ClearChannels
|
||||||
call Function104d5e
|
call Function104d5e
|
||||||
.asm_104c37
|
.asm_104c37
|
||||||
call Function104d96
|
call Function104d96
|
||||||
@ -1148,7 +1148,7 @@ MysteryGift_CopyReceivedDecosToPC: ; 105091 (41:5091)
|
|||||||
pop bc
|
pop bc
|
||||||
jr z, .skip
|
jr z, .skip
|
||||||
push bc
|
push bc
|
||||||
callab SetSpecificDecorationFlag
|
callfar SetSpecificDecorationFlag
|
||||||
pop bc
|
pop bc
|
||||||
.skip
|
.skip
|
||||||
inc c
|
inc c
|
||||||
@ -1447,7 +1447,7 @@ Function105688: ; 105688 (41:5688)
|
|||||||
ld hl, Text_ReceivedCard
|
ld hl, Text_ReceivedCard
|
||||||
call PrintText
|
call PrintText
|
||||||
ld de, wMysteryGiftTrainerData
|
ld de, wMysteryGiftTrainerData
|
||||||
callba Function8ac70
|
farcall Function8ac70
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
ld hl, Text_CardNotRegistered
|
ld hl, Text_CardNotRegistered
|
||||||
@ -1663,7 +1663,7 @@ Function1057d7: ; 1057d7 (41:57d7)
|
|||||||
call EnableLCD
|
call EnableLCD
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
ld b, $2
|
ld b, $2
|
||||||
callba GetMysteryGift_MobileAdapterLayout
|
farcall GetMysteryGift_MobileAdapterLayout
|
||||||
jp SetPalettes
|
jp SetPalettes
|
||||||
|
|
||||||
.Load6Row: ; 1058c6 (41:58c6)
|
.Load6Row: ; 1058c6 (41:58c6)
|
||||||
|
@ -103,7 +103,7 @@ NamingScreen: ; 116c1
|
|||||||
inc de
|
inc de
|
||||||
hlcoord 5, 4
|
hlcoord 5, 4
|
||||||
call PlaceString
|
call PlaceString
|
||||||
callba GetGender
|
farcall GetGender
|
||||||
jr c, .genderless
|
jr c, .genderless
|
||||||
ld a, "♂"
|
ld a, "♂"
|
||||||
jr nz, .place_gender
|
jr nz, .place_gender
|
||||||
@ -124,7 +124,7 @@ NamingScreen: ; 116c1
|
|||||||
; 1178d
|
; 1178d
|
||||||
|
|
||||||
.Player: ; 1178d (4:578d)
|
.Player: ; 1178d (4:578d)
|
||||||
callba GetPlayerIcon
|
farcall GetPlayerIcon
|
||||||
call .LoadSprite
|
call .LoadSprite
|
||||||
hlcoord 5, 2
|
hlcoord 5, 2
|
||||||
ld de, .PlayerNameString
|
ld de, .PlayerNameString
|
||||||
@ -352,14 +352,14 @@ NamingScreenJoypadLoop: ; 11915
|
|||||||
bit 7, a
|
bit 7, a
|
||||||
jr nz, .quit
|
jr nz, .quit
|
||||||
call .RunJumptable
|
call .RunJumptable
|
||||||
callba PlaySpriteAnimationsAndDelayFrame
|
farcall PlaySpriteAnimationsAndDelayFrame
|
||||||
call .UpdateStringEntry
|
call .UpdateStringEntry
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.quit
|
.quit
|
||||||
callab ClearSpriteAnims
|
callfar ClearSpriteAnims
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
xor a
|
xor a
|
||||||
ld [hSCX], a
|
ld [hSCX], a
|
||||||
@ -900,7 +900,7 @@ NamingScreen_GetLastCharacter: ; 11c11 (4:5c11)
|
|||||||
|
|
||||||
LoadNamingScreenGFX: ; 11c51
|
LoadNamingScreenGFX: ; 11c51
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
callab ClearSpriteAnims
|
callfar ClearSpriteAnims
|
||||||
call LoadStandardFont
|
call LoadStandardFont
|
||||||
call LoadFontsExtra
|
call LoadFontsExtra
|
||||||
|
|
||||||
@ -1096,14 +1096,14 @@ INCBIN "gfx/icon/mail2.2bpp"
|
|||||||
bit 7, a
|
bit 7, a
|
||||||
jr nz, .exit_mail
|
jr nz, .exit_mail
|
||||||
call .DoJumptable
|
call .DoJumptable
|
||||||
callba PlaySpriteAnimationsAndDelayFrame
|
farcall PlaySpriteAnimationsAndDelayFrame
|
||||||
call .Update
|
call .Update
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.exit_mail
|
.exit_mail
|
||||||
callab ClearSpriteAnims
|
callfar ClearSpriteAnims
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
xor a
|
xor a
|
||||||
ld [hSCX], a
|
ld [hSCX], a
|
||||||
|
@ -15,11 +15,11 @@ NewPokedexEntry: ; fb877
|
|||||||
ld [hSCX], a
|
ld [hSCX], a
|
||||||
xor a
|
xor a
|
||||||
ld [wPokedexStatus], a
|
ld [wPokedexStatus], a
|
||||||
callba _NewPokedexEntry
|
farcall _NewPokedexEntry
|
||||||
call WaitPressAorB_BlinkCursor
|
call WaitPressAorB_BlinkCursor
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wPokedexStatus], a
|
ld [wPokedexStatus], a
|
||||||
callba DisplayDexEntry
|
farcall DisplayDexEntry
|
||||||
call WaitPressAorB_BlinkCursor
|
call WaitPressAorB_BlinkCursor
|
||||||
pop af
|
pop af
|
||||||
ld [wPokedexStatus], a
|
ld [wPokedexStatus], a
|
||||||
@ -38,9 +38,9 @@ NewPokedexEntry: ; fb877
|
|||||||
call ClearTileMap
|
call ClearTileMap
|
||||||
call LoadFontsExtra
|
call LoadFontsExtra
|
||||||
call LoadStandardFont
|
call LoadStandardFont
|
||||||
callba Pokedex_PlaceFrontpicTopLeftCorner
|
farcall Pokedex_PlaceFrontpicTopLeftCorner
|
||||||
call WaitBGMap2
|
call WaitBGMap2
|
||||||
callba GetEnemyMonDVs
|
farcall GetEnemyMonDVs
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [TempMonDVs], a
|
ld [TempMonDVs], a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
|
@ -24,7 +24,7 @@ NPCTrade:: ; fcba8
|
|||||||
|
|
||||||
; Select givemon from party
|
; Select givemon from party
|
||||||
ld b, PARTYMENUACTION_GIVE_MON
|
ld b, PARTYMENUACTION_GIVE_MON
|
||||||
callba SelectTradeOrDayCareMon
|
farcall SelectTradeOrDayCareMon
|
||||||
ld a, TRADE_CANCEL
|
ld a, TRADE_CANCEL
|
||||||
jr c, .done
|
jr c, .done
|
||||||
|
|
||||||
@ -88,12 +88,12 @@ CheckTradeGender: ; fcc23
|
|||||||
cp 1
|
cp 1
|
||||||
jr z, .check_male
|
jr z, .check_male
|
||||||
|
|
||||||
callba GetGender
|
farcall GetGender
|
||||||
jr nz, .not_matching
|
jr nz, .not_matching
|
||||||
jr .matching
|
jr .matching
|
||||||
|
|
||||||
.check_male
|
.check_male
|
||||||
callba GetGender
|
farcall GetGender
|
||||||
jr z, .not_matching
|
jr z, .not_matching
|
||||||
|
|
||||||
.matching
|
.matching
|
||||||
@ -171,7 +171,7 @@ DoNPCTrade: ; fcc63
|
|||||||
call Trade_GetAttributeOfCurrentPartymon
|
call Trade_GetAttributeOfCurrentPartymon
|
||||||
ld b, h
|
ld b, h
|
||||||
ld c, l
|
ld c, l
|
||||||
callba GetCaughtGender
|
farcall GetCaughtGender
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [wPlayerTrademonCaughtData], a
|
ld [wPlayerTrademonCaughtData], a
|
||||||
|
|
||||||
@ -195,7 +195,7 @@ DoNPCTrade: ; fcc63
|
|||||||
xor a
|
xor a
|
||||||
ld [MonType], a
|
ld [MonType], a
|
||||||
ld [wPokemonWithdrawDepositParameter], a
|
ld [wPokemonWithdrawDepositParameter], a
|
||||||
callab RemoveMonFromPartyOrBox
|
callfar RemoveMonFromPartyOrBox
|
||||||
predef TryAddMonToParty
|
predef TryAddMonToParty
|
||||||
|
|
||||||
ld e, TRADE_DIALOG
|
ld e, TRADE_DIALOG
|
||||||
@ -206,7 +206,7 @@ DoNPCTrade: ; fcc63
|
|||||||
jr c, .incomplete
|
jr c, .incomplete
|
||||||
ld b, SET_FLAG
|
ld b, SET_FLAG
|
||||||
.incomplete
|
.incomplete
|
||||||
callba SetGiftPartyMonCaughtData
|
farcall SetGiftPartyMonCaughtData
|
||||||
|
|
||||||
ld e, TRADE_NICK
|
ld e, TRADE_NICK
|
||||||
call GetTradeAttribute
|
call GetTradeAttribute
|
||||||
@ -275,7 +275,7 @@ DoNPCTrade: ; fcc63
|
|||||||
ld a, [PartyCount]
|
ld a, [PartyCount]
|
||||||
dec a
|
dec a
|
||||||
ld [CurPartyMon], a
|
ld [CurPartyMon], a
|
||||||
callba ComputeNPCTrademonStats
|
farcall ComputeNPCTrademonStats
|
||||||
pop af
|
pop af
|
||||||
ld [CurPartyMon], a
|
ld [CurPartyMon], a
|
||||||
pop hl
|
pop hl
|
||||||
|
@ -86,7 +86,7 @@ GiveOddEgg: ; 1fb4b6
|
|||||||
ld [wMobileMonNicknamePointerBuffer], a
|
ld [wMobileMonNicknamePointerBuffer], a
|
||||||
ld a, wOddEggName / $100
|
ld a, wOddEggName / $100
|
||||||
ld [wMobileMonNicknamePointerBuffer + 1], a
|
ld [wMobileMonNicknamePointerBuffer + 1], a
|
||||||
callba AddMobileMonToParty
|
farcall AddMobileMonToParty
|
||||||
ret
|
ret
|
||||||
; 1fb546
|
; 1fb546
|
||||||
|
|
||||||
|
@ -178,14 +178,14 @@ MapCallbackSprites_LoadUsedSpritesGFX: ; 14209
|
|||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
ld c, EMOTE_SHADOW
|
ld c, EMOTE_SHADOW
|
||||||
callba LoadEmote
|
farcall LoadEmote
|
||||||
call GetMapPermission
|
call GetMapPermission
|
||||||
call CheckOutdoorMap
|
call CheckOutdoorMap
|
||||||
ld c, EMOTE_GRASS_RUSTLE
|
ld c, EMOTE_GRASS_RUSTLE
|
||||||
jr z, .outdoor
|
jr z, .outdoor
|
||||||
ld c, EMOTE_BOULDER_DUST
|
ld c, EMOTE_BOULDER_DUST
|
||||||
.outdoor
|
.outdoor
|
||||||
callba LoadEmote
|
farcall LoadEmote
|
||||||
ret
|
ret
|
||||||
; 14236
|
; 14236
|
||||||
|
|
||||||
@ -265,7 +265,7 @@ GetMonSprite: ; 14259
|
|||||||
and a
|
and a
|
||||||
jr z, .NoBreedmon
|
jr z, .NoBreedmon
|
||||||
|
|
||||||
callba LoadOverworldMonIcon
|
farcall LoadOverworldMonIcon
|
||||||
|
|
||||||
ld l, 1
|
ld l, 1
|
||||||
ld h, 0
|
ld h, 0
|
||||||
|
@ -118,12 +118,12 @@ Pack: ; 10000
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.TMHMPocketMenu: ; 100e8 (4:40e8)
|
.TMHMPocketMenu: ; 100e8 (4:40e8)
|
||||||
callba TMHMPocket
|
farcall TMHMPocket
|
||||||
ld b, $5
|
ld b, $5
|
||||||
ld c, $1
|
ld c, $1
|
||||||
call Pack_InterpretJoypad
|
call Pack_InterpretJoypad
|
||||||
ret c
|
ret c
|
||||||
callba _CheckTossableItem
|
farcall _CheckTossableItem
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeParamBuffer]
|
||||||
and a
|
and a
|
||||||
jr nz, .use_quit
|
jr nz, .use_quit
|
||||||
@ -192,15 +192,15 @@ Pack: ; 10000
|
|||||||
; 10159
|
; 10159
|
||||||
|
|
||||||
.UseItem: ; 10159
|
.UseItem: ; 10159
|
||||||
callba AskTeachTMHM
|
farcall AskTeachTMHM
|
||||||
ret c
|
ret c
|
||||||
callba ChooseMonToLearnTMHM
|
farcall ChooseMonToLearnTMHM
|
||||||
jr c, .declined
|
jr c, .declined
|
||||||
ld hl, Options
|
ld hl, Options
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
push af
|
push af
|
||||||
res NO_TEXT_SCROLL, [hl]
|
res NO_TEXT_SCROLL, [hl]
|
||||||
callba TeachTMHM
|
farcall TeachTMHM
|
||||||
pop af
|
pop af
|
||||||
ld [Options], a
|
ld [Options], a
|
||||||
.declined
|
.declined
|
||||||
@ -240,29 +240,29 @@ Pack: ; 10000
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.ItemBallsKey_LoadSubmenu: ; 101c5 (4:41c5)
|
.ItemBallsKey_LoadSubmenu: ; 101c5 (4:41c5)
|
||||||
callba _CheckTossableItem
|
farcall _CheckTossableItem
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeParamBuffer]
|
||||||
and a
|
and a
|
||||||
jr nz, .tossable
|
jr nz, .tossable
|
||||||
callba CheckSelectableItem
|
farcall CheckSelectableItem
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeParamBuffer]
|
||||||
and a
|
and a
|
||||||
jr nz, .selectable
|
jr nz, .selectable
|
||||||
callba CheckItemMenu
|
farcall CheckItemMenu
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeParamBuffer]
|
||||||
and a
|
and a
|
||||||
jr nz, .usable
|
jr nz, .usable
|
||||||
jr .unusable
|
jr .unusable
|
||||||
|
|
||||||
.selectable
|
.selectable
|
||||||
callba CheckItemMenu
|
farcall CheckItemMenu
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeParamBuffer]
|
||||||
and a
|
and a
|
||||||
jr nz, .selectable_usable
|
jr nz, .selectable_usable
|
||||||
jr .selectable_unusable
|
jr .selectable_unusable
|
||||||
|
|
||||||
.tossable
|
.tossable
|
||||||
callba CheckSelectableItem
|
farcall CheckSelectableItem
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeParamBuffer]
|
||||||
and a
|
and a
|
||||||
jr nz, .tossable_selectable
|
jr nz, .tossable_selectable
|
||||||
@ -455,7 +455,7 @@ Jumptable_GiveTossQuit: ; 1030b
|
|||||||
; 10311
|
; 10311
|
||||||
|
|
||||||
UseItem: ; 10311
|
UseItem: ; 10311
|
||||||
callba CheckItemMenu
|
farcall CheckItemMenu
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeParamBuffer]
|
||||||
ld hl, .dw
|
ld hl, .dw
|
||||||
rst JumpTable
|
rst JumpTable
|
||||||
@ -512,7 +512,7 @@ UseItem: ; 10311
|
|||||||
TossMenu: ; 10364
|
TossMenu: ; 10364
|
||||||
ld hl, Text_ThrowAwayHowMany
|
ld hl, Text_ThrowAwayHowMany
|
||||||
call Pack_PrintTextNoScroll
|
call Pack_PrintTextNoScroll
|
||||||
callba SelectQuantityToToss
|
farcall SelectQuantityToToss
|
||||||
push af
|
push af
|
||||||
call ExitMenu
|
call ExitMenu
|
||||||
pop af
|
pop af
|
||||||
@ -566,7 +566,7 @@ ResetPocketCursorPositions: ; 1039d
|
|||||||
; 103c2
|
; 103c2
|
||||||
|
|
||||||
RegisterItem: ; 103c2
|
RegisterItem: ; 103c2
|
||||||
callba CheckSelectableItem
|
farcall CheckSelectableItem
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeParamBuffer]
|
||||||
and a
|
and a
|
||||||
jr nz, .cant_register
|
jr nz, .cant_register
|
||||||
@ -606,16 +606,16 @@ GiveItem: ; 103fd
|
|||||||
ld a, PARTYMENUACTION_GIVE_ITEM
|
ld a, PARTYMENUACTION_GIVE_ITEM
|
||||||
ld [PartyMenuActionText], a
|
ld [PartyMenuActionText], a
|
||||||
call ClearBGPalettes
|
call ClearBGPalettes
|
||||||
callba LoadPartyMenuGFX
|
farcall LoadPartyMenuGFX
|
||||||
callba InitPartyMenuWithCancel
|
farcall InitPartyMenuWithCancel
|
||||||
callba InitPartyMenuGFX
|
farcall InitPartyMenuGFX
|
||||||
.loop
|
.loop
|
||||||
callba WritePartyMenuTilemap
|
farcall WritePartyMenuTilemap
|
||||||
callba PrintPartyMenuText
|
farcall PrintPartyMenuText
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
call SetPalettes
|
call SetPalettes
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
callba PartyMenuSelect
|
farcall PartyMenuSelect
|
||||||
jr c, .finish
|
jr c, .finish
|
||||||
ld a, [CurPartySpecies]
|
ld a, [CurPartySpecies]
|
||||||
cp EGG
|
cp EGG
|
||||||
@ -786,7 +786,7 @@ BattlePack: ; 10493
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.TMHMPocketMenu: ; 10581 (4:4581)
|
.TMHMPocketMenu: ; 10581 (4:4581)
|
||||||
callba TMHMPocket
|
farcall TMHMPocket
|
||||||
ld b, $5
|
ld b, $5
|
||||||
ld c, $1
|
ld c, $1
|
||||||
call Pack_InterpretJoypad
|
call Pack_InterpretJoypad
|
||||||
@ -824,7 +824,7 @@ BattlePack: ; 10493
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
ItemSubmenu: ; 105d3 (4:45d3)
|
ItemSubmenu: ; 105d3 (4:45d3)
|
||||||
callba CheckItemContext
|
farcall CheckItemContext
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeParamBuffer]
|
||||||
TMHMSubmenu: ; 105dc (4:45dc)
|
TMHMSubmenu: ; 105dc (4:45dc)
|
||||||
and a
|
and a
|
||||||
@ -890,7 +890,7 @@ TMHMSubmenu: ; 105dc (4:45dc)
|
|||||||
; 10629
|
; 10629
|
||||||
|
|
||||||
.Use: ; 10629
|
.Use: ; 10629
|
||||||
callba CheckItemContext
|
farcall CheckItemContext
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeParamBuffer]
|
||||||
ld hl, .ItemFunctionJumptable
|
ld hl, .ItemFunctionJumptable
|
||||||
rst JumpTable
|
rst JumpTable
|
||||||
@ -1043,7 +1043,7 @@ DepositSellPack: ; 106be
|
|||||||
ld a, 3
|
ld a, 3
|
||||||
call InitPocket
|
call InitPocket
|
||||||
call WaitBGMap_DrawPackGFX
|
call WaitBGMap_DrawPackGFX
|
||||||
callba TMHMPocket
|
farcall TMHMPocket
|
||||||
ld a, [CurItem]
|
ld a, [CurItem]
|
||||||
ld [CurItem], a
|
ld [CurItem], a
|
||||||
ret
|
ret
|
||||||
@ -1130,7 +1130,7 @@ TutorialPack: ; 107bb
|
|||||||
ld a, [InputType]
|
ld a, [InputType]
|
||||||
or a
|
or a
|
||||||
jr z, .loop
|
jr z, .loop
|
||||||
callba _DudeAutoInput_RightA
|
farcall _DudeAutoInput_RightA
|
||||||
.loop
|
.loop
|
||||||
call .RunJumptable
|
call .RunJumptable
|
||||||
call DepositSellTutorial_InterpretJoypad
|
call DepositSellTutorial_InterpretJoypad
|
||||||
@ -1207,7 +1207,7 @@ TutorialPack: ; 107bb
|
|||||||
ld a, 3
|
ld a, 3
|
||||||
call InitPocket
|
call InitPocket
|
||||||
call WaitBGMap_DrawPackGFX
|
call WaitBGMap_DrawPackGFX
|
||||||
callba TMHMPocket
|
farcall TMHMPocket
|
||||||
ld a, [CurItem]
|
ld a, [CurItem]
|
||||||
ld [CurItem], a
|
ld [CurItem], a
|
||||||
ret
|
ret
|
||||||
@ -1310,7 +1310,7 @@ DrawPackGFX: ; 1089d
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.female
|
.female
|
||||||
callba DrawKrisPackGFX
|
farcall DrawKrisPackGFX
|
||||||
ret
|
ret
|
||||||
; 108cc
|
; 108cc
|
||||||
|
|
||||||
@ -1377,7 +1377,7 @@ Pack_InterpretJoypad: ; 108d4 (4:48d4)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.select
|
.select
|
||||||
callba SwitchItemsInBag
|
farcall SwitchItemsInBag
|
||||||
ld hl, Text_MoveItemWhere
|
ld hl, Text_MoveItemWhere
|
||||||
call Pack_PrintTextNoScroll
|
call Pack_PrintTextNoScroll
|
||||||
scf
|
scf
|
||||||
@ -1394,7 +1394,7 @@ Pack_InterpretJoypad: ; 108d4 (4:48d4)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.place_insert
|
.place_insert
|
||||||
callba SwitchItemsInBag
|
farcall SwitchItemsInBag
|
||||||
ld de, SFX_SWITCH_POKEMON
|
ld de, SFX_SWITCH_POKEMON
|
||||||
call WaitPlaySFX
|
call WaitPlaySFX
|
||||||
ld de, SFX_SWITCH_POKEMON
|
ld de, SFX_SWITCH_POKEMON
|
||||||
|
@ -40,8 +40,8 @@ InitPartyMenuLayout: ; 5003f
|
|||||||
|
|
||||||
LoadPartyMenuGFX: ; 5004f
|
LoadPartyMenuGFX: ; 5004f
|
||||||
call LoadFontsBattleExtra
|
call LoadFontsBattleExtra
|
||||||
callab InitPartyMenuPalettes ; engine/color.asm
|
callfar InitPartyMenuPalettes ; engine/color.asm
|
||||||
callab ClearSpriteAnims2
|
callfar ClearSpriteAnims2
|
||||||
ret
|
ret
|
||||||
; 5005f
|
; 5005f
|
||||||
|
|
||||||
@ -662,7 +662,7 @@ InitPartyMenuGFX: ; 503e0
|
|||||||
pop bc
|
pop bc
|
||||||
dec c
|
dec c
|
||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
callab PlaySpriteAnimations
|
callfar PlaySpriteAnimations
|
||||||
ret
|
ret
|
||||||
; 50405
|
; 50405
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ CheckPhoneCall:: ; 90074 (24:4074)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.timecheck ; 900a6 (24:40a6)
|
.timecheck ; 900a6 (24:40a6)
|
||||||
callba CheckReceiveCallTimer
|
farcall CheckReceiveCallTimer
|
||||||
ret
|
ret
|
||||||
|
|
||||||
CheckPhoneContactTimeOfDay: ; 900ad (24:40ad)
|
CheckPhoneContactTimeOfDay: ; 900ad (24:40ad)
|
||||||
@ -163,7 +163,7 @@ CheckPhoneContactTimeOfDay: ; 900ad (24:40ad)
|
|||||||
push de
|
push de
|
||||||
push af
|
push af
|
||||||
|
|
||||||
callba CheckTime
|
farcall CheckTime
|
||||||
pop af
|
pop af
|
||||||
and MORN | DAY | NITE
|
and MORN | DAY | NITE
|
||||||
and c
|
and c
|
||||||
@ -201,7 +201,7 @@ ChooseRandomCaller: ; 900bf (24:40bf)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
GetAvailableCallers: ; 900de (24:40de)
|
GetAvailableCallers: ; 900de (24:40de)
|
||||||
callba CheckTime
|
farcall CheckTime
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [EngineBuffer1], a
|
ld [EngineBuffer1], a
|
||||||
ld hl, EngineBuffer3
|
ld hl, EngineBuffer3
|
||||||
@ -471,7 +471,7 @@ UnknownScript_0x90261: ; 0x90261
|
|||||||
RingTwice_StartCall: ; 9026f
|
RingTwice_StartCall: ; 9026f
|
||||||
call .Ring
|
call .Ring
|
||||||
call .Ring
|
call .Ring
|
||||||
callba TrainerRankings_PhoneCalls
|
farcall TrainerRankings_PhoneCalls
|
||||||
ret
|
ret
|
||||||
; 9027c
|
; 9027c
|
||||||
|
|
||||||
@ -500,7 +500,7 @@ PhoneCall:: ; 9029a
|
|||||||
ld [PhoneCaller + 1], a
|
ld [PhoneCaller + 1], a
|
||||||
call Phone_FirstOfTwoRings
|
call Phone_FirstOfTwoRings
|
||||||
call Phone_FirstOfTwoRings
|
call Phone_FirstOfTwoRings
|
||||||
callba TrainerRankings_PhoneCalls
|
farcall TrainerRankings_PhoneCalls
|
||||||
ret
|
ret
|
||||||
; 902b3
|
; 902b3
|
||||||
|
|
||||||
@ -599,7 +599,7 @@ Phone_StartRinging: ; 9033f
|
|||||||
call PlaySFX
|
call PlaySFX
|
||||||
call Phone_CallerTextbox
|
call Phone_CallerTextbox
|
||||||
call UpdateSprites
|
call UpdateSprites
|
||||||
callba PhoneRing_LoadEDTile
|
farcall PhoneRing_LoadEDTile
|
||||||
ret
|
ret
|
||||||
; 90355
|
; 90355
|
||||||
|
|
||||||
@ -609,7 +609,7 @@ HangUp_Wait20Frames: ; 90355
|
|||||||
Phone_Wait20Frames
|
Phone_Wait20Frames
|
||||||
ld c, 20
|
ld c, 20
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
callba PhoneRing_LoadEDTile
|
farcall PhoneRing_LoadEDTile
|
||||||
ret
|
ret
|
||||||
; 90363
|
; 90363
|
||||||
|
|
||||||
@ -725,7 +725,7 @@ NonTrainerCallerNames: ; 903d6
|
|||||||
Phone_GetTrainerName: ; 90423 (24:4423)
|
Phone_GetTrainerName: ; 90423 (24:4423)
|
||||||
push hl
|
push hl
|
||||||
push bc
|
push bc
|
||||||
callba GetTrainerName
|
farcall GetTrainerName
|
||||||
pop bc
|
pop bc
|
||||||
pop hl
|
pop hl
|
||||||
ret
|
ret
|
||||||
@ -733,7 +733,7 @@ Phone_GetTrainerName: ; 90423 (24:4423)
|
|||||||
Phone_GetTrainerClassName: ; 9042e (24:442e)
|
Phone_GetTrainerClassName: ; 9042e (24:442e)
|
||||||
push hl
|
push hl
|
||||||
push bc
|
push bc
|
||||||
callba GetTrainerClassName
|
farcall GetTrainerClassName
|
||||||
pop bc
|
pop bc
|
||||||
pop hl
|
pop hl
|
||||||
ret
|
ret
|
||||||
@ -754,7 +754,7 @@ GetCallerLocation: ; 90439
|
|||||||
push bc
|
push bc
|
||||||
call GetWorldMapLocation
|
call GetWorldMapLocation
|
||||||
ld e, a
|
ld e, a
|
||||||
callba GetLandmarkName
|
farcall GetLandmarkName
|
||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
ret
|
ret
|
||||||
|
@ -23,7 +23,7 @@ PlaySlowCry: ; fb841
|
|||||||
ld [CryLength], a
|
ld [CryLength], a
|
||||||
ld a, h
|
ld a, h
|
||||||
ld [CryLength + 1], a
|
ld [CryLength + 1], a
|
||||||
callba _PlayCryHeader
|
farcall _PlayCryHeader
|
||||||
call WaitSFX
|
call WaitSFX
|
||||||
|
|
||||||
.done
|
.done
|
||||||
|
@ -653,7 +653,7 @@ DoPlayerMovement:: ; 80000
|
|||||||
ld e, a
|
ld e, a
|
||||||
; Find an object struct with coordinates equal to d,e
|
; Find an object struct with coordinates equal to d,e
|
||||||
ld bc, ObjectStructs ; redundant
|
ld bc, ObjectStructs ; redundant
|
||||||
callba IsNPCAtCoord
|
farcall IsNPCAtCoord
|
||||||
jr nc, .is_npc
|
jr nc, .is_npc
|
||||||
call .CheckStrengthBoulder
|
call .CheckStrengthBoulder
|
||||||
jr c, .no_bump
|
jr c, .no_bump
|
||||||
|
@ -77,7 +77,7 @@ HandlePlayerStep: ; d4e5 (3:54e5)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.mobile ; d509 (3:5509)
|
.mobile ; d509 (3:5509)
|
||||||
callba TrainerRankings_StepCount
|
farcall TrainerRankings_StepCount
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.fail2 ; d510 (3:5510)
|
.fail2 ; d510 (3:5510)
|
||||||
|
@ -105,7 +105,7 @@ BillsPC: ; 15668
|
|||||||
call PC_PlayChoosePCSound
|
call PC_PlayChoosePCSound
|
||||||
ld hl, PokecenterPCText_AccessedBillsPC
|
ld hl, PokecenterPCText_AccessedBillsPC
|
||||||
call PC_DisplayText
|
call PC_DisplayText
|
||||||
callba _BillsPC
|
farcall _BillsPC
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
; 15679 (5:5679)
|
; 15679 (5:5679)
|
||||||
@ -124,7 +124,7 @@ OaksPC: ; 15689
|
|||||||
call PC_PlayChoosePCSound
|
call PC_PlayChoosePCSound
|
||||||
ld hl, PokecenterPCText_AccessedOaksPC
|
ld hl, PokecenterPCText_AccessedOaksPC
|
||||||
call PC_DisplayText
|
call PC_DisplayText
|
||||||
callba ProfOaksPC
|
farcall ProfOaksPC
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
; 1569a
|
; 1569a
|
||||||
@ -132,7 +132,7 @@ OaksPC: ; 15689
|
|||||||
HallOfFamePC: ; 1569a
|
HallOfFamePC: ; 1569a
|
||||||
call PC_PlayChoosePCSound
|
call PC_PlayChoosePCSound
|
||||||
call FadeToMenu
|
call FadeToMenu
|
||||||
callba _HallOfFamePC
|
farcall _HallOfFamePC
|
||||||
call CloseSubmenu
|
call CloseSubmenu
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
@ -308,7 +308,7 @@ UnknownText_0x157cc: ; 0x157cc
|
|||||||
|
|
||||||
KrisWithdrawItemMenu: ; 0x157d1
|
KrisWithdrawItemMenu: ; 0x157d1
|
||||||
call LoadStandardMenuDataHeader
|
call LoadStandardMenuDataHeader
|
||||||
callba ClearPCItemScreen
|
farcall ClearPCItemScreen
|
||||||
.loop
|
.loop
|
||||||
call PCItemsJoypad
|
call PCItemsJoypad
|
||||||
jr c, .quit
|
jr c, .quit
|
||||||
@ -322,7 +322,7 @@ KrisWithdrawItemMenu: ; 0x157d1
|
|||||||
|
|
||||||
.Submenu:
|
.Submenu:
|
||||||
; check if the item has a quantity
|
; check if the item has a quantity
|
||||||
callba _CheckTossableItem
|
farcall _CheckTossableItem
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeParamBuffer]
|
||||||
and a
|
and a
|
||||||
jr z, .askquantity
|
jr z, .askquantity
|
||||||
@ -335,7 +335,7 @@ KrisWithdrawItemMenu: ; 0x157d1
|
|||||||
.askquantity
|
.askquantity
|
||||||
ld hl, .HowManyText
|
ld hl, .HowManyText
|
||||||
call MenuTextBox
|
call MenuTextBox
|
||||||
callba SelectQuantityToToss
|
farcall SelectQuantityToToss
|
||||||
call ExitMenu
|
call ExitMenu
|
||||||
call ExitMenu
|
call ExitMenu
|
||||||
jr c, .done
|
jr c, .done
|
||||||
@ -384,12 +384,12 @@ KrisWithdrawItemMenu: ; 0x157d1
|
|||||||
|
|
||||||
KrisTossItemMenu: ; 0x1585f
|
KrisTossItemMenu: ; 0x1585f
|
||||||
call LoadStandardMenuDataHeader
|
call LoadStandardMenuDataHeader
|
||||||
callba ClearPCItemScreen
|
farcall ClearPCItemScreen
|
||||||
.loop
|
.loop
|
||||||
call PCItemsJoypad
|
call PCItemsJoypad
|
||||||
jr c, .quit
|
jr c, .quit
|
||||||
ld de, PCItems
|
ld de, PCItems
|
||||||
callba TossItemFromPC
|
farcall TossItemFromPC
|
||||||
jr .loop
|
jr .loop
|
||||||
|
|
||||||
.quit
|
.quit
|
||||||
@ -399,7 +399,7 @@ KrisTossItemMenu: ; 0x1585f
|
|||||||
; 0x1587d
|
; 0x1587d
|
||||||
|
|
||||||
KrisDecorationMenu: ; 0x1587d
|
KrisDecorationMenu: ; 0x1587d
|
||||||
callba _KrisDecorationMenu
|
farcall _KrisDecorationMenu
|
||||||
ld a, c
|
ld a, c
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
@ -418,14 +418,14 @@ KrisDepositItemMenu: ; 0x1588b
|
|||||||
jr c, .nope
|
jr c, .nope
|
||||||
call DisableSpriteUpdates
|
call DisableSpriteUpdates
|
||||||
call LoadStandardMenuDataHeader
|
call LoadStandardMenuDataHeader
|
||||||
callba DepositSellInitPackBuffers
|
farcall DepositSellInitPackBuffers
|
||||||
.loop
|
.loop
|
||||||
callba DepositSellPack
|
farcall DepositSellPack
|
||||||
ld a, [wcf66]
|
ld a, [wcf66]
|
||||||
and a
|
and a
|
||||||
jr z, .close
|
jr z, .close
|
||||||
call .TryDepositItem
|
call .TryDepositItem
|
||||||
callba CheckRegisteredItem
|
farcall CheckRegisteredItem
|
||||||
jr .loop
|
jr .loop
|
||||||
|
|
||||||
.close
|
.close
|
||||||
@ -436,7 +436,7 @@ KrisDepositItemMenu: ; 0x1588b
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.CheckItemsInBag:
|
.CheckItemsInBag:
|
||||||
callba HasNoItems
|
farcall HasNoItems
|
||||||
ret nc
|
ret nc
|
||||||
ld hl, .NoItemsInBag
|
ld hl, .NoItemsInBag
|
||||||
call MenuTextBoxBackup
|
call MenuTextBoxBackup
|
||||||
@ -453,7 +453,7 @@ KrisDepositItemMenu: ; 0x1588b
|
|||||||
push af
|
push af
|
||||||
ld a, $0
|
ld a, $0
|
||||||
ld [wSpriteUpdatesEnabled], a
|
ld [wSpriteUpdatesEnabled], a
|
||||||
callba CheckItemMenu
|
farcall CheckItemMenu
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeParamBuffer]
|
||||||
ld hl, .dw
|
ld hl, .dw
|
||||||
rst JumpTable
|
rst JumpTable
|
||||||
@ -486,7 +486,7 @@ KrisDepositItemMenu: ; 0x1588b
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.DepositItem_:
|
.DepositItem_:
|
||||||
callba _CheckTossableItem
|
farcall _CheckTossableItem
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeParamBuffer]
|
||||||
and a
|
and a
|
||||||
jr z, .AskQuantity
|
jr z, .AskQuantity
|
||||||
@ -497,7 +497,7 @@ KrisDepositItemMenu: ; 0x1588b
|
|||||||
.AskQuantity:
|
.AskQuantity:
|
||||||
ld hl, .HowManyText
|
ld hl, .HowManyText
|
||||||
call MenuTextBox
|
call MenuTextBox
|
||||||
callba SelectQuantityToToss
|
farcall SelectQuantityToToss
|
||||||
push af
|
push af
|
||||||
call ExitMenu
|
call ExitMenu
|
||||||
call ExitMenu
|
call ExitMenu
|
||||||
@ -545,7 +545,7 @@ KrisDepositItemMenu: ; 0x1588b
|
|||||||
db "@"
|
db "@"
|
||||||
|
|
||||||
KrisMailBoxMenu: ; 0x1597d
|
KrisMailBoxMenu: ; 0x1597d
|
||||||
callba _KrisMailBoxMenu
|
farcall _KrisMailBoxMenu
|
||||||
xor a
|
xor a
|
||||||
ret
|
ret
|
||||||
; 0x15985
|
; 0x15985
|
||||||
@ -605,12 +605,12 @@ PCItemsJoypad: ; 0x15985
|
|||||||
.a_select_2
|
.a_select_2
|
||||||
call PC_PlaySwapItemsSound
|
call PC_PlaySwapItemsSound
|
||||||
.select_1
|
.select_1
|
||||||
callba SwitchItemsInBag
|
farcall SwitchItemsInBag
|
||||||
.next
|
.next
|
||||||
jp .loop
|
jp .loop
|
||||||
|
|
||||||
.a_1
|
.a_1
|
||||||
callba ScrollingMenu_ClearLeftColumn
|
farcall ScrollingMenu_ClearLeftColumn
|
||||||
call PlaceHollowCursor
|
call PlaceHollowCursor
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
|
@ -98,7 +98,7 @@ InitPokedex: ; 40063
|
|||||||
call Pokedex_OrderMonsByMode
|
call Pokedex_OrderMonsByMode
|
||||||
call Pokedex_InitCursorPosition
|
call Pokedex_InitCursorPosition
|
||||||
call Pokedex_GetLandmark
|
call Pokedex_GetLandmark
|
||||||
callba DrawDexEntryScreenRightEdge
|
farcall DrawDexEntryScreenRightEdge
|
||||||
call Pokedex_ResetBGMapMode
|
call Pokedex_ResetBGMapMode
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -220,7 +220,7 @@ Pokedex_InitMainScreen: ; 4013c (10:413c)
|
|||||||
hlcoord 0, 0, AttrMap
|
hlcoord 0, 0, AttrMap
|
||||||
ld bc, SCREEN_HEIGHT * SCREEN_WIDTH
|
ld bc, SCREEN_HEIGHT * SCREEN_WIDTH
|
||||||
call ByteFill
|
call ByteFill
|
||||||
callba DrawPokedexListWindow
|
farcall DrawPokedexListWindow
|
||||||
hlcoord 0, 17
|
hlcoord 0, 17
|
||||||
ld de, String_START_SEARCH
|
ld de, String_START_SEARCH
|
||||||
call Pokedex_PlaceString
|
call Pokedex_PlaceString
|
||||||
@ -250,7 +250,7 @@ Pokedex_InitMainScreen: ; 4013c (10:413c)
|
|||||||
ld a, SCGB_POKEDEX
|
ld a, SCGB_POKEDEX
|
||||||
call Pokedex_GetSGBLayout
|
call Pokedex_GetSGBLayout
|
||||||
call Pokedex_UpdateCursorOAM
|
call Pokedex_UpdateCursorOAM
|
||||||
callba DrawPokedexListWindow
|
farcall DrawPokedexListWindow
|
||||||
hlcoord 0, 17
|
hlcoord 0, 17
|
||||||
ld de, String_START_SEARCH
|
ld de, String_START_SEARCH
|
||||||
call Pokedex_PlaceString
|
call Pokedex_PlaceString
|
||||||
@ -333,7 +333,7 @@ Pokedex_InitDexEntryScreen: ; 40217 (10:4217)
|
|||||||
call Pokedex_InitArrowCursor
|
call Pokedex_InitArrowCursor
|
||||||
call Pokedex_GetSelectedMon
|
call Pokedex_GetSelectedMon
|
||||||
ld [wLastDexEntry], a
|
ld [wLastDexEntry], a
|
||||||
callba DisplayDexEntry
|
farcall DisplayDexEntry
|
||||||
call Pokedex_DrawFootprint
|
call Pokedex_DrawFootprint
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
ld a, $a7
|
ld a, $a7
|
||||||
@ -387,7 +387,7 @@ Pokedex_Page: ; 40292
|
|||||||
ld [wPokedexStatus], a
|
ld [wPokedexStatus], a
|
||||||
call Pokedex_GetSelectedMon
|
call Pokedex_GetSelectedMon
|
||||||
ld [wLastDexEntry], a
|
ld [wLastDexEntry], a
|
||||||
callba DisplayDexEntry
|
farcall DisplayDexEntry
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -403,7 +403,7 @@ Pokedex_ReinitDexEntryScreen: ; 402aa (10:42aa)
|
|||||||
call Pokedex_LoadCurrentFootprint
|
call Pokedex_LoadCurrentFootprint
|
||||||
call Pokedex_GetSelectedMon
|
call Pokedex_GetSelectedMon
|
||||||
ld [wLastDexEntry], a
|
ld [wLastDexEntry], a
|
||||||
callba DisplayDexEntry
|
farcall DisplayDexEntry
|
||||||
call Pokedex_DrawFootprint
|
call Pokedex_DrawFootprint
|
||||||
call Pokedex_LoadSelectedMonTiles
|
call Pokedex_LoadSelectedMonTiles
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
@ -481,7 +481,7 @@ DexEntryScreen_MenuActionJumptable: ; 402f2
|
|||||||
push af
|
push af
|
||||||
ld a, [wJumptableIndex]
|
ld a, [wJumptableIndex]
|
||||||
push af
|
push af
|
||||||
callba PrintDexEntry
|
farcall PrintDexEntry
|
||||||
pop af
|
pop af
|
||||||
ld [wJumptableIndex], a
|
ld [wJumptableIndex], a
|
||||||
pop af
|
pop af
|
||||||
@ -502,7 +502,7 @@ DexEntryScreen_MenuActionJumptable: ; 402f2
|
|||||||
Pokedex_RedisplayDexEntry: ; 4038d
|
Pokedex_RedisplayDexEntry: ; 4038d
|
||||||
call Pokedex_DrawDexEntryScreenBG
|
call Pokedex_DrawDexEntryScreenBG
|
||||||
call Pokedex_GetSelectedMon
|
call Pokedex_GetSelectedMon
|
||||||
callba DisplayDexEntry
|
farcall DisplayDexEntry
|
||||||
call Pokedex_DrawFootprint
|
call Pokedex_DrawFootprint
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -622,7 +622,7 @@ Pokedex_InitSearchScreen: ; 40443 (10:4443)
|
|||||||
call Pokedex_PlaceSearchScreenTypeStrings
|
call Pokedex_PlaceSearchScreenTypeStrings
|
||||||
xor a
|
xor a
|
||||||
ld [wDexSearchSlowpokeFrame], a
|
ld [wDexSearchSlowpokeFrame], a
|
||||||
callba DoDexSearchSlowpokeFrame
|
farcall DoDexSearchSlowpokeFrame
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
ld a, SCGB_POKEDEX_SEARCH_OPTION
|
ld a, SCGB_POKEDEX_SEARCH_OPTION
|
||||||
call Pokedex_GetSGBLayout
|
call Pokedex_GetSGBLayout
|
||||||
@ -675,7 +675,7 @@ Pokedex_UpdateSearchScreen: ; 40471 (10:4471)
|
|||||||
|
|
||||||
.MenuAction_BeginSearch: ; 404b7
|
.MenuAction_BeginSearch: ; 404b7
|
||||||
call Pokedex_SearchForMons
|
call Pokedex_SearchForMons
|
||||||
callba AnimateDexSearchSlowpoke
|
farcall AnimateDexSearchSlowpoke
|
||||||
ld a, [wDexSearchResultCount]
|
ld a, [wDexSearchResultCount]
|
||||||
and a
|
and a
|
||||||
jr nz, .show_search_results
|
jr nz, .show_search_results
|
||||||
@ -722,7 +722,7 @@ Pokedex_InitSearchResultsScreen: ; 4050a (10:450a)
|
|||||||
call ByteFill
|
call ByteFill
|
||||||
call Pokedex_SetBGMapMode4
|
call Pokedex_SetBGMapMode4
|
||||||
call Pokedex_ResetBGMapMode
|
call Pokedex_ResetBGMapMode
|
||||||
callba DrawPokedexSearchResultsWindow
|
farcall DrawPokedexSearchResultsWindow
|
||||||
call Pokedex_PlaceSearchResultsTypeStrings
|
call Pokedex_PlaceSearchResultsTypeStrings
|
||||||
ld a, 4
|
ld a, 4
|
||||||
ld [wDexListingHeight], a
|
ld [wDexListingHeight], a
|
||||||
@ -738,7 +738,7 @@ Pokedex_InitSearchResultsScreen: ; 4050a (10:450a)
|
|||||||
ld [hWY], a
|
ld [hWY], a
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
call Pokedex_ResetBGMapMode
|
call Pokedex_ResetBGMapMode
|
||||||
callba DrawPokedexSearchResultsWindow
|
farcall DrawPokedexSearchResultsWindow
|
||||||
call Pokedex_PlaceSearchResultsTypeStrings
|
call Pokedex_PlaceSearchResultsTypeStrings
|
||||||
call Pokedex_UpdateSearchResultsCursorOAM
|
call Pokedex_UpdateSearchResultsCursorOAM
|
||||||
ld a, $ff
|
ld a, $ff
|
||||||
@ -801,7 +801,7 @@ Pokedex_InitUnownMode: ; 405bd (10:45bd)
|
|||||||
ld [wDexCurrentUnownIndex], a
|
ld [wDexCurrentUnownIndex], a
|
||||||
call Pokedex_LoadUnownFrontpicTiles
|
call Pokedex_LoadUnownFrontpicTiles
|
||||||
call Pokedex_UnownModePlaceCursor
|
call Pokedex_UnownModePlaceCursor
|
||||||
callba PrintUnownWord
|
farcall PrintUnownWord
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
ld a, SCGB_POKEDEX_UNOWN_MODE
|
ld a, SCGB_POKEDEX_UNOWN_MODE
|
||||||
call Pokedex_GetSGBLayout
|
call Pokedex_GetSGBLayout
|
||||||
@ -823,7 +823,7 @@ Pokedex_UpdateUnownMode: ; 405df (10:45df)
|
|||||||
call DelayFrame
|
call DelayFrame
|
||||||
call Pokedex_CheckSGB
|
call Pokedex_CheckSGB
|
||||||
jr nz, .decompress
|
jr nz, .decompress
|
||||||
callba LoadSGBPokedexGFX2
|
farcall LoadSGBPokedexGFX2
|
||||||
jr .done
|
jr .done
|
||||||
|
|
||||||
.decompress
|
.decompress
|
||||||
@ -873,7 +873,7 @@ Pokedex_UnownModeHandleDPadInput: ; 40610 (10:4610)
|
|||||||
call Pokedex_UnownModeEraseCursor
|
call Pokedex_UnownModeEraseCursor
|
||||||
call Pokedex_LoadUnownFrontpicTiles
|
call Pokedex_LoadUnownFrontpicTiles
|
||||||
call Pokedex_UnownModePlaceCursor
|
call Pokedex_UnownModePlaceCursor
|
||||||
callba PrintUnownWord
|
farcall PrintUnownWord
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
@ -2409,7 +2409,7 @@ Pokedex_LoadSelectedMonTiles: ; 4143b
|
|||||||
.QuestionMark:
|
.QuestionMark:
|
||||||
ld a, BANK(sScratch)
|
ld a, BANK(sScratch)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
callba LoadQuestionMarkPic
|
farcall LoadQuestionMarkPic
|
||||||
ld hl, VTiles2
|
ld hl, VTiles2
|
||||||
ld de, sScratch
|
ld de, sScratch
|
||||||
ld c, 7 * 7
|
ld c, 7 * 7
|
||||||
@ -2477,7 +2477,7 @@ Pokedex_LoadGFX: ; 414b7
|
|||||||
call Pokedex_InvertTiles
|
call Pokedex_InvertTiles
|
||||||
call Pokedex_CheckSGB
|
call Pokedex_CheckSGB
|
||||||
jr nz, .LoadPokedexLZ
|
jr nz, .LoadPokedexLZ
|
||||||
callba LoadSGBPokedexGFX
|
farcall LoadSGBPokedexGFX
|
||||||
jr .LoadPokedexSlowpokeLZ
|
jr .LoadPokedexSlowpokeLZ
|
||||||
|
|
||||||
.LoadPokedexLZ:
|
.LoadPokedexLZ:
|
||||||
@ -2564,7 +2564,7 @@ Pokedex_LoadUnownFrontpicTiles: ; 41a58 (10:5a58)
|
|||||||
_NewPokedexEntry: ; 41a7f
|
_NewPokedexEntry: ; 41a7f
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
callba DrawDexEntryScreenRightEdge
|
farcall DrawDexEntryScreenRightEdge
|
||||||
call Pokedex_ResetBGMapMode
|
call Pokedex_ResetBGMapMode
|
||||||
call DisableLCD
|
call DisableLCD
|
||||||
call LoadStandardFont
|
call LoadStandardFont
|
||||||
@ -2581,7 +2581,7 @@ _NewPokedexEntry: ; 41a7f
|
|||||||
ld bc, 19
|
ld bc, 19
|
||||||
ld a, " "
|
ld a, " "
|
||||||
call ByteFill
|
call ByteFill
|
||||||
callba DisplayDexEntry
|
farcall DisplayDexEntry
|
||||||
call EnableLCD
|
call EnableLCD
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
call GetBaseData
|
call GetBaseData
|
||||||
|
@ -20,7 +20,7 @@ PokeGear: ; 90b8d (24:4b8d)
|
|||||||
bit 7, a
|
bit 7, a
|
||||||
jr nz, .done
|
jr nz, .done
|
||||||
call PokegearJumptable
|
call PokegearJumptable
|
||||||
callba PlaySpriteAnimations
|
farcall PlaySpriteAnimations
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
jr .loop
|
jr .loop
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ PokeGear: ; 90b8d (24:4b8d)
|
|||||||
ld a, $7
|
ld a, $7
|
||||||
ld [hWX], a
|
ld [hWX], a
|
||||||
call Pokegear_LoadGFX
|
call Pokegear_LoadGFX
|
||||||
callba ClearSpriteAnims
|
farcall ClearSpriteAnims
|
||||||
call InitPokegearModeIndicatorArrow
|
call InitPokegearModeIndicatorArrow
|
||||||
ld a, 8
|
ld a, 8
|
||||||
call SkipMusic
|
call SkipMusic
|
||||||
@ -106,7 +106,7 @@ Pokegear_LoadGFX: ; 90c4e
|
|||||||
call GetWorldMapLocation
|
call GetWorldMapLocation
|
||||||
cp FAST_SHIP
|
cp FAST_SHIP
|
||||||
jr z, .ssaqua
|
jr z, .ssaqua
|
||||||
callba GetPlayerIcon
|
farcall GetPlayerIcon
|
||||||
push de
|
push de
|
||||||
ld h, d
|
ld h, d
|
||||||
ld l, e
|
ld l, e
|
||||||
@ -239,7 +239,7 @@ InitPokegearTilemap: ; 90da8 (24:4da8)
|
|||||||
|
|
||||||
.return_from_jumptable
|
.return_from_jumptable
|
||||||
call Pokegear_FinishTilemap
|
call Pokegear_FinishTilemap
|
||||||
callba TownMapPals
|
farcall TownMapPals
|
||||||
ld a, [wcf65]
|
ld a, [wcf65]
|
||||||
and a
|
and a
|
||||||
jr nz, .kanto_0
|
jr nz, .kanto_0
|
||||||
@ -319,7 +319,7 @@ InitPokegearTilemap: ; 90da8 (24:4da8)
|
|||||||
.kanto
|
.kanto
|
||||||
ld e, 1
|
ld e, 1
|
||||||
.ok
|
.ok
|
||||||
callba PokegearMap
|
farcall PokegearMap
|
||||||
ld a, $7
|
ld a, $7
|
||||||
ld bc, $12
|
ld bc, $12
|
||||||
hlcoord 1, 2
|
hlcoord 1, 2
|
||||||
@ -513,7 +513,7 @@ Pokegear_UpdateClock: ; 90f86 (24:4f86)
|
|||||||
ld a, [hMinutes]
|
ld a, [hMinutes]
|
||||||
ld c, a
|
ld c, a
|
||||||
decoord 6, 8
|
decoord 6, 8
|
||||||
callba PrintHoursMins
|
farcall PrintHoursMins
|
||||||
ld hl, .DayText
|
ld hl, .DayText
|
||||||
bccoord 6, 6
|
bccoord 6, 6
|
||||||
call PlaceHLTextAtBC
|
call PlaceHLTextAtBC
|
||||||
@ -670,7 +670,7 @@ PokegearMap_InitPlayerIcon: ; 9106a
|
|||||||
pop af
|
pop af
|
||||||
ld e, a
|
ld e, a
|
||||||
push bc
|
push bc
|
||||||
callba GetLandmarkCoords
|
farcall GetLandmarkCoords
|
||||||
pop bc
|
pop bc
|
||||||
ld hl, SPRITEANIMSTRUCT_XCOORD
|
ld hl, SPRITEANIMSTRUCT_XCOORD
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -709,9 +709,9 @@ PokegearMap_UpdateLandmarkName: ; 910b4
|
|||||||
pop af
|
pop af
|
||||||
ld e, a
|
ld e, a
|
||||||
push de
|
push de
|
||||||
callba GetLandmarkName
|
farcall GetLandmarkName
|
||||||
pop de
|
pop de
|
||||||
callba TownMap_ConvertLineBreakCharacters
|
farcall TownMap_ConvertLineBreakCharacters
|
||||||
hlcoord 8, 0
|
hlcoord 8, 0
|
||||||
ld [hl], $34
|
ld [hl], $34
|
||||||
ret
|
ret
|
||||||
@ -721,7 +721,7 @@ PokegearMap_UpdateLandmarkName: ; 910b4
|
|||||||
PokegearMap_UpdateCursorPosition: ; 910d4
|
PokegearMap_UpdateCursorPosition: ; 910d4
|
||||||
push bc
|
push bc
|
||||||
ld e, a
|
ld e, a
|
||||||
callba GetLandmarkCoords
|
farcall GetLandmarkCoords
|
||||||
pop bc
|
pop bc
|
||||||
ld hl, SPRITEANIMSTRUCT_XCOORD
|
ld hl, SPRITEANIMSTRUCT_XCOORD
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -929,7 +929,7 @@ PokegearPhone_MakePhoneCall: ; 911eb (24:51eb)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.no_service
|
.no_service
|
||||||
callba Phone_NoSignal
|
farcall Phone_NoSignal
|
||||||
ld hl, .OutOfServiceArea
|
ld hl, .OutOfServiceArea
|
||||||
call PrintText
|
call PrintText
|
||||||
ld a, $8
|
ld a, $8
|
||||||
@ -958,7 +958,7 @@ PokegearPhone_FinishPhoneCall: ; 91256 (24:5256)
|
|||||||
ld a, [hJoyPressed]
|
ld a, [hJoyPressed]
|
||||||
and A_BUTTON | B_BUTTON
|
and A_BUTTON | B_BUTTON
|
||||||
ret z
|
ret z
|
||||||
callba HangUp
|
farcall HangUp
|
||||||
ld a, $8
|
ld a, $8
|
||||||
ld [wJumptableIndex], a
|
ld [wJumptableIndex], a
|
||||||
ld hl, PokegearText_WhomToCall
|
ld hl, PokegearText_WhomToCall
|
||||||
@ -1121,7 +1121,7 @@ PokegearPhoneContactSubmenu: ; 91342 (24:5342)
|
|||||||
ld d, 0
|
ld d, 0
|
||||||
add hl, de
|
add hl, de
|
||||||
ld c, [hl]
|
ld c, [hl]
|
||||||
callba CheckCanDeletePhoneNumber
|
farcall CheckCanDeletePhoneNumber
|
||||||
ld a, c
|
ld a, c
|
||||||
and a
|
and a
|
||||||
jr z, .cant_delete
|
jr z, .cant_delete
|
||||||
@ -1849,7 +1849,7 @@ _TownMap: ; 9191c
|
|||||||
call ClearSprites
|
call ClearSprites
|
||||||
call DisableLCD
|
call DisableLCD
|
||||||
call Pokegear_LoadGFX
|
call Pokegear_LoadGFX
|
||||||
callba ClearSpriteAnims
|
farcall ClearSpriteAnims
|
||||||
ld a, 8
|
ld a, 8
|
||||||
call SkipMusic
|
call SkipMusic
|
||||||
ld a, $e3
|
ld a, $e3
|
||||||
@ -1919,7 +1919,7 @@ _TownMap: ; 9191c
|
|||||||
jr nz, .pressed_down
|
jr nz, .pressed_down
|
||||||
.loop2
|
.loop2
|
||||||
push de
|
push de
|
||||||
callba PlaySpriteAnimations
|
farcall PlaySpriteAnimations
|
||||||
pop de
|
pop de
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
jr .loop
|
jr .loop
|
||||||
@ -1973,7 +1973,7 @@ _TownMap: ; 9191c
|
|||||||
.kanto2
|
.kanto2
|
||||||
ld e, $1
|
ld e, $1
|
||||||
.okay_tilemap
|
.okay_tilemap
|
||||||
callba PokegearMap
|
farcall PokegearMap
|
||||||
ld a, $7
|
ld a, $7
|
||||||
ld bc, 6
|
ld bc, 6
|
||||||
hlcoord 1, 0
|
hlcoord 1, 0
|
||||||
@ -1994,7 +1994,7 @@ _TownMap: ; 9191c
|
|||||||
ld [hl], $17
|
ld [hl], $17
|
||||||
ld a, [wTownMapCursorLandmark]
|
ld a, [wTownMapCursorLandmark]
|
||||||
call PokegearMap_UpdateLandmarkName
|
call PokegearMap_UpdateLandmarkName
|
||||||
callba TownMapPals
|
farcall TownMapPals
|
||||||
ret
|
ret
|
||||||
; 91a53
|
; 91a53
|
||||||
|
|
||||||
@ -2116,7 +2116,7 @@ _FlyMap: ; 91af3
|
|||||||
ld [hl], $1
|
ld [hl], $1
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
callba ClearSpriteAnims
|
farcall ClearSpriteAnims
|
||||||
call LoadTownMapGFX
|
call LoadTownMapGFX
|
||||||
ld de, FlyMapLabelBorderGFX
|
ld de, FlyMapLabelBorderGFX
|
||||||
ld hl, VTiles2 tile $30
|
ld hl, VTiles2 tile $30
|
||||||
@ -2138,7 +2138,7 @@ _FlyMap: ; 91af3
|
|||||||
jr nz, .pressedA
|
jr nz, .pressedA
|
||||||
call FlyMapScroll
|
call FlyMapScroll
|
||||||
call GetMapCursorCoordinates
|
call GetMapCursorCoordinates
|
||||||
callba PlaySpriteAnimations
|
farcall PlaySpriteAnimations
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
jr .loop
|
jr .loop
|
||||||
|
|
||||||
@ -2276,7 +2276,7 @@ TownMapBubble: ; 91bb5
|
|||||||
ld de, Flypoints
|
ld de, Flypoints
|
||||||
add hl, de
|
add hl, de
|
||||||
ld e, [hl]
|
ld e, [hl]
|
||||||
callba GetLandmarkName
|
farcall GetLandmarkName
|
||||||
hlcoord 2, 1
|
hlcoord 2, 1
|
||||||
ld de, StringBuffer1
|
ld de, StringBuffer1
|
||||||
call PlaceString
|
call PlaceString
|
||||||
@ -2292,7 +2292,7 @@ GetMapCursorCoordinates: ; 91c17
|
|||||||
ld de, Flypoints
|
ld de, Flypoints
|
||||||
add hl, de
|
add hl, de
|
||||||
ld e, [hl]
|
ld e, [hl]
|
||||||
callba GetLandmarkCoords
|
farcall GetLandmarkCoords
|
||||||
ld a, [wTownMapCursorCoordinates]
|
ld a, [wTownMapCursorCoordinates]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [wTownMapCursorCoordinates + 1]
|
ld a, [wTownMapCursorCoordinates + 1]
|
||||||
@ -2595,7 +2595,7 @@ _Area: ; 91d11
|
|||||||
.GetAndPlaceNest: ; 91e1e
|
.GetAndPlaceNest: ; 91e1e
|
||||||
ld [wTownMapCursorLandmark], a
|
ld [wTownMapCursorLandmark], a
|
||||||
ld e, 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
|
decoord 0, 0
|
||||||
ld hl, Sprites
|
ld hl, Sprites
|
||||||
.nestloop
|
.nestloop
|
||||||
@ -2605,7 +2605,7 @@ _Area: ; 91d11
|
|||||||
push de
|
push de
|
||||||
ld e, a
|
ld e, a
|
||||||
push hl
|
push hl
|
||||||
callba GetLandmarkCoords
|
farcall GetLandmarkCoords
|
||||||
pop hl
|
pop hl
|
||||||
; load into OAM
|
; load into OAM
|
||||||
ld a, d
|
ld a, d
|
||||||
@ -2637,7 +2637,7 @@ _Area: ; 91d11
|
|||||||
ret c
|
ret c
|
||||||
ld a, [wTownMapPlayerIconLandmark]
|
ld a, [wTownMapPlayerIconLandmark]
|
||||||
ld e, a
|
ld e, a
|
||||||
callba GetLandmarkCoords
|
farcall GetLandmarkCoords
|
||||||
ld c, e
|
ld c, e
|
||||||
ld b, d
|
ld b, d
|
||||||
ld de, .PlayerOAM
|
ld de, .PlayerOAM
|
||||||
@ -2723,7 +2723,7 @@ _Area: ; 91d11
|
|||||||
ld a, [wTownMapPlayerIconLandmark]
|
ld a, [wTownMapPlayerIconLandmark]
|
||||||
cp FAST_SHIP
|
cp FAST_SHIP
|
||||||
jr z, .FastShip
|
jr z, .FastShip
|
||||||
callba GetPlayerIcon
|
farcall GetPlayerIcon
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.FastShip:
|
.FastShip:
|
||||||
@ -2851,7 +2851,7 @@ TownMapMon: ; 91f7b
|
|||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
; Get FlyMon icon
|
; Get FlyMon icon
|
||||||
ld e, 8 ; starting tile in VRAM
|
ld e, 8 ; starting tile in VRAM
|
||||||
callba GetSpeciesIcon
|
farcall GetSpeciesIcon
|
||||||
; Animation/palette
|
; Animation/palette
|
||||||
depixel 0, 0
|
depixel 0, 0
|
||||||
ld a, SPRITE_ANIM_INDEX_PARTY_MON
|
ld a, SPRITE_ANIM_INDEX_PARTY_MON
|
||||||
@ -2869,7 +2869,7 @@ TownMapMon: ; 91f7b
|
|||||||
TownMapPlayerIcon: ; 91fa6
|
TownMapPlayerIcon: ; 91fa6
|
||||||
; Draw the player icon at town map location in a
|
; Draw the player icon at town map location in a
|
||||||
push af
|
push af
|
||||||
callba GetPlayerIcon
|
farcall GetPlayerIcon
|
||||||
; Standing icon
|
; Standing icon
|
||||||
ld hl, VTiles0 tile $10
|
ld hl, VTiles0 tile $10
|
||||||
ld c, 4 ; # tiles
|
ld c, 4 ; # tiles
|
||||||
@ -2899,7 +2899,7 @@ TownMapPlayerIcon: ; 91fa6
|
|||||||
pop af
|
pop af
|
||||||
ld e, a
|
ld e, a
|
||||||
push bc
|
push bc
|
||||||
callba GetLandmarkCoords
|
farcall GetLandmarkCoords
|
||||||
pop bc
|
pop bc
|
||||||
ld hl, SPRITEANIMSTRUCT_XCOORD
|
ld hl, SPRITEANIMSTRUCT_XCOORD
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -2945,7 +2945,7 @@ INCBIN "gfx/pokegear/flymap_label_border.1bpp"
|
|||||||
ld [hl], $1
|
ld [hl], $1
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
callba ClearSpriteAnims
|
farcall ClearSpriteAnims
|
||||||
call LoadTownMapGFX
|
call LoadTownMapGFX
|
||||||
ld de, FlyMapLabelBorderGFX
|
ld de, FlyMapLabelBorderGFX
|
||||||
ld hl, VTiles2 tile $30
|
ld hl, VTiles2 tile $30
|
||||||
@ -2980,7 +2980,7 @@ INCBIN "gfx/pokegear/flymap_label_border.1bpp"
|
|||||||
jr nz, .pressedA
|
jr nz, .pressedA
|
||||||
call .HandleDPad
|
call .HandleDPad
|
||||||
call GetMapCursorCoordinates
|
call GetMapCursorCoordinates
|
||||||
callba PlaySpriteAnimations
|
farcall PlaySpriteAnimations
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
jr .loop
|
jr .loop
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ PrintPage1: ; 1dc1b0
|
|||||||
ld a, [wd265]
|
ld a, [wd265]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld c, 1 ; get page 1
|
ld c, 1 ; get page 1
|
||||||
callba GetDexEntryPagePointer
|
farcall GetDexEntryPagePointer
|
||||||
pop af
|
pop af
|
||||||
ld a, b
|
ld a, b
|
||||||
hlcoord 1, 11, wPrinterTileMapBuffer
|
hlcoord 1, 11, wPrinterTileMapBuffer
|
||||||
@ -81,7 +81,7 @@ PrintPage2: ; 1dc213
|
|||||||
ld a, [wd265]
|
ld a, [wd265]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld c, 2 ; get page 2
|
ld c, 2 ; get page 2
|
||||||
callba GetDexEntryPagePointer
|
farcall GetDexEntryPagePointer
|
||||||
pop af
|
pop af
|
||||||
hlcoord 1, 1, wPrinterTileMapBuffer
|
hlcoord 1, 1, wPrinterTileMapBuffer
|
||||||
ld a, b
|
ld a, b
|
||||||
@ -157,7 +157,7 @@ PrintPartyMonPage1: ; 1dc381
|
|||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [MonType], a
|
ld [MonType], a
|
||||||
callba CopyPkmnToTempMon
|
farcall CopyPkmnToTempMon
|
||||||
hlcoord 0, 7
|
hlcoord 0, 7
|
||||||
ld b, 9
|
ld b, 9
|
||||||
ld c, 18
|
ld c, 18
|
||||||
@ -241,7 +241,7 @@ PrintPartyMonPage2: ; 1dc47b
|
|||||||
call LoadFontsBattleExtra
|
call LoadFontsBattleExtra
|
||||||
xor a
|
xor a
|
||||||
ld [MonType], a
|
ld [MonType], a
|
||||||
callba CopyPkmnToTempMon
|
farcall CopyPkmnToTempMon
|
||||||
hlcoord 0, 0
|
hlcoord 0, 0
|
||||||
ld b, 15
|
ld b, 15
|
||||||
ld c, 18
|
ld c, 18
|
||||||
@ -316,7 +316,7 @@ Function1dc51a: ; 1dc51a
|
|||||||
; 1dc52c
|
; 1dc52c
|
||||||
|
|
||||||
Function1dc52c: ; 1dc52c
|
Function1dc52c: ; 1dc52c
|
||||||
callba GetGender
|
farcall GetGender
|
||||||
ld a, " "
|
ld a, " "
|
||||||
jr c, .got_gender
|
jr c, .got_gender
|
||||||
ld a, "♂"
|
ld a, "♂"
|
||||||
@ -327,7 +327,7 @@ Function1dc52c: ; 1dc52c
|
|||||||
hlcoord 17, 2
|
hlcoord 17, 2
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld bc, TempMonDVs
|
ld bc, TempMonDVs
|
||||||
callba CheckShininess
|
farcall CheckShininess
|
||||||
ret nc
|
ret nc
|
||||||
hlcoord 18, 2
|
hlcoord 18, 2
|
||||||
ld [hl], "<SHINY>"
|
ld [hl], "<SHINY>"
|
||||||
|
@ -68,7 +68,7 @@ PrintDexEntry: ; 8442c
|
|||||||
call Printer_StartTransmission
|
call Printer_StartTransmission
|
||||||
ld a, $10
|
ld a, $10
|
||||||
ld [wcbfa], a
|
ld [wcbfa], a
|
||||||
callba PrintPage1
|
farcall PrintPage1
|
||||||
call ClearTileMap
|
call ClearTileMap
|
||||||
ld a, %11100100
|
ld a, %11100100
|
||||||
call DmgToCgbBGPals
|
call DmgToCgbBGPals
|
||||||
@ -94,7 +94,7 @@ PrintDexEntry: ; 8442c
|
|||||||
call Printer_StartTransmission
|
call Printer_StartTransmission
|
||||||
ld a, $3
|
ld a, $3
|
||||||
ld [wcbfa], a
|
ld [wcbfa], a
|
||||||
callba PrintPage2
|
farcall PrintPage2
|
||||||
call Printer_ResetJoypadRegisters
|
call Printer_ResetJoypadRegisters
|
||||||
ld a, 4
|
ld a, 4
|
||||||
ld [wPrinterQueueLength], a
|
ld [wPrinterQueueLength], a
|
||||||
@ -235,7 +235,7 @@ PrintUnownStamp: ; 84560
|
|||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
call LoadTileMapToTempTileMap
|
call LoadTileMapToTempTileMap
|
||||||
callba PlaceUnownPrinterFrontpic
|
farcall PlaceUnownPrinterFrontpic
|
||||||
ld a, $0 ; to be loaded to wcbfa
|
ld a, $0 ; to be loaded to wcbfa
|
||||||
call Printer_PrepareTileMapForPrint
|
call Printer_PrepareTileMapForPrint
|
||||||
call Call_LoadTempTileMapToTileMap
|
call Call_LoadTempTileMapToTileMap
|
||||||
@ -341,7 +341,7 @@ PrintPartymon: ; 8461a
|
|||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
callba PrintPartyMonPage1
|
farcall PrintPartyMonPage1
|
||||||
ld a, $10 ; to be loaded to wcbfa
|
ld a, $10 ; to be loaded to wcbfa
|
||||||
call Printer_PrepareTileMapForPrint
|
call Printer_PrepareTileMapForPrint
|
||||||
|
|
||||||
@ -362,7 +362,7 @@ PrintPartymon: ; 8461a
|
|||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
callba PrintPartyMonPage2
|
farcall PrintPartyMonPage2
|
||||||
ld a, $3 ; to be loaded to wcbfa
|
ld a, $3 ; to be loaded to wcbfa
|
||||||
call Printer_PrepareTileMapForPrint
|
call Printer_PrepareTileMapForPrint
|
||||||
|
|
||||||
@ -391,7 +391,7 @@ _PrintDiploma: ; 84688
|
|||||||
ld a, [wPrinterQueueLength]
|
ld a, [wPrinterQueueLength]
|
||||||
push af
|
push af
|
||||||
|
|
||||||
callba PlaceDiplomaOnScreen
|
farcall PlaceDiplomaOnScreen
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [hPrinter], a
|
ld [hPrinter], a
|
||||||
@ -425,7 +425,7 @@ _PrintDiploma: ; 84688
|
|||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
|
|
||||||
callba PrintDiplomaPage2
|
farcall PrintDiplomaPage2
|
||||||
|
|
||||||
ld a, $3 ; to be loaded to wcbfa
|
ld a, $3 ; to be loaded to wcbfa
|
||||||
call Printer_PrepareTileMapForPrint
|
call Printer_PrepareTileMapForPrint
|
||||||
@ -861,7 +861,7 @@ Printer_GetMonGender: ; 8498a (21:498a)
|
|||||||
ld [CurPartyMon], a
|
ld [CurPartyMon], a
|
||||||
ld a, TEMPMON
|
ld a, TEMPMON
|
||||||
ld [MonType], a
|
ld [MonType], a
|
||||||
callba GetGender
|
farcall GetGender
|
||||||
ld a, " "
|
ld a, " "
|
||||||
jr c, .got_gender
|
jr c, .got_gender
|
||||||
ld a, "♂"
|
ld a, "♂"
|
||||||
|
@ -278,7 +278,7 @@ endr
|
|||||||
pop bc
|
pop bc
|
||||||
call GetWorldMapLocation
|
call GetWorldMapLocation
|
||||||
ld e, a
|
ld e, a
|
||||||
callba GetLandmarkName
|
farcall GetLandmarkName
|
||||||
ld hl, OPT_OakText1
|
ld hl, OPT_OakText1
|
||||||
call CopyRadioTextToRAM
|
call CopyRadioTextToRAM
|
||||||
ld a, OAKS_POKEMON_TALK_5
|
ld a, OAKS_POKEMON_TALK_5
|
||||||
@ -592,7 +592,7 @@ OaksPkmnTalk9:
|
|||||||
db "@"
|
db "@"
|
||||||
|
|
||||||
OaksPkmnTalk10:
|
OaksPkmnTalk10:
|
||||||
callba RadioMusicRestartPokemonChannel
|
farcall RadioMusicRestartPokemonChannel
|
||||||
ld hl, OPT_RestartText
|
ld hl, OPT_RestartText
|
||||||
call PrintText
|
call PrintText
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
@ -653,7 +653,7 @@ OaksPkmnTalk14:
|
|||||||
dec [hl]
|
dec [hl]
|
||||||
ret nz
|
ret nz
|
||||||
ld de, $1d
|
ld de, $1d
|
||||||
callab RadioMusicRestartDE
|
callfar RadioMusicRestartDE
|
||||||
ld hl, .terminator
|
ld hl, .terminator
|
||||||
call PrintText
|
call PrintText
|
||||||
ld a, OAKS_POKEMON_TALK_4
|
ld a, OAKS_POKEMON_TALK_4
|
||||||
@ -923,7 +923,7 @@ StartPokemonMusicChannel:
|
|||||||
jr z, .SunTueThurSun
|
jr z, .SunTueThurSun
|
||||||
ld de, MUSIC_POKEMON_LULLABY
|
ld de, MUSIC_POKEMON_LULLABY
|
||||||
.SunTueThurSun:
|
.SunTueThurSun:
|
||||||
callab RadioMusicRestartDE
|
callfar RadioMusicRestartDE
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BenIntroText1:
|
BenIntroText1:
|
||||||
@ -978,9 +978,9 @@ BenFernText3B:
|
|||||||
|
|
||||||
LuckyNumberShow1:
|
LuckyNumberShow1:
|
||||||
call StartRadioStation
|
call StartRadioStation
|
||||||
callab Special_CheckLuckyNumberShowFlag
|
callfar Special_CheckLuckyNumberShowFlag
|
||||||
jr nc, .dontreset
|
jr nc, .dontreset
|
||||||
callab Special_ResetLuckyNumberShowFlag
|
callfar Special_ResetLuckyNumberShowFlag
|
||||||
.dontreset
|
.dontreset
|
||||||
ld hl, LC_Text1
|
ld hl, LC_Text1
|
||||||
ld a, LUCKY_NUMBER_SHOW_2
|
ld a, LUCKY_NUMBER_SHOW_2
|
||||||
@ -1193,12 +1193,12 @@ PeoplePlaces4: ; People
|
|||||||
pop bc
|
pop bc
|
||||||
jr c, PeoplePlaces4
|
jr c, PeoplePlaces4
|
||||||
push bc
|
push bc
|
||||||
callab GetTrainerClassName
|
callfar GetTrainerClassName
|
||||||
ld de, StringBuffer1
|
ld de, StringBuffer1
|
||||||
call CopyName1
|
call CopyName1
|
||||||
pop bc
|
pop bc
|
||||||
ld b, 1
|
ld b, 1
|
||||||
callab GetTrainerName
|
callfar GetTrainerName
|
||||||
ld hl, PnP_Text4
|
ld hl, PnP_Text4
|
||||||
ld a, PLACES_AND_PEOPLE_5
|
ld a, PLACES_AND_PEOPLE_5
|
||||||
jp NextRadioLine
|
jp NextRadioLine
|
||||||
@ -1348,7 +1348,7 @@ PeoplePlaces6: ; Places
|
|||||||
ld c, [hl]
|
ld c, [hl]
|
||||||
call GetWorldMapLocation
|
call GetWorldMapLocation
|
||||||
ld e, a
|
ld e, a
|
||||||
callba GetLandmarkName
|
farcall GetLandmarkName
|
||||||
ld hl, PnP_Text5
|
ld hl, PnP_Text5
|
||||||
ld a, PLACES_AND_PEOPLE_7
|
ld a, PLACES_AND_PEOPLE_7
|
||||||
jp NextRadioLine
|
jp NextRadioLine
|
||||||
@ -1808,8 +1808,8 @@ BuenasPassword19:
|
|||||||
BuenasPassword20:
|
BuenasPassword20:
|
||||||
ld a, [hBGMapMode]
|
ld a, [hBGMapMode]
|
||||||
push af
|
push af
|
||||||
callba NoRadioMusic
|
farcall NoRadioMusic
|
||||||
callba NoRadioName
|
farcall NoRadioName
|
||||||
pop af
|
pop af
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
ld hl, WeeklyFlags
|
ld hl, WeeklyFlags
|
||||||
@ -1955,7 +1955,7 @@ StartRadioStation:
|
|||||||
ld e, [hl]
|
ld e, [hl]
|
||||||
inc hl
|
inc hl
|
||||||
ld d, [hl]
|
ld d, [hl]
|
||||||
callab RadioMusicRestartDE
|
callfar RadioMusicRestartDE
|
||||||
ret
|
ret
|
||||||
|
|
||||||
RadioChannelSongs:
|
RadioChannelSongs:
|
||||||
|
@ -143,8 +143,8 @@ Function140ae: ; 140ae
|
|||||||
jr c, .dont_update
|
jr c, .dont_update
|
||||||
|
|
||||||
.time_overflow
|
.time_overflow
|
||||||
callba ClearDailyTimers
|
farcall ClearDailyTimers
|
||||||
callba Function170923
|
farcall Function170923
|
||||||
; mobile
|
; mobile
|
||||||
ld a, $5
|
ld a, $5
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
SaveMenu: ; 14a1a
|
SaveMenu: ; 14a1a
|
||||||
call LoadStandardMenuDataHeader
|
call LoadStandardMenuDataHeader
|
||||||
callba DisplaySaveInfoOnSave
|
farcall DisplaySaveInfoOnSave
|
||||||
call SpeechTextBox
|
call SpeechTextBox
|
||||||
call UpdateSprites
|
call UpdateSprites
|
||||||
callba SaveMenu_LoadEDTile
|
farcall SaveMenu_LoadEDTile
|
||||||
ld hl, Text_WouldYouLikeToSaveTheGame
|
ld hl, Text_WouldYouLikeToSaveTheGame
|
||||||
call SaveTheGame_yesorno
|
call SaveTheGame_yesorno
|
||||||
jr nz, .refused
|
jr nz, .refused
|
||||||
@ -19,20 +19,20 @@ SaveMenu: ; 14a1a
|
|||||||
.refused
|
.refused
|
||||||
call ExitMenu
|
call ExitMenu
|
||||||
call ret_d90
|
call ret_d90
|
||||||
callba SaveMenu_LoadEDTile
|
farcall SaveMenu_LoadEDTile
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
|
|
||||||
SaveAfterLinkTrade: ; 14a58
|
SaveAfterLinkTrade: ; 14a58
|
||||||
call PauseGameLogic
|
call PauseGameLogic
|
||||||
callba StageRTCTimeForSave
|
farcall StageRTCTimeForSave
|
||||||
callba BackupMysteryGift
|
farcall BackupMysteryGift
|
||||||
call SavePokemonData
|
call SavePokemonData
|
||||||
call SaveChecksum
|
call SaveChecksum
|
||||||
call SaveBackupPokemonData
|
call SaveBackupPokemonData
|
||||||
call SaveBackupChecksum
|
call SaveBackupChecksum
|
||||||
callba BackupPartyMonMail
|
farcall BackupPartyMonMail
|
||||||
callba SaveRTC
|
farcall SaveRTC
|
||||||
call ResumeGameLogic
|
call ResumeGameLogic
|
||||||
ret
|
ret
|
||||||
; 14a83
|
; 14a83
|
||||||
@ -95,8 +95,8 @@ MovePkmnWOMail_InsertMon_SaveGame: ; 14ad5
|
|||||||
ld [wCurBox], a
|
ld [wCurBox], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wSaveFileExists], a
|
ld [wSaveFileExists], a
|
||||||
callba StageRTCTimeForSave
|
farcall StageRTCTimeForSave
|
||||||
callba BackupMysteryGift
|
farcall BackupMysteryGift
|
||||||
call ValidateSave
|
call ValidateSave
|
||||||
call SaveOptions
|
call SaveOptions
|
||||||
call SavePlayerData
|
call SavePlayerData
|
||||||
@ -107,9 +107,9 @@ MovePkmnWOMail_InsertMon_SaveGame: ; 14ad5
|
|||||||
call SaveBackupPlayerData
|
call SaveBackupPlayerData
|
||||||
call SaveBackupPokemonData
|
call SaveBackupPokemonData
|
||||||
call SaveBackupChecksum
|
call SaveBackupChecksum
|
||||||
callba BackupPartyMonMail
|
farcall BackupPartyMonMail
|
||||||
callba BackupMobileEventIndex
|
farcall BackupMobileEventIndex
|
||||||
callba SaveRTC
|
farcall SaveRTC
|
||||||
call LoadBox
|
call LoadBox
|
||||||
call ResumeGameLogic
|
call ResumeGameLogic
|
||||||
ld de, SFX_SAVE
|
ld de, SFX_SAVE
|
||||||
@ -271,8 +271,8 @@ SavedTheGame: ; 14be6
|
|||||||
SaveGameData_: ; 14c10
|
SaveGameData_: ; 14c10
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wSaveFileExists], a
|
ld [wSaveFileExists], a
|
||||||
callba StageRTCTimeForSave
|
farcall StageRTCTimeForSave
|
||||||
callba BackupMysteryGift
|
farcall BackupMysteryGift
|
||||||
call ValidateSave
|
call ValidateSave
|
||||||
call SaveOptions
|
call SaveOptions
|
||||||
call SavePlayerData
|
call SavePlayerData
|
||||||
@ -285,9 +285,9 @@ SaveGameData_: ; 14c10
|
|||||||
call SaveBackupPokemonData
|
call SaveBackupPokemonData
|
||||||
call SaveBackupChecksum
|
call SaveBackupChecksum
|
||||||
call UpdateStackTop
|
call UpdateStackTop
|
||||||
callba BackupPartyMonMail
|
farcall BackupPartyMonMail
|
||||||
callba BackupMobileEventIndex
|
farcall BackupMobileEventIndex
|
||||||
callba SaveRTC
|
farcall SaveRTC
|
||||||
ld a, BANK(sBattleTowerChallengeState)
|
ld a, BANK(sBattleTowerChallengeState)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld a, [sBattleTowerChallengeState]
|
ld a, [sBattleTowerChallengeState]
|
||||||
@ -636,9 +636,9 @@ TryLoadSaveFile: ; 14ea5 (5:4ea5)
|
|||||||
call LoadPlayerData
|
call LoadPlayerData
|
||||||
call LoadPokemonData
|
call LoadPokemonData
|
||||||
call LoadBox
|
call LoadBox
|
||||||
callba RestorePartyMonMail
|
farcall RestorePartyMonMail
|
||||||
callba RestoreMobileEventIndex
|
farcall RestoreMobileEventIndex
|
||||||
callba RestoreMysteryGift
|
farcall RestoreMysteryGift
|
||||||
call ValidateBackupSave
|
call ValidateBackupSave
|
||||||
call SaveBackupOptions
|
call SaveBackupOptions
|
||||||
call SaveBackupPlayerData
|
call SaveBackupPlayerData
|
||||||
@ -653,9 +653,9 @@ TryLoadSaveFile: ; 14ea5 (5:4ea5)
|
|||||||
call LoadBackupPlayerData
|
call LoadBackupPlayerData
|
||||||
call LoadBackupPokemonData
|
call LoadBackupPokemonData
|
||||||
call LoadBox
|
call LoadBox
|
||||||
callba RestorePartyMonMail
|
farcall RestorePartyMonMail
|
||||||
callba RestoreMobileEventIndex
|
farcall RestoreMobileEventIndex
|
||||||
callba RestoreMysteryGift
|
farcall RestoreMysteryGift
|
||||||
call ValidateSave
|
call ValidateSave
|
||||||
call SaveOptions
|
call SaveOptions
|
||||||
call SavePlayerData
|
call SavePlayerData
|
||||||
|
@ -35,7 +35,7 @@ WaitScript:
|
|||||||
dec [hl]
|
dec [hl]
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
callba Function58b9
|
farcall Function58b9
|
||||||
|
|
||||||
ld a, SCRIPT_READ
|
ld a, SCRIPT_READ
|
||||||
ld [ScriptMode], a
|
ld [ScriptMode], a
|
||||||
@ -49,7 +49,7 @@ WaitScriptMovement:
|
|||||||
bit 7, [hl]
|
bit 7, [hl]
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
callba Function58b9
|
farcall Function58b9
|
||||||
|
|
||||||
ld a, SCRIPT_READ
|
ld a, SCRIPT_READ
|
||||||
ld [ScriptMode], a
|
ld [ScriptMode], a
|
||||||
@ -277,7 +277,7 @@ Script_special:
|
|||||||
ld e, a
|
ld e, a
|
||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
ld d, a
|
ld d, a
|
||||||
callba Special
|
farcall Special
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Script_ptcallasm:
|
Script_ptcallasm:
|
||||||
@ -475,13 +475,13 @@ Script_pokepic:
|
|||||||
ld a, [ScriptVar]
|
ld a, [ScriptVar]
|
||||||
.ok
|
.ok
|
||||||
ld [CurPartySpecies], a
|
ld [CurPartySpecies], a
|
||||||
callba Pokepic
|
farcall Pokepic
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Script_closepokepic:
|
Script_closepokepic:
|
||||||
; script command 0x57
|
; script command 0x57
|
||||||
|
|
||||||
callba ClosePokepic
|
farcall ClosePokepic
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Script_verticalmenu:
|
Script_verticalmenu:
|
||||||
@ -519,7 +519,7 @@ Script_battletowertext:
|
|||||||
call SetUpTextBox
|
call SetUpTextBox
|
||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
ld c, a
|
ld c, a
|
||||||
callba BattleTowerText
|
farcall BattleTowerText
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Script_verbosegiveitem:
|
Script_verbosegiveitem:
|
||||||
@ -615,7 +615,7 @@ Script_pocketisfull:
|
|||||||
Script_specialsound:
|
Script_specialsound:
|
||||||
; script command 0x88
|
; script command 0x88
|
||||||
|
|
||||||
callba CheckItemPocket
|
farcall CheckItemPocket
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeParamBuffer]
|
||||||
cp TM_HM
|
cp TM_HM
|
||||||
ld de, SFX_GET_TM
|
ld de, SFX_GET_TM
|
||||||
@ -628,7 +628,7 @@ Script_specialsound:
|
|||||||
|
|
||||||
|
|
||||||
GetPocketName:
|
GetPocketName:
|
||||||
callba CheckItemPocket
|
farcall CheckItemPocket
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeParamBuffer]
|
||||||
dec a
|
dec a
|
||||||
ld hl, .Pockets
|
ld hl, .Pockets
|
||||||
@ -689,7 +689,7 @@ Script_pokemart:
|
|||||||
ld d, a
|
ld d, a
|
||||||
ld a, [ScriptBank]
|
ld a, [ScriptBank]
|
||||||
ld b, a
|
ld b, a
|
||||||
callba OpenMartDialog
|
farcall OpenMartDialog
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Script_elevator:
|
Script_elevator:
|
||||||
@ -705,7 +705,7 @@ Script_elevator:
|
|||||||
ld d, a
|
ld d, a
|
||||||
ld a, [ScriptBank]
|
ld a, [ScriptBank]
|
||||||
ld b, a
|
ld b, a
|
||||||
callba Elevator
|
farcall Elevator
|
||||||
ret c
|
ret c
|
||||||
ld a, TRUE
|
ld a, TRUE
|
||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
@ -718,7 +718,7 @@ Script_trade:
|
|||||||
|
|
||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
ld e, a
|
ld e, a
|
||||||
callba NPCTrade
|
farcall NPCTrade
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Script_phonecall:
|
Script_phonecall:
|
||||||
@ -732,13 +732,13 @@ Script_phonecall:
|
|||||||
ld d, a
|
ld d, a
|
||||||
ld a, [ScriptBank]
|
ld a, [ScriptBank]
|
||||||
ld b, a
|
ld b, a
|
||||||
callba PhoneCall
|
farcall PhoneCall
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Script_hangup:
|
Script_hangup:
|
||||||
; script command 0x99
|
; script command 0x99
|
||||||
|
|
||||||
callba HangUp
|
farcall HangUp
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Script_askforphonenumber:
|
Script_askforphonenumber:
|
||||||
@ -750,7 +750,7 @@ Script_askforphonenumber:
|
|||||||
jr c, .refused
|
jr c, .refused
|
||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
ld c, a
|
ld c, a
|
||||||
callba AddPhoneNumber
|
farcall AddPhoneNumber
|
||||||
jr c, .phonefull
|
jr c, .phonefull
|
||||||
xor a
|
xor a
|
||||||
jr .done
|
jr .done
|
||||||
@ -771,7 +771,7 @@ Script_describedecoration:
|
|||||||
|
|
||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
ld b, a
|
ld b, a
|
||||||
callba DescribeDecoration
|
farcall DescribeDecoration
|
||||||
ld h, d
|
ld h, d
|
||||||
ld l, e
|
ld l, e
|
||||||
jp ScriptJump
|
jp ScriptJump
|
||||||
@ -800,7 +800,7 @@ Script_swarm:
|
|||||||
ld d, a
|
ld d, a
|
||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
ld e, a
|
ld e, a
|
||||||
callba StoreSwarmMapIndices
|
farcall StoreSwarmMapIndices
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Script_trainertext:
|
Script_trainertext:
|
||||||
@ -897,7 +897,7 @@ Script_encountermusic:
|
|||||||
|
|
||||||
ld a, [OtherTrainerClass]
|
ld a, [OtherTrainerClass]
|
||||||
ld e, a
|
ld e, a
|
||||||
callba PlayTrainerEncounterMusic
|
farcall PlayTrainerEncounterMusic
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Script_playmapmusic:
|
Script_playmapmusic:
|
||||||
@ -959,7 +959,7 @@ Script_waitsfx:
|
|||||||
Script_warpsound:
|
Script_warpsound:
|
||||||
; script command 0x87
|
; script command 0x87
|
||||||
|
|
||||||
callba GetWarpSFX
|
farcall GetWarpSFX
|
||||||
call PlaySFX
|
call PlaySFX
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -1010,7 +1010,7 @@ Script_applymovement:
|
|||||||
ApplyMovement:
|
ApplyMovement:
|
||||||
push bc
|
push bc
|
||||||
ld a, c
|
ld a, c
|
||||||
callba SetFlagsForMovement_1
|
farcall SetFlagsForMovement_1
|
||||||
pop bc
|
pop bc
|
||||||
|
|
||||||
push bc
|
push bc
|
||||||
@ -1032,7 +1032,7 @@ ApplyMovement:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
SetFlagsForMovement_2:
|
SetFlagsForMovement_2:
|
||||||
callba _SetFlagsForMovement_2
|
farcall _SetFlagsForMovement_2
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Script_applymovement2:
|
Script_applymovement2:
|
||||||
@ -1054,7 +1054,7 @@ Script_faceplayer:
|
|||||||
ld d, $0
|
ld d, $0
|
||||||
ld a, [hLastTalked]
|
ld a, [hLastTalked]
|
||||||
ld e, a
|
ld e, a
|
||||||
callba GetRelativeFacing
|
farcall GetRelativeFacing
|
||||||
ld a, d
|
ld a, d
|
||||||
add a
|
add a
|
||||||
add a
|
add a
|
||||||
@ -1085,7 +1085,7 @@ Script_faceperson:
|
|||||||
.ok2
|
.ok2
|
||||||
ld d, a
|
ld d, a
|
||||||
push de
|
push de
|
||||||
callba GetRelativeFacing
|
farcall GetRelativeFacing
|
||||||
pop bc
|
pop bc
|
||||||
ret c
|
ret c
|
||||||
ld a, d
|
ld a, d
|
||||||
@ -1204,7 +1204,7 @@ Script_disappear:
|
|||||||
ld a, [hMapObjectIndexBuffer]
|
ld a, [hMapObjectIndexBuffer]
|
||||||
ld b, 1 ; set
|
ld b, 1 ; set
|
||||||
call ApplyEventActionAppearDisappear
|
call ApplyEventActionAppearDisappear
|
||||||
callba _UpdateSprites
|
farcall _UpdateSprites
|
||||||
ret
|
ret
|
||||||
|
|
||||||
ApplyEventActionAppearDisappear:
|
ApplyEventActionAppearDisappear:
|
||||||
@ -1239,13 +1239,13 @@ Script_follow:
|
|||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
call GetScriptPerson
|
call GetScriptPerson
|
||||||
ld c, a
|
ld c, a
|
||||||
callba StartFollow
|
farcall StartFollow
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Script_stopfollow:
|
Script_stopfollow:
|
||||||
; script command 0x71
|
; script command 0x71
|
||||||
|
|
||||||
callba StopFollow
|
farcall StopFollow
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Script_moveperson:
|
Script_moveperson:
|
||||||
@ -1264,7 +1264,7 @@ Script_moveperson:
|
|||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
add 4
|
add 4
|
||||||
ld e, a
|
ld e, a
|
||||||
callba CopyDECoordsToMapObject
|
farcall CopyDECoordsToMapObject
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Script_writepersonxy:
|
Script_writepersonxy:
|
||||||
@ -1279,7 +1279,7 @@ Script_writepersonxy:
|
|||||||
ld a, [hLastTalked]
|
ld a, [hLastTalked]
|
||||||
.ok
|
.ok
|
||||||
ld b, a
|
ld b, a
|
||||||
callba WritePersonXY
|
farcall WritePersonXY
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Script_follownotexact:
|
Script_follownotexact:
|
||||||
@ -1294,7 +1294,7 @@ Script_follownotexact:
|
|||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
call GetScriptPerson
|
call GetScriptPerson
|
||||||
ld c, a
|
ld c, a
|
||||||
callba FollowNotExact
|
farcall FollowNotExact
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Script_loademote:
|
Script_loademote:
|
||||||
@ -1308,7 +1308,7 @@ Script_loademote:
|
|||||||
ld a, [ScriptVar]
|
ld a, [ScriptVar]
|
||||||
.not_var_emote
|
.not_var_emote
|
||||||
ld c, a
|
ld c, a
|
||||||
callba LoadEmote
|
farcall LoadEmote
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Script_showemote:
|
Script_showemote:
|
||||||
@ -1451,7 +1451,7 @@ Script_catchtutorial:
|
|||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
ld [BattleType], a
|
ld [BattleType], a
|
||||||
call BufferScreen
|
call BufferScreen
|
||||||
callba CatchTutorial
|
farcall CatchTutorial
|
||||||
jp Script_reloadmap
|
jp Script_reloadmap
|
||||||
|
|
||||||
Script_reloadmapafterbattle:
|
Script_reloadmapafterbattle:
|
||||||
@ -1471,7 +1471,7 @@ Script_reloadmapafterbattle:
|
|||||||
.notblackedout
|
.notblackedout
|
||||||
bit 0, d
|
bit 0, d
|
||||||
jr z, .was_wild
|
jr z, .was_wild
|
||||||
callba MomTriesToBuySomething
|
farcall MomTriesToBuySomething
|
||||||
jr .done
|
jr .done
|
||||||
|
|
||||||
.was_wild
|
.was_wild
|
||||||
@ -1480,7 +1480,7 @@ Script_reloadmapafterbattle:
|
|||||||
jr z, .done
|
jr z, .done
|
||||||
ld b, BANK(Script_SpecialBillCall)
|
ld b, BANK(Script_SpecialBillCall)
|
||||||
ld de, Script_SpecialBillCall
|
ld de, Script_SpecialBillCall
|
||||||
callba LoadScriptBDE
|
farcall LoadScriptBDE
|
||||||
.done
|
.done
|
||||||
jp Script_reloadmap
|
jp Script_reloadmap
|
||||||
|
|
||||||
@ -1969,7 +1969,7 @@ Script_writecode:
|
|||||||
|
|
||||||
GetVarAction:
|
GetVarAction:
|
||||||
ld c, a
|
ld c, a
|
||||||
callba _GetVarAction
|
farcall _GetVarAction
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Script_checkver:
|
Script_checkver:
|
||||||
@ -2040,7 +2040,7 @@ Script_mapnametotext:
|
|||||||
|
|
||||||
ConvertLandmarkToText:
|
ConvertLandmarkToText:
|
||||||
ld e, a
|
ld e, a
|
||||||
callba GetLandmarkName
|
farcall GetLandmarkName
|
||||||
ld de, StringBuffer1
|
ld de, StringBuffer1
|
||||||
jp ConvertMemToText
|
jp ConvertMemToText
|
||||||
|
|
||||||
@ -2064,7 +2064,7 @@ Script_trainertotext:
|
|||||||
ld c, a
|
ld c, a
|
||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
ld b, a
|
ld b, a
|
||||||
callba GetTrainerName
|
farcall GetTrainerName
|
||||||
jr ConvertMemToText
|
jr ConvertMemToText
|
||||||
|
|
||||||
Script_name:
|
Script_name:
|
||||||
@ -2176,7 +2176,7 @@ Script_givepokeitem:
|
|||||||
ld a, [ScriptBank]
|
ld a, [ScriptBank]
|
||||||
call FarCopyBytes
|
call FarCopyBytes
|
||||||
pop bc
|
pop bc
|
||||||
callba GivePokeItem
|
farcall GivePokeItem
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Script_checkpokeitem:
|
Script_checkpokeitem:
|
||||||
@ -2190,7 +2190,7 @@ Script_checkpokeitem:
|
|||||||
ld d, a
|
ld d, a
|
||||||
ld a, [ScriptBank]
|
ld a, [ScriptBank]
|
||||||
ld b, a
|
ld b, a
|
||||||
callba CheckPokeItem
|
farcall CheckPokeItem
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Script_giveitem:
|
Script_giveitem:
|
||||||
@ -2263,7 +2263,7 @@ Script_givemoney:
|
|||||||
|
|
||||||
call GetMoneyAccount
|
call GetMoneyAccount
|
||||||
call LoadMoneyAmountToMem
|
call LoadMoneyAmountToMem
|
||||||
callba GiveMoney
|
farcall GiveMoney
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Script_takemoney:
|
Script_takemoney:
|
||||||
@ -2274,7 +2274,7 @@ Script_takemoney:
|
|||||||
|
|
||||||
call GetMoneyAccount
|
call GetMoneyAccount
|
||||||
call LoadMoneyAmountToMem
|
call LoadMoneyAmountToMem
|
||||||
callba TakeMoney
|
farcall TakeMoney
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Script_checkmoney:
|
Script_checkmoney:
|
||||||
@ -2285,7 +2285,7 @@ Script_checkmoney:
|
|||||||
|
|
||||||
call GetMoneyAccount
|
call GetMoneyAccount
|
||||||
call LoadMoneyAmountToMem
|
call LoadMoneyAmountToMem
|
||||||
callba CompareMoney
|
farcall CompareMoney
|
||||||
|
|
||||||
CompareMoneyAction:
|
CompareMoneyAction:
|
||||||
jr c, .two
|
jr c, .two
|
||||||
@ -2329,7 +2329,7 @@ Script_givecoins:
|
|||||||
; coins (CoinByteParam)
|
; coins (CoinByteParam)
|
||||||
|
|
||||||
call LoadCoinAmountToMem
|
call LoadCoinAmountToMem
|
||||||
callba GiveCoins
|
farcall GiveCoins
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Script_takecoins:
|
Script_takecoins:
|
||||||
@ -2338,7 +2338,7 @@ Script_takecoins:
|
|||||||
; coins (CoinByteParam)
|
; coins (CoinByteParam)
|
||||||
|
|
||||||
call LoadCoinAmountToMem
|
call LoadCoinAmountToMem
|
||||||
callba TakeCoins
|
farcall TakeCoins
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Script_checkcoins:
|
Script_checkcoins:
|
||||||
@ -2347,7 +2347,7 @@ Script_checkcoins:
|
|||||||
; coins (CoinByteParam)
|
; coins (CoinByteParam)
|
||||||
|
|
||||||
call LoadCoinAmountToMem
|
call LoadCoinAmountToMem
|
||||||
callba CheckCoins
|
farcall CheckCoins
|
||||||
jr CompareMoneyAction
|
jr CompareMoneyAction
|
||||||
|
|
||||||
LoadCoinAmountToMem:
|
LoadCoinAmountToMem:
|
||||||
@ -2365,7 +2365,7 @@ Script_checktime:
|
|||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
callba CheckTime
|
farcall CheckTime
|
||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
and c
|
and c
|
||||||
ret z
|
ret z
|
||||||
@ -2398,7 +2398,7 @@ Script_addcellnum:
|
|||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
ld c, a
|
ld c, a
|
||||||
callba AddPhoneNumber
|
farcall AddPhoneNumber
|
||||||
ret nc
|
ret nc
|
||||||
ld a, TRUE
|
ld a, TRUE
|
||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
@ -2413,7 +2413,7 @@ Script_delcellnum:
|
|||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
ld c, a
|
ld c, a
|
||||||
callba DelCellNum
|
farcall DelCellNum
|
||||||
ret nc
|
ret nc
|
||||||
ld a, TRUE
|
ld a, TRUE
|
||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
@ -2429,7 +2429,7 @@ Script_checkcellnum:
|
|||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
ld c, a
|
ld c, a
|
||||||
callba CheckCellNum
|
farcall CheckCellNum
|
||||||
ret nc
|
ret nc
|
||||||
ld a, TRUE
|
ld a, TRUE
|
||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
@ -2487,7 +2487,7 @@ Script_givepoke:
|
|||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
.ok
|
.ok
|
||||||
callba GivePoke
|
farcall GivePoke
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
ret
|
ret
|
||||||
@ -2506,7 +2506,7 @@ Script_giveegg:
|
|||||||
ld [CurPartySpecies], a
|
ld [CurPartySpecies], a
|
||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
ld [CurPartyLevel], a
|
ld [CurPartyLevel], a
|
||||||
callba GiveEgg
|
farcall GiveEgg
|
||||||
ret nc
|
ret nc
|
||||||
ld a, 2
|
ld a, 2
|
||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
@ -2603,7 +2603,7 @@ Script_checkflag:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
_EngineFlagAction:
|
_EngineFlagAction:
|
||||||
callba EngineFlagAction
|
farcall EngineFlagAction
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Script_wildoff:
|
Script_wildoff:
|
||||||
@ -2735,7 +2735,7 @@ Script_writecmdqueue:
|
|||||||
ld d, a
|
ld d, a
|
||||||
ld a, [ScriptBank]
|
ld a, [ScriptBank]
|
||||||
ld b, a
|
ld b, a
|
||||||
callba WriteCmdQueue ; no need to farcall
|
farcall WriteCmdQueue ; no need to farcall
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Script_delcmdqueue:
|
Script_delcmdqueue:
|
||||||
@ -2747,7 +2747,7 @@ Script_delcmdqueue:
|
|||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
ld b, a
|
ld b, a
|
||||||
callba DelCmdQueue ; no need to farcall
|
farcall DelCmdQueue ; no need to farcall
|
||||||
ret c
|
ret c
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
@ -2794,7 +2794,7 @@ Script_reloadmappart::
|
|||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
call OverworldTextModeSwitch
|
call OverworldTextModeSwitch
|
||||||
call GetMovementPermissions
|
call GetMovementPermissions
|
||||||
callba ReloadMapPart
|
farcall ReloadMapPart
|
||||||
call UpdateSprites
|
call UpdateSprites
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -2803,11 +2803,11 @@ Script_warpcheck:
|
|||||||
|
|
||||||
call WarpCheck
|
call WarpCheck
|
||||||
ret nc
|
ret nc
|
||||||
callba EnableEvents
|
farcall EnableEvents
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Script_enableevents: ; unreferenced
|
Script_enableevents: ; unreferenced
|
||||||
callba EnableEvents
|
farcall EnableEvents
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Script_newloadmap:
|
Script_newloadmap:
|
||||||
@ -2993,9 +2993,9 @@ Script_halloffame:
|
|||||||
|
|
||||||
ld hl, GameTimerPause
|
ld hl, GameTimerPause
|
||||||
res 0, [hl]
|
res 0, [hl]
|
||||||
callba TrainerRankings_HallOfFame
|
farcall TrainerRankings_HallOfFame
|
||||||
callba TrainerRankings_HallOfFame2
|
farcall TrainerRankings_HallOfFame2
|
||||||
callba HallOfFame
|
farcall HallOfFame
|
||||||
ld hl, GameTimerPause
|
ld hl, GameTimerPause
|
||||||
set 0, [hl]
|
set 0, [hl]
|
||||||
jr ReturnFromCredits
|
jr ReturnFromCredits
|
||||||
@ -3003,7 +3003,7 @@ Script_halloffame:
|
|||||||
Script_credits:
|
Script_credits:
|
||||||
; script command 0xa2
|
; script command 0xa2
|
||||||
|
|
||||||
callba RedCredits
|
farcall RedCredits
|
||||||
ReturnFromCredits:
|
ReturnFromCredits:
|
||||||
call Script_end_all
|
call Script_end_all
|
||||||
ld a, $3
|
ld a, $3
|
||||||
@ -3031,7 +3031,7 @@ Script_wait:
|
|||||||
Script_check_save:
|
Script_check_save:
|
||||||
; script command 0xa9
|
; script command 0xa9
|
||||||
|
|
||||||
callba CheckSave
|
farcall CheckSave
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
ret
|
ret
|
||||||
|
@ -120,7 +120,7 @@ CheckRegisteredItem: ; 13345
|
|||||||
|
|
||||||
UseRegisteredItem: ; 133c3
|
UseRegisteredItem: ; 133c3
|
||||||
|
|
||||||
callba CheckItemMenu
|
farcall CheckItemMenu
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeParamBuffer]
|
||||||
ld hl, .SwitchTo
|
ld hl, .SwitchTo
|
||||||
rst JumpTable
|
rst JumpTable
|
||||||
|
@ -20,7 +20,7 @@ _SlotMachine:
|
|||||||
call PlaySFX
|
call PlaySFX
|
||||||
call WaitSFX
|
call WaitSFX
|
||||||
call ClearBGPalettes
|
call ClearBGPalettes
|
||||||
callba TrainerRankings_EndSlotsWinStreak
|
farcall TrainerRankings_EndSlotsWinStreak
|
||||||
ld hl, Options
|
ld hl, Options
|
||||||
res NO_TEXT_SCROLL, [hl]
|
res NO_TEXT_SCROLL, [hl]
|
||||||
ld hl, rLCDC ; $ff40
|
ld hl, rLCDC ; $ff40
|
||||||
@ -41,7 +41,7 @@ _SlotMachine:
|
|||||||
call ByteFill
|
call ByteFill
|
||||||
ld b, SCGB_SLOT_MACHINE
|
ld b, SCGB_SLOT_MACHINE
|
||||||
call GetSGBLayout
|
call GetSGBLayout
|
||||||
callab ClearSpriteAnims
|
callfar ClearSpriteAnims
|
||||||
ld hl, wSlots
|
ld hl, wSlots
|
||||||
ld bc, wSlotsDataEnd - wSlots
|
ld bc, wSlotsDataEnd - wSlots
|
||||||
xor a
|
xor a
|
||||||
@ -116,7 +116,7 @@ SlotsLoop: ; 927af (24:67af)
|
|||||||
call Slots_SpinReels
|
call Slots_SpinReels
|
||||||
xor a
|
xor a
|
||||||
ld [wCurrSpriteOAMAddr], a
|
ld [wCurrSpriteOAMAddr], a
|
||||||
callab DoNextFrameForFirst16Sprites
|
callfar DoNextFrameForFirst16Sprites
|
||||||
call .PrintCoinsAndPayout
|
call .PrintCoinsAndPayout
|
||||||
call .DummyFunc
|
call .DummyFunc
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
@ -1812,7 +1812,7 @@ SlotGetPayout: ; 93124 (24:7124)
|
|||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wPayout], a
|
ld [wPayout], a
|
||||||
ld d, a
|
ld d, a
|
||||||
callba TrainerRankings_AddToSlotsPayouts
|
farcall TrainerRankings_AddToSlotsPayouts
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.PayoutTable:
|
.PayoutTable:
|
||||||
@ -1836,7 +1836,7 @@ SlotPayoutText: ; 93158 (24:7158)
|
|||||||
jr nz, .MatchedSomething
|
jr nz, .MatchedSomething
|
||||||
ld hl, .Text_Darn
|
ld hl, .Text_Darn
|
||||||
call PrintText
|
call PrintText
|
||||||
callba TrainerRankings_EndSlotsWinStreak
|
farcall TrainerRankings_EndSlotsWinStreak
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.MatchedSomething:
|
.MatchedSomething:
|
||||||
@ -1860,7 +1860,7 @@ SlotPayoutText: ; 93158 (24:7158)
|
|||||||
.return
|
.return
|
||||||
ld hl, .Text_PrintPayout
|
ld hl, .Text_PrintPayout
|
||||||
call PrintText
|
call PrintText
|
||||||
callba TrainerRankings_AddToSlotsWinStreak
|
farcall TrainerRankings_AddToSlotsWinStreak
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; 93195 (24:7195)
|
; 93195 (24:7195)
|
||||||
@ -2001,7 +2001,7 @@ SlotMachine_AnimateGolem: ; 9321d (24:721d)
|
|||||||
dec [hl]
|
dec [hl]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 14 * 8
|
ld d, 14 * 8
|
||||||
callba BattleAnim_Sine_e
|
farcall BattleAnim_Sine_e
|
||||||
ld a, e
|
ld a, e
|
||||||
ld hl, SPRITEANIMSTRUCT_YOFFSET
|
ld hl, SPRITEANIMSTRUCT_YOFFSET
|
||||||
add hl, bc
|
add hl, bc
|
||||||
|
@ -200,7 +200,7 @@ SpecialNone: ; c224
|
|||||||
Special_SetPlayerPalette: ; c225
|
Special_SetPlayerPalette: ; c225
|
||||||
ld a, [ScriptVar]
|
ld a, [ScriptVar]
|
||||||
ld d, a
|
ld d, a
|
||||||
callba SetPlayerPalette
|
farcall SetPlayerPalette
|
||||||
ret
|
ret
|
||||||
; c230
|
; c230
|
||||||
|
|
||||||
@ -215,7 +215,7 @@ Special_GameCornerPrizeMonCheckDex: ; c230
|
|||||||
call FadeToMenu
|
call FadeToMenu
|
||||||
ld a, [ScriptVar]
|
ld a, [ScriptVar]
|
||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
callba NewPokedexEntry
|
farcall NewPokedexEntry
|
||||||
call ExitAllMenus
|
call ExitAllMenus
|
||||||
ret
|
ret
|
||||||
; c252
|
; c252
|
||||||
@ -230,28 +230,28 @@ SpecialSeenMon: ; c252
|
|||||||
Special_FindGreaterThanThatLevel: ; c25a
|
Special_FindGreaterThanThatLevel: ; c25a
|
||||||
ld a, [ScriptVar]
|
ld a, [ScriptVar]
|
||||||
ld b, a
|
ld b, a
|
||||||
callba _FindGreaterThanThatLevel
|
farcall _FindGreaterThanThatLevel
|
||||||
jr z, FoundNone
|
jr z, FoundNone
|
||||||
jr FoundOne
|
jr FoundOne
|
||||||
|
|
||||||
Special_FindAtLeastThatHappy: ; c268
|
Special_FindAtLeastThatHappy: ; c268
|
||||||
ld a, [ScriptVar]
|
ld a, [ScriptVar]
|
||||||
ld b, a
|
ld b, a
|
||||||
callba _FindAtLeastThatHappy
|
farcall _FindAtLeastThatHappy
|
||||||
jr z, FoundNone
|
jr z, FoundNone
|
||||||
jr FoundOne
|
jr FoundOne
|
||||||
|
|
||||||
Special_FindThatSpecies: ; c276
|
Special_FindThatSpecies: ; c276
|
||||||
ld a, [ScriptVar]
|
ld a, [ScriptVar]
|
||||||
ld b, a
|
ld b, a
|
||||||
callba _FindThatSpecies
|
farcall _FindThatSpecies
|
||||||
jr z, FoundNone
|
jr z, FoundNone
|
||||||
jr FoundOne
|
jr FoundOne
|
||||||
|
|
||||||
Special_FindThatSpeciesYourTrainerID: ; c284
|
Special_FindThatSpeciesYourTrainerID: ; c284
|
||||||
ld a, [ScriptVar]
|
ld a, [ScriptVar]
|
||||||
ld b, a
|
ld b, a
|
||||||
callba _FindThatSpeciesYourTrainerID
|
farcall _FindThatSpeciesYourTrainerID
|
||||||
jr z, FoundNone
|
jr z, FoundNone
|
||||||
jr FoundOne
|
jr FoundOne
|
||||||
|
|
||||||
@ -269,7 +269,7 @@ FoundNone: ; c298
|
|||||||
SpecialNameRival: ; 0xc29d
|
SpecialNameRival: ; 0xc29d
|
||||||
ld b, $2 ; rival
|
ld b, $2 ; rival
|
||||||
ld de, RivalName
|
ld de, RivalName
|
||||||
callba _NamingScreen
|
farcall _NamingScreen
|
||||||
; default to "SILVER"
|
; default to "SILVER"
|
||||||
ld hl, RivalName
|
ld hl, RivalName
|
||||||
ld de, DefaultRivalName
|
ld de, DefaultRivalName
|
||||||
@ -281,27 +281,27 @@ DefaultRivalName: ; 0xc2b2
|
|||||||
db "SILVER@"
|
db "SILVER@"
|
||||||
|
|
||||||
SpecialNameRater: ; c2b9
|
SpecialNameRater: ; c2b9
|
||||||
callba NameRater
|
farcall NameRater
|
||||||
ret
|
ret
|
||||||
; c2c0
|
; c2c0
|
||||||
|
|
||||||
Special_TownMap: ; c2c0
|
Special_TownMap: ; c2c0
|
||||||
call FadeToMenu
|
call FadeToMenu
|
||||||
callba _TownMap
|
farcall _TownMap
|
||||||
call ExitAllMenus
|
call ExitAllMenus
|
||||||
ret
|
ret
|
||||||
; c2cd
|
; c2cd
|
||||||
|
|
||||||
Special_UnownPrinter: ; c2cd
|
Special_UnownPrinter: ; c2cd
|
||||||
call FadeToMenu
|
call FadeToMenu
|
||||||
callba UnownPrinter
|
farcall UnownPrinter
|
||||||
call ExitAllMenus
|
call ExitAllMenus
|
||||||
ret
|
ret
|
||||||
; c2da
|
; c2da
|
||||||
|
|
||||||
Special_DisplayLinkRecord: ; c2da
|
Special_DisplayLinkRecord: ; c2da
|
||||||
call FadeToMenu
|
call FadeToMenu
|
||||||
callba DisplayLinkRecord
|
farcall DisplayLinkRecord
|
||||||
call ExitAllMenus
|
call ExitAllMenus
|
||||||
ret
|
ret
|
||||||
; c2e7
|
; c2e7
|
||||||
@ -309,7 +309,7 @@ Special_DisplayLinkRecord: ; c2da
|
|||||||
Special_KrissHousePC: ; c2e7
|
Special_KrissHousePC: ; c2e7
|
||||||
xor a
|
xor a
|
||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
callba _KrissHousePC
|
farcall _KrissHousePC
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
ret
|
ret
|
||||||
@ -365,7 +365,7 @@ Special_GetMysteryGiftItem: ; c309
|
|||||||
; 0xc34a
|
; 0xc34a
|
||||||
|
|
||||||
BugContestJudging: ; c34a
|
BugContestJudging: ; c34a
|
||||||
callba _BugContestJudging
|
farcall _BugContestJudging
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
ret
|
ret
|
||||||
@ -374,13 +374,13 @@ BugContestJudging: ; c34a
|
|||||||
MapRadio: ; c355
|
MapRadio: ; c355
|
||||||
ld a, [ScriptVar]
|
ld a, [ScriptVar]
|
||||||
ld e, a
|
ld e, a
|
||||||
callba PlayRadio
|
farcall PlayRadio
|
||||||
ret
|
ret
|
||||||
; c360
|
; c360
|
||||||
|
|
||||||
Special_UnownPuzzle: ; c360
|
Special_UnownPuzzle: ; c360
|
||||||
call FadeToMenu
|
call FadeToMenu
|
||||||
callba UnownPuzzle
|
farcall UnownPuzzle
|
||||||
ld a, [wSolvedUnownPuzzle]
|
ld a, [wSolvedUnownPuzzle]
|
||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
call ExitAllMenus
|
call ExitAllMenus
|
||||||
@ -485,7 +485,7 @@ ScriptReturnCarry: ; c3e2
|
|||||||
; c3ef
|
; c3ef
|
||||||
|
|
||||||
Special_CheckUnusedTwoDayTimer: ; c3ef
|
Special_CheckUnusedTwoDayTimer: ; c3ef
|
||||||
callba CheckUnusedTwoDayTimer
|
farcall CheckUnusedTwoDayTimer
|
||||||
ld a, [wUnusedTwoDayTimer]
|
ld a, [wUnusedTwoDayTimer]
|
||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
ret
|
ret
|
||||||
@ -520,20 +520,20 @@ StoreSwarmMapIndices:: ; c403
|
|||||||
|
|
||||||
SpecialCheckPokerus: ; c419
|
SpecialCheckPokerus: ; c419
|
||||||
; Check if a monster in your party has Pokerus
|
; Check if a monster in your party has Pokerus
|
||||||
callba CheckPokerus
|
farcall CheckPokerus
|
||||||
jp ScriptReturnCarry
|
jp ScriptReturnCarry
|
||||||
; c422
|
; c422
|
||||||
|
|
||||||
Special_ResetLuckyNumberShowFlag: ; c422
|
Special_ResetLuckyNumberShowFlag: ; c422
|
||||||
callba RestartLuckyNumberCountdown
|
farcall RestartLuckyNumberCountdown
|
||||||
ld hl, wLuckyNumberShowFlag
|
ld hl, wLuckyNumberShowFlag
|
||||||
res 0, [hl]
|
res 0, [hl]
|
||||||
callba LoadOrRegenerateLuckyIDNumber
|
farcall LoadOrRegenerateLuckyIDNumber
|
||||||
ret
|
ret
|
||||||
; c434
|
; c434
|
||||||
|
|
||||||
Special_CheckLuckyNumberShowFlag: ; c434
|
Special_CheckLuckyNumberShowFlag: ; c434
|
||||||
callba CheckLuckyNumberShowFlag
|
farcall CheckLuckyNumberShowFlag
|
||||||
jp ScriptReturnCarry
|
jp ScriptReturnCarry
|
||||||
; c43d
|
; c43d
|
||||||
|
|
||||||
@ -628,14 +628,14 @@ Special_FadeOutMusic: ; c48f
|
|||||||
|
|
||||||
Diploma: ; c49f
|
Diploma: ; c49f
|
||||||
call FadeToMenu
|
call FadeToMenu
|
||||||
callba _Diploma
|
farcall _Diploma
|
||||||
call ExitAllMenus
|
call ExitAllMenus
|
||||||
ret
|
ret
|
||||||
; c4ac
|
; c4ac
|
||||||
|
|
||||||
PrintDiploma: ; c4ac
|
PrintDiploma: ; c4ac
|
||||||
call FadeToMenu
|
call FadeToMenu
|
||||||
callba _PrintDiploma
|
farcall _PrintDiploma
|
||||||
call ExitAllMenus
|
call ExitAllMenus
|
||||||
ret
|
ret
|
||||||
; c4b9
|
; c4b9
|
||||||
|
@ -218,15 +218,15 @@ DoAnimFrame: ; 8d24b
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.NamingScreenCursor ; 8d36c (23:536c)
|
.NamingScreenCursor ; 8d36c (23:536c)
|
||||||
callab NamingScreen_AnimateCursor
|
callfar NamingScreen_AnimateCursor
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.MailCursor ; 8d373 (23:5373)
|
.MailCursor ; 8d373 (23:5373)
|
||||||
callab ComposeMail_AnimateCursor
|
callfar ComposeMail_AnimateCursor
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.GameFreakLogo: ; 8d37a (23:537a)
|
.GameFreakLogo: ; 8d37a (23:537a)
|
||||||
callab GameFreakLogoJumper
|
callfar GameFreakLogoJumper
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.GSIntroStar ; 8d381 (23:5381)
|
.GSIntroStar ; 8d381 (23:5381)
|
||||||
@ -357,11 +357,11 @@ DoAnimFrame: ; 8d24b
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.SlotsGolem: ; 8d422 (23:5422)
|
.SlotsGolem: ; 8d422 (23:5422)
|
||||||
callab SlotMachine_AnimateGolem
|
callfar SlotMachine_AnimateGolem
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.SlotsChansey: ; 8d429 (23:5429)
|
.SlotsChansey: ; 8d429 (23:5429)
|
||||||
callab Slots_AnimateChansey
|
callfar Slots_AnimateChansey
|
||||||
ld hl, wcf64
|
ld hl, wcf64
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp $2
|
cp $2
|
||||||
@ -405,15 +405,15 @@ DoAnimFrame: ; 8d24b
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.ForUnusedCursor ; 8d46e (23:546e)
|
.ForUnusedCursor ; 8d46e (23:546e)
|
||||||
callab ret_e00ed
|
callfar ret_e00ed
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.PokegearArrow ; 8d475 (23:5475)
|
.PokegearArrow ; 8d475 (23:5475)
|
||||||
callab AnimatePokegearModeIndicatorArrow
|
callfar AnimatePokegearModeIndicatorArrow
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.DummyGameCursor ; 8d47c (23:547c)
|
.DummyGameCursor ; 8d47c (23:547c)
|
||||||
callab DummyGame_InterpretJoypad_AnimateCursor
|
callfar DummyGame_InterpretJoypad_AnimateCursor
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.TradePokeBall ; 8d483 (23:5483)
|
.TradePokeBall ; 8d483 (23:5483)
|
||||||
@ -566,7 +566,7 @@ DoAnimFrame: ; 8d24b
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.TrademonInTube ; 8d543 (23:5543)
|
.TrademonInTube ; 8d543 (23:5543)
|
||||||
callab TradeAnim_AnimateTrademonInTube
|
callfar TradeAnim_AnimateTrademonInTube
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.RevealNewMon: ; 8d54a (23:554a)
|
.RevealNewMon: ; 8d54a (23:554a)
|
||||||
@ -607,7 +607,7 @@ DoAnimFrame: ; 8d24b
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.RadioTuningKnob: ; 8d578 (23:5578)
|
.RadioTuningKnob: ; 8d578 (23:5578)
|
||||||
callab AnimateTuningKnob
|
callfar AnimateTuningKnob
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.CutLeaves ; 8d57f (23:557f)
|
.CutLeaves ; 8d57f (23:557f)
|
||||||
@ -750,11 +750,11 @@ DoAnimFrame: ; 8d24b
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.sprite_anim_seq_1B ; 8d630 (23:5630)
|
.sprite_anim_seq_1B ; 8d630 (23:5630)
|
||||||
callba Function108bc7
|
farcall Function108bc7
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.sprite_anim_seq_1C ; 8d637 (23:5637)
|
.sprite_anim_seq_1C ; 8d637 (23:5637)
|
||||||
callba Function108be0
|
farcall Function108be0
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.IntroSuicune ; 8d63e (23:563e)
|
.IntroSuicune ; 8d63e (23:563e)
|
||||||
@ -847,11 +847,11 @@ DoAnimFrame: ; 8d24b
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.sprite_anim_seq_1A ; 8d6b7 (23:56b7)
|
.sprite_anim_seq_1A ; 8d6b7 (23:56b7)
|
||||||
callba AnimateEZChatCursor
|
farcall AnimateEZChatCursor
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.Celebi ; 8d6be (23:56be)
|
.Celebi ; 8d6be (23:56be)
|
||||||
callba UpdateCelebiPosition
|
farcall UpdateCelebiPosition
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.AnonymousJumptable: ; 8d6c5 (23:56c5)
|
.AnonymousJumptable: ; 8d6c5 (23:56c5)
|
||||||
|
@ -5,7 +5,7 @@ ShowLinkBattleParticipants: ; 2ee18
|
|||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
|
|
||||||
callba _ShowLinkBattleParticipants
|
farcall _ShowLinkBattleParticipants
|
||||||
ld c, 150
|
ld c, 150
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
call ClearTileMap
|
call ClearTileMap
|
||||||
@ -34,7 +34,7 @@ FindFirstAliveMonAndStartBattle: ; 2ee2f
|
|||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [BattleMonLevel], a
|
ld [BattleMonLevel], a
|
||||||
predef Predef_StartBattle
|
predef Predef_StartBattle
|
||||||
callba _LoadBattleFontsHPBar
|
farcall _LoadBattleFontsHPBar
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
@ -70,7 +70,7 @@ PlayBattleMusic: ; 2ee6c
|
|||||||
and a
|
and a
|
||||||
jr nz, .trainermusic
|
jr nz, .trainermusic
|
||||||
|
|
||||||
callba RegionCheck
|
farcall RegionCheck
|
||||||
ld a, e
|
ld a, e
|
||||||
and a
|
and a
|
||||||
jr nz, .kantowild
|
jr nz, .kantowild
|
||||||
@ -101,11 +101,11 @@ PlayBattleMusic: ; 2ee6c
|
|||||||
jr z, .done
|
jr z, .done
|
||||||
|
|
||||||
ld de, MUSIC_KANTO_GYM_LEADER_BATTLE
|
ld de, MUSIC_KANTO_GYM_LEADER_BATTLE
|
||||||
callba IsKantoGymLeader
|
farcall IsKantoGymLeader
|
||||||
jr c, .done
|
jr c, .done
|
||||||
|
|
||||||
ld de, MUSIC_JOHTO_GYM_LEADER_BATTLE
|
ld de, MUSIC_JOHTO_GYM_LEADER_BATTLE
|
||||||
callba IsJohtoGymLeader
|
farcall IsJohtoGymLeader
|
||||||
jr c, .done
|
jr c, .done
|
||||||
|
|
||||||
ld de, MUSIC_RIVAL_BATTLE
|
ld de, MUSIC_RIVAL_BATTLE
|
||||||
@ -126,7 +126,7 @@ PlayBattleMusic: ; 2ee6c
|
|||||||
and a
|
and a
|
||||||
jr nz, .johtotrainer
|
jr nz, .johtotrainer
|
||||||
|
|
||||||
callba RegionCheck
|
farcall RegionCheck
|
||||||
ld a, e
|
ld a, e
|
||||||
and a
|
and a
|
||||||
jr nz, .kantotrainer
|
jr nz, .kantotrainer
|
||||||
@ -186,7 +186,7 @@ ClearBattleRAM: ; 2ef18
|
|||||||
xor a
|
xor a
|
||||||
call ByteFill
|
call ByteFill
|
||||||
|
|
||||||
callab ResetEnemyStatLevels
|
callfar ResetEnemyStatLevels
|
||||||
|
|
||||||
call ClearWindowData
|
call ClearWindowData
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ StartMenu:: ; 125cd
|
|||||||
ld de, SFX_MENU
|
ld de, SFX_MENU
|
||||||
call PlaySFX
|
call PlaySFX
|
||||||
|
|
||||||
callba ReanchorBGMap_NoOAMUpdate
|
farcall ReanchorBGMap_NoOAMUpdate
|
||||||
|
|
||||||
ld hl, StatusFlags2
|
ld hl, StatusFlags2
|
||||||
bit 2, [hl] ; bug catching contest
|
bit 2, [hl] ; bug catching contest
|
||||||
@ -23,7 +23,7 @@ StartMenu:: ; 125cd
|
|||||||
call .DrawBugContestStatusBox
|
call .DrawBugContestStatusBox
|
||||||
call SafeUpdateSprites
|
call SafeUpdateSprites
|
||||||
call _OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
|
call _OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
|
||||||
callba LoadFonts_NoOAMUpdate
|
farcall LoadFonts_NoOAMUpdate
|
||||||
call .DrawBugContestStatus
|
call .DrawBugContestStatus
|
||||||
call UpdateTimePals
|
call UpdateTimePals
|
||||||
jr .Select
|
jr .Select
|
||||||
@ -393,7 +393,7 @@ endr
|
|||||||
ld hl, StatusFlags2
|
ld hl, StatusFlags2
|
||||||
bit 2, [hl] ; bug catching contest
|
bit 2, [hl] ; bug catching contest
|
||||||
ret z
|
ret z
|
||||||
callba StartMenu_DrawBugContestStatusBox
|
farcall StartMenu_DrawBugContestStatusBox
|
||||||
ret
|
ret
|
||||||
; 128de
|
; 128de
|
||||||
|
|
||||||
@ -403,7 +403,7 @@ endr
|
|||||||
jr nz, .contest
|
jr nz, .contest
|
||||||
ret
|
ret
|
||||||
.contest
|
.contest
|
||||||
callba StartMenu_PrintBugContestStatus
|
farcall StartMenu_PrintBugContestStatus
|
||||||
ret
|
ret
|
||||||
; 128ed
|
; 128ed
|
||||||
|
|
||||||
@ -442,7 +442,7 @@ StartMenu_Save: ; 1290b
|
|||||||
; Save the game.
|
; Save the game.
|
||||||
|
|
||||||
call BufferScreen
|
call BufferScreen
|
||||||
callba SaveMenu
|
farcall SaveMenu
|
||||||
jr nc, .asm_12919
|
jr nc, .asm_12919
|
||||||
ld a, 0
|
ld a, 0
|
||||||
ret
|
ret
|
||||||
@ -456,7 +456,7 @@ StartMenu_Option: ; 1291c
|
|||||||
; Game options.
|
; Game options.
|
||||||
|
|
||||||
call FadeToMenu
|
call FadeToMenu
|
||||||
callba OptionsMenu
|
farcall OptionsMenu
|
||||||
ld a, 6
|
ld a, 6
|
||||||
ret
|
ret
|
||||||
; 12928
|
; 12928
|
||||||
@ -466,7 +466,7 @@ StartMenu_Status: ; 12928
|
|||||||
; Player status.
|
; Player status.
|
||||||
|
|
||||||
call FadeToMenu
|
call FadeToMenu
|
||||||
callba TrainerCard
|
farcall TrainerCard
|
||||||
call CloseSubmenu
|
call CloseSubmenu
|
||||||
ld a, 0
|
ld a, 0
|
||||||
ret
|
ret
|
||||||
@ -480,7 +480,7 @@ StartMenu_Pokedex: ; 12937
|
|||||||
jr z, .asm_12949
|
jr z, .asm_12949
|
||||||
|
|
||||||
call FadeToMenu
|
call FadeToMenu
|
||||||
callba Pokedex
|
farcall Pokedex
|
||||||
call CloseSubmenu
|
call CloseSubmenu
|
||||||
|
|
||||||
.asm_12949
|
.asm_12949
|
||||||
@ -492,7 +492,7 @@ StartMenu_Pokedex: ; 12937
|
|||||||
StartMenu_Pokegear: ; 1294c
|
StartMenu_Pokegear: ; 1294c
|
||||||
|
|
||||||
call FadeToMenu
|
call FadeToMenu
|
||||||
callba PokeGear
|
farcall PokeGear
|
||||||
call CloseSubmenu
|
call CloseSubmenu
|
||||||
ld a, 0
|
ld a, 0
|
||||||
ret
|
ret
|
||||||
@ -502,7 +502,7 @@ StartMenu_Pokegear: ; 1294c
|
|||||||
StartMenu_Pack: ; 1295b
|
StartMenu_Pack: ; 1295b
|
||||||
|
|
||||||
call FadeToMenu
|
call FadeToMenu
|
||||||
callba Pack
|
farcall Pack
|
||||||
ld a, [wcf66]
|
ld a, [wcf66]
|
||||||
and a
|
and a
|
||||||
jr nz, .used_item
|
jr nz, .used_item
|
||||||
@ -531,17 +531,17 @@ StartMenu_Pokemon: ; 12976
|
|||||||
call ClearBGPalettes
|
call ClearBGPalettes
|
||||||
|
|
||||||
.menu
|
.menu
|
||||||
callba LoadPartyMenuGFX
|
farcall LoadPartyMenuGFX
|
||||||
callba InitPartyMenuWithCancel
|
farcall InitPartyMenuWithCancel
|
||||||
callba InitPartyMenuGFX
|
farcall InitPartyMenuGFX
|
||||||
|
|
||||||
.menunoreload
|
.menunoreload
|
||||||
callba WritePartyMenuTilemap
|
farcall WritePartyMenuTilemap
|
||||||
callba PrintPartyMenuText
|
farcall PrintPartyMenuText
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
call SetPalettes ; load regular palettes?
|
call SetPalettes ; load regular palettes?
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
callba PartyMenuSelect
|
farcall PartyMenuSelect
|
||||||
jr c, .return ; if cancelled or pressed B
|
jr c, .return ; if cancelled or pressed B
|
||||||
|
|
||||||
call PokemonActionSubmenu
|
call PokemonActionSubmenu
|
||||||
@ -594,13 +594,13 @@ HasNoItems: ; 129d5
|
|||||||
TossItemFromPC: ; 129f4
|
TossItemFromPC: ; 129f4
|
||||||
push de
|
push de
|
||||||
call PartyMonItemName
|
call PartyMonItemName
|
||||||
callba _CheckTossableItem
|
farcall _CheckTossableItem
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeParamBuffer]
|
||||||
and a
|
and a
|
||||||
jr nz, .key_item
|
jr nz, .key_item
|
||||||
ld hl, .TossHowMany
|
ld hl, .TossHowMany
|
||||||
call MenuTextBox
|
call MenuTextBox
|
||||||
callba SelectQuantityToToss
|
farcall SelectQuantityToToss
|
||||||
push af
|
push af
|
||||||
call CloseWindow
|
call CloseWindow
|
||||||
call ExitMenu
|
call ExitMenu
|
||||||
@ -678,8 +678,8 @@ PartyMonItemName: ; 12a6c
|
|||||||
|
|
||||||
|
|
||||||
CancelPokemonAction: ; 12a79
|
CancelPokemonAction: ; 12a79
|
||||||
callba InitPartyMenuWithCancel
|
farcall InitPartyMenuWithCancel
|
||||||
callba UnfreezeMonIcons
|
farcall UnfreezeMonIcons
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ret
|
ret
|
||||||
; 12a88
|
; 12a88
|
||||||
@ -689,7 +689,7 @@ PokemonActionSubmenu: ; 12a88
|
|||||||
hlcoord 1, 15
|
hlcoord 1, 15
|
||||||
lb bc, 2, 18
|
lb bc, 2, 18
|
||||||
call ClearBox
|
call ClearBox
|
||||||
callba MonSubmenu
|
farcall MonSubmenu
|
||||||
call GetCurNick
|
call GetCurNick
|
||||||
ld a, [MenuSelection]
|
ld a, [MenuSelection]
|
||||||
ld hl, .Actions
|
ld hl, .Actions
|
||||||
@ -742,13 +742,13 @@ SwitchPartyMons: ; 12aec
|
|||||||
inc a
|
inc a
|
||||||
ld [wSwitchMon], a
|
ld [wSwitchMon], a
|
||||||
|
|
||||||
callba HoldSwitchmonIcon
|
farcall HoldSwitchmonIcon
|
||||||
callba InitPartyMenuNoCancel
|
farcall InitPartyMenuNoCancel
|
||||||
|
|
||||||
ld a, PARTYMENUACTION_MOVE
|
ld a, PARTYMENUACTION_MOVE
|
||||||
ld [PartyMenuActionText], a
|
ld [PartyMenuActionText], a
|
||||||
callba WritePartyMenuTilemap
|
farcall WritePartyMenuTilemap
|
||||||
callba PrintPartyMenuText
|
farcall PrintPartyMenuText
|
||||||
|
|
||||||
hlcoord 0, 1
|
hlcoord 0, 1
|
||||||
ld bc, 20 * 2
|
ld bc, 20 * 2
|
||||||
@ -760,18 +760,18 @@ SwitchPartyMons: ; 12aec
|
|||||||
call SetPalettes
|
call SetPalettes
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
|
|
||||||
callba PartyMenuSelect
|
farcall PartyMenuSelect
|
||||||
bit 1, b
|
bit 1, b
|
||||||
jr c, .DontSwitch
|
jr c, .DontSwitch
|
||||||
|
|
||||||
callba _SwitchPartyMons
|
farcall _SwitchPartyMons
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [PartyMenuActionText], a
|
ld [PartyMenuActionText], a
|
||||||
|
|
||||||
callba LoadPartyMenuGFX
|
farcall LoadPartyMenuGFX
|
||||||
callba InitPartyMenuWithCancel
|
farcall InitPartyMenuWithCancel
|
||||||
callba InitPartyMenuGFX
|
farcall InitPartyMenuGFX
|
||||||
|
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ret
|
ret
|
||||||
@ -828,10 +828,10 @@ GiveTakePartyMonItem: ; 12b60
|
|||||||
|
|
||||||
.GiveItem:
|
.GiveItem:
|
||||||
|
|
||||||
callba DepositSellInitPackBuffers
|
farcall DepositSellInitPackBuffers
|
||||||
|
|
||||||
.loop
|
.loop
|
||||||
callba DepositSellPack
|
farcall DepositSellPack
|
||||||
|
|
||||||
ld a, [wcf66]
|
ld a, [wcf66]
|
||||||
and a
|
and a
|
||||||
@ -870,7 +870,7 @@ TryGiveItemToPartymon: ; 12bd9
|
|||||||
|
|
||||||
push hl
|
push hl
|
||||||
ld d, a
|
ld d, a
|
||||||
callba ItemIsMail
|
farcall ItemIsMail
|
||||||
pop hl
|
pop hl
|
||||||
jr c, .please_remove_mail
|
jr c, .please_remove_mail
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
@ -930,7 +930,7 @@ GivePartyItem: ; 12c4c
|
|||||||
ld a, [CurItem]
|
ld a, [CurItem]
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld d, a
|
ld d, a
|
||||||
callba ItemIsMail
|
farcall ItemIsMail
|
||||||
jr nc, .done
|
jr nc, .done
|
||||||
call ComposeMailMessage
|
call ComposeMailMessage
|
||||||
|
|
||||||
@ -951,7 +951,7 @@ TakePartyItem: ; 12c60
|
|||||||
call ReceiveItemFromPokemon
|
call ReceiveItemFromPokemon
|
||||||
jr nc, .asm_12c94
|
jr nc, .asm_12c94
|
||||||
|
|
||||||
callba ItemIsMail
|
farcall ItemIsMail
|
||||||
call GetPartyItemLocation
|
call GetPartyItemLocation
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
@ -1063,7 +1063,7 @@ StartMenuYesNo: ; 12cf5
|
|||||||
|
|
||||||
ComposeMailMessage: ; 12cfe (4:6cfe)
|
ComposeMailMessage: ; 12cfe (4:6cfe)
|
||||||
ld de, wTempMailMessage
|
ld de, wTempMailMessage
|
||||||
callba _ComposeMailMessage
|
farcall _ComposeMailMessage
|
||||||
ld hl, PlayerName
|
ld hl, PlayerName
|
||||||
ld de, wTempMailAuthor
|
ld de, wTempMailAuthor
|
||||||
ld bc, NAME_LENGTH - 1
|
ld bc, NAME_LENGTH - 1
|
||||||
@ -1116,7 +1116,7 @@ MonMailAction: ; 12d45
|
|||||||
jp .done
|
jp .done
|
||||||
|
|
||||||
.read
|
.read
|
||||||
callba ReadPartyMonMail
|
farcall ReadPartyMonMail
|
||||||
ld a, $0
|
ld a, $0
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -1126,7 +1126,7 @@ MonMailAction: ; 12d45
|
|||||||
jr c, .RemoveMailToBag
|
jr c, .RemoveMailToBag
|
||||||
ld a, [CurPartyMon]
|
ld a, [CurPartyMon]
|
||||||
ld b, a
|
ld b, a
|
||||||
callba SendMailToPC
|
farcall SendMailToPC
|
||||||
jr c, .MailboxFull
|
jr c, .MailboxFull
|
||||||
ld hl, .sentmailtopctext
|
ld hl, .sentmailtopctext
|
||||||
call MenuTextBoxBackup
|
call MenuTextBoxBackup
|
||||||
@ -1234,7 +1234,7 @@ OpenPartyStats: ; 12e00
|
|||||||
|
|
||||||
|
|
||||||
MonMenu_Cut: ; 12e1b
|
MonMenu_Cut: ; 12e1b
|
||||||
callba CutFunction
|
farcall CutFunction
|
||||||
ld a, [wFieldMoveSucceeded]
|
ld a, [wFieldMoveSucceeded]
|
||||||
cp $1
|
cp $1
|
||||||
jr nz, .Fail
|
jr nz, .Fail
|
||||||
@ -1249,13 +1249,13 @@ MonMenu_Cut: ; 12e1b
|
|||||||
|
|
||||||
|
|
||||||
MonMenu_Fly: ; 12e30
|
MonMenu_Fly: ; 12e30
|
||||||
callba FlyFunction
|
farcall FlyFunction
|
||||||
ld a, [wFieldMoveSucceeded]
|
ld a, [wFieldMoveSucceeded]
|
||||||
cp $2
|
cp $2
|
||||||
jr z, .Fail
|
jr z, .Fail
|
||||||
cp $0
|
cp $0
|
||||||
jr z, .Error
|
jr z, .Error
|
||||||
callba TrainerRankings_Fly
|
farcall TrainerRankings_Fly
|
||||||
ld b, $4
|
ld b, $4
|
||||||
ld a, $2
|
ld a, $2
|
||||||
ret
|
ret
|
||||||
@ -1274,7 +1274,7 @@ MonMenu_Fly: ; 12e30
|
|||||||
; 12e55
|
; 12e55
|
||||||
|
|
||||||
MonMenu_Flash: ; 12e55
|
MonMenu_Flash: ; 12e55
|
||||||
callba OWFlash
|
farcall OWFlash
|
||||||
ld a, [wFieldMoveSucceeded]
|
ld a, [wFieldMoveSucceeded]
|
||||||
cp $1
|
cp $1
|
||||||
jr nz, .Fail
|
jr nz, .Fail
|
||||||
@ -1288,7 +1288,7 @@ MonMenu_Flash: ; 12e55
|
|||||||
; 12e6a
|
; 12e6a
|
||||||
|
|
||||||
MonMenu_Strength: ; 12e6a
|
MonMenu_Strength: ; 12e6a
|
||||||
callba StrengthFunction
|
farcall StrengthFunction
|
||||||
ld a, [wFieldMoveSucceeded]
|
ld a, [wFieldMoveSucceeded]
|
||||||
cp $1
|
cp $1
|
||||||
jr nz, .Fail
|
jr nz, .Fail
|
||||||
@ -1302,7 +1302,7 @@ MonMenu_Strength: ; 12e6a
|
|||||||
; 12e7f
|
; 12e7f
|
||||||
|
|
||||||
MonMenu_Whirlpool: ; 12e7f
|
MonMenu_Whirlpool: ; 12e7f
|
||||||
callba WhirlpoolFunction
|
farcall WhirlpoolFunction
|
||||||
ld a, [wFieldMoveSucceeded]
|
ld a, [wFieldMoveSucceeded]
|
||||||
cp $1
|
cp $1
|
||||||
jr nz, .Fail
|
jr nz, .Fail
|
||||||
@ -1316,7 +1316,7 @@ MonMenu_Whirlpool: ; 12e7f
|
|||||||
; 12e94
|
; 12e94
|
||||||
|
|
||||||
MonMenu_Waterfall: ; 12e94
|
MonMenu_Waterfall: ; 12e94
|
||||||
callba WaterfallFunction
|
farcall WaterfallFunction
|
||||||
ld a, [wFieldMoveSucceeded]
|
ld a, [wFieldMoveSucceeded]
|
||||||
cp $1
|
cp $1
|
||||||
jr nz, .Fail
|
jr nz, .Fail
|
||||||
@ -1330,7 +1330,7 @@ MonMenu_Waterfall: ; 12e94
|
|||||||
; 12ea9
|
; 12ea9
|
||||||
|
|
||||||
MonMenu_Teleport: ; 12ea9
|
MonMenu_Teleport: ; 12ea9
|
||||||
callba TeleportFunction
|
farcall TeleportFunction
|
||||||
ld a, [wFieldMoveSucceeded]
|
ld a, [wFieldMoveSucceeded]
|
||||||
and a
|
and a
|
||||||
jr z, .Fail
|
jr z, .Fail
|
||||||
@ -1344,7 +1344,7 @@ MonMenu_Teleport: ; 12ea9
|
|||||||
; 12ebd
|
; 12ebd
|
||||||
|
|
||||||
MonMenu_Surf: ; 12ebd
|
MonMenu_Surf: ; 12ebd
|
||||||
callba SurfFunction
|
farcall SurfFunction
|
||||||
ld a, [wFieldMoveSucceeded]
|
ld a, [wFieldMoveSucceeded]
|
||||||
and a
|
and a
|
||||||
jr z, .Fail
|
jr z, .Fail
|
||||||
@ -1358,7 +1358,7 @@ MonMenu_Surf: ; 12ebd
|
|||||||
; 12ed1
|
; 12ed1
|
||||||
|
|
||||||
MonMenu_Dig: ; 12ed1
|
MonMenu_Dig: ; 12ed1
|
||||||
callba DigFunction
|
farcall DigFunction
|
||||||
ld a, [wFieldMoveSucceeded]
|
ld a, [wFieldMoveSucceeded]
|
||||||
cp $1
|
cp $1
|
||||||
jr nz, .Fail
|
jr nz, .Fail
|
||||||
@ -1374,7 +1374,7 @@ MonMenu_Dig: ; 12ed1
|
|||||||
MonMenu_Softboiled_MilkDrink: ; 12ee6
|
MonMenu_Softboiled_MilkDrink: ; 12ee6
|
||||||
call .CheckMonHasEnoughHP
|
call .CheckMonHasEnoughHP
|
||||||
jr nc, .NotEnoughHP
|
jr nc, .NotEnoughHP
|
||||||
callba Softboiled_MilkDrinkFunction
|
farcall Softboiled_MilkDrinkFunction
|
||||||
jr .finish
|
jr .finish
|
||||||
|
|
||||||
.NotEnoughHP:
|
.NotEnoughHP:
|
||||||
@ -1417,7 +1417,7 @@ MonMenu_Softboiled_MilkDrink: ; 12ee6
|
|||||||
; 12f26
|
; 12f26
|
||||||
|
|
||||||
MonMenu_Headbutt: ; 12f26
|
MonMenu_Headbutt: ; 12f26
|
||||||
callba HeadbuttFunction
|
farcall HeadbuttFunction
|
||||||
ld a, [wFieldMoveSucceeded]
|
ld a, [wFieldMoveSucceeded]
|
||||||
cp $1
|
cp $1
|
||||||
jr nz, .Fail
|
jr nz, .Fail
|
||||||
@ -1431,7 +1431,7 @@ MonMenu_Headbutt: ; 12f26
|
|||||||
; 12f3b
|
; 12f3b
|
||||||
|
|
||||||
MonMenu_RockSmash: ; 12f3b
|
MonMenu_RockSmash: ; 12f3b
|
||||||
callba RockSmashFunction
|
farcall RockSmashFunction
|
||||||
ld a, [wFieldMoveSucceeded]
|
ld a, [wFieldMoveSucceeded]
|
||||||
cp $1
|
cp $1
|
||||||
jr nz, .Fail
|
jr nz, .Fail
|
||||||
@ -1445,7 +1445,7 @@ MonMenu_RockSmash: ; 12f3b
|
|||||||
; 12f50
|
; 12f50
|
||||||
|
|
||||||
MonMenu_SweetScent: ; 12f50
|
MonMenu_SweetScent: ; 12f50
|
||||||
callba SweetScentFromMenu
|
farcall SweetScentFromMenu
|
||||||
ld b, $4
|
ld b, $4
|
||||||
ld a, $2
|
ld a, $2
|
||||||
ret
|
ret
|
||||||
@ -1762,8 +1762,8 @@ SetUpMoveScreenBG: ; 13172
|
|||||||
call ClearSprites
|
call ClearSprites
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
callba LoadStatsScreenPageTilesGFX
|
farcall LoadStatsScreenPageTilesGFX
|
||||||
callba ClearSpriteAnims2
|
farcall ClearSpriteAnims2
|
||||||
ld a, [CurPartyMon]
|
ld a, [CurPartyMon]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, $0
|
ld d, $0
|
||||||
@ -1772,7 +1772,7 @@ SetUpMoveScreenBG: ; 13172
|
|||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
ld e, $2
|
ld e, $2
|
||||||
callba LoadMenuMonIcon
|
farcall LoadMenuMonIcon
|
||||||
hlcoord 0, 1
|
hlcoord 0, 1
|
||||||
ld b, 9
|
ld b, 9
|
||||||
ld c, 18
|
ld c, 18
|
||||||
@ -1792,7 +1792,7 @@ SetUpMoveScreenBG: ; 13172
|
|||||||
hlcoord 5, 1
|
hlcoord 5, 1
|
||||||
call PlaceString
|
call PlaceString
|
||||||
push bc
|
push bc
|
||||||
callba CopyPkmnToTempMon
|
farcall CopyPkmnToTempMon
|
||||||
pop hl
|
pop hl
|
||||||
call PrintLevel
|
call PrintLevel
|
||||||
ld hl, PlayerHPPal
|
ld hl, PlayerHPPal
|
||||||
|
@ -33,7 +33,7 @@ StatsScreenInit_gotaddress: ; 4dc94
|
|||||||
call ClearBGPalettes
|
call ClearBGPalettes
|
||||||
call ClearTileMap
|
call ClearTileMap
|
||||||
call UpdateSprites
|
call UpdateSprites
|
||||||
callba StatsScreen_LoadFont
|
farcall StatsScreen_LoadFont
|
||||||
pop hl
|
pop hl
|
||||||
call _hl_
|
call _hl_
|
||||||
call ClearBGPalettes
|
call ClearBGPalettes
|
||||||
@ -83,13 +83,13 @@ StatsScreenMobile: ; 4dcf7
|
|||||||
or $1
|
or $1
|
||||||
ld [wcf64], a
|
ld [wcf64], a
|
||||||
.loop
|
.loop
|
||||||
callba Mobile_SetOverworldDelay
|
farcall Mobile_SetOverworldDelay
|
||||||
ld a, [wJumptableIndex]
|
ld a, [wJumptableIndex]
|
||||||
and $7f
|
and $7f
|
||||||
ld hl, StatsScreenPointerTable
|
ld hl, StatsScreenPointerTable
|
||||||
rst JumpTable
|
rst JumpTable
|
||||||
call StatsScreen_WaitAnim
|
call StatsScreen_WaitAnim
|
||||||
callba MobileComms_CheckInactivityTimer
|
farcall MobileComms_CheckInactivityTimer
|
||||||
jr c, .exit
|
jr c, .exit
|
||||||
ld a, [wJumptableIndex]
|
ld a, [wJumptableIndex]
|
||||||
bit 7, a
|
bit 7, a
|
||||||
@ -121,14 +121,14 @@ StatsScreen_WaitAnim: ; 4dd3a (13:5d3a)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.try_anim
|
.try_anim
|
||||||
callba SetUpPokeAnim
|
farcall SetUpPokeAnim
|
||||||
jr nc, .finish
|
jr nc, .finish
|
||||||
ld hl, wcf64
|
ld hl, wcf64
|
||||||
res 6, [hl]
|
res 6, [hl]
|
||||||
.finish
|
.finish
|
||||||
ld hl, wcf64
|
ld hl, wcf64
|
||||||
res 5, [hl]
|
res 5, [hl]
|
||||||
callba HDMATransferTileMapToWRAMBank3
|
farcall HDMATransferTileMapToWRAMBank3
|
||||||
ret
|
ret
|
||||||
|
|
||||||
StatsScreen_SetJumptableIndex: ; 4dd62 (13:5d62)
|
StatsScreen_SetJumptableIndex: ; 4dd62 (13:5d62)
|
||||||
@ -148,7 +148,7 @@ MonStatsInit: ; 4dd72 (13:5d72)
|
|||||||
res 6, [hl]
|
res 6, [hl]
|
||||||
call ClearBGPalettes
|
call ClearBGPalettes
|
||||||
call ClearTileMap
|
call ClearTileMap
|
||||||
callba HDMATransferTileMapToWRAMBank3
|
farcall HDMATransferTileMapToWRAMBank3
|
||||||
call StatsScreen_CopyToTempMon
|
call StatsScreen_CopyToTempMon
|
||||||
ld a, [CurPartySpecies]
|
ld a, [CurPartySpecies]
|
||||||
cp EGG
|
cp EGG
|
||||||
@ -234,14 +234,14 @@ StatsScreen_CopyToTempMon: ; 4ddf2 (13:5df2)
|
|||||||
jr .done
|
jr .done
|
||||||
|
|
||||||
.breedmon
|
.breedmon
|
||||||
callba CopyPkmnToTempMon
|
farcall CopyPkmnToTempMon
|
||||||
ld a, [CurPartySpecies]
|
ld a, [CurPartySpecies]
|
||||||
cp EGG
|
cp EGG
|
||||||
jr z, .done
|
jr z, .done
|
||||||
ld a, [MonType]
|
ld a, [MonType]
|
||||||
cp BOXMON
|
cp BOXMON
|
||||||
jr c, .done
|
jr c, .done
|
||||||
callba CalcTempmonStats
|
farcall CalcTempmonStats
|
||||||
.done
|
.done
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
@ -254,7 +254,7 @@ StatsScreen_GetJoypad: ; 4de2c (13:5e2c)
|
|||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
callba StatsScreenDPad
|
farcall StatsScreenDPad
|
||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
pop hl
|
pop hl
|
||||||
@ -419,7 +419,7 @@ StatsScreen_InitUpperHalf: ; 4deea (13:5eea)
|
|||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld d, a
|
ld d, a
|
||||||
ld e, [hl]
|
ld e, [hl]
|
||||||
callba ComputeHPBarPixels
|
farcall ComputeHPBarPixels
|
||||||
ld hl, wCurHPPal
|
ld hl, wCurHPPal
|
||||||
call SetHPPal
|
call SetHPPal
|
||||||
ld b, SCGB_STATS_SCREEN_HP_PALS
|
ld b, SCGB_STATS_SCREEN_HP_PALS
|
||||||
@ -429,7 +429,7 @@ StatsScreen_InitUpperHalf: ; 4deea (13:5eea)
|
|||||||
|
|
||||||
.PlaceGenderChar: ; 4df66 (13:5f66)
|
.PlaceGenderChar: ; 4df66 (13:5f66)
|
||||||
push hl
|
push hl
|
||||||
callba GetGender
|
farcall GetGender
|
||||||
pop hl
|
pop hl
|
||||||
ret c
|
ret c
|
||||||
ld a, "♂"
|
ld a, "♂"
|
||||||
@ -480,7 +480,7 @@ StatsScreen_PlacePageSwitchArrows: ; 4df9b (13:5f9b)
|
|||||||
|
|
||||||
StatsScreen_PlaceShinyIcon: ; 4dfa6 (13:5fa6)
|
StatsScreen_PlaceShinyIcon: ; 4dfa6 (13:5fa6)
|
||||||
ld bc, TempMonDVs
|
ld bc, TempMonDVs
|
||||||
callba CheckShininess
|
farcall CheckShininess
|
||||||
ret nc
|
ret nc
|
||||||
hlcoord 19, 0
|
hlcoord 19, 0
|
||||||
ld [hl], "<SHINY>"
|
ld [hl], "<SHINY>"
|
||||||
@ -519,7 +519,7 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6)
|
|||||||
ld a, [wcf64]
|
ld a, [wcf64]
|
||||||
and $3
|
and $3
|
||||||
ld c, a
|
ld c, a
|
||||||
callba LoadStatsScreenPals
|
farcall LoadStatsScreenPals
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
ld hl, wcf64
|
ld hl, wcf64
|
||||||
set 5, [hl]
|
set 5, [hl]
|
||||||
@ -639,7 +639,7 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6)
|
|||||||
jr z, .AlreadyAtMaxLevel
|
jr z, .AlreadyAtMaxLevel
|
||||||
inc a
|
inc a
|
||||||
ld d, a
|
ld d, a
|
||||||
callba CalcExpAtLevel
|
farcall CalcExpAtLevel
|
||||||
ld hl, TempMonExp + 2
|
ld hl, TempMonExp + 2
|
||||||
ld hl, TempMonExp + 2
|
ld hl, TempMonExp + 2
|
||||||
ld a, [hQuotient + 2]
|
ld a, [hQuotient + 2]
|
||||||
@ -719,7 +719,7 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6)
|
|||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
ld b, a
|
ld b, a
|
||||||
callba TimeCapsule_ReplaceTeruSama
|
farcall TimeCapsule_ReplaceTeruSama
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
call GetItemName
|
call GetItemName
|
||||||
@ -768,7 +768,7 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6)
|
|||||||
ld hl, .OTNamePointers
|
ld hl, .OTNamePointers
|
||||||
call GetNicknamePointer
|
call GetNicknamePointer
|
||||||
call CopyNickname
|
call CopyNickname
|
||||||
callba CheckNickErrors
|
farcall CheckNickErrors
|
||||||
hlcoord 2, 13
|
hlcoord 2, 13
|
||||||
call PlaceString
|
call PlaceString
|
||||||
ld a, [TempMonCaughtGender]
|
ld a, [TempMonCaughtGender]
|
||||||
@ -1013,7 +1013,7 @@ EggStatsScreen: ; 4e33a
|
|||||||
call DelayFrame
|
call DelayFrame
|
||||||
hlcoord 0, 0
|
hlcoord 0, 0
|
||||||
call PrepMonFrontpic
|
call PrepMonFrontpic
|
||||||
callba HDMATransferTileMapToWRAMBank3
|
farcall HDMATransferTileMapToWRAMBank3
|
||||||
call StatsScreen_AnimateEgg
|
call StatsScreen_AnimateEgg
|
||||||
|
|
||||||
ld a, [TempMonHappiness]
|
ld a, [TempMonHappiness]
|
||||||
|
@ -19,7 +19,7 @@ CopyPkmnToTempMon: ; 5084a
|
|||||||
cp OTPARTYMON
|
cp OTPARTYMON
|
||||||
jr z, .copywholestruct
|
jr z, .copywholestruct
|
||||||
ld bc, BOXMON_STRUCT_LENGTH
|
ld bc, BOXMON_STRUCT_LENGTH
|
||||||
callab CopyBoxmonToTempMon
|
callfar CopyBoxmonToTempMon
|
||||||
jr .done
|
jr .done
|
||||||
|
|
||||||
.copywholestruct
|
.copywholestruct
|
||||||
|
@ -200,7 +200,7 @@ CheckPokerusTick:: ; 114e7
|
|||||||
and a
|
and a
|
||||||
jr z, .done ; not even a day has passed since game start
|
jr z, .done ; not even a day has passed since game start
|
||||||
ld b, a
|
ld b, a
|
||||||
callba ApplyPokerusTick
|
farcall ApplyPokerusTick
|
||||||
.done
|
.done
|
||||||
xor a
|
xor a
|
||||||
ret
|
ret
|
||||||
@ -282,7 +282,7 @@ DoMysteryGiftIfDayHasPassed: ; 11548
|
|||||||
ld hl, Buffer1
|
ld hl, Buffer1
|
||||||
call InitOneDayCountdown
|
call InitOneDayCountdown
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
callba Function1050c8
|
farcall Function1050c8
|
||||||
|
|
||||||
.not_timed_out
|
.not_timed_out
|
||||||
ld a, BANK(sMysteryGiftTimer)
|
ld a, BANK(sMysteryGiftTimer)
|
||||||
|
@ -590,7 +590,7 @@ Special_InitialSetDSTFlag: ; 90a54
|
|||||||
ld a, [hMinutes]
|
ld a, [hMinutes]
|
||||||
ld c, a
|
ld c, a
|
||||||
decoord 1, 14
|
decoord 1, 14
|
||||||
callba PrintHoursMins
|
farcall PrintHoursMins
|
||||||
ld hl, .DSTIsThatOK
|
ld hl, .DSTIsThatOK
|
||||||
ret
|
ret
|
||||||
; 90a83 (24:4a83)
|
; 90a83 (24:4a83)
|
||||||
@ -621,7 +621,7 @@ Special_InitialClearDSTFlag: ; 90a88
|
|||||||
ld a, [hMinutes]
|
ld a, [hMinutes]
|
||||||
ld c, a
|
ld c, a
|
||||||
decoord 1, 14
|
decoord 1, 14
|
||||||
callba PrintHoursMins
|
farcall PrintHoursMins
|
||||||
ld hl, .IsThatOK
|
ld hl, .IsThatOK
|
||||||
ret
|
ret
|
||||||
; 90ab7
|
; 90ab7
|
||||||
|
@ -23,7 +23,7 @@ TMHMPocket: ; 2c76f (b:476f)
|
|||||||
.ConvertItemToTMHMNumber: ; 2c798 (b:4798)
|
.ConvertItemToTMHMNumber: ; 2c798 (b:4798)
|
||||||
ld a, [CurItem]
|
ld a, [CurItem]
|
||||||
ld c, a
|
ld c, a
|
||||||
callab GetNumberedTMHM
|
callfar GetNumberedTMHM
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [CurItem], a
|
ld [CurItem], a
|
||||||
ret
|
ret
|
||||||
@ -31,7 +31,7 @@ TMHMPocket: ; 2c76f (b:476f)
|
|||||||
ConvertCurItemIntoCurTMHM: ; 2c7a7 (b:47a7)
|
ConvertCurItemIntoCurTMHM: ; 2c7a7 (b:47a7)
|
||||||
ld a, [CurItem]
|
ld a, [CurItem]
|
||||||
ld c, a
|
ld c, a
|
||||||
callab GetTMHMNumber
|
callfar GetTMHMNumber
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [wCurTMHM], a
|
ld [wCurTMHM], a
|
||||||
ret
|
ret
|
||||||
@ -77,18 +77,18 @@ ChooseMonToLearnTMHM: ; 2c7fb
|
|||||||
call CopyBytes
|
call CopyBytes
|
||||||
call ClearBGPalettes
|
call ClearBGPalettes
|
||||||
ChooseMonToLearnTMHM_NoRefresh: ; 2c80a
|
ChooseMonToLearnTMHM_NoRefresh: ; 2c80a
|
||||||
callba LoadPartyMenuGFX
|
farcall LoadPartyMenuGFX
|
||||||
callba InitPartyMenuWithCancel
|
farcall InitPartyMenuWithCancel
|
||||||
callba InitPartyMenuGFX
|
farcall InitPartyMenuGFX
|
||||||
ld a, PARTYMENUACTION_TEACH_TMHM
|
ld a, PARTYMENUACTION_TEACH_TMHM
|
||||||
ld [PartyMenuActionText], a
|
ld [PartyMenuActionText], a
|
||||||
.loopback
|
.loopback
|
||||||
callba WritePartyMenuTilemap
|
farcall WritePartyMenuTilemap
|
||||||
callba PrintPartyMenuText
|
farcall PrintPartyMenuText
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
call SetPalettes
|
call SetPalettes
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
callba PartyMenuSelect
|
farcall PartyMenuSelect
|
||||||
push af
|
push af
|
||||||
ld a, [CurPartySpecies]
|
ld a, [CurPartySpecies]
|
||||||
cp EGG
|
cp EGG
|
||||||
@ -138,7 +138,7 @@ TeachTMHM: ; 2c867
|
|||||||
jr .nope
|
jr .nope
|
||||||
|
|
||||||
.compatible
|
.compatible
|
||||||
callab KnowsMove
|
callfar KnowsMove
|
||||||
jr c, .nope
|
jr c, .nope
|
||||||
|
|
||||||
predef LearnMove
|
predef LearnMove
|
||||||
@ -146,13 +146,13 @@ TeachTMHM: ; 2c867
|
|||||||
and a
|
and a
|
||||||
jr z, .nope
|
jr z, .nope
|
||||||
|
|
||||||
callba TrainerRankings_TMsHMsTaught
|
farcall TrainerRankings_TMsHMsTaught
|
||||||
ld a, [CurItem]
|
ld a, [CurItem]
|
||||||
call IsHM
|
call IsHM
|
||||||
ret c
|
ret c
|
||||||
|
|
||||||
ld c, HAPPINESS_LEARNMOVE
|
ld c, HAPPINESS_LEARNMOVE
|
||||||
callab ChangeHappiness
|
callfar ChangeHappiness
|
||||||
call ConsumeTM
|
call ConsumeTM
|
||||||
jr .learned_move
|
jr .learned_move
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ RunTradeAnimScript: ; 28fa1
|
|||||||
call ClearTileMap
|
call ClearTileMap
|
||||||
call DisableLCD
|
call DisableLCD
|
||||||
call LoadFontsBattleExtra
|
call LoadFontsBattleExtra
|
||||||
callab ClearSpriteAnims
|
callfar ClearSpriteAnims
|
||||||
ld a, [hCGB]
|
ld a, [hCGB]
|
||||||
and a
|
and a
|
||||||
jr z, .NotCGB
|
jr z, .NotCGB
|
||||||
@ -181,7 +181,7 @@ RunTradeAnimScript: ; 28fa1
|
|||||||
ld [hWX], a
|
ld [hWX], a
|
||||||
ld a, $90
|
ld a, $90
|
||||||
ld [hWY], a
|
ld [hWY], a
|
||||||
callba GetTrademonFrontpic
|
farcall GetTrademonFrontpic
|
||||||
call EnableLCD
|
call EnableLCD
|
||||||
call LoadTradeBallAndCableGFX
|
call LoadTradeBallAndCableGFX
|
||||||
ld a, [wPlayerTrademonSpecies]
|
ld a, [wPlayerTrademonSpecies]
|
||||||
@ -208,7 +208,7 @@ DoTradeAnimation: ; 29082
|
|||||||
bit 7, a
|
bit 7, a
|
||||||
jr nz, .finished
|
jr nz, .finished
|
||||||
call .DoTradeAnimCommand
|
call .DoTradeAnimCommand
|
||||||
callab PlaySpriteAnimations
|
callfar PlaySpriteAnimations
|
||||||
ld hl, wcf65
|
ld hl, wcf65
|
||||||
inc [hl]
|
inc [hl]
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
@ -342,7 +342,7 @@ TradeAnim_InitTubeAnim: ; 2914e
|
|||||||
|
|
||||||
push af
|
push af
|
||||||
call DisableLCD
|
call DisableLCD
|
||||||
callab ClearSpriteAnims
|
callfar ClearSpriteAnims
|
||||||
hlbgcoord 20, 3
|
hlbgcoord 20, 3
|
||||||
ld bc, 12
|
ld bc, 12
|
||||||
ld a, $60
|
ld a, $60
|
||||||
@ -488,7 +488,7 @@ TradeAnim_TubeToPlayer8: ; 29229
|
|||||||
call ClearTileMap
|
call ClearTileMap
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
call DisableLCD
|
call DisableLCD
|
||||||
callab ClearSpriteAnims
|
callfar ClearSpriteAnims
|
||||||
hlbgcoord 0, 0
|
hlbgcoord 0, 0
|
||||||
ld bc, sScratch - VBGMap0
|
ld bc, sScratch - VBGMap0
|
||||||
ld a, " "
|
ld a, " "
|
||||||
@ -862,7 +862,7 @@ TradeAnim_ShowGetmonData: ; 29461
|
|||||||
; 29487
|
; 29487
|
||||||
|
|
||||||
TradeAnim_AnimateFrontpic: ; 29487
|
TradeAnim_AnimateFrontpic: ; 29487
|
||||||
callba AnimateTrademonFrontpic
|
farcall AnimateTrademonFrontpic
|
||||||
call TradeAnim_AdvanceScriptPointer
|
call TradeAnim_AdvanceScriptPointer
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -1521,7 +1521,7 @@ LoadTradeBallAndCableGFX: ; 2982b
|
|||||||
LoadTradeBubbleGFX: ; 2985a
|
LoadTradeBubbleGFX: ; 2985a
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
ld e, $3
|
ld e, $3
|
||||||
callab LoadMenuMonIcon
|
callfar LoadMenuMonIcon
|
||||||
ld de, TradeBubbleGFX
|
ld de, TradeBubbleGFX
|
||||||
ld hl, VTiles0 tile $72
|
ld hl, VTiles0 tile $72
|
||||||
lb bc, BANK(TradeBubbleGFX), $4
|
lb bc, BANK(TradeBubbleGFX), $4
|
||||||
|
@ -17,7 +17,7 @@ AnimateTrademonFrontpic: ; 4d81e
|
|||||||
ld a, [wOTTrademonSpecies]
|
ld a, [wOTTrademonSpecies]
|
||||||
call IsAPokemon
|
call IsAPokemon
|
||||||
ret c
|
ret c
|
||||||
callba ShowOTTrademonStats
|
farcall ShowOTTrademonStats
|
||||||
ld a, [wOTTrademonSpecies]
|
ld a, [wOTTrademonSpecies]
|
||||||
ld [CurPartySpecies], a
|
ld [CurPartySpecies], a
|
||||||
ld a, [wOTTrademonDVs]
|
ld a, [wOTTrademonDVs]
|
||||||
@ -28,7 +28,7 @@ AnimateTrademonFrontpic: ; 4d81e
|
|||||||
call GetSGBLayout
|
call GetSGBLayout
|
||||||
ld a, %11100100 ; 3,2,1,0
|
ld a, %11100100 ; 3,2,1,0
|
||||||
call DmgToCgbBGPals
|
call DmgToCgbBGPals
|
||||||
callba TradeAnim_ShowGetmonFrontpic
|
farcall TradeAnim_ShowGetmonFrontpic
|
||||||
ld a, [wOTTrademonSpecies]
|
ld a, [wOTTrademonSpecies]
|
||||||
ld [CurPartySpecies], a
|
ld [CurPartySpecies], a
|
||||||
hlcoord 7, 2
|
hlcoord 7, 2
|
||||||
|
@ -34,7 +34,7 @@ TrainerCard: ; 25105
|
|||||||
call ClearTileMap
|
call ClearTileMap
|
||||||
call DisableLCD
|
call DisableLCD
|
||||||
|
|
||||||
callba GetCardPic
|
farcall GetCardPic
|
||||||
|
|
||||||
ld hl, CardRightCornerGFX
|
ld hl, CardRightCornerGFX
|
||||||
ld de, VTiles2 tile $1c
|
ld de, VTiles2 tile $1c
|
||||||
|
@ -107,7 +107,7 @@ CorrectErrorsInPlayerParty: ; unreferenced
|
|||||||
push bc
|
push bc
|
||||||
call .GetLengthOfStringWith6CharCap
|
call .GetLengthOfStringWith6CharCap
|
||||||
push de
|
push de
|
||||||
callba CheckStringForErrors
|
farcall CheckStringForErrors
|
||||||
pop hl
|
pop hl
|
||||||
pop bc
|
pop bc
|
||||||
jr nc, .valid_nickname
|
jr nc, .valid_nickname
|
||||||
@ -145,7 +145,7 @@ CorrectErrorsInPlayerParty: ; unreferenced
|
|||||||
push bc
|
push bc
|
||||||
call .GetLengthOfStringWith6CharCap
|
call .GetLengthOfStringWith6CharCap
|
||||||
push de
|
push de
|
||||||
callba CheckStringForErrors
|
farcall CheckStringForErrors
|
||||||
pop hl
|
pop hl
|
||||||
jr nc, .valid_ot_name
|
jr nc, .valid_ot_name
|
||||||
ld d, h
|
ld d, h
|
||||||
|
@ -8,7 +8,7 @@ HandleNewMap: ; 1045b0
|
|||||||
ld a, MAPCALLBACK_NEWMAP
|
ld a, MAPCALLBACK_NEWMAP
|
||||||
call RunMapCallback
|
call RunMapCallback
|
||||||
InitCommandQueue: ; 1045c4
|
InitCommandQueue: ; 1045c4
|
||||||
callba ClearCmdQueue
|
farcall ClearCmdQueue
|
||||||
ld a, MAPCALLBACK_CMDQUEUE
|
ld a, MAPCALLBACK_CMDQUEUE
|
||||||
call RunMapCallback
|
call RunMapCallback
|
||||||
call GetMapHeaderTimeOfDayNybble
|
call GetMapHeaderTimeOfDayNybble
|
||||||
@ -225,8 +225,8 @@ LoadMapTimeOfDay: ; 104750
|
|||||||
res 6, [hl]
|
res 6, [hl]
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wSpriteUpdatesEnabled], a
|
ld [wSpriteUpdatesEnabled], a
|
||||||
callba ReplaceTimeOfDayPals
|
farcall ReplaceTimeOfDayPals
|
||||||
callba UpdateTimeOfDayPal
|
farcall UpdateTimeOfDayPal
|
||||||
call OverworldTextModeSwitch
|
call OverworldTextModeSwitch
|
||||||
call .ClearBGMap
|
call .ClearBGMap
|
||||||
call .PushAttrMap
|
call .PushAttrMap
|
||||||
@ -239,7 +239,7 @@ LoadMapTimeOfDay: ; 104750
|
|||||||
ld [wBGMapAnchor], a
|
ld [wBGMapAnchor], a
|
||||||
ld [hSCY], a
|
ld [hSCY], a
|
||||||
ld [hSCX], a
|
ld [hSCX], a
|
||||||
callba ApplyBGMapAnchorToObjects
|
farcall ApplyBGMapAnchorToObjects
|
||||||
|
|
||||||
ld a, [rVBK]
|
ld a, [rVBK]
|
||||||
push af
|
push af
|
||||||
@ -298,9 +298,9 @@ LoadGraphics: ; 1047cf
|
|||||||
ld [hMapAnims], a
|
ld [hMapAnims], a
|
||||||
xor a
|
xor a
|
||||||
ld [hTileAnimFrame], a
|
ld [hTileAnimFrame], a
|
||||||
callba RefreshSprites
|
farcall RefreshSprites
|
||||||
call LoadFontsExtra
|
call LoadFontsExtra
|
||||||
callba LoadOverworldFont
|
farcall LoadOverworldFont
|
||||||
ret
|
ret
|
||||||
|
|
||||||
LoadMapPalettes: ; 1047eb
|
LoadMapPalettes: ; 1047eb
|
||||||
@ -310,10 +310,10 @@ LoadMapPalettes: ; 1047eb
|
|||||||
|
|
||||||
RefreshMapSprites: ; 1047f0
|
RefreshMapSprites: ; 1047f0
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
callba ReturnFromMapSetupScript
|
farcall ReturnFromMapSetupScript
|
||||||
call GetMovementPermissions
|
call GetMovementPermissions
|
||||||
callba RefreshPlayerSprite
|
farcall RefreshPlayerSprite
|
||||||
callba CheckReplaceKrisSprite
|
farcall CheckReplaceKrisSprite
|
||||||
ld hl, wPlayerSpriteSetupFlags
|
ld hl, wPlayerSpriteSetupFlags
|
||||||
bit 6, [hl]
|
bit 6, [hl]
|
||||||
jr nz, .skip
|
jr nz, .skip
|
||||||
|
@ -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.
|
; 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.
|
; The trainer will then tell you about the Pokemon if you haven't seen it.
|
||||||
RandomUnseenWildMon: ; 2a4ab
|
RandomUnseenWildMon: ; 2a4ab
|
||||||
callba GetCallerLocation
|
farcall GetCallerLocation
|
||||||
ld d, b
|
ld d, b
|
||||||
ld e, c
|
ld e, c
|
||||||
ld hl, JohtoGrassWildMons
|
ld hl, JohtoGrassWildMons
|
||||||
@ -878,7 +878,7 @@ RandomUnseenWildMon: ; 2a4ab
|
|||||||
; 0x2a51f
|
; 0x2a51f
|
||||||
|
|
||||||
RandomPhoneWildMon: ; 2a51f
|
RandomPhoneWildMon: ; 2a51f
|
||||||
callba GetCallerLocation
|
farcall GetCallerLocation
|
||||||
ld d, b
|
ld d, b
|
||||||
ld e, c
|
ld e, c
|
||||||
ld hl, JohtoGrassWildMons
|
ld hl, JohtoGrassWildMons
|
||||||
@ -919,7 +919,7 @@ RandomPhoneWildMon: ; 2a51f
|
|||||||
|
|
||||||
RandomPhoneMon: ; 2a567
|
RandomPhoneMon: ; 2a567
|
||||||
; Get a random monster owned by the trainer who's calling.
|
; Get a random monster owned by the trainer who's calling.
|
||||||
callba GetCallerLocation
|
farcall GetCallerLocation
|
||||||
ld hl, TrainerGroups
|
ld hl, TrainerGroups
|
||||||
ld a, d
|
ld a, d
|
||||||
dec a
|
dec a
|
||||||
|
@ -5,14 +5,14 @@ SpecialBuenasPassword: ; 8af6b
|
|||||||
call CopyMenuDataHeader
|
call CopyMenuDataHeader
|
||||||
ld a, [wBuenasPassword]
|
ld a, [wBuenasPassword]
|
||||||
ld c, a
|
ld c, a
|
||||||
callba GetBuenasPassword
|
farcall GetBuenasPassword
|
||||||
ld a, [wMenuBorderLeftCoord]
|
ld a, [wMenuBorderLeftCoord]
|
||||||
add c
|
add c
|
||||||
add $2
|
add $2
|
||||||
ld [wMenuBorderRightCoord], a
|
ld [wMenuBorderRightCoord], a
|
||||||
call PushWindow
|
call PushWindow
|
||||||
call DoNthMenu ; menu
|
call DoNthMenu ; menu
|
||||||
callba Buena_ExitMenu
|
farcall Buena_ExitMenu
|
||||||
ld b, $0
|
ld b, $0
|
||||||
ld a, [MenuSelection]
|
ld a, [MenuSelection]
|
||||||
ld c, a
|
ld c, a
|
||||||
@ -58,7 +58,7 @@ SpecialBuenasPassword: ; 8af6b
|
|||||||
ld a, [MenuSelection]
|
ld a, [MenuSelection]
|
||||||
add c
|
add c
|
||||||
ld c, a
|
ld c, a
|
||||||
callba GetBuenasPassword
|
farcall GetBuenasPassword
|
||||||
pop hl
|
pop hl
|
||||||
call PlaceString
|
call PlaceString
|
||||||
ret
|
ret
|
||||||
|
@ -3,8 +3,8 @@ BugContest_SetCaughtContestMon: ; e6ce
|
|||||||
and a
|
and a
|
||||||
jr z, .firstcatch
|
jr z, .firstcatch
|
||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
callba DisplayAlreadyCaughtText
|
farcall DisplayAlreadyCaughtText
|
||||||
callba DisplayCaughtContestMonStats
|
farcall DisplayCaughtContestMonStats
|
||||||
lb bc, 14, 7
|
lb bc, 14, 7
|
||||||
call PlaceYesNoBox
|
call PlaceYesNoBox
|
||||||
ret c
|
ret c
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user