equal
deleted
inserted
replaced
62 |
62 |
63 /** sprite number difference between a piece of track on a snowy ground and the corresponding one on normal ground */ |
63 /** sprite number difference between a piece of track on a snowy ground and the corresponding one on normal ground */ |
64 SpriteID snow_offset; |
64 SpriteID snow_offset; |
65 |
65 |
66 /** bitmask to the OTHER railtypes on which an engine of THIS railtype generates power */ |
66 /** bitmask to the OTHER railtypes on which an engine of THIS railtype generates power */ |
67 RailTypeMask powered_railtypes; |
67 RailTypes powered_railtypes; |
68 |
68 |
69 /** bitmask to the OTHER railtypes on which an engine of THIS railtype can physically travel */ |
69 /** bitmask to the OTHER railtypes on which an engine of THIS railtype can physically travel */ |
70 RailTypeMask compatible_railtypes; |
70 RailTypes compatible_railtypes; |
71 |
71 |
72 /** |
72 /** |
73 * Offset between the current railtype and normal rail. This means that:<p> |
73 * Offset between the current railtype and normal rail. This means that:<p> |
74 * 1) All the sprites in a railset MUST be in the same order. This order |
74 * 1) All the sprites in a railset MUST be in the same order. This order |
75 * is determined by normal rail. Check sprites 1005 and following for this order<p> |
75 * is determined by normal rail. Check sprites 1005 and following for this order<p> |
199 |
199 |
200 Foundation GetRailFoundation(Slope tileh, TrackBits bits); |
200 Foundation GetRailFoundation(Slope tileh, TrackBits bits); |
201 |
201 |
202 int32 SettingsDisableElrail(int32 p1); ///< _patches.disable_elrail callback |
202 int32 SettingsDisableElrail(int32 p1); ///< _patches.disable_elrail callback |
203 |
203 |
|
204 /** |
|
205 * Finds out if a Player has a certain railtype available |
|
206 * @param p Player in question |
|
207 * @param railtype requested RailType |
|
208 * @return true if player has requested RailType available |
|
209 */ |
|
210 bool HasRailtypeAvail(const PlayerID p, const RailType railtype); |
|
211 |
|
212 /** |
|
213 * Validate functions for rail building. |
|
214 * @param rail the railtype to check. |
|
215 * @return true if the current player may build the rail. |
|
216 */ |
|
217 bool ValParamRailtype(const RailType rail); |
|
218 |
|
219 /** |
|
220 * Returns the "best" railtype a player can build. |
|
221 * As the AI doesn't know what the BEST one is, we have our own priority list |
|
222 * here. When adding new railtypes, modify this function |
|
223 * @param p the player "in action" |
|
224 * @return The "best" railtype a player has available |
|
225 */ |
|
226 RailType GetBestRailtype(const PlayerID p); |
|
227 |
|
228 /** |
|
229 * Get the rail types the given player can build. |
|
230 * @param p the player to get the rail types for. |
|
231 * @return the rail types. |
|
232 */ |
|
233 RailTypes GetPlayerRailtypes(const PlayerID p); |
|
234 |
204 #endif /* RAIL_H */ |
235 #endif /* RAIL_H */ |