summaryrefslogtreecommitdiff
path: root/src/roadveh_gui.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2007-01-14 19:57:49 +0000
committerpeter1138 <peter1138@openttd.org>2007-01-14 19:57:49 +0000
commit92d418b031d23cf42a4df09e12945cc4b737bce2 (patch)
treec62990da208a45b3bd1c7379a1835190458d5a49 /src/roadveh_gui.cpp
parent19d31c7417e4c8ad763c6674b7d1c6f9022e3703 (diff)
downloadopenttd-92d418b031d23cf42a4df09e12945cc4b737bce2.tar.xz
(svn r8128) -Codechange: Split sprite and palette remap into separate 32 bit values.
This lets us increase the sprite width from 14 to up to 29 bits, effectively nulling the old sprite limit. Table changes in next commit.
Diffstat (limited to 'src/roadveh_gui.cpp')
-rw-r--r--src/roadveh_gui.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/roadveh_gui.cpp b/src/roadveh_gui.cpp
index ba382b04a..c112f5891 100644
--- a/src/roadveh_gui.cpp
+++ b/src/roadveh_gui.cpp
@@ -71,8 +71,8 @@ void DrawRoadVehPurchaseInfo(int x, int y, uint w, EngineID engine_number)
void DrawRoadVehImage(const Vehicle *v, int x, int y, VehicleID selection)
{
- PalSpriteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v);
- DrawSprite(GetRoadVehImage(v, DIR_W) | pal, x + 14, y + 6);
+ SpriteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v);
+ DrawSprite(GetRoadVehImage(v, DIR_W), pal, x + 14, y + 6);
if (v->index == selection) {
DrawFrameRect(x - 1, y - 1, x + 28, y + 12, 15, FR_BORDERONLY);
@@ -291,7 +291,7 @@ static void RoadVehViewWndProc(Window *w, WindowEvent *e)
}
/* draw the flag plus orders */
- DrawSprite(v->vehstatus & VS_STOPPED ? SPR_FLAG_VEH_STOPPED : SPR_FLAG_VEH_RUNNING, 2, w->widget[5].top + 1);
+ DrawSprite(v->vehstatus & VS_STOPPED ? SPR_FLAG_VEH_STOPPED : SPR_FLAG_VEH_RUNNING, PAL_NONE, 2, w->widget[5].top + 1);
DrawStringCenteredTruncated(w->widget[5].left + 8, w->widget[5].right, w->widget[5].top + 1, str, 0);
DrawWindowViewport(w);
} break;
@@ -544,3 +544,4 @@ void ShowBuildRoadVehWindow(TileIndex tile)
}
+