12#include "../spritecache.h"
16#include "../safeguards.h"
37 uint16_t first_set = 0;
39 if (num_sets == 0 && buf.HasData(3)) {
47 if (feature >= GSF_END) {
49 GrfMsg(1,
"NewSpriteSet: Unsupported feature 0x{:02X}, skipping {} sprites", feature, _cur.
skip_sprites);
55 GrfMsg(7,
"New sprite set at {} of feature 0x{:02X}, consisting of {} sets with {} views each (total {})",
56 _cur.
spriteid, feature, num_sets, num_ents, num_sets * num_ents
59 for (
int i = 0; i < num_sets * num_ents; i++) {
71 if (num_sets == 0 && buf.HasData(3)) {
81 GrfMsg(3,
"SkipAct1: Skipping {} sprites", _cur.
skip_sprites);
Class to read from a NewGRF file.
uint16_t ReadExtendedByte()
Read a single Extended Byte (8 or 16 bits).
uint8_t ReadByte()
Read a single byte (8 bits).
NewGRF buffer reader definition.
NewGRF internal processing state.
bool LoadNextSprite(SpriteID load_index, SpriteFile &file, uint file_sprite_id)
Load a real or recolour sprite.
SpriteFile * file
File of currently processed GRF file.
void AddSpriteSets(uint8_t feature, SpriteID first_sprite, uint first_set, uint numsets, uint numents)
Records new spritesets.
uint32_t nfo_line
Currently processed pseudo sprite number in the GRF.
SpriteID spriteid
First available SpriteID for loading realsprites.
int skip_sprites
Number of pseudo sprites to skip before processing the next one. (-1 to skip to end of file)