field_weather_util
This commit is contained in:
@@ -10,5 +10,6 @@
|
||||
// Exported ROM declarations
|
||||
|
||||
void BlendPalette(u16, u16, u8, u16);
|
||||
void sub_8045314(u16 * palbuff, u16 blend_pal, u32 coefficient, s32 size);
|
||||
|
||||
#endif //GUARD_BLEND_PALETTE_H
|
||||
|
||||
@@ -16,5 +16,7 @@
|
||||
#define WEATHER_DROUGHT 12 // unused and broken in overworld
|
||||
#define WEATHER_DOWNPOUR 13 // unused
|
||||
#define WEATHER_UNDERWATER_BUBBLES 14 // unused
|
||||
#define WEATHER_ROUTE119_CYCLE 20 // unused
|
||||
#define WEATHER_ROUTE123_CYCLE 21 // unused
|
||||
|
||||
#endif // GUARD_CONSTANTS_WEATHER_H
|
||||
|
||||
@@ -2,6 +2,119 @@
|
||||
#define GUARD_WEATHER_H
|
||||
|
||||
#include "global.h"
|
||||
#include "constants/field_weather.h"
|
||||
|
||||
struct Weather
|
||||
{
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
struct Sprite *rainSprites[MAX_RAIN_SPRITES];
|
||||
struct Sprite *snowflakeSprites[101];
|
||||
struct Sprite *cloudSprites[NUM_CLOUD_SPRITES];
|
||||
} s1;
|
||||
struct
|
||||
{
|
||||
u8 filler0[0xA0];
|
||||
struct Sprite *fogHSprites[NUM_FOG_HORIZONTAL_SPRITES];
|
||||
struct Sprite *ashSprites[NUM_ASH_SPRITES];
|
||||
struct Sprite *fogDSprites[NUM_FOG_DIAGONAL_SPRITES];
|
||||
struct Sprite *sandstormSprites1[NUM_SANDSTORM_SPRITES];
|
||||
struct Sprite *sandstormSprites2[NUM_SWIRL_SANDSTORM_SPRITES];
|
||||
} s2;
|
||||
} sprites;
|
||||
u8 gammaShifts[19][32];
|
||||
u8 altGammaShifts[19][32];
|
||||
s8 gammaIndex;
|
||||
s8 gammaTargetIndex;
|
||||
u8 gammaStepDelay;
|
||||
u8 gammaStepFrameCounter;
|
||||
u16 fadeDestColor;
|
||||
/*0x6C6*/ u8 palProcessingState;
|
||||
/*0x6C7*/ u8 fadeScreenCounter;
|
||||
/*0x6C8*/ bool8 readyForInit;
|
||||
/*0x6C9*/ u8 taskId;
|
||||
/*0x6CA*/ u8 unknown_6CA;
|
||||
u8 unknown_6CB;
|
||||
u16 initStep;
|
||||
u16 finishStep;
|
||||
u8 currWeather;
|
||||
u8 nextWeather;
|
||||
u8 weatherGfxLoaded;
|
||||
bool8 weatherChangeComplete;
|
||||
u8 weatherPicSpritePalIndex;
|
||||
u8 altGammaSpritePalIndex;
|
||||
u16 rainSpriteVisibleCounter;
|
||||
u8 curRainSpriteIndex;
|
||||
u8 targetRainSpriteCount;
|
||||
u8 rainSpriteCount;
|
||||
u8 rainSpriteVisibleDelay;
|
||||
u8 isDownpour;
|
||||
u8 rainStrength;
|
||||
/*0x6DE*/ u8 cloudSpritesCreated;
|
||||
u8 filler_6DF[1];
|
||||
u16 snowflakeVisibleCounter;
|
||||
u16 unknown_6E2;
|
||||
u8 snowflakeSpriteCount;
|
||||
u8 targetSnowflakeSpriteCount;
|
||||
u16 unknown_6E6;
|
||||
u16 thunderCounter;
|
||||
u8 unknown_6EA;
|
||||
u8 unknown_6EB;
|
||||
u8 unknown_6EC;
|
||||
u8 thunderTriggered;
|
||||
u16 fogHScrollPosX;
|
||||
u16 fogHScrollCounter;
|
||||
u16 fogHScrollOffset;
|
||||
u8 lightenedFogSpritePals[6];
|
||||
u8 lightenedFogSpritePalsCount;
|
||||
u8 fogHSpritesCreated;
|
||||
u16 ashBaseSpritesX;
|
||||
u16 unknown_6FE;
|
||||
u8 ashSpritesCreated;
|
||||
u8 filler_701[3];
|
||||
u32 sandstormXOffset;
|
||||
u32 sandstormYOffset;
|
||||
u8 filler_70C[2];
|
||||
u16 sandstormBaseSpritesX;
|
||||
u16 sandstormPosY;
|
||||
u16 sandstormWaveIndex;
|
||||
u16 sandstormWaveCounter;
|
||||
u8 sandstormSpritesCreated;
|
||||
u8 sandstormSwirlSpritesCreated;
|
||||
u16 fogDBaseSpritesX;
|
||||
u16 fogDPosY;
|
||||
u16 fogDScrollXCounter;
|
||||
u16 fogDScrollYCounter;
|
||||
u16 fogDXOffset;
|
||||
u16 fogDYOffset;
|
||||
u8 fogDSpritesCreated;
|
||||
u8 filler_725[1];
|
||||
u16 bubblesDelayCounter;
|
||||
u16 bubblesDelayIndex;
|
||||
u16 bubblesCoordsIndex;
|
||||
u16 bubblesSpriteCount;
|
||||
u8 bubblesSpritesCreated;
|
||||
u8 filler_72F;
|
||||
u16 currBlendEVA;
|
||||
u16 currBlendEVB;
|
||||
u16 targetBlendEVA;
|
||||
u16 targetBlendEVB;
|
||||
u8 blendUpdateCounter;
|
||||
u8 blendFrameCounter;
|
||||
u8 blendDelay;
|
||||
u8 filler_73B[0x3C-0x3B];
|
||||
s16 unknown_73C;
|
||||
s16 unknown_73E;
|
||||
s16 unknown_740;
|
||||
s16 unknown_742;
|
||||
u8 filler_744[0xD-4];
|
||||
s8 loadDroughtPalsIndex;
|
||||
u8 loadDroughtPalsOffset;
|
||||
};
|
||||
|
||||
extern struct Weather *const gWeatherPtr;
|
||||
|
||||
void FadeScreen(u8 mode, s8 delay);
|
||||
|
||||
@@ -22,4 +135,7 @@ void UpdateSpritePaletteWithWeather(u8 palIdx);
|
||||
void ResetPreservedPalettesInWeather(void);
|
||||
void PreservePaletteInWeather(u8 palIdx);
|
||||
|
||||
void SetNextWeather(u8 weather);
|
||||
void SetCurrentAndNextWeather(u8 weather);
|
||||
|
||||
#endif // GUARD_WEATHER_H
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
#ifndef GUARD_FIELD_WEATHER_EFFECTS_H
|
||||
#define GUARD_FIELD_WEATHER_EFFECTS_H
|
||||
|
||||
bool8 Ash_Finish(void);
|
||||
bool8 Bubbles_Finish(void);
|
||||
bool8 Clouds_Finish(void);
|
||||
bool8 Fog1_Finish(void);
|
||||
bool8 Fog2_Finish(void);
|
||||
bool8 LightRain_Finish(void);
|
||||
bool8 Rain_Finish(void);
|
||||
bool8 Sandstorm_Finish(void);
|
||||
bool8 Snow_Finish(void);
|
||||
bool8 sub_807B434(void);
|
||||
bool8 sub_807B6BC(void);
|
||||
bool8 sub_807D8D0(void);
|
||||
void Ash_InitAll(void);
|
||||
void Ash_InitVars(void);
|
||||
void Ash_Main(void);
|
||||
void Bubbles_InitAll(void);
|
||||
void Bubbles_InitVars(void);
|
||||
void Bubbles_Main(void);
|
||||
void Clouds_InitAll(void);
|
||||
void Clouds_InitVars(void);
|
||||
void Clouds_Main(void);
|
||||
void Drought_InitAll(void);
|
||||
void Drought_InitVars(void);
|
||||
void Drought_Main(void);
|
||||
void Fog1_InitAll(void);
|
||||
void Fog1_InitVars(void);
|
||||
void Fog1_Main(void);
|
||||
void Fog2_InitAll(void);
|
||||
void Fog2_InitVars(void);
|
||||
void Fog2_Main(void);
|
||||
void LightRain_InitAll(void);
|
||||
void LightRain_InitVars(void);
|
||||
void LightRain_Main(void);
|
||||
void Rain_Main(void);
|
||||
void Sandstorm_InitAll(void);
|
||||
void Sandstorm_InitVars(void);
|
||||
void Sandstorm_Main(void);
|
||||
void Snow_InitAll(void);
|
||||
void Snow_InitVars(void);
|
||||
void Weather11_InitAll(void);
|
||||
void Weather11_InitVars(void);
|
||||
void Weather2_InitAll(void);
|
||||
void Weather2_InitVars(void);
|
||||
void nullsub_48(void);
|
||||
void nullsub_49(void);
|
||||
void snowflakes_progress2(void);
|
||||
void sub_807C2E4(void);
|
||||
void sub_807C358(void);
|
||||
void sub_807C388(void);
|
||||
void sub_807C3F4(void);
|
||||
|
||||
#endif //GUARD_FIELD_WEATHER_EFFECTS_H
|
||||
+1
-1
@@ -749,7 +749,7 @@ struct SaveBlock1
|
||||
/*0x0024*/ struct WarpData escapeWarp;
|
||||
/*0x002C*/ u16 savedMusic;
|
||||
/*0x002E*/ u8 weather;
|
||||
/*0x002F*/ u8 filler_2F;
|
||||
/*0x002F*/ u8 weatherCycleStage;
|
||||
/*0x0030*/ u8 flashLevel;
|
||||
/*0x0032*/ u16 mapLayoutId;
|
||||
/*0x0034*/ u8 playerPartyCount;
|
||||
|
||||
Reference in New Issue
Block a user