Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros

◆ DecodeExplicitAlphaBlock()

void Microsoft.Xna.Framework.Graphics.DxtDecoder.DecodeExplicitAlphaBlock ( byte[] source,
int sourceOffset,
Color[] result,
int resultOffset )
inlineprivate

Definition at line 118 of file DxtDecoder.cs.

119 {
120 for (int i = 0; i < 4; i++)
121 {
122 ushort num = Read16(source, sourceOffset + i * 2);
123 for (int j = 0; j < 4; j++)
124 {
125 int num2 = num & 0xF;
126 num >>= 4;
127 result[resultOffset + i * width + j].A = (byte)(num2 * 255 / 15);
128 }
129 }
130 }
static ushort Read16(byte[] source, int offset)

References Microsoft.Xna.Framework.Color.A, Microsoft.Xna.Framework.Graphics.DxtDecoder.Read16(), System.source, and Microsoft.Xna.Framework.Graphics.DxtDecoder.width.

Referenced by Microsoft.Xna.Framework.Graphics.DxtDecoder.Decode().