From 242b2e05cf30bc47a53167baf6bd3134d1f47d18 Mon Sep 17 00:00:00 2001 From: SatoMew Date: Sun, 29 Nov 2020 20:17:29 +0000 Subject: Label and document hFFD7 more accurately --- engine/battle/core.asm | 6 +++--- engine/battle/init_battle_variables.asm | 2 +- engine/menus/league_pc.asm | 6 +++--- engine/menus/pokedex.asm | 6 +++--- engine/menus/save.asm | 4 ++-- engine/menus/start_sub_menus.asm | 6 +++--- engine/movie/evolution.asm | 2 +- engine/movie/hall_of_fame.asm | 2 +- engine/movie/oak_speech/oak_speech.asm | 2 +- engine/movie/title.asm | 2 +- engine/overworld/tilesets.asm | 2 +- engine/overworld/update_map.asm | 6 +++--- engine/pokemon/evos_moves.asm | 4 ++-- engine/pokemon/status_screen.asm | 12 ++++++------ 14 files changed, 31 insertions(+), 31 deletions(-) (limited to 'engine') diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 5ea60cb4..7957c552 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -51,7 +51,7 @@ SlidePlayerAndEnemySilhouettesOnScreen: ldh [hWY], a ldh [rWY], a xor a - ldh [hTilesetType], a + ldh [hTileAnimations], a ldh [hSCY], a dec a ld [wUpdateSpritesEnabled], a @@ -6275,7 +6275,7 @@ DoBattleTransitionAndInitBattleVariables: ldh [hAutoBGTransferEnabled], a ldh [hWY], a ldh [rWY], a - ldh [hTilesetType], a + ldh [hTileAnimations], a ld hl, wPlayerStatsToDouble ld [hli], a ld [hli], a @@ -6866,7 +6866,7 @@ _InitBattleCommon: pop af ld [wMapPalOffset], a ld a, [wSavedTilesetType] - ldh [hTilesetType], a + ldh [hTileAnimations], a scf ret .emptyString diff --git a/engine/battle/init_battle_variables.asm b/engine/battle/init_battle_variables.asm index 0d403b55..703f5f07 100644 --- a/engine/battle/init_battle_variables.asm +++ b/engine/battle/init_battle_variables.asm @@ -1,5 +1,5 @@ InitBattleVariables: - ldh a, [hTilesetType] + ldh a, [hTileAnimations] ld [wSavedTilesetType], a xor a ld [wActionResultOrTookBattleTurn], a diff --git a/engine/menus/league_pc.asm b/engine/menus/league_pc.asm index f2107c49..533454ad 100644 --- a/engine/menus/league_pc.asm +++ b/engine/menus/league_pc.asm @@ -6,10 +6,10 @@ PKMNLeaguePC: push hl ld a, [wUpdateSpritesEnabled] push af - ldh a, [hTilesetType] + ldh a, [hTileAnimations] push af xor a - ldh [hTilesetType], a + ldh [hTileAnimations], a ld [wSpriteFlipped], a ld [wUpdateSpritesEnabled], a ld [wHoFTeamIndex2], a @@ -40,7 +40,7 @@ PKMNLeaguePC: jr nz, .loop .doneShowingTeams pop af - ldh [hTilesetType], a + ldh [hTileAnimations], a pop af ld [wUpdateSpritesEnabled], a pop hl diff --git a/engine/menus/pokedex.asm b/engine/menus/pokedex.asm index 5660ecfb..2af8d714 100644 --- a/engine/menus/pokedex.asm +++ b/engine/menus/pokedex.asm @@ -410,10 +410,10 @@ ShowPokedexDataInternal: call RunPaletteCommand pop af ld [wd11e], a - ldh a, [hTilesetType] + ldh a, [hTileAnimations] push af xor a - ldh [hTilesetType], a + ldh [hTileAnimations], a hlcoord 0, 0 ld de, 1 @@ -577,7 +577,7 @@ ShowPokedexDataInternal: and A_BUTTON | B_BUTTON jr z, .waitForButtonPress pop af - ldh [hTilesetType], a + ldh [hTileAnimations], a call GBPalWhiteOut call ClearScreen call RunDefaultPaletteCommand diff --git a/engine/menus/save.asm b/engine/menus/save.asm index 45fed8a6..72c33d8e 100644 --- a/engine/menus/save.asm +++ b/engine/menus/save.asm @@ -70,7 +70,7 @@ LoadSAV0: ld bc, wSpriteDataEnd - wSpriteDataStart call CopyData ld a, [sTilesetType] - ldh [hTilesetType], a + ldh [hTileAnimations], a ld hl, sCurBoxData ld de, wBoxDataStart ld bc, wBoxDataEnd - wBoxDataStart @@ -217,7 +217,7 @@ SaveSAVtoSRAM0: ld de, sCurBoxData ld bc, wBoxDataEnd - wBoxDataStart call CopyData - ldh a, [hTilesetType] + ldh a, [hTileAnimations] ld [sTilesetType], a ld hl, sPlayerName ld bc, sMainDataCheckSum - sPlayerName diff --git a/engine/menus/start_sub_menus.asm b/engine/menus/start_sub_menus.asm index 6a98a10c..c0448121 100644 --- a/engine/menus/start_sub_menus.asm +++ b/engine/menus/start_sub_menus.asm @@ -454,10 +454,10 @@ StartMenu_TrainerInfo:: call GBPalWhiteOut call ClearScreen call UpdateSprites - ldh a, [hTilesetType] + ldh a, [hTileAnimations] push af xor a - ldh [hTilesetType], a + ldh [hTileAnimations], a call DrawTrainerInfo predef DrawBadges ; draw badges ld b, SET_PAL_TRAINER_CARD @@ -471,7 +471,7 @@ StartMenu_TrainerInfo:: call ReloadMapData call LoadGBPal pop af - ldh [hTilesetType], a + ldh [hTileAnimations], a jp RedisplayStartMenu ; loads tile patterns and draws everything except for gym leader faces / badges diff --git a/engine/movie/evolution.asm b/engine/movie/evolution.asm index cabe7254..77840556 100644 --- a/engine/movie/evolution.asm +++ b/engine/movie/evolution.asm @@ -19,7 +19,7 @@ EvolveMon: call Delay3 xor a ldh [hAutoBGTransferEnabled], a - ldh [hTilesetType], a + ldh [hTileAnimations], a ld a, [wEvoOldSpecies] ld [wWholeScreenPaletteMonSpecies], a ld c, 0 diff --git a/engine/movie/hall_of_fame.asm b/engine/movie/hall_of_fame.asm index a7d3ed40..d37d95f8 100644 --- a/engine/movie/hall_of_fame.asm +++ b/engine/movie/hall_of_fame.asm @@ -19,7 +19,7 @@ AnimateHallOfFame: call FillMemory xor a ld [wUpdateSpritesEnabled], a - ldh [hTilesetType], a + ldh [hTileAnimations], a ld [wSpriteFlipped], a ld [wLetterPrintingDelayFlags], a ; no delay ld [wHoFMonOrPlayer], a ; mon diff --git a/engine/movie/oak_speech/oak_speech.asm b/engine/movie/oak_speech/oak_speech.asm index 4b64f20d..93cdfaab 100644 --- a/engine/movie/oak_speech/oak_speech.asm +++ b/engine/movie/oak_speech/oak_speech.asm @@ -52,7 +52,7 @@ OakSpeech: ld [wDestinationMap], a call SpecialWarpIn xor a - ldh [hTilesetType], a + ldh [hTileAnimations], a ld a, [wd732] bit 1, a ; possibly a debug mode bit jp nz, .skipChoosingNames diff --git a/engine/movie/title.asm b/engine/movie/title.asm index ef015795..8f97f8fa 100644 --- a/engine/movie/title.asm +++ b/engine/movie/title.asm @@ -26,7 +26,7 @@ DisplayTitleScreen: ld a, $1 ldh [hAutoBGTransferEnabled], a xor a - ldh [hTilesetType], a + ldh [hTileAnimations], a ldh [hSCX], a ld a, $40 ldh [hSCY], a diff --git a/engine/overworld/tilesets.asm b/engine/overworld/tilesets.asm index f40cbbc2..fa5cf626 100644 --- a/engine/overworld/tilesets.asm +++ b/engine/overworld/tilesets.asm @@ -23,7 +23,7 @@ LoadTilesetHeader: dec c jr nz, .copyTilesetHeaderLoop ld a, [hl] - ldh [hTilesetType], a + ldh [hTileAnimations], a xor a ldh [hMovingBGTilesCounter1], a pop hl diff --git a/engine/overworld/update_map.asm b/engine/overworld/update_map.asm index 53a5592d..26334733 100644 --- a/engine/overworld/update_map.asm +++ b/engine/overworld/update_map.asm @@ -52,11 +52,11 @@ RedrawMapView: ret z ldh a, [hAutoBGTransferEnabled] push af - ldh a, [hTilesetType] + ldh a, [hTileAnimations] push af xor 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 RunDefaultPaletteCommand ld hl, wMapViewVRAMPointer @@ -112,7 +112,7 @@ RedrawMapView: dec c jr nz, .redrawRowLoop pop af - ldh [hTilesetType], a + ldh [hTileAnimations], a pop af ldh [hAutoBGTransferEnabled], a ret diff --git a/engine/pokemon/evos_moves.asm b/engine/pokemon/evos_moves.asm index ed44f9a6..21b1c9f4 100644 --- a/engine/pokemon/evos_moves.asm +++ b/engine/pokemon/evos_moves.asm @@ -11,7 +11,7 @@ TryEvolvingMon: ; 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 EvolutionAfterBattle: - ldh a, [hTilesetType] + ldh a, [hTileAnimations] push af xor a ld [wEvolutionOccurred], a @@ -245,7 +245,7 @@ Evolution_PartyMonLoop: ; loop over party mons pop bc pop hl pop af - ldh [hTilesetType], a + ldh [hTileAnimations], a ld a, [wLinkState] cp LINK_STATE_TRADING ret z diff --git a/engine/pokemon/status_screen.asm b/engine/pokemon/status_screen.asm index d4a4e59a..33fef9e4 100644 --- a/engine/pokemon/status_screen.asm +++ b/engine/pokemon/status_screen.asm @@ -101,10 +101,10 @@ StatusScreen: ld hl, vChars2 tile $72 lb bc, BANK(PTile), 1 call CopyVideoDataDouble ; bold P (for PP) - ldh a, [hTilesetType] + ldh a, [hTileAnimations] push af xor a - ldh [hTilesetType], a + ldh [hTileAnimations], a hlcoord 19, 1 lb bc, 6, 10 call DrawLineBox ; Draws the box around name, HP and status @@ -174,7 +174,7 @@ StatusScreen: call PlayCry ; play Pokémon cry call WaitForTextScrollButtonPress ; wait for button pop af - ldh [hTilesetType], a + ldh [hTileAnimations], a ret .GetStringPointer @@ -296,10 +296,10 @@ StatsText: next "SPECIAL@" StatusScreen2: - ldh a, [hTilesetType] + ldh a, [hTileAnimations] push af xor a - ldh [hTilesetType], a + ldh [hTileAnimations], a ldh [hAutoBGTransferEnabled], a ld bc, NUM_MOVES + 1 ld hl, wMoves @@ -429,7 +429,7 @@ StatusScreen2: call Delay3 call WaitForTextScrollButtonPress ; wait for button pop af - ldh [hTilesetType], a + ldh [hTileAnimations], a ld hl, wd72c res 1, [hl] ld a, $77 -- cgit v1.2.3 From 083cb38e33891d58158762ac2580bd3b62fcdaec Mon Sep 17 00:00:00 2001 From: SatoMew Date: Sun, 29 Nov 2020 21:28:38 +0000 Subject: Update related tile animation constants --- engine/battle/core.asm | 2 +- engine/battle/init_battle_variables.asm | 2 +- engine/menus/save.asm | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'engine') diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 7957c552..417516ae 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -6865,7 +6865,7 @@ _InitBattleCommon: ld [wLetterPrintingDelayFlags], a pop af ld [wMapPalOffset], a - ld a, [wSavedTilesetType] + ld a, [wSavedTileAnimations] ldh [hTileAnimations], a scf ret diff --git a/engine/battle/init_battle_variables.asm b/engine/battle/init_battle_variables.asm index 703f5f07..dd9f9714 100644 --- a/engine/battle/init_battle_variables.asm +++ b/engine/battle/init_battle_variables.asm @@ -1,6 +1,6 @@ InitBattleVariables: ldh a, [hTileAnimations] - ld [wSavedTilesetType], a + ld [wSavedTileAnimations], a xor a ld [wActionResultOrTookBattleTurn], a ld [wBattleResult], a diff --git a/engine/menus/save.asm b/engine/menus/save.asm index 72c33d8e..194fb810 100644 --- a/engine/menus/save.asm +++ b/engine/menus/save.asm @@ -69,7 +69,7 @@ LoadSAV0: ld de, wSpriteDataStart ld bc, wSpriteDataEnd - wSpriteDataStart call CopyData - ld a, [sTilesetType] + ld a, [sTileAnimations] ldh [hTileAnimations], a ld hl, sCurBoxData ld de, wBoxDataStart @@ -218,7 +218,7 @@ SaveSAVtoSRAM0: ld bc, wBoxDataEnd - wBoxDataStart call CopyData ldh a, [hTileAnimations] - ld [sTilesetType], a + ld [sTileAnimations], a ld hl, sPlayerName ld bc, sMainDataCheckSum - sPlayerName call SAVCheckSum -- cgit v1.2.3 From 5d9957293c28a4d1483a02d76020a895b23d36db Mon Sep 17 00:00:00 2001 From: SatoMew Date: Sun, 29 Nov 2020 22:47:51 +0000 Subject: Delete unnecessary comment --- engine/overworld/update_map.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engine') diff --git a/engine/overworld/update_map.asm b/engine/overworld/update_map.asm index 26334733..dbf28dae 100644 --- a/engine/overworld/update_map.asm +++ b/engine/overworld/update_map.asm @@ -56,7 +56,7 @@ RedrawMapView: push af xor a ldh [hAutoBGTransferEnabled], a - ldh [hTileAnimations], a ; no flower/water BG tile animations + ldh [hTileAnimations], a call LoadCurrentMapView call RunDefaultPaletteCommand ld hl, wMapViewVRAMPointer -- cgit v1.2.3