mirror of
https://github.com/pret/pokered.git
synced 2024-10-22 22:55:31 +00:00
Label and document hFFD7 more accurately
This commit is contained in:
parent
6adbaefde1
commit
242b2e05cf
19 changed files with 45 additions and 45 deletions
|
@ -51,7 +51,7 @@ SlidePlayerAndEnemySilhouettesOnScreen:
|
||||||
ldh [hWY], a
|
ldh [hWY], a
|
||||||
ldh [rWY], a
|
ldh [rWY], a
|
||||||
xor a
|
xor a
|
||||||
ldh [hTilesetType], a
|
ldh [hTileAnimations], a
|
||||||
ldh [hSCY], a
|
ldh [hSCY], a
|
||||||
dec a
|
dec a
|
||||||
ld [wUpdateSpritesEnabled], a
|
ld [wUpdateSpritesEnabled], a
|
||||||
|
@ -6275,7 +6275,7 @@ DoBattleTransitionAndInitBattleVariables:
|
||||||
ldh [hAutoBGTransferEnabled], a
|
ldh [hAutoBGTransferEnabled], a
|
||||||
ldh [hWY], a
|
ldh [hWY], a
|
||||||
ldh [rWY], a
|
ldh [rWY], a
|
||||||
ldh [hTilesetType], a
|
ldh [hTileAnimations], a
|
||||||
ld hl, wPlayerStatsToDouble
|
ld hl, wPlayerStatsToDouble
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
|
@ -6866,7 +6866,7 @@ _InitBattleCommon:
|
||||||
pop af
|
pop af
|
||||||
ld [wMapPalOffset], a
|
ld [wMapPalOffset], a
|
||||||
ld a, [wSavedTilesetType]
|
ld a, [wSavedTilesetType]
|
||||||
ldh [hTilesetType], a
|
ldh [hTileAnimations], a
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
.emptyString
|
.emptyString
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
InitBattleVariables:
|
InitBattleVariables:
|
||||||
ldh a, [hTilesetType]
|
ldh a, [hTileAnimations]
|
||||||
ld [wSavedTilesetType], a
|
ld [wSavedTilesetType], a
|
||||||
xor a
|
xor a
|
||||||
ld [wActionResultOrTookBattleTurn], a
|
ld [wActionResultOrTookBattleTurn], a
|
||||||
|
|
|
@ -6,10 +6,10 @@ PKMNLeaguePC:
|
||||||
push hl
|
push hl
|
||||||
ld a, [wUpdateSpritesEnabled]
|
ld a, [wUpdateSpritesEnabled]
|
||||||
push af
|
push af
|
||||||
ldh a, [hTilesetType]
|
ldh a, [hTileAnimations]
|
||||||
push af
|
push af
|
||||||
xor a
|
xor a
|
||||||
ldh [hTilesetType], a
|
ldh [hTileAnimations], a
|
||||||
ld [wSpriteFlipped], a
|
ld [wSpriteFlipped], a
|
||||||
ld [wUpdateSpritesEnabled], a
|
ld [wUpdateSpritesEnabled], a
|
||||||
ld [wHoFTeamIndex2], a
|
ld [wHoFTeamIndex2], a
|
||||||
|
@ -40,7 +40,7 @@ PKMNLeaguePC:
|
||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
.doneShowingTeams
|
.doneShowingTeams
|
||||||
pop af
|
pop af
|
||||||
ldh [hTilesetType], a
|
ldh [hTileAnimations], a
|
||||||
pop af
|
pop af
|
||||||
ld [wUpdateSpritesEnabled], a
|
ld [wUpdateSpritesEnabled], a
|
||||||
pop hl
|
pop hl
|
||||||
|
|
|
@ -410,10 +410,10 @@ ShowPokedexDataInternal:
|
||||||
call RunPaletteCommand
|
call RunPaletteCommand
|
||||||
pop af
|
pop af
|
||||||
ld [wd11e], a
|
ld [wd11e], a
|
||||||
ldh a, [hTilesetType]
|
ldh a, [hTileAnimations]
|
||||||
push af
|
push af
|
||||||
xor a
|
xor a
|
||||||
ldh [hTilesetType], a
|
ldh [hTileAnimations], a
|
||||||
|
|
||||||
hlcoord 0, 0
|
hlcoord 0, 0
|
||||||
ld de, 1
|
ld de, 1
|
||||||
|
@ -577,7 +577,7 @@ ShowPokedexDataInternal:
|
||||||
and A_BUTTON | B_BUTTON
|
and A_BUTTON | B_BUTTON
|
||||||
jr z, .waitForButtonPress
|
jr z, .waitForButtonPress
|
||||||
pop af
|
pop af
|
||||||
ldh [hTilesetType], a
|
ldh [hTileAnimations], a
|
||||||
call GBPalWhiteOut
|
call GBPalWhiteOut
|
||||||
call ClearScreen
|
call ClearScreen
|
||||||
call RunDefaultPaletteCommand
|
call RunDefaultPaletteCommand
|
||||||
|
|
|
@ -70,7 +70,7 @@ LoadSAV0:
|
||||||
ld bc, wSpriteDataEnd - wSpriteDataStart
|
ld bc, wSpriteDataEnd - wSpriteDataStart
|
||||||
call CopyData
|
call CopyData
|
||||||
ld a, [sTilesetType]
|
ld a, [sTilesetType]
|
||||||
ldh [hTilesetType], a
|
ldh [hTileAnimations], a
|
||||||
ld hl, sCurBoxData
|
ld hl, sCurBoxData
|
||||||
ld de, wBoxDataStart
|
ld de, wBoxDataStart
|
||||||
ld bc, wBoxDataEnd - wBoxDataStart
|
ld bc, wBoxDataEnd - wBoxDataStart
|
||||||
|
@ -217,7 +217,7 @@ SaveSAVtoSRAM0:
|
||||||
ld de, sCurBoxData
|
ld de, sCurBoxData
|
||||||
ld bc, wBoxDataEnd - wBoxDataStart
|
ld bc, wBoxDataEnd - wBoxDataStart
|
||||||
call CopyData
|
call CopyData
|
||||||
ldh a, [hTilesetType]
|
ldh a, [hTileAnimations]
|
||||||
ld [sTilesetType], a
|
ld [sTilesetType], a
|
||||||
ld hl, sPlayerName
|
ld hl, sPlayerName
|
||||||
ld bc, sMainDataCheckSum - sPlayerName
|
ld bc, sMainDataCheckSum - sPlayerName
|
||||||
|
|
|
@ -454,10 +454,10 @@ StartMenu_TrainerInfo::
|
||||||
call GBPalWhiteOut
|
call GBPalWhiteOut
|
||||||
call ClearScreen
|
call ClearScreen
|
||||||
call UpdateSprites
|
call UpdateSprites
|
||||||
ldh a, [hTilesetType]
|
ldh a, [hTileAnimations]
|
||||||
push af
|
push af
|
||||||
xor a
|
xor a
|
||||||
ldh [hTilesetType], a
|
ldh [hTileAnimations], a
|
||||||
call DrawTrainerInfo
|
call DrawTrainerInfo
|
||||||
predef DrawBadges ; draw badges
|
predef DrawBadges ; draw badges
|
||||||
ld b, SET_PAL_TRAINER_CARD
|
ld b, SET_PAL_TRAINER_CARD
|
||||||
|
@ -471,7 +471,7 @@ StartMenu_TrainerInfo::
|
||||||
call ReloadMapData
|
call ReloadMapData
|
||||||
call LoadGBPal
|
call LoadGBPal
|
||||||
pop af
|
pop af
|
||||||
ldh [hTilesetType], a
|
ldh [hTileAnimations], a
|
||||||
jp RedisplayStartMenu
|
jp RedisplayStartMenu
|
||||||
|
|
||||||
; loads tile patterns and draws everything except for gym leader faces / badges
|
; loads tile patterns and draws everything except for gym leader faces / badges
|
||||||
|
|
|
@ -19,7 +19,7 @@ EvolveMon:
|
||||||
call Delay3
|
call Delay3
|
||||||
xor a
|
xor a
|
||||||
ldh [hAutoBGTransferEnabled], a
|
ldh [hAutoBGTransferEnabled], a
|
||||||
ldh [hTilesetType], a
|
ldh [hTileAnimations], a
|
||||||
ld a, [wEvoOldSpecies]
|
ld a, [wEvoOldSpecies]
|
||||||
ld [wWholeScreenPaletteMonSpecies], a
|
ld [wWholeScreenPaletteMonSpecies], a
|
||||||
ld c, 0
|
ld c, 0
|
||||||
|
|
|
@ -19,7 +19,7 @@ AnimateHallOfFame:
|
||||||
call FillMemory
|
call FillMemory
|
||||||
xor a
|
xor a
|
||||||
ld [wUpdateSpritesEnabled], a
|
ld [wUpdateSpritesEnabled], a
|
||||||
ldh [hTilesetType], a
|
ldh [hTileAnimations], a
|
||||||
ld [wSpriteFlipped], a
|
ld [wSpriteFlipped], a
|
||||||
ld [wLetterPrintingDelayFlags], a ; no delay
|
ld [wLetterPrintingDelayFlags], a ; no delay
|
||||||
ld [wHoFMonOrPlayer], a ; mon
|
ld [wHoFMonOrPlayer], a ; mon
|
||||||
|
|
|
@ -52,7 +52,7 @@ OakSpeech:
|
||||||
ld [wDestinationMap], a
|
ld [wDestinationMap], a
|
||||||
call SpecialWarpIn
|
call SpecialWarpIn
|
||||||
xor a
|
xor a
|
||||||
ldh [hTilesetType], a
|
ldh [hTileAnimations], a
|
||||||
ld a, [wd732]
|
ld a, [wd732]
|
||||||
bit 1, a ; possibly a debug mode bit
|
bit 1, a ; possibly a debug mode bit
|
||||||
jp nz, .skipChoosingNames
|
jp nz, .skipChoosingNames
|
||||||
|
|
|
@ -26,7 +26,7 @@ DisplayTitleScreen:
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ldh [hAutoBGTransferEnabled], a
|
ldh [hAutoBGTransferEnabled], a
|
||||||
xor a
|
xor a
|
||||||
ldh [hTilesetType], a
|
ldh [hTileAnimations], a
|
||||||
ldh [hSCX], a
|
ldh [hSCX], a
|
||||||
ld a, $40
|
ld a, $40
|
||||||
ldh [hSCY], a
|
ldh [hSCY], a
|
||||||
|
|
|
@ -23,7 +23,7 @@ LoadTilesetHeader:
|
||||||
dec c
|
dec c
|
||||||
jr nz, .copyTilesetHeaderLoop
|
jr nz, .copyTilesetHeaderLoop
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ldh [hTilesetType], a
|
ldh [hTileAnimations], a
|
||||||
xor a
|
xor a
|
||||||
ldh [hMovingBGTilesCounter1], a
|
ldh [hMovingBGTilesCounter1], a
|
||||||
pop hl
|
pop hl
|
||||||
|
|
|
@ -52,11 +52,11 @@ RedrawMapView:
|
||||||
ret z
|
ret z
|
||||||
ldh a, [hAutoBGTransferEnabled]
|
ldh a, [hAutoBGTransferEnabled]
|
||||||
push af
|
push af
|
||||||
ldh a, [hTilesetType]
|
ldh a, [hTileAnimations]
|
||||||
push af
|
push af
|
||||||
xor a
|
xor a
|
||||||
ldh [hAutoBGTransferEnabled], a
|
ldh [hAutoBGTransferEnabled], a
|
||||||
ldh [hTilesetType], a ; no flower/water BG tile animations
|
ldh [hTileAnimations], a ; no flower/water BG tile animations
|
||||||
call LoadCurrentMapView
|
call LoadCurrentMapView
|
||||||
call RunDefaultPaletteCommand
|
call RunDefaultPaletteCommand
|
||||||
ld hl, wMapViewVRAMPointer
|
ld hl, wMapViewVRAMPointer
|
||||||
|
@ -112,7 +112,7 @@ RedrawMapView:
|
||||||
dec c
|
dec c
|
||||||
jr nz, .redrawRowLoop
|
jr nz, .redrawRowLoop
|
||||||
pop af
|
pop af
|
||||||
ldh [hTilesetType], a
|
ldh [hTileAnimations], a
|
||||||
pop af
|
pop af
|
||||||
ldh [hAutoBGTransferEnabled], a
|
ldh [hAutoBGTransferEnabled], a
|
||||||
ret
|
ret
|
||||||
|
|
|
@ -11,7 +11,7 @@ TryEvolvingMon:
|
||||||
; this is only called after battle
|
; this is only called after battle
|
||||||
; it is supposed to do level up evolutions, though there is a bug that allows item evolutions to occur
|
; it is supposed to do level up evolutions, though there is a bug that allows item evolutions to occur
|
||||||
EvolutionAfterBattle:
|
EvolutionAfterBattle:
|
||||||
ldh a, [hTilesetType]
|
ldh a, [hTileAnimations]
|
||||||
push af
|
push af
|
||||||
xor a
|
xor a
|
||||||
ld [wEvolutionOccurred], a
|
ld [wEvolutionOccurred], a
|
||||||
|
@ -245,7 +245,7 @@ Evolution_PartyMonLoop: ; loop over party mons
|
||||||
pop bc
|
pop bc
|
||||||
pop hl
|
pop hl
|
||||||
pop af
|
pop af
|
||||||
ldh [hTilesetType], a
|
ldh [hTileAnimations], a
|
||||||
ld a, [wLinkState]
|
ld a, [wLinkState]
|
||||||
cp LINK_STATE_TRADING
|
cp LINK_STATE_TRADING
|
||||||
ret z
|
ret z
|
||||||
|
|
|
@ -101,10 +101,10 @@ StatusScreen:
|
||||||
ld hl, vChars2 tile $72
|
ld hl, vChars2 tile $72
|
||||||
lb bc, BANK(PTile), 1
|
lb bc, BANK(PTile), 1
|
||||||
call CopyVideoDataDouble ; bold P (for PP)
|
call CopyVideoDataDouble ; bold P (for PP)
|
||||||
ldh a, [hTilesetType]
|
ldh a, [hTileAnimations]
|
||||||
push af
|
push af
|
||||||
xor a
|
xor a
|
||||||
ldh [hTilesetType], a
|
ldh [hTileAnimations], a
|
||||||
hlcoord 19, 1
|
hlcoord 19, 1
|
||||||
lb bc, 6, 10
|
lb bc, 6, 10
|
||||||
call DrawLineBox ; Draws the box around name, HP and status
|
call DrawLineBox ; Draws the box around name, HP and status
|
||||||
|
@ -174,7 +174,7 @@ StatusScreen:
|
||||||
call PlayCry ; play Pokémon cry
|
call PlayCry ; play Pokémon cry
|
||||||
call WaitForTextScrollButtonPress ; wait for button
|
call WaitForTextScrollButtonPress ; wait for button
|
||||||
pop af
|
pop af
|
||||||
ldh [hTilesetType], a
|
ldh [hTileAnimations], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.GetStringPointer
|
.GetStringPointer
|
||||||
|
@ -296,10 +296,10 @@ StatsText:
|
||||||
next "SPECIAL@"
|
next "SPECIAL@"
|
||||||
|
|
||||||
StatusScreen2:
|
StatusScreen2:
|
||||||
ldh a, [hTilesetType]
|
ldh a, [hTileAnimations]
|
||||||
push af
|
push af
|
||||||
xor a
|
xor a
|
||||||
ldh [hTilesetType], a
|
ldh [hTileAnimations], a
|
||||||
ldh [hAutoBGTransferEnabled], a
|
ldh [hAutoBGTransferEnabled], a
|
||||||
ld bc, NUM_MOVES + 1
|
ld bc, NUM_MOVES + 1
|
||||||
ld hl, wMoves
|
ld hl, wMoves
|
||||||
|
@ -429,7 +429,7 @@ StatusScreen2:
|
||||||
call Delay3
|
call Delay3
|
||||||
call WaitForTextScrollButtonPress ; wait for button
|
call WaitForTextScrollButtonPress ; wait for button
|
||||||
pop af
|
pop af
|
||||||
ldh [hTilesetType], a
|
ldh [hTileAnimations], a
|
||||||
ld hl, wd72c
|
ld hl, wd72c
|
||||||
res 1, [hl]
|
res 1, [hl]
|
||||||
ld a, $77
|
ld a, $77
|
||||||
|
|
|
@ -65,7 +65,7 @@ rLCDC_DEFAULT EQU %11100011
|
||||||
call WriteDMACodeToHRAM
|
call WriteDMACodeToHRAM
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
ldh [hTilesetType], a
|
ldh [hTileAnimations], a
|
||||||
ldh [rSTAT], a
|
ldh [rSTAT], a
|
||||||
ldh [hSCX], a
|
ldh [hSCX], a
|
||||||
ldh [hSCY], a
|
ldh [hSCY], a
|
||||||
|
|
|
@ -813,7 +813,7 @@ LoadPlayerSpriteGraphics::
|
||||||
dec a
|
dec a
|
||||||
jr z, .ridingBike
|
jr z, .ridingBike
|
||||||
|
|
||||||
ldh a, [hTilesetType]
|
ldh a, [hTileAnimations]
|
||||||
and a
|
and a
|
||||||
jr nz, .determineGraphics
|
jr nz, .determineGraphics
|
||||||
jr .startWalking
|
jr .startWalking
|
||||||
|
|
|
@ -175,10 +175,10 @@ GetCryData::
|
||||||
ret
|
ret
|
||||||
|
|
||||||
DisplayPartyMenu::
|
DisplayPartyMenu::
|
||||||
ldh a, [hTilesetType]
|
ldh a, [hTileAnimations]
|
||||||
push af
|
push af
|
||||||
xor a
|
xor a
|
||||||
ldh [hTilesetType], a
|
ldh [hTileAnimations], a
|
||||||
call GBPalWhiteOutWithDelay3
|
call GBPalWhiteOutWithDelay3
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
call PartyMenuInit
|
call PartyMenuInit
|
||||||
|
@ -186,10 +186,10 @@ DisplayPartyMenu::
|
||||||
jp HandlePartyMenuInput
|
jp HandlePartyMenuInput
|
||||||
|
|
||||||
GoBackToPartyMenu::
|
GoBackToPartyMenu::
|
||||||
ldh a, [hTilesetType]
|
ldh a, [hTileAnimations]
|
||||||
push af
|
push af
|
||||||
xor a
|
xor a
|
||||||
ldh [hTilesetType], a
|
ldh [hTileAnimations], a
|
||||||
call PartyMenuInit
|
call PartyMenuInit
|
||||||
call RedrawPartyMenu
|
call RedrawPartyMenu
|
||||||
jp HandlePartyMenuInput
|
jp HandlePartyMenuInput
|
||||||
|
@ -251,7 +251,7 @@ HandlePartyMenuInput::
|
||||||
and a
|
and a
|
||||||
jp nz, .swappingPokemon
|
jp nz, .swappingPokemon
|
||||||
pop af
|
pop af
|
||||||
ldh [hTilesetType], a
|
ldh [hTileAnimations], a
|
||||||
bit 1, b
|
bit 1, b
|
||||||
jr nz, .noPokemonChosen
|
jr nz, .noPokemonChosen
|
||||||
ld a, [wPartyCount]
|
ld a, [wPartyCount]
|
||||||
|
|
|
@ -379,7 +379,7 @@ UpdateMovingBgTiles::
|
||||||
; Animate water and flower
|
; Animate water and flower
|
||||||
; tiles in the overworld.
|
; tiles in the overworld.
|
||||||
|
|
||||||
ldh a, [hTilesetType]
|
ldh a, [hTileAnimations]
|
||||||
and a
|
and a
|
||||||
ret z ; no animations if indoors (or if a menu set this to 0)
|
ret z ; no animations if indoors (or if a menu set this to 0)
|
||||||
|
|
||||||
|
@ -417,7 +417,7 @@ UpdateMovingBgTiles::
|
||||||
dec c
|
dec c
|
||||||
jr nz, .left
|
jr nz, .left
|
||||||
.done
|
.done
|
||||||
ldh a, [hTilesetType]
|
ldh a, [hTileAnimations]
|
||||||
rrca
|
rrca
|
||||||
ret nc
|
ret nc
|
||||||
; if in a cave, no flower animations
|
; if in a cave, no flower animations
|
||||||
|
|
10
hram.asm
10
hram.asm
|
@ -277,11 +277,11 @@ hFrameCounter:: db ; decremented every V-blank (used for delays)
|
||||||
; you can detect that the V-blank handler has run since then.
|
; you can detect that the V-blank handler has run since then.
|
||||||
hVBlankOccurred:: db
|
hVBlankOccurred:: db
|
||||||
|
|
||||||
; 00 = indoor
|
; Controls whether flower and water tiles are animated.
|
||||||
; 01 = cave
|
; 00 = flowers and water are static (breaks Surf)
|
||||||
; 02 = outdoor
|
; 01 = flowers are static, water is animated
|
||||||
; this is often set to 00 in order to turn off water and flower BG tile animations
|
; 02 = flowers and water are animated
|
||||||
hTilesetType:: db
|
hTileAnimations:: db
|
||||||
|
|
||||||
hMovingBGTilesCounter1:: db
|
hMovingBGTilesCounter1:: db
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue