From 7fde604d13c0328dbb111840a55e8a47fb1cfe88 Mon Sep 17 00:00:00 2001 From: TimeServ Date: Wed, 5 Oct 2005 02:44:40 +0000 Subject: [PATCH] warning fix git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1432 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/cl_input.c | 4 ++-- engine/client/cl_ui.c | 8 ++++---- engine/server/sv_ccmds.c | 1 + engine/sw/d_polyse.c | 6 +++--- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/engine/client/cl_input.c b/engine/client/cl_input.c index 4d2fe21b2..bd700718e 100644 --- a/engine/client/cl_input.c +++ b/engine/client/cl_input.c @@ -601,9 +601,9 @@ void CL_DrawPrydonCursor(void) { mpic_t *pic = Draw_SafeCachePic(va("gfx/prydoncursor%03i.lmp", (int)cl_prydoncursor.value)); if (pic) - Draw_Pic((cursor_screen[0] + 1) * 0.5 * vid.width, (cursor_screen[1] + 1) * 0.5 * vid.height, pic); + Draw_Pic((int)((cursor_screen[0] + 1) * 0.5 * vid.width), (int)((cursor_screen[1] + 1) * 0.5 * vid.height), pic); else - Draw_Character((cursor_screen[0] + 1) * 0.5 * vid.width, (cursor_screen[1] + 1) * 0.5 * vid.height, '+'); + Draw_Character((int)((cursor_screen[0] + 1) * 0.5 * vid.width), (int)((cursor_screen[1] + 1) * 0.5 * vid.height), '+'); } } diff --git a/engine/client/cl_ui.c b/engine/client/cl_ui.c index 3c543ad59..012cdaafb 100644 --- a/engine/client/cl_ui.c +++ b/engine/client/cl_ui.c @@ -48,11 +48,11 @@ int Script_Read(int handle, pc_token_t *token) if (!sc->stackdepth) return 0; - sc->filestack[sc->stackdepth-1] = COM_ParseToken(sc->filestack[sc->stackdepth-1], Q3SCRIPTPUNCTUATION); + sc->filestack[sc->stackdepth-1] = (char *)COM_ParseToken(sc->filestack[sc->stackdepth-1], Q3SCRIPTPUNCTUATION); if (!strcmp(com_token, "#include")) { - sc->filestack[sc->stackdepth-1] = COM_ParseToken(sc->filestack[sc->stackdepth-1], Q3SCRIPTPUNCTUATION); + sc->filestack[sc->stackdepth-1] = (char *)COM_ParseToken(sc->filestack[sc->stackdepth-1], Q3SCRIPTPUNCTUATION); if (sc->stackdepth == SCRIPT_MAXDEPTH) //just don't enter it continue; @@ -67,9 +67,9 @@ int Script_Read(int handle, pc_token_t *token) { sc->numdefines++; sc->defines = BZ_Realloc(sc->defines, sc->numdefines*SCRIPT_DEFINELENGTH*2); - sc->filestack[sc->stackdepth-1] = COM_ParseToken(sc->filestack[sc->stackdepth-1], Q3SCRIPTPUNCTUATION); + sc->filestack[sc->stackdepth-1] = (char *)COM_ParseToken(sc->filestack[sc->stackdepth-1], Q3SCRIPTPUNCTUATION); Q_strncpyz(sc->defines+SCRIPT_DEFINELENGTH*2*(sc->numdefines-1), com_token, SCRIPT_DEFINELENGTH); - sc->filestack[sc->stackdepth-1] = COM_ParseToken(sc->filestack[sc->stackdepth-1], Q3SCRIPTPUNCTUATION); + sc->filestack[sc->stackdepth-1] = (char *)COM_ParseToken(sc->filestack[sc->stackdepth-1], Q3SCRIPTPUNCTUATION); Q_strncpyz(sc->defines+SCRIPT_DEFINELENGTH*2*(sc->numdefines-1)+SCRIPT_DEFINELENGTH, com_token, SCRIPT_DEFINELENGTH); continue; diff --git a/engine/server/sv_ccmds.c b/engine/server/sv_ccmds.c index 99da79384..867656319 100644 --- a/engine/server/sv_ccmds.c +++ b/engine/server/sv_ccmds.c @@ -1158,6 +1158,7 @@ SV_Serverinfo_f =========== */ char *CopyString(char *s); +extern char *Info_KeyForNumber(char *s, int num); void SV_Serverinfo_f (void) { cvar_t *var; diff --git a/engine/sw/d_polyse.c b/engine/sw/d_polyse.c index 86c5c8236..f088b861c 100644 --- a/engine/sw/d_polyse.c +++ b/engine/sw/d_polyse.c @@ -181,7 +181,7 @@ void D_PolysetDrawFinalVertsTrans (finalvert_t *fv, int numverts) *zbuf = z; pix = skintable[fv->v[3]>>16][fv->v[2]>>16]; pix = ((qbyte *)acolormap)[pix + (fv->v[4] & 0xFF00) ]; - d_viewbuffer[d_scantable[fv->v[1]] + fv->v[0]] = Trans(d_viewbuffer[d_scantable[fv->v[1]] + fv->v[0]], pix); + d_viewbuffer[d_scantable[fv->v[1]] + fv->v[0]] = Trans(d_viewbuffer[d_scantable[fv->v[1]] + fv->v[0]], (unsigned char)pix); } } } @@ -317,7 +317,7 @@ split: *zbuf = z; pix = d_pcolormap[skintable[new[3]>>16][new[2]>>16]]; - d_viewbuffer[d_scantable[new[1]] + new[0]] = Trans(d_viewbuffer[d_scantable[new[1]] + new[0]], pix); + d_viewbuffer[d_scantable[new[1]] + new[0]] = Trans(d_viewbuffer[d_scantable[new[1]] + new[0]], (unsigned char)pix); } nodraw: @@ -798,7 +798,7 @@ void D_PolysetFillSpans8Trans (spanpackage_t *pspanpackage) do { - *lpdest = Trans(*lpdest, color); + *lpdest = Trans(*lpdest, (unsigned char)color); lpdest++; } while (--lcount); }