summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2006-08-26 18:27:15 +0000
committertruelight <truelight@openttd.org>2006-08-26 18:27:15 +0000
commit5e7528e9cb91e7a9370df2e51b5fe4eed4a17150 (patch)
tree992a7f71d97911ec63112d37ad46c9658df9267a
parent3f4873ca761ca5a2258e28dc93aa3ec89f24c2f8 (diff)
downloadopenttd-5e7528e9cb91e7a9370df2e51b5fe4eed4a17150.tar.xz
(svn r6150) -Codechange: introduced and used RoadStopID where needed
-rw-r--r--openttd.h1
-rw-r--r--station.h2
-rw-r--r--station_cmd.c2
3 files changed, 3 insertions, 2 deletions
diff --git a/openttd.h b/openttd.h
index 9d6b1b44a..9ed4db102 100644
--- a/openttd.h
+++ b/openttd.h
@@ -37,6 +37,7 @@ typedef struct Industry Industry;
typedef struct DrawPixelInfo DrawPixelInfo;
typedef uint16 VehicleID;
typedef uint16 StationID;
+typedef uint16 RoadStopID;
typedef uint16 TownID;
typedef uint16 IndustryID;
typedef uint16 DepotID;
diff --git a/station.h b/station.h
index 6d753183d..36b7334e5 100644
--- a/station.h
+++ b/station.h
@@ -35,7 +35,7 @@ typedef struct RoadStop {
TileIndex xy;
bool used;
byte status;
- uint32 index;
+ RoadStopID index;
byte num_vehicles;
StationID station;
struct RoadStop *next;
diff --git a/station_cmd.c b/station_cmd.c
index 135081c6d..469d6ce81 100644
--- a/station_cmd.c
+++ b/station_cmd.c
@@ -153,7 +153,7 @@ RoadStop *AllocateRoadStop(void)
* TODO - This is just a temporary stage, this will be removed. */
for (rs = GetRoadStop(0); rs != NULL; rs = (rs->index + 1 < GetRoadStopPoolSize()) ? GetRoadStop(rs->index + 1) : NULL) {
if (!IsValidRoadStop(rs)) {
- uint index = rs->index;
+ RoadStopID index = rs->index;
memset(rs, 0, sizeof(*rs));
rs->index = index;