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 | b605f686310fdb328c777dc36f9233e9923bf5e5 (patch) | |
tree | 839525ed601a24ac844e1fb9f64be11f2890b982 /src/vehicle.cpp | |
parent | 5b1b54e614a7f7a3f07c8091dd988cb0e50f7bd2 (diff) | |
download | openttd-b605f686310fdb328c777dc36f9233e9923bf5e5.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/vehicle.cpp')
-rw-r--r-- | src/vehicle.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 724cd3428..1b5b720b9 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -1425,8 +1425,8 @@ Vehicle *CheckClickOnVehicle(const ViewPort *vp, int x, int y) (uint)(y -= vp->top) >= (uint)vp->height) return NULL; - x = (x << vp->zoom) + vp->virtual_left; - y = (y << vp->zoom) + vp->virtual_top; + x = ScaleByZoom(x, vp->zoom) + vp->virtual_left; + y = ScaleByZoom(y, vp->zoom) + vp->virtual_top; FOR_ALL_VEHICLES(v) { if ((v->vehstatus & (VS_HIDDEN|VS_UNCLICKABLE)) == 0 && |