diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2020-12-31 00:40:45 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-31 00:40:45 -0500 |
commit | ec85c01e7c6d15060eddcc653db33a4b317646d2 (patch) | |
tree | 4266c43bcdc1c80c52def44e1470182d3f1c665c /src/battle_tent.c | |
parent | 093610b46e99b517a416ccd5a572054dff09801b (diff) | |
parent | 0c74e2097ffbe8395d6f3659c2a49fc829d69b99 (diff) |
Merge branch 'master' into doc-factscreen
Diffstat (limited to 'src/battle_tent.c')
-rw-r--r-- | src/battle_tent.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/battle_tent.c b/src/battle_tent.c index 0a03fc167..26b2e8bb1 100644 --- a/src/battle_tent.c +++ b/src/battle_tent.c @@ -17,7 +17,6 @@ #include "constants/items.h" #include "constants/layouts.h" #include "constants/region_map_sections.h" -#include "constants/species.h" #include "constants/trainers.h" // This file's functions. @@ -355,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; @@ -380,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; @@ -421,7 +417,7 @@ static void GenerateOpponentMons(void) species[i] = gFacilityTrainerMons[sRandMonSetId].species; heldItems[i] = gBattleFrontierHeldItems[gFacilityTrainerMons[sRandMonSetId].itemTableId]; - gUnknown_03006298[i] = sRandMonSetId; + gFrontierTempParty[i] = sRandMonSetId; i++; } } |