(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.
This commit is contained in:
@@ -73,7 +73,7 @@ void DrawTrainEnginePurchaseInfo(int x, int y, EngineID engine_number)
|
||||
y += 10;
|
||||
|
||||
/* Design date - Life length */
|
||||
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;
|
||||
@@ -1115,7 +1115,7 @@ static void TrainDetailsInfoTab(const Vehicle *v, int x, int y)
|
||||
|
||||
if (!(rvi->flags & RVI_WAGON)) {
|
||||
SetDParam(0, GetCustomEngineName(v->engine_type));
|
||||
SetDParam(1, v->build_year + 1920);
|
||||
SetDParam(1, BASE_YEAR + v->build_year);
|
||||
SetDParam(2, v->value);
|
||||
DrawString(x, y, STR_882C_BUILT_VALUE, 0x10);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user