mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-18 22:26:30 +01:00
name change only: Connectedness becomes DeviceRole
This commit is contained in:
parent
b2f3e73672
commit
3f111c5657
13 changed files with 20 additions and 20 deletions
|
@ -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 );
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -42,7 +42,7 @@ enum {
|
|||
SERVER_ISSERVER,
|
||||
SERVER_ISCLIENT
|
||||
};
|
||||
typedef XP_U8 Connectedness;
|
||||
typedef XP_U8 DeviceRole;
|
||||
|
||||
/* typedef struct ServerCtxt ServerCtxt; */
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -59,7 +59,7 @@ typedef struct LaunchParams {
|
|||
XP_Bool showRobotScores;
|
||||
XP_Bool noHeartbeat;
|
||||
|
||||
Connectedness serverRole;
|
||||
DeviceRole serverRole;
|
||||
|
||||
CommsConnType conType;
|
||||
union {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 ) );
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue