2007-05-06 18:14:33 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
2008-05-06 15:11:33 +00:00
|
|
|
/** @file newgrf_canal.h Handling of NewGRF canals. */
|
|
|
|
|
2007-05-06 18:14:33 +00:00
|
|
|
#ifndef NEWGRF_CANAL_H
|
|
|
|
#define NEWGRF_CANAL_H
|
|
|
|
|
|
|
|
/** List of different canal 'features'.
|
|
|
|
* Each feature gets an entry in the canal spritegroup table */
|
|
|
|
enum CanalFeature {
|
|
|
|
CF_WATERSLOPE,
|
|
|
|
CF_LOCKS,
|
|
|
|
CF_DIKES,
|
|
|
|
CF_ICON,
|
|
|
|
CF_DOCKS,
|
2008-01-19 17:00:54 +00:00
|
|
|
CF_RIVER_SLOPE,
|
|
|
|
CF_RIVER_EDGE,
|
2007-05-06 18:14:33 +00:00
|
|
|
CF_END,
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-01-21 20:41:04 +00:00
|
|
|
struct WaterFeature {
|
|
|
|
const SpriteGroup *group;
|
2008-07-30 18:23:12 +00:00
|
|
|
const GRFFile *grffile; ///< newgrf where 'group' belongs to
|
2008-01-21 20:41:04 +00:00
|
|
|
uint8 callbackmask;
|
|
|
|
uint8 flags;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2007-05-06 18:14:33 +00:00
|
|
|
/** Table of canal 'feature' sprite groups */
|
2008-01-21 20:41:04 +00:00
|
|
|
extern WaterFeature _water_feature[CF_END];
|
2007-05-06 18:14:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
/** Lookup the base sprite to use for a canal.
|
|
|
|
* @param feature Which canal feature we want.
|
|
|
|
* @param tile Tile index of canal, if appropriate.
|
|
|
|
* @return Base sprite returned by GRF, or 0 if none.
|
|
|
|
*/
|
|
|
|
SpriteID GetCanalSprite(CanalFeature feature, TileIndex tile);
|
|
|
|
|
|
|
|
#endif /* NEWGRF_CANAL_H */
|