MCPcopy Create free account
hub / github.com/GDRETools/gdsdecomp / read16

Method read16

external/tga/decoder.cpp:296–306  ·  view source on GitHub ↗

Reads a WORD (16 bits) using in little-endian byte ordering.

Source from the content-addressed store, hash-verified

294
295// Reads a WORD (16 bits) using in little-endian byte ordering.
296uint16_t Decoder::read16()
297{
298 uint8_t b1 = m_file->read8();
299 uint8_t b2 = m_file->read8();
300
301 if (m_file->ok()) {
302 return ((b2 << 8) | b1); // Little endian
303 }
304 else
305 return 0;
306}
307
308// Reads a DWORD (32 bits) using in little-endian byte ordering.
309uint32_t Decoder::read32()

Callers

nothing calls this directly

Calls 2

read8Method · 0.45
okMethod · 0.45

Tested by

no test coverage detected