diff --git a/src/r_plane.cpp b/src/r_plane.cpp index 7df68044b..be8247d26 100644 --- a/src/r_plane.cpp +++ b/src/r_plane.cpp @@ -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) { diff --git a/src/textures/texture.cpp b/src/textures/texture.cpp index 53311a66c..deff8fc18 100644 --- a/src/textures/texture.cpp +++ b/src/textures/texture.cpp @@ -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; } diff --git a/src/textures/textures.h b/src/textures/textures.h index f168ca21d..abdc57333 100644 --- a/src/textures/textures.h +++ b/src/textures/textures.h @@ -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);