summaryrefslogtreecommitdiff
path: root/ship_gui.c
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2006-08-15 15:18:03 +0000
committerrubidium <rubidium@openttd.org>2006-08-15 15:18:03 +0000
commitc55962f8a2304535f2077f9d5d6dcdb11bf6323e (patch)
tree40cc27f619e175b8c9a80e13e6651c33b92144aa /ship_gui.c
parentdc54e608e36145deab60dea2cbe08517b28e54c0 (diff)
downloadopenttd-c55962f8a2304535f2077f9d5d6dcdb11bf6323e.tar.xz
(svn r5916) -Cleanup: use MIN_YEAR/MAX_YEAR for the year boundaries and BASE_YEAR when comparing _cur_year with a 'full' year.
-Cleanup: replace some magic '1920' values with BASE_YEAR.
Diffstat (limited to 'ship_gui.c')
-rw-r--r--ship_gui.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ship_gui.c b/ship_gui.c
index b2ed661ad..49572d7ec 100644
--- a/ship_gui.c
+++ b/ship_gui.c
@@ -54,7 +54,7 @@ void DrawShipPurchaseInfo(int x, int y, EngineID engine_number)
/* Design date - Life length */
e = GetEngine(engine_number);
ConvertDayToYMD(&ymd, e->intro_date);
- SetDParam(0, ymd.year + 1920);
+ SetDParam(0, BASE_YEAR + ymd.year);
SetDParam(1, e->lifelength);
DrawString(x,y, STR_PURCHASE_INFO_DESIGNED_LIFE, 0);
y += 10;
@@ -212,7 +212,7 @@ static void ShipDetailsWndProc(Window *w, WindowEvent *e)
DrawShipImage(v, 3, 57, INVALID_VEHICLE);
- SetDParam(1, 1920 + v->build_year);
+ SetDParam(1, BASE_YEAR + v->build_year);
SetDParam(0, GetCustomEngineName(v->engine_type));
SetDParam(2, v->value);
DrawString(74, 57, STR_9816_BUILT_VALUE, 0);