diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-12-03 00:34:57 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-12-03 15:09:15 +0900 |
commit | dd25da6a2bbb2e936cdbf3e472fa9cac4ac42821 (patch) | |
tree | 2126437cf4983bfdf6b5a68d2b290df066980784 | |
parent | 1de2f35b63d82901fd64e1a10a29bc8356656856 (diff) | |
download | knights-dd25da6a2bbb2e936cdbf3e472fa9cac4ac42821.tar.gz knights-dd25da6a2bbb2e936cdbf3e472fa9cac4ac42821.zip |
Replaced various '#define' with actual strings - part 5
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-rw-r--r-- | knights/board_2d.cpp | 26 | ||||
-rw-r--r-- | knights/dlg_promote.cpp | 16 | ||||
-rw-r--r-- | knights/pgn.cpp | 2 |
3 files changed, 22 insertions, 22 deletions
diff --git a/knights/board_2d.cpp b/knights/board_2d.cpp index cf3afdc..d16236a 100644 --- a/knights/board_2d.cpp +++ b/knights/board_2d.cpp @@ -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; } diff --git a/knights/dlg_promote.cpp b/knights/dlg_promote.cpp index 15b1970..23a930d 100644 --- a/knights/dlg_promote.cpp +++ b/knights/dlg_promote.cpp @@ -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(); diff --git a/knights/pgn.cpp b/knights/pgn.cpp index 4dc14f5..b0355c7 100644 --- a/knights/pgn.cpp +++ b/knights/pgn.cpp @@ -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; |