10#ifndef SPRITECACHE_INTERNAL_H
11#define SPRITECACHE_INTERNAL_H
22 std::unique_ptr<std::byte[]> ptr;
32 void ClearSpriteData();
35inline bool IsMapgenSpriteID(
SpriteID sprite)
37 return IsInsideMM(sprite, SPR_MAPGEN_BEGIN, SPR_MAPGEN_END);
RandomAccessFile with some extra information specific for sprite files.
Types related to the graphics and/or input devices.
uint32_t SpriteID
The number of a sprite, without mapping bits and colourtables.
SpriteType
Types of sprites that might be loaded.
@ Invalid
Pseudosprite or other unusable sprite, used only internally.
constexpr bool IsInsideMM(const size_t x, const size_t min, const size_t max) noexcept
Checks if a value is in an interval.
Base for loading sprites.
This file contains all sprite-related enums and defines.
uint8_t control_flags
Control flags, see SpriteCacheCtrlFlags.
uint32_t length
Length of sprite data.
bool warned
True iff the user has been warned about incorrect use of this sprite.
SpriteType type
In some cases a single sprite is misused by two NewGRFs. Once as real sprite and once as recolour spr...
SpriteFile * file
The file the sprite in this entry can be found in.