]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
casts to fix warnings in MSVC x64, thanks Willis
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 28 Feb 2006 06:29:59 +0000 (06:29 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 28 Feb 2006 06:29:59 +0000 (06:29 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6045 d7cf8633-e32d-0410-b094-e92efae38249

cl_screen.c
host_cmd.c
polygon.c

index 5b5c622af97bcf9ad283706d9b5fc907e11ba9d9..bb4ddfd0795c8c312355c5cbfd23776ebbdeca47 100644 (file)
@@ -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);
index 721b76a5fe69d2a0ef2e10c139d1cbb14ae83119..cfa9bb3fcf9eb49e9f53677d4f6eb49d1a78afd6 100644 (file)
@@ -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<l ; i++)
        {
                if (out >= send + sizeof(send) - 1)
index 997cb23a8313c4b5fb7c34e4552daeddbdce77bb..2bc897fbe8baec206093b5fe6bb26308b1a15793 100644 (file)
--- 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++;
                }