diff --git a/Quake/gl_texmgr.c b/Quake/gl_texmgr.c index e8b7bf1e..6f402bcf 100644 --- a/Quake/gl_texmgr.c +++ b/Quake/gl_texmgr.c @@ -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); } diff --git a/Quake/keys.c b/Quake/keys.c index 4b87d255..0f2f180f 100644 --- a/Quake/keys.c +++ b/Quake/keys.c @@ -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; diff --git a/Quake/vid.h b/Quake/vid.h index 14c752d1..afc91c78 100644 --- a/Quake/vid.h +++ b/Quake/vid.h @@ -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