mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-14 13:51:31 +00:00
[FORMAT CHANGE] Add space for extrainfo pointer
This commit is contained in:
parent
b3ef039d87
commit
11586a1091
1 changed files with 10 additions and 2 deletions
12
src/g_game.c
12
src/g_game.c
|
@ -289,7 +289,7 @@ UINT32 timesBeatenWithEmeralds;
|
||||||
//@TODO put these all in a struct for namespacing purposes?
|
//@TODO put these all in a struct for namespacing purposes?
|
||||||
static char demoname[128];
|
static char demoname[128];
|
||||||
static UINT8 *demobuffer = NULL;
|
static UINT8 *demobuffer = NULL;
|
||||||
static UINT8 *demo_p, *demotime_p;
|
static UINT8 *demo_p, *demotime_p, *demoinfo_p;
|
||||||
static UINT8 *demoend;
|
static UINT8 *demoend;
|
||||||
static UINT8 demoflags;
|
static UINT8 demoflags;
|
||||||
static UINT16 demoversion;
|
static UINT16 demoversion;
|
||||||
|
@ -6165,6 +6165,10 @@ void G_BeginRecording(void)
|
||||||
|
|
||||||
WRITEUINT32(demo_p,P_GetInitSeed());
|
WRITEUINT32(demo_p,P_GetInitSeed());
|
||||||
|
|
||||||
|
// Reserved for extrainfo location from start of file
|
||||||
|
demoinfo_p = demo_p;
|
||||||
|
WRITEUINT32(demo_p, 0);
|
||||||
|
|
||||||
// Save netvars
|
// Save netvars
|
||||||
CV_SaveNetVars(&demo_p, true);
|
CV_SaveNetVars(&demo_p, true);
|
||||||
|
|
||||||
|
@ -6567,7 +6571,7 @@ UINT8 G_CmpDemoTime(char *oldname, char *newname)
|
||||||
|
|
||||||
void G_LoadDemoInfo(menudemo_t *pdemo)
|
void G_LoadDemoInfo(menudemo_t *pdemo)
|
||||||
{
|
{
|
||||||
UINT8 *infobuffer, *info_p;
|
UINT8 *infobuffer, *info_p, *extrainfo_p;
|
||||||
UINT8 version, subversion, pdemoflags;
|
UINT8 version, subversion, pdemoflags;
|
||||||
UINT16 pdemoversion, cvarcount;
|
UINT16 pdemoversion, cvarcount;
|
||||||
|
|
||||||
|
@ -6663,6 +6667,8 @@ void G_LoadDemoInfo(menudemo_t *pdemo)
|
||||||
pdemo->addonstatus = G_CheckDemoExtraFiles(&info_p, true);
|
pdemo->addonstatus = G_CheckDemoExtraFiles(&info_p, true);
|
||||||
info_p += 4; // RNG seed
|
info_p += 4; // RNG seed
|
||||||
|
|
||||||
|
extrainfo_p = infobuffer + READUINT32(info_p);
|
||||||
|
|
||||||
// Pared down version of CV_LoadNetVars to find the kart speed
|
// Pared down version of CV_LoadNetVars to find the kart speed
|
||||||
pdemo->kartspeed = 1; // Default to normal speed
|
pdemo->kartspeed = 1; // Default to normal speed
|
||||||
cvarcount = READUINT16(info_p);
|
cvarcount = READUINT16(info_p);
|
||||||
|
@ -6690,6 +6696,7 @@ void G_LoadDemoInfo(menudemo_t *pdemo)
|
||||||
pdemo->kartspeed |= DF_ENCORE;
|
pdemo->kartspeed |= DF_ENCORE;
|
||||||
|
|
||||||
// Temporary info until this is actually present in replays.
|
// Temporary info until this is actually present in replays.
|
||||||
|
(void)extrainfo_p;
|
||||||
sprintf(pdemo->winnername, "transrights420");
|
sprintf(pdemo->winnername, "transrights420");
|
||||||
pdemo->winnerskin = 1;
|
pdemo->winnerskin = 1;
|
||||||
pdemo->winnercolor = SKINCOLOR_MOONSLAM;
|
pdemo->winnercolor = SKINCOLOR_MOONSLAM;
|
||||||
|
@ -6935,6 +6942,7 @@ void G_DoPlayDemo(char *defdemoname)
|
||||||
|
|
||||||
// Random seed
|
// Random seed
|
||||||
randseed = READUINT32(demo_p);
|
randseed = READUINT32(demo_p);
|
||||||
|
demo_p += 4; // Extrainfo location
|
||||||
|
|
||||||
#ifdef DEMO_COMPAT_100
|
#ifdef DEMO_COMPAT_100
|
||||||
if (demoversion == 0x0001) {
|
if (demoversion == 0x0001) {
|
||||||
|
|
Loading…
Reference in a new issue