diff options
author | truelight <truelight@openttd.org> | 2007-05-15 16:08:46 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2007-05-15 16:08:46 +0000 |
commit | 765c466b8d5f9a534f785a14b4c41e36e07ae014 (patch) | |
tree | 839525ed601a24ac844e1fb9f64be11f2890b982 /src/openttd.cpp | |
parent | d4963476cb0226490143e9843df897f792feacb2 (diff) | |
download | openttd-765c466b8d5f9a534f785a14b4c41e36e07ae014.tar.xz |
(svn r9846) -Codechange: introduced ZOOM_LVL_MIN and ZOOM_LVL_MAX for the obvious reasons
-Codechange: introduced ZOOM_LVL_DETAIL to show/remove details
-Codechange: changed << and >> operator with ZoomLevel to a simple wrapper (that in theory also allows zoom-in besides the current zoom-out)
-Fix r9845: missed some int -> ZoomLevel
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r-- | src/openttd.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp index 0cd1d5b49..088d9fce5 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -986,8 +986,8 @@ static void ScrollMainViewport(int x, int y) Window *w = FindWindowById(WC_MAIN_WINDOW, 0); assert(w); - WP(w,vp_d).scrollpos_x += x << w->viewport->zoom; - WP(w,vp_d).scrollpos_y += y << w->viewport->zoom; + WP(w,vp_d).scrollpos_x += ScaleByZoom(x, w->viewport->zoom); + WP(w,vp_d).scrollpos_y += ScaleByZoom(y, w->viewport->zoom); } } @@ -1282,8 +1282,8 @@ bool AfterLoadGame() vp = w->viewport; vp->zoom = _saved_scrollpos_zoom; - vp->virtual_width = vp->width << vp->zoom; - vp->virtual_height = vp->height << vp->zoom; + vp->virtual_width = ScaleByZoom(vp->width, vp->zoom); + vp->virtual_height = ScaleByZoom(vp->height, vp->zoom); /* in version 4.1 of the savegame, is_active was introduced to determine * if a player does exist, rather then checking name_1 */ |