tron@2268: /* $Id$ */ celestar@2262: celestar@2262: /** @file bridge.h Header file for bridges */ celestar@2262: celestar@2262: #ifndef BRIDGE_H celestar@2262: #define BRIDGE_H celestar@2262: celestar@3359: enum { celestar@3359: MAX_BRIDGES = 13 celestar@3359: }; celestar@3359: celestar@2262: /** Struct containing information about a single bridge type celestar@2262: */ rubidium@6248: struct Bridge { rubidium@4293: Year avail_year; ///< the year in which the bridge becomes available celestar@2262: byte min_length; ///< the minimum length of the bridge (not counting start and end tile) celestar@2262: byte max_length; ///< the maximum length of the bridge (not counting start and end tile) celestar@2262: uint16 price; ///< the relative price of the bridge celestar@2262: uint16 speed; ///< maximum travel speed peter1138@5668: SpriteID sprite; ///< the sprite which is used in the GUI peter1138@5668: SpriteID pal; ///< the palette which is used in the GUI celestar@2262: StringID material; ///< the string that contains the bridge description peter1138@2478: PalSpriteID **sprite_table; ///< table of sprites for drawing the bridge peter1138@2478: byte flags; ///< bit 0 set: disable drawing of far pillars. rubidium@6248: }; celestar@2262: peter1138@2478: extern const Bridge orig_bridge[MAX_BRIDGES]; tron@2763: extern Bridge _bridge[MAX_BRIDGES]; celestar@2262: rubidium@7335: Foundation GetBridgeFoundation(Slope tileh, Axis axis); tron@6141: tron@6141: static inline const Bridge *GetBridge(uint i) tron@6141: { tron@6141: assert(i < lengthof(_bridge)); tron@6141: return &_bridge[i]; tron@6141: } celestar@3355: rubidium@7318: void DrawBridgeMiddle(const TileInfo *ti); rubidium@6160: celestar@2262: #endif /* BRIDGE_H */