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