mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-02-22 20:33:47 +01:00
Sync drought with pokefirered, add weather tags
This commit is contained in:
parent
a0b3d4df12
commit
1494a83035
@ -4,6 +4,21 @@
|
|||||||
#include "sprite.h"
|
#include "sprite.h"
|
||||||
#include "constants/field_weather.h"
|
#include "constants/field_weather.h"
|
||||||
|
|
||||||
|
#define TAG_WEATHER_START 0x1200
|
||||||
|
enum {
|
||||||
|
GFXTAG_CLOUD = TAG_WEATHER_START,
|
||||||
|
GFXTAG_FOG_H,
|
||||||
|
GFXTAG_ASH,
|
||||||
|
GFXTAG_FOG_D,
|
||||||
|
GFXTAG_SANDSTORM,
|
||||||
|
GFXTAG_BUBBLE,
|
||||||
|
GFXTAG_RAIN,
|
||||||
|
};
|
||||||
|
enum {
|
||||||
|
PALTAG_WEATHER = TAG_WEATHER_START,
|
||||||
|
PALTAG_WEATHER_2
|
||||||
|
};
|
||||||
|
|
||||||
struct Weather
|
struct Weather
|
||||||
{
|
{
|
||||||
union
|
union
|
||||||
@ -105,10 +120,10 @@ struct Weather
|
|||||||
u8 blendFrameCounter;
|
u8 blendFrameCounter;
|
||||||
u8 blendDelay;
|
u8 blendDelay;
|
||||||
u8 filler_73B[0x3C-0x3B];
|
u8 filler_73B[0x3C-0x3B];
|
||||||
s16 unknown_73C;
|
s16 droughtBrightnessStage;
|
||||||
s16 unknown_73E;
|
s16 droughtLastBrightnessStage;
|
||||||
s16 unknown_740;
|
s16 droughtTimer;
|
||||||
s16 unknown_742;
|
s16 droughtState;
|
||||||
u8 filler_744[0xD-4];
|
u8 filler_744[0xD-4];
|
||||||
s8 loadDroughtPalsIndex;
|
s8 loadDroughtPalsIndex;
|
||||||
u8 loadDroughtPalsOffset;
|
u8 loadDroughtPalsOffset;
|
||||||
@ -136,9 +151,8 @@ 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);
|
||||||
void sub_80ABFE0(s8 gammaIndex);
|
void DroughtStateInit(void);
|
||||||
void sub_80ABFF0(void);
|
void DroughtStateRun(void);
|
||||||
void sub_80AC01C(void);
|
|
||||||
void Weather_SetBlendCoeffs(u8 eva, u8 evb);
|
void Weather_SetBlendCoeffs(u8 eva, u8 evb);
|
||||||
void Weather_SetTargetBlendCoeffs(u8 eva, u8 evb, int delay);
|
void Weather_SetTargetBlendCoeffs(u8 eva, u8 evb, int delay);
|
||||||
bool8 Weather_UpdateBlend(void);
|
bool8 Weather_UpdateBlend(void);
|
||||||
|
@ -160,11 +160,11 @@ void StartWeather(void)
|
|||||||
{
|
{
|
||||||
if (!FuncIsActiveTask(Task_WeatherMain))
|
if (!FuncIsActiveTask(Task_WeatherMain))
|
||||||
{
|
{
|
||||||
u8 index = AllocSpritePalette(0x1200);
|
u8 index = AllocSpritePalette(TAG_WEATHER_START);
|
||||||
CpuCopy32(gFogPalette, &gPlttBufferUnfaded[0x100 + index * 16], 32);
|
CpuCopy32(gFogPalette, &gPlttBufferUnfaded[0x100 + index * 16], 32);
|
||||||
BuildGammaShiftTables();
|
BuildGammaShiftTables();
|
||||||
gWeatherPtr->altGammaSpritePalIndex = index;
|
gWeatherPtr->altGammaSpritePalIndex = index;
|
||||||
gWeatherPtr->weatherPicSpritePalIndex = AllocSpritePalette(0x1201);
|
gWeatherPtr->weatherPicSpritePalIndex = AllocSpritePalette(PALTAG_WEATHER_2);
|
||||||
gWeatherPtr->rainSpriteCount = 0;
|
gWeatherPtr->rainSpriteCount = 0;
|
||||||
gWeatherPtr->curRainSpriteIndex = 0;
|
gWeatherPtr->curRainSpriteIndex = 0;
|
||||||
gWeatherPtr->cloudSpritesCreated = 0;
|
gWeatherPtr->cloudSpritesCreated = 0;
|
||||||
@ -885,50 +885,50 @@ bool8 LoadDroughtWeatherPalettes(void)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80ABFE0(s8 gammaIndex)
|
static void SetDroughtGamma(s8 gammaIndex)
|
||||||
{
|
{
|
||||||
sub_80ABC48(-gammaIndex - 1);
|
sub_80ABC48(-gammaIndex - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80ABFF0(void)
|
void DroughtStateInit(void)
|
||||||
{
|
{
|
||||||
gWeatherPtr->unknown_73C = 0;
|
gWeatherPtr->droughtBrightnessStage = 0;
|
||||||
gWeatherPtr->unknown_740 = 0;
|
gWeatherPtr->droughtTimer = 0;
|
||||||
gWeatherPtr->unknown_742 = 0;
|
gWeatherPtr->droughtState = 0;
|
||||||
gWeatherPtr->unknown_73E = 0;
|
gWeatherPtr->droughtLastBrightnessStage = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80AC01C(void)
|
void DroughtStateRun(void)
|
||||||
{
|
{
|
||||||
switch (gWeatherPtr->unknown_742)
|
switch (gWeatherPtr->droughtState)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
if (++gWeatherPtr->unknown_740 > 5)
|
if (++gWeatherPtr->droughtTimer > 5)
|
||||||
{
|
{
|
||||||
gWeatherPtr->unknown_740 = 0;
|
gWeatherPtr->droughtTimer = 0;
|
||||||
sub_80ABFE0(gWeatherPtr->unknown_73C++);
|
SetDroughtGamma(gWeatherPtr->droughtBrightnessStage++);
|
||||||
if (gWeatherPtr->unknown_73C > 5)
|
if (gWeatherPtr->droughtBrightnessStage > 5)
|
||||||
{
|
{
|
||||||
gWeatherPtr->unknown_73E = gWeatherPtr->unknown_73C;
|
gWeatherPtr->droughtLastBrightnessStage = gWeatherPtr->droughtBrightnessStage;
|
||||||
gWeatherPtr->unknown_742 = 1;
|
gWeatherPtr->droughtState = 1;
|
||||||
gWeatherPtr->unknown_740 = 0x3C;
|
gWeatherPtr->droughtTimer = 60;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
gWeatherPtr->unknown_740 = (gWeatherPtr->unknown_740 + 3) & 0x7F;
|
gWeatherPtr->droughtTimer = (gWeatherPtr->droughtTimer + 3) & 0x7F;
|
||||||
gWeatherPtr->unknown_73C = ((gSineTable[gWeatherPtr->unknown_740] - 1) >> 6) + 2;
|
gWeatherPtr->droughtBrightnessStage = ((gSineTable[gWeatherPtr->droughtTimer] - 1) >> 6) + 2;
|
||||||
if (gWeatherPtr->unknown_73C != gWeatherPtr->unknown_73E)
|
if (gWeatherPtr->droughtBrightnessStage != gWeatherPtr->droughtLastBrightnessStage)
|
||||||
sub_80ABFE0(gWeatherPtr->unknown_73C);
|
SetDroughtGamma(gWeatherPtr->droughtBrightnessStage);
|
||||||
gWeatherPtr->unknown_73E = gWeatherPtr->unknown_73C;
|
gWeatherPtr->droughtLastBrightnessStage = gWeatherPtr->droughtBrightnessStage;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (++gWeatherPtr->unknown_740 > 5)
|
if (++gWeatherPtr->droughtTimer > 5)
|
||||||
{
|
{
|
||||||
gWeatherPtr->unknown_740 = 0;
|
gWeatherPtr->droughtTimer = 0;
|
||||||
sub_80ABFE0(--gWeatherPtr->unknown_73C);
|
SetDroughtGamma(--gWeatherPtr->droughtBrightnessStage);
|
||||||
if (gWeatherPtr->unknown_73C == 3)
|
if (gWeatherPtr->droughtBrightnessStage == 3)
|
||||||
gWeatherPtr->unknown_742 = 0;
|
gWeatherPtr->droughtState = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ static const struct SpriteSheet sCloudSpriteSheet =
|
|||||||
{
|
{
|
||||||
.data = gWeatherCloudTiles,
|
.data = gWeatherCloudTiles,
|
||||||
.size = sizeof(gWeatherCloudTiles),
|
.size = sizeof(gWeatherCloudTiles),
|
||||||
.tag = 0x1200
|
.tag = GFXTAG_CLOUD
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct OamData sCloudSpriteOamData =
|
static const struct OamData sCloudSpriteOamData =
|
||||||
@ -84,8 +84,8 @@ static const union AnimCmd *const sCloudSpriteAnimCmds[] =
|
|||||||
|
|
||||||
static const struct SpriteTemplate sCloudSpriteTemplate =
|
static const struct SpriteTemplate sCloudSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = 0x1200,
|
.tileTag = GFXTAG_CLOUD,
|
||||||
.paletteTag = 0x1201,
|
.paletteTag = PALTAG_WEATHER_2,
|
||||||
.oam = &sCloudSpriteOamData,
|
.oam = &sCloudSpriteOamData,
|
||||||
.anims = sCloudSpriteAnimCmds,
|
.anims = sCloudSpriteAnimCmds,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
@ -214,7 +214,7 @@ static void DestroyCloudSprites(void)
|
|||||||
DestroySprite(gWeatherPtr->sprites.s1.cloudSprites[i]);
|
DestroySprite(gWeatherPtr->sprites.s1.cloudSprites[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
FreeSpriteTilesByTag(0x1200);
|
FreeSpriteTilesByTag(GFXTAG_CLOUD);
|
||||||
gWeatherPtr->cloudSpritesCreated = FALSE;
|
gWeatherPtr->cloudSpritesCreated = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -264,19 +264,19 @@ void Drought_Main(void)
|
|||||||
gWeatherPtr->initStep++;
|
gWeatherPtr->initStep++;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
sub_80ABFF0();
|
DroughtStateInit();
|
||||||
gWeatherPtr->initStep++;
|
gWeatherPtr->initStep++;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
sub_80AC01C();
|
DroughtStateRun();
|
||||||
if (gWeatherPtr->unknown_73C == 6)
|
if (gWeatherPtr->droughtBrightnessStage == 6)
|
||||||
{
|
{
|
||||||
gWeatherPtr->weatherGfxLoaded = TRUE;
|
gWeatherPtr->weatherGfxLoaded = TRUE;
|
||||||
gWeatherPtr->initStep++;
|
gWeatherPtr->initStep++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
sub_80AC01C();
|
DroughtStateRun();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -288,7 +288,7 @@ bool8 Drought_Finish(void)
|
|||||||
|
|
||||||
void StartDroughtWeatherBlend(void)
|
void StartDroughtWeatherBlend(void)
|
||||||
{
|
{
|
||||||
CreateTask(UpdateDroughtBlend, 0x50);
|
CreateTask(UpdateDroughtBlend, 80);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define tState data[0]
|
#define tState data[0]
|
||||||
@ -437,8 +437,8 @@ static const union AnimCmd *const sRainSpriteAnimCmds[] =
|
|||||||
|
|
||||||
static const struct SpriteTemplate sRainSpriteTemplate =
|
static const struct SpriteTemplate sRainSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = 4614,
|
.tileTag = GFXTAG_RAIN,
|
||||||
.paletteTag = 0x1200,
|
.paletteTag = PALTAG_WEATHER,
|
||||||
.oam = &sRainSpriteOamData,
|
.oam = &sRainSpriteOamData,
|
||||||
.anims = sRainSpriteAnimCmds,
|
.anims = sRainSpriteAnimCmds,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
@ -466,7 +466,7 @@ static const struct SpriteSheet sRainSpriteSheet =
|
|||||||
{
|
{
|
||||||
.data = gWeatherRainTiles,
|
.data = gWeatherRainTiles,
|
||||||
.size = sizeof(gWeatherRainTiles),
|
.size = sizeof(gWeatherRainTiles),
|
||||||
.tag = 0x1206,
|
.tag = GFXTAG_RAIN,
|
||||||
};
|
};
|
||||||
|
|
||||||
void Rain_InitVars(void)
|
void Rain_InitVars(void)
|
||||||
@ -744,7 +744,7 @@ static void DestroyRainSprites(void)
|
|||||||
DestroySprite(gWeatherPtr->sprites.s1.rainSprites[i]);
|
DestroySprite(gWeatherPtr->sprites.s1.rainSprites[i]);
|
||||||
}
|
}
|
||||||
gWeatherPtr->rainSpriteCount = 0;
|
gWeatherPtr->rainSpriteCount = 0;
|
||||||
FreeSpriteTilesByTag(0x1206);
|
FreeSpriteTilesByTag(GFXTAG_RAIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef tCounter
|
#undef tCounter
|
||||||
@ -879,7 +879,7 @@ static const union AnimCmd *const sSnowflakeAnimCmds[] =
|
|||||||
static const struct SpriteTemplate sSnowflakeSpriteTemplate =
|
static const struct SpriteTemplate sSnowflakeSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = 0xFFFF,
|
.tileTag = 0xFFFF,
|
||||||
.paletteTag = 0x1200,
|
.paletteTag = PALTAG_WEATHER,
|
||||||
.oam = &sSnowflakeSpriteOamData,
|
.oam = &sSnowflakeSpriteOamData,
|
||||||
.anims = sSnowflakeAnimCmds,
|
.anims = sSnowflakeAnimCmds,
|
||||||
.images = sSnowflakeSpriteImages,
|
.images = sSnowflakeSpriteImages,
|
||||||
@ -1317,8 +1317,8 @@ static const union AffineAnimCmd *const gSpriteAffineAnimTable_839AB8C[] =
|
|||||||
static void FogHorizontalSpriteCallback(struct Sprite *);
|
static void FogHorizontalSpriteCallback(struct Sprite *);
|
||||||
static const struct SpriteTemplate sFogHorizontalSpriteTemplate =
|
static const struct SpriteTemplate sFogHorizontalSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = 0x1201,
|
.tileTag = GFXTAG_FOG_H,
|
||||||
.paletteTag = 0x1200,
|
.paletteTag = PALTAG_WEATHER,
|
||||||
.oam = &gOamData_839AB2C,
|
.oam = &gOamData_839AB2C,
|
||||||
.anims = gSpriteAnimTable_839AB64,
|
.anims = gSpriteAnimTable_839AB64,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
@ -1433,7 +1433,7 @@ static void CreateFogHorizontalSprites(void)
|
|||||||
struct SpriteSheet fogHorizontalSpriteSheet = {
|
struct SpriteSheet fogHorizontalSpriteSheet = {
|
||||||
.data = gWeatherFogHorizontalTiles,
|
.data = gWeatherFogHorizontalTiles,
|
||||||
.size = sizeof(gWeatherFogHorizontalTiles),
|
.size = sizeof(gWeatherFogHorizontalTiles),
|
||||||
.tag = 0x1201,
|
.tag = GFXTAG_FOG_H,
|
||||||
};
|
};
|
||||||
LoadSpriteSheet(&fogHorizontalSpriteSheet);
|
LoadSpriteSheet(&fogHorizontalSpriteSheet);
|
||||||
for (i = 0; i < NUM_FOG_HORIZONTAL_SPRITES; i++)
|
for (i = 0; i < NUM_FOG_HORIZONTAL_SPRITES; i++)
|
||||||
@ -1469,7 +1469,7 @@ static void DestroyFogHorizontalSprites(void)
|
|||||||
DestroySprite(gWeatherPtr->sprites.s2.fogHSprites[i]);
|
DestroySprite(gWeatherPtr->sprites.s2.fogHSprites[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
FreeSpriteTilesByTag(0x1201);
|
FreeSpriteTilesByTag(GFXTAG_FOG_H);
|
||||||
gWeatherPtr->fogHSpritesCreated = 0;
|
gWeatherPtr->fogHSpritesCreated = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1567,7 +1567,7 @@ static const struct SpriteSheet sAshSpriteSheet =
|
|||||||
{
|
{
|
||||||
.data = gWeatherAshTiles,
|
.data = gWeatherAshTiles,
|
||||||
.size = sizeof(gWeatherAshTiles),
|
.size = sizeof(gWeatherAshTiles),
|
||||||
.tag = 0x1202,
|
.tag = GFXTAG_ASH,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void LoadAshSpriteSheet(void)
|
static void LoadAshSpriteSheet(void)
|
||||||
@ -1603,8 +1603,8 @@ static const union AnimCmd *const sAshSpriteAnimCmds[] =
|
|||||||
|
|
||||||
static const struct SpriteTemplate sAshSpriteTemplate =
|
static const struct SpriteTemplate sAshSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = 4610,
|
.tileTag = GFXTAG_ASH,
|
||||||
.paletteTag = 0x1200,
|
.paletteTag = PALTAG_WEATHER,
|
||||||
.oam = &sAshSpriteOamData,
|
.oam = &sAshSpriteOamData,
|
||||||
.anims = sAshSpriteAnimCmds,
|
.anims = sAshSpriteAnimCmds,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
@ -1659,7 +1659,7 @@ static void DestroyAshSprites(void)
|
|||||||
DestroySprite(gWeatherPtr->sprites.s2.ashSprites[i]);
|
DestroySprite(gWeatherPtr->sprites.s2.ashSprites[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
FreeSpriteTilesByTag(0x1202);
|
FreeSpriteTilesByTag(GFXTAG_ASH);
|
||||||
gWeatherPtr->ashSpritesCreated = FALSE;
|
gWeatherPtr->ashSpritesCreated = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1790,7 +1790,7 @@ static const struct SpriteSheet gFogDiagonalSpriteSheet =
|
|||||||
{
|
{
|
||||||
.data = gWeatherFogDiagonalTiles,
|
.data = gWeatherFogDiagonalTiles,
|
||||||
.size = sizeof(gWeatherFogDiagonalTiles),
|
.size = sizeof(gWeatherFogDiagonalTiles),
|
||||||
.tag = 0x1203,
|
.tag = GFXTAG_FOG_D,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct OamData sFogDiagonalSpriteOamData =
|
static const struct OamData sFogDiagonalSpriteOamData =
|
||||||
@ -1820,8 +1820,8 @@ static const union AnimCmd *const sFogDiagonalSpriteAnimCmds[] =
|
|||||||
|
|
||||||
static const struct SpriteTemplate sFogDiagonalSpriteTemplate =
|
static const struct SpriteTemplate sFogDiagonalSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = 0x1203,
|
.tileTag = GFXTAG_FOG_D,
|
||||||
.paletteTag = 0x1200,
|
.paletteTag = PALTAG_WEATHER,
|
||||||
.oam = &sFogDiagonalSpriteOamData,
|
.oam = &sFogDiagonalSpriteOamData,
|
||||||
.anims = sFogDiagonalSpriteAnimCmds,
|
.anims = sFogDiagonalSpriteAnimCmds,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
@ -1875,7 +1875,7 @@ static void DestroyFogDiagonalSprites(void)
|
|||||||
DestroySprite(gWeatherPtr->sprites.s2.fogDSprites[i]);
|
DestroySprite(gWeatherPtr->sprites.s2.fogDSprites[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
FreeSpriteTilesByTag(0x1203);
|
FreeSpriteTilesByTag(GFXTAG_FOG_D);
|
||||||
gWeatherPtr->fogDSpritesCreated = FALSE;
|
gWeatherPtr->fogDSpritesCreated = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2018,7 +2018,7 @@ static void DestroySandstormSprites(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
gWeatherPtr->sandstormSpritesCreated = FALSE;
|
gWeatherPtr->sandstormSpritesCreated = FALSE;
|
||||||
FreeSpriteTilesByTag(0x1204);
|
FreeSpriteTilesByTag(GFXTAG_SANDSTORM);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gWeatherPtr->sandstormSwirlSpritesCreated)
|
if (gWeatherPtr->sandstormSwirlSpritesCreated)
|
||||||
@ -2067,8 +2067,8 @@ static const union AnimCmd *const sSandstormSpriteAnimCmds[] =
|
|||||||
|
|
||||||
static const struct SpriteTemplate sSandstormSpriteTemplate =
|
static const struct SpriteTemplate sSandstormSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = 0x1204,
|
.tileTag = GFXTAG_SANDSTORM,
|
||||||
.paletteTag = 0x1201,
|
.paletteTag = PALTAG_WEATHER_2,
|
||||||
.oam = &sSandstormSpriteOamData,
|
.oam = &sSandstormSpriteOamData,
|
||||||
.anims = sSandstormSpriteAnimCmds,
|
.anims = sSandstormSpriteAnimCmds,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
@ -2080,7 +2080,7 @@ static const struct SpriteSheet sSandstormSpriteSheet =
|
|||||||
{
|
{
|
||||||
.data = gWeatherSandstormTiles,
|
.data = gWeatherSandstormTiles,
|
||||||
.size = sizeof(gWeatherSandstormTiles),
|
.size = sizeof(gWeatherSandstormTiles),
|
||||||
.tag = 0x1204,
|
.tag = GFXTAG_SANDSTORM,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Regular sandstorm sprites
|
// Regular sandstorm sprites
|
||||||
@ -2242,7 +2242,7 @@ static const struct SpriteSheet sWeatherBubbleSpriteSheet =
|
|||||||
{
|
{
|
||||||
.data = gWeatherBubbleTiles,
|
.data = gWeatherBubbleTiles,
|
||||||
.size = sizeof(gWeatherBubbleTiles),
|
.size = sizeof(gWeatherBubbleTiles),
|
||||||
.tag = 0x1205,
|
.tag = GFXTAG_BUBBLE,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const s16 sBubbleStartCoords[][2] =
|
static const s16 sBubbleStartCoords[][2] =
|
||||||
@ -2322,8 +2322,8 @@ static const union AnimCmd *const sBubbleSpriteAnimCmds[] =
|
|||||||
|
|
||||||
static const struct SpriteTemplate sBubbleSpriteTemplate =
|
static const struct SpriteTemplate sBubbleSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = 0x1205,
|
.tileTag = GFXTAG_BUBBLE,
|
||||||
.paletteTag = 0x1200,
|
.paletteTag = PALTAG_WEATHER,
|
||||||
.oam = &gOamData_AffineOff_ObjNormal_8x8,
|
.oam = &gOamData_AffineOff_ObjNormal_8x8,
|
||||||
.anims = sBubbleSpriteAnimCmds,
|
.anims = sBubbleSpriteAnimCmds,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
@ -2363,7 +2363,7 @@ static void DestroyBubbleSprites(void)
|
|||||||
DestroySprite(&gSprites[i]);
|
DestroySprite(&gSprites[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
FreeSpriteTilesByTag(0x1205);
|
FreeSpriteTilesByTag(GFXTAG_BUBBLE);
|
||||||
gWeatherPtr->bubblesSpriteCount = 0;
|
gWeatherPtr->bubblesSpriteCount = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user