summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGriffinR <griffin.g.richards@gmail.com>2021-02-15 23:59:55 -0500
committerGitHub <noreply@github.com>2021-02-15 23:59:55 -0500
commit2e355ac8480941f791192c1342a2bdfcd3951fe7 (patch)
tree82065a81e4f081fe2e5fa18d9b32f1ebe8bd1cef /src
parentee4af94a36b805bace8c2003c0cc41178290338f (diff)
parent10e430ae1596da8c34a6f697d3ee7854dd7e868f (diff)
Merge pull request #1329 from Kurausukun/fakematches
[LEAK-INFORMED] Resolve Fakematches
Diffstat (limited to 'src')
-rw-r--r--src/battle_dome.c13
-rw-r--r--src/contest_painting.c7
2 files changed, 10 insertions, 10 deletions
diff --git a/src/battle_dome.c b/src/battle_dome.c
index 780721768..cce3aaccd 100644
--- a/src/battle_dome.c
+++ b/src/battle_dome.c
@@ -5774,6 +5774,8 @@ static void InitRandomTourneyTreeResults(void)
int monTypesBits;
int trainerId;
int monId;
+ int zero1;
+ int zero2;
u8 lvlMode;
u16 *statSums;
int *statValues;
@@ -5789,12 +5791,11 @@ static void InitRandomTourneyTreeResults(void)
statValues = AllocZeroed(sizeof(int) * NUM_STATS);
lvlMode = gSaveBlock2Ptr->frontier.lvlMode;
gSaveBlock2Ptr->frontier.lvlMode = FRONTIER_LVL_50;
- // This one, I'd like to call a 'C fakematching'.
- {
- u8 one;
- gSaveBlock2Ptr->frontier.domeLvlMode = (one = 1);
- gSaveBlock2Ptr->frontier.domeBattleMode = one;
- }
+ zero1 = 0;
+ zero2 = 0;
+
+ gSaveBlock2Ptr->frontier.domeLvlMode = zero1 + 1;
+ gSaveBlock2Ptr->frontier.domeBattleMode = zero2 + 1;
for (i = 0; i < DOME_TOURNAMENT_TRAINERS_COUNT; i++)
{
diff --git a/src/contest_painting.c b/src/contest_painting.c
index 1602eb94f..fecca1226 100644
--- a/src/contest_painting.c
+++ b/src/contest_painting.c
@@ -165,12 +165,11 @@ const u16 gUnknown_085B0838[] = {RGB(0, 0, 0), RGB(0, 0, 0)};
void SetContestWinnerForPainting(int contestWinnerId)
{
- // probably fakematching
u8 *ptr1 = &gUnknown_02039F5D;
u8 *ptr2 = &gUnknown_02039F5C;
- gCurContestWinner = gSaveBlock1Ptr->contestWinners[contestWinnerId - 1];
- *ptr1 = contestWinnerId - 1;
- *ptr2 = FALSE;
+ gCurContestWinner = gSaveBlock1Ptr->contestWinners[contestWinnerId - 1];
+ *ptr1 = contestWinnerId - 1;
+ *ptr2 = FALSE;
}
void CB2_ContestPainting(void)