[wad] Return 0 if no wad file is loaded

This allows QF to load without a wad file as it will use the internal
character definition.
This commit is contained in:
Bill Currie 2022-05-08 23:55:57 +09:00
parent d1d1cc4362
commit 2ebefd7850
2 changed files with 3 additions and 1 deletions

View file

@ -127,6 +127,9 @@ W_GetLumpName (const char *name)
{
lumpinfo_t *lump;
if (!wad_base) {
return 0;
}
lump = W_GetLumpinfo (name);
return (void *) (wad_base + lump->filepos);

View file

@ -326,7 +326,6 @@ BI_Graphics_Init (progs_t *pr)
generate_palette ();
generate_colormap ();
W_LoadWadFile ("gfx.wad");
VID_Init (default_palette[0], default_colormap);
IN_Init ();
Mod_Init ();