summaryrefslogtreecommitdiff
path: root/roadveh_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
commit4f9ea7640a4c0df9c53791c51eed9d320be16327 (patch)
treee87fed6383d92b03125509e76c151eb73cdc1be6 /roadveh_gui.c
parent4c8c1e8f6a60dcba011aaf495aa3f38b15c577e5 (diff)
downloadopenttd-4f9ea7640a4c0df9c53791c51eed9d320be16327.tar.xz
(svn r3620) - 2cc: Replace use of macro to determine colour map with a function call for drawing of vehicles.
Diffstat (limited to 'roadveh_gui.c')
-rw-r--r--roadveh_gui.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/roadveh_gui.c b/roadveh_gui.c
index e54488024..2c90b38ae 100644
--- a/roadveh_gui.c
+++ b/roadveh_gui.c
@@ -65,7 +65,7 @@ void DrawRoadVehPurchaseInfo(int x, int y, EngineID engine_number)
static void DrawRoadVehImage(const Vehicle *v, int x, int y, VehicleID selection)
{
int image = GetRoadVehImage(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 + 14, y + 6);
@@ -412,7 +412,7 @@ static void DrawNewRoadVehWindow(Window *w)
if (sel==0) selected_id = engine_id;
if (IS_INT_INSIDE(--pos, -w->vscroll.cap, 0)) {
DrawString(x+59, y+2, GetCustomEngineName(engine_id), sel==0 ? 0xC : 0x10);
- DrawRoadVehEngine(x+29, y+6, engine_id, SPRITE_PALETTE(PLAYER_SPRITE_COLOR(_local_player)));
+ DrawRoadVehEngine(x+29, y+6, engine_id, GetEnginePalette(engine_id, _local_player));
y += 14;
}
sel--;
@@ -638,7 +638,7 @@ static void RoadDepotClickVeh(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)) + GetRoadVehImage(v, 6), 4, w);
+ SetObjectToPlaceWnd(GetVehiclePalette(v) | GetRoadVehImage(v, 6), 4, w);
}
break;