summaryrefslogtreecommitdiff
path: root/src/newgrf_station.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/newgrf_station.h')
-rw-r--r--src/newgrf_station.h24
1 files changed, 3 insertions, 21 deletions
diff --git a/src/newgrf_station.h b/src/newgrf_station.h
index 1c49dde18..523f72f0c 100644
--- a/src/newgrf_station.h
+++ b/src/newgrf_station.h
@@ -13,11 +13,11 @@
#define NEWGRF_STATION_H
#include "newgrf_callbacks.h"
+#include "newgrf_class.h"
#include "newgrf_commons.h"
#include "sprite.h"
#include "direction_type.h"
#include "cargo_type.h"
-#include "strings_type.h"
#include "station_type.h"
#include "rail_type.h"
@@ -108,29 +108,11 @@ struct StationSpec {
const struct SpriteGroup *spritegroup[NUM_CARGO + 3];
};
-/**
- * Struct containing information relating to station classes.
- */
-struct StationClass {
- uint32 id; ///< ID of this class, e.g. 'DFLT', 'WAYP', etc.
- StringID name; ///< Name of this class.
- uint stations; ///< Number of stations in this class.
- StationSpec **spec; ///< Array of station specifications.
-};
+/** Struct containing information relating to station classes. */
+typedef NewGRFClass<StationSpec, StationClassID, STAT_CLASS_MAX> StationClass;
-void ResetStationClasses();
-StationClassID AllocateStationClass(uint32 cls);
-void SetStationClassName(StationClassID sclass, StringID name);
-StringID GetStationClassName(StationClassID sclass);
const StationSpec *GetStationSpec(TileIndex t);
-uint GetNumStationClasses();
-uint GetNumCustomStations(StationClassID sclass);
-
-void SetCustomStationSpec(StationSpec *statspec);
-const StationSpec *GetCustomStationSpec(StationClassID sclass, uint station);
-const StationSpec *GetCustomStationSpecByGrf(uint32 grfid, byte localidx, int *index);
-
/* Evaluate a tile's position within a station, and return the result a bitstuffed format. */
uint32 GetPlatformInfo(Axis axis, byte tile, int platforms, int length, int x, int y, bool centred);