mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-29 15:22:08 +00:00
- Fixed: paletted texture composition with part translucent patches
did not work. SVN r1771 (trunk)
This commit is contained in:
parent
385350efae
commit
fe96cab254
2 changed files with 19 additions and 18 deletions
|
@ -1,4 +1,6 @@
|
||||||
August 12, 2009 (Changes by Graf Zahl)
|
August 12, 2009 (Changes by Graf Zahl)
|
||||||
|
- Fixed: paletted texture composition with part translucent patches
|
||||||
|
did not work.
|
||||||
- Fixed: A_SorcOffense2 depended on args being bytes and overflowing.
|
- Fixed: A_SorcOffense2 depended on args being bytes and overflowing.
|
||||||
- Fixed: Even though P_DamageMobj checked an attack's originator
|
- Fixed: Even though P_DamageMobj checked an attack's originator
|
||||||
for MF2_NODMGTHRUST the same check was missing from P_RadiusAttack.
|
for MF2_NODMGTHRUST the same check was missing from P_RadiusAttack.
|
||||||
|
|
|
@ -494,20 +494,19 @@ void FMultiPatchTexture::MakeTexture ()
|
||||||
Pixels = new BYTE[numpix];
|
Pixels = new BYTE[numpix];
|
||||||
memset (Pixels, 0, numpix);
|
memset (Pixels, 0, numpix);
|
||||||
|
|
||||||
// This is not going to be easy for paletted output. Using the
|
|
||||||
// real time mixing tables gives results that just look bad and
|
|
||||||
// downconverting a true color image also has its problems so the only
|
|
||||||
// real choice is to do normal compositing with any translucent patch
|
|
||||||
// just masking the affected pixels, then do a full true color composition
|
|
||||||
// and merge these pixels in.
|
|
||||||
for (int i = 0; i < NumParts; ++i)
|
for (int i = 0; i < NumParts; ++i)
|
||||||
{
|
{
|
||||||
BYTE *trans = Parts[i].Translation ? Parts[i].Translation->Remap : NULL;
|
|
||||||
if (Parts[i].op != OP_COPY)
|
if (Parts[i].op != OP_COPY)
|
||||||
{
|
{
|
||||||
hasTranslucent = true;
|
hasTranslucent = true;
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
|
|
||||||
|
if (!hasTranslucent)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < NumParts; ++i)
|
||||||
|
{
|
||||||
|
BYTE *trans = Parts[i].Translation ? Parts[i].Translation->Remap : NULL;
|
||||||
{
|
{
|
||||||
if (Parts[i].Blend != 0)
|
if (Parts[i].Blend != 0)
|
||||||
{
|
{
|
||||||
|
@ -517,8 +516,8 @@ void FMultiPatchTexture::MakeTexture ()
|
||||||
Parts[i].OriginX, Parts[i].OriginY, Parts[i].Rotate, trans);
|
Parts[i].OriginX, Parts[i].OriginY, Parts[i].Rotate, trans);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (hasTranslucent)
|
else
|
||||||
{
|
{
|
||||||
// In case there are translucent patches let's do the composition in
|
// In case there are translucent patches let's do the composition in
|
||||||
// True color to keep as much precision as possible before downconverting to the palette.
|
// True color to keep as much precision as possible before downconverting to the palette.
|
||||||
|
@ -1120,7 +1119,7 @@ void FMultiPatchTexture::ParsePatch(FScanner &sc, TexPart & part)
|
||||||
static const char *styles[] = {"copy", "translucent", "add", "subtract", "reversesubtract", "modulate", "copyalpha", NULL };
|
static const char *styles[] = {"copy", "translucent", "add", "subtract", "reversesubtract", "modulate", "copyalpha", NULL };
|
||||||
sc.MustGetString();
|
sc.MustGetString();
|
||||||
part.op = sc.MustMatchString(styles);
|
part.op = sc.MustMatchString(styles);
|
||||||
bComplex = (part.op != OP_COPY);
|
bComplex |= (part.op != OP_COPY);
|
||||||
bTranslucentPatches = bComplex;
|
bTranslucentPatches = bComplex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue