summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2007-05-15 17:54:46 +0000
committertruelight <truelight@openttd.org>2007-05-15 17:54:46 +0000
commitd2776ccde91e64b0402af22b512a8f6677fca86e (patch)
tree6ce084a7c1d603a88fd644e5427e53720639e11b
parent052ab1929d3412c29abb968c23ac738f92e64689 (diff)
downloadopenttd-d2776ccde91e64b0402af22b512a8f6677fca86e.tar.xz
(svn r9848) -Fix r9846: how every many times you check something, of course you always switch them at the last moment... UnScaleByZoom was ScaleByZoom and visa versa... (tnx to yeti_ for noticing)
-rw-r--r--src/zoom.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/zoom.hpp b/src/zoom.hpp
index fc57b0139..b05551475 100644
--- a/src/zoom.hpp
+++ b/src/zoom.hpp
@@ -34,13 +34,13 @@ extern ZoomLevel _saved_scrollpos_zoom;
static inline int ScaleByZoom(int value, ZoomLevel zoom)
{
int izoom = (int)zoom - (int)ZOOM_LVL_NORMAL;
- return (zoom > ZOOM_LVL_NORMAL) ? value >> izoom : value << izoom;
+ return (zoom > ZOOM_LVL_NORMAL) ? value << izoom : value >> izoom;
}
static inline int UnScaleByZoom(int value, ZoomLevel zoom)
{
int izoom = (int)zoom - (int)ZOOM_LVL_NORMAL;
- return (zoom > ZOOM_LVL_NORMAL) ? value << izoom : value >> izoom;
+ return (zoom > ZOOM_LVL_NORMAL) ? value >> izoom : value << izoom;
}
#endif /* ZOOM_HPP */