diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c index 611c1bec59..1f768274aa 100644 --- a/src/battle_gfx_sfx_util.c +++ b/src/battle_gfx_sfx_util.c @@ -1185,7 +1185,7 @@ void CreateEnemyShadowSprite(u32 battler) { gBattleSpritesDataPtr->healthBoxesData[battler].shadowSpriteIdPrimary = CreateSprite(&gSpriteTemplate_EnemyShadow, GetBattlerSpriteCoord(battler, BATTLER_COORD_X), - GetBattlerSpriteCoord(battler, BATTLER_COORD_Y), + GetBattlerSpriteCoord(battler, BATTLER_COORD_Y) + 29, 0xC8); if (gBattleSpritesDataPtr->healthBoxesData[battler].shadowSpriteIdPrimary < MAX_SPRITES) { @@ -1247,9 +1247,11 @@ void SpriteCB_EnemyShadow(struct Sprite *shadowSprite) return; } - s8 xOffset = 0, yOffset = 0, size = SHADOW_SIZE_S; + s8 xOffset = 0, UNUSED yOffset = 0, size = SHADOW_SIZE_S; if (gAnimScriptActive || battlerSprite->invisible) + { invisible = TRUE; + } else if (transformSpecies != SPECIES_NONE) { xOffset = gSpeciesInfo[transformSpecies].enemyShadowXOffset; @@ -1267,21 +1269,19 @@ void SpriteCB_EnemyShadow(struct Sprite *shadowSprite) yOffset = gSpeciesInfo[species].enemyShadowYOffset + 16; size = gSpeciesInfo[species].enemyShadowSize; } - else - { - yOffset = 29; - } if (gBattleSpritesDataPtr->battlerData[battler].behindSubstitute) invisible = TRUE; shadowSprite->x = battlerSprite->x + xOffset; shadowSprite->x2 = battlerSprite->x2; - shadowSprite->y = battlerSprite->y + yOffset; shadowSprite->invisible = invisible; if (B_ENEMY_MON_SHADOW_STYLE >= GEN_4 && P_GBA_STYLE_SPECIES_GFX == FALSE) + { shadowSprite->oam.tileNum = shadowSprite->tBaseTileNum + (8 * size); + shadowSprite->y = battlerSprite->y + yOffset; + } } #undef tBattlerId