diff options
author | rubidium <rubidium@openttd.org> | 2010-01-21 01:38:13 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-01-21 01:38:13 +0000 |
commit | f94c83a3874c292ae0d90a7819c971e4bc7aebad (patch) | |
tree | a952b3b5ff3a44ae3b028ee995ee32f968cc2ba0 /src/train_gui.cpp | |
parent | 02edae54542cf619cb8d0157d476be45df898119 (diff) | |
download | openttd-f94c83a3874c292ae0d90a7819c971e4bc7aebad.tar.xz |
(svn r18872) -Codechange: introduce PaletteID and use it
Diffstat (limited to 'src/train_gui.cpp')
-rw-r--r-- | src/train_gui.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/train_gui.cpp b/src/train_gui.cpp index 4eb6da762..16291af14 100644 --- a/src/train_gui.cpp +++ b/src/train_gui.cpp @@ -80,7 +80,7 @@ void DrawTrainImage(const Train *v, int left, int right, int y, VehicleID select int width = Train::From(v)->GetDisplayImageWidth(&offset); if (rtl ? px + width > 0 : px - width < max_width) { - SpriteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v); + PaletteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v); DrawSprite(v->GetImage(dir), pal, px + (rtl ? -offset.x : offset.x), 7 + offset.y); } @@ -314,7 +314,7 @@ void DrawTrainDetails(const Train *v, int left, int right, int y, int vscroll_po Point offset; int width = u->GetDisplayImageWidth(&offset); if (vscroll_pos <= 0 && vscroll_pos > -vscroll_cap) { - SpriteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v); + PaletteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v); DrawSprite(u->GetImage(dir), pal, px + (rtl ? -offset.x : offset.x), y - line_height * vscroll_pos + sprite_y_offset + offset.y); } px += rtl ? -width : width; |