mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
merge SOC_****, MAINCFG and OBJCTCFG searches into one big search for any of them
This makes it so that it doesn't matter what order you place SOC lumps within a WAD... relative to other SOC lumps at least, anyway
This commit is contained in:
parent
5cae87430f
commit
cd198d6809
1 changed files with 11 additions and 21 deletions
32
src/w_wad.c
32
src/w_wad.c
|
@ -150,31 +150,21 @@ static inline void W_LoadDehackedLumps(UINT16 wadnum)
|
|||
{
|
||||
lumpinfo_t *lump_p = wadfiles[wadnum]->lumpinfo;
|
||||
for (lump = 0; lump < wadfiles[wadnum]->numlumps; lump++, lump_p++)
|
||||
if (memcmp(lump_p->name,"SOC_",4)==0)
|
||||
if (memcmp(lump_p->name,"SOC_",4)==0) // Check for generic SOC lump
|
||||
{
|
||||
CONS_Printf(M_GetText("Loading SOC from %s\n"), wadfiles[wadnum]->filename);
|
||||
DEH_LoadDehackedLumpPwad(wadnum, lump);
|
||||
}
|
||||
}
|
||||
|
||||
// Check for MAINCFG
|
||||
for (lump = 0;lump != INT16_MAX;lump++)
|
||||
{
|
||||
lump = W_CheckNumForNamePwad("MAINCFG", wadnum, lump);
|
||||
if (lump == INT16_MAX)
|
||||
break;
|
||||
CONS_Printf(M_GetText("Loading main config from %s\n"), wadfiles[wadnum]->filename);
|
||||
DEH_LoadDehackedLumpPwad(wadnum, lump);
|
||||
}
|
||||
|
||||
// Check for OBJCTCFG
|
||||
for (lump = 0;lump < INT16_MAX;lump++)
|
||||
{
|
||||
lump = W_CheckNumForNamePwad("OBJCTCFG", wadnum, lump);
|
||||
if (lump == INT16_MAX)
|
||||
break;
|
||||
CONS_Printf(M_GetText("Loading object config from %s\n"), wadfiles[wadnum]->filename);
|
||||
DEH_LoadDehackedLumpPwad(wadnum, lump);
|
||||
else if (memcmp(lump_p->name,"MAINCFG",8)==0) // Check for MAINCFG
|
||||
{
|
||||
CONS_Printf(M_GetText("Loading main config from %s\n"), wadfiles[wadnum]->filename);
|
||||
DEH_LoadDehackedLumpPwad(wadnum, lump);
|
||||
}
|
||||
else if (memcmp(lump_p->name,"OBJCTCFG",8)==0) // Check for OBJCTCFG
|
||||
{
|
||||
CONS_Printf(M_GetText("Loading object config from %s\n"), wadfiles[wadnum]->filename);
|
||||
DEH_LoadDehackedLumpPwad(wadnum, lump);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SCANTHINGS
|
||||
|
|
Loading…
Reference in a new issue