Label remaining fields in Weather struct
This commit is contained in:
@@ -365,8 +365,8 @@ static void UpdateWeatherGammaShift(void)
|
||||
|
||||
static void FadeInScreenWithWeather(void)
|
||||
{
|
||||
if (++gWeatherPtr->unknown_6CB > 1)
|
||||
gWeatherPtr->unknown_6CA = 0;
|
||||
if (++gWeatherPtr->fadeInTimer > 1)
|
||||
gWeatherPtr->fadeInFirstFrame = FALSE;
|
||||
|
||||
switch (gWeatherPtr->currWeather)
|
||||
{
|
||||
@@ -793,8 +793,8 @@ void FadeScreen(u8 mode, s8 delay)
|
||||
BeginNormalPaletteFade(PALETTES_ALL, delay, 16, 0, fadeColor);
|
||||
|
||||
gWeatherPtr->palProcessingState = WEATHER_PAL_STATE_SCREEN_FADING_IN;
|
||||
gWeatherPtr->unknown_6CA = 1;
|
||||
gWeatherPtr->unknown_6CB = 0;
|
||||
gWeatherPtr->fadeInFirstFrame = TRUE;
|
||||
gWeatherPtr->fadeInTimer = 0;
|
||||
Weather_SetBlendCoeffs(gWeatherPtr->currBlendEVA, gWeatherPtr->currBlendEVB);
|
||||
gWeatherPtr->readyForInit = TRUE;
|
||||
}
|
||||
@@ -813,7 +813,7 @@ void UpdateSpritePaletteWithWeather(u8 spritePaletteIndex)
|
||||
switch (gWeatherPtr->palProcessingState)
|
||||
{
|
||||
case WEATHER_PAL_STATE_SCREEN_FADING_IN:
|
||||
if (gWeatherPtr->unknown_6CA != 0)
|
||||
if (gWeatherPtr->fadeInFirstFrame)
|
||||
{
|
||||
if (gWeatherPtr->currWeather == WEATHER_FOG_HORIZONTAL)
|
||||
MarkFogSpritePalToLighten(paletteIndex);
|
||||
@@ -848,12 +848,13 @@ void ApplyWeatherGammaShiftToPal(u8 paletteIndex)
|
||||
ApplyGammaShift(paletteIndex, 1, gWeatherPtr->gammaIndex);
|
||||
}
|
||||
|
||||
u8 sub_80ABF20(void)
|
||||
// Unused
|
||||
static bool8 IsFirstFrameOfWeatherFadeIn(void)
|
||||
{
|
||||
if (gWeatherPtr->palProcessingState == WEATHER_PAL_STATE_SCREEN_FADING_IN)
|
||||
return gWeatherPtr->unknown_6CA;
|
||||
return gWeatherPtr->fadeInFirstFrame;
|
||||
else
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void LoadCustomWeatherSpritePalette(const u16 *palette)
|
||||
|
||||
@@ -941,13 +941,14 @@ static void InitSnowflakeSpriteMovement(struct Sprite *sprite)
|
||||
|
||||
static void WaitSnowflakeSprite(struct Sprite *sprite)
|
||||
{
|
||||
if (gWeatherPtr->unknown_6E2 > 18)
|
||||
// Timer is never incremented
|
||||
if (gWeatherPtr->snowflakeTimer > 18)
|
||||
{
|
||||
sprite->invisible = FALSE;
|
||||
sprite->callback = UpdateSnowflakeSprite;
|
||||
sprite->pos1.y = 250 - (gSpriteCoordOffsetY + sprite->centerToCornerVecY);
|
||||
sprite->tPosY = sprite->pos1.y * 128;
|
||||
gWeatherPtr->unknown_6E2 = 0;
|
||||
gWeatherPtr->snowflakeTimer = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1519,7 +1520,7 @@ void Ash_InitVars(void)
|
||||
gWeatherPtr->weatherGfxLoaded = FALSE;
|
||||
gWeatherPtr->gammaTargetIndex = 0;
|
||||
gWeatherPtr->gammaStepDelay = 20;
|
||||
gWeatherPtr->unknown_6FE = 20;
|
||||
gWeatherPtr->ashUnused = 20; // Never read
|
||||
if (!gWeatherPtr->ashSpritesCreated)
|
||||
{
|
||||
Weather_SetBlendCoeffs(0, 16);
|
||||
|
||||
Reference in New Issue
Block a user