mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-16 01:02:03 +00:00
- Changed FMultiPatchTexture::CopyTrueColorPixels() so that all parts use their copy info.
Previously, "complex" parts would ignore it and use the copy info passed to the function instead. The copy info passed to the function is now only used to decide to if it should clear the destination image. I'm not sure if this really matters, since it itself is the only place aside from FTexture::FillBuffer() that ever calls CopyTrueColorPixels() with a copy info, and when it does so for a multipatch texture, it does so to a temporary buffer. SVN r3634 (trunk)
This commit is contained in:
parent
60dc67d5c3
commit
9340dc4eca
1 changed files with 30 additions and 29 deletions
|
@ -573,19 +573,10 @@ int FMultiPatchTexture::CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rota
|
|||
// rotated multipatch parts cannot be composited directly
|
||||
bool rotatedmulti = Parts[i].Rotate != 0 && Parts[i].Texture->bMultiPatch;
|
||||
|
||||
if ((!Parts[i].Texture->bComplex || inf == NULL) && !rotatedmulti)
|
||||
{
|
||||
memset (&info, 0, sizeof (info));
|
||||
info.alpha = Parts[i].Alpha;
|
||||
info.invalpha = FRACUNIT - info.alpha;
|
||||
info.op = ECopyOp(Parts[i].op);
|
||||
if (Parts[i].Translation != NULL)
|
||||
{
|
||||
// Using a translation forces downconversion to the base palette
|
||||
ret = Parts[i].Texture->CopyTrueColorTranslated(bmp, x+Parts[i].OriginX, y+Parts[i].OriginY, Parts[i].Rotate, Parts[i].Translation, &info);
|
||||
}
|
||||
else
|
||||
{
|
||||
PalEntry b = Parts[i].Blend;
|
||||
if (b.a == 0 && b != BLEND_NONE)
|
||||
{
|
||||
|
@ -610,6 +601,16 @@ int FMultiPatchTexture::CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rota
|
|||
info.blend = BLEND_OVERLAY;
|
||||
}
|
||||
}
|
||||
|
||||
if ((!Parts[i].Texture->bComplex || inf == NULL) && !rotatedmulti)
|
||||
{
|
||||
if (Parts[i].Translation != NULL)
|
||||
{
|
||||
// Using a translation forces downconversion to the base palette
|
||||
ret = Parts[i].Texture->CopyTrueColorTranslated(bmp, x+Parts[i].OriginX, y+Parts[i].OriginY, Parts[i].Rotate, Parts[i].Translation, &info);
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = Parts[i].Texture->CopyTrueColorPixels(bmp, x+Parts[i].OriginX, y+Parts[i].OriginY, Parts[i].Rotate, &info);
|
||||
}
|
||||
}
|
||||
|
@ -625,7 +626,7 @@ int FMultiPatchTexture::CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rota
|
|||
bmp1.Zero();
|
||||
Parts[i].Texture->CopyTrueColorPixels(&bmp1, 0, 0);
|
||||
bmp->CopyPixelDataRGB(x+Parts[i].OriginX, y+Parts[i].OriginY, bmp1.GetPixels(),
|
||||
bmp1.GetWidth(), bmp1.GetHeight(), 4, bmp1.GetPitch(), Parts[i].Rotate, CF_BGRA, inf);
|
||||
bmp1.GetWidth(), bmp1.GetHeight(), 4, bmp1.GetPitch(), Parts[i].Rotate, CF_BGRA, &info);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue