-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Fix Snow Weather
ghoulslash edited this page Jul 16, 2020
·
15 revisions
In vanilla emerald (and Fire Red!) the WEATHER_SNOW is broken and will only emit a few snowflakes before stopping. Let's fix it!
BUG: entering/closing a menu sometimes causes snow to isolate to specific x coordinates
For starters, open src/field_weather_effects.c
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.
Find the function UpdateSnowflakeSprite
, and delete the following code (lines 974-998):
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;
}