|
@@ -62,24 +62,25 @@ typedef struct StationSpec {
|
|
|
byte blocked; ///< Bitmask of base tiles (0 - 7) which are blocked to trains
|
|
|
|
|
|
byte lengths;
|
|
|
byte *platforms;
|
|
|
StationLayout **layouts;
|
|
|
|
|
|
/**
|
|
|
* NUM_GLOBAL_CID sprite groups.
|
|
|
* Used for obtaining the sprite offset of custom sprites, and for
|
|
|
* evaluating callbacks.
|
|
|
*/
|
|
|
SpriteGroup *spritegroup[NUM_GLOBAL_CID];
|
|
|
SpriteGroup *groundgroup;
|
|
|
} StationSpec;
|
|
|
|
|
|
/**
|
|
|
* Struct containing information relating to station classes.
|
|
|
*/
|
|
|
typedef 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.
|
|
|
} StationClass;
|
|
|
|
|
@@ -94,24 +95,25 @@ uint GetNumCustomStations(StationClassID
|
|
|
|
|
|
void SetCustomStationSpec(StationSpec *statspec);
|
|
|
const StationSpec *GetCustomStationSpec(StationClassID sclass, uint station);
|
|
|
const StationSpec *GetCustomStationSpecByGrf(uint32 grfid, byte localidx);
|
|
|
|
|
|
/* 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);
|
|
|
|
|
|
/* Get sprite offset for a given custom station and station structure (may be
|
|
|
* NULL - that means we are in a build dialog). The station structure is used
|
|
|
* for variational sprite groups. */
|
|
|
SpriteID GetCustomStationRelocation(const StationSpec *statspec, const Station *st, TileIndex tile);
|
|
|
SpriteID GetCustomStationGroundRelocation(const StationSpec *statspec, const Station *st, TileIndex tile);
|
|
|
uint16 GetStationCallback(uint16 callback, uint32 param1, uint32 param2, const StationSpec *statspec, const Station *st, TileIndex tile);
|
|
|
|
|
|
/* Check if a rail station tile is traversable. */
|
|
|
bool IsStationTileBlocked(TileIndex tile);
|
|
|
|
|
|
/* Allocate a StationSpec to a Station. This is called once per build operation. */
|
|
|
int AllocateSpecToStation(const StationSpec *statspec, Station *st, bool exec);
|
|
|
|
|
|
/* Deallocate a StationSpec from a Station. Called when removing a single station tile. */
|
|
|
bool DeallocateSpecFromStation(Station *st, byte specindex);
|
|
|
|
|
|
/* Draw representation of a station tile for GUI purposes. */
|