Label remaining fields in Weather struct
This commit is contained in:
@@ -50,8 +50,8 @@ struct Weather
|
|||||||
u8 fadeScreenCounter;
|
u8 fadeScreenCounter;
|
||||||
bool8 readyForInit;
|
bool8 readyForInit;
|
||||||
u8 taskId;
|
u8 taskId;
|
||||||
u8 unknown_6CA;
|
u8 fadeInFirstFrame;
|
||||||
u8 unknown_6CB;
|
u8 fadeInTimer;
|
||||||
u16 initStep;
|
u16 initStep;
|
||||||
u16 finishStep;
|
u16 finishStep;
|
||||||
u8 currWeather;
|
u8 currWeather;
|
||||||
@@ -71,7 +71,7 @@ struct Weather
|
|||||||
u8 cloudSpritesCreated;
|
u8 cloudSpritesCreated;
|
||||||
// Snow
|
// Snow
|
||||||
u16 snowflakeVisibleCounter;
|
u16 snowflakeVisibleCounter;
|
||||||
u16 unknown_6E2;
|
u16 snowflakeTimer;
|
||||||
u8 snowflakeSpriteCount;
|
u8 snowflakeSpriteCount;
|
||||||
u8 targetSnowflakeSpriteCount;
|
u8 targetSnowflakeSpriteCount;
|
||||||
// Thunderstorm
|
// Thunderstorm
|
||||||
@@ -90,7 +90,7 @@ struct Weather
|
|||||||
u8 fogHSpritesCreated;
|
u8 fogHSpritesCreated;
|
||||||
// Ash
|
// Ash
|
||||||
u16 ashBaseSpritesX;
|
u16 ashBaseSpritesX;
|
||||||
u16 unknown_6FE;
|
u16 ashUnused;
|
||||||
u8 ashSpritesCreated;
|
u8 ashSpritesCreated;
|
||||||
// Sandstorm
|
// Sandstorm
|
||||||
u32 sandstormXOffset;
|
u32 sandstormXOffset;
|
||||||
@@ -152,7 +152,6 @@ void FadeScreen(u8 mode, s8 delay);
|
|||||||
bool8 IsWeatherNotFadingIn(void);
|
bool8 IsWeatherNotFadingIn(void);
|
||||||
void UpdateSpritePaletteWithWeather(u8 spritePaletteIndex);
|
void UpdateSpritePaletteWithWeather(u8 spritePaletteIndex);
|
||||||
void ApplyWeatherGammaShiftToPal(u8 paletteIndex);
|
void ApplyWeatherGammaShiftToPal(u8 paletteIndex);
|
||||||
u8 sub_80ABF20(void);
|
|
||||||
void LoadCustomWeatherSpritePalette(const u16 *palette);
|
void LoadCustomWeatherSpritePalette(const u16 *palette);
|
||||||
void ResetDroughtWeatherPaletteLoading(void);
|
void ResetDroughtWeatherPaletteLoading(void);
|
||||||
bool8 LoadDroughtWeatherPalettes(void);
|
bool8 LoadDroughtWeatherPalettes(void);
|
||||||
|
|||||||
+9
-8
@@ -365,8 +365,8 @@ static void UpdateWeatherGammaShift(void)
|
|||||||
|
|
||||||
static void FadeInScreenWithWeather(void)
|
static void FadeInScreenWithWeather(void)
|
||||||
{
|
{
|
||||||
if (++gWeatherPtr->unknown_6CB > 1)
|
if (++gWeatherPtr->fadeInTimer > 1)
|
||||||
gWeatherPtr->unknown_6CA = 0;
|
gWeatherPtr->fadeInFirstFrame = FALSE;
|
||||||
|
|
||||||
switch (gWeatherPtr->currWeather)
|
switch (gWeatherPtr->currWeather)
|
||||||
{
|
{
|
||||||
@@ -793,8 +793,8 @@ void FadeScreen(u8 mode, s8 delay)
|
|||||||
BeginNormalPaletteFade(PALETTES_ALL, delay, 16, 0, fadeColor);
|
BeginNormalPaletteFade(PALETTES_ALL, delay, 16, 0, fadeColor);
|
||||||
|
|
||||||
gWeatherPtr->palProcessingState = WEATHER_PAL_STATE_SCREEN_FADING_IN;
|
gWeatherPtr->palProcessingState = WEATHER_PAL_STATE_SCREEN_FADING_IN;
|
||||||
gWeatherPtr->unknown_6CA = 1;
|
gWeatherPtr->fadeInFirstFrame = TRUE;
|
||||||
gWeatherPtr->unknown_6CB = 0;
|
gWeatherPtr->fadeInTimer = 0;
|
||||||
Weather_SetBlendCoeffs(gWeatherPtr->currBlendEVA, gWeatherPtr->currBlendEVB);
|
Weather_SetBlendCoeffs(gWeatherPtr->currBlendEVA, gWeatherPtr->currBlendEVB);
|
||||||
gWeatherPtr->readyForInit = TRUE;
|
gWeatherPtr->readyForInit = TRUE;
|
||||||
}
|
}
|
||||||
@@ -813,7 +813,7 @@ void UpdateSpritePaletteWithWeather(u8 spritePaletteIndex)
|
|||||||
switch (gWeatherPtr->palProcessingState)
|
switch (gWeatherPtr->palProcessingState)
|
||||||
{
|
{
|
||||||
case WEATHER_PAL_STATE_SCREEN_FADING_IN:
|
case WEATHER_PAL_STATE_SCREEN_FADING_IN:
|
||||||
if (gWeatherPtr->unknown_6CA != 0)
|
if (gWeatherPtr->fadeInFirstFrame)
|
||||||
{
|
{
|
||||||
if (gWeatherPtr->currWeather == WEATHER_FOG_HORIZONTAL)
|
if (gWeatherPtr->currWeather == WEATHER_FOG_HORIZONTAL)
|
||||||
MarkFogSpritePalToLighten(paletteIndex);
|
MarkFogSpritePalToLighten(paletteIndex);
|
||||||
@@ -848,12 +848,13 @@ void ApplyWeatherGammaShiftToPal(u8 paletteIndex)
|
|||||||
ApplyGammaShift(paletteIndex, 1, gWeatherPtr->gammaIndex);
|
ApplyGammaShift(paletteIndex, 1, gWeatherPtr->gammaIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 sub_80ABF20(void)
|
// Unused
|
||||||
|
static bool8 IsFirstFrameOfWeatherFadeIn(void)
|
||||||
{
|
{
|
||||||
if (gWeatherPtr->palProcessingState == WEATHER_PAL_STATE_SCREEN_FADING_IN)
|
if (gWeatherPtr->palProcessingState == WEATHER_PAL_STATE_SCREEN_FADING_IN)
|
||||||
return gWeatherPtr->unknown_6CA;
|
return gWeatherPtr->fadeInFirstFrame;
|
||||||
else
|
else
|
||||||
return 0;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoadCustomWeatherSpritePalette(const u16 *palette)
|
void LoadCustomWeatherSpritePalette(const u16 *palette)
|
||||||
|
|||||||
@@ -941,13 +941,14 @@ static void InitSnowflakeSpriteMovement(struct Sprite *sprite)
|
|||||||
|
|
||||||
static void WaitSnowflakeSprite(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->invisible = FALSE;
|
||||||
sprite->callback = UpdateSnowflakeSprite;
|
sprite->callback = UpdateSnowflakeSprite;
|
||||||
sprite->pos1.y = 250 - (gSpriteCoordOffsetY + sprite->centerToCornerVecY);
|
sprite->pos1.y = 250 - (gSpriteCoordOffsetY + sprite->centerToCornerVecY);
|
||||||
sprite->tPosY = sprite->pos1.y * 128;
|
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->weatherGfxLoaded = FALSE;
|
||||||
gWeatherPtr->gammaTargetIndex = 0;
|
gWeatherPtr->gammaTargetIndex = 0;
|
||||||
gWeatherPtr->gammaStepDelay = 20;
|
gWeatherPtr->gammaStepDelay = 20;
|
||||||
gWeatherPtr->unknown_6FE = 20;
|
gWeatherPtr->ashUnused = 20; // Never read
|
||||||
if (!gWeatherPtr->ashSpritesCreated)
|
if (!gWeatherPtr->ashSpritesCreated)
|
||||||
{
|
{
|
||||||
Weather_SetBlendCoeffs(0, 16);
|
Weather_SetBlendCoeffs(0, 16);
|
||||||
|
|||||||
Reference in New Issue
Block a user