mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-26 06:01:14 +00:00
This commit is contained in:
commit
a4393d352f
3 changed files with 12 additions and 12 deletions
|
@ -1123,8 +1123,8 @@ static void R_DrawSkyColumnStripe(int start_x, int y1, int y2, int columns, doub
|
|||
dc_dest = (ylookup[y1] + start_x) * pixelsize + dc_destorg;
|
||||
dc_count = y2 - y1;
|
||||
|
||||
uint32_t solid_top = frontskytex->GetSWSkyCapColor(false);
|
||||
uint32_t solid_bottom = frontskytex->GetSWSkyCapColor(true);
|
||||
uint32_t solid_top = frontskytex->GetSkyCapColor(false);
|
||||
uint32_t solid_bottom = frontskytex->GetSkyCapColor(true);
|
||||
|
||||
if (r_swtruecolor)
|
||||
{
|
||||
|
|
|
@ -862,9 +862,9 @@ namespace
|
|||
}
|
||||
for (i = 0; i < size; i++)
|
||||
{
|
||||
r += BPART(data[i]);
|
||||
b += BPART(data[i]);
|
||||
g += GPART(data[i]);
|
||||
b += RPART(data[i]);
|
||||
r += RPART(data[i]);
|
||||
}
|
||||
|
||||
r = r / size;
|
||||
|
@ -883,7 +883,7 @@ namespace
|
|||
}
|
||||
}
|
||||
|
||||
PalEntry FTexture::GetSWSkyCapColor(bool bottom)
|
||||
PalEntry FTexture::GetSkyCapColor(bool bottom)
|
||||
{
|
||||
PalEntry col;
|
||||
int w;
|
||||
|
@ -902,15 +902,15 @@ PalEntry FTexture::GetSWSkyCapColor(bool bottom)
|
|||
const uint32_t *buffer = (const uint32_t *)bitmap.GetPixels();
|
||||
if (buffer)
|
||||
{
|
||||
SWCeilingSkyColor = averageColor((DWORD *)buffer, w * MIN(30, h), 0);
|
||||
CeilingSkyColor = averageColor((DWORD *)buffer, w * MIN(30, h), 0);
|
||||
if (h>30)
|
||||
{
|
||||
SWFloorSkyColor = averageColor(((DWORD *)buffer) + (h - 30)*w, w * 30, 0);
|
||||
FloorSkyColor = averageColor(((DWORD *)buffer) + (h - 30)*w, w * 30, 0);
|
||||
}
|
||||
else SWFloorSkyColor = SWCeilingSkyColor;
|
||||
else FloorSkyColor = CeilingSkyColor;
|
||||
}
|
||||
}
|
||||
return bottom ? SWFloorSkyColor : SWCeilingSkyColor;
|
||||
return bottom ? FloorSkyColor : CeilingSkyColor;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -272,7 +272,7 @@ public:
|
|||
}
|
||||
|
||||
void SetScaledSize(int fitwidth, int fitheight);
|
||||
PalEntry GetSWSkyCapColor(bool bottom);
|
||||
PalEntry GetSkyCapColor(bool bottom);
|
||||
|
||||
virtual void HackHack (int newheight); // called by FMultipatchTexture to discover corrupt patches.
|
||||
|
||||
|
@ -306,8 +306,8 @@ protected:
|
|||
|
||||
private:
|
||||
bool bSWSkyColorDone = false;
|
||||
PalEntry SWFloorSkyColor;
|
||||
PalEntry SWCeilingSkyColor;
|
||||
PalEntry FloorSkyColor;
|
||||
PalEntry CeilingSkyColor;
|
||||
|
||||
public:
|
||||
static void FlipSquareBlock (BYTE *block, int x, int y);
|
||||
|
|
Loading…
Reference in a new issue