OpenTTD Source
12.0-beta2
|
Go to the documentation of this file.
10 #include "../stdafx.h"
14 extern const byte _grf_cont_v2_sig[8] = {
'G',
'R',
'F', 0x82, 0x0D, 0x0A, 0x1A, 0x0A};
22 size_t pos = file.
GetPos();
35 file.
SeekTo(pos, SEEK_SET);
byte container_version
Container format of the sprite file.
static byte GetGRFContainerVersion(SpriteFile &file)
Get the container version of the currently opened GRF file.
byte ReadByte()
Read a byte from the file.
size_t content_begin
The begin of the content of the sprite file, i.e. after the container metadata.
uint16 ReadWord()
Read a word (16 bits) from the file (in low endian format).
size_t GetPos() const
Get position in the file.
RandomAccessFile with some extra information specific for sprite files.
Subdirectory
The different kinds of subdirectories OpenTTD uses.
void SeekTo(size_t pos, int mode)
Seek in the current file.
#define lengthof(x)
Return the length of an fixed size array.
const byte _grf_cont_v2_sig[8]
Signature of a container version 2 GRF.
SpriteFile(const std::string &filename, Subdirectory subdir, bool palette_remap)
Create the SpriteFile.
A file from which bytes, words and double words are read in (potentially) a random order.