changed the rowbytes, width, height, conwidth and conheight members of

viddef_t from unsigned to signed int. fixed the -Wsign-compare warnings
for NUM_GLMODES. fixed compilation using g++, by adding a missing type
cast.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@641 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Ozkan Sezer 2012-03-08 10:14:58 +00:00
parent b42522932a
commit 88a4c92ef5
3 changed files with 10 additions and 10 deletions

View file

@ -66,7 +66,7 @@ static glmode_t glmodes[] = {
{GL_LINEAR, GL_LINEAR_MIPMAP_NEAREST, "GL_LINEAR_MIPMAP_NEAREST"},
{GL_LINEAR, GL_LINEAR_MIPMAP_LINEAR, "GL_LINEAR_MIPMAP_LINEAR"},
};
#define NUM_GLMODES ( sizeof(glmodes)/sizeof(glmodes[0]) )
#define NUM_GLMODES (int)(sizeof(glmodes)/sizeof(glmodes[0]))
static int glmode_idx = NUM_GLMODES - 1; /* trilinear */
/*
@ -533,9 +533,9 @@ void TexMgr_RecalcWarpImageSize (void)
gl_warpimagesize = TexMgr_SafeTextureSize (512);
while (gl_warpimagesize > (int)vid.width)
while (gl_warpimagesize > vid.width)
gl_warpimagesize >>= 1;
while (gl_warpimagesize > (int)vid.height)
while (gl_warpimagesize > vid.height)
gl_warpimagesize >>= 1;
if (gl_warpimagesize == oldsize)
@ -1254,7 +1254,7 @@ void TexMgr_ReloadImage (gltexture_t *glt, int shirt, int pants)
size *= 4;
else if (glt->source_format == SRC_LIGHTMAP)
size *= lightmap_bytes;
data = Hunk_Alloc (size);
data = (byte *) Hunk_Alloc (size);
fread (data, 1, size, f);
fclose (f);
}

View file

@ -274,7 +274,7 @@ void Key_Console (int key)
// when mouse is released to the window manager
// case K_MWHEELUP:
con_backscroll += keydown[K_CTRL] ? ((con_vislines>>3) - 4) : 2;
if (con_backscroll > con_totallines - (int)(vid.height>>3) - 1)
if (con_backscroll > con_totallines - (vid.height>>3) - 1)
con_backscroll = con_totallines - (vid.height>>3) - 1;
return;

View file

@ -48,16 +48,16 @@ typedef struct
pixel_t *colormap; // 256 * VID_GRADES size
unsigned short *colormap16; // 256 * VID_GRADES size
int fullbright; // index of first fullbright color
unsigned rowbytes; // may be > width if displayed in a window
unsigned width;
unsigned height;
int rowbytes; // may be > width if displayed in a window
int width;
int height;
float aspect; // width / height -- < 0 is taller than wide
int numpages;
int recalc_refdef; // if true, recalc vid-based stuff
pixel_t *conbuffer;
int conrowbytes;
unsigned conwidth;
unsigned conheight;
int conwidth;
int conheight;
int maxwarpwidth;
int maxwarpheight;
pixel_t *direct; // direct drawing to framebuffer, if not NULL