brap
This commit is contained in:
parent
ea54e3f08a
commit
c8c2d828de
3 changed files with 3 additions and 43 deletions
|
|
@ -158,7 +158,7 @@ void P_ResetData(INT32 flags)
|
||||||
|
|
||||||
if (!init)
|
if (!init)
|
||||||
{
|
{
|
||||||
lumpnum = W_CheckNumForLongNamePwadNoUpper("states", MAINWAD_MAIN, 0);
|
lumpnum = W_CheckNumForLongNamePwad("states", MAINWAD_MAIN, 0);
|
||||||
DEH_LoadDehackedLumpPwad(MAINWAD_MAIN, lumpnum, true);
|
DEH_LoadDehackedLumpPwad(MAINWAD_MAIN, lumpnum, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -183,7 +183,7 @@ void P_ResetData(INT32 flags)
|
||||||
|
|
||||||
if (!init)
|
if (!init)
|
||||||
{
|
{
|
||||||
lumpnum = W_CheckNumForLongNamePwadNoUpper("mobjs", MAINWAD_MAIN, 0);
|
lumpnum = W_CheckNumForLongNamePwad("mobjs", MAINWAD_MAIN, 0);
|
||||||
DEH_LoadDehackedLumpPwad(MAINWAD_MAIN, lumpnum, true);
|
DEH_LoadDehackedLumpPwad(MAINWAD_MAIN, lumpnum, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -211,7 +211,7 @@ void P_ResetData(INT32 flags)
|
||||||
|
|
||||||
if (!init)
|
if (!init)
|
||||||
{
|
{
|
||||||
lumpnum = W_CheckNumForLongNamePwadNoUpper("skincolors", MAINWAD_MAIN, 0);
|
lumpnum = W_CheckNumForLongNamePwad("skincolors", MAINWAD_MAIN, 0);
|
||||||
DEH_LoadDehackedLumpPwad(MAINWAD_MAIN, lumpnum, true);
|
DEH_LoadDehackedLumpPwad(MAINWAD_MAIN, lumpnum, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
39
src/w_wad.c
39
src/w_wad.c
|
|
@ -1287,45 +1287,6 @@ UINT16 W_CheckNumForLongNamePwad(const char *name, UINT16 wad, UINT16 startlump)
|
||||||
return INT16_MAX;
|
return INT16_MAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// Like W_CheckNumForLongNamePwad, but doesn't uppercase the search string AAAAAAAAAAAAA
|
|
||||||
//
|
|
||||||
UINT16 W_CheckNumForLongNamePwadNoUpper(const char *name, UINT16 wad, UINT16 startlump)
|
|
||||||
{
|
|
||||||
UINT16 i;
|
|
||||||
char uname[8+1];
|
|
||||||
UINT32 hash;
|
|
||||||
|
|
||||||
if (!TestValidLump(wad,0))
|
|
||||||
return INT16_MAX;
|
|
||||||
|
|
||||||
strncpy(uname, name, sizeof uname);
|
|
||||||
strupr(uname);
|
|
||||||
hash = quickncasehash(uname, 8); // Not a mistake, legacy system for short lumpnames
|
|
||||||
|
|
||||||
//
|
|
||||||
// scan forward
|
|
||||||
// start at 'startlump', useful parameter when there are multiple
|
|
||||||
// resources with the same name
|
|
||||||
//
|
|
||||||
if (startlump < wadfiles[wad]->numlumps)
|
|
||||||
{
|
|
||||||
lumpinfo_t *lump_p = wadfiles[wad]->lumpinfo + startlump;
|
|
||||||
for (i = startlump; i < wadfiles[wad]->numlumps; i++, lump_p++)
|
|
||||||
{
|
|
||||||
if (lump_p->hash != hash)
|
|
||||||
continue;
|
|
||||||
if (strcmp(lump_p->longname, name))
|
|
||||||
continue;
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// not found.
|
|
||||||
return INT16_MAX;
|
|
||||||
}
|
|
||||||
|
|
||||||
UINT16
|
UINT16
|
||||||
W_CheckNumForMarkerStartPwad (const char *name, UINT16 wad, UINT16 startlump)
|
W_CheckNumForMarkerStartPwad (const char *name, UINT16 wad, UINT16 startlump)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,6 @@ UINT16 W_FindNextEmptyInPwad(UINT16 wad, UINT16 startlump); // checks only in on
|
||||||
UINT16 W_CheckNumForMapPwad(const char *name, UINT32 hash, UINT16 wad, UINT16 startlump);
|
UINT16 W_CheckNumForMapPwad(const char *name, UINT32 hash, UINT16 wad, UINT16 startlump);
|
||||||
UINT16 W_CheckNumForNamePwad(const char *name, UINT16 wad, UINT16 startlump); // checks only in one pwad
|
UINT16 W_CheckNumForNamePwad(const char *name, UINT16 wad, UINT16 startlump); // checks only in one pwad
|
||||||
UINT16 W_CheckNumForLongNamePwad(const char *name, UINT16 wad, UINT16 startlump);
|
UINT16 W_CheckNumForLongNamePwad(const char *name, UINT16 wad, UINT16 startlump);
|
||||||
UINT16 W_CheckNumForLongNamePwadNoUpper(const char *name, UINT16 wad, UINT16 startlump);
|
|
||||||
|
|
||||||
/* Find the first lump after F_START for instance. */
|
/* Find the first lump after F_START for instance. */
|
||||||
UINT16 W_CheckNumForMarkerStartPwad(const char *name, UINT16 wad, UINT16 startlump);
|
UINT16 W_CheckNumForMarkerStartPwad(const char *name, UINT16 wad, UINT16 startlump);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue