ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

TAPI void TAPIENTRY fxt1_decode_1 ( const void texture,
int  stride,
int  i,
int  j,
byte rgba 
)

Definition at line 1324 of file fxt1.c.

Referenced by fetch_texel_2d_f_rgb_fxt1(), fetch_texel_2d_f_rgba_fxt1(), fetch_texel_2d_rgb_fxt1(), and fetch_texel_2d_rgba_fxt1().

{
    static void (*decode_1[]) (const byte *, int, byte *) = {
    fxt1_decode_1HI,    /* cc-high   = "00?" */
    fxt1_decode_1HI,    /* cc-high   = "00?" */
    fxt1_decode_1CHROMA,    /* cc-chroma = "010" */
    fxt1_decode_1ALPHA, /* alpha     = "011" */
    fxt1_decode_1MIXED, /* mixed     = "1??" */
    fxt1_decode_1MIXED, /* mixed     = "1??" */
    fxt1_decode_1MIXED, /* mixed     = "1??" */
    fxt1_decode_1MIXED  /* mixed     = "1??" */
    };

    const byte *code = (const byte *)texture +
            ((j / 4) * (stride / 8) + (i / 8)) * 16;
    int mode = CC_SEL(code, 125);
    int t = i & 7;

    if (t & 4) {
    t += 12;
    }
    t += (j & 3) * 4;

    decode_1[mode](code, t, rgba);

#if VERBOSE
    {
    extern int cc_chroma;
    extern int cc_alpha;
    extern int cc_high;
    extern int cc_mixed;
    static int *cctype[] = {
        &cc_high,
        &cc_high,
        &cc_chroma,
        &cc_alpha,
        &cc_mixed,
        &cc_mixed,
        &cc_mixed,
        &cc_mixed
    };
    (*cctype[mode])++;
    }
#endif
}

Generated on Thu May 24 2012 04:48:46 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.