summaryrefslogtreecommitdiff
path: root/newgrf_station.h
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-04-19 07:17:00 +0000
committerpeter1138 <peter1138@openttd.org>2006-04-19 07:17:00 +0000
commit65c43cb425b82dd68ec40bc3e3fed04fe6f3006f (patch)
tree49a389f05f9514e1b67682db1c98f548340fa20f /newgrf_station.h
parent11f6a33f40707ebf787426fce0a19def6ddbc319 (diff)
downloadopenttd-65c43cb425b82dd68ec40bc3e3fed04fe6f3006f.tar.xz
(svn r4473) - Newstations:
- Alter parameters of CMD_BUILD_RAILROAD_STATION to accept a custom station class and id. - Add a dynamically allocated list of custom stations that the SpecIndex (m4) references.
Diffstat (limited to 'newgrf_station.h')
-rw-r--r--newgrf_station.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/newgrf_station.h b/newgrf_station.h
index 912c7626f..2d9123b3b 100644
--- a/newgrf_station.h
+++ b/newgrf_station.h
@@ -84,6 +84,7 @@ typedef struct stationclass {
void ResetStationClasses(void);
StationClassID AllocateStationClass(uint32 class);
void SetStationClassName(StationClassID sclass, const char *name);
+uint GetNumStationClasses(void);
uint GetNumCustomStations(StationClassID sclass);
void SetCustomStation(StationSpec *spec);
@@ -94,4 +95,10 @@ const StationSpec *GetCustomStation(StationClassID sclass, uint station);
* structure is used for variational sprite groups. */
uint32 GetCustomStationRelocation(const StationSpec *spec, const Station *st, byte ctype);
+/* Allocate a StationSpec to a Station. This is called once per build operation. */
+int AllocateSpecToStation(const StationSpec *spec, Station *st, bool exec);
+
+/* Deallocate a StationSpec from a Station. Called when removing a single station tile. */
+bool DeallocateSpecFromStation(Station *st, byte specindex);
+
#endif /* NEWGRF_STATION_H */