| 960 | } |
| 961 | |
| 962 | ILboolean 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 | |
| 980 | void ShortToColor565(ILushort Pixel, Color565 *Colour) |