summaryrefslogtreecommitdiffstats
path: root/kimgio/dds.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kimgio/dds.cpp')
-rw-r--r--kimgio/dds.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/kimgio/dds.cpp b/kimgio/dds.cpp
index caacb2a3c..bdf1ae750 100644
--- a/kimgio/dds.cpp
+++ b/kimgio/dds.cpp
@@ -33,9 +33,9 @@
#define sqrtf(x) ((float)sqrt(x))
#endif
-typedef Q_UINT32 uint;
-typedef Q_UINT16 ushort;
-typedef Q_UINT8 uchar;
+typedef TQ_UINT32 uint;
+typedef TQ_UINT16 ushort;
+typedef TQ_UINT8 uchar;
namespace { // Private.
@@ -298,7 +298,7 @@ namespace { // Private.
for( uint x = 0; x < w; x++ ) {
uchar r, g, b, a;
s >> b >> g >> r >> a;
- scanline[x] = qRgba(r, g, b, a);
+ scanline[x] = tqRgba(r, g, b, a);
}
}
@@ -315,7 +315,7 @@ namespace { // Private.
for( uint x = 0; x < w; x++ ) {
uchar r, g, b;
s >> b >> g >> r;
- scanline[x] = qRgb(r, g, b);
+ scanline[x] = tqRgb(r, g, b);
}
}
@@ -336,7 +336,7 @@ namespace { // Private.
uchar r = (color.c.r << 3) | (color.c.r >> 2);
uchar g = (color.c.g << 3) | (color.c.g >> 2);
uchar b = (color.c.b << 3) | (color.c.b >> 2);
- scanline[x] = qRgba(r, g, b, a);
+ scanline[x] = tqRgba(r, g, b, a);
}
}
@@ -357,7 +357,7 @@ namespace { // Private.
uchar r = (color.c.r << 4) | color.c.r;
uchar g = (color.c.g << 4) | color.c.g;
uchar b = (color.c.b << 4) | color.c.b;
- scanline[x] = qRgba(r, g, b, a);
+ scanline[x] = tqRgba(r, g, b, a);
}
}
@@ -377,7 +377,7 @@ namespace { // Private.
uchar r = (color.c.r << 3) | (color.c.r >> 2);
uchar g = (color.c.g << 2) | (color.c.g >> 4);
uchar b = (color.c.b << 3) | (color.c.b >> 2);
- scanline[x] = qRgb(r, g, b);
+ scanline[x] = tqRgb(r, g, b);
}
}
@@ -548,7 +548,7 @@ namespace { // Private.
for( uint i = 0; i < 4; i++ ) {
if( img.valid( x+i, y+j ) ) {
uint idx = (block.row[j] & masks[i]) >> shift[i];
- scanline[j][x+i] = qRgba(color_array[idx].r, color_array[idx].g, color_array[idx].b, color_array[idx].a);
+ scanline[j][x+i] = tqRgba(color_array[idx].r, color_array[idx].g, color_array[idx].b, color_array[idx].a);
}
}
}
@@ -592,7 +592,7 @@ namespace { // Private.
uint idx = (block.row[j] & masks[i]) >> shift[i];
color_array[idx].a = a & 0x0f;
color_array[idx].a = color_array[idx].a | (color_array[idx].a << 4);
- scanline[j][x+i] = qRgba(color_array[idx].r, color_array[idx].g, color_array[idx].b, color_array[idx].a);
+ scanline[j][x+i] = tqRgba(color_array[idx].r, color_array[idx].g, color_array[idx].b, color_array[idx].a);
}
a >>= 4;
}
@@ -648,7 +648,7 @@ namespace { // Private.
if( img.valid( x+i, y+j ) ) {
uint idx = (block.row[j] & masks[i]) >> shift[i];
color_array[idx].a = alpha_array[bit_array[j*4+i]];
- scanline[j][x+i] = qRgba(color_array[idx].r, color_array[idx].g, color_array[idx].b, color_array[idx].a);
+ scanline[j][x+i] = tqRgba(color_array[idx].r, color_array[idx].g, color_array[idx].b, color_array[idx].a);
}
}
}
@@ -703,7 +703,7 @@ namespace { // Private.
if( img.valid( x+i, y+j ) ) {
uint idx = (block.row[j] & masks[i]) >> shift[i];
color_array[idx].a = alpha_array[bit_array[j*4+i]];
- scanline[j][x+i] = qRgb(color_array[idx].a, color_array[idx].g, color_array[idx].b);
+ scanline[j][x+i] = tqRgb(color_array[idx].a, color_array[idx].g, color_array[idx].b);
}
}
}
@@ -757,7 +757,7 @@ namespace { // Private.
const float fz = sqrtf(1.0f - fx*fx - fy*fy);
const uchar nz = uchar((fz + 1.0f) * 127.5f);
- scanline[j][x+i] = qRgb(nx, ny, nz);
+ scanline[j][x+i] = tqRgb(nx, ny, nz);
}
}
}
@@ -910,7 +910,7 @@ namespace { // Private.
return false;
}
- int offset = s.device()->at();
+ int offset = s.tqdevice()->at();
int size = FaceOffset( header );
for( int i = 0; i < 6; i++ ) {
@@ -921,7 +921,7 @@ namespace { // Private.
}
// Seek device.
- s.device()->at( offset );
+ s.tqdevice()->at( offset );
offset += size;
// Load face from stream.
@@ -963,8 +963,8 @@ KDE_EXPORT void kimgio_dds_read( TQImageIO *io )
s >> fourcc;
if( fourcc != FOURCC_DDS ) {
kdDebug(399) << "This is not a DDS file." << endl;
- io->setImage( 0 );
- io->setStatus( -1 );
+ io->setImage( TQImage() );
+ io->setqStatus( -1 );
return;
}
@@ -975,16 +975,16 @@ KDE_EXPORT void kimgio_dds_read( TQImageIO *io )
// Check image file format.
if( s.atEnd() || !IsValid( header ) ) {
kdDebug(399) << "This DDS file is not valid." << endl;
- io->setImage( 0 );
- io->setStatus( -1 );
+ io->setImage( TQImage() );
+ io->setqStatus( -1 );
return;
}
// Determine image type, by now, we only support 2d textures.
if( !IsSupported( header ) ) {
kdDebug(399) << "This DDS file is not supported." << endl;
- io->setImage( 0 );
- io->setStatus( -1 );
+ io->setImage( TQImage() );
+ io->setqStatus( -1 );
return;
}
@@ -1001,13 +1001,13 @@ KDE_EXPORT void kimgio_dds_read( TQImageIO *io )
if( result == false ) {
kdDebug(399) << "Error loading DDS file." << endl;
- io->setImage( 0 );
- io->setStatus( -1 );
+ io->setImage( TQImage() );
+ io->setqStatus( -1 );
return;
}
io->setImage( img );
- io->setStatus( 0 );
+ io->setqStatus( 0 );
}