summaryrefslogtreecommitdiff
path: root/src/screenshot.cpp
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2007-05-15 16:08:46 +0000
committertruelight <truelight@openttd.org>2007-05-15 16:08:46 +0000
commit765c466b8d5f9a534f785a14b4c41e36e07ae014 (patch)
tree839525ed601a24ac844e1fb9f64be11f2890b982 /src/screenshot.cpp
parentd4963476cb0226490143e9843df897f792feacb2 (diff)
downloadopenttd-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/screenshot.cpp')
-rw-r--r--src/screenshot.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/screenshot.cpp b/src/screenshot.cpp
index a6d3153c0..5948f29d3 100644
--- a/src/screenshot.cpp
+++ b/src/screenshot.cpp
@@ -479,10 +479,10 @@ static void LargeWorldCallback(void *userdata, Pixel *buf, uint y, uint pitch, u
left += wx;
ViewportDoDraw(vp,
- ((left - wx - vp->left) << vp->zoom) + vp->virtual_left,
- ((y - vp->top) << vp->zoom) + vp->virtual_top,
- ((left - vp->left) << vp->zoom) + vp->virtual_left,
- (((y + n) - vp->top) << vp->zoom) + vp->virtual_top
+ ScaleByZoom(left - wx - vp->left, vp->zoom) + vp->virtual_left,
+ ScaleByZoom(y - vp->top, vp->zoom) + vp->virtual_top,
+ ScaleByZoom(left - vp->left, vp->zoom) + vp->virtual_left,
+ ScaleByZoom((y + n) - vp->top, vp->zoom) + vp->virtual_top
);
}