diff --git a/src/d_netcmd.c b/src/d_netcmd.c index b25c125b6..c5be2f29d 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -597,7 +597,9 @@ void D_RegisterClientCommands(void) CV_RegisterVar(&cv_gif_optimize); CV_RegisterVar(&cv_gif_downscale); +#ifdef WALLSPLATS CV_RegisterVar(&cv_splats); +#endif // register these so it is saved to config if ((username = I_GetUserName())) diff --git a/src/d_netcmd.h b/src/d_netcmd.h index 31a7cf818..42ac4c054 100644 --- a/src/d_netcmd.h +++ b/src/d_netcmd.h @@ -81,7 +81,9 @@ extern consvar_t cv_useranalog, cv_useranalog2; extern consvar_t cv_analog, cv_analog2; extern consvar_t cv_netstat; +#ifdef WALLSPLATS extern consvar_t cv_splats; +#endif extern consvar_t cv_countdowntime; extern consvar_t cv_runscripts; diff --git a/src/hardware/r_opengl/r_opengl.c b/src/hardware/r_opengl/r_opengl.c index e23b3eebf..1a81fe796 100644 --- a/src/hardware/r_opengl/r_opengl.c +++ b/src/hardware/r_opengl/r_opengl.c @@ -1470,6 +1470,26 @@ EXPORT void HWRAPI(SetTexture) (FTextureInfo *pTexInfo) else pglTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE_ALPHA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, ptex); } + else if (pTexInfo->grInfo.format == GR_TEXFMT_ALPHA_8) + { + //pglTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, ptex); + if (MipMap) + { + pgluBuild2DMipmaps(GL_TEXTURE_2D, GL_ALPHA, w, h, GL_RGBA, GL_UNSIGNED_BYTE, ptex); +#ifdef GL_TEXTURE_MIN_LOD + pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_LOD, 0); +#endif +#ifdef GL_TEXTURE_MAX_LOD + if (pTexInfo->flags & TF_TRANSPARENT) + pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LOD, 0); // No mippmaps on transparent stuff + else + pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LOD, 4); +#endif + //pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_LINEAR_MIPMAP_LINEAR); + } + else + pglTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, ptex); + } else { if (MipMap) @@ -2150,7 +2170,7 @@ EXPORT void HWRAPI(StartScreenWipe) (void) Clamp2D(GL_TEXTURE_WRAP_S); Clamp2D(GL_TEXTURE_WRAP_T); #ifndef KOS_GL_COMPATIBILITY - pglCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 0, 0, texsize, texsize, 0); + pglCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 0, 0, texsize, texsize, 0); #endif tex_downloaded = 0; // 0 so it knows it doesn't have any of the cached patches downloaded right now @@ -2179,7 +2199,7 @@ EXPORT void HWRAPI(EndScreenWipe)(void) Clamp2D(GL_TEXTURE_WRAP_S); Clamp2D(GL_TEXTURE_WRAP_T); #ifndef KOS_GL_COMPATIBILITY - pglCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 0, 0, texsize, texsize, 0); + pglCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 0, 0, texsize, texsize, 0); #endif tex_downloaded = 0; // 0 so it knows it doesn't have any of the cached patches downloaded right now @@ -2294,22 +2314,22 @@ EXPORT void HWRAPI(DoScreenWipe)(float alpha) // Bottom left pglMultiTexCoord2f(GL_TEXTURE0, 0.0f, 0.0f); - pglMultiTexCoord2f(GL_TEXTURE1, 0.0f, 0.0f); + pglMultiTexCoord2f(GL_TEXTURE1, 0.0f, 1.0f); pglVertex3f(-1.0f, -1.0f, 1.0f); // Top left pglMultiTexCoord2f(GL_TEXTURE0, 0.0f, yfix); - pglMultiTexCoord2f(GL_TEXTURE1, 0.0f, 1.0f); + pglMultiTexCoord2f(GL_TEXTURE1, 0.0f, 0.0f); pglVertex3f(-1.0f, 1.0f, 1.0f); // Top right pglMultiTexCoord2f(GL_TEXTURE0, xfix, yfix); - pglMultiTexCoord2f(GL_TEXTURE1, 1.0f, 1.0f); + pglMultiTexCoord2f(GL_TEXTURE1, 1.0f, 0.0f); pglVertex3f(1.0f, 1.0f, 1.0f); // Bottom right pglMultiTexCoord2f(GL_TEXTURE0, xfix, 0.0f); - pglMultiTexCoord2f(GL_TEXTURE1, 1.0f, 0.0f); + pglMultiTexCoord2f(GL_TEXTURE1, 1.0f, 1.0f); pglVertex3f(1.0f, -1.0f, 1.0f); pglEnd(); diff --git a/src/lua_playerlib.c b/src/lua_playerlib.c index 64513ab97..53af2e3ac 100644 --- a/src/lua_playerlib.c +++ b/src/lua_playerlib.c @@ -298,6 +298,8 @@ static int player_get(lua_State *L) lua_pushinteger(L, plr->lastlinehit); else if (fastcmp(field,"losstime")) lua_pushinteger(L, plr->losstime); + else if (fastcmp(field,"timeshit")) + lua_pushinteger(L, plr->timeshit); else if (fastcmp(field,"onconveyor")) lua_pushinteger(L, plr->onconveyor); else if (fastcmp(field,"awayviewmobj")) @@ -553,6 +555,8 @@ static int player_set(lua_State *L) plr->lastlinehit = (INT16)luaL_checkinteger(L, 3); else if (fastcmp(field,"losstime")) plr->losstime = (tic_t)luaL_checkinteger(L, 3); + else if (fastcmp(field,"timeshit")) + plr->timeshit = (UINT8)luaL_checkinteger(L, 3); else if (fastcmp(field,"onconveyor")) plr->onconveyor = (INT32)luaL_checkinteger(L, 3); else if (fastcmp(field,"awayviewmobj")) diff --git a/src/m_random.c b/src/m_random.c index 79f3af113..5fde12535 100644 --- a/src/m_random.c +++ b/src/m_random.c @@ -110,7 +110,7 @@ ATTRINLINE static fixed_t FUNCINLINE __internal_prng__(void) fixed_t P_RandomFixed(void) { #else -UINT8 P_RandomFixedD(const char *rfile, INT32 rline) +fixed_t P_RandomFixedD(const char *rfile, INT32 rline) { CONS_Printf("P_RandomFixed() at: %sp %d\n", rfile, rline); #endif diff --git a/src/p_mobj.c b/src/p_mobj.c index ac1cc9a25..957277b0a 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -38,7 +38,9 @@ // protos. static CV_PossibleValue_t viewheight_cons_t[] = {{16, "MIN"}, {56, "MAX"}, {0, NULL}}; consvar_t cv_viewheight = {"viewheight", VIEWHEIGHTS, 0, viewheight_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; +#ifdef WALLSPLATS consvar_t cv_splats = {"splats", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; +#endif actioncache_t actioncachehead; diff --git a/src/r_draw.c b/src/r_draw.c index d1673c9a6..1c574cfab 100644 --- a/src/r_draw.c +++ b/src/r_draw.c @@ -956,4 +956,6 @@ void R_DrawViewBorder(void) // INCLUDE 16bpp DRAWING CODE HERE // ========================================================================== +#ifdef HIGHCOLOR #include "r_draw16.c" +#endif diff --git a/src/r_draw.h b/src/r_draw.h index 0ece26487..97b2b2953 100644 --- a/src/r_draw.h +++ b/src/r_draw.h @@ -169,11 +169,13 @@ void R_DrawColumnShadowed_8(void); // 16bpp DRAWING CODE // ------------------ +#ifdef HIGHCOLOR void R_DrawColumn_16(void); void R_DrawWallColumn_16(void); void R_DrawTranslucentColumn_16(void); void R_DrawTranslatedColumn_16(void); void R_DrawSpan_16(void); +#endif // ========================================================================= #endif // __R_DRAW__