(svn r27985) -Codechange: Convert VA2 switches into ones with non-overlapping ranges...
[openttd.git] / src / newgrf_canal.h
blob5ae273bf150c20ea895b201392994ea4a28b0fe3
1 /* $Id$ */
3 /*
4 * This file is part of OpenTTD.
5 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
6 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
8 */
10 /** @file newgrf_canal.h Handling of NewGRF canals. */
12 #ifndef NEWGRF_CANAL_H
13 #define NEWGRF_CANAL_H
15 #include "newgrf.h"
16 #include "tile_type.h"
18 /** Flags controlling the display of canals. */
19 enum CanalFeatureFlag {
20 CFF_HAS_FLAT_SPRITE = 0, ///< Additional flat ground sprite in the beginning.
23 /** Information about a water feature. */
24 struct WaterFeature {
25 const SpriteGroup *group; ///< Sprite group to start resolving.
26 const GRFFile *grffile; ///< NewGRF where 'group' belongs to.
27 uint8 callback_mask; ///< Bitmask of canal callbacks that have to be called.
28 uint8 flags; ///< Flags controlling display.
32 /** Table of canal 'feature' sprite groups */
33 extern WaterFeature _water_feature[CF_END];
36 SpriteID GetCanalSprite(CanalFeature feature, TileIndex tile);
38 uint GetCanalSpriteOffset(CanalFeature feature, TileIndex tile, uint cur_offset);
40 #endif /* NEWGRF_CANAL_H */