summaryrefslogtreecommitdiff
path: root/src/main_gui.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2007-12-17 22:04:07 +0000
committersmatz <smatz@openttd.org>2007-12-17 22:04:07 +0000
commit8d91abdfe3f3786e48a5b81b06a23bf162a9d2c0 (patch)
treee1686070db2bce48c4953e4bbef6a196640ae495 /src/main_gui.cpp
parent89e49e5e95e8870be557291a9c9c348bb98e003a (diff)
downloadopenttd-8d91abdfe3f3786e48a5b81b06a23bf162a9d2c0.tar.xz
(svn r11656) -Codechange: add ZOOM_LVL_BEGIN and postfix operators so ZoomLevel can be used in some iterations
Diffstat (limited to 'src/main_gui.cpp')
-rw-r--r--src/main_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main_gui.cpp b/src/main_gui.cpp
index d85ec6369..66d854060 100644
--- a/src/main_gui.cpp
+++ b/src/main_gui.cpp
@@ -872,7 +872,7 @@ bool DoZoomInOutWindow(int how, Window *w)
switch (how) {
case ZOOM_IN:
if (vp->zoom == ZOOM_LVL_MIN) return false;
- vp->zoom = (ZoomLevel)((byte)vp->zoom - 1);
+ vp->zoom = (ZoomLevel)((int)vp->zoom - 1);
vp->virtual_width >>= 1;
vp->virtual_height >>= 1;
@@ -883,7 +883,7 @@ bool DoZoomInOutWindow(int how, Window *w)
break;
case ZOOM_OUT:
if (vp->zoom == ZOOM_LVL_MAX) return false;
- vp->zoom = (ZoomLevel)((byte)vp->zoom + 1);
+ vp->zoom = (ZoomLevel)((int)vp->zoom + 1);
WP(w, vp_d).scrollpos_x -= vp->virtual_width >> 1;
WP(w, vp_d).scrollpos_y -= vp->virtual_height >> 1;