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

Method read32

external/tga/decoder.cpp:309–322  ·  view source on GitHub ↗

Reads a DWORD (32 bits) using in little-endian byte ordering.

Source from the content-addressed store, hash-verified

307
308// Reads a DWORD (32 bits) using in little-endian byte ordering.
309uint32_t Decoder::read32()
310{
311 const uint8_t b1 = m_file->read8();
312 const uint8_t b2 = m_file->read8();
313 const uint8_t b3 = m_file->read8();
314 const uint8_t b4 = m_file->read8();
315
316 if (m_file->ok()) {
317 // Little endian
318 return ((b4 << 24) | (b3 << 16) | (b2 << 8) | b1);
319 }
320 else
321 return 0;
322}
323
324color_t Decoder::read32AsRgb()
325{

Callers

nothing calls this directly

Calls 2

read8Method · 0.45
okMethod · 0.45

Tested by

no test coverage detected