mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-16 01:11:28 +00:00
savegame.c: fix initial setting of compression threshold on savegame load;
64-bit fixes git-svn-id: https://svn.eduke32.com/eduke32@2212 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
0bf329e70d
commit
7baaa44e28
1 changed files with 4 additions and 3 deletions
|
@ -1324,7 +1324,7 @@ static int32_t readspecdata(const dataspec_t *spec, int32_t fil, uint8_t **dumpv
|
||||||
j=kread(fil, cmpstrbuf, i);
|
j=kread(fil, cmpstrbuf, i);
|
||||||
if (j!=i || Bmemcmp(sp->ptr, cmpstrbuf, i))
|
if (j!=i || Bmemcmp(sp->ptr, cmpstrbuf, i))
|
||||||
{
|
{
|
||||||
OSD_Printf("rsd: spec=%s, idx=%d:\n", (char *)spec->ptr, sp-spec);
|
OSD_Printf("rsd: spec=%s, idx=%d:\n", (char *)spec->ptr, (int32_t)(sp-spec));
|
||||||
if (j!=i)
|
if (j!=i)
|
||||||
OSD_Printf(" kread returned %d, expected %d.\n", j, i);
|
OSD_Printf(" kread returned %d, expected %d.\n", j, i);
|
||||||
else
|
else
|
||||||
|
@ -1353,7 +1353,7 @@ static int32_t readspecdata(const dataspec_t *spec, int32_t fil, uint8_t **dumpv
|
||||||
}
|
}
|
||||||
if (i!=j)
|
if (i!=j)
|
||||||
{
|
{
|
||||||
OSD_Printf("rsd: spec=%s, idx=%d, mem=%p\n", (char *)spec->ptr, sp-spec, mem);
|
OSD_Printf("rsd: spec=%s, idx=%d, mem=%p\n", (char *)spec->ptr, (int32_t)(sp-spec), mem);
|
||||||
OSD_Printf(" (%s): read %d, expected %d!\n",
|
OSD_Printf(" (%s): read %d, expected %d!\n",
|
||||||
((sp->flags&DS_CNTMASK)==0 && sp->size*cnt<=savegame_comprthres)?
|
((sp->flags&DS_CNTMASK)==0 && sp->size*cnt<=savegame_comprthres)?
|
||||||
"uncompressed":"compressed", i, j);
|
"uncompressed":"compressed", i, j);
|
||||||
|
@ -2093,6 +2093,8 @@ int32_t sv_loadsnapshot(int32_t fil, int32_t spot, savehead_t *h)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
savegame_comprthres = h->comprthres;
|
||||||
|
|
||||||
if (spot >= 0)
|
if (spot >= 0)
|
||||||
{
|
{
|
||||||
// savegame
|
// savegame
|
||||||
|
@ -2106,7 +2108,6 @@ int32_t sv_loadsnapshot(int32_t fil, int32_t spot, savehead_t *h)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// demo
|
// demo
|
||||||
savegame_comprthres = h->comprthres;
|
|
||||||
savegame_diffcompress = h->diffcompress;
|
savegame_diffcompress = h->diffcompress;
|
||||||
|
|
||||||
svsnapsiz = h->snapsiz;
|
svsnapsiz = h->snapsiz;
|
||||||
|
|
Loading…
Reference in a new issue