shithub: pokered

Download patch

ref: 3756ec6dd94daf1ea5826f9bd9e30e00087f242f
parent: 083cb38e33891d58158762ac2580bd3b62fcdaec
author: SatoMew <SatoMew@users.noreply.github.com>
date: Sun Nov 29 17:07:26 EST 2020

Improve new constants and comment based on feedback

--- a/constants/map_data_constants.asm
+++ b/constants/map_data_constants.asm
@@ -4,13 +4,13 @@
 
 ; connection directions
 	const_def
-	shift_const EAST  ; 1
-	shift_const WEST  ; 2
-	shift_const SOUTH ; 4
-	shift_const NORTH ; 8
+	shift_const EAST   ; 1
+	shift_const WEST   ; 2
+	shift_const SOUTH  ; 4
+	shift_const NORTH  ; 8
 
 ; flower and water tile animations
 	const_def
-	const STATIC_FLOWERS_WATER           ; 0
-	const STATIC_FLOWERS_ANIMATED_WATER  ; 1
-	const ANIMATED_FLOWERS_WATER         ; 2
+	const TILEANIM_NONE          ; 0
+	const TILEANIM_WATER         ; 1
+	const TILEANIM_WATER_FLOWER  ; 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, 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
+	tileset Overworld_Block,   Overworld_GFX,   Overworld_Coll,   $FF,$FF,$FF, $52, TILEANIM_WATER_FLOWER
+	tileset RedsHouse1_Block,  RedsHouse1_GFX,  RedsHouse1_Coll,  $FF,$FF,$FF, $FF, TILEANIM_NONE
+	tileset Mart_Block,        Mart_GFX,        Mart_Coll,        $18,$19,$1E, $FF, TILEANIM_NONE
+	tileset Forest_Block,      Forest_GFX,      Forest_Coll,      $FF,$FF,$FF, $20, TILEANIM_WATER
+	tileset RedsHouse2_Block,  RedsHouse2_GFX,  RedsHouse2_Coll,  $FF,$FF,$FF, $FF, TILEANIM_NONE
+	tileset Dojo_Block,        Dojo_GFX,        Dojo_Coll,        $3A,$FF,$FF, $FF, TILEANIM_WATER_FLOWER
+	tileset Pokecenter_Block,  Pokecenter_GFX,  Pokecenter_Coll,  $18,$19,$1E, $FF, TILEANIM_NONE
+	tileset Gym_Block,         Gym_GFX,         Gym_Coll,         $3A,$FF,$FF, $FF, TILEANIM_WATER_FLOWER
+	tileset House_Block,       House_GFX,       House_Coll,       $FF,$FF,$FF, $FF, TILEANIM_NONE
+	tileset ForestGate_Block,  ForestGate_GFX,  ForestGate_Coll,  $17,$32,$FF, $FF, TILEANIM_NONE
+	tileset Museum_Block,      Museum_GFX,      Museum_Coll,      $17,$32,$FF, $FF, TILEANIM_NONE
+	tileset Underground_Block, Underground_GFX, Underground_Coll, $FF,$FF,$FF, $FF, TILEANIM_NONE
+	tileset Gate_Block,        Gate_GFX,        Gate_Coll,        $17,$32,$FF, $FF, TILEANIM_NONE
+	tileset Ship_Block,        Ship_GFX,        Ship_Coll,        $FF,$FF,$FF, $FF, TILEANIM_WATER
+	tileset ShipPort_Block,    ShipPort_GFX,    ShipPort_Coll,    $FF,$FF,$FF, $FF, TILEANIM_WATER
+	tileset Cemetery_Block,    Cemetery_GFX,    Cemetery_Coll,    $12,$FF,$FF, $FF, TILEANIM_NONE
+	tileset Interior_Block,    Interior_GFX,    Interior_Coll,    $FF,$FF,$FF, $FF, TILEANIM_NONE
+	tileset Cavern_Block,      Cavern_GFX,      Cavern_Coll,      $FF,$FF,$FF, $FF, TILEANIM_WATER
+	tileset Lobby_Block,       Lobby_GFX,       Lobby_Coll,       $15,$36,$FF, $FF, TILEANIM_NONE
+	tileset Mansion_Block,     Mansion_GFX,     Mansion_Coll,     $FF,$FF,$FF, $FF, TILEANIM_NONE
+	tileset Lab_Block,         Lab_GFX,         Lab_Coll,         $FF,$FF,$FF, $FF, TILEANIM_NONE
+	tileset Club_Block,        Club_GFX,        Club_Coll,        $07,$17,$FF, $FF, TILEANIM_NONE
+	tileset Facility_Block,    Facility_GFX,    Facility_Coll,    $12,$FF,$FF, $FF, TILEANIM_WATER
+	tileset Plateau_Block,     Plateau_GFX,     Plateau_Coll,     $FF,$FF,$FF, $45, TILEANIM_WATER
--- a/hram.asm
+++ b/hram.asm
@@ -277,10 +277,10 @@
 ; you can detect that the V-blank handler has run since then.
 hVBlankOccurred:: db
 
-; Controls whether flower and water tiles are animated.
-; 00 = flowers and water are static (breaks Surf)
-; 01 = flowers are static, water is animated 
-; 02 = flowers and water are animated
+; Controls which tiles are animated.
+; 0 = no animations (breaks Surf)
+; 1 = water tile $14 is animated
+; 2 = water tile $14 and flower tile $03 are animated
 hTileAnimations:: db
 
 hMovingBGTilesCounter1:: db