* Make multiple ANIMDEFS lumps get loaded.
* Refactor the multiple TEXTURES lump code.
This commit is contained in:
parent
ee4b891318
commit
efc4d2f81d
21
src/p_spec.c
21
src/p_spec.c
|
@ -148,20 +148,17 @@ void P_InitPicAnims(void)
|
||||||
|
|
||||||
maxanims = 0;
|
maxanims = 0;
|
||||||
|
|
||||||
if (W_CheckNumForName("ANIMDEFS") != LUMPERROR)
|
for (w = numwadfiles-1; w >= 0; w--)
|
||||||
{
|
{
|
||||||
for (w = numwadfiles-1; w >= 0; w--)
|
UINT16 animdefsLumpNum;
|
||||||
{
|
|
||||||
UINT16 animdefsLumpNum;
|
|
||||||
|
|
||||||
// Find ANIMDEFS lump in the WAD
|
// Find ANIMDEFS lump in the WAD
|
||||||
if (wadfiles[w]->type == RET_PK3)
|
animdefsLumpNum = W_CheckNumForNamePwad("ANIMDEFS", w, 0);
|
||||||
animdefsLumpNum = W_CheckNumForFullNamePK3("ANIMDEFS", w, 0);
|
|
||||||
else
|
while (animdefsLumpNum != INT16_MAX)
|
||||||
animdefsLumpNum = W_CheckNumForNamePwad("ANIMDEFS", w, 0);
|
{
|
||||||
|
P_ParseANIMDEFSLump(w, animdefsLumpNum);
|
||||||
if (animdefsLumpNum != INT16_MAX)
|
animdefsLumpNum = W_CheckNumForNamePwad("ANIMDEFS", (UINT16)w, animdefsLumpNum + 1);
|
||||||
P_ParseANIMDEFSLump(w, animdefsLumpNum);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
16
src/r_data.c
16
src/r_data.c
|
@ -571,20 +571,18 @@ void R_LoadTextures(void)
|
||||||
{
|
{
|
||||||
texstart = W_CheckNumForFolderStartPK3("textures/", (UINT16)w, 0);
|
texstart = W_CheckNumForFolderStartPK3("textures/", (UINT16)w, 0);
|
||||||
texend = W_CheckNumForFolderEndPK3("textures/", (UINT16)w, texstart);
|
texend = W_CheckNumForFolderEndPK3("textures/", (UINT16)w, texstart);
|
||||||
texturesLumpPos = W_CheckNumForNamePwad("TEXTURES", (UINT16)w, 0);
|
|
||||||
while (texturesLumpPos != INT16_MAX)
|
|
||||||
{
|
|
||||||
numtextures += R_CountTexturesInTEXTURESLump((UINT16)w, (UINT16)texturesLumpPos);
|
|
||||||
texturesLumpPos = W_CheckNumForNamePwad("TEXTURES", (UINT16)w, texturesLumpPos + 1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
texstart = W_CheckNumForNamePwad(TX_START, (UINT16)w, 0) + 1;
|
texstart = W_CheckNumForNamePwad(TX_START, (UINT16)w, 0) + 1;
|
||||||
texend = W_CheckNumForNamePwad(TX_END, (UINT16)w, 0);
|
texend = W_CheckNumForNamePwad(TX_END, (UINT16)w, 0);
|
||||||
texturesLumpPos = W_CheckNumForNamePwad("TEXTURES", (UINT16)w, 0);
|
}
|
||||||
if (texturesLumpPos != INT16_MAX)
|
|
||||||
numtextures += R_CountTexturesInTEXTURESLump((UINT16)w, (UINT16)texturesLumpPos);
|
texturesLumpPos = W_CheckNumForNamePwad("TEXTURES", (UINT16)w, 0);
|
||||||
|
while (texturesLumpPos != INT16_MAX)
|
||||||
|
{
|
||||||
|
numtextures += R_CountTexturesInTEXTURESLump((UINT16)w, (UINT16)texturesLumpPos);
|
||||||
|
texturesLumpPos = W_CheckNumForNamePwad("TEXTURES", (UINT16)w, texturesLumpPos + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add all the textures between TX_START and TX_END
|
// Add all the textures between TX_START and TX_END
|
||||||
|
|
Loading…
Reference in New Issue