@@ -618,7 +618,7 @@ long CMiniWindow::Font (LPCTSTR FontId, // eg. "inventory"
618
618
619
619
CFont * pFont = new CFont;
620
620
621
- int lfHeight = -MulDiv (Size ? Size : 10.0 , dc.GetDeviceCaps (LOGPIXELSY), 72 );
621
+ int lfHeight = -MulDiv (Size ? ( int ) Size : 10 , dc.GetDeviceCaps (LOGPIXELSY), 72 );
622
622
623
623
if (pFont->CreateFont (lfHeight,
624
624
0 , // int nWidth,
@@ -1925,7 +1925,7 @@ long CMiniWindow::ImageOp(short Action,
1925
1925
1926
1926
} // end of CMiniWindow::ImageOp
1927
1927
1928
- long CMiniWindow::CreateImage (LPCTSTR ImageId, long Row1, long Row2, long Row3, long Row4, long Row5, long Row6, long Row7, long Row8)
1928
+ long CMiniWindow::CreateImage (LPCTSTR ImageId, WORD Row1, WORD Row2, WORD Row3, WORD Row4, WORD Row5, WORD Row6, WORD Row7, WORD Row8)
1929
1929
{
1930
1930
1931
1931
ImageMapIterator it = m_Images.find (ImageId);
@@ -2679,12 +2679,12 @@ static void MakeTexture (const COLORREF Multiplier,
2679
2679
const long iHeight)
2680
2680
{
2681
2681
2682
- long rval = GetRValue (Multiplier),
2682
+ ULONG rval = GetRValue (Multiplier),
2683
2683
gval = GetGValue (Multiplier),
2684
2684
bval = GetBValue (Multiplier);
2685
2685
2686
- long row, col;
2687
- long c;
2686
+ ULONG row, col;
2687
+ ULONG c;
2688
2688
2689
2689
int increment = BytesPerLine (iWidth, 24 );
2690
2690
@@ -2695,9 +2695,9 @@ static void MakeTexture (const COLORREF Multiplier,
2695
2695
for (row = 0 ; row < iHeight; row++)
2696
2696
{
2697
2697
c = col ^ row;
2698
- p [0 ] = c * bval;
2699
- p [1 ] = c * gval;
2700
- p [2 ] = c * rval;
2698
+ p [0 ] = ( unsigned char ) ( c * bval) ;
2699
+ p [1 ] = ( unsigned char ) ( c * gval) ;
2700
+ p [2 ] = ( unsigned char ) ( c * rval) ;
2701
2701
p += increment;
2702
2702
} // end of each row
2703
2703
} // end of each column
@@ -2969,7 +2969,7 @@ static void Noise (unsigned char * inbuf, long iWidth, long iHeight, long iPerLi
2969
2969
for (i = 0 ; i < count; i++)
2970
2970
{
2971
2971
c = *pi;
2972
- c += (128 - genrand () * 256 ) * threshold;
2972
+ c += (long ) (( 128 - genrand () * 256 ) * threshold) ;
2973
2973
*pi++ = CLAMP (c);
2974
2974
}
2975
2975
0 commit comments