Match two minor functions in battle_tent and berry_crush

This commit is contained in:
Kaz
2020-09-12 21:51:16 -04:00
parent c0987169dd
commit d0fcb9168b
2 changed files with 8 additions and 18 deletions

View File

@@ -355,11 +355,7 @@ static void GenerateOpponentMons(void)
{
u16 trainerId;
s32 i, j, k;
#ifndef NONMATCHING
register const u16 *monSet asm("r9"); // Fix me. Compiler insists on moving that variable into stack.
#else
const u16 *monSet;
#endif
const u16 *monSet;
u16 species[FRONTIER_PARTY_SIZE];
u16 heldItems[FRONTIER_PARTY_SIZE];
s32 monId = 0;
@@ -380,7 +376,8 @@ static void GenerateOpponentMons(void)
} while (i != gSaveBlock2Ptr->frontier.curChallengeBattleNum);
gTrainerBattleOpponent_A = trainerId;
while (gFacilityTrainers[gTrainerBattleOpponent_A].monSet[monId] != 0xFFFF)
monSet = gFacilityTrainers[gTrainerBattleOpponent_A].monSet;
while (monSet[monId] != 0xFFFF)
monId++;
if (monId > 8)
break;