2009-08-21 20:21:05 +00:00
|
|
|
/*
|
|
|
|
* This file is part of OpenTTD.
|
|
|
|
* 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.
|
|
|
|
* 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.
|
|
|
|
* 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/>.
|
|
|
|
*/
|
|
|
|
|
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
|
|
|
|
|
2012-01-03 20:26:05 +00:00
|
|
|
#include "newgrf.h"
|
2010-01-15 16:41:15 +00:00
|
|
|
#include "tile_type.h"
|
|
|
|
|
2010-08-03 17:48:03 +00:00
|
|
|
/** Flags controlling the display of canals. */
|
|
|
|
enum CanalFeatureFlag {
|
|
|
|
CFF_HAS_FLAT_SPRITE = 0, ///< Additional flat ground sprite in the beginning.
|
|
|
|
};
|
2007-05-06 18:14:33 +00:00
|
|
|
|
2010-08-03 17:48:03 +00:00
|
|
|
/** Information about a water feature. */
|
2008-01-21 20:41:04 +00:00
|
|
|
struct WaterFeature {
|
2010-08-03 17:48:03 +00:00
|
|
|
const SpriteGroup *group; ///< Sprite group to start resolving.
|
|
|
|
const GRFFile *grffile; ///< NewGRF where 'group' belongs to.
|
|
|
|
uint8 callback_mask; ///< Bitmask of canal callbacks that have to be called.
|
|
|
|
uint8 flags; ///< Flags controlling display.
|
2008-01-21 20:41:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
SpriteID GetCanalSprite(CanalFeature feature, TileIndex tile);
|
|
|
|
|
2010-08-03 17:48:07 +00:00
|
|
|
uint GetCanalSpriteOffset(CanalFeature feature, TileIndex tile, uint cur_offset);
|
|
|
|
|
2007-05-06 18:14:33 +00:00
|
|
|
#endif /* NEWGRF_CANAL_H */
|