diff options
author | peter1138 <peter1138@openttd.org> | 2006-02-20 09:26:07 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2006-02-20 09:26:07 +0000 |
commit | 4f9ea7640a4c0df9c53791c51eed9d320be16327 (patch) | |
tree | e87fed6383d92b03125509e76c151eb73cdc1be6 /train_gui.c | |
parent | 4c8c1e8f6a60dcba011aaf495aa3f38b15c577e5 (diff) | |
download | openttd-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 'train_gui.c')
-rw-r--r-- | train_gui.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/train_gui.c b/train_gui.c index 68d06179e..4540ce902 100644 --- a/train_gui.c +++ b/train_gui.c @@ -186,8 +186,7 @@ static void engine_drawing_loop(int *x, int *y, int *pos, int *sel, if (IS_INT_INSIDE(--*pos, -show_max, 0)) { DrawString(*x + 59, *y + 2, GetCustomEngineName(i), *sel == 0 ? 0xC : 0x10); - DrawTrainEngine(*x + 29, *y + 6, i, - SPRITE_PALETTE(PLAYER_SPRITE_COLOR(_local_player))); + DrawTrainEngine(*x + 29, *y + 6, i, GetEnginePalette(i, _local_player)); *y += 14; } --*sel; @@ -360,7 +359,7 @@ static void DrawTrainImage(const Vehicle *v, int x, int y, int count, int skip, do { if (--skip < 0) { int image = GetTrainImage(v, 6); - uint32 ormod = SPRITE_PALETTE(PLAYER_SPRITE_COLOR(v->owner)); + uint32 ormod = GetVehiclePalette(v); int width = v->u.rail.cached_veh_length; if (dx + width <= count) { @@ -581,7 +580,7 @@ static void TrainDepotClickTrain(Window *w, int x, int y) TrainDepotMoveVehicle(v, sel, gdvp.head); } else if (v != NULL) { WP(w,traindepot_d).sel = v->index; - SetObjectToPlaceWnd( SPRITE_PALETTE(PLAYER_SPRITE_COLOR(v->owner)) + GetTrainImage(v, 6), 4, w); + SetObjectToPlaceWnd(GetVehiclePalette(v) | GetTrainImage(v, 6), 4, w); SetWindowDirty(w); } break; |