mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-31 04:20:42 +00:00
- fixed alpha calculations for textured automap.
This commit is contained in:
parent
d825282726
commit
77cd7bffc5
3 changed files with 8 additions and 6 deletions
|
@ -4903,9 +4903,7 @@ void polymost_fillpolygon(int32_t npoints)
|
|||
tessectrap((float*)rx1, (float*)ry1, xb1, npoints, &poly);
|
||||
|
||||
uint8_t const maskprops = (globalorientation>>7)&DAMETH_MASKPROPS;
|
||||
handle_blend(maskprops > DAMETH_MASK, 0, maskprops == DAMETH_TRANS2);
|
||||
float alpha = (maskprops > DAMETH_MASK) ? float_trans(maskprops, 0) : 1.f;
|
||||
twod->AddPoly(TileFiles.tiles[globalpicnum], poly, globalpal, globalshade, alpha);
|
||||
twod->AddPoly(TileFiles.tiles[globalpicnum], poly, globalpal, globalshade, maskprops);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -706,7 +706,7 @@ void F2DDrawer::rotatesprite(int32_t sx, int32_t sy, int32_t z, int16_t a, int16
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void F2DDrawer::AddPoly(FTexture* img, F2DPolygons& poly, int palette, int shade, float alpha)
|
||||
void F2DDrawer::AddPoly(FTexture* img, F2DPolygons& poly, int palette, int shade, int maskprops)
|
||||
{
|
||||
RenderCommand dg = {};
|
||||
int method = 0;
|
||||
|
@ -724,7 +724,11 @@ void F2DDrawer::AddPoly(FTexture* img, F2DPolygons& poly, int palette, int shade
|
|||
#endif
|
||||
|
||||
PalEntry p = 0xffffffff;
|
||||
p.a = (uint8_t)(alpha * 255);
|
||||
if (maskprops > DAMETH_MASK)
|
||||
{
|
||||
dg.mRenderStyle = GetBlend(0, maskprops == DAMETH_TRANS2);
|
||||
p.a = (uint8_t)(float_trans(maskprops, 0) * 255);
|
||||
}
|
||||
dg.mTexture = img;
|
||||
dg.mRemapIndex = palette | (shade << 16);
|
||||
dg.mVertCount = poly.vertices.Size();
|
||||
|
|
|
@ -127,7 +127,7 @@ public:
|
|||
|
||||
public:
|
||||
void AddTexture(FTexture *img, DrawParms &parms);
|
||||
void AddPoly(FTexture* img, F2DPolygons& poly, int palette, int shade, float alpha);
|
||||
void AddPoly(FTexture* img, F2DPolygons& poly, int palette, int shade, int maskprops);
|
||||
void AddFlatFill(int left, int top, int right, int bottom, FTexture *src, bool local_origin);
|
||||
|
||||
void AddColorOnlyQuad(int left, int top, int width, int height, PalEntry color, FRenderStyle *style = nullptr);
|
||||
|
|
Loading…
Reference in a new issue