OpenTTD
newgrf_canal.h
Go to the documentation of this file.
1 /*
2  * This file is part of OpenTTD.
3  * 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.
4  * 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.
5  * 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/>.
6  */
7 
10 #ifndef NEWGRF_CANAL_H
11 #define NEWGRF_CANAL_H
12 
13 #include "newgrf.h"
14 #include "tile_type.h"
15 
19 };
20 
22 struct WaterFeature {
23  const SpriteGroup *group;
24  const GRFFile *grffile;
25  uint8 callback_mask;
26  uint8 flags;
27 };
28 
29 
31 extern WaterFeature _water_feature[CF_END];
32 
33 
35 
36 uint GetCanalSpriteOffset(CanalFeature feature, TileIndex tile, uint cur_offset);
37 
38 #endif /* NEWGRF_CANAL_H */
SpriteID GetCanalSprite(CanalFeature feature, TileIndex tile)
Lookup the base sprite to use for a canal.
uint GetCanalSpriteOffset(CanalFeature feature, TileIndex tile, uint cur_offset)
Get the new sprite offset for a water tile.
CanalFeatureFlag
Flags controlling the display of canals.
Definition: newgrf_canal.h:17
const GRFFile * grffile
NewGRF where &#39;group&#39; belongs to.
Definition: newgrf_canal.h:24
CanalFeature
List of different canal &#39;features&#39;.
Definition: newgrf.h:25
uint8 flags
Flags controlling display.
Definition: newgrf_canal.h:26
const SpriteGroup * group
Sprite group to start resolving.
Definition: newgrf_canal.h:23
WaterFeature _water_feature[CF_END]
Table of canal &#39;feature&#39; sprite groups.
uint8 callback_mask
Bitmask of canal callbacks that have to be called.
Definition: newgrf_canal.h:25
Additional flat ground sprite in the beginning.
Definition: newgrf_canal.h:18
uint32 SpriteID
The number of a sprite, without mapping bits and colourtables.
Definition: gfx_type.h:17
uint32 TileIndex
The index/ID of a Tile.
Definition: tile_type.h:78
Types related to tiles.
Information about a water feature.
Definition: newgrf_canal.h:22
Dynamic data of a loaded NewGRF.
Definition: newgrf.h:105
Base for the NewGRF implementation.