src/station.h
branchgamebalance
changeset 9895 7bd07f43b0e3
parent 6524 44e22a9b2c97
child 9908 0fa543611bbe
--- a/src/station.h	Mon Mar 19 09:33:17 2007 +0000
+++ b/src/station.h	Mon Mar 19 12:38:16 2007 +0000
@@ -11,13 +11,14 @@
 #include "newgrf_station.h"
 
 static const StationID INVALID_STATION = 0xFFFF;
+static const byte INITIAL_STATION_RATING = 175;
 
-typedef struct GoodsEntry {
+struct GoodsEntry {
 	GoodsEntry() :
 		waiting_acceptance(0),
 		unload_pending(0),
 		days_since_pickup(0),
-		rating(175),
+		rating(INITIAL_STATION_RATING),
 		enroute_from(INVALID_STATION),
 		enroute_from_xy(INVALID_TILE),
 		last_speed(0),
@@ -35,7 +36,7 @@
 	byte last_speed;
 	byte last_age;
 	int32 feeder_profit;
-} GoodsEntry;
+};
 
 /** A Stop for a Road Vehicle */
 struct RoadStop {
@@ -76,14 +77,14 @@
 	bool IsEntranceBusy() const;
 	void SetEntranceBusy(bool busy);
 protected:
-	static RoadStop *AllocateRaw(void);
+	static RoadStop *AllocateRaw();
 };
 
-typedef struct StationSpecList {
+struct StationSpecList {
 	const StationSpec *spec;
 	uint32 grfid;      /// GRF ID of this custom station
 	uint8  localidx;   /// Station ID within GRF of station
-} StationSpecList;
+};
 
 /** StationRect - used to track station spread out rectangle - cheaper than scanning whole map */
 struct StationRect : public Rect {
@@ -184,7 +185,7 @@
 	bool IsValid() const;
 
 protected:
-	static Station *AllocateRaw(void);
+	static Station *AllocateRaw();
 };
 
 enum {
@@ -207,26 +208,26 @@
 	HVOT_BUOY     = 1 << 6
 };
 
-typedef enum CatchmentAreas {
+enum CatchmentArea {
 	CA_NONE            =  0,
 	CA_BUS             =  3,
 	CA_TRUCK           =  3,
 	CA_TRAIN           =  4,
 	CA_DOCK            =  5
-} CatchmentArea;
+};
 
 void ModifyStationRatingAround(TileIndex tile, PlayerID owner, int amount, uint radius);
 
 void ShowStationViewWindow(StationID station);
-void UpdateAllStationVirtCoord(void);
+void UpdateAllStationVirtCoord();
 
 /* sorter stuff */
-void RebuildStationLists(void);
-void ResortStationLists(void);
+void RebuildStationLists();
+void ResortStationLists();
 
 DECLARE_OLD_POOL(Station, Station, 6, 1000)
 
-static inline StationID GetMaxStationIndex(void)
+static inline StationID GetMaxStationIndex()
 {
 	/* TODO - This isn't the real content of the function, but
 	 *  with the new pool-system this will be replaced with one that
@@ -236,7 +237,7 @@
 	return GetStationPoolSize() - 1;
 }
 
-static inline uint GetNumStations(void)
+static inline uint GetNumStations()
 {
 	return GetStationPoolSize();
 }
@@ -260,7 +261,7 @@
 /* End of stuff for ROADSTOPS */
 
 
-void AfterLoadStations(void);
+void AfterLoadStations();
 void GetProductionAroundTiles(AcceptedCargo produced, TileIndex tile, int w, int h, int rad);
 void GetAcceptanceAroundTiles(AcceptedCargo accepts, TileIndex tile, int w, int h, int rad);
 
@@ -270,7 +271,7 @@
 
 RoadStop * GetRoadStopByTile(TileIndex tile, RoadStop::Type type);
 uint GetNumRoadStops(const Station* st, RoadStop::Type type);
-RoadStop * AllocateRoadStop( void );
+RoadStop * AllocateRoadStop();
 void ClearSlot(Vehicle *v);
 
 void DeleteOilRig(TileIndex t);