Address review comments
This commit is contained in:
|
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 8.0 KiB |
+13
-18
@@ -31,11 +31,11 @@ struct Weather
|
|||||||
u8 gammaStepDelay;
|
u8 gammaStepDelay;
|
||||||
u8 gammaStepFrameCounter;
|
u8 gammaStepFrameCounter;
|
||||||
u16 fadeDestColor;
|
u16 fadeDestColor;
|
||||||
/*0x6C6*/ u8 palProcessingState;
|
u8 palProcessingState;
|
||||||
/*0x6C7*/ u8 fadeScreenCounter;
|
u8 fadeScreenCounter;
|
||||||
/*0x6C8*/ bool8 readyForInit;
|
bool8 readyForInit;
|
||||||
/*0x6C9*/ u8 taskId;
|
u8 taskId;
|
||||||
/*0x6CA*/ u8 unknown_6CA;
|
u8 unknown_6CA;
|
||||||
u8 unknown_6CB;
|
u8 unknown_6CB;
|
||||||
u16 initStep;
|
u16 initStep;
|
||||||
u16 finishStep;
|
u16 finishStep;
|
||||||
@@ -52,8 +52,7 @@ struct Weather
|
|||||||
u8 rainSpriteVisibleDelay;
|
u8 rainSpriteVisibleDelay;
|
||||||
u8 isDownpour;
|
u8 isDownpour;
|
||||||
u8 rainStrength;
|
u8 rainStrength;
|
||||||
/*0x6DE*/ u8 cloudSpritesCreated;
|
bool8 cloudSpritesCreated;
|
||||||
u8 filler_6DF[1];
|
|
||||||
u16 snowflakeVisibleCounter;
|
u16 snowflakeVisibleCounter;
|
||||||
u16 unknown_6E2;
|
u16 unknown_6E2;
|
||||||
u8 snowflakeSpriteCount;
|
u8 snowflakeSpriteCount;
|
||||||
@@ -63,17 +62,16 @@ struct Weather
|
|||||||
u8 unknown_6EA;
|
u8 unknown_6EA;
|
||||||
u8 unknown_6EB;
|
u8 unknown_6EB;
|
||||||
u8 unknown_6EC;
|
u8 unknown_6EC;
|
||||||
u8 thunderTriggered;
|
bool8 thunderTriggered;
|
||||||
u16 fogHScrollPosX;
|
u16 fogHScrollPosX;
|
||||||
u16 fogHScrollCounter;
|
u16 fogHScrollCounter;
|
||||||
u16 fogHScrollOffset;
|
u16 fogHScrollOffset;
|
||||||
u8 lightenedFogSpritePals[6];
|
u8 lightenedFogSpritePals[6];
|
||||||
u8 lightenedFogSpritePalsCount;
|
u8 lightenedFogSpritePalsCount;
|
||||||
u8 fogHSpritesCreated;
|
bool8 fogHSpritesCreated;
|
||||||
u16 ashBaseSpritesX;
|
u16 ashBaseSpritesX;
|
||||||
u16 unknown_6FE;
|
u16 unknown_6FE;
|
||||||
u8 ashSpritesCreated;
|
bool8 ashSpritesCreated;
|
||||||
u8 filler_701[3];
|
|
||||||
u32 sandstormXOffset;
|
u32 sandstormXOffset;
|
||||||
u32 sandstormYOffset;
|
u32 sandstormYOffset;
|
||||||
u8 filler_70C[2];
|
u8 filler_70C[2];
|
||||||
@@ -81,22 +79,20 @@ struct Weather
|
|||||||
u16 sandstormPosY;
|
u16 sandstormPosY;
|
||||||
u16 sandstormWaveIndex;
|
u16 sandstormWaveIndex;
|
||||||
u16 sandstormWaveCounter;
|
u16 sandstormWaveCounter;
|
||||||
u8 sandstormSpritesCreated;
|
bool8 sandstormSpritesCreated;
|
||||||
u8 sandstormSwirlSpritesCreated;
|
bool8 sandstormSwirlSpritesCreated;
|
||||||
u16 fogDBaseSpritesX;
|
u16 fogDBaseSpritesX;
|
||||||
u16 fogDPosY;
|
u16 fogDPosY;
|
||||||
u16 fogDScrollXCounter;
|
u16 fogDScrollXCounter;
|
||||||
u16 fogDScrollYCounter;
|
u16 fogDScrollYCounter;
|
||||||
u16 fogDXOffset;
|
u16 fogDXOffset;
|
||||||
u16 fogDYOffset;
|
u16 fogDYOffset;
|
||||||
u8 fogDSpritesCreated;
|
bool8 fogDSpritesCreated;
|
||||||
u8 filler_725[1];
|
|
||||||
u16 bubblesDelayCounter;
|
u16 bubblesDelayCounter;
|
||||||
u16 bubblesDelayIndex;
|
u16 bubblesDelayIndex;
|
||||||
u16 bubblesCoordsIndex;
|
u16 bubblesCoordsIndex;
|
||||||
u16 bubblesSpriteCount;
|
u16 bubblesSpriteCount;
|
||||||
u8 bubblesSpritesCreated;
|
bool8 bubblesSpritesCreated;
|
||||||
u8 filler_72F;
|
|
||||||
u16 currBlendEVA;
|
u16 currBlendEVA;
|
||||||
u16 currBlendEVB;
|
u16 currBlendEVB;
|
||||||
u16 targetBlendEVA;
|
u16 targetBlendEVA;
|
||||||
@@ -104,7 +100,6 @@ struct Weather
|
|||||||
u8 blendUpdateCounter;
|
u8 blendUpdateCounter;
|
||||||
u8 blendFrameCounter;
|
u8 blendFrameCounter;
|
||||||
u8 blendDelay;
|
u8 blendDelay;
|
||||||
u8 filler_73B[0x3C-0x3B];
|
|
||||||
s16 unknown_73C;
|
s16 unknown_73C;
|
||||||
s16 unknown_73E;
|
s16 unknown_73E;
|
||||||
s16 unknown_740;
|
s16 unknown_740;
|
||||||
|
|||||||
+12
-12
@@ -40,7 +40,7 @@ struct WeatherCallbacks
|
|||||||
bool8 (*finish)(void);
|
bool8 (*finish)(void);
|
||||||
};
|
};
|
||||||
|
|
||||||
static EWRAM_DATA struct Weather gWeather = {};
|
static EWRAM_DATA struct Weather sWeather = {};
|
||||||
static EWRAM_DATA u8 sFieldEffectPaletteGammaTypes[32] = {};
|
static EWRAM_DATA u8 sFieldEffectPaletteGammaTypes[32] = {};
|
||||||
static EWRAM_DATA const u8 *sPaletteGammaTypes = NULL;
|
static EWRAM_DATA const u8 *sPaletteGammaTypes = NULL;
|
||||||
static EWRAM_DATA u16 gUnknown_20386A8 = 0;
|
static EWRAM_DATA u16 gUnknown_20386A8 = 0;
|
||||||
@@ -63,7 +63,7 @@ static void DoNothing(void);
|
|||||||
static void ApplyFogBlend(u8 blendCoeff, u16 blendColor);
|
static void ApplyFogBlend(u8 blendCoeff, u16 blendColor);
|
||||||
static bool8 LightenSpritePaletteInFog(u8 paletteIndex);
|
static bool8 LightenSpritePaletteInFog(u8 paletteIndex);
|
||||||
|
|
||||||
struct Weather *const gWeatherPtr = &gWeather;
|
struct Weather *const gWeatherPtr = &sWeather;
|
||||||
|
|
||||||
static const struct WeatherCallbacks sWeatherFuncs[] = {
|
static const struct WeatherCallbacks sWeatherFuncs[] = {
|
||||||
{None_Init, None_Main, None_Init, None_Finish},
|
{None_Init, None_Main, None_Init, None_Finish},
|
||||||
@@ -83,7 +83,7 @@ static const struct WeatherCallbacks sWeatherFuncs[] = {
|
|||||||
{Bubbles_InitVars, Bubbles_Main, Bubbles_InitAll, Bubbles_Finish},
|
{Bubbles_InitVars, Bubbles_Main, Bubbles_InitAll, Bubbles_Finish},
|
||||||
};
|
};
|
||||||
|
|
||||||
static void (*const gWeatherPalStateFuncs[])(void) = {
|
static void (*const sWeatherPalStateFuncs[])(void) = {
|
||||||
UpdateWeatherGammaShift,
|
UpdateWeatherGammaShift,
|
||||||
FadeInScreenWithWeather,
|
FadeInScreenWithWeather,
|
||||||
DoNothing,
|
DoNothing,
|
||||||
@@ -153,17 +153,17 @@ void StartWeather(void)
|
|||||||
gWeatherPtr->weatherPicSpritePalIndex = index;
|
gWeatherPtr->weatherPicSpritePalIndex = index;
|
||||||
gWeatherPtr->rainSpriteCount = 0;
|
gWeatherPtr->rainSpriteCount = 0;
|
||||||
gWeatherPtr->curRainSpriteIndex = 0;
|
gWeatherPtr->curRainSpriteIndex = 0;
|
||||||
gWeatherPtr->cloudSpritesCreated = 0;
|
gWeatherPtr->cloudSpritesCreated = FALSE;
|
||||||
gWeatherPtr->snowflakeSpriteCount = 0;
|
gWeatherPtr->snowflakeSpriteCount = 0;
|
||||||
gWeatherPtr->ashSpritesCreated = 0;
|
gWeatherPtr->ashSpritesCreated = FALSE;
|
||||||
gWeatherPtr->fogHSpritesCreated = 0;
|
gWeatherPtr->fogHSpritesCreated = FALSE;
|
||||||
gWeatherPtr->fogDSpritesCreated = 0;
|
gWeatherPtr->fogDSpritesCreated = FALSE;
|
||||||
gWeatherPtr->sandstormSpritesCreated = 0;
|
gWeatherPtr->sandstormSpritesCreated = FALSE;
|
||||||
gWeatherPtr->sandstormSwirlSpritesCreated = 0;
|
gWeatherPtr->sandstormSwirlSpritesCreated = FALSE;
|
||||||
gWeatherPtr->bubblesSpritesCreated = 0;
|
gWeatherPtr->bubblesSpritesCreated = FALSE;
|
||||||
gWeatherPtr->lightenedFogSpritePalsCount = 0;
|
gWeatherPtr->lightenedFogSpritePalsCount = 0;
|
||||||
Weather_SetBlendCoeffs(16, 0);
|
Weather_SetBlendCoeffs(16, 0);
|
||||||
gWeatherPtr->currWeather = 0;
|
gWeatherPtr->currWeather = WEATHER_NONE;
|
||||||
gWeatherPtr->palProcessingState = WEATHER_PAL_STATE_IDLE;
|
gWeatherPtr->palProcessingState = WEATHER_PAL_STATE_IDLE;
|
||||||
gWeatherPtr->readyForInit = FALSE;
|
gWeatherPtr->readyForInit = FALSE;
|
||||||
gWeatherPtr->weatherChangeComplete = TRUE;
|
gWeatherPtr->weatherChangeComplete = TRUE;
|
||||||
@@ -236,7 +236,7 @@ static void Task_WeatherMain(u8 taskId)
|
|||||||
sWeatherFuncs[gWeatherPtr->currWeather].main();
|
sWeatherFuncs[gWeatherPtr->currWeather].main();
|
||||||
}
|
}
|
||||||
|
|
||||||
gWeatherPalStateFuncs[gWeatherPtr->palProcessingState]();
|
sWeatherPalStateFuncs[gWeatherPtr->palProcessingState]();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+28
-29
@@ -38,7 +38,7 @@ static const struct OamData sCloudSpriteOamData = {
|
|||||||
.y = 0,
|
.y = 0,
|
||||||
.affineMode = ST_OAM_AFFINE_OFF,
|
.affineMode = ST_OAM_AFFINE_OFF,
|
||||||
.objMode = ST_OAM_OBJ_BLEND,
|
.objMode = ST_OAM_OBJ_BLEND,
|
||||||
.mosaic = 0,
|
.mosaic = FALSE,
|
||||||
.bpp = ST_OAM_4BPP,
|
.bpp = ST_OAM_4BPP,
|
||||||
.shape = SPRITE_SHAPE(64x64),
|
.shape = SPRITE_SHAPE(64x64),
|
||||||
.x = 0,
|
.x = 0,
|
||||||
@@ -75,14 +75,14 @@ void Clouds_InitVars(void)
|
|||||||
gWeatherPtr->gammaStepDelay = 20;
|
gWeatherPtr->gammaStepDelay = 20;
|
||||||
gWeatherPtr->weatherGfxLoaded = FALSE;
|
gWeatherPtr->weatherGfxLoaded = FALSE;
|
||||||
gWeatherPtr->initStep = 0;
|
gWeatherPtr->initStep = 0;
|
||||||
if (gWeatherPtr->cloudSpritesCreated == FALSE)
|
if (!gWeatherPtr->cloudSpritesCreated)
|
||||||
Weather_SetBlendCoeffs(0, 16);
|
Weather_SetBlendCoeffs(0, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Clouds_InitAll(void)
|
void Clouds_InitAll(void)
|
||||||
{
|
{
|
||||||
Clouds_InitVars();
|
Clouds_InitVars();
|
||||||
while (gWeatherPtr->weatherGfxLoaded == FALSE)
|
while (!gWeatherPtr->weatherGfxLoaded)
|
||||||
Clouds_Main();
|
Clouds_Main();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -219,7 +219,7 @@ void Drought_InitVars(void)
|
|||||||
void Drought_InitAll(void)
|
void Drought_InitAll(void)
|
||||||
{
|
{
|
||||||
Drought_InitVars();
|
Drought_InitVars();
|
||||||
while (gWeatherPtr->weatherGfxLoaded == FALSE)
|
while (!gWeatherPtr->weatherGfxLoaded)
|
||||||
Drought_Main();
|
Drought_Main();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -236,7 +236,7 @@ void Drought_Main(void)
|
|||||||
gWeatherPtr->initStep++;
|
gWeatherPtr->initStep++;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (LoadDroughtWeatherPalettes() == FALSE)
|
if (!LoadDroughtWeatherPalettes())
|
||||||
gWeatherPtr->initStep++;
|
gWeatherPtr->initStep++;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
@@ -368,7 +368,7 @@ static const struct OamData sRainSpriteOamData = {
|
|||||||
.y = 0,
|
.y = 0,
|
||||||
.affineMode = ST_OAM_AFFINE_OFF,
|
.affineMode = ST_OAM_AFFINE_OFF,
|
||||||
.objMode = ST_OAM_OBJ_NORMAL,
|
.objMode = ST_OAM_OBJ_NORMAL,
|
||||||
.mosaic = 0,
|
.mosaic = FALSE,
|
||||||
.bpp = ST_OAM_4BPP,
|
.bpp = ST_OAM_4BPP,
|
||||||
.shape = SPRITE_SHAPE(16x32),
|
.shape = SPRITE_SHAPE(16x32),
|
||||||
.x = 0,
|
.x = 0,
|
||||||
@@ -406,7 +406,7 @@ static const union AnimCmd *const sRainSpriteAnimCmds[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const struct SpriteTemplate sRainSpriteTemplate = {
|
static const struct SpriteTemplate sRainSpriteTemplate = {
|
||||||
.tileTag = 4614,
|
.tileTag = 0x1206,
|
||||||
.paletteTag = 0x1200,
|
.paletteTag = 0x1200,
|
||||||
.oam = &sRainSpriteOamData,
|
.oam = &sRainSpriteOamData,
|
||||||
.anims = sRainSpriteAnimCmds,
|
.anims = sRainSpriteAnimCmds,
|
||||||
@@ -615,13 +615,13 @@ static void InitRainSpriteMovement(struct Sprite *sprite, u16 val)
|
|||||||
while (--frameVal != 0xFFFF)
|
while (--frameVal != 0xFFFF)
|
||||||
UpdateRainSprite(sprite);
|
UpdateRainSprite(sprite);
|
||||||
|
|
||||||
sprite->tWaiting = 0;
|
sprite->tWaiting = FALSE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sprite->tCounter = frameVal - numFallingFrames;
|
sprite->tCounter = frameVal - numFallingFrames;
|
||||||
sprite->invisible = TRUE;
|
sprite->invisible = TRUE;
|
||||||
sprite->tWaiting = 1;
|
sprite->tWaiting = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -747,7 +747,7 @@ void Snow_InitAll(void)
|
|||||||
u16 i;
|
u16 i;
|
||||||
|
|
||||||
Snow_InitVars();
|
Snow_InitVars();
|
||||||
while (gWeatherPtr->weatherGfxLoaded == FALSE)
|
while (!gWeatherPtr->weatherGfxLoaded)
|
||||||
{
|
{
|
||||||
Snow_Main();
|
Snow_Main();
|
||||||
for (i = 0; i < gWeatherPtr->snowflakeSpriteCount; i++)
|
for (i = 0; i < gWeatherPtr->snowflakeSpriteCount; i++)
|
||||||
@@ -806,7 +806,7 @@ static const struct OamData sSnowflakeSpriteOamData = {
|
|||||||
.y = 0,
|
.y = 0,
|
||||||
.affineMode = ST_OAM_AFFINE_OFF,
|
.affineMode = ST_OAM_AFFINE_OFF,
|
||||||
.objMode = ST_OAM_OBJ_NORMAL,
|
.objMode = ST_OAM_OBJ_NORMAL,
|
||||||
.mosaic = 0,
|
.mosaic = FALSE,
|
||||||
.bpp = ST_OAM_4BPP,
|
.bpp = ST_OAM_4BPP,
|
||||||
.shape = SPRITE_SHAPE(8x8),
|
.shape = SPRITE_SHAPE(8x8),
|
||||||
.x = 0,
|
.x = 0,
|
||||||
@@ -983,14 +983,14 @@ void Thunderstorm_InitVars(void)
|
|||||||
gWeatherPtr->gammaTargetIndex = 3;
|
gWeatherPtr->gammaTargetIndex = 3;
|
||||||
gWeatherPtr->gammaStepDelay = 20;
|
gWeatherPtr->gammaStepDelay = 20;
|
||||||
gWeatherPtr->weatherGfxLoaded = FALSE; // duplicate assignment
|
gWeatherPtr->weatherGfxLoaded = FALSE; // duplicate assignment
|
||||||
gWeatherPtr->thunderTriggered = 0;
|
gWeatherPtr->thunderTriggered = FALSE;
|
||||||
SetRainStrengthFromSoundEffect(SE_T_AME);
|
SetRainStrengthFromSoundEffect(SE_T_AME);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Thunderstorm_InitAll(void)
|
void Thunderstorm_InitAll(void)
|
||||||
{
|
{
|
||||||
Thunderstorm_InitVars();
|
Thunderstorm_InitVars();
|
||||||
while (gWeatherPtr->weatherGfxLoaded == FALSE)
|
while (!gWeatherPtr->weatherGfxLoaded)
|
||||||
Thunderstorm_Main();
|
Thunderstorm_Main();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1018,7 +1018,7 @@ void Downpour_InitVars(void)
|
|||||||
void Downpour_InitAll(void)
|
void Downpour_InitAll(void)
|
||||||
{
|
{
|
||||||
Downpour_InitVars();
|
Downpour_InitVars();
|
||||||
while (gWeatherPtr->weatherGfxLoaded == FALSE)
|
while (!gWeatherPtr->weatherGfxLoaded)
|
||||||
Thunderstorm_Main();
|
Thunderstorm_Main();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1151,7 +1151,7 @@ bool8 Thunderstorm_Finish(void)
|
|||||||
if (!UpdateVisibleRainSprites())
|
if (!UpdateVisibleRainSprites())
|
||||||
{
|
{
|
||||||
DestroyRainSprites();
|
DestroyRainSprites();
|
||||||
gWeatherPtr->thunderTriggered = 0;
|
gWeatherPtr->thunderTriggered = FALSE;
|
||||||
gWeatherPtr->finishStep++;
|
gWeatherPtr->finishStep++;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -1164,16 +1164,16 @@ bool8 Thunderstorm_Finish(void)
|
|||||||
|
|
||||||
static void SetThunderCounter(u16 max)
|
static void SetThunderCounter(u16 max)
|
||||||
{
|
{
|
||||||
if (gWeatherPtr->thunderTriggered == 0)
|
if (!gWeatherPtr->thunderTriggered)
|
||||||
{
|
{
|
||||||
gWeatherPtr->thunderCounter = Random() % max;
|
gWeatherPtr->thunderCounter = Random() % max;
|
||||||
gWeatherPtr->thunderTriggered = 1;
|
gWeatherPtr->thunderTriggered = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void UpdateThunderSound(void)
|
static void UpdateThunderSound(void)
|
||||||
{
|
{
|
||||||
if (gWeatherPtr->thunderTriggered == 1)
|
if (gWeatherPtr->thunderTriggered == TRUE)
|
||||||
{
|
{
|
||||||
if (gWeatherPtr->thunderCounter == 0)
|
if (gWeatherPtr->thunderCounter == 0)
|
||||||
{
|
{
|
||||||
@@ -1185,7 +1185,7 @@ static void UpdateThunderSound(void)
|
|||||||
else
|
else
|
||||||
PlaySE(SE_T_KAMI2);
|
PlaySE(SE_T_KAMI2);
|
||||||
|
|
||||||
gWeatherPtr->thunderTriggered = 0;
|
gWeatherPtr->thunderTriggered = FALSE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1205,7 +1205,7 @@ static const struct OamData gOamData_839AB2C = {
|
|||||||
.y = 0,
|
.y = 0,
|
||||||
.affineMode = ST_OAM_AFFINE_OFF,
|
.affineMode = ST_OAM_AFFINE_OFF,
|
||||||
.objMode = ST_OAM_OBJ_BLEND,
|
.objMode = ST_OAM_OBJ_BLEND,
|
||||||
.mosaic = 0,
|
.mosaic = FALSE,
|
||||||
.bpp = ST_OAM_4BPP,
|
.bpp = ST_OAM_4BPP,
|
||||||
.shape = SPRITE_SHAPE(64x64),
|
.shape = SPRITE_SHAPE(64x64),
|
||||||
.x = 0,
|
.x = 0,
|
||||||
@@ -1276,7 +1276,6 @@ static const struct SpriteTemplate sFogHorizontalSpriteTemplate = {
|
|||||||
.callback = FogHorizontalSpriteCallback,
|
.callback = FogHorizontalSpriteCallback,
|
||||||
};
|
};
|
||||||
|
|
||||||
void FogHorizontal_Main(void);
|
|
||||||
static void CreateFogHorizontalSprites(void);
|
static void CreateFogHorizontalSprites(void);
|
||||||
static void DestroyFogHorizontalSprites(void);
|
static void DestroyFogHorizontalSprites(void);
|
||||||
|
|
||||||
@@ -1286,7 +1285,7 @@ void FogHorizontal_InitVars(void)
|
|||||||
gWeatherPtr->weatherGfxLoaded = FALSE;
|
gWeatherPtr->weatherGfxLoaded = FALSE;
|
||||||
gWeatherPtr->gammaTargetIndex = 0;
|
gWeatherPtr->gammaTargetIndex = 0;
|
||||||
gWeatherPtr->gammaStepDelay = 20;
|
gWeatherPtr->gammaStepDelay = 20;
|
||||||
if (gWeatherPtr->fogHSpritesCreated == 0)
|
if (!gWeatherPtr->fogHSpritesCreated)
|
||||||
{
|
{
|
||||||
gWeatherPtr->fogHScrollCounter = 0;
|
gWeatherPtr->fogHScrollCounter = 0;
|
||||||
gWeatherPtr->fogHScrollOffset = 0;
|
gWeatherPtr->fogHScrollOffset = 0;
|
||||||
@@ -1298,7 +1297,7 @@ void FogHorizontal_InitVars(void)
|
|||||||
void FogHorizontal_InitAll(void)
|
void FogHorizontal_InitAll(void)
|
||||||
{
|
{
|
||||||
FogHorizontal_InitVars();
|
FogHorizontal_InitVars();
|
||||||
while (gWeatherPtr->weatherGfxLoaded == FALSE)
|
while (!gWeatherPtr->weatherGfxLoaded)
|
||||||
FogHorizontal_Main();
|
FogHorizontal_Main();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1420,7 +1419,7 @@ static void DestroyFogHorizontalSprites(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
FreeSpriteTilesByTag(0x1201);
|
FreeSpriteTilesByTag(0x1201);
|
||||||
gWeatherPtr->fogHSpritesCreated = 0;
|
gWeatherPtr->fogHSpritesCreated = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1452,7 +1451,7 @@ void Ash_InitVars(void)
|
|||||||
void Ash_InitAll(void)
|
void Ash_InitAll(void)
|
||||||
{
|
{
|
||||||
Ash_InitVars();
|
Ash_InitVars();
|
||||||
while (gWeatherPtr->weatherGfxLoaded == FALSE)
|
while (!gWeatherPtr->weatherGfxLoaded)
|
||||||
Ash_Main();
|
Ash_Main();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1548,7 +1547,7 @@ static const union AnimCmd *const sAshSpriteAnimCmds[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const struct SpriteTemplate sAshSpriteTemplate = {
|
static const struct SpriteTemplate sAshSpriteTemplate = {
|
||||||
.tileTag = 4610,
|
.tileTag = 0x1202,
|
||||||
.paletteTag = 0x1200,
|
.paletteTag = 0x1200,
|
||||||
.oam = &sAshSpriteOamData,
|
.oam = &sAshSpriteOamData,
|
||||||
.anims = sAshSpriteAnimCmds,
|
.anims = sAshSpriteAnimCmds,
|
||||||
@@ -1663,7 +1662,7 @@ void FogDiagonal_InitVars(void)
|
|||||||
void FogDiagonal_InitAll(void)
|
void FogDiagonal_InitAll(void)
|
||||||
{
|
{
|
||||||
FogDiagonal_InitVars();
|
FogDiagonal_InitVars();
|
||||||
while (gWeatherPtr->weatherGfxLoaded == FALSE)
|
while (!gWeatherPtr->weatherGfxLoaded)
|
||||||
FogDiagonal_Main();
|
FogDiagonal_Main();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2220,11 +2219,11 @@ void Bubbles_Main(void)
|
|||||||
if (++gWeatherPtr->bubblesDelayCounter > sBubbleStartDelays[gWeatherPtr->bubblesDelayIndex])
|
if (++gWeatherPtr->bubblesDelayCounter > sBubbleStartDelays[gWeatherPtr->bubblesDelayIndex])
|
||||||
{
|
{
|
||||||
gWeatherPtr->bubblesDelayCounter = 0;
|
gWeatherPtr->bubblesDelayCounter = 0;
|
||||||
if (++gWeatherPtr->bubblesDelayIndex > ARRAY_COUNT(sBubbleStartDelays) - 1)
|
if (++gWeatherPtr->bubblesDelayIndex > NELEMS(sBubbleStartDelays) - 1)
|
||||||
gWeatherPtr->bubblesDelayIndex = 0;
|
gWeatherPtr->bubblesDelayIndex = 0;
|
||||||
|
|
||||||
CreateBubbleSprite(gWeatherPtr->bubblesCoordsIndex);
|
CreateBubbleSprite(gWeatherPtr->bubblesCoordsIndex);
|
||||||
if (++gWeatherPtr->bubblesCoordsIndex > ARRAY_COUNT(sBubbleStartCoords) - 1)
|
if (++gWeatherPtr->bubblesCoordsIndex > NELEMS(sBubbleStartCoords) - 1)
|
||||||
gWeatherPtr->bubblesCoordsIndex = 0;
|
gWeatherPtr->bubblesCoordsIndex = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+13
-14
@@ -51,20 +51,19 @@ void ResumePausedWeather(void)
|
|||||||
SetCurrentAndNextWeather(weather);
|
SetCurrentAndNextWeather(weather);
|
||||||
}
|
}
|
||||||
|
|
||||||
const u8 sWeatherCycleRoute119[] =
|
static const u8 sWeatherCycleRoute119[] = {
|
||||||
{
|
WEATHER_SUNNY,
|
||||||
WEATHER_SUNNY,
|
WEATHER_RAIN,
|
||||||
WEATHER_RAIN,
|
WEATHER_RAIN_THUNDERSTORM,
|
||||||
WEATHER_RAIN_THUNDERSTORM,
|
WEATHER_RAIN,
|
||||||
WEATHER_RAIN,
|
};
|
||||||
};
|
|
||||||
const u8 sWeatherCycleRoute123[] =
|
static const u8 sWeatherCycleRoute123[] = {
|
||||||
{
|
WEATHER_SUNNY,
|
||||||
WEATHER_SUNNY,
|
WEATHER_SUNNY,
|
||||||
WEATHER_SUNNY,
|
WEATHER_RAIN,
|
||||||
WEATHER_RAIN,
|
WEATHER_SUNNY,
|
||||||
WEATHER_SUNNY,
|
};
|
||||||
};
|
|
||||||
|
|
||||||
static u8 TranslateWeatherNum(u8 weather)
|
static u8 TranslateWeatherNum(u8 weather)
|
||||||
{
|
{
|
||||||
|
|||||||
+7
-7
@@ -305,14 +305,14 @@ static const u16 gUnknown_LG_83BFA10[] = {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const u32 gUnknown_83BFBE4[] = INCBIN_U32("graphics/field_effects/unk_83BFBE4.bin.lz");
|
static const u32 gUnknown_83BFBE4[] = INCBIN_U32("graphics/title_screen/unk_83BFBE4.bin.lz");
|
||||||
const u32 gUnknown_83C0408[] = INCBIN_U32("graphics/field_effects/unk_83C0408.bin.lz");
|
static const u32 gUnknown_83C0408[] = INCBIN_U32("graphics/title_screen/unk_83C0408.bin.lz");
|
||||||
const u32 gUnknown_83C0C00[] = INCBIN_U32("graphics/field_effects/unk_83C0C00.bin.lz");
|
static const u32 gUnknown_83C0C00[] = INCBIN_U32("graphics/title_screen/unk_83C0C00.bin.lz");
|
||||||
const u32 gUnknown_83C139C[] = INCBIN_U32("graphics/field_effects/unk_83C139C.bin.lz");
|
static const u32 gUnknown_83C139C[] = INCBIN_U32("graphics/title_screen/unk_83C139C.bin.lz");
|
||||||
const u32 gUnknown_83C1BB8[] = INCBIN_U32("graphics/field_effects/unk_83C1BB8.bin.lz");
|
static const u32 gUnknown_83C1BB8[] = INCBIN_U32("graphics/title_screen/unk_83C1BB8.bin.lz");
|
||||||
const u32 gUnknown_83C2380[] = INCBIN_U32("graphics/field_effects/unk_83C2380.bin.lz");
|
static const u32 gUnknown_83C2380[] = INCBIN_U32("graphics/title_screen/unk_83C2380.bin.lz");
|
||||||
|
|
||||||
const u32 *const gUnknown_83C2BA4[] = {
|
static const u32 *const gUnknown_83C2BA4[] = {
|
||||||
gUnknown_83BFBE4,
|
gUnknown_83BFBE4,
|
||||||
gUnknown_83C0408,
|
gUnknown_83C0408,
|
||||||
gUnknown_83C0C00,
|
gUnknown_83C0C00,
|
||||||
|
|||||||
Reference in New Issue
Block a user