board_invalRect params change

This commit is contained in:
ehouse 2005-01-23 06:14:07 +00:00
parent c6db2aa8b9
commit 9edb556ded
2 changed files with 15 additions and 7 deletions

View file

@ -1286,17 +1286,24 @@ invalCellsUnderRect( BoardCtxt* board, XP_Rect* rect, XP_Bool doMirror )
} /* invalCellsUnderRect */
void
board_invalRect( BoardCtxt* board, XP_Rect* rect )
board_invalRect( BoardCtxt* board, XP_U16 left, XP_U16 top,
XP_U16 right, XP_U16 bottom )
{
if ( rectsIntersect( rect, &board->boardBounds ) ) {
invalCellsUnderRect( board, rect, XP_FALSE );
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->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,7 +93,8 @@ 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_Rect* rect );
void board_invalRect( BoardCtxt* board, XP_U16 left, XP_U16 top,
XP_U16 right, XP_U16 bottom );
XP_Bool board_draw( BoardCtxt* board );