Port field_weather_effects from emerald
This commit is contained in:
+21
-11
@@ -62,25 +62,24 @@ bool8 FadeInScreen_FogHorizontal(void);
|
||||
void DoNothing(void);
|
||||
void ApplyFogBlend(u8 blendCoeff, u16 blendColor);
|
||||
bool8 LightenSpritePaletteInFog(u8 paletteIndex);
|
||||
void Weather_SetBlendCoeffs(u8, u8);
|
||||
|
||||
struct Weather *const gWeatherPtr = &gWeather;
|
||||
|
||||
const struct WeatherCallbacks sWeatherFuncs[] = {
|
||||
{None_Init, None_Main, None_Init, None_Finish},
|
||||
{Clouds_InitVars, Clouds_Main, Clouds_InitAll, Clouds_Finish},
|
||||
{Weather2_InitVars, nullsub_48, Weather2_InitAll, sub_807B434},
|
||||
{LightRain_InitVars, LightRain_Main, LightRain_InitAll, LightRain_Finish},
|
||||
{Snow_InitVars, snowflakes_progress2, Snow_InitAll, Snow_Finish},
|
||||
{sub_807C2E4, Rain_Main, sub_807C358, Rain_Finish},
|
||||
{Fog1_InitVars, Fog1_Main, Fog1_InitAll, Fog1_Finish},
|
||||
{Sunny_InitVars, Sunny_Main, Sunny_InitAll, Sunny_Finish},
|
||||
{Rain_InitVars, Rain_Main, Rain_InitAll, Rain_Finish},
|
||||
{Snow_InitVars, Snow_Main, Snow_InitAll, Snow_Finish},
|
||||
{Thunderstorm_InitVars, Thunderstorm_Main, Thunderstorm_InitAll, Thunderstorm_Finish},
|
||||
{FogHorizontal_InitVars, FogHorizontal_Main, FogHorizontal_InitAll, FogHorizontal_Finish},
|
||||
{Ash_InitVars, Ash_Main, Ash_InitAll, Ash_Finish},
|
||||
{Sandstorm_InitVars, Sandstorm_Main, Sandstorm_InitAll, Sandstorm_Finish},
|
||||
{Fog2_InitVars, Fog2_Main, Fog2_InitAll, Fog2_Finish},
|
||||
{Fog1_InitVars, Fog1_Main, Fog1_InitAll, Fog1_Finish},
|
||||
{Weather11_InitVars, nullsub_49, Weather11_InitAll, sub_807D8D0},
|
||||
{Drought_InitVars, Drought_Main, Drought_InitAll, sub_807B6BC},
|
||||
{sub_807C388, Rain_Main, sub_807C3F4, Rain_Finish},
|
||||
{FogDiagonal_InitVars, FogDiagonal_Main, FogDiagonal_InitAll, FogDiagonal_Finish},
|
||||
{FogHorizontal_InitVars, FogHorizontal_Main, FogHorizontal_InitAll, FogHorizontal_Finish},
|
||||
{Shade_InitVars, Shade_Main, Shade_InitAll, Shade_Finish},
|
||||
{Drought_InitVars, Drought_Main, Drought_InitAll, Drought_Finish},
|
||||
{Downpour_InitVars, Thunderstorm_Main, Downpour_InitAll, Thunderstorm_Finish},
|
||||
{Bubbles_InitVars, Bubbles_Main, Bubbles_InitAll, Bubbles_Finish},
|
||||
};
|
||||
|
||||
@@ -129,6 +128,17 @@ const u8 sBasePaletteGammaTypes[32] = {
|
||||
};
|
||||
|
||||
const u16 gUnknown_83C2CE0[] = INCBIN_U16("graphics/field_effects/unk_83C2CE0.gbapal");
|
||||
const u16 gCloudsWeatherPalette[] = INCBIN_U16("graphics/weather/cloud.gbapal");
|
||||
const u16 gSandstormWeatherPalette[] = INCBIN_U16("graphics/weather/sandstorm.gbapal");
|
||||
const u8 gWeatherFogDiagonalTiles[] = INCBIN_U8("graphics/weather/fog_diagonal.4bpp");
|
||||
const u8 gWeatherFogHorizontalTiles[] = INCBIN_U8("graphics/weather/fog_horizontal.4bpp");
|
||||
const u8 gWeatherCloudTiles[] = INCBIN_U8("graphics/weather/cloud.4bpp");
|
||||
const u8 gWeatherSnow1Tiles[] = INCBIN_U8("graphics/weather/snow0.4bpp");
|
||||
const u8 gWeatherSnow2Tiles[] = INCBIN_U8("graphics/weather/snow1.4bpp");
|
||||
const u8 gWeatherBubbleTiles[] = INCBIN_U8("graphics/weather/bubble.4bpp");
|
||||
const u8 gWeatherAshTiles[] = INCBIN_U8("graphics/weather/ash.4bpp");
|
||||
const u8 gWeatherRainTiles[] = INCBIN_U8("graphics/weather/rain.4bpp");
|
||||
const u8 gWeatherSandstormTiles[] = INCBIN_U8("graphics/weather/sandstorm.4bpp");
|
||||
|
||||
// code
|
||||
void StartWeather(void)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -6,17 +6,6 @@
|
||||
u8 TranslateWeatherNum(u8 weather);
|
||||
void UpdateRainCounter(u8 newWeather, u8 oldWeather);
|
||||
|
||||
const u16 gUnknown_83C2D00[] = INCBIN_U16("graphics/field_effects/unk_83C2D00.gbapal");
|
||||
const u16 gUnknown_83C2D20[] = INCBIN_U16("graphics/field_effects/unk_83C2D20.gbapal");
|
||||
const u16 gUnknown_83C2D40[] = INCBIN_U16("graphics/field_effects/unk_83C2D40.4bpp");
|
||||
const u16 gWeatherFog1Tiles[] = INCBIN_U16("graphics/field_effects/unk_83C3540.4bpp");
|
||||
const u16 gUnknown_83C3D40[] = INCBIN_U16("graphics/field_effects/unk_83C3D40.4bpp");
|
||||
const u16 gUnknown_83C4540[] = INCBIN_U16("graphics/field_effects/unk_83C4540.4bpp");
|
||||
const u16 gUnknown_83C4580[] = INCBIN_U16("graphics/field_effects/unk_83C4580.4bpp");
|
||||
const u16 gUnknown_83C45C0[] = INCBIN_U16("graphics/field_effects/unk_83C45C0.4bpp");
|
||||
const u16 gUnknown_83C55C0[] = INCBIN_U16("graphics/field_effects/unk_83C55C0.4bpp");
|
||||
const u16 gUnknown_83C5BC0[] = INCBIN_U16("graphics/field_effects/unk_83C5BC0.4bpp");
|
||||
|
||||
void SetSav1Weather(u32 weather)
|
||||
{
|
||||
u8 oldWeather = gSaveBlock1Ptr->weather;
|
||||
|
||||
@@ -944,7 +944,7 @@ void AnimTask_Haze1(u8 taskId)
|
||||
SetGpuReg(REG_OFFSET_BG1HOFS, gBattle_BG1_X);
|
||||
SetGpuReg(REG_OFFSET_BG1VOFS, gBattle_BG1_Y);
|
||||
sub_80752A0(&animBg);
|
||||
LoadBgTiles(animBg.bgId, gWeatherFog1Tiles, 0x800, animBg.tilesOffset);
|
||||
LoadBgTiles(animBg.bgId, gWeatherFogHorizontalTiles, 0x800, animBg.tilesOffset);
|
||||
AnimLoadCompressedBgTilemap(animBg.bgId, gBattleAnimFogTilemap);
|
||||
LoadPalette(&gUnknown_83C2CE0, animBg.paletteId * 16, 32);
|
||||
if (IsContest())
|
||||
@@ -1042,7 +1042,7 @@ void AnimTask_LoadMistTiles(u8 taskId)
|
||||
SetGpuReg(REG_OFFSET_BG1HOFS, gBattle_BG1_X);
|
||||
SetGpuReg(REG_OFFSET_BG1VOFS, gBattle_BG1_Y);
|
||||
sub_80752A0(&animBg);
|
||||
LoadBgTiles(animBg.bgId, gWeatherFog1Tiles, 0x800, animBg.tilesOffset);
|
||||
LoadBgTiles(animBg.bgId, gWeatherFogHorizontalTiles, 0x800, animBg.tilesOffset);
|
||||
AnimLoadCompressedBgTilemap(animBg.bgId, gBattleAnimFogTilemap);
|
||||
LoadPalette(&gUnknown_83C2CE0, animBg.paletteId * 16, 32);
|
||||
if (IsContest())
|
||||
|
||||
Reference in New Issue
Block a user