mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +00:00
support compressed wads (.wad.gz) and read the lump count correctly
This commit is contained in:
parent
1ddd7da5ec
commit
28082f30f5
1 changed files with 2 additions and 2 deletions
|
@ -122,7 +122,7 @@ wad_open (const char *name)
|
|||
|
||||
if (!wad)
|
||||
return 0;
|
||||
wad->handle = Qopen (name, "rb");
|
||||
wad->handle = Qopen (name, "rbz");
|
||||
if (!wad->handle) {
|
||||
goto error;
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ wad_open (const char *name)
|
|||
wad->header.infotableofs = LittleLong (wad->header.infotableofs);
|
||||
wad->header.numlumps = LittleLong (wad->header.numlumps);
|
||||
|
||||
wad->numlumps = wad->header.numlumps / sizeof (lumpinfo_t);
|
||||
wad->numlumps = wad->header.numlumps;
|
||||
wad->old_numlumps = wad->lumps_size = wad->numlumps;
|
||||
|
||||
wad->lumps = malloc (wad->lumps_size * sizeof (lumpinfo_t));
|
||||
|
|
Loading…
Reference in a new issue