From dd9298e95f9eee105c5e1a8521601ca9d41505ac Mon Sep 17 00:00:00 2001 From: ehouse Date: Tue, 14 Feb 2006 04:53:45 +0000 Subject: [PATCH] make remDim 16-bit so doesn't overflow on large-screened devices --- xwords4/common/board.c | 5 ++--- xwords4/common/boardp.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/xwords4/common/board.c b/xwords4/common/board.c index 50e5df156..c9c2ed391 100644 --- a/xwords4/common/board.c +++ b/xwords4/common/board.c @@ -1230,9 +1230,8 @@ drawScoreBoard( BoardCtxt* board ) *adjustPt += remDim; } - XP_ASSERT( remDim <= 0x00FF ); - board->remDim = (XP_U8)remDim; /* save now so register can be - reused */ + board->remDim = remDim; /* save now so register can be reused */ + for ( dp = datum, i = 0; i < nPlayers; ++dp, ++i ) { XP_Rect innerRect; XP_U16 dim = isVertical? dp->height:dp->width; diff --git a/xwords4/common/boardp.h b/xwords4/common/boardp.h index 74ee2eacf..2502c1c05 100644 --- a/xwords4/common/boardp.h +++ b/xwords4/common/boardp.h @@ -131,12 +131,12 @@ struct BoardCtxt { XP_Rect scoreBdBounds; XP_Rect timerBounds; XP_U8 selPlayer; /* which player is selected (!= turn) */ - XP_U8 remDim; /* width (or ht) of the "rem:" string in scoreboard */ /* tray state */ XP_U8 trayScaleH; XP_U8 trayScaleV; XP_Rect trayBounds; + XP_U16 remDim; /* width (or ht) of the "rem:" string in scoreboard */ XP_U8 dividerWidth; /* 0 would mean invisible */ XP_Bool dividerInvalid;