mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 15:31:39 +00:00
Fixed -Wmisleading-indentation warnings from new gcc6.
The warning from gl_model.c:Mod_LoadTextures() seemed like a real bug: Eric please check and confirm. git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1301 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
9860de2438
commit
dbb253af66
4 changed files with 16 additions and 12 deletions
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue