make rectContainsPt params signed to avoid errors on palm

This commit is contained in:
ehouse 2004-03-02 05:58:15 +00:00
parent 3bc2feb47e
commit 508d98d8e0
2 changed files with 4 additions and 4 deletions

View file

@ -2373,7 +2373,7 @@ rectContainsRect( XP_Rect* rect1, XP_Rect* rect2 )
} /* rectContainsRect */ } /* rectContainsRect */
XP_Bool XP_Bool
rectContainsPt( XP_Rect* rect, XP_U16 x, XP_U16 y ) rectContainsPt( XP_Rect* rect, XP_S16 x, XP_S16 y )
{ {
/* 7/4 Made <= into <, etc., because a tap on the right boundary of the /* 7/4 Made <= into <, etc., because a tap on the right boundary of the
board was still mapped onto the board but dividing by scale put it in board was still mapped onto the board but dividing by scale put it in
@ -2382,8 +2382,8 @@ rectContainsPt( XP_Rect* rect, XP_U16 x, XP_U16 y )
out-of-bounds col/row to the nearest possible. */ out-of-bounds col/row to the nearest possible. */
return ( rect->top <= y return ( rect->top <= y
&& rect->left <= x && rect->left <= x
&& rect->top + rect->height >= y && (rect->top + rect->height) >= y
&& rect->left + rect->width >= x ); && (rect->left + rect->width) >= x );
} /* rectContainsPt */ } /* rectContainsPt */
XP_Bool XP_Bool

View file

@ -176,7 +176,7 @@ XP_Bool continueDividerDrag( BoardCtxt* board, XP_U16 x, XP_U16 y );
XP_Bool endDividerDrag( BoardCtxt* board, XP_U16 x, XP_U16 y ); XP_Bool endDividerDrag( BoardCtxt* board, XP_U16 x, XP_U16 y );
XP_Bool moveTileToArrowLoc( BoardCtxt* board, XP_U8 index ); XP_Bool moveTileToArrowLoc( BoardCtxt* board, XP_U8 index );
XP_U16 indexForBits( XP_U8 bits ); XP_U16 indexForBits( XP_U8 bits );
XP_Bool rectContainsPt( XP_Rect* rect1, XP_U16 x, XP_U16 y ); XP_Bool rectContainsPt( XP_Rect* rect1, XP_S16 x, XP_S16 y );
XP_Bool checkRevealTray( BoardCtxt* board ); XP_Bool checkRevealTray( BoardCtxt* board );
void invalTilesUnderRect( BoardCtxt* board, XP_Rect* rect ); void invalTilesUnderRect( BoardCtxt* board, XP_Rect* rect );
XP_Bool rectsIntersect( XP_Rect* rect1, XP_Rect* rect2 ); XP_Bool rectsIntersect( XP_Rect* rect1, XP_Rect* rect2 );