diff --git a/Quake/gl_model.c b/Quake/gl_model.c index a231b156..99d2b951 100644 --- a/Quake/gl_model.c +++ b/Quake/gl_model.c @@ -534,8 +534,10 @@ void Mod_LoadTextures (lump_t *l) q_snprintf (filename2, sizeof(filename2), "%s_glow", filename); data = Image_LoadImage (filename2, &fwidth, &fheight); if (!data) + { q_snprintf (filename2, sizeof(filename2), "%s_luma", filename); data = Image_LoadImage (filename2, &fwidth, &fheight); + } if (data) tx->fullbright = TexMgr_LoadImage (loadmodel, filename2, fwidth, fheight, diff --git a/Quake/gl_texmgr.c b/Quake/gl_texmgr.c index 46374062..6ace37c5 100644 --- a/Quake/gl_texmgr.c +++ b/Quake/gl_texmgr.c @@ -671,8 +671,8 @@ TexMgr_SafeTextureSize -- return a size with hardware and user prefs in mind */ int TexMgr_SafeTextureSize (int s) { - if (!gl_texture_NPOT) - s = TexMgr_Pad(s); + if (!gl_texture_NPOT) + s = TexMgr_Pad(s); if ((int)gl_max_size.value > 0) s = q_min(TexMgr_Pad((int)gl_max_size.value), s); s = q_min(gl_hardware_maxsize, s); diff --git a/Quake/gl_vidsdl.c b/Quake/gl_vidsdl.c index e9e0c3ac..00a62a94 100644 --- a/Quake/gl_vidsdl.c +++ b/Quake/gl_vidsdl.c @@ -495,9 +495,9 @@ VID_ValidMode static qboolean VID_ValidMode (int width, int height, int bpp, qboolean fullscreen) { // ignore width / height / bpp if vid_desktopfullscreen is enabled - if (fullscreen && vid_desktopfullscreen.value) - return true; - + if (fullscreen && vid_desktopfullscreen.value) + return true; + if (width < 320) return false; diff --git a/Quake/r_brush.c b/Quake/r_brush.c index bb9e5e78..d9bde1ef 100644 --- a/Quake/r_brush.c +++ b/Quake/r_brush.c @@ -555,7 +555,7 @@ void R_DrawBrushModel (entity_t *e) } } - glPushMatrix (); + glPushMatrix (); e->angles[0] = -e->angles[0]; // stupid quake bug if (gl_zfix.value) { @@ -1154,6 +1154,7 @@ void R_BuildLightMap (msurface_t *surf, byte *dest, int stride) // add all the lightmaps if (lightmap) + { for (maps = 0 ; maps < MAXLIGHTMAPS && surf->styles[maps] != 255 ; maps++) { @@ -1169,6 +1170,7 @@ void R_BuildLightMap (msurface_t *surf, byte *dest, int stride) } //johnfitz } + } // add all the dynamic lights if (surf->dlightframe == r_framecount) @@ -1203,9 +1205,9 @@ void R_BuildLightMap (msurface_t *surf, byte *dest, int stride) g = *bl++ >> 7; b = *bl++ >> 7; } - if (r > 255) r = 255; *dest++ = r; - if (g > 255) g = 255; *dest++ = g; - if (b > 255) b = 255; *dest++ = b; + *dest++ = (r > 255)? 255 : r; + *dest++ = (g > 255)? 255 : g; + *dest++ = (b > 255)? 255 : b; *dest++ = 255; } } @@ -1229,9 +1231,9 @@ void R_BuildLightMap (msurface_t *surf, byte *dest, int stride) g = *bl++ >> 7; b = *bl++ >> 7; } - if (b > 255) b = 255; *dest++ = b; - if (g > 255) g = 255; *dest++ = g; - if (r > 255) r = 255; *dest++ = r; + *dest++ = (b > 255)? 255 : b; + *dest++ = (g > 255)? 255 : g; + *dest++ = (r > 255)? 255 : r; *dest++ = 255; } }