mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-30 08:34:16 +01:00
Post-Slovak change, 7 bits required to save face and blank bit. Use 7, but expect the old 6 for previous version streams.
This commit is contained in:
parent
53765169be
commit
06e6d4a903
1 changed files with 7 additions and 3 deletions
|
@ -24,6 +24,7 @@
|
|||
#include "xwstream.h"
|
||||
#include "util.h"
|
||||
#include "pool.h"
|
||||
#include "game.h"
|
||||
#include "memstream.h"
|
||||
#include "strutils.h"
|
||||
#include "LocalizedStrIncludes.h"
|
||||
|
@ -1733,9 +1734,12 @@ loadPlayerCtxt( XWStreamCtxt* stream, PlayerCtxt* pc )
|
|||
|
||||
for ( i = 0; i < pc->nPending; ++i ) {
|
||||
PendingTile* pt = &pc->pendingTiles[i];
|
||||
XP_U16 nBits;
|
||||
pt->col = (XP_U8)stream_getBits( stream, NUMCOLS_NBITS );
|
||||
pt->row = (XP_U8)stream_getBits( stream, NUMCOLS_NBITS );
|
||||
pt->tile = (Tile)stream_getBits( stream, 6 );
|
||||
|
||||
nBits = (stream_getVersion( stream ) <= STREAM_VERS_RELAY) ? 6 : 7;
|
||||
pt->tile = (Tile)stream_getBits( stream, nBits );
|
||||
}
|
||||
|
||||
} /* loadPlayerCtxt */
|
||||
|
@ -1755,10 +1759,10 @@ writePlayerCtxt( XWStreamCtxt* stream, PlayerCtxt* pc )
|
|||
PendingTile* pt = &pc->pendingTiles[i];
|
||||
stream_putBits( stream, NUMCOLS_NBITS, pt->col );
|
||||
stream_putBits( stream, NUMCOLS_NBITS, pt->row );
|
||||
stream_putBits( stream, 6, pt->tile );
|
||||
stream_putBits( stream, 7, pt->tile );
|
||||
}
|
||||
|
||||
} /* loadPlayerCtxt */
|
||||
} /* writePlayerCtxt */
|
||||
|
||||
#ifdef CPLUS
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue