2007-05-06 18:14:33 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
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
|
|
|
|
|
|
|
|
/** 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
|
2009-09-14 12:22:57 +00:00
|
|
|
uint8 callback_mask; ///< Bitmask of canal callbacks that have to be called
|
2008-01-21 20:41:04 +00:00
|
|
|
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 */
|