OpenTTD Source 20250524-master-gc366e6a48e
newgrf_act5.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_ACT5_H
11#define NEWGRF_ACT5_H
12
13#include "gfx_type.h"
14
21
26 uint16_t min_sprites;
27 uint16_t max_sprites;
28 const std::string_view name;
29};
30
31std::span<const Action5Type> GetAction5Types();
32
33#endif /* NEWGRF_ACT5_H */
Types related to the graphics and/or input devices.
uint32_t SpriteID
The number of a sprite, without mapping bits and colourtables.
Definition gfx_type.h:17
std::span< const Action5Type > GetAction5Types()
Get list of all action 5 types.
Action5BlockType
The type of action 5 type.
Definition newgrf_act5.h:16
@ A5BLOCK_ALLOW_OFFSET
Allow replacing any subset by specifiing an offset.
Definition newgrf_act5.h:18
@ A5BLOCK_INVALID
unknown/not-implemented type
Definition newgrf_act5.h:19
@ A5BLOCK_FIXED
Only allow replacing a whole block of sprites. (TTDP compatible)
Definition newgrf_act5.h:17
Information about a single action 5 type.
Definition newgrf_act5.h:23
Action5BlockType block_type
How is this Action5 type processed?
Definition newgrf_act5.h:24
uint16_t max_sprites
If the Action5 contains more sprites, only the first max_sprites sprites will be used.
Definition newgrf_act5.h:27
uint16_t min_sprites
If the Action5 contains less sprites, the whole block will be ignored.
Definition newgrf_act5.h:26
SpriteID sprite_base
Load the sprites starting from this sprite.
Definition newgrf_act5.h:25
const std::string_view name
Name for error messages.
Definition newgrf_act5.h:28