diff --git a/xwords4/common/game.c b/xwords4/common/game.c index 698c64f65..fc900dc85 100644 --- a/xwords4/common/game.c +++ b/xwords4/common/game.c @@ -375,7 +375,7 @@ gi_readFromStream( MPFORMAL XWStreamCtxt* stream, CurGameInfo* gi ) gi->nPlayers = (XP_U8)stream_getBits( stream, NPLAYERS_NBITS ); gi->boardSize = (XP_U8)stream_getBits( stream, 4 ); - gi->serverRole = (Connectedness)stream_getBits( stream, 2 ); + gi->serverRole = (DeviceRole)stream_getBits( stream, 2 ); gi->hintsNotAllowed = stream_getBits( stream, 1 ); gi->robotSmartness = (XP_U8)stream_getBits( stream, 2 ); gi->phoniesAction = (XWPhoniesChoice)stream_getBits( stream, 2 ); diff --git a/xwords4/common/game.h b/xwords4/common/game.h index df7c349fa..903b73543 100644 --- a/xwords4/common/game.h +++ b/xwords4/common/game.h @@ -59,7 +59,7 @@ typedef struct CurGameInfo { XP_U16 gameSeconds; /* for timer */ XP_U8 nPlayers; XP_U8 boardSize; - Connectedness serverRole; + DeviceRole serverRole; XP_Bool hintsNotAllowed; XP_Bool timerEnabled; diff --git a/xwords4/common/nwgamest.c b/xwords4/common/nwgamest.c index 6790dd9bd..5654cabae 100644 --- a/xwords4/common/nwgamest.c +++ b/xwords4/common/nwgamest.c @@ -44,7 +44,7 @@ struct NewGameCtx { XP_U16 nPlayersShown; /* real nPlayers lives in gi */ XP_U16 nPlayersTotal; /* used only until changedNPlayers set */ XP_U16 nLocalPlayers; - Connectedness role; + DeviceRole role; XP_Bool isNewGame; XP_Bool changedNPlayers; XP_TriEnable juggleEnabled; @@ -57,7 +57,7 @@ static void enableOne( NewGameCtx* ngc, XP_U16 player, NewGameColumn col, static void adjustAllRows( NewGameCtx* ngc, XP_Bool force ); static void adjustOneRow( NewGameCtx* ngc, XP_U16 player, XP_Bool force ); static void setRoleStrings( NewGameCtx* ngc ); -static void changeRole( NewGameCtx* ngc, Connectedness role ); +static void changeRole( NewGameCtx* ngc, DeviceRole role ); static void considerEnableJuggle( NewGameCtx* ngc ); static void storePlayer( NewGameCtx* ngc, XP_U16 player, LocalPlayer* lp ); static void loadPlayer( NewGameCtx* ngc, XP_U16 player, @@ -100,7 +100,7 @@ newg_load( NewGameCtx* ngc, const CurGameInfo* gi ) NGValue value; XP_U16 nPlayers, nLoaded; XP_S16 ii, jj; - Connectedness role; + DeviceRole role; XP_Bool localOnly; XP_Bool shown[MAX_NUM_PLAYERS] = { XP_FALSE, XP_FALSE, XP_FALSE, XP_FALSE}; @@ -346,7 +346,7 @@ adjustOneRow( NewGameCtx* ngc, XP_U16 player, XP_Bool force ) NewGameColumn col; XP_Bool isLocal = XP_TRUE; XP_Bool isNewGame = ngc->isNewGame; - Connectedness role = ngc->role; + DeviceRole role = ngc->role; DeepValue dValue; for ( col = 0; col < NG_NUM_COLS; ++col ) { @@ -430,9 +430,9 @@ adjustOneRow( NewGameCtx* ngc, XP_U16 player, XP_Bool force ) * that case changing role then back again should not lose/change data. */ static void -changeRole( NewGameCtx* ngc, Connectedness newRole ) +changeRole( NewGameCtx* ngc, DeviceRole newRole ) { - Connectedness oldRole = ngc->role; + DeviceRole oldRole = ngc->role; if ( oldRole != newRole ) { if ( !ngc->changedNPlayers ) { NGValue value; diff --git a/xwords4/common/nwgamest.h b/xwords4/common/nwgamest.h index 27c19b50d..dd3491df0 100644 --- a/xwords4/common/nwgamest.h +++ b/xwords4/common/nwgamest.h @@ -64,7 +64,7 @@ typedef union NGValue { const XP_UCHAR* ng_cp; XP_U16 ng_u16; XP_Bool ng_bool; - Connectedness ng_role; + DeviceRole ng_role; } NGValue; /* Enable or disable (show or hide) controls */ diff --git a/xwords4/common/server.h b/xwords4/common/server.h index 61c0634db..685803da6 100644 --- a/xwords4/common/server.h +++ b/xwords4/common/server.h @@ -42,7 +42,7 @@ enum { SERVER_ISSERVER, SERVER_ISCLIENT }; -typedef XP_U8 Connectedness; +typedef XP_U8 DeviceRole; /* typedef struct ServerCtxt ServerCtxt; */ diff --git a/xwords4/linux/gtkmain.c b/xwords4/linux/gtkmain.c index 80c6e0143..1227a8b59 100644 --- a/xwords4/linux/gtkmain.c +++ b/xwords4/linux/gtkmain.c @@ -292,7 +292,7 @@ createOrLoadObjects( GtkAppGlobals* globals ) XWStreamCtxt* stream = NULL; XP_Bool opened = XP_FALSE; - Connectedness serverRole = globals->cGlobals.params->serverRole; + DeviceRole serverRole = globals->cGlobals.params->serverRole; XP_Bool isServer = serverRole != SERVER_ISCLIENT; LaunchParams* params = globals->cGlobals.params; diff --git a/xwords4/linux/gtknewgame.c b/xwords4/linux/gtknewgame.c index 960364dca..daa859b73 100644 --- a/xwords4/linux/gtknewgame.c +++ b/xwords4/linux/gtknewgame.c @@ -66,7 +66,7 @@ role_combo_changed( GtkComboBox* combo, gpointer gp ) GtkNewGameState* state = (GtkNewGameState*)gp; gint index = gtk_combo_box_get_active( GTK_COMBO_BOX(combo) ); if ( index >= 0 ) { - value.ng_role = (Connectedness)index; + value.ng_role = (DeviceRole)index; newg_attrChanged( state->newGameCtxt, NG_ATTR_ROLE, value ); } } /* role_combo_changed */ diff --git a/xwords4/linux/main.h b/xwords4/linux/main.h index 6b307411e..a4d9151f6 100644 --- a/xwords4/linux/main.h +++ b/xwords4/linux/main.h @@ -59,7 +59,7 @@ typedef struct LaunchParams { XP_Bool showRobotScores; XP_Bool noHeartbeat; - Connectedness serverRole; + DeviceRole serverRole; CommsConnType conType; union { diff --git a/xwords4/palm/connsdlg.c b/xwords4/palm/connsdlg.c index e5580de06..522e3be52 100644 --- a/xwords4/palm/connsdlg.c +++ b/xwords4/palm/connsdlg.c @@ -244,7 +244,7 @@ ConnsFormHandleEvent( EventPtr event ) switch ( event->eType ) { case frmOpenEvent: state->serverRole = - (Connectedness)globals->dlgParams[CONNS_PARAM_ROLE_INDEX]; + (DeviceRole)globals->dlgParams[CONNS_PARAM_ROLE_INDEX]; state->addr = (CommsAddrRec*)globals->dlgParams[CONNS_PARAM_ADDR_INDEX]; state->isNewGame = globals->isNewGame; diff --git a/xwords4/palm/palmmain.h b/xwords4/palm/palmmain.h index e3e65617b..454183393 100644 --- a/xwords4/palm/palmmain.h +++ b/xwords4/palm/palmmain.h @@ -202,7 +202,7 @@ typedef struct PalmNewGameState { XP_UCHAR shortDictName[32]; /* as long as a dict name can be */ XP_Bool forwardChange; - Connectedness curServerHilite; + DeviceRole curServerHilite; #if defined XWFEATURE_RELAY || defined XWFEATURE_BLUETOOTH || defined XWFEATURE_IR CommsAddrRec addr; XP_Bool connsSettingChanged; diff --git a/xwords4/wince/cecondlg.c b/xwords4/wince/cecondlg.c index 147196d15..86bca0f9a 100755 --- a/xwords4/wince/cecondlg.c +++ b/xwords4/wince/cecondlg.c @@ -218,7 +218,7 @@ ConnsDlg( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam ) XP_Bool WrapConnsDlg( HWND hDlg, CEAppGlobals* globals, const CommsAddrRec* addrRec, - Connectedness role, CeConnDlgState* state ) + DeviceRole role, CeConnDlgState* state ) { XP_Bool result; XP_MEMSET( state, 0, sizeof( *state ) ); diff --git a/xwords4/wince/cecondlg.h b/xwords4/wince/cecondlg.h index ed20b4a25..2f28dcf7e 100755 --- a/xwords4/wince/cecondlg.h +++ b/xwords4/wince/cecondlg.h @@ -25,13 +25,13 @@ typedef struct CeConnDlgState { CommsAddrRec addrRec; - Connectedness role; + DeviceRole role; CEAppGlobals* globals; XP_Bool userCancelled; } CeConnDlgState; XP_Bool WrapConnsDlg( HWND hDlg, CEAppGlobals* globals, const CommsAddrRec* addrRec, - Connectedness role, CeConnDlgState* state ); + DeviceRole role, CeConnDlgState* state ); #endif diff --git a/xwords4/wince/ceginfo.c b/xwords4/wince/ceginfo.c index 7249718c7..a56fed37e 100755 --- a/xwords4/wince/ceginfo.c +++ b/xwords4/wince/ceginfo.c @@ -261,7 +261,7 @@ handlePrefsButton( HWND hDlg, CEAppGlobals* globals, GameInfoState* giState ) #if defined XWFEATURE_RELAY || defined XWFEATURE_BLUETOOTH static void handleConnOptionsButton( HWND hDlg, CEAppGlobals* globals, - Connectedness role, GameInfoState* giState ) + DeviceRole role, GameInfoState* giState ) { CeConnDlgState state; @@ -574,7 +574,7 @@ GameInfo(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) mode */ NGValue value; value.ng_role = - (Connectedness)SendDlgItemMessage( hDlg, + (DeviceRole)SendDlgItemMessage( hDlg, IDC_ROLECOMBO, CB_GETCURSEL, 0, 0L);