warning fix

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1432 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
TimeServ 2005-10-05 02:44:40 +00:00
parent 239e88122b
commit 7fde604d13
4 changed files with 10 additions and 9 deletions

View file

@ -601,9 +601,9 @@ void CL_DrawPrydonCursor(void)
{ {
mpic_t *pic = Draw_SafeCachePic(va("gfx/prydoncursor%03i.lmp", (int)cl_prydoncursor.value)); mpic_t *pic = Draw_SafeCachePic(va("gfx/prydoncursor%03i.lmp", (int)cl_prydoncursor.value));
if (pic) 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 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), '+');
} }
} }

View file

@ -48,11 +48,11 @@ int Script_Read(int handle, pc_token_t *token)
if (!sc->stackdepth) if (!sc->stackdepth)
return 0; 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")) 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 if (sc->stackdepth == SCRIPT_MAXDEPTH) //just don't enter it
continue; continue;
@ -67,9 +67,9 @@ int Script_Read(int handle, pc_token_t *token)
{ {
sc->numdefines++; sc->numdefines++;
sc->defines = BZ_Realloc(sc->defines, sc->numdefines*SCRIPT_DEFINELENGTH*2); 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); 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); Q_strncpyz(sc->defines+SCRIPT_DEFINELENGTH*2*(sc->numdefines-1)+SCRIPT_DEFINELENGTH, com_token, SCRIPT_DEFINELENGTH);
continue; continue;

View file

@ -1158,6 +1158,7 @@ SV_Serverinfo_f
=========== ===========
*/ */
char *CopyString(char *s); char *CopyString(char *s);
extern char *Info_KeyForNumber(char *s, int num);
void SV_Serverinfo_f (void) void SV_Serverinfo_f (void)
{ {
cvar_t *var; cvar_t *var;

View file

@ -181,7 +181,7 @@ void D_PolysetDrawFinalVertsTrans (finalvert_t *fv, int numverts)
*zbuf = z; *zbuf = z;
pix = skintable[fv->v[3]>>16][fv->v[2]>>16]; pix = skintable[fv->v[3]>>16][fv->v[2]>>16];
pix = ((qbyte *)acolormap)[pix + (fv->v[4] & 0xFF00) ]; 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; *zbuf = z;
pix = d_pcolormap[skintable[new[3]>>16][new[2]>>16]]; 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: nodraw:
@ -798,7 +798,7 @@ void D_PolysetFillSpans8Trans (spanpackage_t *pspanpackage)
do do
{ {
*lpdest = Trans(*lpdest, color); *lpdest = Trans(*lpdest, (unsigned char)color);
lpdest++; lpdest++;
} while (--lcount); } while (--lcount);
} }