summaryrefslogtreecommitdiff
path: root/roadveh_cmd.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2005-07-17 18:11:17 +0000
committerDarkvater <darkvater@openttd.org>2005-07-17 18:11:17 +0000
commitff2662ebe7b9812246a8e5755d335a247c0d3c1f (patch)
tree693c61f46666bfa8efbb34fd9c4ffa2e55f4d48b /roadveh_cmd.c
parentb9a6c16461a310ef1b6358a436a9f891b130d6b6 (diff)
downloadopenttd-ff2662ebe7b9812246a8e5755d335a247c0d3c1f.tar.xz
(svn r2617) - Fix: fix some warnings, and reenable vs.net2003 signed/unsigned warnings
Diffstat (limited to 'roadveh_cmd.c')
-rw-r--r--roadveh_cmd.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/roadveh_cmd.c b/roadveh_cmd.c
index c8e27e013..2fad4cdb6 100644
--- a/roadveh_cmd.c
+++ b/roadveh_cmd.c
@@ -1154,6 +1154,7 @@ found_best_track:;
return best_track;
}
+#if 0
static uint RoadFindPathToStation(const Vehicle *v, TileIndex tile)
{
NPFFindStationOrTileData fstd;
@@ -1165,6 +1166,7 @@ static uint RoadFindPathToStation(const Vehicle *v, TileIndex tile)
return NPFRouteToStationOrTile(v->tile, trackdir, &fstd, TRANSPORT_ROAD, v->owner, INVALID_RAILTYPE, PBS_MODE_NONE).best_path_dist;
}
+#endif
typedef struct RoadDriveEntry {
byte x,y;
@@ -1664,19 +1666,19 @@ void OnNewDay_RoadVeh(Vehicle *v)
// In that case, add penalty.
switch(v->direction) {
case 1: // going north east,x position decreasing
- if (v->x_pos <= TileX(rs->xy) * 16 + 15)
+ if (v->x_pos <= (int32)TileX(rs->xy) * 16 + 15)
dist += 6;
break;
case 3: // Going south east, y position increasing
- if (v->y_pos >= TileY(rs->xy) * 16)
+ if (v->y_pos >= (int32)TileY(rs->xy) * 16)
dist += 6;
break;
case 5: // Going south west, x position increasing
- if (v->x_pos >= TileX(rs->xy) * 16)
+ if (v->x_pos >= (int32)TileX(rs->xy) * 16)
dist += 6;
break;
case 7: // Going north west, y position decrasing.
- if (v->y_pos <= TileY(rs->xy) * 16 + 15)
+ if (v->y_pos <= (int32)TileY(rs->xy) * 16 + 15)
dist += 6;
break;
}