mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-11-05 13:10:58 +13:00
callba/callab -> farcall/callfar; jpba/jpab -> farjp/jpfar
This commit is contained in:
parent
77ed5f3820
commit
06db7ec55b
|
|
@ -24,7 +24,7 @@ PrintBeginningBattleText:
|
||||||
ld hl, TrainerWantsToFightText
|
ld hl, TrainerWantsToFightText
|
||||||
.wildBattle
|
.wildBattle
|
||||||
push hl
|
push hl
|
||||||
callab DrawAllPokeballs
|
callfar DrawAllPokeballs
|
||||||
pop hl
|
pop hl
|
||||||
call PrintText
|
call PrintText
|
||||||
jr .done
|
jr .done
|
||||||
|
|
@ -38,7 +38,7 @@ PrintBeginningBattleText:
|
||||||
ld a, b
|
ld a, b
|
||||||
and a
|
and a
|
||||||
jr z, .noSilphScope
|
jr z, .noSilphScope
|
||||||
callab LoadEnemyMonData
|
callfar LoadEnemyMonData
|
||||||
jr .notPokemonTower
|
jr .notPokemonTower
|
||||||
.noSilphScope
|
.noSilphScope
|
||||||
ld hl, EnemyAppearedText
|
ld hl, EnemyAppearedText
|
||||||
|
|
@ -54,8 +54,8 @@ PrintBeginningBattleText:
|
||||||
call PrintText
|
call PrintText
|
||||||
ld hl, UnveiledGhostText
|
ld hl, UnveiledGhostText
|
||||||
call PrintText
|
call PrintText
|
||||||
callab LoadEnemyMonData
|
callfar LoadEnemyMonData
|
||||||
callab MarowakAnim
|
callfar MarowakAnim
|
||||||
ld hl, WildMonAppearedText
|
ld hl, WildMonAppearedText
|
||||||
call PrintText
|
call PrintText
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ SlidePlayerAndEnemySilhouettesOnScreen:
|
||||||
ld b, SET_PAL_BATTLE
|
ld b, SET_PAL_BATTLE
|
||||||
call RunPaletteCommand
|
call RunPaletteCommand
|
||||||
call HideSprites
|
call HideSprites
|
||||||
jpab PrintBeginningBattleText
|
jpfar PrintBeginningBattleText
|
||||||
|
|
||||||
; when a battle is starting, silhouettes of the player's pic and the enemy's pic are slid onto the screen
|
; when a battle is starting, silhouettes of the player's pic and the enemy's pic are slid onto the screen
|
||||||
; the lower of the player's pic (his body) is part of the background, but his head is a sprite
|
; the lower of the player's pic (his body) is part of the background, but his head is a sprite
|
||||||
|
|
@ -178,7 +178,7 @@ StartBattle:
|
||||||
ld hl, .outOfSafariBallsText
|
ld hl, .outOfSafariBallsText
|
||||||
jp PrintText
|
jp PrintText
|
||||||
.notOutOfSafariBalls
|
.notOutOfSafariBalls
|
||||||
callab PrintSafariZoneBattleText
|
callfar PrintSafariZoneBattleText
|
||||||
ld a, [wEnemyMonSpeed + 1]
|
ld a, [wEnemyMonSpeed + 1]
|
||||||
add a
|
add a
|
||||||
ld b, a ; init b (which is later compared with random value) to (enemy speed % 256) * 2
|
ld b, a ; init b (which is later compared with random value) to (enemy speed % 256) * 2
|
||||||
|
|
@ -267,7 +267,7 @@ EnemyRan:
|
||||||
call PlaySoundWaitForCurrent
|
call PlaySoundWaitForCurrent
|
||||||
xor a
|
xor a
|
||||||
ldh [hWhoseTurn], a
|
ldh [hWhoseTurn], a
|
||||||
jpab AnimationSlideEnemyMonOff
|
jpfar AnimationSlideEnemyMonOff
|
||||||
|
|
||||||
WildRanText:
|
WildRanText:
|
||||||
text_far _WildRanText
|
text_far _WildRanText
|
||||||
|
|
@ -365,7 +365,7 @@ MainInBattleLoop:
|
||||||
jr nz, .specialMoveNotUsed
|
jr nz, .specialMoveNotUsed
|
||||||
ld [wPlayerSelectedMove], a
|
ld [wPlayerSelectedMove], a
|
||||||
.specialMoveNotUsed
|
.specialMoveNotUsed
|
||||||
callab SwitchEnemyMon
|
callfar SwitchEnemyMon
|
||||||
.noLinkBattle
|
.noLinkBattle
|
||||||
ld a, [wPlayerSelectedMove]
|
ld a, [wPlayerSelectedMove]
|
||||||
cp QUICK_ATTACK
|
cp QUICK_ATTACK
|
||||||
|
|
@ -413,7 +413,7 @@ MainInBattleLoop:
|
||||||
.enemyMovesFirst
|
.enemyMovesFirst
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ldh [hWhoseTurn], a
|
ldh [hWhoseTurn], a
|
||||||
callab TrainerAI
|
callfar TrainerAI
|
||||||
jr c, .AIActionUsedEnemyFirst
|
jr c, .AIActionUsedEnemyFirst
|
||||||
call ExecuteEnemyMove
|
call ExecuteEnemyMove
|
||||||
ld a, [wEscapedFromBattle]
|
ld a, [wEscapedFromBattle]
|
||||||
|
|
@ -451,7 +451,7 @@ MainInBattleLoop:
|
||||||
call DrawHUDsAndHPBars
|
call DrawHUDsAndHPBars
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ldh [hWhoseTurn], a
|
ldh [hWhoseTurn], a
|
||||||
callab TrainerAI
|
callfar TrainerAI
|
||||||
jr c, .AIActionUsedPlayerFirst
|
jr c, .AIActionUsedPlayerFirst
|
||||||
call ExecuteEnemyMove
|
call ExecuteEnemyMove
|
||||||
ld a, [wEscapedFromBattle]
|
ld a, [wEscapedFromBattle]
|
||||||
|
|
@ -837,7 +837,7 @@ FaintEnemyPokemon:
|
||||||
.giveExpToMonsThatFought
|
.giveExpToMonsThatFought
|
||||||
xor a
|
xor a
|
||||||
ld [wBoostExpByExpAll], a
|
ld [wBoostExpByExpAll], a
|
||||||
callab GainExperience
|
callfar GainExperience
|
||||||
pop af
|
pop af
|
||||||
ret z ; return if no exp all
|
ret z ; return if no exp all
|
||||||
|
|
||||||
|
|
@ -855,7 +855,7 @@ FaintEnemyPokemon:
|
||||||
jr nz, .gainExpFlagsLoop
|
jr nz, .gainExpFlagsLoop
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [wPartyGainExpFlags], a
|
ld [wPartyGainExpFlags], a
|
||||||
jpab GainExperience
|
jpfar GainExperience
|
||||||
|
|
||||||
EnemyMonFaintedText:
|
EnemyMonFaintedText:
|
||||||
text_far _EnemyMonFaintedText
|
text_far _EnemyMonFaintedText
|
||||||
|
|
@ -893,7 +893,7 @@ ReplaceFaintedEnemyMon:
|
||||||
ld hl, wEnemyHPBarColor
|
ld hl, wEnemyHPBarColor
|
||||||
ld e, $30
|
ld e, $30
|
||||||
call GetBattleHealthBarColor
|
call GetBattleHealthBarColor
|
||||||
callab DrawEnemyPokeballs
|
callfar DrawEnemyPokeballs
|
||||||
ld a, [wLinkState]
|
ld a, [wLinkState]
|
||||||
cp LINK_STATE_BATTLING
|
cp LINK_STATE_BATTLING
|
||||||
jr nz, .notLinkBattle
|
jr nz, .notLinkBattle
|
||||||
|
|
@ -1720,7 +1720,7 @@ LoadEnemyMonFromParty:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
SendOutMon:
|
SendOutMon:
|
||||||
callab PrintSendOutMonMessage
|
callfar PrintSendOutMonMessage
|
||||||
ld hl, wEnemyMonHP
|
ld hl, wEnemyMonHP
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
or [hl] ; is enemy mon HP zero?
|
or [hl] ; is enemy mon HP zero?
|
||||||
|
|
@ -1816,7 +1816,7 @@ DrawPlayerHUDAndHPBar:
|
||||||
coord hl, 9, 7
|
coord hl, 9, 7
|
||||||
lb bc, 5, 11
|
lb bc, 5, 11
|
||||||
call ClearScreenArea
|
call ClearScreenArea
|
||||||
callab PlacePlayerHUDTiles
|
callfar PlacePlayerHUDTiles
|
||||||
coord hl, 18, 9
|
coord hl, 18, 9
|
||||||
ld [hl], $73
|
ld [hl], $73
|
||||||
ld de, wBattleMonNick
|
ld de, wBattleMonNick
|
||||||
|
|
@ -1877,7 +1877,7 @@ DrawEnemyHUDAndHPBar:
|
||||||
coord hl, 0, 0
|
coord hl, 0, 0
|
||||||
lb bc, 4, 12
|
lb bc, 4, 12
|
||||||
call ClearScreenArea
|
call ClearScreenArea
|
||||||
callab PlaceEnemyHUDTiles
|
callfar PlaceEnemyHUDTiles
|
||||||
ld de, wEnemyMonNick
|
ld de, wEnemyMonNick
|
||||||
coord hl, 1, 0
|
coord hl, 1, 0
|
||||||
call CenterMonName
|
call CenterMonName
|
||||||
|
|
@ -2411,7 +2411,7 @@ PartyMenuOrRockOrRun:
|
||||||
; fall through to SwitchPlayerMon
|
; fall through to SwitchPlayerMon
|
||||||
|
|
||||||
SwitchPlayerMon:
|
SwitchPlayerMon:
|
||||||
callab RetreatMon
|
callfar RetreatMon
|
||||||
ld c, 50
|
ld c, 50
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
call AnimateRetreatingPlayerMon
|
call AnimateRetreatingPlayerMon
|
||||||
|
|
@ -2464,7 +2464,7 @@ MoveSelectionMenu:
|
||||||
ld de, wMoves
|
ld de, wMoves
|
||||||
ld bc, NUM_MOVES
|
ld bc, NUM_MOVES
|
||||||
call CopyData
|
call CopyData
|
||||||
callab FormatMovesString
|
callfar FormatMovesString
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.writemoves
|
.writemoves
|
||||||
|
|
@ -2860,7 +2860,7 @@ PrintMenuItem:
|
||||||
ld [wWhichPokemon], a
|
ld [wWhichPokemon], a
|
||||||
ld a, BATTLE_MON_DATA
|
ld a, BATTLE_MON_DATA
|
||||||
ld [wMonDataLocation], a
|
ld [wMonDataLocation], a
|
||||||
callab GetMaxPP
|
callfar GetMaxPP
|
||||||
ld hl, wCurrentMenuItem
|
ld hl, wCurrentMenuItem
|
||||||
ld c, [hl]
|
ld c, [hl]
|
||||||
inc [hl]
|
inc [hl]
|
||||||
|
|
@ -2955,7 +2955,7 @@ SelectEnemyMove:
|
||||||
ld a, [wIsInBattle]
|
ld a, [wIsInBattle]
|
||||||
dec a
|
dec a
|
||||||
jr z, .chooseRandomMove ; wild encounter
|
jr z, .chooseRandomMove ; wild encounter
|
||||||
callab AIEnemyTrainerChooseMoves
|
callfar AIEnemyTrainerChooseMoves
|
||||||
.chooseRandomMove
|
.chooseRandomMove
|
||||||
push hl
|
push hl
|
||||||
call BattleRandom
|
call BattleRandom
|
||||||
|
|
@ -3020,7 +3020,7 @@ LinkBattleExchangeData:
|
||||||
ld a, b
|
ld a, b
|
||||||
.doExchange
|
.doExchange
|
||||||
ld [wSerialExchangeNybbleSendData], a
|
ld [wSerialExchangeNybbleSendData], a
|
||||||
callab PrintWaitingText
|
callfar PrintWaitingText
|
||||||
.syncLoop1
|
.syncLoop1
|
||||||
call Serial_ExchangeNybble
|
call Serial_ExchangeNybble
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
|
|
@ -3196,7 +3196,7 @@ MirrorMoveCheck:
|
||||||
.moveDidNotMiss
|
.moveDidNotMiss
|
||||||
call ApplyAttackToEnemyPokemon
|
call ApplyAttackToEnemyPokemon
|
||||||
call PrintCriticalOHKOText
|
call PrintCriticalOHKOText
|
||||||
callab DisplayEffectiveness
|
callfar DisplayEffectiveness
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wMoveDidntMiss], a
|
ld [wMoveDidntMiss], a
|
||||||
.notDone
|
.notDone
|
||||||
|
|
@ -4988,7 +4988,7 @@ AttackSubstitute:
|
||||||
ldh a, [hWhoseTurn]
|
ldh a, [hWhoseTurn]
|
||||||
xor $01
|
xor $01
|
||||||
ldh [hWhoseTurn], a
|
ldh [hWhoseTurn], a
|
||||||
callab HideSubstituteShowMonAnim ; animate the substitute breaking
|
callfar HideSubstituteShowMonAnim ; animate the substitute breaking
|
||||||
; flip the turn back to the way it was
|
; flip the turn back to the way it was
|
||||||
ldh a, [hWhoseTurn]
|
ldh a, [hWhoseTurn]
|
||||||
xor $01
|
xor $01
|
||||||
|
|
@ -5726,7 +5726,7 @@ EnemyCheckIfMirrorMoveEffect:
|
||||||
.moveDidNotMiss
|
.moveDidNotMiss
|
||||||
call ApplyAttackToPlayerPokemon
|
call ApplyAttackToPlayerPokemon
|
||||||
call PrintCriticalOHKOText
|
call PrintCriticalOHKOText
|
||||||
callab DisplayEffectiveness
|
callfar DisplayEffectiveness
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wMoveDidntMiss], a
|
ld [wMoveDidntMiss], a
|
||||||
.handleExplosionMiss
|
.handleExplosionMiss
|
||||||
|
|
@ -6254,14 +6254,14 @@ DoBattleTransitionAndInitBattleVariables:
|
||||||
; link battle
|
; link battle
|
||||||
xor a
|
xor a
|
||||||
ld [wMenuJoypadPollCount], a
|
ld [wMenuJoypadPollCount], a
|
||||||
callab DisplayLinkBattleVersusTextBox
|
callfar DisplayLinkBattleVersusTextBox
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wUpdateSpritesEnabled], a
|
ld [wUpdateSpritesEnabled], a
|
||||||
call ClearScreen
|
call ClearScreen
|
||||||
.next
|
.next
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
predef BattleTransition
|
predef BattleTransition
|
||||||
callab LoadHudAndHpBarAndStatusTilePatterns
|
callfar LoadHudAndHpBarAndStatusTilePatterns
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ldh [hAutoBGTransferEnabled], a
|
ldh [hAutoBGTransferEnabled], a
|
||||||
ld a, $ff
|
ld a, $ff
|
||||||
|
|
@ -6359,11 +6359,11 @@ LoadPlayerBackPic:
|
||||||
|
|
||||||
; does nothing since no stats are ever selected (barring glitches)
|
; does nothing since no stats are ever selected (barring glitches)
|
||||||
DoubleOrHalveSelectedStats:
|
DoubleOrHalveSelectedStats:
|
||||||
callab DoubleSelectedStats
|
callfar DoubleSelectedStats
|
||||||
jpab HalveSelectedStats
|
jpfar HalveSelectedStats
|
||||||
|
|
||||||
ScrollTrainerPicAfterBattle:
|
ScrollTrainerPicAfterBattle:
|
||||||
jpab _ScrollTrainerPicAfterBattle
|
jpfar _ScrollTrainerPicAfterBattle
|
||||||
|
|
||||||
ApplyBurnAndParalysisPenaltiesToPlayer:
|
ApplyBurnAndParalysisPenaltiesToPlayer:
|
||||||
ld a, $1
|
ld a, $1
|
||||||
|
|
@ -6747,7 +6747,7 @@ DetermineWildOpponent:
|
||||||
ld a, [wNumberOfNoRandomBattleStepsLeft]
|
ld a, [wNumberOfNoRandomBattleStepsLeft]
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
callab TryDoWildEncounter
|
callfar TryDoWildEncounter
|
||||||
ret nz
|
ret nz
|
||||||
InitBattleCommon:
|
InitBattleCommon:
|
||||||
ld a, [wMapPalOffset]
|
ld a, [wMapPalOffset]
|
||||||
|
|
@ -6756,13 +6756,13 @@ InitBattleCommon:
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
push af
|
push af
|
||||||
res 1, [hl]
|
res 1, [hl]
|
||||||
callab InitBattleVariables
|
callfar InitBattleVariables
|
||||||
ld a, [wEnemyMonSpecies2]
|
ld a, [wEnemyMonSpecies2]
|
||||||
sub OPP_ID_OFFSET
|
sub OPP_ID_OFFSET
|
||||||
jp c, InitWildBattle
|
jp c, InitWildBattle
|
||||||
ld [wTrainerClass], a
|
ld [wTrainerClass], a
|
||||||
call GetTrainerInformation
|
call GetTrainerInformation
|
||||||
callab ReadTrainer
|
callfar ReadTrainer
|
||||||
call DoBattleTransitionAndInitBattleVariables
|
call DoBattleTransitionAndInitBattleVariables
|
||||||
call _LoadTrainerPic
|
call _LoadTrainerPic
|
||||||
xor a
|
xor a
|
||||||
|
|
@ -6857,7 +6857,7 @@ _InitBattleCommon:
|
||||||
dec a ; is it a wild battle?
|
dec a ; is it a wild battle?
|
||||||
call z, DrawEnemyHUDAndHPBar ; draw enemy HUD and HP bar if it's a wild battle
|
call z, DrawEnemyHUDAndHPBar ; draw enemy HUD and HP bar if it's a wild battle
|
||||||
call StartBattle
|
call StartBattle
|
||||||
callab EndOfBattle
|
callfar EndOfBattle
|
||||||
pop af
|
pop af
|
||||||
ld [wLetterPrintingDelayFlags], a
|
ld [wLetterPrintingDelayFlags], a
|
||||||
pop af
|
pop af
|
||||||
|
|
|
||||||
|
|
@ -170,7 +170,7 @@ BadlyPoisonedText:
|
||||||
text_end
|
text_end
|
||||||
|
|
||||||
DrainHPEffect:
|
DrainHPEffect:
|
||||||
jpab DrainHPEffect_
|
jpfar DrainHPEffect_
|
||||||
|
|
||||||
ExplodeEffect:
|
ExplodeEffect:
|
||||||
ld hl, wBattleMonHP
|
ld hl, wBattleMonHP
|
||||||
|
|
@ -987,7 +987,7 @@ FlinchSideEffect:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
OneHitKOEffect:
|
OneHitKOEffect:
|
||||||
jpab OneHitKOEffect_
|
jpfar OneHitKOEffect_
|
||||||
|
|
||||||
ChargeEffect:
|
ChargeEffect:
|
||||||
ld hl, wPlayerBattleStatus1
|
ld hl, wPlayerBattleStatus1
|
||||||
|
|
@ -1097,13 +1097,13 @@ TrappingEffect:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
MistEffect:
|
MistEffect:
|
||||||
jpab MistEffect_
|
jpfar MistEffect_
|
||||||
|
|
||||||
FocusEnergyEffect:
|
FocusEnergyEffect:
|
||||||
jpab FocusEnergyEffect_
|
jpfar FocusEnergyEffect_
|
||||||
|
|
||||||
RecoilEffect:
|
RecoilEffect:
|
||||||
jpab RecoilEffect_
|
jpfar RecoilEffect_
|
||||||
|
|
||||||
ConfusionSideEffect:
|
ConfusionSideEffect:
|
||||||
call BattleRandom
|
call BattleRandom
|
||||||
|
|
@ -1157,10 +1157,10 @@ ConfusionEffectFailed:
|
||||||
jp ConditionalPrintButItFailed
|
jp ConditionalPrintButItFailed
|
||||||
|
|
||||||
ParalyzeEffect:
|
ParalyzeEffect:
|
||||||
jpab ParalyzeEffect_
|
jpfar ParalyzeEffect_
|
||||||
|
|
||||||
SubstituteEffect:
|
SubstituteEffect:
|
||||||
jpab SubstituteEffect_
|
jpfar SubstituteEffect_
|
||||||
|
|
||||||
HyperBeamEffect:
|
HyperBeamEffect:
|
||||||
ld hl, wPlayerBattleStatus2
|
ld hl, wPlayerBattleStatus2
|
||||||
|
|
@ -1271,7 +1271,7 @@ MimicLearnedMoveText:
|
||||||
text_end
|
text_end
|
||||||
|
|
||||||
LeechSeedEffect:
|
LeechSeedEffect:
|
||||||
jpab LeechSeedEffect_
|
jpfar LeechSeedEffect_
|
||||||
|
|
||||||
SplashEffect:
|
SplashEffect:
|
||||||
call PlayCurrentMoveAnimation
|
call PlayCurrentMoveAnimation
|
||||||
|
|
@ -1365,22 +1365,22 @@ MoveWasDisabledText:
|
||||||
text_end
|
text_end
|
||||||
|
|
||||||
PayDayEffect:
|
PayDayEffect:
|
||||||
jpab PayDayEffect_
|
jpfar PayDayEffect_
|
||||||
|
|
||||||
ConversionEffect:
|
ConversionEffect:
|
||||||
jpab ConversionEffect_
|
jpfar ConversionEffect_
|
||||||
|
|
||||||
HazeEffect:
|
HazeEffect:
|
||||||
jpab HazeEffect_
|
jpfar HazeEffect_
|
||||||
|
|
||||||
HealEffect:
|
HealEffect:
|
||||||
jpab HealEffect_
|
jpfar HealEffect_
|
||||||
|
|
||||||
TransformEffect:
|
TransformEffect:
|
||||||
jpab TransformEffect_
|
jpfar TransformEffect_
|
||||||
|
|
||||||
ReflectLightScreenEffect:
|
ReflectLightScreenEffect:
|
||||||
jpab ReflectLightScreenEffect_
|
jpfar ReflectLightScreenEffect_
|
||||||
|
|
||||||
NothingHappenedText:
|
NothingHappenedText:
|
||||||
text_far _NothingHappenedText
|
text_far _NothingHappenedText
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ EndOfBattle:
|
||||||
ld a, [wEnemyMonStatus]
|
ld a, [wEnemyMonStatus]
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
call ClearScreen
|
call ClearScreen
|
||||||
callab DisplayLinkBattleVersusTextBox
|
callfar DisplayLinkBattleVersusTextBox
|
||||||
ld a, [wBattleResult]
|
ld a, [wBattleResult]
|
||||||
cp $1
|
cp $1
|
||||||
ld de, YouWinText
|
ld de, YouWinText
|
||||||
|
|
|
||||||
|
|
@ -117,7 +117,7 @@ GainExperience:
|
||||||
ld [wd0b5], a
|
ld [wd0b5], a
|
||||||
call GetMonHeader
|
call GetMonHeader
|
||||||
ld d, MAX_LEVEL
|
ld d, MAX_LEVEL
|
||||||
callab CalcExperience ; get max exp
|
callfar CalcExperience ; get max exp
|
||||||
; compare max exp with current exp
|
; compare max exp with current exp
|
||||||
ldh a, [hExperience]
|
ldh a, [hExperience]
|
||||||
ld b, a
|
ld b, a
|
||||||
|
|
@ -155,7 +155,7 @@ GainExperience:
|
||||||
ld bc, wPartyMon1Level - wPartyMon1Exp
|
ld bc, wPartyMon1Level - wPartyMon1Exp
|
||||||
add hl, bc
|
add hl, bc
|
||||||
push hl
|
push hl
|
||||||
callba CalcLevelFromExperience
|
farcall CalcLevelFromExperience
|
||||||
pop hl
|
pop hl
|
||||||
ld a, [hl] ; current level
|
ld a, [hl] ; current level
|
||||||
cp d
|
cp d
|
||||||
|
|
@ -233,11 +233,11 @@ GainExperience:
|
||||||
.recalcStatChanges
|
.recalcStatChanges
|
||||||
xor a ; battle mon
|
xor a ; battle mon
|
||||||
ld [wCalculateWhoseStats], a
|
ld [wCalculateWhoseStats], a
|
||||||
callab CalculateModifiedStats
|
callfar CalculateModifiedStats
|
||||||
callab ApplyBurnAndParalysisPenaltiesToPlayer
|
callfar ApplyBurnAndParalysisPenaltiesToPlayer
|
||||||
callab ApplyBadgeStatBoosts
|
callfar ApplyBadgeStatBoosts
|
||||||
callab DrawPlayerHUDAndHPBar
|
callfar DrawPlayerHUDAndHPBar
|
||||||
callab PrintEmptyString
|
callfar PrintEmptyString
|
||||||
call SaveScreenTilesToBuffer1
|
call SaveScreenTilesToBuffer1
|
||||||
.printGrewLevelText
|
.printGrewLevelText
|
||||||
ld hl, GrewLevelText
|
ld hl, GrewLevelText
|
||||||
|
|
@ -246,7 +246,7 @@ GainExperience:
|
||||||
ld [wMonDataLocation], a
|
ld [wMonDataLocation], a
|
||||||
call LoadMonData
|
call LoadMonData
|
||||||
ld d, $1
|
ld d, $1
|
||||||
callab PrintStatsBox
|
callfar PrintStatsBox
|
||||||
call WaitForTextScrollButtonPress
|
call WaitForTextScrollButtonPress
|
||||||
call LoadScreenTilesFromBuffer1
|
call LoadScreenTilesFromBuffer1
|
||||||
xor a ; PLAYER_PARTY_DATA
|
xor a ; PLAYER_PARTY_DATA
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ MarowakAnim:
|
||||||
ld [wChangeMonPicEnemyTurnSpecies], a
|
ld [wChangeMonPicEnemyTurnSpecies], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ldh [hWhoseTurn], a
|
ldh [hWhoseTurn], a
|
||||||
callab ChangeMonPic
|
callfar ChangeMonPic
|
||||||
; alternate between black and light grey 8 times.
|
; alternate between black and light grey 8 times.
|
||||||
; this makes the ghost's body appear to flash
|
; this makes the ghost's body appear to flash
|
||||||
ld d, $80
|
ld d, $80
|
||||||
|
|
|
||||||
|
|
@ -35,4 +35,4 @@ InitBattleVariables:
|
||||||
ld a, BATTLE_TYPE_SAFARI
|
ld a, BATTLE_TYPE_SAFARI
|
||||||
ld [wBattleType], a
|
ld [wBattleType], a
|
||||||
.notSafariBattle
|
.notSafariBattle
|
||||||
jpab PlayBattleMusic
|
jpfar PlayBattleMusic
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,6 @@ DisplayLinkBattleVersusTextBox:
|
||||||
ld [hl], $6a
|
ld [hl], $6a
|
||||||
xor a
|
xor a
|
||||||
ld [wUpdateSpritesEnabled], a
|
ld [wUpdateSpritesEnabled], a
|
||||||
callab SetupPlayerAndEnemyPokeballs
|
callfar SetupPlayerAndEnemyPokeballs
|
||||||
ld c, 150
|
ld c, 150
|
||||||
jp DelayFrames
|
jp DelayFrames
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ DrainHPEffect_:
|
||||||
predef UpdateHPBar2
|
predef UpdateHPBar2
|
||||||
predef DrawPlayerHUDAndHPBar
|
predef DrawPlayerHUDAndHPBar
|
||||||
predef DrawEnemyHUDAndHPBar
|
predef DrawEnemyHUDAndHPBar
|
||||||
callab ReadPlayerMonCurHPAndStatus
|
callfar ReadPlayerMonCurHPAndStatus
|
||||||
ld hl, SuckedHealthText
|
ld hl, SuckedHealthText
|
||||||
ldh a, [hWhoseTurn]
|
ldh a, [hWhoseTurn]
|
||||||
and a
|
and a
|
||||||
|
|
|
||||||
|
|
@ -8,13 +8,13 @@ FocusEnergyEffect_:
|
||||||
bit GETTING_PUMPED, [hl] ; is mon already using focus energy?
|
bit GETTING_PUMPED, [hl] ; is mon already using focus energy?
|
||||||
jr nz, .alreadyUsing
|
jr nz, .alreadyUsing
|
||||||
set GETTING_PUMPED, [hl] ; mon is now using focus energy
|
set GETTING_PUMPED, [hl] ; mon is now using focus energy
|
||||||
callab PlayCurrentMoveAnimation
|
callfar PlayCurrentMoveAnimation
|
||||||
ld hl, GettingPumpedText
|
ld hl, GettingPumpedText
|
||||||
jp PrintText
|
jp PrintText
|
||||||
.alreadyUsing
|
.alreadyUsing
|
||||||
ld c, 50
|
ld c, 50
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
jpab PrintButItFailedText_
|
jpfar PrintButItFailedText_
|
||||||
|
|
||||||
GettingPumpedText:
|
GettingPumpedText:
|
||||||
text_pause
|
text_pause
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
LeechSeedEffect_:
|
LeechSeedEffect_:
|
||||||
callab MoveHitTest
|
callfar MoveHitTest
|
||||||
ld a, [wMoveMissed]
|
ld a, [wMoveMissed]
|
||||||
and a
|
and a
|
||||||
jr nz, .moveMissed
|
jr nz, .moveMissed
|
||||||
|
|
@ -22,7 +22,7 @@ LeechSeedEffect_:
|
||||||
bit SEEDED, [hl]
|
bit SEEDED, [hl]
|
||||||
jr nz, .moveMissed
|
jr nz, .moveMissed
|
||||||
set SEEDED, [hl]
|
set SEEDED, [hl]
|
||||||
callab PlayCurrentMoveAnimation
|
callfar PlayCurrentMoveAnimation
|
||||||
ld hl, WasSeededText
|
ld hl, WasSeededText
|
||||||
jp PrintText
|
jp PrintText
|
||||||
.moveMissed
|
.moveMissed
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,11 @@ MistEffect_:
|
||||||
bit PROTECTED_BY_MIST, [hl] ; is mon protected by mist?
|
bit PROTECTED_BY_MIST, [hl] ; is mon protected by mist?
|
||||||
jr nz, .mistAlreadyInUse
|
jr nz, .mistAlreadyInUse
|
||||||
set PROTECTED_BY_MIST, [hl] ; mon is now protected by mist
|
set PROTECTED_BY_MIST, [hl] ; mon is now protected by mist
|
||||||
callab PlayCurrentMoveAnimation
|
callfar PlayCurrentMoveAnimation
|
||||||
ld hl, ShroudedInMistText
|
ld hl, ShroudedInMistText
|
||||||
jp PrintText
|
jp PrintText
|
||||||
.mistAlreadyInUse
|
.mistAlreadyInUse
|
||||||
jpab PrintButItFailedText_
|
jpfar PrintButItFailedText_
|
||||||
|
|
||||||
ShroudedInMistText:
|
ShroudedInMistText:
|
||||||
text_far _ShroudedInMistText
|
text_far _ShroudedInMistText
|
||||||
|
|
|
||||||
|
|
@ -26,22 +26,22 @@ ParalyzeEffect_:
|
||||||
jr z, .doesntAffect
|
jr z, .doesntAffect
|
||||||
.hitTest
|
.hitTest
|
||||||
push hl
|
push hl
|
||||||
callab MoveHitTest
|
callfar MoveHitTest
|
||||||
pop hl
|
pop hl
|
||||||
ld a, [wMoveMissed]
|
ld a, [wMoveMissed]
|
||||||
and a
|
and a
|
||||||
jr nz, .didntAffect
|
jr nz, .didntAffect
|
||||||
set PAR, [hl]
|
set PAR, [hl]
|
||||||
callab QuarterSpeedDueToParalysis
|
callfar QuarterSpeedDueToParalysis
|
||||||
ld c, 30
|
ld c, 30
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
callab PlayCurrentMoveAnimation
|
callfar PlayCurrentMoveAnimation
|
||||||
jpab PrintMayNotAttackText
|
jpfar PrintMayNotAttackText
|
||||||
.didntAffect
|
.didntAffect
|
||||||
ld c, 50
|
ld c, 50
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
jpab PrintDidntAffectText
|
jpfar PrintDidntAffectText
|
||||||
.doesntAffect
|
.doesntAffect
|
||||||
ld c, 50
|
ld c, 50
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
jpab PrintDoesntAffectText
|
jpfar PrintDoesntAffectText
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ SubstituteEffect_:
|
||||||
call Bankswitch ; jump to routine depending on animation setting
|
call Bankswitch ; jump to routine depending on animation setting
|
||||||
ld hl, SubstituteText
|
ld hl, SubstituteText
|
||||||
call PrintText
|
call PrintText
|
||||||
jpab DrawHUDsAndHPBars
|
jpfar DrawHUDsAndHPBars
|
||||||
.alreadyHasSubstitute
|
.alreadyHasSubstitute
|
||||||
ld hl, HasSubstituteText
|
ld hl, HasSubstituteText
|
||||||
jr .printText
|
jr .printText
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ _ScrollTrainerPicAfterBattle:
|
||||||
ld [wEnemyMonSpecies2], a
|
ld [wEnemyMonSpecies2], a
|
||||||
ld b, SET_PAL_BATTLE
|
ld b, SET_PAL_BATTLE
|
||||||
call RunPaletteCommand
|
call RunPaletteCommand
|
||||||
callab _LoadTrainerPic
|
callfar _LoadTrainerPic
|
||||||
coord hl, 19, 0
|
coord hl, 19, 0
|
||||||
ld c, $0
|
ld c, $0
|
||||||
.scrollLoop
|
.scrollLoop
|
||||||
|
|
|
||||||
|
|
@ -204,7 +204,7 @@ AIMoveChoiceModification3:
|
||||||
push hl
|
push hl
|
||||||
push bc
|
push bc
|
||||||
push de
|
push de
|
||||||
callab AIGetTypeEffectiveness
|
callfar AIGetTypeEffectiveness
|
||||||
pop de
|
pop de
|
||||||
pop bc
|
pop bc
|
||||||
pop hl
|
pop hl
|
||||||
|
|
@ -599,7 +599,7 @@ SwitchEnemyMon:
|
||||||
; switching in a new mon in response to this switch.
|
; switching in a new mon in response to this switch.
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wFirstMonsNotOutYet], a
|
ld [wFirstMonsNotOutYet], a
|
||||||
callab EnemySendOut
|
callfar EnemySendOut
|
||||||
xor a
|
xor a
|
||||||
ld [wFirstMonsNotOutYet], a
|
ld [wFirstMonsNotOutYet], a
|
||||||
|
|
||||||
|
|
@ -713,7 +713,7 @@ AIIncreaseStat:
|
||||||
ld a, ANIM_AF
|
ld a, ANIM_AF
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld [hl], b
|
ld [hl], b
|
||||||
callab StatModifierUpEffect
|
callfar StatModifierUpEffect
|
||||||
pop hl
|
pop hl
|
||||||
pop af
|
pop af
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
|
|
|
||||||
|
|
@ -7,14 +7,14 @@ TryDoWildEncounter:
|
||||||
ld a, [wd736]
|
ld a, [wd736]
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
callab IsPlayerStandingOnDoorTileOrWarpTile
|
callfar IsPlayerStandingOnDoorTileOrWarpTile
|
||||||
jr nc, .notStandingOnDoorOrWarpTile
|
jr nc, .notStandingOnDoorOrWarpTile
|
||||||
.CantEncounter
|
.CantEncounter
|
||||||
ld a, $1
|
ld a, $1
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
.notStandingOnDoorOrWarpTile
|
.notStandingOnDoorOrWarpTile
|
||||||
callab IsPlayerJustOutsideMap
|
callfar IsPlayerJustOutsideMap
|
||||||
jr z, .CantEncounter
|
jr z, .CantEncounter
|
||||||
ld a, [wRepelRemainingSteps]
|
ld a, [wRepelRemainingSteps]
|
||||||
and a
|
and a
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ GiveFossilToCinnabarLab::
|
||||||
call PrintText
|
call PrintText
|
||||||
ld a, [wFossilItem]
|
ld a, [wFossilItem]
|
||||||
ldh [hItemToRemoveID], a
|
ldh [hItemToRemoveID], a
|
||||||
callba RemoveItemByID
|
farcall RemoveItemByID
|
||||||
ld hl, LabFossil_610b8
|
ld hl, LabFossil_610b8
|
||||||
call PrintText
|
call PrintText
|
||||||
SetEvents EVENT_GAVE_FOSSIL_TO_LAB, EVENT_LAB_STILL_REVIVING_FOSSIL
|
SetEvents EVENT_GAVE_FOSSIL_TO_LAB, EVENT_LAB_STILL_REVIVING_FOSSIL
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ DisplayDiploma::
|
||||||
coord hl, 10, 4
|
coord hl, 10, 4
|
||||||
ld de, wPlayerName
|
ld de, wPlayerName
|
||||||
call PlaceString
|
call PlaceString
|
||||||
callba DrawPlayerCharacter
|
farcall DrawPlayerCharacter
|
||||||
|
|
||||||
; Move the player 33 pixels right and set the priority bit so he appears
|
; Move the player 33 pixels right and set the priority bit so he appears
|
||||||
; behind the background layer.
|
; behind the background layer.
|
||||||
|
|
@ -56,7 +56,7 @@ DisplayDiploma::
|
||||||
jr nz, .adjustPlayerGfxLoop
|
jr nz, .adjustPlayerGfxLoop
|
||||||
|
|
||||||
call EnableLCD
|
call EnableLCD
|
||||||
callba LoadTrainerInfoTextBoxTiles
|
farcall LoadTrainerInfoTextBoxTiles
|
||||||
ld b, SET_PAL_GENERIC
|
ld b, SET_PAL_GENERIC
|
||||||
call RunPaletteCommand
|
call RunPaletteCommand
|
||||||
call Delay3
|
call Delay3
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ EvolveTradeMon:
|
||||||
ld [wForceEvolution], a
|
ld [wForceEvolution], a
|
||||||
ld a, LINK_STATE_TRADING
|
ld a, LINK_STATE_TRADING
|
||||||
ld [wLinkState], a
|
ld [wLinkState], a
|
||||||
callab TryEvolvingMon
|
callfar TryEvolvingMon
|
||||||
xor a ; LINK_STATE_NONE
|
xor a ; LINK_STATE_NONE
|
||||||
ld [wLinkState], a
|
ld [wLinkState], a
|
||||||
jp PlayDefaultMusic
|
jp PlayDefaultMusic
|
||||||
|
|
|
||||||
|
|
@ -15,9 +15,9 @@ _GivePokemon::
|
||||||
ld [wEnemyBattleStatus3], a
|
ld [wEnemyBattleStatus3], a
|
||||||
ld a, [wcf91]
|
ld a, [wcf91]
|
||||||
ld [wEnemyMonSpecies2], a
|
ld [wEnemyMonSpecies2], a
|
||||||
callab LoadEnemyMonData
|
callfar LoadEnemyMonData
|
||||||
call SetPokedexOwnedFlag
|
call SetPokedexOwnedFlag
|
||||||
callab SendNewMonToBox
|
callfar SendNewMonToBox
|
||||||
ld hl, wcf4b
|
ld hl, wcf4b
|
||||||
ld a, [wCurrentBoxNum]
|
ld a, [wCurrentBoxNum]
|
||||||
and $7f
|
and $7f
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,6 @@ PrintBookshelfText::
|
||||||
.noMatch
|
.noMatch
|
||||||
ld a, $ff
|
ld a, $ff
|
||||||
ldh [hFFDB], a
|
ldh [hFFDB], a
|
||||||
jpba PrintCardKeyText
|
farjp PrintCardKeyText
|
||||||
|
|
||||||
INCLUDE "data/tilesets/bookshelf_tile_ids.asm"
|
INCLUDE "data/tilesets/bookshelf_tile_ids.asm"
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ TownMapText::
|
||||||
inc a
|
inc a
|
||||||
ldh [hAutoBGTransferEnabled], a
|
ldh [hAutoBGTransferEnabled], a
|
||||||
call LoadFontTilePatterns
|
call LoadFontTilePatterns
|
||||||
callba DisplayTownMap
|
farcall DisplayTownMap
|
||||||
ld hl, wd730
|
ld hl, wd730
|
||||||
res 6, [hl]
|
res 6, [hl]
|
||||||
ld de, TextScriptEnd
|
ld de, TextScriptEnd
|
||||||
|
|
|
||||||
|
|
@ -137,10 +137,10 @@ InGameTrade_DoTrade:
|
||||||
ld [wMonDataLocation], a
|
ld [wMonDataLocation], a
|
||||||
call AddPartyMon
|
call AddPartyMon
|
||||||
call InGameTrade_CopyDataToReceivedMon
|
call InGameTrade_CopyDataToReceivedMon
|
||||||
callab EvolveTradeMon
|
callfar EvolveTradeMon
|
||||||
call ClearScreen
|
call ClearScreen
|
||||||
call InGameTrade_RestoreScreen
|
call InGameTrade_RestoreScreen
|
||||||
callba RedrawMapView
|
farcall RedrawMapView
|
||||||
and a
|
and a
|
||||||
ld a, $3
|
ld a, $3
|
||||||
jr .tradeSucceeded
|
jr .tradeSucceeded
|
||||||
|
|
@ -159,7 +159,7 @@ InGameTrade_RestoreScreen:
|
||||||
call LoadGBPal
|
call LoadGBPal
|
||||||
ld c, 10
|
ld c, 10
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
jpba LoadWildData
|
farjp LoadWildData
|
||||||
|
|
||||||
InGameTrade_PrepareTradeData:
|
InGameTrade_PrepareTradeData:
|
||||||
ld hl, wTradedPlayerMonSpecies
|
ld hl, wTradedPlayerMonSpecies
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ DisplayPokemonCenterDialogue_::
|
||||||
ld [wSprite01StateData1ImageIndex], a ; make the nurse turn to face the machine
|
ld [wSprite01StateData1ImageIndex], a ; make the nurse turn to face the machine
|
||||||
call Delay3
|
call Delay3
|
||||||
predef HealParty
|
predef HealParty
|
||||||
callba AnimateHealingMachine ; do the healing machine animation
|
farcall AnimateHealingMachine ; do the healing machine animation
|
||||||
xor a
|
xor a
|
||||||
ld [wAudioFadeOutControl], a
|
ld [wAudioFadeOutControl], a
|
||||||
ld a, [wAudioSavedROMBank]
|
ld a, [wAudioSavedROMBank]
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ DisplayDexRating:
|
||||||
call PrintText
|
call PrintText
|
||||||
pop hl
|
pop hl
|
||||||
call PrintText
|
call PrintText
|
||||||
callba PlayPokedexRatingSfx
|
farcall PlayPokedexRatingSfx
|
||||||
jp WaitForTextScrollButtonPress
|
jp WaitForTextScrollButtonPress
|
||||||
.hallOfFame
|
.hallOfFame
|
||||||
ld de, wDexRatingNumMonsSeen
|
ld de, wDexRatingNumMonsSeen
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ DisplayPokemartDialogue_::
|
||||||
ld [wPrintItemPrices], a
|
ld [wPrintItemPrices], a
|
||||||
ld a, INIT_BAG_ITEM_LIST
|
ld a, INIT_BAG_ITEM_LIST
|
||||||
ld [wInitListType], a
|
ld [wInitListType], a
|
||||||
callab InitList
|
callfar InitList
|
||||||
|
|
||||||
ld a, [wNumBagItems]
|
ld a, [wNumBagItems]
|
||||||
and a
|
and a
|
||||||
|
|
@ -126,7 +126,7 @@ DisplayPokemartDialogue_::
|
||||||
ld [wPrintItemPrices], a
|
ld [wPrintItemPrices], a
|
||||||
ld a, INIT_OTHER_ITEM_LIST
|
ld a, INIT_OTHER_ITEM_LIST
|
||||||
ld [wInitListType], a
|
ld [wInitListType], a
|
||||||
callab InitList
|
callfar InitList
|
||||||
|
|
||||||
ld hl, PokemartBuyingGreetingText
|
ld hl, PokemartBuyingGreetingText
|
||||||
call PrintText
|
call PrintText
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,6 @@ RemoveGuardDrink::
|
||||||
call IsItemInBag
|
call IsItemInBag
|
||||||
pop hl
|
pop hl
|
||||||
jr z, .drinkLoop
|
jr z, .drinkLoop
|
||||||
jpba RemoveItemByID
|
farjp RemoveItemByID
|
||||||
|
|
||||||
INCLUDE "data/items/guard_drink_items.asm"
|
INCLUDE "data/items/guard_drink_items.asm"
|
||||||
|
|
|
||||||
|
|
@ -147,7 +147,7 @@ ItemUseBall:
|
||||||
|
|
||||||
; If the player is fighting an unidentified ghost, set the value that indicates
|
; If the player is fighting an unidentified ghost, set the value that indicates
|
||||||
; the Pokémon can't be caught and skip the capture calculations.
|
; the Pokémon can't be caught and skip the capture calculations.
|
||||||
callab IsGhostBattle
|
callfar IsGhostBattle
|
||||||
ld b, $10 ; can't be caught value
|
ld b, $10 ; can't be caught value
|
||||||
jp z, .setAnimData
|
jp z, .setAnimData
|
||||||
|
|
||||||
|
|
@ -495,7 +495,7 @@ ItemUseBall:
|
||||||
ld [wcf91], a
|
ld [wcf91], a
|
||||||
ld a, [wEnemyMonLevel]
|
ld a, [wEnemyMonLevel]
|
||||||
ld [wCurEnemyLVL], a
|
ld [wCurEnemyLVL], a
|
||||||
callab LoadEnemyMonData
|
callfar LoadEnemyMonData
|
||||||
pop af
|
pop af
|
||||||
ld [wcf91], a
|
ld [wcf91], a
|
||||||
pop hl
|
pop hl
|
||||||
|
|
@ -632,7 +632,7 @@ ItemUseTownMap:
|
||||||
ld a, [wIsInBattle]
|
ld a, [wIsInBattle]
|
||||||
and a
|
and a
|
||||||
jp nz, ItemUseNotTime
|
jp nz, ItemUseNotTime
|
||||||
jpba DisplayTownMap
|
farjp DisplayTownMap
|
||||||
|
|
||||||
ItemUseBicycle:
|
ItemUseBicycle:
|
||||||
ld a, [wIsInBattle]
|
ld a, [wIsInBattle]
|
||||||
|
|
@ -778,7 +778,7 @@ ItemUseEvoStone:
|
||||||
ld a, SFX_HEAL_AILMENT
|
ld a, SFX_HEAL_AILMENT
|
||||||
call PlaySoundWaitForCurrent
|
call PlaySoundWaitForCurrent
|
||||||
call WaitForSoundToFinish
|
call WaitForSoundToFinish
|
||||||
callab TryEvolvingMon ; try to evolve pokemon
|
callfar TryEvolvingMon ; try to evolve pokemon
|
||||||
ld a, [wEvolutionOccurred]
|
ld a, [wEvolutionOccurred]
|
||||||
and a
|
and a
|
||||||
jr z, .noEffect
|
jr z, .noEffect
|
||||||
|
|
@ -1341,7 +1341,7 @@ ItemUseMedicine:
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
ld d, a
|
ld d, a
|
||||||
callab CalcExperience ; calculate experience for next level and store it at hExperience
|
callfar CalcExperience ; calculate experience for next level and store it at hExperience
|
||||||
pop de
|
pop de
|
||||||
pop hl
|
pop hl
|
||||||
ld bc, wPartyMon1Exp - wPartyMon1Level
|
ld bc, wPartyMon1Exp - wPartyMon1Level
|
||||||
|
|
@ -1400,14 +1400,14 @@ ItemUseMedicine:
|
||||||
ld [wMonDataLocation], a
|
ld [wMonDataLocation], a
|
||||||
call LoadMonData
|
call LoadMonData
|
||||||
ld d, $01
|
ld d, $01
|
||||||
callab PrintStatsBox ; display new stats text box
|
callfar PrintStatsBox ; display new stats text box
|
||||||
call WaitForTextScrollButtonPress ; wait for button press
|
call WaitForTextScrollButtonPress ; wait for button press
|
||||||
xor a ; PLAYER_PARTY_DATA
|
xor a ; PLAYER_PARTY_DATA
|
||||||
ld [wMonDataLocation], a
|
ld [wMonDataLocation], a
|
||||||
predef LearnMoveFromLevelUp ; learn level up move, if any
|
predef LearnMoveFromLevelUp ; learn level up move, if any
|
||||||
xor a
|
xor a
|
||||||
ld [wForceEvolution], a
|
ld [wForceEvolution], a
|
||||||
callab TryEvolvingMon ; evolve pokemon, if appropriate
|
callfar TryEvolvingMon ; evolve pokemon, if appropriate
|
||||||
ld a, $01
|
ld a, $01
|
||||||
ld [wUpdateSpritesEnabled], a
|
ld [wUpdateSpritesEnabled], a
|
||||||
pop af
|
pop af
|
||||||
|
|
@ -1699,7 +1699,7 @@ ItemUseXStat:
|
||||||
call Delay3
|
call Delay3
|
||||||
xor a
|
xor a
|
||||||
ldh [hWhoseTurn], a ; set turn to player's turn
|
ldh [hWhoseTurn], a ; set turn to player's turn
|
||||||
callba StatModifierUpEffect ; do stat increase move
|
farcall StatModifierUpEffect ; do stat increase move
|
||||||
pop hl
|
pop hl
|
||||||
pop af
|
pop af
|
||||||
ld [hld], a ; restore [wPlayerMoveEffect]
|
ld [hld], a ; restore [wPlayerMoveEffect]
|
||||||
|
|
@ -1775,7 +1775,7 @@ ItemUsePokeflute:
|
||||||
and $80
|
and $80
|
||||||
jr nz, .skipMusic
|
jr nz, .skipMusic
|
||||||
call WaitForSoundToFinish ; wait for sound to end
|
call WaitForSoundToFinish ; wait for sound to end
|
||||||
callba Music_PokeFluteInBattle ; play in-battle pokeflute music
|
farcall Music_PokeFluteInBattle ; play in-battle pokeflute music
|
||||||
.musicWaitLoop ; wait for music to finish playing
|
.musicWaitLoop ; wait for music to finish playing
|
||||||
ld a, [wChannelSoundIDs + Ch7]
|
ld a, [wChannelSoundIDs + Ch7]
|
||||||
and a ; music off?
|
and a ; music off?
|
||||||
|
|
@ -1927,7 +1927,7 @@ RodResponse:
|
||||||
push af
|
push af
|
||||||
push hl
|
push hl
|
||||||
ld [hl], 0
|
ld [hl], 0
|
||||||
callba FishingAnim
|
farcall FishingAnim
|
||||||
pop hl
|
pop hl
|
||||||
pop af
|
pop af
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
|
@ -1968,7 +1968,7 @@ ItemUseItemfinder:
|
||||||
and a
|
and a
|
||||||
jp nz, ItemUseNotTime
|
jp nz, ItemUseNotTime
|
||||||
call ItemUseReloadOverworldData
|
call ItemUseReloadOverworldData
|
||||||
callba HiddenItemNear ; check for hidden items
|
farcall HiddenItemNear ; check for hidden items
|
||||||
ld hl, ItemfinderFoundNothingText
|
ld hl, ItemfinderFoundNothingText
|
||||||
jr nc, .printText ; if no hidden items
|
jr nc, .printText ; if no hidden items
|
||||||
ld c, 4
|
ld c, 4
|
||||||
|
|
@ -2024,7 +2024,7 @@ ItemUsePPRestore:
|
||||||
call PrintText
|
call PrintText
|
||||||
xor a
|
xor a
|
||||||
ld [wPlayerMoveListIndex], a
|
ld [wPlayerMoveListIndex], a
|
||||||
callab MoveSelectionMenu ; move selection menu
|
callfar MoveSelectionMenu ; move selection menu
|
||||||
ld a, 0
|
ld a, 0
|
||||||
ld [wPlayerMoveListIndex], a
|
ld [wPlayerMoveListIndex], a
|
||||||
jr nz, .chooseMon
|
jr nz, .chooseMon
|
||||||
|
|
@ -2278,7 +2278,7 @@ ItemUseTMHM:
|
||||||
call PrintText
|
call PrintText
|
||||||
jr .chooseMon
|
jr .chooseMon
|
||||||
.checkIfAlreadyLearnedMove
|
.checkIfAlreadyLearnedMove
|
||||||
callab CheckIfMoveIsKnown ; check if the pokemon already knows the move
|
callfar CheckIfMoveIsKnown ; check if the pokemon already knows the move
|
||||||
jr c, .chooseMon
|
jr c, .chooseMon
|
||||||
predef LearnMove ; teach move
|
predef LearnMove ; teach move
|
||||||
pop af
|
pop af
|
||||||
|
|
@ -2820,7 +2820,7 @@ SendNewMonToBox:
|
||||||
push de
|
push de
|
||||||
ld a, [wCurEnemyLVL]
|
ld a, [wCurEnemyLVL]
|
||||||
ld d, a
|
ld d, a
|
||||||
callab CalcExperience
|
callfar CalcExperience
|
||||||
pop de
|
pop de
|
||||||
ldh a, [hExperience]
|
ldh a, [hExperience]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
|
|
|
||||||
|
|
@ -366,7 +366,7 @@ DrawPlayerOrBirdSprite:
|
||||||
jp CopyData
|
jp CopyData
|
||||||
|
|
||||||
DisplayWildLocations:
|
DisplayWildLocations:
|
||||||
callba FindWildLocationsOfMon
|
farcall FindWildLocationsOfMon
|
||||||
call ZeroOutDuplicatesInList
|
call ZeroOutDuplicatesInList
|
||||||
ld hl, wOAMBuffer
|
ld hl, wOAMBuffer
|
||||||
ld de, wTownMapCoords
|
ld de, wTownMapCoords
|
||||||
|
|
|
||||||
|
|
@ -359,7 +359,7 @@ TradeCenter_SelectMon:
|
||||||
.displayEnemyMonStats
|
.displayEnemyMonStats
|
||||||
ld a, INIT_ENEMYOT_LIST
|
ld a, INIT_ENEMYOT_LIST
|
||||||
ld [wInitListType], a
|
ld [wInitListType], a
|
||||||
callab InitList ; the list isn't used
|
callfar InitList ; the list isn't used
|
||||||
ld hl, wEnemyMons
|
ld hl, wEnemyMons
|
||||||
call TradeCenter_DisplayStats
|
call TradeCenter_DisplayStats
|
||||||
jp .getNewInput
|
jp .getNewInput
|
||||||
|
|
@ -418,7 +418,7 @@ TradeCenter_SelectMon:
|
||||||
; unreachable code
|
; unreachable code
|
||||||
ld a, INIT_PLAYEROT_LIST
|
ld a, INIT_PLAYEROT_LIST
|
||||||
ld [wInitListType], a
|
ld [wInitListType], a
|
||||||
callab InitList ; the list isn't used
|
callfar InitList ; the list isn't used
|
||||||
call TradeCenter_DisplayStats
|
call TradeCenter_DisplayStats
|
||||||
jp .getNewInput
|
jp .getNewInput
|
||||||
.playerMonMenu_ANotPressed
|
.playerMonMenu_ANotPressed
|
||||||
|
|
@ -513,7 +513,7 @@ TradeCenter_SelectMon:
|
||||||
ld [wCurrentMenuItem], a
|
ld [wCurrentMenuItem], a
|
||||||
ld a, INIT_PLAYEROT_LIST
|
ld a, INIT_PLAYEROT_LIST
|
||||||
ld [wInitListType], a
|
ld [wInitListType], a
|
||||||
callab InitList ; the list isn't used
|
callfar InitList ; the list isn't used
|
||||||
call TradeCenter_DisplayStats
|
call TradeCenter_DisplayStats
|
||||||
call LoadScreenTilesFromBuffer1
|
call LoadScreenTilesFromBuffer1
|
||||||
jp .playerMonMenu
|
jp .playerMonMenu
|
||||||
|
|
@ -588,7 +588,7 @@ ReturnToCableClubRoom:
|
||||||
dec a
|
dec a
|
||||||
ld [wDestinationWarpID], a
|
ld [wDestinationWarpID], a
|
||||||
call LoadMapData
|
call LoadMapData
|
||||||
callba ClearVariablesOnEnterMap
|
farcall ClearVariablesOnEnterMap
|
||||||
pop hl
|
pop hl
|
||||||
pop af
|
pop af
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
|
@ -845,7 +845,7 @@ TradeCenter_Trade:
|
||||||
.usingExternalClock
|
.usingExternalClock
|
||||||
predef ExternalClockTradeAnim
|
predef ExternalClockTradeAnim
|
||||||
.tradeCompleted
|
.tradeCompleted
|
||||||
callab TryEvolvingMon
|
callfar TryEvolvingMon
|
||||||
call ClearScreen
|
call ClearScreen
|
||||||
call LoadTrainerInfoTextBoxTiles
|
call LoadTrainerInfoTextBoxTiles
|
||||||
call Serial_PrintWaitingTextAndSyncAndExchangeNybble
|
call Serial_PrintWaitingTextAndSyncAndExchangeNybble
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ CableClubNPC::
|
||||||
ld a, [wCurrentMenuItem]
|
ld a, [wCurrentMenuItem]
|
||||||
and a
|
and a
|
||||||
jr nz, .choseNo
|
jr nz, .choseNo
|
||||||
callab SaveSAVtoSRAM
|
callfar SaveSAVtoSRAM
|
||||||
call WaitForSoundToFinish
|
call WaitForSoundToFinish
|
||||||
ld a, SFX_SAVE
|
ld a, SFX_SAVE
|
||||||
call PlaySoundWaitForCurrent
|
call PlaySoundWaitForCurrent
|
||||||
|
|
@ -107,7 +107,7 @@ CableClubNPC::
|
||||||
xor a
|
xor a
|
||||||
ld [hld], a
|
ld [hld], a
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
jpab LinkMenu
|
jpfar LinkMenu
|
||||||
|
|
||||||
CableClubNPCAreaReservedFor2FriendsLinkedByCableText:
|
CableClubNPCAreaReservedFor2FriendsLinkedByCableText:
|
||||||
text_far _CableClubNPCAreaReservedFor2FriendsLinkedByCableText
|
text_far _CableClubNPCAreaReservedFor2FriendsLinkedByCableText
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ PKMNLeaguePC:
|
||||||
push bc
|
push bc
|
||||||
ld a, [wHoFTeamIndex2]
|
ld a, [wHoFTeamIndex2]
|
||||||
ld [wHoFTeamIndex], a
|
ld [wHoFTeamIndex], a
|
||||||
callba LoadHallOfFameTeams
|
farcall LoadHallOfFameTeams
|
||||||
call LeaguePCShowTeam
|
call LeaguePCShowTeam
|
||||||
pop bc
|
pop bc
|
||||||
jr c, .doneShowingTeams
|
jr c, .doneShowingTeams
|
||||||
|
|
@ -110,7 +110,7 @@ LeaguePCShowMon:
|
||||||
ld de, wHoFTeamNo
|
ld de, wHoFTeamNo
|
||||||
lb bc, 1, 3
|
lb bc, 1, 3
|
||||||
call PrintNumber
|
call PrintNumber
|
||||||
jpba HoFDisplayMonInfo
|
farjp HoFDisplayMonInfo
|
||||||
|
|
||||||
HallOfFameNoText:
|
HallOfFameNoText:
|
||||||
db "HALL OF FAME No @"
|
db "HALL OF FAME No @"
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ DisplayNamingScreen:
|
||||||
call RunPaletteCommand
|
call RunPaletteCommand
|
||||||
call LoadHpBarAndStatusTilePatterns
|
call LoadHpBarAndStatusTilePatterns
|
||||||
call LoadEDTile
|
call LoadEDTile
|
||||||
callba LoadMonPartySpriteGfx
|
farcall LoadMonPartySpriteGfx
|
||||||
coord hl, 0, 4
|
coord hl, 0, 4
|
||||||
ld b, 9
|
ld b, 9
|
||||||
ld c, 18
|
ld c, 18
|
||||||
|
|
@ -128,7 +128,7 @@ DisplayNamingScreen:
|
||||||
.inputLoop
|
.inputLoop
|
||||||
ld a, [wCurrentMenuItem]
|
ld a, [wCurrentMenuItem]
|
||||||
push af
|
push af
|
||||||
callba AnimatePartyMon_ForceSpeed1
|
farcall AnimatePartyMon_ForceSpeed1
|
||||||
pop af
|
pop af
|
||||||
ld [wCurrentMenuItem], a
|
ld [wCurrentMenuItem], a
|
||||||
call JoypadLowSensitivity
|
call JoypadLowSensitivity
|
||||||
|
|
@ -172,7 +172,7 @@ DisplayNamingScreen:
|
||||||
ld a, [wIsInBattle]
|
ld a, [wIsInBattle]
|
||||||
and a
|
and a
|
||||||
jp z, LoadTextBoxTilePatterns
|
jp z, LoadTextBoxTilePatterns
|
||||||
jpab LoadHudTilePatterns
|
jpfar LoadHudTilePatterns
|
||||||
|
|
||||||
.namingScreenButtonFunctions
|
.namingScreenButtonFunctions
|
||||||
dw .dPadReturnPoint
|
dw .dPadReturnPoint
|
||||||
|
|
@ -461,7 +461,7 @@ PrintNamingText:
|
||||||
ld a, [wcf91]
|
ld a, [wcf91]
|
||||||
ld [wMonPartySpriteSpecies], a
|
ld [wMonPartySpriteSpecies], a
|
||||||
push af
|
push af
|
||||||
callba WriteMonPartySpriteOAMBySpecies
|
farcall WriteMonPartySpriteOAMBySpecies
|
||||||
pop af
|
pop af
|
||||||
ld [wd11e], a
|
ld [wd11e], a
|
||||||
call GetMonName
|
call GetMonName
|
||||||
|
|
|
||||||
|
|
@ -22,14 +22,14 @@ DrawPartyMenu_::
|
||||||
ldh [hAutoBGTransferEnabled], a
|
ldh [hAutoBGTransferEnabled], a
|
||||||
call ClearScreen
|
call ClearScreen
|
||||||
call UpdateSprites
|
call UpdateSprites
|
||||||
callba LoadMonPartySpriteGfxWithLCDDisabled ; load pokemon icon graphics
|
farcall LoadMonPartySpriteGfxWithLCDDisabled ; load pokemon icon graphics
|
||||||
|
|
||||||
RedrawPartyMenu_::
|
RedrawPartyMenu_::
|
||||||
ld a, [wPartyMenuTypeOrMessageID]
|
ld a, [wPartyMenuTypeOrMessageID]
|
||||||
cp SWAP_MONS_PARTY_MENU
|
cp SWAP_MONS_PARTY_MENU
|
||||||
jp z, .printMessage
|
jp z, .printMessage
|
||||||
call ErasePartyMenuCursors
|
call ErasePartyMenuCursors
|
||||||
callba InitPartyMenuBlkPacket
|
farcall InitPartyMenuBlkPacket
|
||||||
coord hl, 3, 0
|
coord hl, 3, 0
|
||||||
ld de, wPartySpecies
|
ld de, wPartySpecies
|
||||||
xor a
|
xor a
|
||||||
|
|
@ -49,7 +49,7 @@ RedrawPartyMenu_::
|
||||||
call GetPartyMonName
|
call GetPartyMonName
|
||||||
pop hl
|
pop hl
|
||||||
call PlaceString ; print the pokemon's name
|
call PlaceString ; print the pokemon's name
|
||||||
callba WriteMonPartySpriteOAMByPartyIndex ; place the appropriate pokemon icon
|
farcall WriteMonPartySpriteOAMByPartyIndex ; place the appropriate pokemon icon
|
||||||
ldh a, [hPartyMonIndex]
|
ldh a, [hPartyMonIndex]
|
||||||
ld [wWhichPokemon], a
|
ld [wWhichPokemon], a
|
||||||
inc a
|
inc a
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ ActivatePC::
|
||||||
call LoadScreenTilesFromBuffer2
|
call LoadScreenTilesFromBuffer2
|
||||||
call Delay3
|
call Delay3
|
||||||
PCMainMenu:
|
PCMainMenu:
|
||||||
callba DisplayPCMainMenu
|
farcall DisplayPCMainMenu
|
||||||
ld hl, wFlags_0xcd60
|
ld hl, wFlags_0xcd60
|
||||||
set 5, [hl]
|
set 5, [hl]
|
||||||
call HandleMenuInput
|
call HandleMenuInput
|
||||||
|
|
@ -56,19 +56,19 @@ PCMainMenu:
|
||||||
call WaitForSoundToFinish
|
call WaitForSoundToFinish
|
||||||
ld hl, AccessedMyPCText
|
ld hl, AccessedMyPCText
|
||||||
call PrintText
|
call PrintText
|
||||||
callba PlayerPC
|
farcall PlayerPC
|
||||||
jr ReloadMainMenu
|
jr ReloadMainMenu
|
||||||
OaksPC:
|
OaksPC:
|
||||||
ld a, SFX_ENTER_PC
|
ld a, SFX_ENTER_PC
|
||||||
call PlaySound
|
call PlaySound
|
||||||
call WaitForSoundToFinish
|
call WaitForSoundToFinish
|
||||||
callba OpenOaksPC
|
farcall OpenOaksPC
|
||||||
jr ReloadMainMenu
|
jr ReloadMainMenu
|
||||||
PKMNLeague:
|
PKMNLeague:
|
||||||
ld a, SFX_ENTER_PC
|
ld a, SFX_ENTER_PC
|
||||||
call PlaySound
|
call PlaySound
|
||||||
call WaitForSoundToFinish
|
call WaitForSoundToFinish
|
||||||
callba PKMNLeaguePC
|
farcall PKMNLeaguePC
|
||||||
jr ReloadMainMenu
|
jr ReloadMainMenu
|
||||||
BillsPC:
|
BillsPC:
|
||||||
ld a, SFX_ENTER_PC
|
ld a, SFX_ENTER_PC
|
||||||
|
|
@ -82,7 +82,7 @@ BillsPC:
|
||||||
ld hl, AccessedBillsPCText
|
ld hl, AccessedBillsPCText
|
||||||
.printText
|
.printText
|
||||||
call PrintText
|
call PrintText
|
||||||
callba BillsPC_
|
farcall BillsPC_
|
||||||
ReloadMainMenu:
|
ReloadMainMenu:
|
||||||
xor a
|
xor a
|
||||||
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
|
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ ShowPokedexMenu:
|
||||||
.setUpGraphics
|
.setUpGraphics
|
||||||
ld b, SET_PAL_GENERIC
|
ld b, SET_PAL_GENERIC
|
||||||
call RunPaletteCommand
|
call RunPaletteCommand
|
||||||
callab LoadPokedexTilePatterns
|
callfar LoadPokedexTilePatterns
|
||||||
.doPokemonListMenu
|
.doPokemonListMenu
|
||||||
ld hl, wTopMenuItemY
|
ld hl, wTopMenuItemY
|
||||||
ld a, 3
|
ld a, 3
|
||||||
|
|
@ -393,7 +393,7 @@ ShowPokedexData:
|
||||||
call GBPalWhiteOutWithDelay3
|
call GBPalWhiteOutWithDelay3
|
||||||
call ClearScreen
|
call ClearScreen
|
||||||
call UpdateSprites
|
call UpdateSprites
|
||||||
callab LoadPokedexTilePatterns ; load pokedex tiles
|
callfar LoadPokedexTilePatterns ; load pokedex tiles
|
||||||
|
|
||||||
; function to display pokedex data from inside the pokedex
|
; function to display pokedex data from inside the pokedex
|
||||||
ShowPokedexDataInternal:
|
ShowPokedexDataInternal:
|
||||||
|
|
|
||||||
|
|
@ -138,7 +138,7 @@ LoadSAVIgnoreBadCheckSum:
|
||||||
jp LoadSAV2
|
jp LoadSAV2
|
||||||
|
|
||||||
SaveSAV:
|
SaveSAV:
|
||||||
callba PrintSaveScreenText
|
farcall PrintSaveScreenText
|
||||||
ld hl, WouldYouLikeToSaveText
|
ld hl, WouldYouLikeToSaveText
|
||||||
call SaveSAVConfirm
|
call SaveSAVConfirm
|
||||||
and a ;|0 = Yes|1 = No|
|
and a ;|0 = Yes|1 = No|
|
||||||
|
|
|
||||||
|
|
@ -160,7 +160,7 @@ StartMenu_Pokemon::
|
||||||
.surf
|
.surf
|
||||||
bit 4, a ; does the player have the Soul Badge?
|
bit 4, a ; does the player have the Soul Badge?
|
||||||
jp z, .newBadgeRequired
|
jp z, .newBadgeRequired
|
||||||
callba IsSurfingAllowed
|
farcall IsSurfingAllowed
|
||||||
ld hl, wd728
|
ld hl, wd728
|
||||||
bit 1, [hl]
|
bit 1, [hl]
|
||||||
res 1, [hl]
|
res 1, [hl]
|
||||||
|
|
@ -651,7 +651,7 @@ StartMenu_Option::
|
||||||
ldh [hAutoBGTransferEnabled], a
|
ldh [hAutoBGTransferEnabled], a
|
||||||
call ClearScreen
|
call ClearScreen
|
||||||
call UpdateSprites
|
call UpdateSprites
|
||||||
callab DisplayOptionMenu
|
callfar DisplayOptionMenu
|
||||||
call LoadScreenTilesFromBuffer2 ; restore saved screen
|
call LoadScreenTilesFromBuffer2 ; restore saved screen
|
||||||
call LoadTextBoxTilePatterns
|
call LoadTextBoxTilePatterns
|
||||||
call UpdateSprites
|
call UpdateSprites
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
HallOfFamePC:
|
HallOfFamePC:
|
||||||
callba AnimateHallOfFame
|
farcall AnimateHallOfFame
|
||||||
call ClearScreen
|
call ClearScreen
|
||||||
ld c, 100
|
ld c, 100
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
|
|
@ -235,7 +235,7 @@ Credits:
|
||||||
jr .nextCreditsScreen
|
jr .nextCreditsScreen
|
||||||
.showCopyrightText
|
.showCopyrightText
|
||||||
push de
|
push de
|
||||||
callba LoadCopyrightTiles
|
farcall LoadCopyrightTiles
|
||||||
pop de
|
pop de
|
||||||
pop de
|
pop de
|
||||||
jr .nextCreditsCommand
|
jr .nextCreditsCommand
|
||||||
|
|
|
||||||
|
|
@ -311,7 +311,7 @@ LoadIntroGraphics:
|
||||||
PlayShootingStar:
|
PlayShootingStar:
|
||||||
ld b, SET_PAL_GAME_FREAK_INTRO
|
ld b, SET_PAL_GAME_FREAK_INTRO
|
||||||
call RunPaletteCommand
|
call RunPaletteCommand
|
||||||
callba LoadCopyrightAndTextBoxTiles
|
farcall LoadCopyrightAndTextBoxTiles
|
||||||
ldPal a, BLACK, DARK_GRAY, LIGHT_GRAY, WHITE
|
ldPal a, BLACK, DARK_GRAY, LIGHT_GRAY, WHITE
|
||||||
ldh [rBGP], a
|
ldh [rBGP], a
|
||||||
ld c, 180
|
ld c, 180
|
||||||
|
|
@ -328,7 +328,7 @@ PlayShootingStar:
|
||||||
set 3, [hl]
|
set 3, [hl]
|
||||||
ld c, 64
|
ld c, 64
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
callba AnimateShootingStar
|
farcall AnimateShootingStar
|
||||||
push af
|
push af
|
||||||
pop af
|
pop af
|
||||||
jr c, .next ; skip the delay if the user interrupted the animation
|
jr c, .next ; skip the delay if the user interrupted the animation
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ DoClearSaveDialogue:
|
||||||
ld a, [wCurrentMenuItem]
|
ld a, [wCurrentMenuItem]
|
||||||
and a
|
and a
|
||||||
jp z, Init
|
jp z, Init
|
||||||
callba ClearSAV
|
farcall ClearSAV
|
||||||
jp Init
|
jp Init
|
||||||
|
|
||||||
ClearSaveDataText:
|
ClearSaveDataText:
|
||||||
|
|
|
||||||
|
|
@ -226,7 +226,7 @@ ENDC
|
||||||
ld c, 1
|
ld c, 1
|
||||||
call CheckForUserInterruption
|
call CheckForUserInterruption
|
||||||
jr c, .finishedWaiting
|
jr c, .finishedWaiting
|
||||||
callba TitleScreenAnimateBallIfStarterOut
|
farcall TitleScreenAnimateBallIfStarterOut
|
||||||
call TitleScreenPickNewMon
|
call TitleScreenPickNewMon
|
||||||
jr .awaitUserInterruptionLoop
|
jr .awaitUserInterruptionLoop
|
||||||
|
|
||||||
|
|
@ -255,7 +255,7 @@ ENDC
|
||||||
jp MainMenu
|
jp MainMenu
|
||||||
|
|
||||||
.doClearSaveDialogue
|
.doClearSaveDialogue
|
||||||
jpba DoClearSaveDialogue
|
farjp DoClearSaveDialogue
|
||||||
|
|
||||||
TitleScreenPickNewMon:
|
TitleScreenPickNewMon:
|
||||||
ld a, vBGMap0 / $100
|
ld a, vBGMap0 / $100
|
||||||
|
|
@ -282,12 +282,12 @@ TitleScreenPickNewMon:
|
||||||
ld a, $90
|
ld a, $90
|
||||||
ldh [hWY], a
|
ldh [hWY], a
|
||||||
ld d, 1 ; scroll out
|
ld d, 1 ; scroll out
|
||||||
callba TitleScroll
|
farcall TitleScroll
|
||||||
ret
|
ret
|
||||||
|
|
||||||
TitleScreenScrollInMon:
|
TitleScreenScrollInMon:
|
||||||
ld d, 0 ; scroll in
|
ld d, 0 ; scroll in
|
||||||
callba TitleScroll
|
farcall TitleScroll
|
||||||
xor a
|
xor a
|
||||||
ldh [hWY], a
|
ldh [hWY], a
|
||||||
ret
|
ret
|
||||||
|
|
|
||||||
|
|
@ -199,7 +199,7 @@ LoadTradingGFXAndMonNames:
|
||||||
Trade_LoadMonPartySpriteGfx:
|
Trade_LoadMonPartySpriteGfx:
|
||||||
ld a, %11010000
|
ld a, %11010000
|
||||||
ldh [rOBP1], a
|
ldh [rOBP1], a
|
||||||
jpba LoadMonPartySpriteGfx
|
farjp LoadMonPartySpriteGfx
|
||||||
|
|
||||||
Trade_SwapNames:
|
Trade_SwapNames:
|
||||||
ld hl, wPlayerName
|
ld hl, wPlayerName
|
||||||
|
|
@ -615,7 +615,7 @@ Trade_AnimCircledMon:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Trade_WriteCircledMonOAM:
|
Trade_WriteCircledMonOAM:
|
||||||
callba WriteMonPartySpriteOAMBySpecies
|
farcall WriteMonPartySpriteOAMBySpecies
|
||||||
call Trade_WriteCircleOAM
|
call Trade_WriteCircleOAM
|
||||||
|
|
||||||
Trade_AddOffsetsToOAMCoords:
|
Trade_AddOffsetsToOAMCoords:
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ UsedCut:
|
||||||
ld de, CutTreeBlockSwaps
|
ld de, CutTreeBlockSwaps
|
||||||
call ReplaceTreeTileBlock
|
call ReplaceTreeTileBlock
|
||||||
call RedrawMapView
|
call RedrawMapView
|
||||||
callba AnimCut
|
farcall AnimCut
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wUpdateSpritesEnabled], a
|
ld [wUpdateSpritesEnabled], a
|
||||||
ld a, SFX_CUT
|
ld a, SFX_CUT
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ AnimateBoulderDust:
|
||||||
ld a, %11100100
|
ld a, %11100100
|
||||||
ldh [rOBP1], a
|
ldh [rOBP1], a
|
||||||
call LoadSmokeTileFourTimes
|
call LoadSmokeTileFourTimes
|
||||||
callba WriteCutOrBoulderDustAnimationOAMBlock
|
farcall WriteCutOrBoulderDustAnimationOAMBlock
|
||||||
ld c, 8 ; number of steps in animation
|
ld c, 8 ; number of steps in animation
|
||||||
.loop
|
.loop
|
||||||
push bc
|
push bc
|
||||||
|
|
|
||||||
|
|
@ -192,7 +192,7 @@ IsPlayerStandingOnDoorTileOrWarpTile::
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
callba IsPlayerStandingOnDoorTile
|
farcall IsPlayerStandingOnDoorTile
|
||||||
jr c, .done
|
jr c, .done
|
||||||
ld a, [wCurMapTileset]
|
ld a, [wCurMapTileset]
|
||||||
add a
|
add a
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ DoBoulderDustAnimation::
|
||||||
ld a, [wd730]
|
ld a, [wd730]
|
||||||
bit 0, a
|
bit 0, a
|
||||||
ret nz
|
ret nz
|
||||||
callab AnimateBoulderDust
|
callfar AnimateBoulderDust
|
||||||
call DiscardButtonPresses
|
call DiscardButtonPresses
|
||||||
ld [wJoyIgnore], a
|
ld [wJoyIgnore], a
|
||||||
call ResetBoulderPushFlags
|
call ResetBoulderPushFlags
|
||||||
|
|
|
||||||
|
|
@ -201,7 +201,7 @@ _AddPartyMon::
|
||||||
push de
|
push de
|
||||||
ld a, [wCurEnemyLVL]
|
ld a, [wCurEnemyLVL]
|
||||||
ld d, a
|
ld d, a
|
||||||
callab CalcExperience
|
callfar CalcExperience
|
||||||
pop de
|
pop de
|
||||||
inc de
|
inc de
|
||||||
ldh a, [hExperience] ; write experience
|
ldh a, [hExperience] ; write experience
|
||||||
|
|
@ -498,7 +498,7 @@ _MoveMon::
|
||||||
add $2
|
add $2
|
||||||
ld [wMonDataLocation], a
|
ld [wMonDataLocation], a
|
||||||
call LoadMonData
|
call LoadMonData
|
||||||
callba CalcLevelFromExperience
|
farcall CalcLevelFromExperience
|
||||||
ld a, d
|
ld a, d
|
||||||
ld [wCurEnemyLVL], a
|
ld [wCurEnemyLVL], a
|
||||||
pop hl
|
pop hl
|
||||||
|
|
|
||||||
|
|
@ -318,7 +318,7 @@ BillsPCRelease:
|
||||||
jp BillsPCMenu
|
jp BillsPCMenu
|
||||||
|
|
||||||
BillsPCChangeBox:
|
BillsPCChangeBox:
|
||||||
callba ChangeBox
|
farcall ChangeBox
|
||||||
jp BillsPCMenu
|
jp BillsPCMenu
|
||||||
|
|
||||||
DisplayMonListMenu:
|
DisplayMonListMenu:
|
||||||
|
|
|
||||||
|
|
@ -129,7 +129,7 @@ Evolution_PartyMonLoop: ; loop over party mons
|
||||||
ld a, $ff
|
ld a, $ff
|
||||||
ld [wUpdateSpritesEnabled], a
|
ld [wUpdateSpritesEnabled], a
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
callab EvolveMon
|
callfar EvolveMon
|
||||||
jp c, CancelledEvolution
|
jp c, CancelledEvolution
|
||||||
ld hl, EvolvedText
|
ld hl, EvolvedText
|
||||||
call PrintText
|
call PrintText
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,7 @@ TryingToLearn:
|
||||||
ld de, wMoves
|
ld de, wMoves
|
||||||
ld bc, NUM_MOVES
|
ld bc, NUM_MOVES
|
||||||
call CopyData
|
call CopyData
|
||||||
callab FormatMovesString
|
callfar FormatMovesString
|
||||||
pop hl
|
pop hl
|
||||||
.loop
|
.loop
|
||||||
push hl
|
push hl
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ LoadMonData_::
|
||||||
|
|
||||||
ld a, [wWhichPokemon]
|
ld a, [wWhichPokemon]
|
||||||
ld e, a
|
ld e, a
|
||||||
callab GetMonSpecies
|
callfar GetMonSpecies
|
||||||
|
|
||||||
.GetMonHeader
|
.GetMonHeader
|
||||||
ld a, [wcf91]
|
ld a, [wcf91]
|
||||||
|
|
|
||||||
|
|
@ -310,7 +310,7 @@ StatusScreen2:
|
||||||
ld de, wMoves
|
ld de, wMoves
|
||||||
ld bc, NUM_MOVES
|
ld bc, NUM_MOVES
|
||||||
call CopyData
|
call CopyData
|
||||||
callab FormatMovesString
|
callfar FormatMovesString
|
||||||
coord hl, 9, 2
|
coord hl, 9, 2
|
||||||
lb bc, 5, 10
|
lb bc, 5, 10
|
||||||
call ClearScreenArea ; Clear under name
|
call ClearScreenArea ; Clear under name
|
||||||
|
|
@ -356,7 +356,7 @@ StatusScreen2:
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
push hl
|
push hl
|
||||||
callab GetMaxPP
|
callfar GetMaxPP
|
||||||
pop hl
|
pop hl
|
||||||
pop af
|
pop af
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
|
@ -445,7 +445,7 @@ CalcExpToLevelUp:
|
||||||
jr z, .atMaxLevel
|
jr z, .atMaxLevel
|
||||||
inc a
|
inc a
|
||||||
ld d, a
|
ld d, a
|
||||||
callab CalcExperience
|
callfar CalcExperience
|
||||||
ld hl, wLoadedMonExp + 2
|
ld hl, wLoadedMonExp + 2
|
||||||
ldh a, [hExperience + 2]
|
ldh a, [hExperience + 2]
|
||||||
sub [hl]
|
sub [hl]
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ StartSlotMachine:
|
||||||
jr z, .printOutToLunch
|
jr z, .printOutToLunch
|
||||||
cp $ff
|
cp $ff
|
||||||
jr z, .printSomeonesKeys
|
jr z, .printSomeonesKeys
|
||||||
callba AbleToPlaySlotsCheck
|
farcall AbleToPlaySlotsCheck
|
||||||
ld a, [wCanPlaySlots]
|
ld a, [wCanPlaySlots]
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
|
|
|
||||||
30
home.asm
30
home.asm
|
|
@ -206,7 +206,7 @@ CountSetBits::
|
||||||
; subtracts the amount the player paid from their money
|
; subtracts the amount the player paid from their money
|
||||||
; OUTPUT: carry = 0(success) or 1(fail because there is not enough money)
|
; OUTPUT: carry = 0(success) or 1(fail because there is not enough money)
|
||||||
SubtractAmountPaidFromMoney::
|
SubtractAmountPaidFromMoney::
|
||||||
jpba SubtractAmountPaidFromMoney_
|
farjp SubtractAmountPaidFromMoney_
|
||||||
|
|
||||||
; adds the amount the player sold to their money
|
; adds the amount the player sold to their money
|
||||||
AddAmountSoldToMoney::
|
AddAmountSoldToMoney::
|
||||||
|
|
@ -296,7 +296,7 @@ ReloadTilesetTilePatterns::
|
||||||
ChooseFlyDestination::
|
ChooseFlyDestination::
|
||||||
ld hl, wd72e
|
ld hl, wd72e
|
||||||
res 4, [hl]
|
res 4, [hl]
|
||||||
jpba LoadTownMap_Fly
|
farjp LoadTownMap_Fly
|
||||||
|
|
||||||
; causes the text box to close without waiting for a button press after displaying text
|
; causes the text box to close without waiting for a button press after displaying text
|
||||||
DisableWaitingAfterTextDisplay::
|
DisableWaitingAfterTextDisplay::
|
||||||
|
|
@ -314,7 +314,7 @@ DisableWaitingAfterTextDisplay::
|
||||||
; 01: successful
|
; 01: successful
|
||||||
; 02: not able to be used right now, no extra menu displayed (only certain items use this)
|
; 02: not able to be used right now, no extra menu displayed (only certain items use this)
|
||||||
UseItem::
|
UseItem::
|
||||||
jpba UseItem_
|
farjp UseItem_
|
||||||
|
|
||||||
; confirms the item toss and then tosses the item
|
; confirms the item toss and then tosses the item
|
||||||
; INPUT:
|
; INPUT:
|
||||||
|
|
@ -348,7 +348,7 @@ IsKeyItem::
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
callba IsKeyItem_
|
farcall IsKeyItem_
|
||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
pop hl
|
pop hl
|
||||||
|
|
@ -418,10 +418,10 @@ RunNPCMovementScript::
|
||||||
dw PewterMuseumGuyMovementScriptPointerTable
|
dw PewterMuseumGuyMovementScriptPointerTable
|
||||||
dw PewterGymGuyMovementScriptPointerTable
|
dw PewterGymGuyMovementScriptPointerTable
|
||||||
.playerStepOutFromDoor
|
.playerStepOutFromDoor
|
||||||
jpba PlayerStepOutFromDoor
|
farjp PlayerStepOutFromDoor
|
||||||
|
|
||||||
EndNPCMovementScript::
|
EndNPCMovementScript::
|
||||||
jpba _EndNPCMovementScript
|
farjp _EndNPCMovementScript
|
||||||
|
|
||||||
EmptyFunc2::
|
EmptyFunc2::
|
||||||
ret
|
ret
|
||||||
|
|
@ -502,7 +502,7 @@ IsItemInBag::
|
||||||
|
|
||||||
DisplayPokedex::
|
DisplayPokedex::
|
||||||
ld [wd11e], a
|
ld [wd11e], a
|
||||||
jpba _DisplayPokedex
|
farjp _DisplayPokedex
|
||||||
|
|
||||||
SetSpriteFacingDirectionAndDelay::
|
SetSpriteFacingDirectionAndDelay::
|
||||||
call SetSpriteFacingDirection
|
call SetSpriteFacingDirection
|
||||||
|
|
@ -711,7 +711,7 @@ GetTrainerInformation::
|
||||||
ret
|
ret
|
||||||
|
|
||||||
GetTrainerName::
|
GetTrainerName::
|
||||||
jpba GetTrainerName_
|
farjp GetTrainerName_
|
||||||
|
|
||||||
HasEnoughMoney::
|
HasEnoughMoney::
|
||||||
; Check if the player has at least as much
|
; Check if the player has at least as much
|
||||||
|
|
@ -1107,7 +1107,7 @@ ManualTextScroll::
|
||||||
Multiply::
|
Multiply::
|
||||||
push hl
|
push hl
|
||||||
push bc
|
push bc
|
||||||
callab _Multiply
|
callfar _Multiply
|
||||||
pop bc
|
pop bc
|
||||||
pop hl
|
pop hl
|
||||||
ret
|
ret
|
||||||
|
|
@ -1296,7 +1296,7 @@ HandleMenuInput_::
|
||||||
ld a, [wPartyMenuAnimMonEnabled]
|
ld a, [wPartyMenuAnimMonEnabled]
|
||||||
and a ; is it a pokemon selection menu?
|
and a ; is it a pokemon selection menu?
|
||||||
jr z, .getJoypadState
|
jr z, .getJoypadState
|
||||||
callba AnimatePartyMon ; shake mini sprite of selected pokemon
|
farcall AnimatePartyMon ; shake mini sprite of selected pokemon
|
||||||
.getJoypadState
|
.getJoypadState
|
||||||
pop hl
|
pop hl
|
||||||
call JoypadLowSensitivity
|
call JoypadLowSensitivity
|
||||||
|
|
@ -1687,7 +1687,7 @@ ReloadMapSpriteTilePatterns::
|
||||||
xor a
|
xor a
|
||||||
ld [wSpriteSetID], a
|
ld [wSpriteSetID], a
|
||||||
call DisableLCD
|
call DisableLCD
|
||||||
callba InitMapSprites
|
farcall InitMapSprites
|
||||||
call EnableLCD
|
call EnableLCD
|
||||||
pop hl
|
pop hl
|
||||||
pop af
|
pop af
|
||||||
|
|
@ -1721,7 +1721,7 @@ GivePokemon::
|
||||||
ld [wCurEnemyLVL], a
|
ld [wCurEnemyLVL], a
|
||||||
xor a ; PLAYER_PARTY_DATA
|
xor a ; PLAYER_PARTY_DATA
|
||||||
ld [wMonDataLocation], a
|
ld [wMonDataLocation], a
|
||||||
jpba _GivePokemon
|
farjp _GivePokemon
|
||||||
|
|
||||||
Random::
|
Random::
|
||||||
; Return a random number in a.
|
; Return a random number in a.
|
||||||
|
|
@ -1729,7 +1729,7 @@ Random::
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
callba Random_
|
farcall Random_
|
||||||
ldh a, [hRandomAdd]
|
ldh a, [hRandomAdd]
|
||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
|
|
@ -1739,7 +1739,7 @@ Random::
|
||||||
INCLUDE "home/predef.asm"
|
INCLUDE "home/predef.asm"
|
||||||
|
|
||||||
UpdateCinnabarGymGateTileBlocks::
|
UpdateCinnabarGymGateTileBlocks::
|
||||||
jpba UpdateCinnabarGymGateTileBlocks_
|
farjp UpdateCinnabarGymGateTileBlocks_
|
||||||
|
|
||||||
CheckForHiddenObjectOrBookshelfOrCardKeyDoor::
|
CheckForHiddenObjectOrBookshelfOrCardKeyDoor::
|
||||||
ldh a, [hLoadedROMBank]
|
ldh a, [hLoadedROMBank]
|
||||||
|
|
@ -1765,7 +1765,7 @@ CheckForHiddenObjectOrBookshelfOrCardKeyDoor::
|
||||||
xor a
|
xor a
|
||||||
jr .done
|
jr .done
|
||||||
.hiddenObjectNotFound
|
.hiddenObjectNotFound
|
||||||
callba PrintBookshelfText
|
farcall PrintBookshelfText
|
||||||
ldh a, [hFFDB]
|
ldh a, [hFFDB]
|
||||||
and a
|
and a
|
||||||
jr z, .done
|
jr z, .done
|
||||||
|
|
|
||||||
|
|
@ -3,13 +3,13 @@
|
||||||
; [wRemoveMonFromBox] == 0 specifies the party.
|
; [wRemoveMonFromBox] == 0 specifies the party.
|
||||||
; [wRemoveMonFromBox] != 0 specifies the current box.
|
; [wRemoveMonFromBox] != 0 specifies the current box.
|
||||||
RemovePokemon::
|
RemovePokemon::
|
||||||
jpab _RemovePokemon
|
jpfar _RemovePokemon
|
||||||
|
|
||||||
AddPartyMon::
|
AddPartyMon::
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
callba _AddPartyMon
|
farcall _AddPartyMon
|
||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
pop hl
|
pop hl
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
HandleMidJump::
|
HandleMidJump::
|
||||||
; Handle the player jumping down
|
; Handle the player jumping down
|
||||||
; a ledge in the overworld.
|
; a ledge in the overworld.
|
||||||
jpba _HandleMidJump
|
farjp _HandleMidJump
|
||||||
|
|
||||||
EnterMap::
|
EnterMap::
|
||||||
; Load a new map.
|
; Load a new map.
|
||||||
ld a, $ff
|
ld a, $ff
|
||||||
ld [wJoyIgnore], a
|
ld [wJoyIgnore], a
|
||||||
call LoadMapData
|
call LoadMapData
|
||||||
callba ClearVariablesOnEnterMap
|
farcall ClearVariablesOnEnterMap
|
||||||
ld hl, wd72c
|
ld hl, wd72c
|
||||||
bit 0, [hl] ; has the player already made 3 steps since the last battle?
|
bit 0, [hl] ; has the player already made 3 steps since the last battle?
|
||||||
jr z, .skipGivingThreeStepsOfNoRandomBattles
|
jr z, .skipGivingThreeStepsOfNoRandomBattles
|
||||||
|
|
@ -25,10 +25,10 @@ EnterMap::
|
||||||
and 1 << 4 | 1 << 3 ; fly warp or dungeon warp
|
and 1 << 4 | 1 << 3 ; fly warp or dungeon warp
|
||||||
jr z, .didNotEnterUsingFlyWarpOrDungeonWarp
|
jr z, .didNotEnterUsingFlyWarpOrDungeonWarp
|
||||||
res 3, [hl]
|
res 3, [hl]
|
||||||
callba EnterMapAnim
|
farcall EnterMapAnim
|
||||||
call UpdateSprites
|
call UpdateSprites
|
||||||
.didNotEnterUsingFlyWarpOrDungeonWarp
|
.didNotEnterUsingFlyWarpOrDungeonWarp
|
||||||
callba CheckForceBikeOrSurf ; handle currents in SF islands and forced bike riding in cycling road
|
farcall CheckForceBikeOrSurf ; handle currents in SF islands and forced bike riding in cycling road
|
||||||
ld hl, wd72d
|
ld hl, wd72d
|
||||||
res 5, [hl]
|
res 5, [hl]
|
||||||
call UpdateSprites
|
call UpdateSprites
|
||||||
|
|
@ -50,7 +50,7 @@ OverworldLoopLessDelay::
|
||||||
and a
|
and a
|
||||||
jp nz, .moveAhead ; if the player sprite has not yet completed the walking animation
|
jp nz, .moveAhead ; if the player sprite has not yet completed the walking animation
|
||||||
call JoypadOverworld ; get joypad state (which is possibly simulated)
|
call JoypadOverworld ; get joypad state (which is possibly simulated)
|
||||||
callba SafariZoneCheck
|
farcall SafariZoneCheck
|
||||||
ld a, [wSafariZoneGameOver]
|
ld a, [wSafariZoneGameOver]
|
||||||
and a
|
and a
|
||||||
jp nz, WarpFound2
|
jp nz, WarpFound2
|
||||||
|
|
@ -269,7 +269,7 @@ OverworldLoopLessDelay::
|
||||||
ld a, [wd736]
|
ld a, [wd736]
|
||||||
bit 7, a
|
bit 7, a
|
||||||
jr z, .noSpinning
|
jr z, .noSpinning
|
||||||
callba LoadSpinnerArrowTiles
|
farcall LoadSpinnerArrowTiles
|
||||||
.noSpinning
|
.noSpinning
|
||||||
call UpdateSprites
|
call UpdateSprites
|
||||||
|
|
||||||
|
|
@ -306,7 +306,7 @@ OverworldLoopLessDelay::
|
||||||
.doneStepCounting
|
.doneStepCounting
|
||||||
CheckEvent EVENT_IN_SAFARI_ZONE
|
CheckEvent EVENT_IN_SAFARI_ZONE
|
||||||
jr z, .notSafariZone
|
jr z, .notSafariZone
|
||||||
callba SafariZoneCheckSteps
|
farcall SafariZoneCheckSteps
|
||||||
ld a, [wSafariZoneGameOver]
|
ld a, [wSafariZoneGameOver]
|
||||||
and a
|
and a
|
||||||
jp nz, WarpFound2
|
jp nz, WarpFound2
|
||||||
|
|
@ -343,7 +343,7 @@ OverworldLoopLessDelay::
|
||||||
ld a, [wCurMap]
|
ld a, [wCurMap]
|
||||||
cp OAKS_LAB
|
cp OAKS_LAB
|
||||||
jp z, .noFaintCheck ; no blacking out if the player lost to the rival in Oak's lab
|
jp z, .noFaintCheck ; no blacking out if the player lost to the rival in Oak's lab
|
||||||
callab AnyPartyAlive
|
callfar AnyPartyAlive
|
||||||
ld a, d
|
ld a, d
|
||||||
and a
|
and a
|
||||||
jr z, .allPokemonFainted
|
jr z, .allPokemonFainted
|
||||||
|
|
@ -368,7 +368,7 @@ NewBattle::
|
||||||
ld a, [wd72e]
|
ld a, [wd72e]
|
||||||
bit 4, a
|
bit 4, a
|
||||||
jr nz, .noBattle
|
jr nz, .noBattle
|
||||||
jpba InitBattle
|
farjp InitBattle
|
||||||
.noBattle
|
.noBattle
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
|
|
@ -412,7 +412,7 @@ CheckWarpsNoCollisionLoop::
|
||||||
push bc
|
push bc
|
||||||
ld hl, wd736
|
ld hl, wd736
|
||||||
set 2, [hl] ; standing on warp flag
|
set 2, [hl] ; standing on warp flag
|
||||||
callba IsPlayerStandingOnDoorTileOrWarpTile
|
farcall IsPlayerStandingOnDoorTileOrWarpTile
|
||||||
pop bc
|
pop bc
|
||||||
pop hl
|
pop hl
|
||||||
jr c, WarpFound1 ; jump if standing on door or warp
|
jr c, WarpFound1 ; jump if standing on door or warp
|
||||||
|
|
@ -511,7 +511,7 @@ WarpFound2::
|
||||||
jr z, .goBackOutside
|
jr z, .goBackOutside
|
||||||
; if not going back to the previous map
|
; if not going back to the previous map
|
||||||
ld [wCurMap], a
|
ld [wCurMap], a
|
||||||
callba IsPlayerStandingOnWarpPadOrHole
|
farcall IsPlayerStandingOnWarpPadOrHole
|
||||||
ld a, [wStandingOnWarpPadOrHole]
|
ld a, [wStandingOnWarpPadOrHole]
|
||||||
dec a ; is the player on a warp pad?
|
dec a ; is the player on a warp pad?
|
||||||
jr nz, .notWarpPad
|
jr nz, .notWarpPad
|
||||||
|
|
@ -679,7 +679,7 @@ CheckMapConnections::
|
||||||
call RunPaletteCommand
|
call RunPaletteCommand
|
||||||
; Since the sprite set shouldn't change, this will just update VRAM slots at
|
; Since the sprite set shouldn't change, this will just update VRAM slots at
|
||||||
; $C2XE without loading any tile patterns.
|
; $C2XE without loading any tile patterns.
|
||||||
callba InitMapSprites
|
farcall InitMapSprites
|
||||||
call LoadTileBlockMap
|
call LoadTileBlockMap
|
||||||
jp OverworldLoopLessDelay
|
jp OverworldLoopLessDelay
|
||||||
|
|
||||||
|
|
@ -747,7 +747,7 @@ ExtraWarpCheck::
|
||||||
jp Bankswitch
|
jp Bankswitch
|
||||||
|
|
||||||
MapEntryAfterBattle::
|
MapEntryAfterBattle::
|
||||||
callba IsPlayerStandingOnWarp ; for enabling warp testing after collisions
|
farcall IsPlayerStandingOnWarp ; for enabling warp testing after collisions
|
||||||
ld a, [wMapPalOffset]
|
ld a, [wMapPalOffset]
|
||||||
and a
|
and a
|
||||||
jp z, GBFadeInFromWhite
|
jp z, GBFadeInFromWhite
|
||||||
|
|
@ -800,7 +800,7 @@ HandleFlyWarpOrDungeonWarp::
|
||||||
jp SpecialEnterMap
|
jp SpecialEnterMap
|
||||||
|
|
||||||
LeaveMapAnim::
|
LeaveMapAnim::
|
||||||
jpba _LeaveMapAnim
|
farjp _LeaveMapAnim
|
||||||
|
|
||||||
LoadPlayerSpriteGraphics::
|
LoadPlayerSpriteGraphics::
|
||||||
; Load sprite graphics based on whether the player is standing, biking, or surfing.
|
; Load sprite graphics based on whether the player is standing, biking, or surfing.
|
||||||
|
|
@ -1286,7 +1286,7 @@ CheckForJumpingAndTilePairCollisions::
|
||||||
predef GetTileAndCoordsInFrontOfPlayer ; get the tile in front of the player
|
predef GetTileAndCoordsInFrontOfPlayer ; get the tile in front of the player
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
callba HandleLedges ; check if the player is trying to jump a ledge
|
farcall HandleLedges ; check if the player is trying to jump a ledge
|
||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
pop hl
|
pop hl
|
||||||
|
|
@ -1977,11 +1977,11 @@ RunMapScript::
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
callba TryPushingBoulder
|
farcall TryPushingBoulder
|
||||||
ld a, [wFlags_0xcd60]
|
ld a, [wFlags_0xcd60]
|
||||||
bit 1, a ; play boulder dust animation
|
bit 1, a ; play boulder dust animation
|
||||||
jr z, .afterBoulderEffect
|
jr z, .afterBoulderEffect
|
||||||
callba DoBoulderDustAnimation
|
farcall DoBoulderDustAnimation
|
||||||
.afterBoulderEffect
|
.afterBoulderEffect
|
||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
|
|
@ -2032,7 +2032,7 @@ LoadPlayerSpriteGraphicsCommon::
|
||||||
|
|
||||||
; function to load data from the map header
|
; function to load data from the map header
|
||||||
LoadMapHeader::
|
LoadMapHeader::
|
||||||
callba MarkTownVisitedAndLoadMissableObjects
|
farcall MarkTownVisitedAndLoadMissableObjects
|
||||||
ld a, [wCurMapTileset]
|
ld a, [wCurMapTileset]
|
||||||
ld [wUnusedD119], a
|
ld [wUnusedD119], a
|
||||||
ld a, [wCurMap]
|
ld a, [wCurMap]
|
||||||
|
|
@ -2280,7 +2280,7 @@ LoadMapHeader::
|
||||||
jp nz, .loadSpriteLoop
|
jp nz, .loadSpriteLoop
|
||||||
.finishUp
|
.finishUp
|
||||||
predef LoadTilesetHeader
|
predef LoadTilesetHeader
|
||||||
callab LoadWildData
|
callfar LoadWildData
|
||||||
pop hl ; restore hl from before going to the warp/sign/sprite data (this value was saved for seemingly no purpose)
|
pop hl ; restore hl from before going to the warp/sign/sprite data (this value was saved for seemingly no purpose)
|
||||||
ld a, [wCurMapHeight] ; map height in 4x4 tile blocks
|
ld a, [wCurMapHeight] ; map height in 4x4 tile blocks
|
||||||
add a ; double it
|
add a ; double it
|
||||||
|
|
@ -2337,7 +2337,7 @@ LoadMapData::
|
||||||
ld [wSpriteSetID], a
|
ld [wSpriteSetID], a
|
||||||
call LoadTextBoxTilePatterns
|
call LoadTextBoxTilePatterns
|
||||||
call LoadMapHeader
|
call LoadMapHeader
|
||||||
callba InitMapSprites ; load tile pattern data for sprites
|
farcall InitMapSprites ; load tile pattern data for sprites
|
||||||
call LoadTileBlockMap
|
call LoadTileBlockMap
|
||||||
call LoadTilesetTilePatternData
|
call LoadTilesetTilePatternData
|
||||||
call LoadCurrentMapView
|
call LoadCurrentMapView
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ DrawHPBar::
|
||||||
; wLoadedMon = base address of pokemon data
|
; wLoadedMon = base address of pokemon data
|
||||||
; wMonHeader = base address of base stats
|
; wMonHeader = base address of base stats
|
||||||
LoadMonData::
|
LoadMonData::
|
||||||
jpab LoadMonData_
|
jpfar LoadMonData_
|
||||||
|
|
||||||
OverwritewMoves::
|
OverwritewMoves::
|
||||||
; Write c to [wMoves + b]. Unused.
|
; Write c to [wMoves + b]. Unused.
|
||||||
|
|
@ -277,7 +277,7 @@ HandlePartyMenuInput::
|
||||||
bit 1, b ; was the B button pressed?
|
bit 1, b ; was the B button pressed?
|
||||||
jr z, .handleSwap ; if not, handle swapping the pokemon
|
jr z, .handleSwap ; if not, handle swapping the pokemon
|
||||||
.cancelSwap ; if the B button was pressed
|
.cancelSwap ; if the B button was pressed
|
||||||
callba ErasePartyMenuCursors
|
farcall ErasePartyMenuCursors
|
||||||
xor a
|
xor a
|
||||||
ld [wMenuItemToSwap], a
|
ld [wMenuItemToSwap], a
|
||||||
ld [wPartyMenuTypeOrMessageID], a
|
ld [wPartyMenuTypeOrMessageID], a
|
||||||
|
|
@ -286,7 +286,7 @@ HandlePartyMenuInput::
|
||||||
.handleSwap
|
.handleSwap
|
||||||
ld a, [wCurrentMenuItem]
|
ld a, [wCurrentMenuItem]
|
||||||
ld [wWhichPokemon], a
|
ld [wWhichPokemon], a
|
||||||
callba SwitchPartyMon
|
farcall SwitchPartyMon
|
||||||
jr HandlePartyMenuInput
|
jr HandlePartyMenuInput
|
||||||
|
|
||||||
DrawPartyMenu::
|
DrawPartyMenu::
|
||||||
|
|
|
||||||
|
|
@ -225,7 +225,7 @@ Serial_ExchangeLinkMenuSelection::
|
||||||
|
|
||||||
Serial_PrintWaitingTextAndSyncAndExchangeNybble::
|
Serial_PrintWaitingTextAndSyncAndExchangeNybble::
|
||||||
call SaveScreenTilesToBuffer1
|
call SaveScreenTilesToBuffer1
|
||||||
callab PrintWaitingText
|
callfar PrintWaitingText
|
||||||
call Serial_SyncAndExchangeNybble
|
call Serial_SyncAndExchangeNybble
|
||||||
jp LoadScreenTilesFromBuffer1
|
jp LoadScreenTilesFromBuffer1
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ DisplayStartMenu::
|
||||||
call PlaySound
|
call PlaySound
|
||||||
|
|
||||||
RedisplayStartMenu::
|
RedisplayStartMenu::
|
||||||
callba DrawStartMenu
|
farcall DrawStartMenu
|
||||||
callba PrintSafariZoneSteps ; print Safari Zone info, if in Safari Zone
|
farcall PrintSafariZoneSteps ; print Safari Zone info, if in Safari Zone
|
||||||
call UpdateSprites
|
call UpdateSprites
|
||||||
.loop
|
.loop
|
||||||
call HandleMenuInput
|
call HandleMenuInput
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
DisplayTextID::
|
DisplayTextID::
|
||||||
ldh a, [hLoadedROMBank]
|
ldh a, [hLoadedROMBank]
|
||||||
push af
|
push af
|
||||||
callba DisplayTextIDInit ; initialization
|
farcall DisplayTextIDInit ; initialization
|
||||||
ld hl, wTextPredefFlag
|
ld hl, wTextPredefFlag
|
||||||
bit 0, [hl]
|
bit 0, [hl]
|
||||||
res 0, [hl]
|
res 0, [hl]
|
||||||
|
|
@ -38,7 +38,7 @@ DisplayTextID::
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
callba UpdateSpriteFacingOffsetAndDelayMovement ; update the graphics of the sprite the player is talking to (to face the right direction)
|
farcall UpdateSpriteFacingOffsetAndDelayMovement ; update the graphics of the sprite the player is talking to (to face the right direction)
|
||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
ld hl, wMapSpriteData ; NPC text entries
|
ld hl, wMapSpriteData ; NPC text entries
|
||||||
|
|
@ -79,9 +79,9 @@ ENDM
|
||||||
dict TX_SCRIPT_PLAYERS_PC, TextScript_ItemStoragePC
|
dict TX_SCRIPT_PLAYERS_PC, TextScript_ItemStoragePC
|
||||||
dict TX_SCRIPT_BILLS_PC, TextScript_BillsPC
|
dict TX_SCRIPT_BILLS_PC, TextScript_BillsPC
|
||||||
dict TX_SCRIPT_POKECENTER_PC, TextScript_PokemonCenterPC
|
dict TX_SCRIPT_POKECENTER_PC, TextScript_PokemonCenterPC
|
||||||
dict2 TX_SCRIPT_VENDING_MACHINE, callba VendingMachineMenu
|
dict2 TX_SCRIPT_VENDING_MACHINE, farcall VendingMachineMenu
|
||||||
dict TX_SCRIPT_PRIZE_VENDOR, TextScript_GameCornerPrizeMenu
|
dict TX_SCRIPT_PRIZE_VENDOR, TextScript_GameCornerPrizeMenu
|
||||||
dict2 TX_SCRIPT_CABLE_CLUB_RECEPTIONIST, callab CableClubNPC
|
dict2 TX_SCRIPT_CABLE_CLUB_RECEPTIONIST, callfar CableClubNPC
|
||||||
|
|
||||||
call PrintText_NoCreatingTextBox ; display the text
|
call PrintText_NoCreatingTextBox ; display the text
|
||||||
ld a, [wDoNotWaitForButtonPressAfterDisplayingText]
|
ld a, [wDoNotWaitForButtonPressAfterDisplayingText]
|
||||||
|
|
@ -197,7 +197,7 @@ DisplayPokemonCenterDialogue::
|
||||||
jp AfterDisplayingTextID
|
jp AfterDisplayingTextID
|
||||||
|
|
||||||
DisplaySafariGameOverText::
|
DisplaySafariGameOverText::
|
||||||
callab PrintSafariGameOverText
|
callfar PrintSafariGameOverText
|
||||||
jp AfterDisplayingTextID
|
jp AfterDisplayingTextID
|
||||||
|
|
||||||
DisplayPokemonFaintedText::
|
DisplayPokemonFaintedText::
|
||||||
|
|
|
||||||
|
|
@ -219,7 +219,7 @@ ResetButtonPressedAndMapScript::
|
||||||
|
|
||||||
; calls TrainerWalkUpToPlayer
|
; calls TrainerWalkUpToPlayer
|
||||||
TrainerWalkUpToPlayer_Bank0::
|
TrainerWalkUpToPlayer_Bank0::
|
||||||
jpba TrainerWalkUpToPlayer
|
farjp TrainerWalkUpToPlayer
|
||||||
|
|
||||||
; sets opponent type and mon set/lvl based on the engaging trainer data
|
; sets opponent type and mon set/lvl based on the engaging trainer data
|
||||||
InitBattleEnemyParameters::
|
InitBattleEnemyParameters::
|
||||||
|
|
@ -343,14 +343,14 @@ PrintEndBattleText::
|
||||||
ldh [hLoadedROMBank], a
|
ldh [hLoadedROMBank], a
|
||||||
ld [MBC1RomBank], a
|
ld [MBC1RomBank], a
|
||||||
push hl
|
push hl
|
||||||
callba SaveTrainerName
|
farcall SaveTrainerName
|
||||||
ld hl, TrainerEndBattleText
|
ld hl, TrainerEndBattleText
|
||||||
call PrintText
|
call PrintText
|
||||||
pop hl
|
pop hl
|
||||||
pop af
|
pop af
|
||||||
ldh [hLoadedROMBank], a
|
ldh [hLoadedROMBank], a
|
||||||
ld [MBC1RomBank], a
|
ld [MBC1RomBank], a
|
||||||
callba FreezeEnemyTrainerSprite
|
farcall FreezeEnemyTrainerSprite
|
||||||
jp WaitForSoundToFinish
|
jp WaitForSoundToFinish
|
||||||
|
|
||||||
GetSavedEndBattleTextPointer::
|
GetSavedEndBattleTextPointer::
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ VBlank::
|
||||||
call Audio3_UpdateMusic
|
call Audio3_UpdateMusic
|
||||||
.afterMusic
|
.afterMusic
|
||||||
|
|
||||||
callba TrackPlayTime ; keep track of time played
|
farcall TrackPlayTime ; keep track of time played
|
||||||
|
|
||||||
ldh a, [hDisableJoypadPolling]
|
ldh a, [hDisableJoypadPolling]
|
||||||
and a
|
and a
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,22 @@
|
||||||
farcall EQUS "callba"
|
farcall: MACRO
|
||||||
|
|
||||||
callba: MACRO
|
|
||||||
ld b, BANK(\1)
|
ld b, BANK(\1)
|
||||||
ld hl, \1
|
ld hl, \1
|
||||||
call Bankswitch
|
call Bankswitch
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
callab: MACRO
|
callfar: MACRO
|
||||||
ld hl, \1
|
ld hl, \1
|
||||||
ld b, BANK(\1)
|
ld b, BANK(\1)
|
||||||
call Bankswitch
|
call Bankswitch
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
jpba: MACRO
|
farjp: MACRO
|
||||||
ld b, BANK(\1)
|
ld b, BANK(\1)
|
||||||
ld hl, \1
|
ld hl, \1
|
||||||
jp Bankswitch
|
jp Bankswitch
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
jpab: MACRO
|
jpfar: MACRO
|
||||||
ld hl, \1
|
ld hl, \1
|
||||||
ld b, BANK(\1)
|
ld b, BANK(\1)
|
||||||
jp Bankswitch
|
jp Bankswitch
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ BikeShopText1:
|
||||||
jr nc, .BagFull
|
jr nc, .BagFull
|
||||||
ld a, BIKE_VOUCHER
|
ld a, BIKE_VOUCHER
|
||||||
ldh [hItemToRemoveID], a
|
ldh [hItemToRemoveID], a
|
||||||
callba RemoveItemByID
|
farcall RemoveItemByID
|
||||||
SetEvent EVENT_GOT_BICYCLE
|
SetEvent EVENT_GOT_BICYCLE
|
||||||
ld hl, BikeShopText_1d824
|
ld hl, BikeShopText_1d824
|
||||||
call PrintText
|
call PrintText
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ DirectorText:
|
||||||
text_far _CompletedDexText
|
text_far _CompletedDexText
|
||||||
text_promptbutton
|
text_promptbutton
|
||||||
text_asm
|
text_asm
|
||||||
callab DisplayDiploma
|
callfar DisplayDiploma
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
|
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
|
||||||
jp TextScriptEnd
|
jp TextScriptEnd
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ CeladonMartElevatorWarpMaps:
|
||||||
CeladonMartElevatorWarpMapsEnd:
|
CeladonMartElevatorWarpMapsEnd:
|
||||||
|
|
||||||
CeladonMartElevatorScript_48654:
|
CeladonMartElevatorScript_48654:
|
||||||
jpba ShakeElevator
|
farjp ShakeElevator
|
||||||
|
|
||||||
CeladonMartElevator_TextPointers:
|
CeladonMartElevator_TextPointers:
|
||||||
dw CeladonMartElevatorText1
|
dw CeladonMartElevatorText1
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@ CeladonMartRoofScript_GiveDrinkToGirl:
|
||||||
jp PrintText
|
jp PrintText
|
||||||
|
|
||||||
RemoveItemByIDBank12:
|
RemoveItemByIDBank12:
|
||||||
jpba RemoveItemByID
|
farjp RemoveItemByID
|
||||||
|
|
||||||
CeladonMartRoofText_484ee:
|
CeladonMartRoofText_484ee:
|
||||||
text_far _CeladonMartRoofText_484ee
|
text_far _CeladonMartRoofText_484ee
|
||||||
|
|
|
||||||
|
|
@ -174,7 +174,7 @@ CeruleanCityScript2:
|
||||||
ld a, SFX_STOP_ALL_MUSIC
|
ld a, SFX_STOP_ALL_MUSIC
|
||||||
ld [wNewSoundID], a
|
ld [wNewSoundID], a
|
||||||
call PlaySound
|
call PlaySound
|
||||||
callba Music_RivalAlternateStart
|
farcall Music_RivalAlternateStart
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ldh [hSpriteIndex], a
|
ldh [hSpriteIndex], a
|
||||||
call SetSpriteMovementBytesToFF
|
call SetSpriteMovementBytesToFF
|
||||||
|
|
@ -310,7 +310,7 @@ CeruleanCityText2:
|
||||||
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
|
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
|
||||||
ld hl, ReceivedTM28Text
|
ld hl, ReceivedTM28Text
|
||||||
call PrintText
|
call PrintText
|
||||||
callba CeruleanHideRocket
|
farcall CeruleanHideRocket
|
||||||
.Done
|
.Done
|
||||||
jp TextScriptEnd
|
jp TextScriptEnd
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ GaryScript3:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
GaryScript4:
|
GaryScript4:
|
||||||
callba Music_Cities1AlternateTempo
|
farcall Music_Cities1AlternateTempo
|
||||||
ld a, $2
|
ld a, $2
|
||||||
ldh [hSpriteIndexOrTextID], a
|
ldh [hSpriteIndexOrTextID], a
|
||||||
call GaryScript_760c8
|
call GaryScript_760c8
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ Lab4Text1:
|
||||||
ld a, [wFilteredBagItemsCount]
|
ld a, [wFilteredBagItemsCount]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_75d8d
|
jr z, .asm_75d8d
|
||||||
callba GiveFossilToCinnabarLab
|
farcall GiveFossilToCinnabarLab
|
||||||
jr .asm_75d93
|
jr .asm_75d93
|
||||||
.asm_75d8d
|
.asm_75d8d
|
||||||
ld hl, Lab4Text_75dcb
|
ld hl, Lab4Text_75dcb
|
||||||
|
|
@ -106,4 +106,4 @@ Lab4Text2:
|
||||||
jp TextScriptEnd
|
jp TextScriptEnd
|
||||||
|
|
||||||
LoadFossilItemAndMonNameBank1D:
|
LoadFossilItemAndMonNameBank1D:
|
||||||
jpba LoadFossilItemAndMonName
|
farjp LoadFossilItemAndMonName
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ CopycatsHouse2FText1:
|
||||||
call PrintText
|
call PrintText
|
||||||
ld a, POKE_DOLL
|
ld a, POKE_DOLL
|
||||||
ldh [hItemToRemoveID], a
|
ldh [hItemToRemoveID], a
|
||||||
callba RemoveItemByID
|
farcall RemoveItemByID
|
||||||
SetEvent EVENT_GOT_TM31
|
SetEvent EVENT_GOT_TM31
|
||||||
jr .asm_62ecd
|
jr .asm_62ecd
|
||||||
.BagFull
|
.BagFull
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ DayCareMText1:
|
||||||
pop af
|
pop af
|
||||||
ld hl, DayCareAllRightThenText
|
ld hl, DayCareAllRightThenText
|
||||||
jp c, .done
|
jp c, .done
|
||||||
callab KnowsHMMove
|
callfar KnowsHMMove
|
||||||
ld hl, DayCareCantAcceptMonWithHMText
|
ld hl, DayCareCantAcceptMonWithHMText
|
||||||
jp c, .done
|
jp c, .done
|
||||||
xor a
|
xor a
|
||||||
|
|
@ -65,13 +65,13 @@ DayCareMText1:
|
||||||
ld a, DAYCARE_DATA
|
ld a, DAYCARE_DATA
|
||||||
ld [wMonDataLocation], a
|
ld [wMonDataLocation], a
|
||||||
call LoadMonData
|
call LoadMonData
|
||||||
callab CalcLevelFromExperience
|
callfar CalcLevelFromExperience
|
||||||
ld a, d
|
ld a, d
|
||||||
cp MAX_LEVEL
|
cp MAX_LEVEL
|
||||||
jr c, .skipCalcExp
|
jr c, .skipCalcExp
|
||||||
|
|
||||||
ld d, MAX_LEVEL
|
ld d, MAX_LEVEL
|
||||||
callab CalcExperience
|
callfar CalcExperience
|
||||||
ld hl, wDayCareMonExp
|
ld hl, wDayCareMonExp
|
||||||
ldh a, [hExperience]
|
ldh a, [hExperience]
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ HallofFameRoomScript2:
|
||||||
ld [wHallOfFameCurScript], a
|
ld [wHallOfFameCurScript], a
|
||||||
ld a, PALLET_TOWN
|
ld a, PALLET_TOWN
|
||||||
ld [wLastBlackoutMap], a
|
ld [wLastBlackoutMap], a
|
||||||
callba SaveSAVtoSRAM
|
farcall SaveSAVtoSRAM
|
||||||
ld b, 5
|
ld b, 5
|
||||||
.delayLoop
|
.delayLoop
|
||||||
ld c, 600 / 5
|
ld c, 600 / 5
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ NameRaterText1:
|
||||||
jr nz, .asm_1daae
|
jr nz, .asm_1daae
|
||||||
ld hl, NameRaterText_1dac2
|
ld hl, NameRaterText_1dac2
|
||||||
call PrintText
|
call PrintText
|
||||||
callba DisplayNameRaterScreen
|
farcall DisplayNameRaterScreen
|
||||||
jr c, .asm_1daae
|
jr c, .asm_1daae
|
||||||
ld hl, NameRaterText_1dac7
|
ld hl, NameRaterText_1dac7
|
||||||
.asm_1daa8
|
.asm_1daa8
|
||||||
|
|
|
||||||
|
|
@ -441,7 +441,7 @@ OaksLabScript13:
|
||||||
ld a, $10
|
ld a, $10
|
||||||
ldh [hSpriteIndexOrTextID], a
|
ldh [hSpriteIndexOrTextID], a
|
||||||
call DisplayTextID
|
call DisplayTextID
|
||||||
callba Music_RivalAlternateStart
|
farcall Music_RivalAlternateStart
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ldh [hSpriteIndex], a
|
ldh [hSpriteIndex], a
|
||||||
ld de, .RivalExitMovement
|
ld de, .RivalExitMovement
|
||||||
|
|
@ -513,7 +513,7 @@ OaksLabScript15:
|
||||||
ld a, SFX_STOP_ALL_MUSIC
|
ld a, SFX_STOP_ALL_MUSIC
|
||||||
ld [wNewSoundID], a
|
ld [wNewSoundID], a
|
||||||
call PlaySound
|
call PlaySound
|
||||||
callba Music_RivalAlternateStart
|
farcall Music_RivalAlternateStart
|
||||||
ld a, $15
|
ld a, $15
|
||||||
ldh [hSpriteIndexOrTextID], a
|
ldh [hSpriteIndexOrTextID], a
|
||||||
call DisplayTextID
|
call DisplayTextID
|
||||||
|
|
@ -614,7 +614,7 @@ OaksLabScript16:
|
||||||
ld a, SFX_STOP_ALL_MUSIC
|
ld a, SFX_STOP_ALL_MUSIC
|
||||||
ld [wNewSoundID], a
|
ld [wNewSoundID], a
|
||||||
call PlaySound
|
call PlaySound
|
||||||
callba Music_RivalAlternateStart
|
farcall Music_RivalAlternateStart
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ldh [hSpriteIndex], a
|
ldh [hSpriteIndex], a
|
||||||
ld de, wNPCMovementDirections2
|
ld de, wNPCMovementDirections2
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ PokemonTower2Script1:
|
||||||
ld a, SFX_STOP_ALL_MUSIC
|
ld a, SFX_STOP_ALL_MUSIC
|
||||||
ld [wNewSoundID], a
|
ld [wNewSoundID], a
|
||||||
call PlaySound
|
call PlaySound
|
||||||
callba Music_RivalAlternateStart
|
farcall Music_RivalAlternateStart
|
||||||
ld a, $2
|
ld a, $2
|
||||||
ld [wPokemonTower2FCurScript], a
|
ld [wPokemonTower2FCurScript], a
|
||||||
ld [wCurMapScript], a
|
ld [wCurMapScript], a
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ RocketHideoutElevatorWarpMapsEnd:
|
||||||
|
|
||||||
RocketHideoutElevatorScript_4575f:
|
RocketHideoutElevatorScript_4575f:
|
||||||
call Delay3
|
call Delay3
|
||||||
callba ShakeElevator
|
farcall ShakeElevator
|
||||||
ret
|
ret
|
||||||
|
|
||||||
RocketHideoutElevator_TextPointers:
|
RocketHideoutElevator_TextPointers:
|
||||||
|
|
|
||||||
|
|
@ -170,7 +170,7 @@ Route22Script2:
|
||||||
ld a, SFX_STOP_ALL_MUSIC
|
ld a, SFX_STOP_ALL_MUSIC
|
||||||
ld [wNewSoundID], a
|
ld [wNewSoundID], a
|
||||||
call PlaySound
|
call PlaySound
|
||||||
callba Music_RivalAlternateStart
|
farcall Music_RivalAlternateStart
|
||||||
ld a, [wcf0d]
|
ld a, [wcf0d]
|
||||||
cp $1
|
cp $1
|
||||||
jr nz, .asm_50fff
|
jr nz, .asm_50fff
|
||||||
|
|
@ -248,7 +248,7 @@ Route22Script_5104e:
|
||||||
ld a, SFX_STOP_ALL_MUSIC
|
ld a, SFX_STOP_ALL_MUSIC
|
||||||
ld [wNewSoundID], a
|
ld [wNewSoundID], a
|
||||||
call PlaySound
|
call PlaySound
|
||||||
callba Music_RivalAlternateTempo
|
farcall Music_RivalAlternateTempo
|
||||||
ld a, $2
|
ld a, $2
|
||||||
ldh [hSpriteIndex], a
|
ldh [hSpriteIndex], a
|
||||||
call Route22MoveRivalSprite
|
call Route22MoveRivalSprite
|
||||||
|
|
@ -329,7 +329,7 @@ Route22Script5:
|
||||||
ld a, SFX_STOP_ALL_MUSIC
|
ld a, SFX_STOP_ALL_MUSIC
|
||||||
ld [wNewSoundID], a
|
ld [wNewSoundID], a
|
||||||
call PlaySound
|
call PlaySound
|
||||||
callba Music_RivalAlternateStartAndTempo
|
farcall Music_RivalAlternateStartAndTempo
|
||||||
ld a, [wcf0d]
|
ld a, [wcf0d]
|
||||||
cp $1
|
cp $1
|
||||||
jr nz, .asm_51134
|
jr nz, .asm_51134
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ Route5GateScript0:
|
||||||
ld [wPlayerMovingDirection], a
|
ld [wPlayerMovingDirection], a
|
||||||
xor a
|
xor a
|
||||||
ldh [hJoyHeld], a
|
ldh [hJoyHeld], a
|
||||||
callba RemoveGuardDrink
|
farcall RemoveGuardDrink
|
||||||
ldh a, [hItemToRemoveID]
|
ldh a, [hItemToRemoveID]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_1df82
|
jr nz, .asm_1df82
|
||||||
|
|
@ -73,7 +73,7 @@ Route5GateText1:
|
||||||
ld a, [wd728]
|
ld a, [wd728]
|
||||||
bit 6, a
|
bit 6, a
|
||||||
jr nz, .asm_88856
|
jr nz, .asm_88856
|
||||||
callba RemoveGuardDrink
|
farcall RemoveGuardDrink
|
||||||
ldh a, [hItemToRemoveID]
|
ldh a, [hItemToRemoveID]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_768a2
|
jr nz, .asm_768a2
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ Route6GateScript0:
|
||||||
ld [wPlayerMovingDirection], a
|
ld [wPlayerMovingDirection], a
|
||||||
xor a
|
xor a
|
||||||
ldh [hJoyHeld], a
|
ldh [hJoyHeld], a
|
||||||
callba RemoveGuardDrink
|
farcall RemoveGuardDrink
|
||||||
ldh a, [hItemToRemoveID]
|
ldh a, [hItemToRemoveID]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_1e080
|
jr nz, .asm_1e080
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ Route7GateScript0:
|
||||||
ld [wPlayerMovingDirection], a
|
ld [wPlayerMovingDirection], a
|
||||||
xor a
|
xor a
|
||||||
ldh [hJoyHeld], a
|
ldh [hJoyHeld], a
|
||||||
callba RemoveGuardDrink
|
farcall RemoveGuardDrink
|
||||||
ldh a, [hItemToRemoveID]
|
ldh a, [hItemToRemoveID]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_1e15a
|
jr nz, .asm_1e15a
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ Route8GateScript0:
|
||||||
ld [wPlayerMovingDirection], a
|
ld [wPlayerMovingDirection], a
|
||||||
xor a
|
xor a
|
||||||
ldh [hJoyHeld], a
|
ldh [hJoyHeld], a
|
||||||
callba RemoveGuardDrink
|
farcall RemoveGuardDrink
|
||||||
ldh a, [hItemToRemoveID]
|
ldh a, [hItemToRemoveID]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_1e220
|
jr nz, .asm_1e220
|
||||||
|
|
|
||||||
|
|
@ -148,7 +148,7 @@ SSAnne2Script2:
|
||||||
ld a, SFX_STOP_ALL_MUSIC
|
ld a, SFX_STOP_ALL_MUSIC
|
||||||
ld [wNewSoundID], a
|
ld [wNewSoundID], a
|
||||||
call PlaySound
|
call PlaySound
|
||||||
callba Music_RivalAlternateStart
|
farcall Music_RivalAlternateStart
|
||||||
ld a, $3
|
ld a, $3
|
||||||
ld [wSSAnne2FCurScript], a
|
ld [wSSAnne2FCurScript], a
|
||||||
ret
|
ret
|
||||||
|
|
|
||||||
|
|
@ -222,7 +222,7 @@ SilphCo7Script4:
|
||||||
ld a, SFX_STOP_ALL_MUSIC
|
ld a, SFX_STOP_ALL_MUSIC
|
||||||
ld [wNewSoundID], a
|
ld [wNewSoundID], a
|
||||||
call PlaySound
|
call PlaySound
|
||||||
callba Music_RivalAlternateStart
|
farcall Music_RivalAlternateStart
|
||||||
ld de, MovementData_51d1d
|
ld de, MovementData_51d1d
|
||||||
ld a, [wcf0d]
|
ld a, [wcf0d]
|
||||||
cp $1
|
cp $1
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ SilphCoElevatorWarpMapsEnd:
|
||||||
|
|
||||||
SilphCoElevatorScript_45827:
|
SilphCoElevatorScript_45827:
|
||||||
call Delay3
|
call Delay3
|
||||||
callba ShakeElevator
|
farcall ShakeElevator
|
||||||
ret
|
ret
|
||||||
|
|
||||||
SilphCoElevator_TextPointers:
|
SilphCoElevator_TextPointers:
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ VermilionDock_1db9b:
|
||||||
ld c, BANK(Music_Surfing)
|
ld c, BANK(Music_Surfing)
|
||||||
ld a, MUSIC_SURFING
|
ld a, MUSIC_SURFING
|
||||||
call PlayMusic
|
call PlayMusic
|
||||||
callba LoadSmokeTileFourTimes
|
farcall LoadSmokeTileFourTimes
|
||||||
xor a
|
xor a
|
||||||
ld [wSpritePlayerStateData1ImageIndex], a
|
ld [wSpritePlayerStateData1ImageIndex], a
|
||||||
ld c, 120
|
ld c, 120
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ ViridianGymScript4:
|
||||||
ld [wCurMapScript], a
|
ld [wCurMapScript], a
|
||||||
ret
|
ret
|
||||||
.asm_74980
|
.asm_74980
|
||||||
jpba LoadSpinnerArrowTiles
|
farjp LoadSpinnerArrowTiles
|
||||||
|
|
||||||
ViridianGymScript3:
|
ViridianGymScript3:
|
||||||
ld a, [wIsInBattle]
|
ld a, [wIsInBattle]
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ FuchsiaHouse2Text1:
|
||||||
call PrintText
|
call PrintText
|
||||||
ld a, GOLD_TEETH
|
ld a, GOLD_TEETH
|
||||||
ldh [hItemToRemoveID], a
|
ldh [hItemToRemoveID], a
|
||||||
callba RemoveItemByID
|
farcall RemoveItemByID
|
||||||
SetEvent EVENT_GAVE_GOLD_TEETH
|
SetEvent EVENT_GAVE_GOLD_TEETH
|
||||||
.asm_60cba
|
.asm_60cba
|
||||||
ld hl, WardenThankYouText
|
ld hl, WardenThankYouText
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue