-
Notifications
You must be signed in to change notification settings - Fork 3
/
Game.h
53 lines (45 loc) · 1.42 KB
/
Game.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#pragma once
void Game_EnterPostRaceFlow()
{
DWORD* RaceParameters; // esi
DWORD* MessageKind; // eax
DWORD* RaceDatabase; // edi
unsigned int EventHash; // eax
DWORD* ScoreInfo; // eax
int MessageHash[4]; // [esp-4h] [ebp-20h] BYREF
BYTE v6[16]; // [esp+Ch] [ebp-10h] BYREF
DWORD* GRaceStatusfObj = *(DWORD**)GRaceStatus_fObj;
GRaceStatus_FinalizeRaceStats(GRaceStatusfObj);
Game_AbandonRace();
RaceParameters = (DWORD*)GRaceStatusfObj[1626];
DWORD* WinningPlayerInfo = GRaceStatus_GetWinningPlayerInfo(GRaceStatusfObj); // unused??
if (!RaceParameters)
{
goto ShowPostRaceScr;
}
// Play Outro Movie
MessageHash[3] = (int)MessageHash;
MessageHash[0] = 0x20D60DBF;
MessageKind = (DWORD*)MFlowReadyForOutro_GetKind(v6);
Hermes_Message_Post(MessageKind, MessageHash[0]);
// If not career mode
if (GRaceStatusfObj[1625] != 2)
{
goto ShowPostRaceScr;
}
// If the race shouldn't have a post race screen
if (GRaceParameters_GetNoPostRaceScreen(RaceParameters))
{
// score stuff
RaceDatabase = *(DWORD**)GRaceDatabase_mObj;
EventHash = GRaceParameters_GetEventHash(RaceParameters);
ScoreInfo = GRaceDatabase_GetScoreInfo(RaceDatabase, EventHash);
*(DWORD*)(ScoreInfo + 4) |= 2u;
}
else
{
ShowPostRaceScr:
FE_ShowPostRaceScreen(1);
return;
}
}