mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
- imported two fixes from GZDoom
This commit is contained in:
parent
4aad87cf83
commit
b5ad3b9f3b
3 changed files with 13 additions and 4 deletions
|
@ -436,7 +436,7 @@ int IQMModel::FindFrame(const char* name, bool nodefault)
|
|||
{
|
||||
// [MK] allow looking up frames by animation name plus offset (using a colon as separator)
|
||||
const char* colon = strrchr(name,':');
|
||||
int nlen = (colon==nullptr)?strlen(name):(colon-name);
|
||||
size_t nlen = (colon==nullptr)?strlen(name):(colon-name);
|
||||
for (unsigned i = 0; i < Anims.Size(); i++)
|
||||
{
|
||||
if (!strnicmp(name, Anims[i].Name.GetChars(), nlen))
|
||||
|
|
|
@ -1300,11 +1300,12 @@ void FTextureManager::InitPalettedVersions()
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
FTextureID FTextureManager::GetRawTexture(FTextureID texid)
|
||||
FTextureID FTextureManager::GetRawTexture(FTextureID texid, bool dontlookup)
|
||||
{
|
||||
int texidx = texid.GetIndex();
|
||||
if ((unsigned)texidx >= Textures.Size()) return texid;
|
||||
if (Textures[texidx].FrontSkyLayer != -1) return FSetTextureID(Textures[texidx].FrontSkyLayer);
|
||||
if (Textures[texidx].RawTexture != -1) return FSetTextureID(Textures[texidx].RawTexture);
|
||||
if (dontlookup) return texid;
|
||||
|
||||
// Reject anything that cannot have been a front layer for the sky in original Hexen, i.e. it needs to be an unscaled wall texture only using Doom patches.
|
||||
auto tex = Textures[texidx].Texture;
|
||||
|
|
|
@ -77,7 +77,15 @@ public:
|
|||
|
||||
void FlushAll();
|
||||
FTextureID GetFrontSkyLayer(FTextureID);
|
||||
FTextureID GetRawTexture(FTextureID);
|
||||
FTextureID GetRawTexture(FTextureID tex, bool dontlookup = false);
|
||||
void SetRawTexture(FTextureID texid)
|
||||
{
|
||||
int texidx = texid.GetIndex();
|
||||
if ((unsigned)texidx < Textures.Size())
|
||||
{
|
||||
Textures[texidx].RawTexture = texidx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
enum
|
||||
|
|
Loading…
Reference in a new issue