You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
Prefix wram labels with w, part 2.
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
_BasementKey: ; 507b4
|
||||
; Are we even in the right map to use this?
|
||||
ld a, [MapGroup]
|
||||
ld a, [wMapGroup]
|
||||
cp GROUP_GOLDENROD_UNDERGROUND
|
||||
jr nz, .nope
|
||||
|
||||
ld a, [MapNumber]
|
||||
ld a, [wMapNumber]
|
||||
cp MAP_GOLDENROD_UNDERGROUND
|
||||
jr nz, .nope
|
||||
; Are we on the tile in front of the door?
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,23 +1,23 @@
|
||||
Function_LoadOpponentTrainerAndPokemons: ; 1f8000
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, BANK(BT_OTTrainer)
|
||||
ld a, BANK(wBT_OTTrainer)
|
||||
ld [rSVBK], a
|
||||
|
||||
; Fill BT_OTTrainer with zeros
|
||||
; Fill wBT_OTTrainer with zeros
|
||||
xor a
|
||||
ld hl, BT_OTTrainer
|
||||
ld bc, BT_OTTrainerEnd - BT_OTTrainer
|
||||
ld hl, wBT_OTTrainer
|
||||
ld bc, wBT_OTTrainerEnd - wBT_OTTrainer
|
||||
call ByteFill
|
||||
|
||||
; Write $ff into the Item-Slots
|
||||
ld a, $ff
|
||||
ld [BT_OTPkmn1Item], a
|
||||
ld [BT_OTPkmn2Item], a
|
||||
ld [BT_OTPkmn3Item], a
|
||||
ld [wBT_OTPkmn1Item], a
|
||||
ld [wBT_OTPkmn2Item], a
|
||||
ld [wBT_OTPkmn3Item], a
|
||||
|
||||
; Set BT_OTTrainer as start address to write the following data to
|
||||
ld de, BT_OTTrainer
|
||||
; Set wBT_OTTrainer as start address to write the following data to
|
||||
ld de, wBT_OTTrainer
|
||||
|
||||
ld a, [hRandomAdd]
|
||||
ld b, a
|
||||
@@ -129,22 +129,22 @@ Function_LoadRandomBattleTowerPkmn: ; 1f8081
|
||||
ld b, a
|
||||
ld a, [hld]
|
||||
ld c, a
|
||||
ld a, [BT_OTPkmn1]
|
||||
ld a, [wBT_OTPkmn1]
|
||||
cp b
|
||||
jr z, .FindARandomBattleTowerPkmn
|
||||
ld a, [BT_OTPkmn1Item]
|
||||
ld a, [wBT_OTPkmn1Item]
|
||||
cp c
|
||||
jr z, .FindARandomBattleTowerPkmn
|
||||
ld a, [BT_OTPkmn2]
|
||||
ld a, [wBT_OTPkmn2]
|
||||
cp b
|
||||
jr z, .FindARandomBattleTowerPkmn
|
||||
ld a, [BT_OTPkmn2Item]
|
||||
ld a, [wBT_OTPkmn2Item]
|
||||
cp c
|
||||
jr z, .FindARandomBattleTowerPkmn
|
||||
ld a, [BT_OTPkmn3]
|
||||
ld a, [wBT_OTPkmn3]
|
||||
cp b
|
||||
jr z, .FindARandomBattleTowerPkmn
|
||||
ld a, [BT_OTPkmn3Item]
|
||||
ld a, [wBT_OTPkmn3Item]
|
||||
cp c
|
||||
jr z, .FindARandomBattleTowerPkmn
|
||||
ld a, [sBTPkmnPrevTrainer1]
|
||||
@@ -199,11 +199,11 @@ Function_LoadRandomBattleTowerPkmn: ; 1f8081
|
||||
ld [sBTPkmnPrevPrevTrainer2], a
|
||||
ld a, [sBTPkmnPrevTrainer3]
|
||||
ld [sBTPkmnPrevPrevTrainer3], a
|
||||
ld a, [BT_OTPkmn1]
|
||||
ld a, [wBT_OTPkmn1]
|
||||
ld [sBTPkmnPrevTrainer1], a
|
||||
ld a, [BT_OTPkmn2]
|
||||
ld a, [wBT_OTPkmn2]
|
||||
ld [sBTPkmnPrevTrainer2], a
|
||||
ld a, [BT_OTPkmn3]
|
||||
ld a, [wBT_OTPkmn3]
|
||||
ld [sBTPkmnPrevTrainer3], a
|
||||
call CloseSRAM
|
||||
ret
|
||||
|
||||
@@ -30,7 +30,7 @@ CheckForMobileBattleRules: ; 8b1e1
|
||||
; 0x8b201
|
||||
|
||||
CheckForBattleTowerRules: ; 8b201
|
||||
ld hl, StringBuffer2
|
||||
ld hl, wStringBuffer2
|
||||
ld [hl], "3"
|
||||
inc hl
|
||||
ld [hl], "@"
|
||||
@@ -212,13 +212,13 @@ BattleTower_ExecuteJumptable: ; 8b25b
|
||||
; 8b2bb
|
||||
|
||||
BattleTower_CheckPartyLengthIs3: ; 8b2bb
|
||||
ld a, [PartyCount]
|
||||
ld a, [wPartyCount]
|
||||
cp BATTLETOWER_PARTY_LENGTH
|
||||
ret
|
||||
; 8b2c1
|
||||
|
||||
BattleTower_CheckPartyHasThreeMonsThatAreNotEggs: ; 8b2c1
|
||||
ld hl, PartyCount
|
||||
ld hl, wPartyCount
|
||||
ld a, [hli]
|
||||
ld b, $0
|
||||
ld c, a
|
||||
@@ -231,7 +231,7 @@ BattleTower_CheckPartyHasThreeMonsThatAreNotEggs: ; 8b2c1
|
||||
.egg
|
||||
dec c
|
||||
jr nz, .loop
|
||||
ld a, [PartyCount]
|
||||
ld a, [wPartyCount]
|
||||
cp b
|
||||
ret z
|
||||
ld a, b
|
||||
@@ -240,7 +240,7 @@ BattleTower_CheckPartyHasThreeMonsThatAreNotEggs: ; 8b2c1
|
||||
; 8b2da
|
||||
|
||||
Function_PartyCountEq3: ; 8b2da
|
||||
ld a, [PartyCount]
|
||||
ld a, [wPartyCount]
|
||||
cp BATTLETOWER_PARTY_LENGTH
|
||||
ret z
|
||||
scf
|
||||
@@ -248,13 +248,13 @@ Function_PartyCountEq3: ; 8b2da
|
||||
; 8b2e2
|
||||
|
||||
Function_PartySpeciesAreUnique: ; 8b2e2
|
||||
ld hl, PartyMon1Species
|
||||
ld hl, wPartyMon1Species
|
||||
call VerifyUniqueness
|
||||
ret
|
||||
; 8b2e9
|
||||
|
||||
VerifyUniqueness: ; 8b2e9
|
||||
ld de, PartyCount
|
||||
ld de, wPartyCount
|
||||
ld a, [de]
|
||||
inc de
|
||||
dec a
|
||||
@@ -318,13 +318,13 @@ VerifyUniqueness: ; 8b2e9
|
||||
; 8b32a
|
||||
|
||||
Function_PartyItemsAreUnique: ; 8b32a
|
||||
ld hl, PartyMon1Item
|
||||
ld hl, wPartyMon1Item
|
||||
call VerifyUniqueness
|
||||
ret
|
||||
; 8b331
|
||||
|
||||
Function_HasPartyAnEgg: ; 8b331
|
||||
ld hl, PartyCount
|
||||
ld hl, wPartyCount
|
||||
ld a, [hli]
|
||||
ld c, a
|
||||
.loop
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
BattleTowerText:: ; 11c000
|
||||
; Print text c for trainer [BT_OTTrainerClass]
|
||||
; Print text c for trainer [wBT_OTTrainerClass]
|
||||
; 1: Intro text
|
||||
; 2: Player lost
|
||||
; 3: Player won
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, BANK(BT_OTTrainerClass)
|
||||
ld a, BANK(wBT_OTTrainerClass)
|
||||
ld [rSVBK], a
|
||||
if DEF(_CRYSTAL11)
|
||||
ld hl, BT_OTTrainerClass
|
||||
ld hl, wBT_OTTrainerClass
|
||||
else
|
||||
; BUG ALERT
|
||||
; Instead of loading the Trainer Class, this routine
|
||||
@@ -16,7 +16,7 @@ else
|
||||
; uses it to get the gender of the trainer.
|
||||
; As a consequence, the enemy trainer's dialog will
|
||||
; always be sampled from the female array.
|
||||
ld hl, BT_OTName + NAME_LENGTH_JAPANESE - 1
|
||||
ld hl, wBT_OTName + NAME_LENGTH_JAPANESE - 1
|
||||
endc
|
||||
ld a, [hl]
|
||||
dec a
|
||||
@@ -53,11 +53,11 @@ endc
|
||||
ld b, 0
|
||||
dec c
|
||||
jr nz, .restore
|
||||
ld [BT_TrainerTextIndex], a
|
||||
ld [wBT_TrainerTextIndex], a
|
||||
jr .okay2
|
||||
|
||||
.restore
|
||||
ld a, [BT_TrainerTextIndex]
|
||||
ld a, [wBT_TrainerTextIndex]
|
||||
|
||||
.okay2
|
||||
push af
|
||||
|
||||
@@ -14,7 +14,7 @@ Special_BuenasPassword: ; 8af6b
|
||||
call DoNthMenu ; menu
|
||||
farcall Buena_ExitMenu
|
||||
ld b, $0
|
||||
ld a, [MenuSelection]
|
||||
ld a, [wMenuSelection]
|
||||
ld c, a
|
||||
ld a, [wBuenasPassword]
|
||||
maskbits NUM_PASSWORDS_PER_CATEGORY
|
||||
@@ -24,7 +24,7 @@ Special_BuenasPassword: ; 8af6b
|
||||
|
||||
.wrong
|
||||
ld a, b
|
||||
ld [ScriptVar], a
|
||||
ld [wScriptVar], a
|
||||
ret
|
||||
; 8afa9
|
||||
|
||||
@@ -58,7 +58,7 @@ endr
|
||||
ld a, [wBuenasPassword]
|
||||
and $f0
|
||||
ld c, a
|
||||
ld a, [MenuSelection]
|
||||
ld a, [wMenuSelection]
|
||||
add c
|
||||
ld c, a
|
||||
farcall GetBuenasPassword
|
||||
@@ -71,7 +71,7 @@ Special_BuenaPrize: ; 8afd4
|
||||
xor a
|
||||
ld [wMenuScrollPosition], a
|
||||
ld a, $1
|
||||
ld [MenuSelection], a
|
||||
ld [wMenuSelection], a
|
||||
call Buena_PlacePrizeMenuBox
|
||||
call Buena_DisplayBlueCardBalance
|
||||
ld hl, .Text_AskWhichPrize
|
||||
@@ -88,7 +88,7 @@ Special_BuenaPrize: ; 8afd4
|
||||
call PrintBlueCardBalance
|
||||
call Buena_PrizeMenu
|
||||
jr z, .done
|
||||
ld [MenuSelectionQuantity], a
|
||||
ld [wMenuSelectionQuantity], a
|
||||
call Buena_getprize
|
||||
ld a, [hl]
|
||||
ld [wNamedObjectIndexBuffer], a
|
||||
@@ -98,7 +98,7 @@ Special_BuenaPrize: ; 8afd4
|
||||
call YesNoBox
|
||||
jr c, .loop
|
||||
|
||||
ld a, [MenuSelectionQuantity]
|
||||
ld a, [wMenuSelectionQuantity]
|
||||
call Buena_getprize
|
||||
inc hl
|
||||
ld a, [hld]
|
||||
@@ -109,10 +109,10 @@ Special_BuenaPrize: ; 8afd4
|
||||
|
||||
ld a, [hli]
|
||||
push hl
|
||||
ld [CurItem], a
|
||||
ld [wCurItem], a
|
||||
ld a, $1
|
||||
ld [wItemQuantityChangeBuffer], a
|
||||
ld hl, NumItems
|
||||
ld hl, wNumItems
|
||||
call ReceiveItem
|
||||
pop hl
|
||||
jr nc, .BagFull
|
||||
@@ -246,7 +246,7 @@ Buena_PlacePrizeMenuBox: ; 8b0d6
|
||||
Buena_PrizeMenu: ; 8b0e2
|
||||
ld hl, .MenuDataHeader
|
||||
call CopyMenuDataHeader
|
||||
ld a, [MenuSelection]
|
||||
ld a, [wMenuSelection]
|
||||
ld [wMenuCursorBuffer], a
|
||||
xor a
|
||||
ld [wWhichIndexSet], a
|
||||
@@ -254,10 +254,10 @@ Buena_PrizeMenu: ; 8b0e2
|
||||
call InitScrollingMenu
|
||||
call UpdateSprites
|
||||
call ScrollingMenu
|
||||
ld a, [MenuSelection]
|
||||
ld a, [wMenuSelection]
|
||||
ld c, a
|
||||
ld a, [wMenuCursorY]
|
||||
ld [MenuSelection], a
|
||||
ld [wMenuSelection], a
|
||||
ld a, [wMenuJoypad]
|
||||
cp $2
|
||||
jr z, .cancel
|
||||
@@ -301,7 +301,7 @@ endr
|
||||
; 8b134
|
||||
|
||||
.prizeitem ; 8b134
|
||||
ld a, [MenuSelection]
|
||||
ld a, [wMenuSelection]
|
||||
call Buena_getprize
|
||||
ld a, [hl]
|
||||
push de
|
||||
@@ -313,7 +313,7 @@ endr
|
||||
; 8b147
|
||||
|
||||
.prizepoints ; 8b147
|
||||
ld a, [MenuSelection]
|
||||
ld a, [wMenuSelection]
|
||||
call Buena_getprize
|
||||
inc hl
|
||||
ld a, [hl]
|
||||
|
||||
@@ -5,7 +5,7 @@ Special_AskRememberPassword: ; 4ae12
|
||||
ld a, $1
|
||||
|
||||
.okay
|
||||
ld [ScriptVar], a
|
||||
ld [wScriptVar], a
|
||||
ret
|
||||
|
||||
.DoMenu: ; 4ae1f
|
||||
|
||||
@@ -11,7 +11,7 @@ BugContest_SetCaughtContestMon: ; e6ce
|
||||
|
||||
.firstcatch
|
||||
call .generatestats
|
||||
ld a, [TempEnemyMonSpecies]
|
||||
ld a, [wTempEnemyMonSpecies]
|
||||
ld [wd265], a
|
||||
call GetPokemonName
|
||||
ld hl, .caughttext
|
||||
@@ -19,16 +19,16 @@ BugContest_SetCaughtContestMon: ; e6ce
|
||||
ret
|
||||
|
||||
.generatestats ; e6fd
|
||||
ld a, [TempEnemyMonSpecies]
|
||||
ld [CurSpecies], a
|
||||
ld [CurPartySpecies], a
|
||||
ld a, [wTempEnemyMonSpecies]
|
||||
ld [wCurSpecies], a
|
||||
ld [wCurPartySpecies], a
|
||||
call GetBaseData
|
||||
xor a
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
ld hl, wContestMon
|
||||
call ByteFill
|
||||
xor a
|
||||
ld [MonType], a
|
||||
ld [wMonType], a
|
||||
ld hl, wContestMon
|
||||
jp GeneratePartyMonStats
|
||||
|
||||
|
||||
@@ -77,12 +77,12 @@ Special_CheckBugContestContestantFlag: ; 139ed
|
||||
INCLUDE "data/bug_contest_flags.asm"
|
||||
|
||||
Special_ContestDropOffMons: ; 13a12
|
||||
ld hl, PartyMon1HP
|
||||
ld hl, wPartyMon1HP
|
||||
ld a, [hli]
|
||||
or [hl]
|
||||
jr z, .fainted
|
||||
; Mask the rest of your party by setting the count to 1...
|
||||
ld hl, PartyCount
|
||||
ld hl, wPartyCount
|
||||
ld a, 1
|
||||
ld [hli], a
|
||||
inc hl
|
||||
@@ -92,18 +92,18 @@ Special_ContestDropOffMons: ; 13a12
|
||||
; ... and replacing it with the terminator byte
|
||||
ld [hl], -1
|
||||
xor a
|
||||
ld [ScriptVar], a
|
||||
ld [wScriptVar], a
|
||||
ret
|
||||
|
||||
.fainted
|
||||
ld a, $1
|
||||
ld [ScriptVar], a
|
||||
ld [wScriptVar], a
|
||||
ret
|
||||
; 13a31
|
||||
|
||||
Special_ContestReturnMons: ; 13a31
|
||||
; Restore the species of the second mon.
|
||||
ld hl, PartySpecies + 1
|
||||
ld hl, wPartySpecies + 1
|
||||
ld a, [wBugContestSecondPartySpecies]
|
||||
ld [hl], a
|
||||
; Restore the party count, which must be recomputed.
|
||||
@@ -117,6 +117,6 @@ Special_ContestReturnMons: ; 13a31
|
||||
|
||||
.done
|
||||
ld a, b
|
||||
ld [PartyCount], a
|
||||
ld [wPartyCount], a
|
||||
ret
|
||||
; 13a47
|
||||
|
||||
@@ -4,7 +4,7 @@ DisplayCaughtContestMonStats: ; cc000
|
||||
call ClearSprites
|
||||
call LoadFontsBattleExtra
|
||||
|
||||
ld hl, Options
|
||||
ld hl, wOptions
|
||||
ld a, [hl]
|
||||
push af
|
||||
set 4, [hl]
|
||||
@@ -38,24 +38,24 @@ DisplayCaughtContestMonStats: ; cc000
|
||||
ld a, [wContestMon]
|
||||
ld [wd265], a
|
||||
call GetPokemonName
|
||||
ld de, StringBuffer1
|
||||
ld de, wStringBuffer1
|
||||
hlcoord 1, 2
|
||||
call PlaceString
|
||||
|
||||
ld h, b
|
||||
ld l, c
|
||||
ld a, [wContestMonLevel]
|
||||
ld [TempMonLevel], a
|
||||
ld [wTempMonLevel], a
|
||||
call PrintLevel
|
||||
|
||||
ld de, EnemyMonNick
|
||||
ld de, wEnemyMonNick
|
||||
hlcoord 1, 8
|
||||
call PlaceString
|
||||
|
||||
ld h, b
|
||||
ld l, c
|
||||
ld a, [EnemyMonLevel]
|
||||
ld [TempMonLevel], a
|
||||
ld a, [wEnemyMonLevel]
|
||||
ld [wTempMonLevel], a
|
||||
call PrintLevel
|
||||
|
||||
hlcoord 11, 4
|
||||
@@ -64,14 +64,14 @@ DisplayCaughtContestMonStats: ; cc000
|
||||
call PrintNum
|
||||
|
||||
hlcoord 11, 10
|
||||
ld de, EnemyMonMaxHP
|
||||
ld de, wEnemyMonMaxHP
|
||||
call PrintNum
|
||||
|
||||
ld hl, SwitchMonText
|
||||
call PrintText
|
||||
|
||||
pop af
|
||||
ld [Options], a
|
||||
ld [wOptions], a
|
||||
|
||||
call WaitBGMap
|
||||
ld b, SCGB_DIPLOMA
|
||||
|
||||
@@ -97,7 +97,7 @@ LoadContestantName: ; 13730
|
||||
push bc
|
||||
; Get the Trainer Class name and copy it into wBugContestWinnerName.
|
||||
callfar GetTrainerClassName
|
||||
ld hl, StringBuffer1
|
||||
ld hl, wStringBuffer1
|
||||
ld de, wBugContestWinnerName
|
||||
ld bc, TRAINER_CLASS_NAME_LENGTH
|
||||
call CopyBytes
|
||||
@@ -121,13 +121,13 @@ LoadContestantName: ; 13730
|
||||
ld b, a
|
||||
callfar GetTrainerName
|
||||
; Append the name to wBugContestWinnerName.
|
||||
ld hl, StringBuffer1
|
||||
ld hl, wStringBuffer1
|
||||
pop de
|
||||
ld bc, NAME_LENGTH - 1
|
||||
jp CopyBytes
|
||||
|
||||
.player
|
||||
ld hl, PlayerName
|
||||
ld hl, wPlayerName
|
||||
ld de, wBugContestWinnerName
|
||||
ld bc, NAME_LENGTH
|
||||
jp CopyBytes
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
_CardKey: ; 50779
|
||||
; Are we even in the right map to use this?
|
||||
ld a, [MapGroup]
|
||||
ld a, [wMapGroup]
|
||||
cp GROUP_RADIO_TOWER_3F
|
||||
jr nz, .nope
|
||||
|
||||
ld a, [MapNumber]
|
||||
ld a, [wMapNumber]
|
||||
cp MAP_RADIO_TOWER_3F
|
||||
jr nz, .nope
|
||||
; Are we facing the slot?
|
||||
ld a, [PlayerDirection]
|
||||
ld a, [wPlayerDirection]
|
||||
and %1100
|
||||
cp OW_UP
|
||||
jr nz, .nope
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
CatchTutorial:: ; 4e554
|
||||
ld a, [BattleType]
|
||||
ld a, [wBattleType]
|
||||
dec a
|
||||
ld c, a
|
||||
ld hl, .dw
|
||||
@@ -18,13 +18,13 @@ CatchTutorial:: ; 4e554
|
||||
|
||||
.DudeTutorial: ; 4e56a (13:656a)
|
||||
; Back up your name to your Mom's name.
|
||||
ld hl, PlayerName
|
||||
ld de, MomsName
|
||||
ld hl, wPlayerName
|
||||
ld de, wMomsName
|
||||
ld bc, NAME_LENGTH
|
||||
call CopyBytes
|
||||
; Copy Dude's name to your name
|
||||
ld hl, .Dude
|
||||
ld de, PlayerName
|
||||
ld de, wPlayerName
|
||||
ld bc, NAME_LENGTH
|
||||
call CopyBytes
|
||||
|
||||
@@ -33,11 +33,11 @@ CatchTutorial:: ; 4e554
|
||||
xor a
|
||||
ld [hJoyDown], a
|
||||
ld [hJoyPressed], a
|
||||
ld a, [Options]
|
||||
ld a, [wOptions]
|
||||
push af
|
||||
and $f8
|
||||
add $3
|
||||
ld [Options], a
|
||||
ld [wOptions], a
|
||||
ld hl, .AutoInput
|
||||
ld a, BANK(.AutoInput)
|
||||
call StartAutoInput
|
||||
@@ -45,9 +45,9 @@ CatchTutorial:: ; 4e554
|
||||
call StopAutoInput
|
||||
pop af
|
||||
|
||||
ld [Options], a
|
||||
ld hl, MomsName
|
||||
ld de, PlayerName
|
||||
ld [wOptions], a
|
||||
ld hl, wMomsName
|
||||
ld de, wPlayerName
|
||||
ld bc, NAME_LENGTH
|
||||
call CopyBytes
|
||||
ret
|
||||
|
||||
@@ -2,10 +2,10 @@ SPECIALCELEBIEVENT_CELEBI EQU $84
|
||||
|
||||
Special_CelebiShrineEvent: ; 4989a
|
||||
call DelayFrame
|
||||
ld a, [VramState]
|
||||
ld a, [wVramState]
|
||||
push af
|
||||
xor a
|
||||
ld [VramState], a
|
||||
ld [wVramState], a
|
||||
call LoadCelebiGFX
|
||||
depixel 0, 10, 7, 0
|
||||
ld a, SPRITE_ANIM_INDEX_CELEBI
|
||||
@@ -44,7 +44,7 @@ Special_CelebiShrineEvent: ; 4989a
|
||||
|
||||
.done
|
||||
pop af
|
||||
ld [VramState], a
|
||||
ld [wVramState], a
|
||||
call .RestorePlayerSprite_DespawnLeaves
|
||||
call CelebiEvent_SetBattleType
|
||||
ret
|
||||
@@ -52,7 +52,7 @@ Special_CelebiShrineEvent: ; 4989a
|
||||
; 498f9
|
||||
|
||||
.RestorePlayerSprite_DespawnLeaves: ; 498f9
|
||||
ld hl, Sprite01TileID
|
||||
ld hl, wSprite01TileID
|
||||
xor a
|
||||
ld c, 4
|
||||
.OAMloop:
|
||||
@@ -63,8 +63,8 @@ endr
|
||||
inc a
|
||||
dec c
|
||||
jr nz, .OAMloop
|
||||
ld hl, Sprite05
|
||||
ld bc, SpritesEnd - Sprite05
|
||||
ld hl, wSprite05
|
||||
ld bc, wSpritesEnd - wSprite05
|
||||
xor a
|
||||
call ByteFill
|
||||
ret
|
||||
@@ -357,7 +357,7 @@ GetCelebiSpriteTile: ; 49bae
|
||||
|
||||
CelebiEvent_SetBattleType: ; 49bf3
|
||||
ld a, BATTLETYPE_CELEBI
|
||||
ld [BattleType], a
|
||||
ld [wBattleType], a
|
||||
ret
|
||||
|
||||
; 49bf9
|
||||
@@ -367,13 +367,13 @@ Special_CheckCaughtCelebi: ; 49bf9
|
||||
bit 6, a
|
||||
jr z, .false
|
||||
ld a, $1
|
||||
ld [ScriptVar], a
|
||||
ld [wScriptVar], a
|
||||
jr .done
|
||||
|
||||
|
||||
.false
|
||||
xor a
|
||||
ld [ScriptVar], a
|
||||
ld [wScriptVar], a
|
||||
|
||||
.done
|
||||
ret
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
CheckForHiddenItems: ; b8172
|
||||
; Checks to see if there are hidden items on the screen that have not yet been found. If it finds one, returns carry.
|
||||
call GetMapScriptsBank
|
||||
ld [Buffer1], a
|
||||
; Get the coordinate of the bottom right corner of the screen, and load it in Buffer3/Buffer4.
|
||||
ld a, [XCoord]
|
||||
ld [wBuffer1], a
|
||||
; Get the coordinate of the bottom right corner of the screen, and load it in wBuffer3/wBuffer4.
|
||||
ld a, [wXCoord]
|
||||
add SCREEN_WIDTH / 4
|
||||
ld [Buffer4], a
|
||||
ld a, [YCoord]
|
||||
ld [wBuffer4], a
|
||||
ld a, [wYCoord]
|
||||
add SCREEN_HEIGHT / 4
|
||||
ld [Buffer3], a
|
||||
ld [wBuffer3], a
|
||||
; Get the pointer for the first bg_event in the map...
|
||||
ld hl, wCurrMapBGEventsPointer
|
||||
ld a, [hli]
|
||||
@@ -20,14 +20,14 @@ CheckForHiddenItems: ; b8172
|
||||
jr z, .nobgeventitems
|
||||
; For i = 1:wCurrMapBGEventCount...
|
||||
.loop
|
||||
; Store the counter in Buffer2, and store the bg_event pointer in the stack.
|
||||
ld [Buffer2], a
|
||||
; Store the counter in wBuffer2, and store the bg_event pointer in the stack.
|
||||
ld [wBuffer2], a
|
||||
push hl
|
||||
; Get the Y coordinate of the BG event.
|
||||
call .GetFarByte
|
||||
ld e, a
|
||||
; Is the Y coordinate of the BG event on the screen? If not, go to the next BG event.
|
||||
ld a, [Buffer3]
|
||||
ld a, [wBuffer3]
|
||||
sub e
|
||||
jr c, .next
|
||||
cp SCREEN_HEIGHT / 2
|
||||
@@ -35,7 +35,7 @@ CheckForHiddenItems: ; b8172
|
||||
; Is the X coordinate of the BG event on the screen? If not, go to the next BG event.
|
||||
call .GetFarByte
|
||||
ld d, a
|
||||
ld a, [Buffer4]
|
||||
ld a, [wBuffer4]
|
||||
sub d
|
||||
jr c, .next
|
||||
cp SCREEN_WIDTH / 2
|
||||
@@ -45,9 +45,9 @@ CheckForHiddenItems: ; b8172
|
||||
cp BGEVENT_ITEM
|
||||
jr nz, .next
|
||||
; Has this item already been found? If not, set off the Itemfinder.
|
||||
ld a, [Buffer1]
|
||||
ld a, [wBuffer1]
|
||||
call GetFarHalfword
|
||||
ld a, [Buffer1]
|
||||
ld a, [wBuffer1]
|
||||
call GetFarHalfword
|
||||
ld d, h
|
||||
ld e, l
|
||||
@@ -63,7 +63,7 @@ CheckForHiddenItems: ; b8172
|
||||
ld bc, 5
|
||||
add hl, bc
|
||||
; Restore the BG event counter and decrement it. If it hits zero, there are no hidden items in range.
|
||||
ld a, [Buffer2]
|
||||
ld a, [wBuffer2]
|
||||
dec a
|
||||
jr nz, .loop
|
||||
|
||||
@@ -78,7 +78,7 @@ CheckForHiddenItems: ; b8172
|
||||
; b81e2
|
||||
|
||||
.GetFarByte: ; b81e2
|
||||
ld a, [Buffer1]
|
||||
ld a, [wBuffer1]
|
||||
call GetFarByte
|
||||
inc hl
|
||||
ret
|
||||
|
||||
@@ -119,7 +119,7 @@ DayCareManIntroText: ; 1678f
|
||||
; 16798
|
||||
|
||||
DayCareAskDepositPokemon: ; 16798
|
||||
ld a, [PartyCount]
|
||||
ld a, [wPartyCount]
|
||||
cp 2
|
||||
jr c, .OnlyOneMon
|
||||
ld a, DAYCARETEXT_WHICH_ONE
|
||||
@@ -127,20 +127,20 @@ DayCareAskDepositPokemon: ; 16798
|
||||
ld b, PARTYMENUACTION_GIVE_MON
|
||||
farcall SelectTradeOrDayCareMon
|
||||
jr c, .Declined
|
||||
ld a, [CurPartySpecies]
|
||||
ld a, [wCurPartySpecies]
|
||||
cp EGG
|
||||
jr z, .Egg
|
||||
farcall CheckCurPartyMonFainted
|
||||
jr c, .OutOfUsableMons
|
||||
ld hl, PartyMon1Item
|
||||
ld hl, wPartyMon1Item
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
ld a, [CurPartyMon]
|
||||
ld a, [wCurPartyMon]
|
||||
call AddNTimes
|
||||
ld d, [hl]
|
||||
farcall ItemIsMail
|
||||
jr c, .HoldingMail
|
||||
ld hl, PartyMonNicknames
|
||||
ld a, [CurPartyMon]
|
||||
ld hl, wPartyMonNicknames
|
||||
ld a, [wCurPartyMon]
|
||||
call GetNick
|
||||
and a
|
||||
ret
|
||||
@@ -180,7 +180,7 @@ DayCareAskDepositPokemon: ; 16798
|
||||
DayCare_DepositPokemonText: ; 167f6
|
||||
ld a, DAYCARETEXT_DEPOSIT
|
||||
call PrintDayCareText
|
||||
ld a, [CurPartySpecies]
|
||||
ld a, [wCurPartySpecies]
|
||||
call PlayMonCry
|
||||
ld a, DAYCARETEXT_COME_BACK_LATER
|
||||
call PrintDayCareText
|
||||
@@ -188,7 +188,7 @@ DayCare_DepositPokemonText: ; 167f6
|
||||
; 16807
|
||||
|
||||
DayCare_AskWithdrawBreedMon: ; 16807
|
||||
ld a, [StringBuffer2 + 1]
|
||||
ld a, [wStringBuffer2 + 1]
|
||||
and a
|
||||
jr nz, .grew_at_least_one_level
|
||||
ld a, DAYCARETEXT_TOO_SOON
|
||||
@@ -208,11 +208,11 @@ DayCare_AskWithdrawBreedMon: ; 16807
|
||||
jr c, .refused
|
||||
|
||||
.check_money
|
||||
ld de, Money
|
||||
ld bc, StringBuffer2 + 2
|
||||
ld de, wMoney
|
||||
ld bc, wStringBuffer2 + 2
|
||||
farcall CompareMoney
|
||||
jr c, .not_enough_money
|
||||
ld a, [PartyCount]
|
||||
ld a, [wPartyCount]
|
||||
cp PARTY_LENGTH
|
||||
jr nc, .PartyFull
|
||||
and a
|
||||
@@ -235,12 +235,12 @@ DayCare_AskWithdrawBreedMon: ; 16807
|
||||
; 16850
|
||||
|
||||
DayCare_GetBackMonForMoney: ; 16850
|
||||
ld bc, StringBuffer2 + 2
|
||||
ld de, Money
|
||||
ld bc, wStringBuffer2 + 2
|
||||
ld de, wMoney
|
||||
farcall TakeMoney
|
||||
ld a, DAYCARETEXT_WITHDRAW
|
||||
call PrintDayCareText
|
||||
ld a, [CurPartySpecies]
|
||||
ld a, [wCurPartySpecies]
|
||||
call PlayMonCry
|
||||
ld a, DAYCARETEXT_GOT_BACK
|
||||
call PrintDayCareText
|
||||
@@ -249,24 +249,24 @@ DayCare_GetBackMonForMoney: ; 16850
|
||||
|
||||
GetPriceToRetrieveBreedmon: ; 1686d
|
||||
ld a, b
|
||||
ld [StringBuffer2], a
|
||||
ld [wStringBuffer2], a
|
||||
ld a, d
|
||||
ld [StringBuffer2 + 1], a
|
||||
ld de, StringBuffer1
|
||||
ld [wStringBuffer2 + 1], a
|
||||
ld de, wStringBuffer1
|
||||
ld bc, NAME_LENGTH
|
||||
call CopyBytes
|
||||
ld hl, 0
|
||||
ld bc, 100
|
||||
ld a, [StringBuffer2 + 1]
|
||||
ld a, [wStringBuffer2 + 1]
|
||||
call AddNTimes
|
||||
ld de, 100
|
||||
add hl, de
|
||||
xor a
|
||||
ld [StringBuffer2 + 2], a
|
||||
ld [wStringBuffer2 + 2], a
|
||||
ld a, h
|
||||
ld [StringBuffer2 + 3], a
|
||||
ld [wStringBuffer2 + 3], a
|
||||
ld a, l
|
||||
ld [StringBuffer2 + 4], a
|
||||
ld [wStringBuffer2 + 4], a
|
||||
ret
|
||||
; 1689b
|
||||
|
||||
@@ -446,7 +446,7 @@ Special_DayCareManOutside: ; 16936
|
||||
call PrintText
|
||||
call YesNoBox
|
||||
jr c, .Declined
|
||||
ld a, [PartyCount]
|
||||
ld a, [wPartyCount]
|
||||
cp PARTY_LENGTH
|
||||
jr nc, .PartyFull
|
||||
call DayCare_GiveEgg
|
||||
@@ -468,14 +468,14 @@ Special_DayCareManOutside: ; 16936
|
||||
.Load0:
|
||||
call PrintText
|
||||
xor a ; FALSE
|
||||
ld [ScriptVar], a
|
||||
ld [wScriptVar], a
|
||||
ret
|
||||
|
||||
.PartyFull:
|
||||
ld hl, .PartyFullText
|
||||
call PrintText
|
||||
ld a, TRUE
|
||||
ld [ScriptVar], a
|
||||
ld [wScriptVar], a
|
||||
ret
|
||||
; 16993
|
||||
|
||||
@@ -511,8 +511,8 @@ Special_DayCareManOutside: ; 16936
|
||||
|
||||
DayCare_GiveEgg: ; 169ac
|
||||
ld a, [wEggMonLevel]
|
||||
ld [CurPartyLevel], a
|
||||
ld hl, PartyCount
|
||||
ld [wCurPartyLevel], a
|
||||
ld hl, wPartyCount
|
||||
ld a, [hl]
|
||||
cp PARTY_LENGTH
|
||||
jr nc, .PartyFull
|
||||
@@ -525,24 +525,24 @@ DayCare_GiveEgg: ; 169ac
|
||||
ld a, EGG
|
||||
ld [hli], a
|
||||
ld a, [wEggMonSpecies]
|
||||
ld [CurSpecies], a
|
||||
ld [CurPartySpecies], a
|
||||
ld [wCurSpecies], a
|
||||
ld [wCurPartySpecies], a
|
||||
ld a, -1
|
||||
ld [hl], a
|
||||
|
||||
ld hl, PartyMonNicknames
|
||||
ld hl, wPartyMonNicknames
|
||||
ld bc, MON_NAME_LENGTH
|
||||
call DayCare_GetCurrentPartyMember
|
||||
ld hl, wEggNick
|
||||
call CopyBytes
|
||||
|
||||
ld hl, PartyMonOT
|
||||
ld hl, wPartyMonOT
|
||||
ld bc, NAME_LENGTH
|
||||
call DayCare_GetCurrentPartyMember
|
||||
ld hl, wEggOT
|
||||
call CopyBytes
|
||||
|
||||
ld hl, PartyMon1
|
||||
ld hl, wPartyMon1
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
call DayCare_GetCurrentPartyMember
|
||||
ld hl, wEggMon
|
||||
@@ -550,9 +550,9 @@ DayCare_GiveEgg: ; 169ac
|
||||
call CopyBytes
|
||||
|
||||
call GetBaseData
|
||||
ld a, [PartyCount]
|
||||
ld a, [wPartyCount]
|
||||
dec a
|
||||
ld hl, PartyMon1
|
||||
ld hl, wPartyMon1
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
call AddNTimes
|
||||
ld b, h
|
||||
@@ -583,7 +583,7 @@ DayCare_GiveEgg: ; 169ac
|
||||
; 16a31
|
||||
|
||||
DayCare_GetCurrentPartyMember: ; 16a31
|
||||
ld a, [PartyCount]
|
||||
ld a, [wPartyCount]
|
||||
dec a
|
||||
call AddNTimes
|
||||
ld d, h
|
||||
@@ -626,13 +626,13 @@ DayCare_InitBreeding: ; 16a3b
|
||||
ld bc, NAME_LENGTH
|
||||
call ByteFill
|
||||
ld a, [wBreedMon1DVs]
|
||||
ld [TempMonDVs], a
|
||||
ld [wTempMonDVs], a
|
||||
ld a, [wBreedMon1DVs + 1]
|
||||
ld [TempMonDVs + 1], a
|
||||
ld [wTempMonDVs + 1], a
|
||||
ld a, [wBreedMon1Species]
|
||||
ld [CurPartySpecies], a
|
||||
ld [wCurPartySpecies], a
|
||||
ld a, $3
|
||||
ld [MonType], a
|
||||
ld [wMonType], a
|
||||
ld a, [wBreedMon1Species]
|
||||
cp DITTO
|
||||
ld a, $1
|
||||
@@ -654,13 +654,13 @@ DayCare_InitBreeding: ; 16a3b
|
||||
ld a, [wBreedMon2Species]
|
||||
|
||||
.GotMother:
|
||||
ld [CurPartySpecies], a
|
||||
ld [wCurPartySpecies], a
|
||||
callfar GetPreEvolution
|
||||
callfar GetPreEvolution
|
||||
ld a, EGG_LEVEL
|
||||
ld [CurPartyLevel], a
|
||||
ld [wCurPartyLevel], a
|
||||
|
||||
ld a, [CurPartySpecies]
|
||||
ld a, [wCurPartySpecies]
|
||||
cp NIDORAN_F
|
||||
jr nz, .GotEggSpecies
|
||||
call Random
|
||||
@@ -669,15 +669,15 @@ DayCare_InitBreeding: ; 16a3b
|
||||
jr c, .GotEggSpecies
|
||||
ld a, NIDORAN_M
|
||||
.GotEggSpecies:
|
||||
ld [CurPartySpecies], a
|
||||
ld [CurSpecies], a
|
||||
ld [wCurPartySpecies], a
|
||||
ld [wCurSpecies], a
|
||||
ld [wEggMonSpecies], a
|
||||
|
||||
call GetBaseData
|
||||
ld hl, wEggNick
|
||||
ld de, .String_EGG
|
||||
call CopyName2
|
||||
ld hl, PlayerName
|
||||
ld hl, wPlayerName
|
||||
ld de, wEggOT
|
||||
ld bc, NAME_LENGTH
|
||||
call CopyBytes
|
||||
@@ -685,15 +685,15 @@ DayCare_InitBreeding: ; 16a3b
|
||||
ld [wEggMonItem], a
|
||||
ld de, wEggMonMoves
|
||||
xor a
|
||||
ld [Buffer1], a
|
||||
ld [wBuffer1], a
|
||||
predef FillMoves
|
||||
farcall InitEggMoves
|
||||
ld hl, wEggMonID
|
||||
ld a, [PlayerID]
|
||||
ld a, [wPlayerID]
|
||||
ld [hli], a
|
||||
ld a, [PlayerID + 1]
|
||||
ld a, [wPlayerID + 1]
|
||||
ld [hl], a
|
||||
ld a, [CurPartyLevel]
|
||||
ld a, [wCurPartyLevel]
|
||||
ld d, a
|
||||
callfar CalcExpAtLevel
|
||||
ld hl, wEggMonExp
|
||||
@@ -713,10 +713,10 @@ DayCare_InitBreeding: ; 16a3b
|
||||
ld hl, wEggMonDVs
|
||||
call Random
|
||||
ld [hli], a
|
||||
ld [TempMonDVs], a
|
||||
ld [wTempMonDVs], a
|
||||
call Random
|
||||
ld [hld], a
|
||||
ld [TempMonDVs + 1], a
|
||||
ld [wTempMonDVs + 1], a
|
||||
ld de, wBreedMon1DVs
|
||||
ld a, [wBreedMon1Species]
|
||||
cp DITTO
|
||||
@@ -726,7 +726,7 @@ DayCare_InitBreeding: ; 16a3b
|
||||
cp DITTO
|
||||
jr z, .GotDVs
|
||||
ld a, TEMPMON
|
||||
ld [MonType], a
|
||||
ld [wMonType], a
|
||||
push hl
|
||||
farcall GetGender
|
||||
pop hl
|
||||
@@ -766,7 +766,7 @@ DayCare_InitBreeding: ; 16a3b
|
||||
ld [hl], a
|
||||
|
||||
.SkipDVs:
|
||||
ld hl, StringBuffer1
|
||||
ld hl, wStringBuffer1
|
||||
ld de, wMonOrItemNameBuffer
|
||||
ld bc, NAME_LENGTH
|
||||
call CopyBytes
|
||||
@@ -774,17 +774,17 @@ DayCare_InitBreeding: ; 16a3b
|
||||
ld de, wEggMonPP
|
||||
predef FillPP
|
||||
ld hl, wMonOrItemNameBuffer
|
||||
ld de, StringBuffer1
|
||||
ld de, wStringBuffer1
|
||||
ld bc, NAME_LENGTH
|
||||
call CopyBytes
|
||||
ld a, [BaseEggSteps]
|
||||
ld a, [wBaseEggSteps]
|
||||
ld hl, wEggMonHappiness
|
||||
ld [hli], a
|
||||
xor a
|
||||
ld [hli], a
|
||||
ld [hli], a
|
||||
ld [hl], a
|
||||
ld a, [CurPartyLevel]
|
||||
ld a, [wCurPartyLevel]
|
||||
ld [wEggMonLevel], a
|
||||
ret
|
||||
; 16be0
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
Special_Dratini: ; 0x8b170
|
||||
; if ScriptVar is 0 or 1, change the moveset of the last Dratini in the party.
|
||||
; if wScriptVar is 0 or 1, change the moveset of the last Dratini in the party.
|
||||
; 0: give it a special moveset with Extremespeed.
|
||||
; 1: give it the normal moveset of a level 15 Dratini.
|
||||
|
||||
ld a, [ScriptVar]
|
||||
ld a, [wScriptVar]
|
||||
cp $2
|
||||
ret nc
|
||||
ld bc, PartyCount
|
||||
ld bc, wPartyCount
|
||||
ld a, [bc]
|
||||
ld hl, MON_SPECIES
|
||||
call .GetNthPartyMon
|
||||
@@ -30,7 +30,7 @@ Special_Dratini: ; 0x8b170
|
||||
|
||||
.GiveMoveset:
|
||||
push hl
|
||||
ld a, [ScriptVar]
|
||||
ld a, [wScriptVar]
|
||||
ld hl, .Movesets
|
||||
ld bc, .Moveset1 - .Moveset0
|
||||
call AddNTimes
|
||||
@@ -93,7 +93,7 @@ Special_Dratini: ; 0x8b170
|
||||
; returns the address of the last Pokémon in the party in hl.
|
||||
; sets carry if a is 0.
|
||||
|
||||
ld de, PartyMon1
|
||||
ld de, wPartyMon1
|
||||
add hl, de
|
||||
and a
|
||||
jr z, .EmptyParty
|
||||
|
||||
@@ -29,7 +29,7 @@ Elevator:: ; 1342d
|
||||
; 1345a
|
||||
|
||||
.LoadFloors: ; 1345a
|
||||
ld de, CurElevator
|
||||
ld de, wCurElevator
|
||||
ld bc, 4
|
||||
ld hl, wElevatorPointer
|
||||
ld a, [hli]
|
||||
@@ -60,9 +60,9 @@ Elevator:: ; 1342d
|
||||
call GetFarByte
|
||||
ld c, a
|
||||
inc hl
|
||||
ld a, [BackupMapGroup]
|
||||
ld a, [wBackupMapGroup]
|
||||
ld d, a
|
||||
ld a, [BackupMapNumber]
|
||||
ld a, [wBackupMapNumber]
|
||||
ld e, a
|
||||
ld b, 0
|
||||
.loop2
|
||||
@@ -111,7 +111,7 @@ Elevator_GoToFloor: ; 134c0
|
||||
ld bc, 4
|
||||
call AddNTimes
|
||||
inc hl
|
||||
ld de, BackupWarpNumber
|
||||
ld de, wBackupWarpNumber
|
||||
ld a, [wElevatorPointerBank]
|
||||
ld bc, 3
|
||||
call FarCopyBytes
|
||||
@@ -151,7 +151,7 @@ Elevator_WhichFloorText: ; 0x1350d
|
||||
|
||||
|
||||
Elevator_GetCurrentFloorText: ; 13512
|
||||
ld hl, Options
|
||||
ld hl, wOptions
|
||||
ld a, [hl]
|
||||
push af
|
||||
set NO_TEXT_SCROLL, [hl]
|
||||
@@ -165,7 +165,7 @@ Elevator_GetCurrentFloorText: ; 13512
|
||||
hlcoord 4, 4
|
||||
call Elevator_GetCurrentFloorString
|
||||
pop af
|
||||
ld [Options], a
|
||||
ld [wOptions], a
|
||||
ret
|
||||
; 13537
|
||||
|
||||
@@ -179,7 +179,7 @@ Elevator_GetCurrentFloorString: ; 1353f
|
||||
ld a, [wElevatorOriginFloor]
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, CurElevatorFloors
|
||||
ld hl, wCurElevatorFloors
|
||||
add hl, de
|
||||
ld a, [hl]
|
||||
pop de
|
||||
@@ -198,14 +198,14 @@ Elevator_MenuData2: ; 0x13558
|
||||
db SCROLLINGMENU_DISPLAY_ARROWS ; flags
|
||||
db 4, 0 ; rows, columns
|
||||
db 1 ; horizontal spacing
|
||||
dbw 0, CurElevator
|
||||
dbw 0, wCurElevator
|
||||
dba GetElevatorFloorStrings
|
||||
dba NULL
|
||||
dba NULL
|
||||
; 13568
|
||||
|
||||
GetElevatorFloorStrings: ; 13568
|
||||
ld a, [MenuSelection]
|
||||
ld a, [wMenuSelection]
|
||||
GetFloorString: ; 1356b
|
||||
push de
|
||||
call FloorToString
|
||||
|
||||
@@ -62,8 +62,8 @@ ShakeHeadbuttTree: ; 8c80a
|
||||
xor a
|
||||
ld [hBGMapMode], a
|
||||
farcall ClearSpriteAnims
|
||||
ld hl, Sprite37
|
||||
ld bc, SpritesEnd - Sprite37
|
||||
ld hl, wSprite37
|
||||
ld bc, wSpritesEnd - wSprite37
|
||||
xor a
|
||||
call ByteFill
|
||||
ld de, Font
|
||||
@@ -81,7 +81,7 @@ INCBIN "gfx/overworld/headbutt_tree.2bpp"
|
||||
HideHeadbuttTree: ; 8c913
|
||||
xor a
|
||||
ld [hBGMapMode], a
|
||||
ld a, [PlayerDirection]
|
||||
ld a, [wPlayerDirection]
|
||||
and %00001100
|
||||
srl a
|
||||
ld e, a
|
||||
@@ -262,7 +262,7 @@ Cut_GetLeafSpawnCoords: ; 8ca8e (23:4a8e)
|
||||
jr z, .top_side
|
||||
set 1, e
|
||||
.top_side
|
||||
ld a, [PlayerDirection]
|
||||
ld a, [wPlayerDirection]
|
||||
and %00001100
|
||||
add e
|
||||
ld e, a
|
||||
@@ -298,7 +298,7 @@ Cut_GetLeafSpawnCoords: ; 8ca8e (23:4a8e)
|
||||
; 8cad3
|
||||
|
||||
Cut_Headbutt_GetPixelFacing: ; 8cad3 (23:4ad3)
|
||||
ld a, [PlayerDirection]
|
||||
ld a, [wPlayerDirection]
|
||||
and %00001100
|
||||
srl a
|
||||
ld e, a
|
||||
@@ -321,10 +321,10 @@ Cut_Headbutt_GetPixelFacing: ; 8cad3 (23:4ad3)
|
||||
|
||||
FlyFromAnim: ; 8caed
|
||||
call DelayFrame
|
||||
ld a, [VramState]
|
||||
ld a, [wVramState]
|
||||
push af
|
||||
xor a
|
||||
ld [VramState], a
|
||||
ld [wVramState], a
|
||||
call FlyFunction_InitGFX
|
||||
depixel 10, 10, 4, 0
|
||||
ld a, SPRITE_ANIM_INDEX_RED_WALK
|
||||
@@ -350,16 +350,16 @@ FlyFromAnim: ; 8caed
|
||||
|
||||
.exit
|
||||
pop af
|
||||
ld [VramState], a
|
||||
ld [wVramState], a
|
||||
ret
|
||||
; 8cb33
|
||||
|
||||
FlyToAnim: ; 8cb33
|
||||
call DelayFrame
|
||||
ld a, [VramState]
|
||||
ld a, [wVramState]
|
||||
push af
|
||||
xor a
|
||||
ld [VramState], a
|
||||
ld [wVramState], a
|
||||
call FlyFunction_InitGFX
|
||||
depixel 31, 10, 4, 0
|
||||
ld a, SPRITE_ANIM_INDEX_RED_WALK
|
||||
@@ -388,12 +388,12 @@ FlyToAnim: ; 8cb33
|
||||
|
||||
.exit
|
||||
pop af
|
||||
ld [VramState], a
|
||||
ld [wVramState], a
|
||||
call .RestorePlayerSprite_DespawnLeaves
|
||||
ret
|
||||
|
||||
.RestorePlayerSprite_DespawnLeaves: ; 8cb82 (23:4b82)
|
||||
ld hl, Sprite01TileID
|
||||
ld hl, wSprite01TileID
|
||||
xor a
|
||||
ld c, 4
|
||||
.OAMloop
|
||||
@@ -404,8 +404,8 @@ endr
|
||||
inc a
|
||||
dec c
|
||||
jr nz, .OAMloop
|
||||
ld hl, Sprite05
|
||||
ld bc, SpritesEnd - Sprite05
|
||||
ld hl, wSprite05
|
||||
ld bc, wSpritesEnd - wSprite05
|
||||
xor a
|
||||
call ByteFill
|
||||
ret
|
||||
@@ -416,8 +416,8 @@ FlyFunction_InitGFX: ; 8cb9b (23:4b9b)
|
||||
ld hl, vTiles1 tile $00
|
||||
lb bc, BANK(CutGrassGFX), 4
|
||||
call Request2bpp
|
||||
ld a, [CurPartyMon]
|
||||
ld hl, PartySpecies
|
||||
ld a, [wCurPartyMon]
|
||||
ld hl, wPartySpecies
|
||||
ld e, a
|
||||
ld d, 0
|
||||
add hl, de
|
||||
|
||||
@@ -79,7 +79,7 @@ rept 4
|
||||
add hl, de
|
||||
endr
|
||||
|
||||
ld a, [TimeOfDay]
|
||||
ld a, [wTimeOfDay]
|
||||
maskbits NUM_DAYTIMES
|
||||
cp NITE_F
|
||||
jr c, .time_species
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user