]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Removed warnings in MSVC6. Updated the DSP file.
authormolivier <molivier@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 1 Feb 2002 07:20:26 +0000 (07:20 +0000)
committermolivier <molivier@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 1 Feb 2002 07:20:26 +0000 (07:20 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@1459 d7cf8633-e32d-0410-b094-e92efae38249

cgame.c
cgamevm.c
darkplaces.dsp
gl_draw.c

diff --git a/cgame.c b/cgame.c
index a8715c414904c03a42d335f24c0fd92cdc1ab05d..199d58dcfcde035f0ac481f9f187ebf96eecaff8 100644 (file)
--- a/cgame.c
+++ b/cgame.c
@@ -77,7 +77,7 @@ static localentity_t *entspawn(void)
 static void entremove(localentity_t *e)
 {
        memset(e, 0, sizeof(*e));
-       e->freetime = gametime + 1;
+       e->freetime = (float)gametime + 1.0f;
 }
 
 static void phys_setupphysentities(void)
@@ -122,7 +122,7 @@ static void phys_update(localentity_t *e)
        vec3_t impactpos, impactnormal, end;
        int impactentnum;
        float t, f, frac, bounce;
-       t = frametime;
+       t = (float)frametime;
        if (t == 0)
                return;
        VectorMA(e->draw.angles, t, e->avelocity, e->draw.angles);
@@ -179,7 +179,7 @@ static void explosiondebris_framethink(localentity_t *self)
 {
        if (gametime > self->dietime)
        {
-               self->draw.scale -= frametime * 3;
+               self->draw.scale -= (float)frametime * 3.0f;
                if (self->draw.scale < 0.05f)
                {
                        entremove(self);
@@ -213,7 +213,7 @@ static void net_explosion(unsigned char num)
                e->draw.angles[2] = CGVM_RandomRange(0, 360);
                VectorRandom(e->velocity);
                VectorScale(e->velocity, 300, e->velocity);
-               e->velocity[2] -= cg_gravity * 0.1;
+               e->velocity[2] -= (float)cg_gravity * 0.1f;
                e->avelocity[0] = CGVM_RandomRange(0, 1440);
                e->avelocity[1] = CGVM_RandomRange(0, 1440);
                e->avelocity[2] = CGVM_RandomRange(0, 1440);
@@ -234,11 +234,11 @@ static void net_explosion(unsigned char num)
                VectorSet(e->worldmaxs, 0, 0, -8);
                VectorSet(e->entitymins, -8, -8, -8);
                VectorSet(e->entitymaxs, 8, 8, 8);
-               e->bouncescale = 1.4;
+               e->bouncescale = 1.4f;
                e->gravityscale = 1;
                e->airfrictionscale = 1;
                e->framethink = explosiondebris_framethink;
-               e->dietime = time + 5;
+               e->dietime = (float)time + 5.0f;
        }
 }
 
index d11642ecb31b7abcca73841b693ccd350d93a1fc..d6caeb9a1b6a20ce8c62c93b872114e512922b36 100644 (file)
--- a/cgamevm.c
+++ b/cgamevm.c
@@ -56,7 +56,7 @@ void CL_CGVM_ParseNetwork(byte *netbuffer, int length)
        {
                num = CGVM_MSG_ReadByte();
                if (cgvm_networkcode[num])
-                       cgvm_networkcode[num](num);
+                       cgvm_networkcode[num]((byte)num);
                else
                        Host_Error("CL_CGVM_ParseNetwork: unregistered network code %i", num);
        }
@@ -183,7 +183,7 @@ void *CGVM_Malloc(const int size)
 
 void CGVM_Free(void *mem)
 {
-       return Mem_Free(mem);
+       Mem_Free(mem);
 }
 
 float CGVM_RandomRange(const float r1, const float r2)
index 94c790d30ce55d44537ee2567e48c38c74b51590..9da724e6989070f78ec35238eed0fc277c786a40 100644 (file)
@@ -92,7 +92,7 @@ LINK32=link.exe
 # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
 # Begin Source File
 
-SOURCE=.\buildnumber.c
+SOURCE=.\builddate.c
 # End Source File
 # Begin Source File
 
@@ -100,6 +100,14 @@ SOURCE=.\cd_win.c
 # End Source File
 # Begin Source File
 
+SOURCE=.\cgame.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\cgamevm.c
+# End Source File
+# Begin Source File
+
 SOURCE=.\chase.c
 # End Source File
 # Begin Source File
@@ -424,6 +432,18 @@ SOURCE=.\cdaudio.h
 # End Source File
 # Begin Source File
 
+SOURCE=.\cg_math.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\cgame_api.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\cgamevm.h
+# End Source File
+# Begin Source File
+
 SOURCE=.\cl_light.h
 # End Source File
 # Begin Source File
index 4518040127b3322a66344ab321ceca2eb40d6509..5928120854c68c2cd5b11b85851fb2acb4dd57e5 100644 (file)
--- a/gl_draw.c
+++ b/gl_draw.c
@@ -468,9 +468,9 @@ void R_DrawQueue(void)
                {
                        color = dq->color;
                        if (lighthalf)
-                               glColor4ub((color >> 25) & 0x7F, (color >> 17) & 0x7F, (color >> 9) & 0x7F, color & 0xFF);
+                               glColor4ub((byte)((color >> 25) & 0x7F), (byte)((color >> 17) & 0x7F), (byte)((color >> 9) & 0x7F), (byte)(color & 0xFF));
                        else
-                               glColor4ub((color >> 24) & 0xFF, (color >> 16) & 0xFF, (color >> 8) & 0xFF, color & 0xFF);
+                               glColor4ub((byte)((color >> 24) & 0xFF), (byte)((color >> 16) & 0xFF), (byte)((color >> 8) & 0xFF), (byte)(color & 0xFF));
                }
                x = dq->x;
                y = dq->y;