mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-24 03:32:22 +00:00
* Make multiple ANIMDEFS lumps get loaded.
* Refactor the multiple TEXTURES lump code.
This commit is contained in:
parent
ee4b891318
commit
efc4d2f81d
2 changed files with 16 additions and 21 deletions
21
src/p_spec.c
21
src/p_spec.c
|
@ -148,20 +148,17 @@ void P_InitPicAnims(void)
|
|||
|
||||
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
|
||||
if (wadfiles[w]->type == RET_PK3)
|
||||
animdefsLumpNum = W_CheckNumForFullNamePK3("ANIMDEFS", w, 0);
|
||||
else
|
||||
animdefsLumpNum = W_CheckNumForNamePwad("ANIMDEFS", w, 0);
|
||||
|
||||
if (animdefsLumpNum != INT16_MAX)
|
||||
P_ParseANIMDEFSLump(w, animdefsLumpNum);
|
||||
// Find ANIMDEFS lump in the WAD
|
||||
animdefsLumpNum = W_CheckNumForNamePwad("ANIMDEFS", w, 0);
|
||||
|
||||
while (animdefsLumpNum != INT16_MAX)
|
||||
{
|
||||
P_ParseANIMDEFSLump(w, animdefsLumpNum);
|
||||
animdefsLumpNum = W_CheckNumForNamePwad("ANIMDEFS", (UINT16)w, animdefsLumpNum + 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
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);
|
||||
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
|
||||
{
|
||||
texstart = W_CheckNumForNamePwad(TX_START, (UINT16)w, 0) + 1;
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue