mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-15 15:41:24 +01:00
add another const
This commit is contained in:
parent
897e50bf42
commit
7850b9e064
1 changed files with 8 additions and 4 deletions
|
@ -1,6 +1,7 @@
|
||||||
/* -*-mode: C; fill-column: 78; c-basic-offset: 4; -*- */
|
/* -*-mode: C; fill-column: 78; c-basic-offset: 4; -*- */
|
||||||
/*
|
/*
|
||||||
* Copyright 2001 by Eric House (xwords@eehouse.org). All rights reserved.
|
* Copyright 2001, 2006 by Eric House (xwords@eehouse.org). All rights
|
||||||
|
* reserved.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -115,7 +116,7 @@ stack_writeToStream( StackCtxt* stack, XWStreamCtxt* stream )
|
||||||
} /* stack_writeToStream */
|
} /* stack_writeToStream */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pushEntry( StackCtxt* stack, StackEntry* entry )
|
pushEntry( StackCtxt* stack, const StackEntry* entry )
|
||||||
{
|
{
|
||||||
XP_U16 i;
|
XP_U16 i;
|
||||||
XWStreamPos oldLoc;
|
XWStreamPos oldLoc;
|
||||||
|
@ -143,7 +144,8 @@ pushEntry( StackCtxt* stack, StackEntry* entry )
|
||||||
for ( i = 0; i < nTiles; ++i ) {
|
for ( i = 0; i < nTiles; ++i ) {
|
||||||
stream_putBits( stream, 5,
|
stream_putBits( stream, 5,
|
||||||
entry->u.move.moveInfo.tiles[i].varCoord );
|
entry->u.move.moveInfo.tiles[i].varCoord );
|
||||||
stream_putBits( stream, 6, entry->u.move.moveInfo.tiles[i].tile );
|
stream_putBits( stream, TILE_NBITS+1, /* 1 for blank */
|
||||||
|
entry->u.move.moveInfo.tiles[i].tile );
|
||||||
}
|
}
|
||||||
if ( entry->moveType == MOVE_TYPE ) {
|
if ( entry->moveType == MOVE_TYPE ) {
|
||||||
traySetToStream( stream, &entry->u.move.newTiles );
|
traySetToStream( stream, &entry->u.move.newTiles );
|
||||||
|
@ -190,8 +192,10 @@ readEntry( StackCtxt* stack, StackEntry* entry )
|
||||||
for ( i = 0; i < nTiles; ++i ) {
|
for ( i = 0; i < nTiles; ++i ) {
|
||||||
entry->u.move.moveInfo.tiles[i].varCoord =
|
entry->u.move.moveInfo.tiles[i].varCoord =
|
||||||
(XP_U8)stream_getBits(stream, 5);
|
(XP_U8)stream_getBits(stream, 5);
|
||||||
|
/* PENDING: this is changing from 6 to 7. Need to detect old
|
||||||
|
version and be able to open it!!! */
|
||||||
entry->u.move.moveInfo.tiles[i].tile =
|
entry->u.move.moveInfo.tiles[i].tile =
|
||||||
(Tile)stream_getBits( stream, 6 );
|
(Tile)stream_getBits( stream, TILE_NBITS + 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( entry->moveType == MOVE_TYPE ) {
|
if ( entry->moveType == MOVE_TYPE ) {
|
||||||
|
|
Loading…
Reference in a new issue