From: havoc Date: Tue, 28 Feb 2006 06:29:59 +0000 (+0000) Subject: casts to fix warnings in MSVC x64, thanks Willis X-Git-Tag: xonotic-v0.1.0preview~4269 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=commitdiff_plain;h=9878868f40ebebd6aeaa254d0b1fb4759211a394;hp=cf5edeae6aba6fc1b7b509b832a0074bcc64ba3d casts to fix warnings in MSVC x64, thanks Willis git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6045 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_screen.c b/cl_screen.c index 5b5c622a..bb4ddfd0 100644 --- a/cl_screen.c +++ b/cl_screen.c @@ -405,7 +405,7 @@ static void SCR_DrawDownload(void) if (!cls.qw_downloadname[0]) return; dpsnprintf(temp, sizeof(temp), "Downloading %s ... %3i%%\n", cls.qw_downloadname, cls.qw_downloadpercent); - len = strlen(temp); + len = (int)strlen(temp); x = (vid_conwidth.integer - len*size) / 2; y = vid_conheight.integer - size; DrawQ_Fill(0, y, vid_conwidth.integer, size, 0, 0, 0, 0.5, 0); diff --git a/host_cmd.c b/host_cmd.c index 721b76a5..cfa9bb3f 100644 --- a/host_cmd.c +++ b/host_cmd.c @@ -2230,7 +2230,7 @@ void Host_Packet_f (void) // credit: taken from QuakeWorld out = send+4; send[0] = send[1] = send[2] = send[3] = 0xff; - l = strlen (in); + l = (int)strlen (in); for (i=0 ; i= send + sizeof(send) - 1) diff --git a/polygon.c b/polygon.c index 997cb23a..2bc897fb 100644 --- a/polygon.c +++ b/polygon.c @@ -135,16 +135,16 @@ void PolygonF_Divide(int innumpoints, const float *inpoints, float planenormalx, frac = pdist / (pdist - ndist); if (frontcount < outfrontmaxpoints) { - *outfrontpoints++ = p[0] + frac * (n[0] - p[0]); - *outfrontpoints++ = p[1] + frac * (n[1] - p[1]); - *outfrontpoints++ = p[2] + frac * (n[2] - p[2]); + *outfrontpoints++ = (float)(p[0] + frac * (n[0] - p[0])); + *outfrontpoints++ = (float)(p[1] + frac * (n[1] - p[1])); + *outfrontpoints++ = (float)(p[2] + frac * (n[2] - p[2])); } frontcount++; if (backcount < outbackmaxpoints) { - *outbackpoints++ = p[0] + frac * (n[0] - p[0]); - *outbackpoints++ = p[1] + frac * (n[1] - p[1]); - *outbackpoints++ = p[2] + frac * (n[2] - p[2]); + *outbackpoints++ = (float)(p[0] + frac * (n[0] - p[0])); + *outbackpoints++ = (float)(p[1] + frac * (n[1] - p[1])); + *outbackpoints++ = (float)(p[2] + frac * (n[2] - p[2])); } backcount++; }