diff --git a/src/gl/textures/gl_texture.cpp b/src/gl/textures/gl_texture.cpp index ce6ff398c..8aaa98ae6 100644 --- a/src/gl/textures/gl_texture.cpp +++ b/src/gl/textures/gl_texture.cpp @@ -167,7 +167,7 @@ void gl_GenerateGlobalBrightmapFromColormap() // component becomes one. // //=========================================================================== -PalEntry averageColor(const DWORD *data, int size, int maxout) +static PalEntry averageColor(const DWORD *data, int size, int maxout) { int i; unsigned int r, g, b; @@ -216,10 +216,7 @@ FTexture::MiscGLInfo::MiscGLInfo() throw() GlowColor = 0; GlowHeight = 128; bSkybox = false; - FloorSkyColor = 0; - CeilingSkyColor = 0; bFullbright = false; - bSkyColorDone = false; bBrightmapChecked = false; bDisableFullbright = false; bNoFilter = false; @@ -326,38 +323,6 @@ void FTexture::GetGlowColor(float *data) data[2]=gl_info.GlowColor.b/255.0f; } -//=========================================================================== -// -// Gets the average color of a texture for use as a sky cap color -// -//=========================================================================== - -PalEntry FTexture::GetSkyCapColor(bool bottom) -{ - PalEntry col; - int w; - int h; - - if (!gl_info.bSkyColorDone) - { - gl_info.bSkyColorDone = true; - - unsigned char *buffer = GLRenderer->GetTextureBuffer(this, w, h); - - if (buffer) - { - gl_info.CeilingSkyColor = averageColor((DWORD *) buffer, w * MIN(30, h), 0); - if (h>30) - { - gl_info.FloorSkyColor = averageColor(((DWORD *) buffer)+(h-30)*w, w * 30, 0); - } - else gl_info.FloorSkyColor = gl_info.CeilingSkyColor; - delete[] buffer; - } - } - return bottom? gl_info.FloorSkyColor : gl_info.CeilingSkyColor; -} - //=========================================================================== // // Finds gaps in the texture which can be skipped by the renderer diff --git a/src/gl/textures/gl_texture.h b/src/gl/textures/gl_texture.h index 9ee9b27f9..455678f85 100644 --- a/src/gl/textures/gl_texture.h +++ b/src/gl/textures/gl_texture.h @@ -24,7 +24,6 @@ protected: void gl_GenerateGlobalBrightmapFromColormap(); -PalEntry averageColor(const DWORD *data, int size, int maxout); diff --git a/src/textures/textures.h b/src/textures/textures.h index abdc57333..1489aa7ef 100644 --- a/src/textures/textures.h +++ b/src/textures/textures.h @@ -328,8 +328,6 @@ public: FGLTexture *SystemTexture[2]; FTexture *Brightmap; PalEntry GlowColor; - PalEntry FloorSkyColor; - PalEntry CeilingSkyColor; int GlowHeight; FloatRect *areas; int areacount; @@ -339,7 +337,6 @@ public: bool bGlowing:1; // Texture glows bool bFullbright:1; // always draw fullbright bool bSkybox:1; // This is a skybox - bool bSkyColorDone:1; // Fill color for sky char bBrightmapChecked:1; // Set to 1 if brightmap has been checked bool bDisableFullbright:1; // This texture will not be displayed as fullbright sprite bool bNoFilter:1; @@ -352,7 +349,6 @@ public: MiscGLInfo gl_info; void GetGlowColor(float *data); - PalEntry GetSkyCapColor(bool bottom); bool isGlowing() { return gl_info.bGlowing; } bool isFullbright() { return gl_info.bFullbright; } void CreateDefaultBrightmap();