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