summaryrefslogtreecommitdiff
path: root/aircraft_gui.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-02-20 09:26:07 +0000
committerpeter1138 <peter1138@openttd.org>2006-02-20 09:26:07 +0000
commitb5cd24f05d6babfd984d8b317e9c63062a0f711a (patch)
treee87fed6383d92b03125509e76c151eb73cdc1be6 /aircraft_gui.c
parentdac14d4210d810e727b97eea15d112529c63bf2e (diff)
downloadopenttd-b5cd24f05d6babfd984d8b317e9c63062a0f711a.tar.xz
(svn r3620) - 2cc: Replace use of macro to determine colour map with a function call for drawing of vehicles.
Diffstat (limited to 'aircraft_gui.c')
-rw-r--r--aircraft_gui.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/aircraft_gui.c b/aircraft_gui.c
index 249b66cff..b947854e5 100644
--- a/aircraft_gui.c
+++ b/aircraft_gui.c
@@ -65,7 +65,7 @@ void DrawAircraftPurchaseInfo(int x, int y, EngineID engine_number)
static void DrawAircraftImage(const Vehicle *v, int x, int y, VehicleID selection)
{
int image = GetAircraftImage(v, 6);
- uint32 ormod = SPRITE_PALETTE(PLAYER_SPRITE_COLOR(v->owner));
+ uint32 ormod = GetVehiclePalette(v);
if (v->vehstatus & VS_CRASHED) ormod = PALETTE_CRASH;
DrawSprite(image | ormod, x + 25, y + 10);
if (v->subtype == 0) DrawSprite(SPR_ROTOR_STOPPED, x + 25, y + 5);
@@ -126,7 +126,7 @@ static void NewAircraftWndProc(Window *w, WindowEvent *e)
if (sel==0) selected_id = engine_id;
if (IS_INT_INSIDE(--pos, -w->vscroll.cap, 0)) {
DrawString(x+62, y+7, GetCustomEngineName(engine_id), sel==0 ? 0xC : 0x10);
- DrawAircraftEngine(x+29, y+10, engine_id, SPRITE_PALETTE(PLAYER_SPRITE_COLOR(_local_player)));
+ DrawAircraftEngine(x+29, y+10, engine_id, GetEnginePalette(engine_id, _local_player));
y += 24;
}
sel--;
@@ -732,7 +732,7 @@ static void AircraftDepotClickAircraft(Window *w, int x, int y)
if (v != NULL) {
WP(w,traindepot_d).sel = v->index;
SetWindowDirty(w);
- SetObjectToPlaceWnd( SPRITE_PALETTE(PLAYER_SPRITE_COLOR(v->owner)) + GetAircraftImage(v, 6), 4, w);
+ SetObjectToPlaceWnd(GetVehiclePalette(v) | GetAircraftImage(v, 6), 4, w);
}
break;