mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 02:30:46 +00:00
- do not use EDuke32's savegame identifiers.
The engine may be incopatible already and the format will certainly change in the future.
This commit is contained in:
parent
3530c52264
commit
7853a9db6c
6 changed files with 6 additions and 32 deletions
|
@ -16,7 +16,6 @@
|
|||
#include "cache1d.h"
|
||||
#include "pragmas.h"
|
||||
#include "baselayer.h"
|
||||
#include "lz4.h"
|
||||
|
||||
#include "vfs.h"
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#include "baselayer.h"
|
||||
#include "scriptfile.h"
|
||||
#include "cache1d.h"
|
||||
#include "lz4.h"
|
||||
#include "common.h"
|
||||
#include "mdsprite.h" // md3model_t
|
||||
#include "colmatch.h"
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
#include "common.h"
|
||||
#include "compat.h"
|
||||
#include "engine_priv.h"
|
||||
#include "lz4.h"
|
||||
#include "osd.h"
|
||||
#include "palette.h"
|
||||
#include "pragmas.h"
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#include "baselayer.h"
|
||||
#include "engine_priv.h"
|
||||
#include "cache1d.h"
|
||||
#include "lz4.h"
|
||||
|
||||
#include "vfs.h"
|
||||
|
||||
|
|
|
@ -1662,7 +1662,7 @@ int32_t sv_saveandmakesnapshot(buildvfs_FILE fil, char const *name, int8_t spot,
|
|||
|
||||
|
||||
// create header
|
||||
Bmemcpy(h.headerstr, "E32SAVEGAME", 11);
|
||||
Bmemcpy(h.headerstr, "DEDSAVEGAME", 11);
|
||||
h.majorver = SV_MAJOR_VER;
|
||||
h.minorver = SV_MINOR_VER;
|
||||
h.ptrsize = sizeof(intptr_t);
|
||||
|
@ -1697,10 +1697,6 @@ int32_t sv_saveandmakesnapshot(buildvfs_FILE fil, char const *name, int8_t spot,
|
|||
{
|
||||
// savegame
|
||||
Bstrncpyz(h.savename, name, sizeof(h.savename));
|
||||
#ifdef __ANDROID__
|
||||
Bstrncpyz(h.volname, g_volumeNames[ud.volume_number], sizeof(h.volname));
|
||||
Bstrncpyz(h.skillname, g_skillNames[ud.player_skill], sizeof(h.skillname));
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1736,23 +1732,11 @@ int32_t sv_saveandmakesnapshot(buildvfs_FILE fil, char const *name, int8_t spot,
|
|||
buildvfs_fseek_abs(fil, ofs);
|
||||
}
|
||||
|
||||
#ifdef DEBUGGINGAIDS
|
||||
OSD_Printf("sv_saveandmakesnapshot: snapshot size: %d bytes.\n", svsnapsiz);
|
||||
#endif
|
||||
|
||||
if (spot >= 0)
|
||||
{
|
||||
// savegame
|
||||
dosaveplayer2(fil, NULL);
|
||||
#ifdef LUNATIC
|
||||
if (!g_savedOK)
|
||||
{
|
||||
OSD_Printf("sv_saveandmakesnapshot: failed serializing Lunatic gamevar \"%s\".\n",
|
||||
g_failedVarname);
|
||||
g_failedVarname = NULL;
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1783,16 +1767,13 @@ int32_t sv_loadheader(FileReader &fil, int32_t spot, savehead_t *h)
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (Bmemcmp(h->headerstr, "E32SAVEGAME", 11)
|
||||
#if 1
|
||||
&& Bmemcmp(h->headerstr, "EDuke32SAVE", 11)
|
||||
#endif
|
||||
if (Bmemcmp(h->headerstr, "DEDSAVEGAME", 11)
|
||||
)
|
||||
{
|
||||
char headerCstr[sizeof(h->headerstr) + 1];
|
||||
Bmemcpy(headerCstr, h->headerstr, sizeof(h->headerstr));
|
||||
headerCstr[sizeof(h->headerstr)] = '\0';
|
||||
OSD_Printf("%s %d header reads \"%s\", expected \"E32SAVEGAME\".\n",
|
||||
OSD_Printf("%s %d header reads \"%s\", expected \"DEDSAVEGAME\".\n",
|
||||
havedemo ? "Demo":"Savegame", havedemo ? -spot : spot, headerCstr);
|
||||
Bmemset(h->headerstr, 0, sizeof(h->headerstr));
|
||||
return -2;
|
||||
|
|
|
@ -1315,7 +1315,7 @@ int32_t sv_saveandmakesnapshot(FILE *fil, char const *name, int8_t spot, int8_t
|
|||
|
||||
|
||||
// create header
|
||||
Bmemcpy(h.headerstr, "E32SAVEGAME", 11);
|
||||
Bmemcpy(h.headerstr, "DERSAVEGAME", 11);
|
||||
h.majorver = SV_MAJOR_VER;
|
||||
h.minorver = SV_MINOR_VER;
|
||||
h.ptrsize = sizeof(intptr_t);
|
||||
|
@ -1427,16 +1427,13 @@ int32_t sv_loadheader(FileReader &fil, int32_t spot, savehead_t *h)
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (Bmemcmp(h->headerstr, "E32SAVEGAME", 11)
|
||||
#if 1
|
||||
&& Bmemcmp(h->headerstr, "EDuke32SAVE", 11)
|
||||
#endif
|
||||
if (Bmemcmp(h->headerstr, "DERSAVEGAME", 11)
|
||||
)
|
||||
{
|
||||
char headerCstr[sizeof(h->headerstr) + 1];
|
||||
Bmemcpy(headerCstr, h->headerstr, sizeof(h->headerstr));
|
||||
headerCstr[sizeof(h->headerstr)] = '\0';
|
||||
OSD_Printf("%s %d header reads \"%s\", expected \"E32SAVEGAME\".\n",
|
||||
OSD_Printf("%s %d header reads \"%s\", expected \"DERSAVEGAME\".\n",
|
||||
havedemo ? "Demo":"Savegame", havedemo ? -spot : spot, headerCstr);
|
||||
Bmemset(h->headerstr, 0, sizeof(h->headerstr));
|
||||
return -2;
|
||||
|
|
Loading…
Reference in a new issue