Sync drought with pokefirered, add weather tags
This commit is contained in:
+34
-34
@@ -51,7 +51,7 @@ static const struct SpriteSheet sCloudSpriteSheet =
|
||||
{
|
||||
.data = gWeatherCloudTiles,
|
||||
.size = sizeof(gWeatherCloudTiles),
|
||||
.tag = 0x1200
|
||||
.tag = GFXTAG_CLOUD
|
||||
};
|
||||
|
||||
static const struct OamData sCloudSpriteOamData =
|
||||
@@ -84,8 +84,8 @@ static const union AnimCmd *const sCloudSpriteAnimCmds[] =
|
||||
|
||||
static const struct SpriteTemplate sCloudSpriteTemplate =
|
||||
{
|
||||
.tileTag = 0x1200,
|
||||
.paletteTag = 0x1201,
|
||||
.tileTag = GFXTAG_CLOUD,
|
||||
.paletteTag = PALTAG_WEATHER_2,
|
||||
.oam = &sCloudSpriteOamData,
|
||||
.anims = sCloudSpriteAnimCmds,
|
||||
.images = NULL,
|
||||
@@ -214,7 +214,7 @@ static void DestroyCloudSprites(void)
|
||||
DestroySprite(gWeatherPtr->sprites.s1.cloudSprites[i]);
|
||||
}
|
||||
|
||||
FreeSpriteTilesByTag(0x1200);
|
||||
FreeSpriteTilesByTag(GFXTAG_CLOUD);
|
||||
gWeatherPtr->cloudSpritesCreated = FALSE;
|
||||
}
|
||||
|
||||
@@ -264,19 +264,19 @@ void Drought_Main(void)
|
||||
gWeatherPtr->initStep++;
|
||||
break;
|
||||
case 3:
|
||||
sub_80ABFF0();
|
||||
DroughtStateInit();
|
||||
gWeatherPtr->initStep++;
|
||||
break;
|
||||
case 4:
|
||||
sub_80AC01C();
|
||||
if (gWeatherPtr->unknown_73C == 6)
|
||||
DroughtStateRun();
|
||||
if (gWeatherPtr->droughtBrightnessStage == 6)
|
||||
{
|
||||
gWeatherPtr->weatherGfxLoaded = TRUE;
|
||||
gWeatherPtr->initStep++;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
sub_80AC01C();
|
||||
DroughtStateRun();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -288,7 +288,7 @@ bool8 Drought_Finish(void)
|
||||
|
||||
void StartDroughtWeatherBlend(void)
|
||||
{
|
||||
CreateTask(UpdateDroughtBlend, 0x50);
|
||||
CreateTask(UpdateDroughtBlend, 80);
|
||||
}
|
||||
|
||||
#define tState data[0]
|
||||
@@ -437,8 +437,8 @@ static const union AnimCmd *const sRainSpriteAnimCmds[] =
|
||||
|
||||
static const struct SpriteTemplate sRainSpriteTemplate =
|
||||
{
|
||||
.tileTag = 4614,
|
||||
.paletteTag = 0x1200,
|
||||
.tileTag = GFXTAG_RAIN,
|
||||
.paletteTag = PALTAG_WEATHER,
|
||||
.oam = &sRainSpriteOamData,
|
||||
.anims = sRainSpriteAnimCmds,
|
||||
.images = NULL,
|
||||
@@ -466,7 +466,7 @@ static const struct SpriteSheet sRainSpriteSheet =
|
||||
{
|
||||
.data = gWeatherRainTiles,
|
||||
.size = sizeof(gWeatherRainTiles),
|
||||
.tag = 0x1206,
|
||||
.tag = GFXTAG_RAIN,
|
||||
};
|
||||
|
||||
void Rain_InitVars(void)
|
||||
@@ -744,7 +744,7 @@ static void DestroyRainSprites(void)
|
||||
DestroySprite(gWeatherPtr->sprites.s1.rainSprites[i]);
|
||||
}
|
||||
gWeatherPtr->rainSpriteCount = 0;
|
||||
FreeSpriteTilesByTag(0x1206);
|
||||
FreeSpriteTilesByTag(GFXTAG_RAIN);
|
||||
}
|
||||
|
||||
#undef tCounter
|
||||
@@ -879,7 +879,7 @@ static const union AnimCmd *const sSnowflakeAnimCmds[] =
|
||||
static const struct SpriteTemplate sSnowflakeSpriteTemplate =
|
||||
{
|
||||
.tileTag = 0xFFFF,
|
||||
.paletteTag = 0x1200,
|
||||
.paletteTag = PALTAG_WEATHER,
|
||||
.oam = &sSnowflakeSpriteOamData,
|
||||
.anims = sSnowflakeAnimCmds,
|
||||
.images = sSnowflakeSpriteImages,
|
||||
@@ -1317,8 +1317,8 @@ static const union AffineAnimCmd *const gSpriteAffineAnimTable_839AB8C[] =
|
||||
static void FogHorizontalSpriteCallback(struct Sprite *);
|
||||
static const struct SpriteTemplate sFogHorizontalSpriteTemplate =
|
||||
{
|
||||
.tileTag = 0x1201,
|
||||
.paletteTag = 0x1200,
|
||||
.tileTag = GFXTAG_FOG_H,
|
||||
.paletteTag = PALTAG_WEATHER,
|
||||
.oam = &gOamData_839AB2C,
|
||||
.anims = gSpriteAnimTable_839AB64,
|
||||
.images = NULL,
|
||||
@@ -1433,7 +1433,7 @@ static void CreateFogHorizontalSprites(void)
|
||||
struct SpriteSheet fogHorizontalSpriteSheet = {
|
||||
.data = gWeatherFogHorizontalTiles,
|
||||
.size = sizeof(gWeatherFogHorizontalTiles),
|
||||
.tag = 0x1201,
|
||||
.tag = GFXTAG_FOG_H,
|
||||
};
|
||||
LoadSpriteSheet(&fogHorizontalSpriteSheet);
|
||||
for (i = 0; i < NUM_FOG_HORIZONTAL_SPRITES; i++)
|
||||
@@ -1469,7 +1469,7 @@ static void DestroyFogHorizontalSprites(void)
|
||||
DestroySprite(gWeatherPtr->sprites.s2.fogHSprites[i]);
|
||||
}
|
||||
|
||||
FreeSpriteTilesByTag(0x1201);
|
||||
FreeSpriteTilesByTag(GFXTAG_FOG_H);
|
||||
gWeatherPtr->fogHSpritesCreated = 0;
|
||||
}
|
||||
}
|
||||
@@ -1567,7 +1567,7 @@ static const struct SpriteSheet sAshSpriteSheet =
|
||||
{
|
||||
.data = gWeatherAshTiles,
|
||||
.size = sizeof(gWeatherAshTiles),
|
||||
.tag = 0x1202,
|
||||
.tag = GFXTAG_ASH,
|
||||
};
|
||||
|
||||
static void LoadAshSpriteSheet(void)
|
||||
@@ -1603,8 +1603,8 @@ static const union AnimCmd *const sAshSpriteAnimCmds[] =
|
||||
|
||||
static const struct SpriteTemplate sAshSpriteTemplate =
|
||||
{
|
||||
.tileTag = 4610,
|
||||
.paletteTag = 0x1200,
|
||||
.tileTag = GFXTAG_ASH,
|
||||
.paletteTag = PALTAG_WEATHER,
|
||||
.oam = &sAshSpriteOamData,
|
||||
.anims = sAshSpriteAnimCmds,
|
||||
.images = NULL,
|
||||
@@ -1659,7 +1659,7 @@ static void DestroyAshSprites(void)
|
||||
DestroySprite(gWeatherPtr->sprites.s2.ashSprites[i]);
|
||||
}
|
||||
|
||||
FreeSpriteTilesByTag(0x1202);
|
||||
FreeSpriteTilesByTag(GFXTAG_ASH);
|
||||
gWeatherPtr->ashSpritesCreated = FALSE;
|
||||
}
|
||||
}
|
||||
@@ -1790,7 +1790,7 @@ static const struct SpriteSheet gFogDiagonalSpriteSheet =
|
||||
{
|
||||
.data = gWeatherFogDiagonalTiles,
|
||||
.size = sizeof(gWeatherFogDiagonalTiles),
|
||||
.tag = 0x1203,
|
||||
.tag = GFXTAG_FOG_D,
|
||||
};
|
||||
|
||||
static const struct OamData sFogDiagonalSpriteOamData =
|
||||
@@ -1820,8 +1820,8 @@ static const union AnimCmd *const sFogDiagonalSpriteAnimCmds[] =
|
||||
|
||||
static const struct SpriteTemplate sFogDiagonalSpriteTemplate =
|
||||
{
|
||||
.tileTag = 0x1203,
|
||||
.paletteTag = 0x1200,
|
||||
.tileTag = GFXTAG_FOG_D,
|
||||
.paletteTag = PALTAG_WEATHER,
|
||||
.oam = &sFogDiagonalSpriteOamData,
|
||||
.anims = sFogDiagonalSpriteAnimCmds,
|
||||
.images = NULL,
|
||||
@@ -1875,7 +1875,7 @@ static void DestroyFogDiagonalSprites(void)
|
||||
DestroySprite(gWeatherPtr->sprites.s2.fogDSprites[i]);
|
||||
}
|
||||
|
||||
FreeSpriteTilesByTag(0x1203);
|
||||
FreeSpriteTilesByTag(GFXTAG_FOG_D);
|
||||
gWeatherPtr->fogDSpritesCreated = FALSE;
|
||||
}
|
||||
}
|
||||
@@ -2018,7 +2018,7 @@ static void DestroySandstormSprites(void)
|
||||
}
|
||||
|
||||
gWeatherPtr->sandstormSpritesCreated = FALSE;
|
||||
FreeSpriteTilesByTag(0x1204);
|
||||
FreeSpriteTilesByTag(GFXTAG_SANDSTORM);
|
||||
}
|
||||
|
||||
if (gWeatherPtr->sandstormSwirlSpritesCreated)
|
||||
@@ -2067,8 +2067,8 @@ static const union AnimCmd *const sSandstormSpriteAnimCmds[] =
|
||||
|
||||
static const struct SpriteTemplate sSandstormSpriteTemplate =
|
||||
{
|
||||
.tileTag = 0x1204,
|
||||
.paletteTag = 0x1201,
|
||||
.tileTag = GFXTAG_SANDSTORM,
|
||||
.paletteTag = PALTAG_WEATHER_2,
|
||||
.oam = &sSandstormSpriteOamData,
|
||||
.anims = sSandstormSpriteAnimCmds,
|
||||
.images = NULL,
|
||||
@@ -2080,7 +2080,7 @@ static const struct SpriteSheet sSandstormSpriteSheet =
|
||||
{
|
||||
.data = gWeatherSandstormTiles,
|
||||
.size = sizeof(gWeatherSandstormTiles),
|
||||
.tag = 0x1204,
|
||||
.tag = GFXTAG_SANDSTORM,
|
||||
};
|
||||
|
||||
// Regular sandstorm sprites
|
||||
@@ -2242,7 +2242,7 @@ static const struct SpriteSheet sWeatherBubbleSpriteSheet =
|
||||
{
|
||||
.data = gWeatherBubbleTiles,
|
||||
.size = sizeof(gWeatherBubbleTiles),
|
||||
.tag = 0x1205,
|
||||
.tag = GFXTAG_BUBBLE,
|
||||
};
|
||||
|
||||
static const s16 sBubbleStartCoords[][2] =
|
||||
@@ -2322,8 +2322,8 @@ static const union AnimCmd *const sBubbleSpriteAnimCmds[] =
|
||||
|
||||
static const struct SpriteTemplate sBubbleSpriteTemplate =
|
||||
{
|
||||
.tileTag = 0x1205,
|
||||
.paletteTag = 0x1200,
|
||||
.tileTag = GFXTAG_BUBBLE,
|
||||
.paletteTag = PALTAG_WEATHER,
|
||||
.oam = &gOamData_AffineOff_ObjNormal_8x8,
|
||||
.anims = sBubbleSpriteAnimCmds,
|
||||
.images = NULL,
|
||||
@@ -2363,7 +2363,7 @@ static void DestroyBubbleSprites(void)
|
||||
DestroySprite(&gSprites[i]);
|
||||
}
|
||||
|
||||
FreeSpriteTilesByTag(0x1205);
|
||||
FreeSpriteTilesByTag(GFXTAG_BUBBLE);
|
||||
gWeatherPtr->bubblesSpriteCount = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user