ref: 083cb38e33891d58158762ac2580bd3b62fcdaec
parent: a7dca30971a049a525e33bc43eaf2b18ce899c5e
author: SatoMew <SatoMew@users.noreply.github.com>
date: Sun Nov 29 16:28:38 EST 2020
Update related tile animation constants
--- a/constants/map_data_constants.asm
+++ b/constants/map_data_constants.asm
@@ -9,8 +9,8 @@
shift_const SOUTH ; 4
shift_const NORTH ; 8
-; tileset environments
+; flower and water tile animations
const_def
- const INDOOR ; 0
- const CAVE ; 1
- const OUTDOOR ; 2
+ const STATIC_FLOWERS_WATER ; 0
+ const STATIC_FLOWERS_ANIMATED_WATER ; 1
+ const ANIMATED_FLOWERS_WATER ; 2
--- a/data/tilesets/tileset_headers.asm
+++ b/data/tilesets/tileset_headers.asm
@@ -8,27 +8,27 @@
Tilesets:
; block, gfx, coll, 3 counter tiles, grass tile, permission
- tileset Overworld_Block, Overworld_GFX, Overworld_Coll, $FF,$FF,$FF, $52, OUTDOOR
- tileset RedsHouse1_Block, RedsHouse1_GFX, RedsHouse1_Coll, $FF,$FF,$FF, $FF, INDOOR
- tileset Mart_Block, Mart_GFX, Mart_Coll, $18,$19,$1E, $FF, INDOOR
- tileset Forest_Block, Forest_GFX, Forest_Coll, $FF,$FF,$FF, $20, CAVE
- tileset RedsHouse2_Block, RedsHouse2_GFX, RedsHouse2_Coll, $FF,$FF,$FF, $FF, INDOOR
- tileset Dojo_Block, Dojo_GFX, Dojo_Coll, $3A,$FF,$FF, $FF, OUTDOOR
- tileset Pokecenter_Block, Pokecenter_GFX, Pokecenter_Coll, $18,$19,$1E, $FF, INDOOR
- tileset Gym_Block, Gym_GFX, Gym_Coll, $3A,$FF,$FF, $FF, OUTDOOR
- tileset House_Block, House_GFX, House_Coll, $FF,$FF,$FF, $FF, INDOOR
- tileset ForestGate_Block, ForestGate_GFX, ForestGate_Coll, $17,$32,$FF, $FF, INDOOR
- tileset Museum_Block, Museum_GFX, Museum_Coll, $17,$32,$FF, $FF, INDOOR
- tileset Underground_Block, Underground_GFX, Underground_Coll, $FF,$FF,$FF, $FF, INDOOR
- tileset Gate_Block, Gate_GFX, Gate_Coll, $17,$32,$FF, $FF, INDOOR
- tileset Ship_Block, Ship_GFX, Ship_Coll, $FF,$FF,$FF, $FF, CAVE
- tileset ShipPort_Block, ShipPort_GFX, ShipPort_Coll, $FF,$FF,$FF, $FF, CAVE
- tileset Cemetery_Block, Cemetery_GFX, Cemetery_Coll, $12,$FF,$FF, $FF, INDOOR
- tileset Interior_Block, Interior_GFX, Interior_Coll, $FF,$FF,$FF, $FF, INDOOR
- tileset Cavern_Block, Cavern_GFX, Cavern_Coll, $FF,$FF,$FF, $FF, CAVE
- tileset Lobby_Block, Lobby_GFX, Lobby_Coll, $15,$36,$FF, $FF, INDOOR
- tileset Mansion_Block, Mansion_GFX, Mansion_Coll, $FF,$FF,$FF, $FF, INDOOR
- tileset Lab_Block, Lab_GFX, Lab_Coll, $FF,$FF,$FF, $FF, INDOOR
- tileset Club_Block, Club_GFX, Club_Coll, $07,$17,$FF, $FF, INDOOR
- tileset Facility_Block, Facility_GFX, Facility_Coll, $12,$FF,$FF, $FF, CAVE
- tileset Plateau_Block, Plateau_GFX, Plateau_Coll, $FF,$FF,$FF, $45, CAVE
+ tileset Overworld_Block, Overworld_GFX, Overworld_Coll, $FF,$FF,$FF, $52, ANIMATED_FLOWERS_WATER
+ tileset RedsHouse1_Block, RedsHouse1_GFX, RedsHouse1_Coll, $FF,$FF,$FF, $FF, STATIC_FLOWERS_WATER
+ tileset Mart_Block, Mart_GFX, Mart_Coll, $18,$19,$1E, $FF, STATIC_FLOWERS_WATER
+ tileset Forest_Block, Forest_GFX, Forest_Coll, $FF,$FF,$FF, $20, STATIC_FLOWERS_ANIMATED_WATER
+ tileset RedsHouse2_Block, RedsHouse2_GFX, RedsHouse2_Coll, $FF,$FF,$FF, $FF, STATIC_FLOWERS_WATER
+ tileset Dojo_Block, Dojo_GFX, Dojo_Coll, $3A,$FF,$FF, $FF, ANIMATED_FLOWERS_WATER
+ tileset Pokecenter_Block, Pokecenter_GFX, Pokecenter_Coll, $18,$19,$1E, $FF, STATIC_FLOWERS_WATER
+ tileset Gym_Block, Gym_GFX, Gym_Coll, $3A,$FF,$FF, $FF, ANIMATED_FLOWERS_WATER
+ tileset House_Block, House_GFX, House_Coll, $FF,$FF,$FF, $FF, STATIC_FLOWERS_WATER
+ tileset ForestGate_Block, ForestGate_GFX, ForestGate_Coll, $17,$32,$FF, $FF, STATIC_FLOWERS_WATER
+ tileset Museum_Block, Museum_GFX, Museum_Coll, $17,$32,$FF, $FF, STATIC_FLOWERS_WATER
+ tileset Underground_Block, Underground_GFX, Underground_Coll, $FF,$FF,$FF, $FF, STATIC_FLOWERS_WATER
+ tileset Gate_Block, Gate_GFX, Gate_Coll, $17,$32,$FF, $FF, STATIC_FLOWERS_WATER
+ tileset Ship_Block, Ship_GFX, Ship_Coll, $FF,$FF,$FF, $FF, STATIC_FLOWERS_ANIMATED_WATER
+ tileset ShipPort_Block, ShipPort_GFX, ShipPort_Coll, $FF,$FF,$FF, $FF, STATIC_FLOWERS_ANIMATED_WATER
+ tileset Cemetery_Block, Cemetery_GFX, Cemetery_Coll, $12,$FF,$FF, $FF, STATIC_FLOWERS_WATER
+ tileset Interior_Block, Interior_GFX, Interior_Coll, $FF,$FF,$FF, $FF, STATIC_FLOWERS_WATER
+ tileset Cavern_Block, Cavern_GFX, Cavern_Coll, $FF,$FF,$FF, $FF, STATIC_FLOWERS_ANIMATED_WATER
+ tileset Lobby_Block, Lobby_GFX, Lobby_Coll, $15,$36,$FF, $FF, STATIC_FLOWERS_WATER
+ tileset Mansion_Block, Mansion_GFX, Mansion_Coll, $FF,$FF,$FF, $FF, STATIC_FLOWERS_WATER
+ tileset Lab_Block, Lab_GFX, Lab_Coll, $FF,$FF,$FF, $FF, STATIC_FLOWERS_WATER
+ tileset Club_Block, Club_GFX, Club_Coll, $07,$17,$FF, $FF, STATIC_FLOWERS_WATER
+ tileset Facility_Block, Facility_GFX, Facility_Coll, $12,$FF,$FF, $FF, STATIC_FLOWERS_ANIMATED_WATER
+ tileset Plateau_Block, Plateau_GFX, Plateau_Coll, $FF,$FF,$FF, $45, STATIC_FLOWERS_ANIMATED_WATER
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -6865,7 +6865,7 @@
ld [wLetterPrintingDelayFlags], a
pop af
ld [wMapPalOffset], a
- ld a, [wSavedTilesetType]
+ ld a, [wSavedTileAnimations]
ldh [hTileAnimations], a
scf
ret
--- 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
--- a/engine/menus/save.asm
+++ b/engine/menus/save.asm
@@ -69,7 +69,7 @@
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 @@
ld bc, wBoxDataEnd - wBoxDataStart
call CopyData
ldh a, [hTileAnimations]
- ld [sTilesetType], a
+ ld [sTileAnimations], a
ld hl, sPlayerName
ld bc, sMainDataCheckSum - sPlayerName
call SAVCheckSum
--- a/sram.asm
+++ b/sram.asm
@@ -17,7 +17,7 @@
sSpriteData:: ds wSpriteDataEnd - wSpriteDataStart
sPartyData:: ds wPartyDataEnd - wPartyDataStart
sCurBoxData:: ds wBoxDataEnd - wBoxDataStart
-sTilesetType:: ds 1
+sTileAnimations:: ds 1
sMainDataCheckSum:: ds 1
--- a/wram.asm
+++ b/wram.asm
@@ -2000,7 +2000,7 @@
ds 1
wMonHeaderEnd::
-wSavedTilesetType::
+wSavedTileAnimations::
; saved at the start of a battle and then written back at the end of the battle
ds 1