diff options
author | Marcus Huderle <huderlem@gmail.com> | 2018-01-20 14:17:03 -0800 |
---|---|---|
committer | Marcus Huderle <huderlem@gmail.com> | 2018-01-20 14:17:03 -0800 |
commit | 003ed9293b2c51f0481ed31f0e0459cbecbf757e (patch) | |
tree | 2ee03f3c11f552976589d1ac0b0de474bf78fb96 /include | |
parent | 428f712da678b3f5b9256d85c0e3248cacd8e7c2 (diff) |
More documentation of field_weather
Diffstat (limited to 'include')
-rw-r--r-- | include/decoration.h | 2 | ||||
-rw-r--r-- | include/field_weather.h | 49 |
2 files changed, 25 insertions, 26 deletions
diff --git a/include/decoration.h b/include/decoration.h index 74ca47a3a..c38bd1bcb 100644 --- a/include/decoration.h +++ b/include/decoration.h @@ -160,7 +160,7 @@ extern const struct YesNoFuncTable gUnknown_083ECAA0; extern u8 sub_8134194(u8); // src/decoration_inventory extern bool8 sub_81341D4(void); // src/decoration_inventory extern void sub_8134104(u8); // src/decoration_inventory -extern bool8 sub_807D770(void); +extern bool8 IsWeatherNotFadingIn(void); extern void sub_8109DAC(u8); // src/trader extern void ReshowPlayerPC(u8); // src/player_pc void Task_SecretBasePC_Decoration(u8); diff --git a/include/field_weather.h b/include/field_weather.h index 15be9229d..0bdebf747 100644 --- a/include/field_weather.h +++ b/include/field_weather.h @@ -1,7 +1,15 @@ #ifndef GUARD_WEATHER_H #define GUARD_WEATHER_H -struct Sprite; +#include "sprite.h" + +// Controls how the weather should be changing the screen palettes. +enum { + WEATHER_PAL_STATE_CHANGING_WEATHER, + WEATHER_PAL_STATE_SCREEN_FADING_IN, + WEATHER_PAL_STATE_SCREEN_FADING_OUT, + WEATHER_PAL_STATE_IDLE, +}; struct Weather { @@ -30,10 +38,10 @@ struct Weather u8 gammaStepDelay; u8 gammaStepFrameCounter; u16 fadeDestColor; - u8 unknown_6C6; - u8 unknown_6C7; - u8 unknown_6C8; - u8 unknown_6C9; + u8 palProcessingState; + u8 fadeScreenCounter; + bool8 readyForInit; + u8 taskId; u8 unknown_6CA; u8 unknown_6CB; u16 initStep; @@ -41,8 +49,8 @@ struct Weather u8 currWeather; u8 nextWeather; u8 weatherGfxLoaded; - u8 unknown_6D3; - u8 unknown_6D4; + bool8 weatherChangeComplete; + u8 weatherPicSpritePalIndex; u8 altGammaSpritePalIndex; u16 unknown_6D6; u8 unknown_6D8; @@ -66,8 +74,8 @@ struct Weather u16 fog1ScrollPosX; u16 unknown_6F0; u16 unknown_6F2; - u8 unknown_6F4[6]; - u8 unknown_6FA; + u8 lightenedFogSpritePals[6]; + u8 lightenedFogSpritePalsCount; u8 fog1SpritesCreated; u16 unknown_6FC; u16 unknown_6FE; @@ -121,17 +129,7 @@ void Task_WeatherInit(u8); void Task_WeatherMain(u8); void sub_807CAE8(void); void nullsub_38(void); -void sub_807CCAC(void); -u8 RainSnowShadeBlend_807CDC4(void); -u8 DroughtBlend_807CE24(void); -u8 Fog1Blend_807CE7C(void); -void nullsub_39(void); - -// ASM -void BlendSomething_807CEBC(u8, u8, s8); -void BlendSomething_807D1BC(u8 a, u8 a2, s8 c, u8 d, u16 e); -void BlendSomething_807D424(u8, u16); -// ... +void SetWeatherScreenFadeOut(void); enum { @@ -141,10 +139,10 @@ enum FADE_TO_WHITE, }; -void fade_screen(u8, u8); +void FadeScreen(u8, u8); // ... -void sub_807D78C(u8 tag); -void sub_807D874(u8); +void UpdateSpritePaletteWithWeather(u8 tag); +void ApplyWeatherGammaShiftToPal(u8); // ... void Weather_SetBlendCoeffs(u8, u8); // ... @@ -157,8 +155,8 @@ void SetSav1WeatherFromCurrMapHeader(void); void DoCurrentWeather(void); void sub_8080750(); -bool8 sub_807D770(void); -bool8 sub_807DDFC(void); +bool8 IsWeatherNotFadingIn(void); +bool8 IsWeatherChangeComplete(void); void SetWeather(u32); void UpdateWeatherPerDay(u16); void PreservePaletteInWeather(u8 index); @@ -167,6 +165,7 @@ extern void ResetDroughtWeatherPaletteLoading(void); void ResetDroughtWeatherPaletteLoading(void); bool8 LoadDroughtWeatherPalettes(void); u8 GetCurrentWeather(void); +void LoadCustomWeatherSpritePalette(const u16 *palette); extern struct Weather gWeather; |