From 340642d8a50e5dcc1e3e85cc5e9da23aee1b24c0 Mon Sep 17 00:00:00 2001 From: ehouse Date: Sun, 23 Jan 2005 08:17:37 +0000 Subject: [PATCH] revert change to board_invalRect --- common/board.c | 19 ++++++------------- common/board.h | 3 +-- symbian/src/xwappview.cpp | 10 ++++++++-- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/common/board.c b/common/board.c index d120ec8f1..a3828d724 100644 --- a/common/board.c +++ b/common/board.c @@ -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 */ diff --git a/common/board.h b/common/board.h index 56785a24c..403276dc2 100644 --- a/common/board.h +++ b/common/board.h @@ -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 ); diff --git a/symbian/src/xwappview.cpp b/symbian/src/xwappview.cpp index f4f363709..0d1dac8ac 100644 --- a/symbian/src/xwappview.cpp +++ b/symbian/src/xwappview.cpp @@ -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 ); }