src/newgrf_canal.h
author rubidium
Sat, 26 Apr 2008 20:54:56 +0000
branch0.6
changeset 10366 960aae8c20e2
parent 8868 822816ce1fcb
child 10429 1b99254f9607
permissions -rw-r--r--
(svn r12907) [0.6] -Backport from trunk r12906:
- Fix: Vehicle groups, engine replacement rules and player/company names were not properly reset/freed after bankrupt (r12906)
[0.6] -Prepare: for 0.6.1-RC1.
/* $Id$ */

#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,
	CF_RIVER_SLOPE,
	CF_RIVER_EDGE,
	CF_END,
};


struct WaterFeature {
	const SpriteGroup *group;
	uint8 callbackmask;
	uint8 flags;
};


/** Table of canal 'feature' sprite groups */
extern WaterFeature _water_feature[CF_END];


/** 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 */