diff options
-rw-r--r-- | Puddles-that-splash-when-you-walk.md | 77 |
1 files changed, 48 insertions, 29 deletions
diff --git a/Puddles-that-splash-when-you-walk.md b/Puddles-that-splash-when-you-walk.md index fdd0a4d..9bc5d6c 100644 --- a/Puddles-that-splash-when-you-walk.md +++ b/Puddles-that-splash-when-you-walk.md @@ -93,7 +93,25 @@ 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): +Edit [gfx/emotes.asm](../blob/master/gfx/emotes.asm): + +```diff + ShockEmote: INCBIN "gfx/emotes/shock.2bpp" + QuestionEmote: INCBIN "gfx/emotes/question.2bpp" + HappyEmote: INCBIN "gfx/emotes/happy.2bpp" + SadEmote: INCBIN "gfx/emotes/sad.2bpp" + HeartEmote: INCBIN "gfx/emotes/heart.2bpp" + BoltEmote: INCBIN "gfx/emotes/bolt.2bpp" + SleepEmote: INCBIN "gfx/emotes/sleep.2bpp" + FishEmote: INCBIN "gfx/emotes/fish.2bpp" + JumpShadowGFX: INCBIN "gfx/overworld/shadow.2bpp" + FishingRodGFX: INCBIN "gfx/overworld/fishing_rod.2bpp" + BoulderDustGFX: INCBIN "gfx/overworld/boulder_dust.2bpp" + GrassRustleGFX: INCBIN "gfx/overworld/grass_rustle.2bpp" ++PuddleSplashGFX: INCBIN "gfx/overworld/puddle_splash.2bpp" +``` + +Then edit [constants/script_constants.asm](../blob/master/constants/script_constants.asm): ```diff ; showemote arguments @@ -115,42 +133,40 @@ Edit [constants/script_constants.asm](../blob/master/constants/script_constants. EMOTE_MEM EQU -1 ``` -Edit [data/sprites/emotes.asm](../blob/master/data/sprites/emotes.asm): +And edit [data/sprites/emotes.asm](../blob/master/data/sprites/emotes.asm): ```diff + emote: MACRO + ; graphics pointer, length, starting tile + dw \1 + db \2 tiles, BANK(\1) + dw vTiles0 tile \3 + ENDM + Emotes: ; entries correspond to EMOTE_* constants - emote ShockEmote, 4, $78 - emote QuestionEmote, 4, $78 - emote HappyEmote, 4, $78 - emote SadEmote, 4, $78 - emote HeartEmote, 4, $78 - emote BoltEmote, 4, $78 - emote SleepEmote, 4, $78 - emote FishEmote, 4, $78 - emote JumpShadowGFX, 1, $7c - emote FishingRodGFX, 2, $7c - emote BoulderDustGFX, 2, $7e - emote GrassRustleGFX, 1, $7e -+ emote PuddleSplashGFX, 1, $7f + emote ShockEmote, 4, $f8 + ... + emote GrassRustleGFX, 1, $fe ++ emote PuddleSplashGFX, 1, $ff ``` -Edit [gfx/emotes.asm](../blob/master/gfx/emotes.asm): +Be careful here! As of July 2018, pokecrystal mentions `vTiles0` in the `emote` macro, so the emotes' tile IDs range from $f8 to $ff. Older versions used `vTiles1` with tile IDs from $78 to $7f. If you have an older copy, then do this instead: ```diff - ShockEmote: INCBIN "gfx/emotes/shock.2bpp" - QuestionEmote: INCBIN "gfx/emotes/question.2bpp" - HappyEmote: INCBIN "gfx/emotes/happy.2bpp" - SadEmote: INCBIN "gfx/emotes/sad.2bpp" - HeartEmote: INCBIN "gfx/emotes/heart.2bpp" - BoltEmote: INCBIN "gfx/emotes/bolt.2bpp" - SleepEmote: INCBIN "gfx/emotes/sleep.2bpp" - FishEmote: INCBIN "gfx/emotes/fish.2bpp" - JumpShadowGFX: INCBIN "gfx/overworld/shadow.2bpp" - FishingRodGFX: INCBIN "gfx/overworld/fishing_rod.2bpp" - BoulderDustGFX: INCBIN "gfx/overworld/boulder_dust.2bpp" - GrassRustleGFX: INCBIN "gfx/overworld/grass_rustle.2bpp" -+PuddleSplashGFX: INCBIN "gfx/overworld/puddle_splash.2bpp" + emote: MACRO + ; graphics pointer, length, starting tile + dw \1 + db \2 tiles, BANK(\1) + dw vTiles1 tile \3 + ENDM + + Emotes: + ; entries correspond to EMOTE_* constants + emote ShockEmote, 4, $78 + ... + emote GrassRustleGFX, 1, $7e ++ emote PuddleSplashGFX, 1, $7f ``` @@ -384,6 +400,9 @@ Edit [engine/overworld/overworld.asm](../blob/master/engine/overworld/overworld. ret ``` +Outdoor maps will load `EMOTE_GRASS_RUSTLE` into tile $fe and `EMOTE_PUDDLE_SPLASH` into tile $ff; each of them only takes up one tile, so that's okay. Indoor maps will load `EMOTE_BOULDER_DUST` for Strength boulders, which is two tiles long, so it takes up both $fe and $ff. There are no maps with tall grass *and* Strength boulders, so this was never an issue. Now you'll also need to avoid putting Strength boulders on a map with puddles. + + ## 6. Show splash graphics and play sound for puddle tiles Edit [home/map_objects.asm](../blob/master/home/map_objects.asm): |