aircraft_gui.c
changeset 1922 bda6f85eefaa
parent 1907 61bafb476865
child 1926 530480d14685
equal deleted inserted replaced
1921:c20a59372a23 1922:bda6f85eefaa
     1 #include "stdafx.h"
     1 #include "stdafx.h"
     2 #include "openttd.h"
     2 #include "openttd.h"
     3 #include "debug.h"
     3 #include "debug.h"
       
     4 #include "table/sprites.h"
     4 #include "table/strings.h"
     5 #include "table/strings.h"
     5 #include "map.h"
     6 #include "map.h"
     6 #include "tile.h"
     7 #include "tile.h"
     7 #include "window.h"
     8 #include "window.h"
     8 #include "gui.h"
     9 #include "gui.h"
    58 
    59 
    59 static void DrawAircraftImage(const Vehicle *v, int x, int y, VehicleID selection)
    60 static void DrawAircraftImage(const Vehicle *v, int x, int y, VehicleID selection)
    60 {
    61 {
    61 	int image = GetAircraftImage(v, 6);
    62 	int image = GetAircraftImage(v, 6);
    62 	uint32 ormod = SPRITE_PALETTE(PLAYER_SPRITE_COLOR(v->owner));
    63 	uint32 ormod = SPRITE_PALETTE(PLAYER_SPRITE_COLOR(v->owner));
    63 	if (v->vehstatus & VS_CRASHED) ormod = 0x3248000;
    64 	if (v->vehstatus & VS_CRASHED)
       
    65 		ormod = PALETTE_CRASH;
    64 	DrawSprite(image | ormod, x+25, y+10);
    66 	DrawSprite(image | ormod, x+25, y+10);
    65 	if (v->subtype == 0)
    67 	if (v->subtype == 0)
    66 		DrawSprite(0xF3D, x+25, y+5);
    68 		DrawSprite(0xF3D, x+25, y+5);
    67 	if (v->index == selection) {
    69 	if (v->index == selection) {
    68 		DrawFrameRect(x-1, y-1, x+58, y+21, 0xF, 0x10);
    70 		DrawFrameRect(x-1, y-1, x+58, y+21, 0xF, 0x10);