summaryrefslogtreecommitdiff
path: root/src/battle_tent.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/battle_tent.c')
-rw-r--r--src/battle_tent.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/battle_tent.c b/src/battle_tent.c
index de0ecea98..26b2e8bb1 100644
--- a/src/battle_tent.c
+++ b/src/battle_tent.c
@@ -354,11 +354,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;
@@ -379,7 +375,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;