mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-26 06:20:16 -04:00
make missing IWAD tag non-fatal
This prepares for additional IWAD support, w.g. HacX or REKKR.
This commit is contained in:
parent
3fb6d1a180
commit
2fc4173455
@ -707,7 +707,6 @@ static void CheckIWAD(const char *iwadname,
|
|||||||
filelump_t lump;
|
filelump_t lump;
|
||||||
wadinfo_t header;
|
wadinfo_t header;
|
||||||
const char *n = lump.name;
|
const char *n = lump.name;
|
||||||
boolean noiwad = 0;
|
|
||||||
|
|
||||||
if (!fp)
|
if (!fp)
|
||||||
I_Error("Can't open IWAD: %s\n",iwadname);
|
I_Error("Can't open IWAD: %s\n",iwadname);
|
||||||
@ -716,8 +715,8 @@ static void CheckIWAD(const char *iwadname,
|
|||||||
if (fread(&header, 1, sizeof header, fp) != sizeof header ||
|
if (fread(&header, 1, sizeof header, fp) != sizeof header ||
|
||||||
header.identification[0] != 'I' || header.identification[1] != 'W' ||
|
header.identification[0] != 'I' || header.identification[1] != 'W' ||
|
||||||
header.identification[2] != 'A' || header.identification[3] != 'D')
|
header.identification[2] != 'A' || header.identification[3] != 'D')
|
||||||
// [FG] the BFG Edition IWADs have a PWAD signature
|
// [FG] make non-fatal
|
||||||
++noiwad;
|
fprintf(stderr,"IWAD tag not present: %s\n",iwadname);
|
||||||
|
|
||||||
fseek(fp, LONG(header.infotableofs), SEEK_SET);
|
fseek(fp, LONG(header.infotableofs), SEEK_SET);
|
||||||
|
|
||||||
@ -741,8 +740,6 @@ static void CheckIWAD(const char *iwadname,
|
|||||||
}
|
}
|
||||||
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
if (noiwad && !bfgedition)
|
|
||||||
I_Error("IWAD tag not present: %s\n",iwadname);
|
|
||||||
|
|
||||||
*gmission = doom;
|
*gmission = doom;
|
||||||
*hassec = false;
|
*hassec = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user