fix a few compiler warnings in VC

This commit is contained in:
mkendora
2003-09-01 00:22:37 +00:00
parent 2cc81803e3
commit 5b8f698d32
2 changed files with 4 additions and 4 deletions

View File

@@ -91,9 +91,9 @@ void hsi2rgb(double h, double s, double i, struct colorvalue *c)
bv = 1 + s * sin(t + 2 * M_PI / 3); bv = 1 + s * sin(t + 2 * M_PI / 3);
t = 255.999 * i / 2; t = 255.999 * i / 2;
{ {
c->r = floor(rv * t); c->r = (unsigned char) floor(rv * t);
c->g = floor(gv * t); c->g = (unsigned char) floor(gv * t);
c->b = floor(bv * t); c->b = (unsigned char) floor(bv * t);
} }
} }

View File

@@ -388,7 +388,7 @@ void SineBlob(int x, int y, int radius, int height, int page)
square = cy*cy + cx*cx; square = cy*cy + cx*cx;
if(square < radsquare) if(square < radsquare)
{ {
dist = sqrt(square*length); dist = (int) sqrt(square*length);
Height[page][SCRW*(cy+y) + cx+x] Height[page][SCRW*(cy+y) + cx+x]
+= (int)((FCos(dist)+0xffff)*(height)) >> 19; += (int)((FCos(dist)+0xffff)*(height)) >> 19;
} }