diff options
author | rubidium <rubidium@openttd.org> | 2009-01-09 22:56:28 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-01-09 22:56:28 +0000 |
commit | c0e7434f3815e73a28e1cfe9a9b0d4eb4bf6d40b (patch) | |
tree | 378bc97d52ab0658bfed8695d1ce2f01bf572802 /src/viewport.cpp | |
parent | 054787f08252150eac44afe15d413a478b00154a (diff) | |
download | openttd-c0e7434f3815e73a28e1cfe9a9b0d4eb4bf6d40b.tar.xz |
(svn r14944) -Cleanup: add spaces around some operators
Diffstat (limited to 'src/viewport.cpp')
-rw-r--r-- | src/viewport.cpp | 12 |
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, |