Merge pull request #1329 from Kurausukun/fakematches

[LEAK-INFORMED] Resolve Fakematches
This commit is contained in:
GriffinR 2021-02-15 23:59:55 -05:00 committed by GitHub
commit 2e355ac848
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 10 deletions

View File

@ -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++)
{

View File

@ -165,7 +165,6 @@ 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];