mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-30 10:26:58 +01:00
use number of bits based on stream version not current build --
required in case new code is talking with old in networked game.
This commit is contained in:
parent
f9c3a95603
commit
37e81fd062
1 changed files with 10 additions and 1 deletions
|
@ -496,10 +496,19 @@ gi_writeToStream( XWStreamCtxt* stream, const CurGameInfo* gi )
|
||||||
const LocalPlayer* pl;
|
const LocalPlayer* pl;
|
||||||
XP_U16 ii;
|
XP_U16 ii;
|
||||||
|
|
||||||
|
#ifdef STREAM_VERS_BIGBOARD
|
||||||
|
XP_U16 strVersion = stream_getVersion( stream );
|
||||||
|
XP_ASSERT( STREAM_SAVE_PREVWORDS <= strVersion );
|
||||||
|
XP_U16 nColsNBits = STREAM_VERS_BIGBOARD > strVersion ? 4 : NUMCOLS_NBITS;
|
||||||
|
#else
|
||||||
|
XP_U16 nColsNBits = NUMCOLS_NBITS;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
stringToStream( stream, gi->dictName );
|
stringToStream( stream, gi->dictName );
|
||||||
|
|
||||||
stream_putBits( stream, NPLAYERS_NBITS, gi->nPlayers );
|
stream_putBits( stream, NPLAYERS_NBITS, gi->nPlayers );
|
||||||
stream_putBits( stream, NUMCOLS_NBITS, gi->boardSize );
|
stream_putBits( stream, nColsNBits, gi->boardSize );
|
||||||
stream_putBits( stream, 2, gi->serverRole );
|
stream_putBits( stream, 2, gi->serverRole );
|
||||||
stream_putBits( stream, 1, gi->hintsNotAllowed );
|
stream_putBits( stream, 1, gi->hintsNotAllowed );
|
||||||
stream_putBits( stream, 2, gi->phoniesAction );
|
stream_putBits( stream, 2, gi->phoniesAction );
|
||||||
|
|
Loading…
Reference in a new issue