OpenTTD Source 20260621-master-g720d10536d
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 <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
6 */
7
9
10#ifndef NEWGRF_CANAL_H
11#define NEWGRF_CANAL_H
12
13#include "newgrf.h"
14#include "newgrf_callbacks.h"
15#include "tile_type.h"
16
24
25
28
29
31
32uint GetCanalSpriteOffset(CanalFeature feature, TileIndex tile, uint cur_offset);
33
34#endif /* NEWGRF_CANAL_H */
EnumClassIndexContainer< std::array< T, to_underlying(N)>, Index > EnumIndexArray
A typedef for EnumClassIndexContainer using std::array as the backing container type.
uint32_t SpriteID
The number of a sprite, without mapping bits and colourtables.
Definition gfx_type.h:17
Base for the NewGRF implementation.
EnumBitSet< CanalFeatureFlag, uint8_t > CanalFeatureFlags
CanalFeatureFlag bitmask.
Definition newgrf.h:47
CanalFeature
List of different canal 'features'.
Definition newgrf.h:29
Callbacks that NewGRFs could implement.
EnumBitSet< CanalCallbackMask, uint8_t > CanalCallbackMasks
Bitset of CanalCallbackMask elements.
EnumIndexArray< WaterFeature, CanalFeature, CanalFeature::End > _water_feature
Table of canal 'feature' sprite groups.
uint GetCanalSpriteOffset(CanalFeature feature, TileIndex tile, uint cur_offset)
Get the new sprite offset for a water tile.
SpriteID GetCanalSprite(CanalFeature feature, TileIndex tile)
Lookup the base sprite to use for a canal.
Dynamic data of a loaded NewGRF.
Definition newgrf.h:128
Common wrapper for all the different sprite group types.
Information about a water feature.
CanalFeatureFlags flags
Flags controlling display.
const SpriteGroup * group
Sprite group to start resolving.
const GRFFile * grffile
NewGRF where 'group' belongs to.
CanalCallbackMasks callback_mask
Bitmask of canal callbacks that have to be called.
Types related to tiles.
StrongType::Typedef< uint32_t, struct TileIndexTag, StrongType::Compare, StrongType::Integer, StrongType::Compatible< int32_t >, StrongType::Compatible< int64_t > > TileIndex
The index/ID of a Tile.
Definition tile_type.h:92