diff options
Diffstat (limited to 'src/battle_tent.c')
-rw-r--r-- | src/battle_tent.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/battle_tent.c b/src/battle_tent.c index 0a03fc167..250e2d8ee 100644 --- a/src/battle_tent.c +++ b/src/battle_tent.c @@ -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; |