MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / ReadWord

Method ReadWord

src/random_access_file.cpp:124–128  ·  view source on GitHub ↗

* Read a word (16 bits) from the file (in low endian format). * @return Read word. */

Source from the content-addressed store, hash-verified

122 * @return Read word.
123 */
124uint16_t RandomAccessFile::ReadWord()
125{
126 uint8_t b = this->ReadByte();
127 return (this->ReadByte() << 8) | b;
128}
129
130/**
131 * Read a double word (32 bits) from the file (in low endian format).

Callers 6

ReadDwordMethod · 0.95
LoadNewGRFFileFromFileFunction · 0.45
LoadNewGRFSoundFunction · 0.45
LoadNextSpriteFunction · 0.45
BmpReadHeaderFunction · 0.45
LoadMethod · 0.45

Calls 1

ReadByteMethod · 0.95

Tested by

no test coverage detected