(svn r19005) -Codechange: make animated cursors have a bit set instead of using negative numbers that are passed as uints, then cast again to be compared as ints before being inverted to be actually used. Also fixes a couple of 'integer conversion resulted in truncation' warnings ICC spewed.

This commit is contained in:
rubidium
2010-02-04 15:42:38 +00:00
parent 09730847ec
commit fbb9b4760a
2 changed files with 10 additions and 9 deletions

View File

@@ -2714,8 +2714,8 @@ void SetObjectToPlace(CursorID icon, PaletteID pal, HighLightStyle mode, WindowC
if (mode == HT_SPECIAL) // special tools, like tunnels or docks start with presizing mode
VpStartPreSizing();
if ((int)icon < 0) {
SetAnimatedMouseCursor(_animcursors[~icon]);
if ((icon & ANIMCURSOR_FLAG) != 0) {
SetAnimatedMouseCursor(_animcursors[icon & ~ANIMCURSOR_FLAG]);
} else {
SetMouseCursor(icon, pal);
}