From 2ebb3f16a59c2508166831adac7744b05a110b6e Mon Sep 17 00:00:00 2001 From: Hedara Date: Sat, 31 Aug 2024 18:35:51 +0200 Subject: [PATCH] Fixed GEN_3 setting --- src/battle_controller_opponent.c | 8 ++++++++ src/battle_controller_recorded_opponent.c | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/src/battle_controller_opponent.c b/src/battle_controller_opponent.c index 040fd072bd3e..d80af87479be 100644 --- a/src/battle_controller_opponent.c +++ b/src/battle_controller_opponent.c @@ -271,8 +271,12 @@ static void Intro_TryShinyAnimShowHealthbox(u32 battler) { if (gSprites[gBattleControllerData[battler]].callback == SpriteCallbackDummy) { +#if B_ENEMY_MON_SHADOW_STYLE >= GEN_4 if (gSprites[gBattleSpritesDataPtr->healthBoxesData[battler].shadowSpriteIdLeft].callback == SpriteCallbackDummy && gSprites[gBattleSpritesDataPtr->healthBoxesData[battler].shadowSpriteIdRight].callback == SpriteCallbackDummy) +#else + if (gSprites[gBattleSpritesDataPtr->healthBoxesData[battler].shadowSpriteId].callback == SpriteCallbackDummy) +#endif { SetBattlerShadowSpriteCallback(battler, GetMonData(&gEnemyParty[gBattlerPartyIndexes[battler]], MON_DATA_SPECIES)); } @@ -288,8 +292,12 @@ static void Intro_TryShinyAnimShowHealthbox(u32 battler) if (gSprites[gBattleControllerData[battler]].callback == SpriteCallbackDummy && gSprites[gBattleControllerData[BATTLE_PARTNER(battler)]].callback == SpriteCallbackDummy) { +#if B_ENEMY_MON_SHADOW_STYLE >= GEN_4 if (gSprites[gBattleSpritesDataPtr->healthBoxesData[BATTLE_PARTNER(battler)].shadowSpriteIdLeft].callback == SpriteCallbackDummy && gSprites[gBattleSpritesDataPtr->healthBoxesData[BATTLE_PARTNER(battler)].shadowSpriteIdRight].callback == SpriteCallbackDummy) +#else + if (gSprites[gBattleSpritesDataPtr->healthBoxesData[BATTLE_PARTNER(battler)].shadowSpriteId].callback == SpriteCallbackDummy) +#endif { SetBattlerShadowSpriteCallback(BATTLE_PARTNER(battler), GetMonData(&gEnemyParty[gBattlerPartyIndexes[BATTLE_PARTNER(battler)]], MON_DATA_SPECIES)); } diff --git a/src/battle_controller_recorded_opponent.c b/src/battle_controller_recorded_opponent.c index fa5c7dd966da..3b349fd6a80a 100644 --- a/src/battle_controller_recorded_opponent.c +++ b/src/battle_controller_recorded_opponent.c @@ -255,8 +255,12 @@ static void Intro_TryShinyAnimShowHealthbox(u32 battler) { if (gSprites[gBattleControllerData[battler]].callback == SpriteCallbackDummy) { +#if B_ENEMY_MON_SHADOW_STYLE >= GEN_4 if (gSprites[gBattleSpritesDataPtr->healthBoxesData[battler].shadowSpriteIdLeft].callback == SpriteCallbackDummy && gSprites[gBattleSpritesDataPtr->healthBoxesData[battler].shadowSpriteIdRight].callback == SpriteCallbackDummy) +#else + if (gSprites[gBattleSpritesDataPtr->healthBoxesData[battler].shadowSpriteId].callback == SpriteCallbackDummy) +#endif { SetBattlerShadowSpriteCallback(battler, GetMonData(&gEnemyParty[gBattlerPartyIndexes[battler]], MON_DATA_SPECIES)); } @@ -272,8 +276,12 @@ static void Intro_TryShinyAnimShowHealthbox(u32 battler) if (gSprites[gBattleControllerData[battler]].callback == SpriteCallbackDummy && gSprites[gBattleControllerData[BATTLE_PARTNER(battler)]].callback == SpriteCallbackDummy) { +#if B_ENEMY_MON_SHADOW_STYLE >= GEN_4 if (gSprites[gBattleSpritesDataPtr->healthBoxesData[BATTLE_PARTNER(battler)].shadowSpriteIdLeft].callback == SpriteCallbackDummy && gSprites[gBattleSpritesDataPtr->healthBoxesData[BATTLE_PARTNER(battler)].shadowSpriteIdRight].callback == SpriteCallbackDummy) +#else + if (gSprites[gBattleSpritesDataPtr->healthBoxesData[BATTLE_PARTNER(battler)].shadowSpriteId].callback == SpriteCallbackDummy) +#endif { SetBattlerShadowSpriteCallback(BATTLE_PARTNER(battler), GetMonData(&gEnemyParty[gBattlerPartyIndexes[BATTLE_PARTNER(battler)]], MON_DATA_SPECIES)); }