MCPcopy Create free account
hub / github.com/DentonW/DevIL / DxtcReadColor

Function DxtcReadColor

DevIL/src-IL/src/il_dds.cpp:1005–1016  ·  view source on GitHub ↗

@TODO: Probably not safe on Big Endian.

Source from the content-addressed store, hash-verified

1003
1004//@TODO: Probably not safe on Big Endian.
1005void DxtcReadColor(ILushort Data, Color8888* Out)
1006{
1007 ILubyte r, g, b;
1008
1009 b = Data & 0x1f;
1010 g = (Data & 0x7E0) >> 5;
1011 r = (Data & 0xF800) >> 11;
1012
1013 Out->r = r << 3 | r >> 2;
1014 Out->g = g << 2 | g >> 3;
1015 Out->b = b << 3 | r >> 2;
1016}
1017
1018
1019// Defined at the bottom of the file

Callers 2

iLoadTplInternalFunction · 0.85
DecompressDXT1Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected