OpenTTD

newgrf_canal.h
Go to the documentation of this file.
1 /* $Id: newgrf_canal.h 23735 2012-01-03 20:26:05Z rubidium $ */
2
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 */
9
12 #ifndef NEWGRF_CANAL_H
13 #define NEWGRF_CANAL_H
14
15 #include "newgrf.h"
16 #include "tile_type.h"
17
19 enum CanalFeatureFlag {
20 CFF_HAS_FLAT_SPRITE = 0,
21 };
22
24 struct WaterFeature {
25 const SpriteGroup *group;
26 const GRFFile *grffile;
27 uint8 callback_mask;
28 uint8 flags;
29 };
30
31
33 extern WaterFeature _water_feature[CF_END];
34
35
36 SpriteID GetCanalSprite(CanalFeature feature, TileIndex tile);
37
38 uint GetCanalSpriteOffset(CanalFeature feature, TileIndex tile, uint cur_offset);
39
40 #endif /* NEWGRF_CANAL_H */
GetCanalSprite
SpriteID GetCanalSprite(CanalFeature feature, TileIndex tile)
Lookup the base sprite to use for a canal.
Definition: newgrf_canal.cpp:137
GetCanalSpriteOffset
uint GetCanalSpriteOffset(CanalFeature feature, TileIndex tile, uint cur_offset)
Get the new sprite offset for a water tile.
Definition: newgrf_canal.cpp:168
CanalFeatureFlag
CanalFeatureFlag
Flags controlling the display of canals.
Definition: newgrf_canal.h:19
WaterFeature::grffile
const GRFFile * grffile
NewGRF where &#39;group&#39; belongs to.
Definition: newgrf_canal.h:26
CanalFeature
CanalFeature
List of different canal &#39;features&#39;.
Definition: newgrf.h:26
WaterFeature::flags
uint8 flags
Flags controlling display.
Definition: newgrf_canal.h:28
SpriteGroup
Definition: newgrf_spritegroup.h:58
WaterFeature::group
const SpriteGroup * group
Sprite group to start resolving.
Definition: newgrf_canal.h:25
_water_feature
WaterFeature _water_feature[CF_END]
Table of canal &#39;feature&#39; sprite groups.
Definition: newgrf_canal.cpp:22
WaterFeature::callback_mask
uint8 callback_mask
Bitmask of canal callbacks that have to be called.
Definition: newgrf_canal.h:27
CFF_HAS_FLAT_SPRITE
Additional flat ground sprite in the beginning.
Definition: newgrf_canal.h:20
SpriteID
uint32 SpriteID
The number of a sprite, without mapping bits and colourtables.
Definition: gfx_type.h:19
TileIndex
uint32 TileIndex
The index/ID of a Tile.
Definition: tile_type.h:80
tile_type.h
Types related to tiles.
WaterFeature
Information about a water feature.
Definition: newgrf_canal.h:24
GRFFile
Dynamic data of a loaded NewGRF.
Definition: newgrf.h:104
newgrf.h
Base for the NewGRF implementation.