summaryrefslogtreecommitdiff
path: root/aircraft_gui.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-10-23 13:04:44 +0000
committertron <tron@openttd.org>2005-10-23 13:04:44 +0000
commit47137cefb72d3b3d3bc6fdefc7a4b103429f6d46 (patch)
tree7a8d1fbbe0d0d6ee2c8e981c57be6a9003505e97 /aircraft_gui.c
parent2cc2154ad26b96b032df2f4fca0ce1634e6330b2 (diff)
downloadopenttd-47137cefb72d3b3d3bc6fdefc7a4b103429f6d46.tar.xz
(svn r3078) Some more stuff, which piled up:
- const, whitespace, indentation, bracing, GB/SB, pointless casts - use the trinary operator where appropriate - data types (uint[] -> AcceptedCargo, ...) - if cascade -> switch - if (ptr) -> if (ptr != NULL) - DeMorgan's Law - Fix some comments - 0 -> '\0', change magic numbers to symbolic constants
Diffstat (limited to 'aircraft_gui.c')
-rw-r--r--aircraft_gui.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/aircraft_gui.c b/aircraft_gui.c
index 522a6535b..4bea5c350 100644
--- a/aircraft_gui.c
+++ b/aircraft_gui.c
@@ -1063,10 +1063,11 @@ static void PlayerAircraftWndProc(Window *w, WindowEvent *e)
DrawVehicleProfitButton(v, x, y + 13);
SetDParam(0, v->unitnumber);
- if (IsAircraftHangarTile(v->tile) && (v->vehstatus & VS_HIDDEN))
+ if (IsAircraftHangarTile(v->tile) && (v->vehstatus & VS_HIDDEN)) {
str = STR_021F;
- else
+ } else {
str = v->age > v->max_age - 366 ? STR_00E3 : STR_00E2;
+ }
DrawString(x, y + 2, str, 0);
SetDParam(0, v->profit_this_year);
@@ -1100,7 +1101,7 @@ static void PlayerAircraftWndProc(Window *w, WindowEvent *e)
case 7: { /* Matrix to show vehicles */
uint32 id_v = (e->click.pt.y - PLY_WND_PRC__OFFSET_TOP_WIDGET) / PLY_WND_PRC__SIZE_OF_ROW_BIG;
- if (id_v >= w->vscroll.cap) { return;} // click out of bounds
+ if (id_v >= w->vscroll.cap) return; // click out of bounds
id_v += w->vscroll.pos;