revert change to board_invalRect

This commit is contained in:
ehouse 2005-01-23 08:17:37 +00:00
parent c87132b416
commit 340642d8a5
3 changed files with 15 additions and 17 deletions

View file

@ -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 */

View file

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

View file

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