From b7318bfaf4db47d535e674fe5e34a1845b9ee5f3 Mon Sep 17 00:00:00 2001 From: TimeServ Date: Wed, 21 Sep 2005 01:21:35 +0000 Subject: [PATCH] warning fixes git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1350 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/zqtp.c | 3 ++- engine/gl/gl_heightmap.c | 4 ++-- engine/gl/gl_ppl.c | 7 ++----- engine/gl/gl_rmain.c | 3 +-- engine/sw/sw_draw.c | 15 +++++++++++++++ 5 files changed, 22 insertions(+), 10 deletions(-) diff --git a/engine/client/zqtp.c b/engine/client/zqtp.c index 9c848d44e..ec64b18e9 100644 --- a/engine/client/zqtp.c +++ b/engine/client/zqtp.c @@ -3189,6 +3189,8 @@ qboolean TP_SuppressMessage(char *buf) { return false; } +void CL_PrintChat(player_info_t *plr, char *rawmsg, char *msg, int plrflags); + void CL_Say (qboolean team, char *extra) { extern cvar_t cl_fakename; @@ -3228,7 +3230,6 @@ void CL_Say (qboolean team, char *extra) extern cvar_t cl_standardchat; //print it locally: char *d; - char colouration; for (s = sendtext, d = text; *s; s++, d++) { if (*s == '\xff') //text that is hidden to us diff --git a/engine/gl/gl_heightmap.c b/engine/gl/gl_heightmap.c index 577993fc1..18b9db3fa 100644 --- a/engine/gl/gl_heightmap.c +++ b/engine/gl/gl_heightmap.c @@ -265,10 +265,10 @@ int Heightmap_PointContents(model_t *model, vec3_t org) return Heightmap_PointContentsHM(hm, 0, org); } -float Heightmap_Normal(heightmap_t *hm, vec3_t org, vec3_t norm) +void Heightmap_Normal(heightmap_t *hm, vec3_t org, vec3_t norm) { float x, y; - float z, tz; + float z; int sx, sy; x = org[0]/hm->terrainscale; diff --git a/engine/gl/gl_ppl.c b/engine/gl/gl_ppl.c index 82b144645..c0fb031bc 100644 --- a/engine/gl/gl_ppl.c +++ b/engine/gl/gl_ppl.c @@ -1758,7 +1758,6 @@ void PPL_BaseBModelTextures(entity_t *e) void R_DrawLightning(entity_t *e) { vec3_t v; - vec3_t v2; vec3_t dir, cr; float scale = e->scale; float length; @@ -1825,7 +1824,6 @@ void R_DrawLightning(entity_t *e) void R_DrawRailCore(entity_t *e) { vec3_t v; - vec3_t v2; vec3_t dir, cr; float scale = e->scale; float length; @@ -2038,7 +2036,7 @@ void PPL_BaseEntTextures(void) { extern qboolean r_inmirror; extern model_t *currentmodel; - int i,j; + int i; if (!r_drawentities.value) return; @@ -2891,7 +2889,7 @@ void PPL_LightBModelTextures(entity_t *e, dlight_t *light, vec3_t colour) //draw the bumps on the models for each light. void PPL_DrawEntLighting(dlight_t *light, vec3_t colour) { - int i, j; + int i; PPL_LightTextures(cl.worldmodel, r_worldentity.origin, light, colour); @@ -5146,7 +5144,6 @@ void PPL_BeginShadowMesh(dlight_t *dl) } void PPL_FinishShadowMesh(dlight_t *dl) { - int i; if (!buildingmesh) return; diff --git a/engine/gl/gl_rmain.c b/engine/gl/gl_rmain.c index a6e60825c..ff57dc92f 100644 --- a/engine/gl/gl_rmain.c +++ b/engine/gl/gl_rmain.c @@ -852,7 +852,7 @@ R_DrawEntitiesOnList */ void GLR_DrawEntitiesOnList (void) { - int i, j; + int i; if (!r_drawentities.value) return; @@ -1821,7 +1821,6 @@ void R_MirrorAddPlayerModels (void) void R_Mirror (void) { - float d; msurface_t *s, *prevs, *prevr, *rejects; // entity_t *ent; mplane_t *mirror_plane; diff --git a/engine/sw/sw_draw.c b/engine/sw/sw_draw.c index 566dff778..15edabb9a 100644 --- a/engine/sw/sw_draw.c +++ b/engine/sw/sw_draw.c @@ -1738,6 +1738,21 @@ void SWDraw_Image (float xp, float yp, float wp, float hp, float s1, float t1, f if (!pic) return; + // scale call against console vs actual video ration + { + // this has to be done this way because CSQC drawing needs + // to respect these cvars + extern cvar_t vid_conheight, vid_conwidth; + + xratio = vid.width / vid_conwidth.value; + yratio = vid.height / vid_conheight.value; + xp *= xratio; + yp *= yratio; + wp *= xratio; + hp *= yratio; + } + + // image scale xratio = pic->width / wp; yratio = pic->height / hp;