(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.
This commit is contained in:
peter1138
2006-04-19 07:17:00 +00:00
parent 11f6a33f40
commit 65c43cb425
4 changed files with 155 additions and 9 deletions

View File

@@ -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 */