equal
deleted
inserted
replaced
8 #include "window_gui.h" |
8 #include "window_gui.h" |
9 #include "gfx_func.h" |
9 #include "gfx_func.h" |
10 #include "engine.h" |
10 #include "engine.h" |
11 #include "command_func.h" |
11 #include "command_func.h" |
12 #include "economy_func.h" |
12 #include "economy_func.h" |
13 #include "news.h" |
13 #include "news_func.h" |
14 #include "variables.h" |
14 #include "variables.h" |
15 #include "newgrf_engine.h" |
15 #include "newgrf_engine.h" |
16 #include "strings_func.h" |
16 #include "strings_func.h" |
17 |
17 |
18 #include "table/strings.h" |
18 #include "table/strings.h" |
180 SetDParam(0, GetEngineCategoryName(engine)); |
180 SetDParam(0, GetEngineCategoryName(engine)); |
181 SetDParam(1, engine); |
181 SetDParam(1, engine); |
182 return STR_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE; |
182 return STR_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE; |
183 } |
183 } |
184 |
184 |
185 void DrawNewsNewVehicleAvail(Window *w) |
185 void DrawNewsNewVehicleAvail(Window *w, const NewsItem *ni) |
186 { |
186 { |
187 DrawNewsBorder(w); |
187 DrawNewsBorder(w); |
188 |
188 |
189 EngineID engine = WP(w, news_d).ni->string_id; |
189 EngineID engine = ni->string_id; |
190 const DrawEngineInfo *dei = &_draw_engine_list[GetEngine(engine)->type]; |
190 const DrawEngineInfo *dei = &_draw_engine_list[GetEngine(engine)->type]; |
191 |
191 |
192 SetDParam(0, GetEngineCategoryName(engine)); |
192 SetDParam(0, GetEngineCategoryName(engine)); |
193 DrawStringMultiCenter(w->width >> 1, 20, STR_NEW_VEHICLE_NOW_AVAILABLE, w->width - 2); |
193 DrawStringMultiCenter(w->width >> 1, 20, STR_NEW_VEHICLE_NOW_AVAILABLE, w->width - 2); |
194 |
194 |