mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-15 15:41:24 +01:00
increase bits stored for yOffset to 4 in case whole thing scrolled.
This commit is contained in:
parent
f93151af2f
commit
3db30a2995
2 changed files with 5 additions and 4 deletions
|
@ -198,8 +198,8 @@ board_makeFromStream( MPFORMAL XWStreamCtxt* stream, ModelCtxt* model,
|
|||
|
||||
board = board_make( MPPARM(mpool) model, server, draw, util );
|
||||
|
||||
/* This won't be enough for 'doze case: square with the SIP visible */
|
||||
board->yOffset = (XP_U16)stream_getBits( stream, 2 );
|
||||
board->yOffset = (XP_U16)
|
||||
stream_getBits( stream, (version < STREAM_VERS_4YOFFSET) ? 2 : 4 );
|
||||
board->isFlipped = (XP_Bool)stream_getBits( stream, 1 );
|
||||
board->gameOver = (XP_Bool)stream_getBits( stream, 1 );
|
||||
board->showColors = (XP_Bool)stream_getBits( stream, 1 );
|
||||
|
@ -264,7 +264,7 @@ board_writeToStream( BoardCtxt* board, XWStreamCtxt* stream )
|
|||
{
|
||||
XP_U16 nPlayers, i;
|
||||
|
||||
stream_putBits( stream, 2, board->yOffset );
|
||||
stream_putBits( stream, 4, board->yOffset );
|
||||
stream_putBits( stream, 1, board->isFlipped );
|
||||
stream_putBits( stream, 1, board->gameOver );
|
||||
stream_putBits( stream, 1, board->showColors );
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define STREAM_VERS_4YOFFSET 0x0A /* 4 bits for yOffset on board */
|
||||
#define STREAM_VERS_CHANNELSEED 0x09 /* new short in relay connect must be
|
||||
saved in comms */
|
||||
#define STREAM_VERS_UTF8 0x08
|
||||
|
@ -43,7 +44,7 @@ extern "C" {
|
|||
#define STREAM_VERS_41B4 0x02
|
||||
#define STREAM_VERS_405 0x01
|
||||
|
||||
#define CUR_STREAM_VERS STREAM_VERS_CHANNELSEED
|
||||
#define CUR_STREAM_VERS STREAM_VERS_4YOFFSET
|
||||
|
||||
typedef struct LocalPlayer {
|
||||
XP_UCHAR* name;
|
||||
|
|
Loading…
Reference in a new issue