Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ushort[] block = new ushort[4]; /* i dont know the size of this, I think this is fine */
- byte[] alphaValues = new byte[16];
- for (int i = 0; i < 4; ++i)
- {
- ushort[] alphaData = new ushort[4];
- Buffer.BlockCopy(block, 0, alphaData, 0, sizeof(ushort) * 4);
- alphaValues[i * 4 + 0] = (byte)(((alphaData[i] >> 0) & 0xF) * 17);
- alphaValues[i * 4 + 1] = (byte)(((alphaData[i] >> 4) & 0xF) * 17);
- alphaValues[i * 4 + 2] = (byte)(((alphaData[i] >> 8) & 0xF) * 17);
- alphaValues[i * 4 + 3] = (byte)(((alphaData[i] >> 12) & 0xF) * 17);
- //advance by 2 bytes
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement