OpenTTD Source 20250918-master-g2d13bcb7b9
spritecache_type.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 SPRITECACHE_TYPE_H
11#define SPRITECACHE_TYPE_H
12
13#include "core/enum_type.hpp"
14
16struct Sprite {
17 uint16_t height;
18 uint16_t width;
19 int16_t x_offs;
20 int16_t y_offs;
21 std::byte data[];
22};
23
30
32
33#endif /* SPRITECACHE_TYPE_H */
Type (helpers) for enums.
SpriteCacheCtrlFlag
@ AllowZoomMin1x32bpp
Allow use of sprite min zoom setting at 1x in 32bpp mode.
@ AllowZoomMin2x32bpp
Allow use of sprite min zoom setting at 2x in 32bpp mode.
@ AllowZoomMin1xPal
Allow use of sprite min zoom setting at 1x in palette mode.
@ AllowZoomMin2xPal
Allow use of sprite min zoom setting at 2x in palette mode.
Data structure describing a sprite.
uint16_t width
Width of the sprite.
uint16_t height
Height of the sprite.
int16_t y_offs
Number of pixels to shift the sprite downwards.
std::byte data[]
Sprite data.
int16_t x_offs
Number of pixels to shift the sprite to the right.