(svn r8402) -Codechange: Move RoadStop-specific enums to the RoadStop class, and changed a one-member enum into a static const. Simplify their naming and add some doxygen-comments to RoadStop

This commit is contained in:
celestar
2007-01-25 10:06:58 +00:00
parent e3fbc6c06b
commit dfb5556376
7 changed files with 43 additions and 40 deletions

View File

@@ -75,10 +75,10 @@ typedef enum StationType {
StationType GetStationType(TileIndex);
static inline RoadStopType GetRoadStopType(TileIndex t)
static inline RoadStop::Type GetRoadStopType(TileIndex t)
{
assert(GetStationType(t) == STATION_TRUCK || GetStationType(t) == STATION_BUS);
return GetStationType(t) == STATION_TRUCK ? RS_TRUCK : RS_BUS;
return GetStationType(t) == STATION_TRUCK ? RoadStop::TRUCK : RoadStop::BUS;
}
static inline StationGfx GetStationGfx(TileIndex t)
@@ -275,9 +275,9 @@ static inline void MakeRailStation(TileIndex t, Owner o, StationID sid, Axis a,
SetRailType(t, rt);
}
static inline void MakeRoadStop(TileIndex t, Owner o, StationID sid, RoadStopType rst, DiagDirection d)
static inline void MakeRoadStop(TileIndex t, Owner o, StationID sid, RoadStop::Type rst, DiagDirection d)
{
MakeStation(t, o, sid, (rst == RS_BUS ? GFX_BUS_BASE : GFX_TRUCK_BASE) + d);
MakeStation(t, o, sid, (rst == RoadStop::BUS ? GFX_BUS_BASE : GFX_TRUCK_BASE) + d);
}
static inline void MakeAirport(TileIndex t, Owner o, StationID sid, byte section)