mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-16 15:41:16 +01:00
add uninited state so can reload dialog with no assumptions about platform
widget state.
This commit is contained in:
parent
912fe93829
commit
5f6cab4c5f
2 changed files with 13 additions and 3 deletions
|
@ -95,11 +95,18 @@ newg_load( NewGameCtx* ngc, const CurGameInfo* gi )
|
|||
void* closure = ngc->closure;
|
||||
NGValue value;
|
||||
XP_U16 nPlayers, nShown;
|
||||
XP_S16 i;
|
||||
XP_S16 i, j;
|
||||
Connectedness role;
|
||||
XP_Bool localOnly;
|
||||
XP_Bool shown[MAX_NUM_PLAYERS] = { XP_FALSE, XP_FALSE, XP_FALSE, XP_FALSE};
|
||||
|
||||
ngc->juggleEnabled = NGEnable_UNSET;
|
||||
for ( i = 0; i < NG_NUM_COLS; ++i ) {
|
||||
for ( j = 0; j < MAX_NUM_PLAYERS; ++j ) {
|
||||
ngc->enabled[i][j] = NGEnable_UNSET;
|
||||
}
|
||||
}
|
||||
|
||||
ngc->role = role = gi->serverRole;
|
||||
localOnly = role == SERVER_ISCLIENT && ngc->isNewGame;
|
||||
#ifndef XWFEATURE_STANDALONE_ONLY
|
||||
|
@ -257,6 +264,8 @@ newg_juggle( NewGameCtx* ngc )
|
|||
{
|
||||
XP_Bool changed = XP_FALSE;
|
||||
XP_U16 nPlayers = ngc->nPlayers;
|
||||
|
||||
XP_ASSERT( ngc->isNewGame );
|
||||
|
||||
if ( nPlayers > 1 ) {
|
||||
LocalPlayer tmpPlayers[MAX_NUM_PLAYERS];
|
||||
|
@ -417,7 +426,7 @@ setRoleStrings( NewGameCtx* ngc )
|
|||
|
||||
if ( 0 ) {
|
||||
#ifndef XWFEATURE_STANDALONE_ONLY
|
||||
} else if ( ngc->role == SERVER_ISCLIENT && ngc->isNewGame ) {
|
||||
} else if ( ngc->role == SERVER_ISCLIENT && !ngc->isNewGame ) {
|
||||
strID = STR_LOCALPLAYERS;
|
||||
#endif
|
||||
} else {
|
||||
|
|
|
@ -60,7 +60,8 @@ typedef enum {
|
|||
,NG_ATTR_CANJUGGLE
|
||||
} NewGameAttr;
|
||||
|
||||
typedef enum { NGEnableHidden,
|
||||
typedef enum { NGEnable_UNSET, /* internal use only */
|
||||
NGEnableHidden,
|
||||
NGEnableDisabled,
|
||||
NGEnableEnabled
|
||||
} NewGameEnable;
|
||||
|
|
Loading…
Reference in a new issue