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/>.
8 /** @file newgrf_act5.h Information about NewGRF Action 5. */
13 /** The type of action 5 type. */
14 enum Action5BlockType
{
15 A5BLOCK_FIXED
, ///< Only allow replacing a whole block of sprites. (TTDP compatible)
16 A5BLOCK_ALLOW_OFFSET
, ///< Allow replacing any subset by specifiing an offset.
17 A5BLOCK_INVALID
, ///< unknown/not-implemented type
20 /** Information about a single action 5 type. */
22 Action5BlockType block_type
; ///< How is this Action5 type processed?
23 SpriteID sprite_base
; ///< Load the sprites starting from this sprite.
24 uint16_t min_sprites
; ///< If the Action5 contains less sprites, the whole block will be ignored.
25 uint16_t max_sprites
; ///< If the Action5 contains more sprites, only the first max_sprites sprites will be used.
26 const std::string_view name
; ///< Name for error messages.
29 std::span
<const Action5Type
> GetAction5Types();
31 #endif /* NEWGRF_ACT5_H */