station.h
changeset 408 48da21eb9ff2
parent 405 415546028e8d
child 438 f80cc59e69c2
equal deleted inserted replaced
407:ac158a606861 408:48da21eb9ff2
   100 	uint32 classid;
   100 	uint32 classid;
   101 
   101 
   102 	byte tiles;
   102 	byte tiles;
   103 	DrawTileSprites renderdata[8];
   103 	DrawTileSprites renderdata[8];
   104 
   104 
   105 	/* Sprite offsets for renderdata->seq->image. relocation[0] is default
   105 	/* Sprite offsets for renderdata->seq->image. spritegroup[0] is default
   106 	 * whilst relocation[1] is "CID_PURCHASE". */
   106 	 * whilst spritegroup[1] is "CID_PURCHASE". */
   107 	struct SpriteGroup relocation[2];
   107 	struct SpriteGroup spritegroup[2];
   108 };
   108 };
   109 
   109 
   110 /* Here, @stid is local per-GRFFile station index. If spec->localidx is not yet
   110 /* Here, @stid is local per-GRFFile station index. If spec->localidx is not yet
   111  * set, it gets new dynamically allocated global index and spec->localidx is
   111  * set, it gets new dynamically allocated global index and spec->localidx is
   112  * set to @stid, otherwise we take it as that we are replacing it and try to
   112  * set to @stid, otherwise we take it as that we are replacing it and try to
   113  * search for it first (that isn't much fast but we do it only very seldom). */
   113  * search for it first (that isn't much fast but we do it only very seldom). */
   114 void SetCustomStation(byte stid, struct StationSpec *spec);
   114 void SetCustomStation(byte stid, struct StationSpec *spec);
   115 /* Here, @stid is global station index (in continous range 0..GetCustomStationsCount())
   115 /* Here, @stid is global station index (in continous range 0..GetCustomStationsCount())
   116  * (lookup is therefore very fast as we do this very frequently). */
   116  * (lookup is therefore very fast as we do this very frequently). */
   117 struct StationSpec *GetCustomStation(uint32 classid, byte stid);
   117 struct StationSpec *GetCustomStation(uint32 classid, byte stid);
   118 uint32 GetCustomStationRelocation(struct StationSpec *spec, byte ctype);
   118 /* Get sprite offset for a given custom station and station structure (may be
       
   119  * NULL if ctype is set - that means we are in a build dialog). The station
       
   120  * structure is used for variational sprite groups. */
       
   121 uint32 GetCustomStationRelocation(struct StationSpec *spec, struct Station *stat, byte ctype);
   119 int GetCustomStationsCount(uint32 classid);
   122 int GetCustomStationsCount(uint32 classid);
   120 
   123 
   121 #endif /* STATION_H */
   124 #endif /* STATION_H */