31 for (uint i = 0; i < num_def; i++) {
37 GrfMsg(1,
"LoadFontGlyph: Size {} is not supported, ignoring", size);
40 GrfMsg(7,
"LoadFontGlyph: Loading {} glyph(s) at 0x{:04X} for size {}", num_char, base_char, size);
42 for (uint c = 0; c < num_char; c++) {
43 if (size < FS_END)
SetUnicodeGlyph(size, base_char + c, _cur_gps.spriteid);
45 LoadNextSprite(_cur_gps.spriteid++, *_cur_gps.file, _cur_gps.nfo_line);
62 for (uint i = 0; i < num_def; i++) {
67 _cur_gps.skip_sprites += buf.
ReadByte();
73 GrfMsg(3,
"SkipAct12: Skipping {} sprites", _cur_gps.skip_sprites);
Class to read from a NewGRF file.
uint16_t ReadWord()
Read a single Word (16 bits).
uint8_t ReadByte()
Read a single byte (8 bits).
Functions related to debugging.
Functions to read fonts from files and cache them.
void SetUnicodeGlyph(FontSize size, char32_t key, SpriteID sprite)
Set the SpriteID for a unicode character.
FontSize
Available font sizes.
static void SkipAct12(ByteReader &buf)
Action 0x12 (SKIP).
static void LoadFontGlyph(ByteReader &buf)
Action 0x12.
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.