summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-05-27 17:18:53 +0000
committerrubidium <rubidium@openttd.org>2009-05-27 17:18:53 +0000
commit6e94e6f017179ad4dcdb9b0feb9b61cb31fc2660 (patch)
treefc3d8b51442e254d261acd8e87dc83ddd154a125 /src
parent5df12c37a9089519dadfef611d02a2e7ced52151 (diff)
downloadopenttd-6e94e6f017179ad4dcdb9b0feb9b61cb31fc2660.tar.xz
(svn r16449) -Fix [FS#2924]: vehicle recolouring wasn't done for engine preview/news
Diffstat (limited to 'src')
-rw-r--r--src/engine_gui.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/engine_gui.cpp b/src/engine_gui.cpp
index ef2fb3fd2..980268673 100644
--- a/src/engine_gui.cpp
+++ b/src/engine_gui.cpp
@@ -13,6 +13,8 @@
#include "strings_func.h"
#include "engine_gui.h"
#include "articulated_vehicles.h"
+#include "vehicle_func.h"
+#include "company_func.h"
#include "rail.h"
#include "table/strings.h"
@@ -103,7 +105,7 @@ struct EnginePreviewWindow : Window {
const DrawEngineInfo *dei = &_draw_engine_list[Engine::Get(engine)->type];
int width = this->width;
- dei->engine_proc(width >> 1, 100, engine, 0);
+ dei->engine_proc(width >> 1, 100, engine, GetEnginePalette(engine, _local_company));
dei->info_proc(engine, this->widget[EPW_BACKGROUND].left + 26, this->widget[EPW_BACKGROUND].right - 26, 100, 170);
}
@@ -236,7 +238,7 @@ void DrawNewsNewVehicleAvail(Window *w, const NewsItem *ni)
SetDParam(0, engine);
DrawStringMultiLine(1, w->width - 2, 56, 88, STR_NEW_VEHICLE_TYPE, TC_FROMSTRING, SA_CENTER);
- dei->engine_proc(w->width >> 1, 88, engine, 0);
+ dei->engine_proc(w->width >> 1, 88, engine, GetEnginePalette(engine, _local_company));
GfxFillRect(25, 56, w->width - 56, 112, PALETTE_TO_STRUCT_GREY, FILLRECT_RECOLOUR);
dei->info_proc(engine, 26, w->width - 26, 100, 170);
}