summaryrefslogtreecommitdiff
path: root/src/viewport.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-01-09 22:56:28 +0000
committerrubidium <rubidium@openttd.org>2009-01-09 22:56:28 +0000
commitcda853872aa079139f25fc9492bdb73476c213e0 (patch)
tree378bc97d52ab0658bfed8695d1ce2f01bf572802 /src/viewport.cpp
parentc08f520acf61f85f84e9bdb1dad8172d2c29a48b (diff)
downloadopenttd-cda853872aa079139f25fc9492bdb73476c213e0.tar.xz
(svn r14944) -Cleanup: add spaces around some operators
Diffstat (limited to 'src/viewport.cpp')
-rw-r--r--src/viewport.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/viewport.cpp b/src/viewport.cpp
index 4572665e4..a20d55386 100644
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -270,14 +270,14 @@ static void DoSetViewportPosition(const Window *w, int left, int top, int width,
left += xo;
width -= xo;
} else if (xo < 0) {
- RedrawScreenRect(left+width+xo, top, left+width, top + height);
+ RedrawScreenRect(left + width + xo, top, left + width, top + height);
width += xo;
}
if (yo > 0) {
- RedrawScreenRect(left, top, width+left, top + yo);
+ RedrawScreenRect(left, top, width + left, top + yo);
} else if (yo < 0) {
- RedrawScreenRect(left, top + height + yo, width+left, top + height);
+ RedrawScreenRect(left, top + height + yo, width + left, top + height);
}
}
}
@@ -364,7 +364,7 @@ ViewPort *IsPtInWindowViewport(const Window *w, int x, int y)
static Point TranslateXYToTileCoord(const ViewPort *vp, int x, int y)
{
Point pt;
- int a,b;
+ int a, b;
uint z;
if ( (uint)(x -= vp->left) >= (uint)vp->width ||
@@ -376,8 +376,8 @@ static Point TranslateXYToTileCoord(const ViewPort *vp, int x, int y)
x = (ScaleByZoom(x, vp->zoom) + vp->virtual_left) >> 2;
y = (ScaleByZoom(y, vp->zoom) + vp->virtual_top) >> 1;
- a = y-x;
- b = y+x;
+ a = y - x;
+ b = y + x;
/* we need to move variables in to the valid range, as the
* GetTileZoomCenterWindow() function can call here with invalid x and/or y,