mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-03 23:04:08 +01:00
add compile-time option for forcing square board
Disabled. Needed it for a test.
This commit is contained in:
parent
ae25c6e014
commit
baf549189c
1 changed files with 19 additions and 2 deletions
|
@ -447,10 +447,13 @@ printDims( const BoardDims* dimsp )
|
|||
# define printDims( ldims )
|
||||
# endif
|
||||
|
||||
/* For debugging the special case of square board */
|
||||
// #define FORCE_SQUARE
|
||||
|
||||
void
|
||||
board_figureLayout( BoardCtxt* board, const CurGameInfo* gi,
|
||||
XP_U16 bLeft, XP_U16 bTop,
|
||||
const XP_U16 bWidth, const XP_U16 bHeight,
|
||||
XP_U16 bWidth, XP_U16 bHeight,
|
||||
XP_U16 colPctMax, XP_U16 scorePct, XP_U16 trayPct,
|
||||
XP_U16 scoreWidth, XP_U16 fontWidth, XP_U16 fontHt,
|
||||
XP_Bool squareTiles, BoardDims* dimsp )
|
||||
|
@ -465,6 +468,14 @@ board_figureLayout( BoardCtxt* board, const CurGameInfo* gi,
|
|||
XP_U16 wantHt;
|
||||
XP_U16 nToScroll;
|
||||
|
||||
#ifdef FORCE_SQUARE
|
||||
if ( bWidth > bHeight ) {
|
||||
bWidth = bHeight;
|
||||
} else {
|
||||
bHeight = bWidth;
|
||||
}
|
||||
#endif
|
||||
|
||||
ldims.left = bLeft;
|
||||
ldims.top = bTop;
|
||||
ldims.width = bWidth;
|
||||
|
@ -552,7 +563,13 @@ board_figureLayout( BoardCtxt* board, const CurGameInfo* gi,
|
|||
|
||||
ldims.boardHt = cellSize * nCells;
|
||||
ldims.trayTop = ldims.top + scoreHt + (cellSize * (nCells-nToScroll));
|
||||
ldims.height = heightUsed;
|
||||
ldims.height =
|
||||
#ifdef FORCE_SQUARE
|
||||
ldims.width
|
||||
#else
|
||||
heightUsed
|
||||
#endif
|
||||
;
|
||||
ldims.cellSize = cellSize;
|
||||
|
||||
if ( gi->timerEnabled ) {
|
||||
|
|
Loading…
Reference in a new issue