Fix p_spec.c and r_things.h, get the compiler to shut up

This compiles with no errors or warnings, but hasn't been tested yet. Please review/test when you can.
This commit is contained in:
wolfy852 2017-10-07 17:18:25 -05:00
parent 93584f6811
commit b298c7a541
8 changed files with 67 additions and 192 deletions

View file

@ -380,7 +380,9 @@ void R_AddSpriteDefs(UINT16 wadnum)
char wadname[MAX_WADPATH];
// Find the sprites section in this resource file.
if (wadfiles[wadnum]->type == RET_WAD)
if (wadfiles[wadnum]->type == RET_PK3)
start = W_CheckNumForFolderStartPK3("Sprites/", wadnum, 0);
else
{
start = W_CheckNumForNamePwad("S_START", wadnum, 0);
if (start == UINT16_MAX)
@ -390,21 +392,19 @@ void R_AddSpriteDefs(UINT16 wadnum)
else
start++; // just after S_START
}
else if (wadfiles[wadnum]->type == RET_PK3)
start = W_CheckNumForFolderStartPK3("Sprites/", wadnum, 0);
// ignore skin wads (we don't want skin sprites interfering with vanilla sprites)
if (start == 0 && W_CheckNumForNamePwad("S_SKIN", wadnum, 0) != UINT16_MAX)
return;
if (wadfiles[wadnum]->type == RET_WAD)
if (wadfiles[wadnum]->type == RET_PK3)
end = W_CheckNumForFolderEndPK3("Sprites/", wadnum, start);
else
{
end = W_CheckNumForNamePwad("S_END",wadnum,start);
if (end == UINT16_MAX)
end = W_CheckNumForNamePwad("SS_END",wadnum,start); //deutex compatib.
}
else if (wadfiles[wadnum]->type == RET_PK3)
end = W_CheckNumForFolderEndPK3("Sprites/", wadnum, start);
if (end == UINT16_MAX)
{