(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:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user