|
|
|
@ -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;
|
|
|
|
|
}
|
|
|
|
|