diff options
-rw-r--r-- | Fix-Snow-Weather.md | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/Fix-Snow-Weather.md b/Fix-Snow-Weather.md new file mode 100644 index 0000000..a479394 --- /dev/null +++ b/Fix-Snow-Weather.md @@ -0,0 +1,38 @@ +## Fix Snow Weather + +In vanilla emerald (and Fire Red!) the WEATHER_SNOW is broken and will only emit a few snowflakes before stopping. Let's fix it! + +For starters, open [src/field_weather_effects.c](../blob/master/src/field_weather_effect.c) + +### Increase the number of snowflakes (optional) +If you want to have the snow be heavier (or lighter), find `Snow_InitVars` and edit the line `gWeatherPtr->targetSnowflakeSpriteCount = 16;` to a value of your choosing. + +### Stop the snow from disappearing +Find the function `UpdateSnowflakeSprite`, and delete the following code (lines 974-998): +```c + y = (sprite->pos1.y + sprite->centerToCornerVecY + gSpriteCoordOffsetY) & 0xFF; + if (y > 163 && y < 171) + { + sprite->pos1.y = 250 - (gSpriteCoordOffsetY + sprite->centerToCornerVecY); + sprite->tPosY = sprite->pos1.y * 128; + sprite->tFallCounter = 0; + sprite->tFallDuration = 220; + } + else if (y > 242 && y < 250) + { + sprite->pos1.y = 163; + sprite->tPosY = sprite->pos1.y * 128; + sprite->tFallCounter = 0; + sprite->tFallDuration = 220; + sprite->invisible = TRUE; + sprite->callback = WaitSnowflakeSprite; + } + + if (++sprite->tFallCounter == sprite->tFallDuration) + { + InitSnowflakeSpriteMovement(sprite); + sprite->pos1.y = 250; + sprite->invisible = TRUE; + sprite->callback = WaitSnowflakeSprite; + } +```
\ No newline at end of file |