mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-05 20:45:49 +01:00
add some consts
This commit is contained in:
parent
2638533e6f
commit
4106765d53
2 changed files with 12 additions and 15 deletions
|
@ -1,6 +1,6 @@
|
||||||
/* -*- compile-command: "cd ../linux && make -j3 MEMDEBUG=TRUE"; -*- */
|
/* -*- compile-command: "cd ../linux && make -j3 MEMDEBUG=TRUE"; -*- */
|
||||||
/*
|
/*
|
||||||
* Copyright 2000 - 2017 by Eric House (xwords@eehouse.org). All rights
|
* Copyright 2000 - 2022 by Eric House (xwords@eehouse.org). All rights
|
||||||
* reserved.
|
* reserved.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
|
@ -1124,17 +1124,16 @@ model_undoLatestMoves( ModelCtxt* model, XWEnv xwe, PoolContext* pool,
|
||||||
} /* model_undoLatestMoves */
|
} /* model_undoLatestMoves */
|
||||||
|
|
||||||
void
|
void
|
||||||
model_trayToStream( ModelCtxt* model, XP_S16 turn, XWStreamCtxt* stream )
|
model_trayToStream( const ModelCtxt* model, XP_S16 turn, XWStreamCtxt* stream )
|
||||||
{
|
{
|
||||||
PlayerCtxt* player;
|
|
||||||
XP_ASSERT( turn >= 0 );
|
XP_ASSERT( turn >= 0 );
|
||||||
player = &model->players[turn];
|
const PlayerCtxt* player = &model->players[turn];
|
||||||
|
|
||||||
traySetToStream( stream, &player->trayTiles );
|
traySetToStream( stream, &player->trayTiles );
|
||||||
} /* model_trayToStream */
|
} /* model_trayToStream */
|
||||||
|
|
||||||
void
|
void
|
||||||
model_currentMoveToMoveInfo( ModelCtxt* model, XP_S16 turn,
|
model_currentMoveToMoveInfo( const ModelCtxt* model, XP_S16 turn,
|
||||||
MoveInfo* moveInfo )
|
MoveInfo* moveInfo )
|
||||||
{
|
{
|
||||||
XP_ASSERT( turn >= 0 );
|
XP_ASSERT( turn >= 0 );
|
||||||
|
@ -1178,7 +1177,7 @@ model_currentMoveToMoveInfo( ModelCtxt* model, XP_S16 turn,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
model_currentMoveToStream( ModelCtxt* model, XP_S16 turn,
|
model_currentMoveToStream( const ModelCtxt* model, XP_S16 turn,
|
||||||
XWStreamCtxt* stream )
|
XWStreamCtxt* stream )
|
||||||
{
|
{
|
||||||
#ifdef STREAM_VERS_BIGBOARD
|
#ifdef STREAM_VERS_BIGBOARD
|
||||||
|
@ -1431,22 +1430,20 @@ model_getCurrentMoveIsVertical( const ModelCtxt* model, XP_S16 turn,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
model_getCurrentMoveTile( ModelCtxt* model, XP_S16 turn, XP_S16* index,
|
model_getCurrentMoveTile( const ModelCtxt* model, XP_S16 turn, XP_S16* index,
|
||||||
Tile* tile, XP_U16* col, XP_U16* row,
|
Tile* tile, XP_U16* col, XP_U16* row,
|
||||||
XP_Bool* isBlank )
|
XP_Bool* isBlank )
|
||||||
{
|
{
|
||||||
PlayerCtxt* player;
|
|
||||||
PendingTile* pt;
|
|
||||||
XP_ASSERT( turn >= 0 );
|
XP_ASSERT( turn >= 0 );
|
||||||
|
|
||||||
player = &model->players[turn];
|
const PlayerCtxt* player = &model->players[turn];
|
||||||
XP_ASSERT( *index < player->nPending );
|
XP_ASSERT( *index < player->nPending );
|
||||||
|
|
||||||
if ( *index < 0 ) {
|
if ( *index < 0 ) {
|
||||||
*index = player->nPending - 1;
|
*index = player->nPending - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
pt = &player->pendingTiles[*index];
|
const PendingTile* pt = &player->pendingTiles[*index];
|
||||||
|
|
||||||
*col = pt->col;
|
*col = pt->col;
|
||||||
*row = pt->row;
|
*row = pt->row;
|
||||||
|
|
|
@ -166,7 +166,7 @@ XP_U16 model_getCurrentMoveCount( const ModelCtxt* model, XP_S16 turn );
|
||||||
XP_Bool model_getCurrentMoveIsVertical( const ModelCtxt* model, XP_S16 turn,
|
XP_Bool model_getCurrentMoveIsVertical( const ModelCtxt* model, XP_S16 turn,
|
||||||
XP_Bool* isHorizontal );
|
XP_Bool* isHorizontal );
|
||||||
|
|
||||||
void model_getCurrentMoveTile( ModelCtxt* model, XP_S16 turn, XP_S16* index,
|
void model_getCurrentMoveTile( const ModelCtxt* model, XP_S16 turn, XP_S16* index,
|
||||||
Tile* tile, XP_U16* col, XP_U16* row,
|
Tile* tile, XP_U16* col, XP_U16* row,
|
||||||
XP_Bool* isBlank );
|
XP_Bool* isBlank );
|
||||||
|
|
||||||
|
@ -193,11 +193,11 @@ XP_Bool model_undoLatestMoves( ModelCtxt* model, XWEnv xwe, PoolContext* pool,
|
||||||
void model_rejectPreviousMove( ModelCtxt* model, XWEnv xwe,
|
void model_rejectPreviousMove( ModelCtxt* model, XWEnv xwe,
|
||||||
PoolContext* pool, XP_U16* turn );
|
PoolContext* pool, XP_U16* turn );
|
||||||
|
|
||||||
void model_trayToStream( ModelCtxt* model, XP_S16 turn,
|
void model_trayToStream( const ModelCtxt* model, XP_S16 turn,
|
||||||
XWStreamCtxt* stream );
|
XWStreamCtxt* stream );
|
||||||
void model_currentMoveToStream( ModelCtxt* model, XP_S16 turn,
|
void model_currentMoveToStream( const ModelCtxt* model, XP_S16 turn,
|
||||||
XWStreamCtxt* stream );
|
XWStreamCtxt* stream );
|
||||||
void model_currentMoveToMoveInfo( ModelCtxt* model, XP_S16 turn,
|
void model_currentMoveToMoveInfo( const ModelCtxt* model, XP_S16 turn,
|
||||||
MoveInfo* moveInfo );
|
MoveInfo* moveInfo );
|
||||||
XP_Bool model_makeTurnFromStream( ModelCtxt* model, XWEnv xwe, XP_U16 playerNum,
|
XP_Bool model_makeTurnFromStream( ModelCtxt* model, XWEnv xwe, XP_U16 playerNum,
|
||||||
XWStreamCtxt* stream );
|
XWStreamCtxt* stream );
|
||||||
|
|
Loading…
Add table
Reference in a new issue