Skip to content

Commit

Permalink
Merge pull request #1 from hedara90/lead-shadows
Browse files Browse the repository at this point in the history
Fixed GEN_3 setting
  • Loading branch information
lhearachel authored Aug 31, 2024
2 parents 29ab188 + 2ebb3f1 commit 3c66975
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/battle_controller_opponent.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand All @@ -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));
}
Expand Down
8 changes: 8 additions & 0 deletions src/battle_controller_recorded_opponent.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand All @@ -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));
}
Expand Down

0 comments on commit 3c66975

Please sign in to comment.