diff options
author | rubidium <rubidium@openttd.org> | 2010-02-04 15:42:38 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-02-04 15:42:38 +0000 |
commit | fbb9b4760a7b85867817b4a089aeca0506bdb8be (patch) | |
tree | 57d0e9ca840e665c130f10074f15e778d0bec9b4 /src/viewport.cpp | |
parent | 09730847eca596eae871deff4e539b345494e8a4 (diff) | |
download | openttd-fbb9b4760a7b85867817b4a089aeca0506bdb8be.tar.xz |
(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.
Diffstat (limited to 'src/viewport.cpp')
-rw-r--r-- | src/viewport.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/viewport.cpp b/src/viewport.cpp index 4fe1553bb..c9b674605 100644 --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -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); } |