(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:
frosch
2011-11-01 16:51:47 +00:00
parent e802dc66b9
commit bbc3409942
25 changed files with 124 additions and 111 deletions

View File

@@ -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;