From 149adc9cc1b1ffa4b1a37e17deec72b0b6004337 Mon Sep 17 00:00:00 2001 From: frosch Date: Sat, 10 Dec 2016 14:33:58 +0000 Subject: (svn r27689) -Fix: MSVC warnings. --- src/aircraft_gui.cpp | 2 +- src/roadveh_gui.cpp | 2 +- src/train_gui.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/aircraft_gui.cpp b/src/aircraft_gui.cpp index 20fca9fc5..6693b1f8a 100644 --- a/src/aircraft_gui.cpp +++ b/src/aircraft_gui.cpp @@ -98,7 +98,7 @@ void DrawAircraftImage(const Vehicle *v, int left, int right, int y, VehicleID s int heli_offs = 0; PaletteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v); - seq.Draw(x, y + y_offs, pal, v->vehstatus & VS_CRASHED); + seq.Draw(x, y + y_offs, pal, (v->vehstatus & VS_CRASHED) != 0); if (helicopter) { const Aircraft *a = Aircraft::From(v); VehicleSpriteSeq rotor_seq; diff --git a/src/roadveh_gui.cpp b/src/roadveh_gui.cpp index c446db510..63e054958 100644 --- a/src/roadveh_gui.cpp +++ b/src/roadveh_gui.cpp @@ -151,7 +151,7 @@ void DrawRoadVehImage(const Vehicle *v, int left, int right, int y, VehicleID se PaletteID pal = (u->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(u); VehicleSpriteSeq seq; u->GetImage(dir, image_type, &seq); - seq.Draw(px + (rtl ? -offset.x : offset.x), ScaleGUITrad(6) + offset.y, pal, u->vehstatus & VS_CRASHED); + seq.Draw(px + (rtl ? -offset.x : offset.x), ScaleGUITrad(6) + offset.y, pal, (u->vehstatus & VS_CRASHED) != 0); } px += rtl ? -width : width; diff --git a/src/train_gui.cpp b/src/train_gui.cpp index 513f57fbb..4724fb98a 100644 --- a/src/train_gui.cpp +++ b/src/train_gui.cpp @@ -126,7 +126,7 @@ void DrawTrainImage(const Train *v, int left, int right, int y, VehicleID select PaletteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v); VehicleSpriteSeq seq; v->GetImage(dir, image_type, &seq); - seq.Draw(px + (rtl ? -offset.x : offset.x), height / 2 + offset.y, pal, v->vehstatus & VS_CRASHED); + seq.Draw(px + (rtl ? -offset.x : offset.x), height / 2 + offset.y, pal, (v->vehstatus & VS_CRASHED) != 0); } if (!v->IsArticulatedPart()) sel_articulated = false; @@ -387,7 +387,7 @@ void DrawTrainDetails(const Train *v, int left, int right, int y, int vscroll_po PaletteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v); VehicleSpriteSeq seq; u->GetImage(dir, EIT_IN_DETAILS, &seq); - seq.Draw(px + (rtl ? -offset.x : offset.x), y - line_height * vscroll_pos + sprite_y_offset + pitch, pal, v->vehstatus & VS_CRASHED); + seq.Draw(px + (rtl ? -offset.x : offset.x), y - line_height * vscroll_pos + sprite_y_offset + pitch, pal, (v->vehstatus & VS_CRASHED) != 0); } px += rtl ? -width : width; dx += width; -- cgit v1.2.3-54-g00ecf