station.h
changeset 403 dc7aef17c13e
parent 400 ad545734c8de
child 405 415546028e8d
equal deleted inserted replaced
402:457f7c7022e3 403:dc7aef17c13e
     1 #ifndef STATION_H
     1 #ifndef STATION_H
     2 #define STATION_H
     2 #define STATION_H
     3 
     3 
       
     4 #include "engine.h"
     4 #include "vehicle.h"
     5 #include "vehicle.h"
     5 
     6 
     6 typedef struct GoodsEntry {
     7 typedef struct GoodsEntry {
     7 	uint16 waiting_acceptance;
     8 	uint16 waiting_acceptance;
     8 	byte days_since_pickup;
     9 	byte days_since_pickup;
   115 
   116 
   116 	uint32 classid;
   117 	uint32 classid;
   117 
   118 
   118 	byte tiles;
   119 	byte tiles;
   119 	DrawTileSprites renderdata[8];
   120 	DrawTileSprites renderdata[8];
       
   121 
       
   122 	/* Sprite offsets for renderdata->seq->image. relocation[0] is default
       
   123 	 * whilst relocation[1] is "CID_PURCHASE". */
       
   124 	struct SpriteGroup relocation[2];
   120 };
   125 };
   121 
   126 
   122 /* Here, @stid is local per-GRFFile station index. If spec->localidx is not yet
   127 /* Here, @stid is local per-GRFFile station index. If spec->localidx is not yet
   123  * set, it gets new dynamically allocated global index and spec->localidx is
   128  * set, it gets new dynamically allocated global index and spec->localidx is
   124  * set to @stid, otherwise we take it as that we are replacing it and try to
   129  * set to @stid, otherwise we take it as that we are replacing it and try to
   125  * search for it first (that isn't much fast but we do it only very seldom). */
   130  * search for it first (that isn't much fast but we do it only very seldom). */
   126 void SetCustomStation(byte stid, struct StationSpec *spec);
   131 void SetCustomStation(byte stid, struct StationSpec *spec);
   127 /* Here, @stid is global station index (in continous range 0..GetCustomStationsCount())
   132 /* Here, @stid is global station index (in continous range 0..GetCustomStationsCount())
   128  * (lookup is therefore very fast as we do this very frequently). */
   133  * (lookup is therefore very fast as we do this very frequently). */
   129 DrawTileSprites *GetCustomStationRenderdata(uint32 classid, byte stid);
   134 struct StationSpec *GetCustomStation(uint32 classid, byte stid);
       
   135 uint32 GetCustomStationRelocation(struct StationSpec *spec, byte ctype);
   130 int GetCustomStationsCount(uint32 classid);
   136 int GetCustomStationsCount(uint32 classid);
   131 
   137 
   132 #endif /* STATION_H */
   138 #endif /* STATION_H */