mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-17 21:25:40 +00:00
(svn r6150) -Codechange: introduced and used RoadStopID where needed
This commit is contained in:
parent
3f4873ca76
commit
5e7528e9cb
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user