summaryrefslogtreecommitdiff
path: root/roadveh_gui.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-07-31 22:28:49 +0000
committertron <tron@openttd.org>2005-07-31 22:28:49 +0000
commit4190e5581d8ed3f48ce5bc04f4d5e184a7787501 (patch)
tree52a037ba490af20715d8b4d664e8f734759c9cbe /roadveh_gui.c
parent1adb0e868c269c8f1a02b41cfb49ccc13d457e60 (diff)
downloadopenttd-4190e5581d8ed3f48ce5bc04f4d5e184a7787501.tar.xz
(svn r2772) Simplify the age notice in the vehicle details window
Diffstat (limited to 'roadveh_gui.c')
-rw-r--r--roadveh_gui.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/roadveh_gui.c b/roadveh_gui.c
index 99541604a..20944302f 100644
--- a/roadveh_gui.c
+++ b/roadveh_gui.c
@@ -92,17 +92,10 @@ static void RoadVehDetailsWndProc(Window *w, WindowEvent *e)
/* Draw running cost */
{
int year = v->age / 366;
- StringID str;
SetDParam(1, year);
- str = STR_0199_YEAR;
- if (year != 1) {
- str++;
- if (v->max_age - 366 < v->age)
- str++;
- }
- SetDParam(0, str);
+ SetDParam(0, (v->age + 365 < v->max_age) ? STR_AGE : STR_AGE_RED);
SetDParam(2, v->max_age / 366);
SetDParam(3, RoadVehInfo(v->engine_type)->running_cost * _price.roadveh_running >> 8);
DrawString(2, 15, STR_900D_AGE_RUNNING_COST_YR, 0);