mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
- changed R_InstallSpriteLump so that it doesn't abort for every seemingly misnamed lump in the sprites namespace. A warning is fully sufficient here.
SVN r3239 (trunk)
This commit is contained in:
parent
24593fe008
commit
817368abc2
1 changed files with 10 additions and 6 deletions
|
@ -161,7 +161,7 @@ CVAR (Bool, r_particles, true, 0);
|
||||||
// [RH] Removed checks for coexistance of rotation 0 with other
|
// [RH] Removed checks for coexistance of rotation 0 with other
|
||||||
// rotations and made it look more like BOOM's version.
|
// rotations and made it look more like BOOM's version.
|
||||||
//
|
//
|
||||||
static void R_InstallSpriteLump (FTextureID lump, unsigned frame, char rot, bool flipped)
|
static bool R_InstallSpriteLump (FTextureID lump, unsigned frame, char rot, bool flipped)
|
||||||
{
|
{
|
||||||
unsigned rotation;
|
unsigned rotation;
|
||||||
|
|
||||||
|
@ -179,7 +179,10 @@ static void R_InstallSpriteLump (FTextureID lump, unsigned frame, char rot, bool
|
||||||
}
|
}
|
||||||
|
|
||||||
if (frame >= MAX_SPRITE_FRAMES || rotation > 16)
|
if (frame >= MAX_SPRITE_FRAMES || rotation > 16)
|
||||||
I_FatalError ("R_InstallSpriteLump: Bad frame characters in lump %s", TexMan[lump]->Name);
|
{
|
||||||
|
Printf (TEXTCOLOR_RED"R_InstallSpriteLump: Bad frame characters in lump %s\n", TexMan[lump]->Name);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if ((int)frame > maxframe)
|
if ((int)frame > maxframe)
|
||||||
maxframe = frame;
|
maxframe = frame;
|
||||||
|
@ -226,6 +229,7 @@ static void R_InstallSpriteLump (FTextureID lump, unsigned frame, char rot, bool
|
||||||
sprtemp[frame].rotate = true;
|
sprtemp[frame].rotate = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -467,9 +471,9 @@ void R_InitSpriteDefs ()
|
||||||
FTexture *tex = TexMan[hash];
|
FTexture *tex = TexMan[hash];
|
||||||
if (tex->dwName == intname)
|
if (tex->dwName == intname)
|
||||||
{
|
{
|
||||||
R_InstallSpriteLump (FTextureID(hash), tex->Name[4] - 'A', tex->Name[5], false);
|
bool res = R_InstallSpriteLump (FTextureID(hash), tex->Name[4] - 'A', tex->Name[5], false);
|
||||||
|
|
||||||
if (tex->Name[6])
|
if (tex->Name[6] && res)
|
||||||
R_InstallSpriteLump (FTextureID(hash), tex->Name[6] - 'A', tex->Name[7], true);
|
R_InstallSpriteLump (FTextureID(hash), tex->Name[6] - 'A', tex->Name[7], true);
|
||||||
}
|
}
|
||||||
hash = hashes[hash].Next;
|
hash = hashes[hash].Next;
|
||||||
|
@ -1141,9 +1145,9 @@ void R_InitSkins (void)
|
||||||
if (lnameint == intname)
|
if (lnameint == intname)
|
||||||
{
|
{
|
||||||
FTextureID picnum = TexMan.CreateTexture(k, FTexture::TEX_SkinSprite);
|
FTextureID picnum = TexMan.CreateTexture(k, FTexture::TEX_SkinSprite);
|
||||||
R_InstallSpriteLump (picnum, lname[4] - 'A', lname[5], false);
|
bool res = R_InstallSpriteLump (picnum, lname[4] - 'A', lname[5], false);
|
||||||
|
|
||||||
if (lname[6])
|
if (lname[6] && res)
|
||||||
R_InstallSpriteLump (picnum, lname[6] - 'A', lname[7], true);
|
R_InstallSpriteLump (picnum, lname[6] - 'A', lname[7], true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue