diff options
-rw-r--r-- | Puddles-that-splash-the-way-tall-grass-rustles.md | 65 |
1 files changed, 20 insertions, 45 deletions
diff --git a/Puddles-that-splash-the-way-tall-grass-rustles.md b/Puddles-that-splash-the-way-tall-grass-rustles.md index 1facb33..c3a2728 100644 --- a/Puddles-that-splash-the-way-tall-grass-rustles.md +++ b/Puddles-that-splash-the-way-tall-grass-rustles.md @@ -91,6 +91,8 @@ Create **gfx/overworld/puddle_splash.png**:  +This is supposed to look like water droplets. + Edit [constants/script_constants.asm](../blob/master/constants/script_constants.asm): ```diff @@ -154,6 +156,8 @@ Edit [gfx/emotes.asm](../blob/master/gfx/emotes.asm): ## 4. Define a map object for splashing +The puddle splash map object will be very similar to the rustling grass map object, so we can generally use it as a reference. + Edit [constants/map_object_constants.asm](../blob/master/constants/map_object_constants.asm): ```diff @@ -161,7 +165,6 @@ Edit [constants/map_object_constants.asm](../blob/master/constants/map_object_co const_def const SPRITEMOVEDATA_00 ; 00 ... - const SPRITEMOVEDATA_BOULDERDUST ; 22 const SPRITEMOVEDATA_GRASS ; 23 const SPRITEMOVEDATA_SWIM_WANDER ; 24 + const SPRITEMOVEDATA_PUDDLE @@ -171,7 +174,6 @@ Edit [constants/map_object_constants.asm](../blob/master/constants/map_object_co const_def const SPRITEMOVEFN_00 ; 00 ... - const SPRITEMOVEFN_BOULDERDUST ; 1a const SPRITEMOVEFN_GRASS ; 1b + const SPRITEMOVEFN_PUDDLE @@ -181,7 +183,6 @@ Edit [constants/map_object_constants.asm](../blob/master/constants/map_object_co const_def const OBJECT_ACTION_00 ; 00 ... - const OBJECT_ACTION_BOULDER_DUST ; 0e const OBJECT_ACTION_GRASS_SHAKE ; 0f const OBJECT_ACTION_SKYFALL ; 10 + const OBJECT_ACTION_PUDDLE_SPLASH @@ -190,8 +191,6 @@ Edit [constants/map_object_constants.asm](../blob/master/constants/map_object_co const_def const FACING_STEP_DOWN_0 ; 00 ... - const FACING_BOULDER_DUST_1 ; 1c - const FACING_BOULDER_DUST_2 ; 1d const FACING_GRASS_1 ; 1e const FACING_GRASS_2 ; 1f + const FACING_SPLASH_1 @@ -201,14 +200,6 @@ Edit [constants/map_object_constants.asm](../blob/master/constants/map_object_co Edit [data/sprites/map_objects.asm](../blob/master/data/sprites/map_objects.asm): ```diff - ; SPRITEMOVEDATA_BOULDERDUST - db SPRITEMOVEFN_BOULDERDUST ; movement function - db DOWN ; facing - db OBJECT_ACTION_BOULDER_DUST ; action - db WONT_DELETE | FIXED_FACING | SLIDING | EMOTE_OBJECT ; flags1 - db LOW_PRIORITY ; flags2 - db 0 ; palette flags - ; SPRITEMOVEDATA_GRASS db SPRITEMOVEFN_GRASS ; movement function db DOWN ; facing @@ -244,18 +235,17 @@ Edit [data/sprites/map_objects.asm](../blob/master/data/sprites/map_objects.asm) Edit [engine/overworld/map_objects.asm](../blob/master/engine/overworld/map_objects.asm): ```diff -MapObjectMovementPattern: - ... - -.Pointers: -; entries correspond to SPRITEMOVEFN_* constants - dw .Null_00 ; 00 - ... - dw .MovementBoulderDust ; 1a - dw .MovementShakingGrass ; 1b - dw .MovementSplashingPuddle - -... + MapObjectMovementPattern: + ... + + .Pointers: + ; entries correspond to SPRITEMOVEFN_* constants + dw .Null_00 ; 00 + ... + dw .MovementShakingGrass ; 1b ++ dw .MovementSplashingPuddle + + ... .MovementShakingGrass: call EndSpriteMovement @@ -275,7 +265,7 @@ MapObjectMovementPattern: add hl, bc ld [hl], STEP_TYPE_TRACKING_OBJECT ret - ++ +.MovementSplashingPuddle: + call EndSpriteMovement + call ._MovementShadow_Grass_Emote_BoulderDust @@ -292,7 +282,6 @@ Edit [engine/overworld/map_object_action.asm](../blob/master/engine/overworld/ma ; entries correspond to OBJECT_ACTION_* constants dw SetFacingStanding, SetFacingStanding ... - dw SetFacingBoulderDust, SetFacingStanding dw SetFacingGrassShake, SetFacingStanding dw SetFacingSkyfall, SetFacingCurrent + dw SetFacingPuddleSplash, SetFacingStanding @@ -325,7 +314,7 @@ Edit [engine/overworld/map_object_action.asm](../blob/master/engine/overworld/ma + and 4 + ld a, FACING_SPLASH_1 + jr z, .ok -+ inc a ; FACING_GRASS_2 ++ inc a ; FACING_SPLASH_2 + +.ok + ld [hl], a @@ -339,8 +328,6 @@ Finally, edit [data/sprites/facings.asm](../blob/master/data/sprites/facings.asm ; entries correspond to FACING_* constants dw FacingStepDown0 ... - dw FacingBoulderDust1 - dw FacingBoulderDust2 dw FacingGrass1 dw FacingGrass2 + dw FacingSplash1 @@ -350,20 +337,6 @@ Finally, edit [data/sprites/facings.asm](../blob/master/data/sprites/facings.asm ... - FacingBoulderDust1: ; boulder dust 1 - db 4 ; # - db 0, 0, ABSOLUTE_TILE_ID, $fe - db 0, 8, ABSOLUTE_TILE_ID, $fe - db 8, 0, ABSOLUTE_TILE_ID, $fe - db 8, 8, ABSOLUTE_TILE_ID, $fe - - FacingBoulderDust2: ; boulder dust 2 - db 4 ; # - db 0, 0, ABSOLUTE_TILE_ID, $ff - db 0, 8, ABSOLUTE_TILE_ID, $ff - db 8, 0, ABSOLUTE_TILE_ID, $ff - db 8, 8, ABSOLUTE_TILE_ID, $ff - FacingGrass1: db 2 ; # db 8, 0, ABSOLUTE_TILE_ID, $fe @@ -524,15 +497,17 @@ Then save the changes. Polished Map will update the relevant tileset and map fil - [gfx/tilesets/johto_modern.png](../blob/master/gfx/tilesets/johto_modern.png) - [gfx/tilesets/johto_modern_palette_map.asm](../blob/master/gfx/tilesets/johto_modern_palette_map.asm) - [data/tilesets/johto_modern_metatiles.bin](../blob/master/data/tilesets/johto_modern_metatiles.bin) -- [maps/Route34.blk](../blob/master/maps/Route34.blk). +- [maps/Route34.blk](../blob/master/maps/Route34.blk) It will *not* update [data/tilesets/johto_modern_collision.asm](../blob/master/data/tilesets/johto_modern_collision.asm), so we'll edit that separately: ```diff + ... tilecoll WALL, FLOOR, FLOOR, FLOOR ; 5e - tilecoll WALL, WALL, WALL, WALL ; 5f + tilecoll PUDDLE, PUDDLE, PUDDLE, PUDDLE ; 5f tilecoll WATER, WATER, WALL, WALL ; 60 + ... ``` Now we can walk around Route 34, and see and hear puddles in action! |