Replaced various '#define' with actual strings - part 5

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit dd25da6a2b)
r14.1.x
Michele Calgaro 11 months ago
parent 0959fe8c0a
commit a39b2b83e2
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -297,13 +297,13 @@ void board_2d::redrawLights( void )
}
if( myLogic->OnMove != WHITE )
{
myBlit( black, TQT_TQPAINTDEVICE(&cache->BorderLightOn), cache->BorderLightOn.rect() );
myBlit( white, TQT_TQPAINTDEVICE(&cache->BorderLightOff), cache->BorderLightOff.rect() );
myBlit( black, &cache->BorderLightOn, cache->BorderLightOn.rect() );
myBlit( white, &cache->BorderLightOff, cache->BorderLightOff.rect() );
}
else
{
myBlit( black, TQT_TQPAINTDEVICE(&cache->BorderLightOff), cache->BorderLightOff.rect() );
myBlit( white, TQT_TQPAINTDEVICE(&cache->BorderLightOn), cache->BorderLightOn.rect() );
myBlit( black, &cache->BorderLightOff, cache->BorderLightOff.rect() );
myBlit( white, &cache->BorderLightOn, cache->BorderLightOn.rect() );
}
}
}
@ -390,7 +390,7 @@ void board_2d::drawPosition( const int &pos )
*/
if( myResource->OPTION_Show_Coord )
drawCoords( &buffer, pos );
myBlit( coords( rank, file ), TQT_TQPAINTDEVICE(&buffer), buffer.rect() );
myBlit( coords( rank, file ), &buffer, buffer.rect() );
return;
}
@ -407,16 +407,16 @@ void board_2d::drawPosition( const int &pos )
{
case NOTE_HIGHLIGHT: // Fall Through
case NOTE_SELECT:
bitBlt( TQT_TQPAINTDEVICE(&buffer), 0, 0, TQT_TQPAINTDEVICE(&cache->HighlightSelect), 0, 0, -1, -1, TQt::CopyROP, FALSE);
bitBlt( &buffer, 0, 0, &cache->HighlightSelect, 0, 0, -1, -1, TQt::CopyROP, FALSE);
break;
case NOTE_MOVE: // Fall Through
case NOTE_CASTLE: // Fall Through
case NOTE_PAWN_DOUBLE:
bitBlt( TQT_TQPAINTDEVICE(&buffer), 0, 0, TQT_TQPAINTDEVICE(&cache->HighlightMove), 0, 0, -1, -1, TQt::CopyROP, FALSE);
bitBlt( &buffer, 0, 0, &cache->HighlightMove, 0, 0, -1, -1, TQt::CopyROP, FALSE);
break;
case NOTE_ATTACK: // Fall Through
case NOTE_ENPASSANT:
bitBlt( TQT_TQPAINTDEVICE(&buffer), 0, 0, TQT_TQPAINTDEVICE(&cache->HighlightAttack), 0, 0, -1, -1, TQt::CopyROP, FALSE);
bitBlt( &buffer, 0, 0, &cache->HighlightAttack, 0, 0, -1, -1, TQt::CopyROP, FALSE);
break;
default:
break;
@ -424,14 +424,14 @@ void board_2d::drawPosition( const int &pos )
if( !isSprite(pos) )
{
TQPixmap chessman = getChessman( pos );
bitBlt( TQT_TQPAINTDEVICE(&buffer), 0, 0, TQT_TQPAINTDEVICE(&chessman), 0, 0, -1, -1, TQt::CopyROP, FALSE);
bitBlt( &buffer, 0, 0, &chessman, 0, 0, -1, -1, TQt::CopyROP, FALSE);
}
/* Now add this pixmap to the cache */
cache->add( cacheName, buffer );
/* */
if( myResource->OPTION_Show_Coord )
drawCoords( &buffer, pos );
myBlit( coords( rank, file ), TQT_TQPAINTDEVICE(&buffer), buffer.rect() );
myBlit( coords( rank, file ), &buffer, buffer.rect() );
}
///////////////////////////////////////
//
@ -498,7 +498,7 @@ void board_2d::mouseReleaseEvent( TQMouseEvent *event )
/* Destroy any sprites being dragged */
int tmp = DragSprite->POSITION_Origin;
myBlit( DragSprite->POINT_LastUpdate,
TQT_TQPAINTDEVICE(&DragSprite->PIXMAP_FlipFrame),
&DragSprite->PIXMAP_FlipFrame,
DragSprite->PIXMAP_FlipFrame.rect() );
sprites.removeRef( DragSprite );
DragSprite = NULL;
@ -703,7 +703,7 @@ void board_2d::drawSprites( void )
else
{
myBlit( spritePtr->POINT_LastUpdate,
TQT_TQPAINTDEVICE(&spritePtr->PIXMAP_FlipFrame),
&spritePtr->PIXMAP_FlipFrame,
spritePtr->PIXMAP_FlipFrame.rect() );
}
}
@ -725,7 +725,7 @@ void board_2d::drawSprites( void )
spritePtr->PIXMAP_FlipFrame.height(),
TQt::CopyROP );
myBlit( spritePtr->POINT_Current,
TQT_TQPAINTDEVICE(&spritePtr->PIXMAP_Sprite),
&spritePtr->PIXMAP_Sprite,
spritePtr->PIXMAP_Sprite.rect() );
spritePtr->POINT_LastUpdate = spritePtr->POINT_Current;
}

@ -65,29 +65,29 @@ void dlg_promote::Init( bool Army )
/* Queen */
buffer = cache->SquareLight;
if( Army == WHITE ) bitBlt( TQT_TQPAINTDEVICE(&buffer), 0, 0, TQT_TQPAINTDEVICE(&cache->WhiteQueen), 0, 0, -1, -1, TQt::CopyROP, FALSE);
else bitBlt( TQT_TQPAINTDEVICE(&buffer), 0, 0, TQT_TQPAINTDEVICE(&cache->BlackQueen), 0, 0, -1, -1, TQt::CopyROP, FALSE);
if( Army == WHITE ) bitBlt( &buffer, 0, 0, &cache->WhiteQueen, 0, 0, -1, -1, TQt::CopyROP, FALSE);
else bitBlt( &buffer, 0, 0, &cache->BlackQueen, 0, 0, -1, -1, TQt::CopyROP, FALSE);
Queen->setPixmap( buffer );
Queen->show();
/* Bishop */
buffer = cache->SquareDark;
if( Army == WHITE ) bitBlt( TQT_TQPAINTDEVICE(&buffer), 0, 0, TQT_TQPAINTDEVICE(&cache->WhiteBishop), 0, 0, -1, -1, TQt::CopyROP, FALSE);
else bitBlt( TQT_TQPAINTDEVICE(&buffer), 0, 0, TQT_TQPAINTDEVICE(&cache->BlackBishop), 0, 0, -1, -1, TQt::CopyROP, FALSE);
if( Army == WHITE ) bitBlt( &buffer, 0, 0, &cache->WhiteBishop, 0, 0, -1, -1, TQt::CopyROP, FALSE);
else bitBlt( &buffer, 0, 0, &cache->BlackBishop, 0, 0, -1, -1, TQt::CopyROP, FALSE);
Bishop->setPixmap( buffer );
Bishop->show();
/* Knight */
buffer = cache->SquareDark;
if( Army == WHITE ) bitBlt( TQT_TQPAINTDEVICE(&buffer), 0, 0, TQT_TQPAINTDEVICE(&cache->WhiteKnight), 0, 0, -1, -1, TQt::CopyROP, FALSE);
else bitBlt( TQT_TQPAINTDEVICE(&buffer), 0, 0, TQT_TQPAINTDEVICE(&cache->BlackKnight), 0, 0, -1, -1, TQt::CopyROP, FALSE);
if( Army == WHITE ) bitBlt( &buffer, 0, 0, &cache->WhiteKnight, 0, 0, -1, -1, TQt::CopyROP, FALSE);
else bitBlt( &buffer, 0, 0, &cache->BlackKnight, 0, 0, -1, -1, TQt::CopyROP, FALSE);
Knight->setPixmap( buffer );
Knight->show();
/* Rook */
buffer = cache->SquareLight;
if( Army == WHITE ) bitBlt( TQT_TQPAINTDEVICE(&buffer), 0, 0, TQT_TQPAINTDEVICE(&cache->WhiteRook), 0, 0, -1, -1, TQt::CopyROP, FALSE);
else bitBlt( TQT_TQPAINTDEVICE(&buffer), 0, 0, TQT_TQPAINTDEVICE(&cache->BlackRook), 0, 0, -1, -1, TQt::CopyROP, FALSE);
if( Army == WHITE ) bitBlt( &buffer, 0, 0, &cache->WhiteRook, 0, 0, -1, -1, TQt::CopyROP, FALSE);
else bitBlt( &buffer, 0, 0, &cache->BlackRook, 0, 0, -1, -1, TQt::CopyROP, FALSE);
Rook->setPixmap( buffer );
Rook->show();

@ -732,7 +732,7 @@ bool pgn::open( const TQString &URL )
close();
return FALSE;
}
Input.setDevice( TQT_TQIODEVICE(&File) );
Input.setDevice( &File );
CurrentURL = URL;
File.at(0);
return TRUE;

Loading…
Cancel
Save