2005-08-02 16:12:36 +01:00
|
|
|
/* $Id$ */
|
2005-08-01 21:23:38 +01:00
|
|
|
|
|
|
|
/** @file bridge.h Header file for bridges */
|
|
|
|
|
|
|
|
#ifndef BRIDGE_H
|
|
|
|
#define BRIDGE_H
|
|
|
|
|
2006-03-29 20:03:47 +01:00
|
|
|
enum {
|
|
|
|
MAX_BRIDGES = 13
|
|
|
|
};
|
|
|
|
|
2005-08-01 21:23:38 +01:00
|
|
|
/** Struct containing information about a single bridge type
|
|
|
|
*/
|
2007-03-07 12:11:48 +00:00
|
|
|
struct Bridge {
|
2006-08-16 12:39:55 +01:00
|
|
|
Year avail_year; ///< the year in which the bridge becomes available
|
2005-08-01 21:23:38 +01:00
|
|
|
byte min_length; ///< the minimum length of the bridge (not counting start and end tile)
|
|
|
|
byte max_length; ///< the maximum length of the bridge (not counting start and end tile)
|
|
|
|
uint16 price; ///< the relative price of the bridge
|
|
|
|
uint16 speed; ///< maximum travel speed
|
2007-01-14 19:57:49 +00:00
|
|
|
SpriteID sprite; ///< the sprite which is used in the GUI
|
|
|
|
SpriteID pal; ///< the palette which is used in the GUI
|
2005-08-01 21:23:38 +01:00
|
|
|
StringID material; ///< the string that contains the bridge description
|
2005-10-01 18:38:48 +01:00
|
|
|
PalSpriteID **sprite_table; ///< table of sprites for drawing the bridge
|
|
|
|
byte flags; ///< bit 0 set: disable drawing of far pillars.
|
2007-03-07 12:11:48 +00:00
|
|
|
};
|
2005-08-01 21:23:38 +01:00
|
|
|
|
2005-10-01 18:38:48 +01:00
|
|
|
extern const Bridge orig_bridge[MAX_BRIDGES];
|
2005-12-15 17:55:59 +00:00
|
|
|
extern Bridge _bridge[MAX_BRIDGES];
|
2005-08-01 21:23:38 +01:00
|
|
|
|
2006-04-23 14:48:16 +01:00
|
|
|
uint GetBridgeFoundation(Slope tileh, Axis axis);
|
2007-02-24 18:44:30 +00:00
|
|
|
|
|
|
|
static inline const Bridge *GetBridge(uint i)
|
|
|
|
{
|
|
|
|
assert(i < lengthof(_bridge));
|
|
|
|
return &_bridge[i];
|
|
|
|
}
|
2006-03-29 17:30:26 +01:00
|
|
|
|
2007-07-24 18:01:23 +01:00
|
|
|
void DrawBridgeMiddle(const TileInfo *ti);
|
2007-02-26 18:25:03 +00:00
|
|
|
|
2005-08-01 21:23:38 +01:00
|
|
|
#endif /* BRIDGE_H */
|