forked from mirror/OpenTTD
(svn r23080) -Feature: [NewGRF] Use variable 10 to enable vehicle GRFs to draw different sprites on the map and in various GUIs.
This commit is contained in:
@@ -128,7 +128,7 @@ void DrawRoadVehDetails(const Vehicle *v, int left, int right, int y)
|
||||
* @param selection Selected vehicle to draw a frame around
|
||||
* @param skip Number of pixels to skip at the front (for scrolling)
|
||||
*/
|
||||
void DrawRoadVehImage(const Vehicle *v, int left, int right, int y, VehicleID selection, int skip)
|
||||
void DrawRoadVehImage(const Vehicle *v, int left, int right, int y, VehicleID selection, EngineImageType image_type, int skip)
|
||||
{
|
||||
bool rtl = _current_text_dir == TD_RTL;
|
||||
Direction dir = rtl ? DIR_E : DIR_W;
|
||||
@@ -149,7 +149,7 @@ void DrawRoadVehImage(const Vehicle *v, int left, int right, int y, VehicleID se
|
||||
|
||||
if (rtl ? px + width > 0 : px - width < max_width) {
|
||||
PaletteID pal = (u->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(u);
|
||||
DrawSprite(u->GetImage(dir), pal, px + (rtl ? -offset.x : offset.x), 6 + offset.y);
|
||||
DrawSprite(u->GetImage(dir, image_type), pal, px + (rtl ? -offset.x : offset.x), 6 + offset.y);
|
||||
}
|
||||
|
||||
px += rtl ? -width : width;
|
||||
|
Reference in New Issue
Block a user