mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-03 23:04:08 +01:00
cleanup; fix compile of non-debug win32 version
This commit is contained in:
parent
9d18e8df95
commit
c956b0858a
5 changed files with 11 additions and 12 deletions
|
@ -27,6 +27,8 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define NG_NUM_COLS ((XP_U16)(NG_COL_PASSWD+1))
|
||||||
|
|
||||||
struct NewGameCtx {
|
struct NewGameCtx {
|
||||||
NewGameEnableColProc enableColProc;
|
NewGameEnableColProc enableColProc;
|
||||||
NewGameEnableAttrProc enableAttrProc;
|
NewGameEnableAttrProc enableAttrProc;
|
||||||
|
@ -156,8 +158,6 @@ cpToGI( NGValue value, const void* cbClosure )
|
||||||
case NG_COL_ROBOT:
|
case NG_COL_ROBOT:
|
||||||
pl->isRobot = value.ng_bool;
|
pl->isRobot = value.ng_bool;
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
XP_ASSERT(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !!strAddr ) {
|
if ( !!strAddr ) {
|
||||||
|
@ -259,8 +259,6 @@ deepCopy( NGValue value, const void* closure )
|
||||||
case NG_COL_PASSWD:
|
case NG_COL_PASSWD:
|
||||||
dvp->value.ng_cp = copyString( MPPARM(dvp->mpool) value.ng_cp );
|
dvp->value.ng_cp = copyString( MPPARM(dvp->mpool) value.ng_cp );
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
XP_ASSERT(0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,6 @@ typedef enum {
|
||||||
NG_COL_NAME
|
NG_COL_NAME
|
||||||
,NG_COL_ROBOT
|
,NG_COL_ROBOT
|
||||||
,NG_COL_PASSWD
|
,NG_COL_PASSWD
|
||||||
,NG_NUM_COLS
|
|
||||||
} NewGameColumn;
|
} NewGameColumn;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
@ -58,7 +57,6 @@ typedef enum {
|
||||||
#endif
|
#endif
|
||||||
NG_ATTR_NPLAYERS
|
NG_ATTR_NPLAYERS
|
||||||
,NG_ATTR_NPLAYHEADER
|
,NG_ATTR_NPLAYHEADER
|
||||||
,NG_ATTR_CANJUGGLE
|
|
||||||
} NewGameAttr;
|
} NewGameAttr;
|
||||||
|
|
||||||
typedef enum { NGEnableHidden,
|
typedef enum { NGEnableHidden,
|
||||||
|
|
|
@ -278,7 +278,7 @@ handleConnOptionsButton( HWND hDlg, CEAppGlobals* globals,
|
||||||
static XP_U16
|
static XP_U16
|
||||||
resIDForCol( XP_U16 player, NewGameColumn col )
|
resIDForCol( XP_U16 player, NewGameColumn col )
|
||||||
{
|
{
|
||||||
XP_U16 resID;
|
XP_U16 resID = 0;
|
||||||
switch ( col ) {
|
switch ( col ) {
|
||||||
#ifndef XWFEATURE_STANDALONE_ONLY
|
#ifndef XWFEATURE_STANDALONE_ONLY
|
||||||
case NG_COL_REMOTE:
|
case NG_COL_REMOTE:
|
||||||
|
@ -294,16 +294,15 @@ resIDForCol( XP_U16 player, NewGameColumn col )
|
||||||
case NG_COL_PASSWD:
|
case NG_COL_PASSWD:
|
||||||
resID = PASS_EDIT1;
|
resID = PASS_EDIT1;
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
XP_ASSERT( 0 );
|
|
||||||
}
|
}
|
||||||
|
XP_ASSERT( resID != 0 );
|
||||||
return resID + ( player * NUM_COLS );
|
return resID + ( player * NUM_COLS );
|
||||||
} /* resIDForCol */
|
} /* resIDForCol */
|
||||||
|
|
||||||
static XP_U16
|
static XP_U16
|
||||||
resIDForAttr( NewGameAttr attr )
|
resIDForAttr( NewGameAttr attr )
|
||||||
{
|
{
|
||||||
XP_U16 resID;
|
XP_U16 resID = 0;
|
||||||
switch( attr ) {
|
switch( attr ) {
|
||||||
case NG_ATTR_NPLAYERS:
|
case NG_ATTR_NPLAYERS:
|
||||||
resID = IDC_NPLAYERSCOMBO;
|
resID = IDC_NPLAYERSCOMBO;
|
||||||
|
@ -319,9 +318,8 @@ resIDForAttr( NewGameAttr attr )
|
||||||
case NG_ATTR_NPLAYHEADER:
|
case NG_ATTR_NPLAYHEADER:
|
||||||
resID = IDC_TOTAL_LABEL;
|
resID = IDC_TOTAL_LABEL;
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
XP_ASSERT(0);
|
|
||||||
}
|
}
|
||||||
|
XP_ASSERT( resID != 0 );
|
||||||
return resID;
|
return resID;
|
||||||
} /* resIDForAttr */
|
} /* resIDForAttr */
|
||||||
|
|
||||||
|
|
|
@ -510,6 +510,8 @@ figureBoardParms( CEAppGlobals* globals, XP_U16 nRows, CEBoardParms* bparms )
|
||||||
rc.right = rc.left + FORCE_WIDTH;
|
rc.right = rc.left + FORCE_WIDTH;
|
||||||
rc.bottom = rc.top + FORCE_HEIGHT;
|
rc.bottom = rc.top + FORCE_HEIGHT;
|
||||||
#else
|
#else
|
||||||
|
#if defined DEBUG
|
||||||
|
|
||||||
if ( g_dbWidth != 0 ) {
|
if ( g_dbWidth != 0 ) {
|
||||||
rc.right = rc.left + g_dbWidth;
|
rc.right = rc.left + g_dbWidth;
|
||||||
}
|
}
|
||||||
|
@ -517,6 +519,7 @@ figureBoardParms( CEAppGlobals* globals, XP_U16 nRows, CEBoardParms* bparms )
|
||||||
rc.bottom = rc.top + g_dbHeight;
|
rc.bottom = rc.top + g_dbHeight;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
scrnWidth = (XP_U16)(rc.right - rc.left);
|
scrnWidth = (XP_U16)(rc.right - rc.left);
|
||||||
|
|
|
@ -28,7 +28,9 @@ stuffTextInField( HWND hDlg, StrBoxInit* init )
|
||||||
XP_U16 len, crlen;
|
XP_U16 len, crlen;
|
||||||
XP_UCHAR* sbuf;
|
XP_UCHAR* sbuf;
|
||||||
wchar_t* wbuf;
|
wchar_t* wbuf;
|
||||||
|
#ifdef MEM_DEBUG
|
||||||
CEAppGlobals* globals = init->globals;
|
CEAppGlobals* globals = init->globals;
|
||||||
|
#endif
|
||||||
|
|
||||||
sbuf = XP_MALLOC( globals->mpool, nBytes + 1 );
|
sbuf = XP_MALLOC( globals->mpool, nBytes + 1 );
|
||||||
stream_getBytes( init->stream, sbuf, nBytes );
|
stream_getBytes( init->stream, sbuf, nBytes );
|
||||||
|
|
Loading…
Reference in a new issue