summaryrefslogtreecommitdiff
path: root/train_gui.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-02-01 06:32:03 +0000
committertron <tron@openttd.org>2006-02-01 06:32:03 +0000
commit9712d6f639c2a32aac05c22ff17cdb3ee32a977d (patch)
tree567a406e1224ab13f36027469339c6c42ada96f1 /train_gui.c
parentf2c5567ab52345ef3830cea712d4ee7112ce8d7f (diff)
downloadopenttd-9712d6f639c2a32aac05c22ff17cdb3ee32a977d.tar.xz
(svn r3510) Fiddle with whitespace and parentheses
Diffstat (limited to 'train_gui.c')
-rw-r--r--train_gui.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/train_gui.c b/train_gui.c
index cf44b3d94..49c28ac6a 100644
--- a/train_gui.c
+++ b/train_gui.c
@@ -475,8 +475,7 @@ static int GetVehicleFromTrainDepotWndPt(const Window *w, int x, int y, GetDepot
x = x - 23;
row = (y - 14) / 14;
- if ( (uint) row >= w->vscroll.cap)
- return 1; /* means err */
+ if ((uint)row >= w->vscroll.cap) return 1; /* means err */
row += w->vscroll.pos;
@@ -487,8 +486,8 @@ static int GetVehicleFromTrainDepotWndPt(const Window *w, int x, int y, GetDepot
v->tile == w->window_number &&
v->u.rail.track == 0x80 &&
--row < 0) {
- skip = w->hscroll.pos;
- goto found_it;
+ skip = w->hscroll.pos;
+ goto found_it;
}
}
@@ -500,8 +499,9 @@ static int GetVehicleFromTrainDepotWndPt(const Window *w, int x, int y, GetDepot
IsFreeWagon(v) &&
v->tile == w->window_number &&
v->u.rail.track == 0x80 &&
- --row < 0)
- goto found_it;
+ --row < 0) {
+ goto found_it;
+ }
}
d->head = NULL;
@@ -514,8 +514,7 @@ found_it:
d->head = d->wagon = v;
/* either pressed the flag or the number, but only when it's a loco */
- if (x < 0 && IsFrontEngine(v))
- return (x >= -10) ? -2 : -1;
+ if (x < 0 && IsFrontEngine(v)) return (x >= -10) ? -2 : -1;
// skip vehicles that are scrolled off the left side
while (skip--) v = v->next;
@@ -1483,7 +1482,8 @@ static void PlayerTrainsWndProc(Window *w, WindowEvent *e)
tile = _last_built_train_depot_tile;
do {
- if (IsTileDepotType(tile, TRANSPORT_RAIL) && IsTileOwner(tile, _local_player)) {
+ if (IsTileDepotType(tile, TRANSPORT_RAIL) &&
+ IsTileOwner(tile, _local_player)) {
ShowTrainDepotWindow(tile);
ShowBuildTrainWindow(tile);
return;