mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-01 16:41:22 +00:00
- fixed: UseOffsets can only be handled after the patch is has been set up.
This commit is contained in:
parent
12ce76426e
commit
327d4d85a7
2 changed files with 8 additions and 8 deletions
|
@ -192,6 +192,7 @@ protected:
|
||||||
int UseType = TEX_Null;
|
int UseType = TEX_Null;
|
||||||
bool Silent = false;
|
bool Silent = false;
|
||||||
bool HasLine = false;
|
bool HasLine = false;
|
||||||
|
bool UseOffsets = false;
|
||||||
FScriptPosition sc;
|
FScriptPosition sc;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1139,11 +1140,7 @@ void FMultiPatchTexture::ParsePatch(FScanner &sc, TexPart & part, TexInit &init)
|
||||||
}
|
}
|
||||||
else if (sc.Compare("useoffsets"))
|
else if (sc.Compare("useoffsets"))
|
||||||
{
|
{
|
||||||
if (part.Texture != NULL)
|
init.UseOffsets = true;
|
||||||
{
|
|
||||||
part.OriginX -= part.Texture->LeftOffset;
|
|
||||||
part.OriginY -= part.Texture->TopOffset;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1341,7 +1338,7 @@ void FMultiPatchTexture::ResolvePatches()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// If it could be resolved, just print a developer warning.
|
// If it could be resolved, just print a developer warning.
|
||||||
DPrintf(DMSG_WARNING, "Resolved self-referencing texture by picking an older entry for %s", Inits[i].TexName.GetChars());
|
DPrintf(DMSG_WARNING, "Resolved self-referencing texture by picking an older entry for %s\n", Inits[i].TexName.GetChars());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1358,6 +1355,11 @@ void FMultiPatchTexture::ResolvePatches()
|
||||||
Parts[i].Texture = TexMan[texno];
|
Parts[i].Texture = TexMan[texno];
|
||||||
bComplex |= Parts[i].Texture->bComplex;
|
bComplex |= Parts[i].Texture->bComplex;
|
||||||
Parts[i].Texture->bKeepAround = true;
|
Parts[i].Texture->bKeepAround = true;
|
||||||
|
if (Inits[i].UseOffsets)
|
||||||
|
{
|
||||||
|
Parts[i].OriginX -= Parts[i].Texture->LeftOffset;
|
||||||
|
Parts[i].OriginY -= Parts[i].Texture->TopOffset;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int i = 0; i < NumParts; i++)
|
for (int i = 0; i < NumParts; i++)
|
||||||
|
|
|
@ -615,8 +615,6 @@ namespace
|
||||||
PalEntry FTexture::GetSkyCapColor(bool bottom)
|
PalEntry FTexture::GetSkyCapColor(bool bottom)
|
||||||
{
|
{
|
||||||
PalEntry col;
|
PalEntry col;
|
||||||
int w;
|
|
||||||
int h;
|
|
||||||
|
|
||||||
if (!bSWSkyColorDone)
|
if (!bSWSkyColorDone)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue