diff options
author | tron <tron@openttd.org> | 2005-06-27 06:57:24 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-06-27 06:57:24 +0000 |
commit | ab7b8b50e34ffe0f0205399fc3a0fcefcff31741 (patch) | |
tree | 25912342dc104ba143e6030a35c59234dac9aef9 /aircraft_gui.c | |
parent | 78fed5262724a4521a09fbf921b26a437fdeac41 (diff) | |
download | openttd-ab7b8b50e34ffe0f0205399fc3a0fcefcff31741.tar.xz |
(svn r2492) Remove some pointless casts and fix some nearby indentation
Diffstat (limited to 'aircraft_gui.c')
-rw-r--r-- | aircraft_gui.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/aircraft_gui.c b/aircraft_gui.c index 2fd970443..df8ba122d 100644 --- a/aircraft_gui.c +++ b/aircraft_gui.c @@ -641,7 +641,7 @@ static void DrawAircraftDepotWindow(Window *w) num = 0; FOR_ALL_VEHICLES(v) { if (v->type == VEH_Aircraft && v->subtype <= 2 && v->vehstatus&VS_HIDDEN && - v->tile == (TileIndex)tile) + v->tile == tile) num++; } SetVScrollCount(w, (num + w->hscroll.cap - 1) / w->hscroll.cap); @@ -657,7 +657,7 @@ static void DrawAircraftDepotWindow(Window *w) if (v->type == VEH_Aircraft && v->subtype <= 2 && v->vehstatus&VS_HIDDEN && - v->tile == (TileIndex)tile && + v->tile == tile && --num < 0 && num >= -w->vscroll.cap * w->hscroll.cap) { DrawAircraftImage(v, x+12, y, WP(w,traindepot_d).sel); @@ -695,20 +695,14 @@ static int GetVehicleFromAircraftDepotWndPt(Window *w, int x, int y, Vehicle **v tile = w->window_number; FOR_ALL_VEHICLES(v) { - if (v->type == VEH_Aircraft && - v->subtype <= 2 && - v->vehstatus&VS_HIDDEN && - v->tile == (TileIndex)tile && + if (v->type == VEH_Aircraft && v->subtype <= 2 && + v->vehstatus & VS_HIDDEN && v->tile == tile && --pos < 0) { - *veh = v; - if (xm >= 12) - return 0; - - if (ym <= 12) - return -1; /* show window */ - - return -2; /* start stop */ - } + *veh = v; + if (xm >= 12) return 0; + if (ym <= 12) return -1; /* show window */ + return -2; /* start stop */ + } } return 1; /* outside */ } |