fixed front sprite shadow palette

This commit is contained in:
TheXaman 2021-12-13 15:37:06 +01:00
parent e33abe6213
commit d300b8f56c
2 changed files with 6 additions and 0 deletions

View File

@ -77,7 +77,11 @@ static const struct CompressedSpriteSheet sSpriteSheets_HealthBar[MAX_BATTLERS_C
{gBlankGfxCompressed, 0x0120, TAG_HEALTHBAR_OPPONENT2_TILE}
};
#if P_ENABLE_DEBUG
const struct SpritePalette sSpritePalettes_HealthBoxHealthBar[2] =
#else
static const struct SpritePalette sSpritePalettes_HealthBoxHealthBar[2] =
#endif
{
{gBattleInterface_BallStatusBarPal, TAG_HEALTHBOX_PAL},
{gBattleInterface_BallDisplayPal, TAG_HEALTHBAR_PAL}

View File

@ -42,6 +42,7 @@
extern const struct BattleBackground sBattleTerrainTable[];
extern const struct CompressedSpriteSheet gSpriteSheet_EnemyShadow;
extern const struct SpriteTemplate gSpriteTemplate_EnemyShadow;
extern const struct SpritePalette sSpritePalettes_HealthBoxHealthBar[2];
extern const struct UCoords8 sBattlerCoords[][MAX_BATTLERS_COUNT] ;
extern const struct MonCoords gCastformFrontSpriteCoords[NUM_CASTFORM_FORMS];
extern const u8 sCastformElevations[NUM_CASTFORM_FORMS];
@ -739,6 +740,7 @@ static void LoadAndCreateEnemyShadowSpriteCustom(struct PokemonDebugMenu *data,
if (gEnemyMonElevation[species] == 0 && !IsCastformForm(species))
return;
LoadCompressedSpriteSheet(&gSpriteSheet_EnemyShadow);
LoadSpritePalette(&sSpritePalettes_HealthBoxHealthBar[0]);
data->frontShadowSpriteId = CreateSprite(&gSpriteTemplate_EnemyShadow, x, y + 29, 0xC8);
gSprites[data->frontShadowSpriteId].data[0] = data->frontspriteId;