37 uint16_t first_set = 0;
39 if (num_sets == 0 && buf.HasData(3)) {
47 if (feature >= GSF_END) {
48 _cur_gps.skip_sprites = num_sets * num_ents;
49 GrfMsg(1,
"NewSpriteSet: Unsupported feature 0x{:02X}, skipping {} sprites", feature, _cur_gps.skip_sprites);
53 _cur_gps.AddSpriteSets(feature, _cur_gps.spriteid, first_set, num_sets, num_ents);
55 GrfMsg(7,
"New sprite set at {} of feature 0x{:02X}, consisting of {} sets with {} views each (total {})",
56 _cur_gps.spriteid, feature, num_sets, num_ents, num_sets * num_ents
59 for (
int i = 0; i < num_sets * num_ents; i++) {
61 LoadNextSprite(_cur_gps.spriteid++, *_cur_gps.file, _cur_gps.nfo_line);
71 if (num_sets == 0 && buf.HasData(3)) {
79 _cur_gps.skip_sprites = num_sets * num_ents;
81 GrfMsg(3,
"SkipAct1: Skipping {} sprites", _cur_gps.skip_sprites);
84template <>
void GrfActionHandler<0x01>::FileScan(
ByteReader &buf) { SkipAct1(buf); }
85template <>
void GrfActionHandler<0x01>::SafetyScan(
ByteReader &buf) { SkipAct1(buf); }
86template <>
void GrfActionHandler<0x01>::LabelScan(
ByteReader &buf) { SkipAct1(buf); }
87template <>
void GrfActionHandler<0x01>::Init(
ByteReader &buf) { SkipAct1(buf); }
88template <>
void GrfActionHandler<0x01>::Reserve(
ByteReader &buf) { SkipAct1(buf); }
89template <>
void GrfActionHandler<0x01>::Activation(
ByteReader &buf) { NewSpriteSet(buf); }
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).
Functions related to debugging.
NewGRF buffer reader definition.
NewGRF internal processing state.
A number of safeguards to prevent using unsafe methods.
bool LoadNextSprite(SpriteID load_index, SpriteFile &file, uint file_sprite_id)
Load a real or recolour sprite.
Functions to cache sprites in memory.
Definition of base types and functions in a cross-platform compatible way.