mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-17 18:12:01 +01:00
revert change to board_invalRect
This commit is contained in:
parent
4c937beb2d
commit
67be3191c8
3 changed files with 15 additions and 17 deletions
|
@ -1286,24 +1286,17 @@ invalCellsUnderRect( BoardCtxt* board, XP_Rect* rect, XP_Bool doMirror )
|
||||||
} /* invalCellsUnderRect */
|
} /* invalCellsUnderRect */
|
||||||
|
|
||||||
void
|
void
|
||||||
board_invalRect( BoardCtxt* board, XP_U16 left, XP_U16 top,
|
board_invalRect( BoardCtxt* board, XP_Rect* rect )
|
||||||
XP_U16 right, XP_U16 bottom )
|
|
||||||
{
|
{
|
||||||
XP_Rect rect;
|
if ( rectsIntersect( rect, &board->boardBounds ) ) {
|
||||||
rect.left = left;
|
invalCellsUnderRect( board, rect, XP_FALSE );
|
||||||
rect.top = top;
|
|
||||||
rect.width = right - left;
|
|
||||||
rect.height = bottom - top;
|
|
||||||
|
|
||||||
if ( rectsIntersect( &rect, &board->boardBounds ) ) {
|
|
||||||
invalCellsUnderRect( board, &rect, XP_FALSE );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( rectsIntersect( &rect, &board->trayBounds ) ) {
|
if ( rectsIntersect( rect, &board->trayBounds ) ) {
|
||||||
invalTilesUnderRect( board, &rect );
|
invalTilesUnderRect( board, rect );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( rectsIntersect( &rect, &board->scoreBdBounds ) ) {
|
if ( rectsIntersect( rect, &board->scoreBdBounds ) ) {
|
||||||
board->scoreBoardInvalid = XP_TRUE;
|
board->scoreBoardInvalid = XP_TRUE;
|
||||||
}
|
}
|
||||||
} /* board_invalRect */
|
} /* board_invalRect */
|
||||||
|
|
|
@ -93,8 +93,7 @@ void board_setTimerLoc( BoardCtxt* board,
|
||||||
XP_U16 timerLeft, XP_U16 timerTop,
|
XP_U16 timerLeft, XP_U16 timerTop,
|
||||||
XP_U16 timerWidth, XP_U16 timerHeight );
|
XP_U16 timerWidth, XP_U16 timerHeight );
|
||||||
void board_invalAll( BoardCtxt* board );
|
void board_invalAll( BoardCtxt* board );
|
||||||
void board_invalRect( BoardCtxt* board, XP_U16 left, XP_U16 top,
|
void board_invalRect( BoardCtxt* board, XP_Rect* rect );
|
||||||
XP_U16 right, XP_U16 bottom );
|
|
||||||
|
|
||||||
XP_Bool board_draw( BoardCtxt* board );
|
XP_Bool board_draw( BoardCtxt* board );
|
||||||
|
|
||||||
|
|
|
@ -177,8 +177,14 @@ void CXWordsAppView::Draw( const TRect& aRect ) const
|
||||||
gc.Clear( aRect );
|
gc.Clear( aRect );
|
||||||
|
|
||||||
if ( iGame.board ) {
|
if ( iGame.board ) {
|
||||||
board_invalRect( iGame.board, aRect.iTl.iX, aRect.iTl.iY,
|
XP_Rect rect;
|
||||||
aRect.iBr.iX, aRect.iBr.iY );
|
|
||||||
|
rect.left = aRect.iTl.iX;
|
||||||
|
rect.top = aRect.iTl.iY;
|
||||||
|
rect.width = aRect.Width();
|
||||||
|
rect.height = aRect.Height();
|
||||||
|
|
||||||
|
board_invalRect( iGame.board, &rect );
|
||||||
board_draw( iGame.board );
|
board_draw( iGame.board );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue