(svn r5336) - NewGRF: draw custom helicopter rotor sprites in vehicle info window, ensuring the correct direction is used (inspiration from mart3p)

This commit is contained in:
2006-06-22 21:15:27 +00:00
parent 84deeb7847
commit 3753d0b602
5 changed files with 18 additions and 8 deletions

View File

@@ -79,7 +79,11 @@ static void DrawAircraftImage(const Vehicle *v, int x, int y, VehicleID selectio
{
PalSpriteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v);
DrawSprite(GetAircraftImage(v, DIR_W) | pal, x + 25, y + 10);
if (v->subtype == 0) DrawSprite(SPR_ROTOR_STOPPED, x + 25, y + 5);
if (v->subtype == 0) {
SpriteID rotor_sprite = GetCustomRotorSprite(v, true);
if (rotor_sprite == 0) rotor_sprite = SPR_ROTOR_STOPPED;
DrawSprite(rotor_sprite, x + 25, y + 5);
}
if (v->index == selection) {
DrawFrameRect(x - 1, y - 1, x + 58, y + 21, 0xF, FR_BORDERONLY);
}