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

Function Get3DcBlock

DevIL/src-IL/src/il_dds-save.cpp:962–977  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

960}
961
962ILboolean Get3DcBlock(ILubyte *Block, ILubyte *Data, ILimage *Image, ILuint XPos, ILuint YPos, int channel)
963{
964 ILuint x, y, i = 0, Offset = 2*(YPos * Image->Width + XPos) + channel;
965
966 for (y = 0; y < 4; y++) {
967 for (x = 0; x < 4; x++) {
968 if (x < Image->Width && y < Image->Height)
969 Block[i++] = Data[Offset + 2*x];
970 else
971 Block[i++] = Data[Offset];
972 }
973 Offset += 2*Image->Width;
974 }
975
976 return IL_TRUE;
977}
978
979
980void ShortToColor565(ILushort Pixel, Color565 *Colour)

Callers 1

CompressFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected