diff --git a/polymer/eduke32/build/src/polymost.c b/polymer/eduke32/build/src/polymost.c index b11d0c5b3..766651abd 100644 --- a/polymer/eduke32/build/src/polymost.c +++ b/polymer/eduke32/build/src/polymost.c @@ -6074,6 +6074,12 @@ int32_t polymost_printext256(int32_t xpos, int32_t ypos, int16_t col, int16_t ba bglDisable(GL_ALPHA_TEST); bglDepthMask(GL_FALSE); // disable writing to the z-buffer + bglPushAttrib(GL_POLYGON_BIT|GL_ENABLE_BIT); + // XXX: Don't fogify the OSD text in Mapster32 with r_usenewshading=2. + bglDisable(GL_FOG); + // We want to have readable text in wireframe mode, too: + bglPolygonMode(GL_FRONT_AND_BACK, GL_FILL); + if (backcol >= 0) { bglColor4ub(b.r,b.g,b.b,255); @@ -6087,9 +6093,6 @@ int32_t polymost_printext256(int32_t xpos, int32_t ypos, int16_t col, int16_t ba bglEnd(); } - bglPushAttrib(GL_POLYGON_BIT); // we want to have readable text in wireframe mode, too - bglPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - bglEnable(GL_TEXTURE_2D); bglEnable(GL_BLEND); bglColor4ub(p.r,p.g,p.b,255); diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index d0b0c01bc..9603bafcd 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -3082,6 +3082,21 @@ static int32_t DrawTiles(int32_t iTopLeft, int32_t iSelected, int32_t nXTiles, i } while (0) +static inline void pushDisableFog(void) +{ +#ifdef USE_OPENGL + bglPushAttrib(GL_ENABLE_BIT); + bglDisable(GL_FOG); +#endif +} + +static inline void popDisableFog(void) +{ +#ifdef USE_OPENGL + bglPopAttrib(); +#endif +} + static int32_t m32gettile(int32_t idInitialTile) { int32_t gap, temp, zoomsz; @@ -3095,6 +3110,8 @@ static int32_t m32gettile(int32_t idInitialTile) int32_t noTilesMarked=1; int32_t mark_lastk = -1; + pushDisableFog(); + // Enable following line for testing. I couldn't work out how to change vidmode on the fly // s_Zoom = NUM_ZOOMS - 1; @@ -3610,6 +3627,8 @@ static int32_t m32gettile(int32_t idInitialTile) keystatus[KEYSC_ESC] = 0; keystatus[KEYSC_ENTER] = 0; + popDisableFog(); + return idSelectedTile; }