mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
Oops
git-svn-id: https://svn.eduke32.com/eduke32@995 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
6def1b0a65
commit
1c785bb975
1 changed files with 16 additions and 14 deletions
|
@ -33,44 +33,44 @@ void readsavenames(void)
|
|||
int dummy,j;
|
||||
int i;
|
||||
char fn[13];
|
||||
BFILE *fil;
|
||||
int fil;
|
||||
|
||||
Bstrcpy(fn,"egam_.sav");
|
||||
|
||||
for (i=0;i<10;i++)
|
||||
{
|
||||
fn[4] = i+'0';
|
||||
if ((fil = Bfopen(fn,"rb")) == NULL) continue;
|
||||
if (dfread(&j,sizeof(int),1,fil) != 1)
|
||||
if ((fil = kopen4loadfrommod(fn,0)) == -1) continue;
|
||||
if (kdfread(&j,sizeof(int),1,fil) != 1)
|
||||
{
|
||||
Bfclose(fil);
|
||||
kclose(fil);
|
||||
continue;
|
||||
}
|
||||
if (dfread(g_szBuf,j,1,fil) != 1)
|
||||
if (kdfread(g_szBuf,j,1,fil) != 1)
|
||||
{
|
||||
Bfclose(fil);
|
||||
kclose(fil);
|
||||
continue;
|
||||
}
|
||||
if (dfread(&dummy,4,1,fil) != 1)
|
||||
if (kdfread(&dummy,4,1,fil) != 1)
|
||||
{
|
||||
Bfclose(fil);
|
||||
kclose(fil);
|
||||
continue;
|
||||
}
|
||||
if (dummy != BYTEVERSION)
|
||||
{
|
||||
Bfclose(fil);
|
||||
kclose(fil);
|
||||
continue;
|
||||
}
|
||||
if (dfread(&dummy,4,1,fil) != 1)
|
||||
if (kdfread(&dummy,4,1,fil) != 1)
|
||||
{
|
||||
Bfclose(fil);
|
||||
kclose(fil);
|
||||
continue;
|
||||
}
|
||||
if (dfread(&ud.savegame[i][0],19,1,fil) != 1)
|
||||
if (kdfread(&ud.savegame[i][0],19,1,fil) != 1)
|
||||
{
|
||||
ud.savegame[i][0] = 0;
|
||||
}
|
||||
Bfclose(fil);
|
||||
kclose(fil);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -568,7 +568,9 @@ int saveplayer(int spot)
|
|||
|
||||
{
|
||||
char temp[BMAX_PATH];
|
||||
Bsprintf(temp,"%s/%s",mod_dir,fnptr);
|
||||
if (mod_dir[0] != '/')
|
||||
Bsprintf(temp,"%s/%s",mod_dir,fnptr);
|
||||
else Bsprintf(temp,"%s",fnptr);
|
||||
if ((fil = fopen(temp,"wb")) == 0) return(-1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue