diff options
author | Thomas Winwood <twwinwood@gmail.com> | 2021-01-23 22:18:15 +0000 |
---|---|---|
committer | Thomas Winwood <twwinwood@gmail.com> | 2021-01-23 22:18:15 +0000 |
commit | f26e64f3ba2082593ece5e8aea29e19ba90a4bf0 (patch) | |
tree | 62d78c2f2e9011fe0524912a742d4b46e71b27f0 | |
parent | c94b91e1d6ba3377df28e9bad9be6a2efb1b241a (diff) |
Updated Fix Snow Weather (markdown)
-rw-r--r-- | Fix-Snow-Weather.md | 41 |
1 files changed, 14 insertions, 27 deletions
diff --git a/Fix-Snow-Weather.md b/Fix-Snow-Weather.md index 7a3ff30..3c5246a 100644 --- a/Fix-Snow-Weather.md +++ b/Fix-Snow-Weather.md @@ -10,33 +10,20 @@ For starters, open [src/field_weather_effect.c](../blob/master/src/field_weather 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; - } +Find the function `WaitSnowflakeSprite` and alter it as follows: +```diff + static void WaitSnowflakeSprite(struct Sprite *sprite) + { +- if (gWeatherPtr->unknown_6E2 > 18) ++ if (++gWeatherPtr->unknown_6E2 > 18) + { + sprite->invisible = FALSE; + sprite->callback = UpdateSnowflakeSprite; + sprite->pos1.y = 250 - (gSpriteCoordOffsetY + sprite->centerToCornerVecY); + sprite->tPosY = sprite->pos1.y * 128; + gWeatherPtr->unknown_6E2 = 0; + } + } ``` ### Fix snow spawning upon returning to the overworld |