Show
Ignore:
Timestamp:
08/18/04 08:06:02 (10 years ago)
Author:
robert
Message:

Rejigged the int* definitions to try and get round Mingw compile errors

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osg/dxtctool.cpp

    r3300 r3301  
    7979{ 
    8080    // const size_t Size = ((m_Width + 3) / 4) * ((m_Height + 3) / 4) * BSIZE_DXT1; 
    81     __int8 * const pPixels = (__int8 * const) m_pPixels; 
     81    dxtc_int8 * const pPixels = (dxtc_int8 * const) m_pPixels; 
    8282 
    8383    if (m_Height == 2) 
     
    102102{ 
    103103    // const size_t Size = ((m_Width + 3) / 4) * ((m_Height + 3) / 4) * BSIZE_DXT3; 
    104     // __int8 * const pPixels = (__int8 * const) m_pPixels; 
     104    // dxtc_int8 * const pPixels = (dxtc_int8 * const) m_pPixels; 
    105105 
    106106    if (m_Height == 2) 
    107107        for (size_t j = 0; j < (m_Width + 3) / 4; ++j) { 
    108             BVF_Alpha_DXT3_H2(((__int8 * const) m_pPixels) + (j * BSIZE_DXT3)); 
    109             BVF_Color_H2(((__int8 * const) m_pPixels) + (j * BSIZE_DXT3 + BSIZE_ALPHA_DXT3)); 
     108            BVF_Alpha_DXT3_H2(((dxtc_int8 * const) m_pPixels) + (j * BSIZE_DXT3)); 
     109            BVF_Color_H2(((dxtc_int8 * const) m_pPixels) + (j * BSIZE_DXT3 + BSIZE_ALPHA_DXT3)); 
    110110        } 
    111111 
    112112    if (m_Height == 4) 
    113113        for (size_t j = 0; j < (m_Width + 3) / 4; ++j) { 
    114             BVF_Alpha_DXT3_H4(((__int8 * const) m_pPixels) + (j * BSIZE_DXT3)); 
    115             BVF_Color_H4(((__int8 * const) m_pPixels) + (j * BSIZE_DXT3 + BSIZE_ALPHA_DXT3)); 
     114            BVF_Alpha_DXT3_H4(((dxtc_int8 * const) m_pPixels) + (j * BSIZE_DXT3)); 
     115            BVF_Color_H4(((dxtc_int8 * const) m_pPixels) + (j * BSIZE_DXT3 + BSIZE_ALPHA_DXT3)); 
    116116        } 
    117117 
     
    121121                const size_t TargetRow = ((m_Height + 3) / 4) - (i + 1); 
    122122                BVF_Alpha_DXT3(GetBlock(i, j, BSIZE_DXT3), GetBlock(TargetRow, j, BSIZE_DXT3)); 
    123                 BVF_Color(((__int8 * const) GetBlock(i, j, BSIZE_DXT3)) + BSIZE_ALPHA_DXT3,  
    124                           ((__int8 * const) GetBlock(TargetRow, j, BSIZE_DXT3)) + BSIZE_ALPHA_DXT3); 
     123                BVF_Color(((dxtc_int8 * const) GetBlock(i, j, BSIZE_DXT3)) + BSIZE_ALPHA_DXT3,  
     124                          ((dxtc_int8 * const) GetBlock(TargetRow, j, BSIZE_DXT3)) + BSIZE_ALPHA_DXT3); 
    125125            } 
    126126} 
     
    131131{ 
    132132    // const size_t Size = ((m_Width + 3) / 4) * ((m_Height + 3) / 4) * BSIZE_DXT5; 
    133     // __int8 * const pPixels = (__int8 * const) m_pPixels; 
     133    // dxtc_int8 * const pPixels = (dxtc_int8 * const) m_pPixels; 
    134134 
    135135    if (m_Height == 2) 
    136136        for (size_t j = 0; j < (m_Width + 3) / 4; ++j) { 
    137             BVF_Alpha_DXT5_H2(((__int8 * const) m_pPixels) + (j * BSIZE_DXT5)); 
    138             BVF_Color_H2(((__int8 * const) m_pPixels) + (j * BSIZE_DXT5 + BSIZE_ALPHA_DXT5)); 
     137            BVF_Alpha_DXT5_H2(((dxtc_int8 * const) m_pPixels) + (j * BSIZE_DXT5)); 
     138            BVF_Color_H2(((dxtc_int8 * const) m_pPixels) + (j * BSIZE_DXT5 + BSIZE_ALPHA_DXT5)); 
    139139        } 
    140140 
    141141    if (m_Height == 4) 
    142142        for (size_t j = 0; j < (m_Width + 3) / 4; ++j) { 
    143             BVF_Alpha_DXT5_H4(((__int8 * const) m_pPixels) + (j * BSIZE_DXT5)); 
    144             BVF_Color_H4(((__int8 * const) m_pPixels) + (j * BSIZE_DXT5 + BSIZE_ALPHA_DXT5)); 
     143            BVF_Alpha_DXT5_H4(((dxtc_int8 * const) m_pPixels) + (j * BSIZE_DXT5)); 
     144            BVF_Color_H4(((dxtc_int8 * const) m_pPixels) + (j * BSIZE_DXT5 + BSIZE_ALPHA_DXT5)); 
    145145        } 
    146146 
     
    150150                const size_t TargetRow = ((m_Height + 3) / 4) - (i + 1); 
    151151                BVF_Alpha_DXT5(GetBlock(i, j, BSIZE_DXT5), GetBlock(TargetRow, j, BSIZE_DXT5)); 
    152                 BVF_Color(((__int8 * const) GetBlock(i, j, BSIZE_DXT5)) + BSIZE_ALPHA_DXT5,  
    153                           ((__int8 * const) GetBlock(TargetRow, j, BSIZE_DXT5)) + BSIZE_ALPHA_DXT5); 
     152                BVF_Color(((dxtc_int8 * const) GetBlock(i, j, BSIZE_DXT5)) + BSIZE_ALPHA_DXT5,  
     153                          ((dxtc_int8 * const) GetBlock(TargetRow, j, BSIZE_DXT5)) + BSIZE_ALPHA_DXT5); 
    154154            } 
    155155}