GLint i, GLint j, GLint k, GLchan *texel )
{
(void) k;
- fxt1_decode_1(texImage->Data, texImage->Width, i, j, texel);
+ fxt1_decode_1(texImage->Data, texImage->RowStride, i, j, texel);
}
/* just sample as GLchan and convert to float here */
GLchan rgba[4];
(void) k;
- fxt1_decode_1(texImage->Data, texImage->Width, i, j, rgba);
+ fxt1_decode_1(texImage->Data, texImage->RowStride, i, j, rgba);
texel[RCOMP] = CHAN_TO_FLOAT(rgba[RCOMP]);
texel[GCOMP] = CHAN_TO_FLOAT(rgba[GCOMP]);
texel[BCOMP] = CHAN_TO_FLOAT(rgba[BCOMP]);
GLint i, GLint j, GLint k, GLchan *texel )
{
(void) k;
- fxt1_decode_1(texImage->Data, texImage->Width, i, j, texel);
+ fxt1_decode_1(texImage->Data, texImage->RowStride, i, j, texel);
texel[ACOMP] = 255;
}
/* just sample as GLchan and convert to float here */
GLchan rgba[4];
(void) k;
- fxt1_decode_1(texImage->Data, texImage->Width, i, j, rgba);
+ fxt1_decode_1(texImage->Data, texImage->RowStride, i, j, rgba);
texel[RCOMP] = CHAN_TO_FLOAT(rgba[RCOMP]);
texel[GCOMP] = CHAN_TO_FLOAT(rgba[GCOMP]);
texel[BCOMP] = CHAN_TO_FLOAT(rgba[BCOMP]);
static void
-fxt1_decode_1HI (unsigned long code, int t, unsigned char *rgba)
+fxt1_decode_1HI (unsigned char *code, int t, unsigned char *rgba)
{
const unsigned long *cc;
static void
-fxt1_decode_1CHROMA (unsigned long code, int t, unsigned char *rgba)
+fxt1_decode_1CHROMA (unsigned char *code, int t, unsigned char *rgba)
{
const unsigned long *cc;
unsigned long kk;
static void
-fxt1_decode_1MIXED (unsigned long code, int t, unsigned char *rgba)
+fxt1_decode_1MIXED (unsigned char *code, int t, unsigned char *rgba)
{
const unsigned long *cc;
unsigned int col[2][3];
static void
-fxt1_decode_1ALPHA (unsigned long code, int t, unsigned char *rgba)
+fxt1_decode_1ALPHA (unsigned char *code, int t, unsigned char *rgba)
{
const unsigned long *cc;
fxt1_decode_1 (const void *texture, int width,
int i, int j, unsigned char *rgba)
{
- static void (*decode_1[]) (unsigned long, int, unsigned char *) = {
+ static void (*decode_1[]) (unsigned char *, int, unsigned char *) = {
fxt1_decode_1HI, /* cc-high = "00?" */
fxt1_decode_1HI, /* cc-high = "00?" */
fxt1_decode_1CHROMA, /* cc-chroma = "010" */
fxt1_decode_1MIXED /* mixed = "1??" */
};
- unsigned long code = (unsigned long)texture +
- ((j / 4) * (width / 8) + (i / 8)) * 16;
+ unsigned char *code = (unsigned char *)texture +
+ ((j / 4) * (width / 8) + (i / 8)) * 16;
int mode = CC_SEL((unsigned long *)code, 125);
int t = i & 7;