diff --git a/xwords4/common/game.c b/xwords4/common/game.c index b29c6e057..1ca1f84cf 100644 --- a/xwords4/common/game.c +++ b/xwords4/common/game.c @@ -334,20 +334,18 @@ gi_readFromStream( MPFORMAL XWStreamCtxt* stream, CurGameInfo* gi ) gi->robotSmartness = (XP_U8)stream_getBits( stream, 2 ); gi->phoniesAction = (XWPhoniesChoice)stream_getBits( stream, 2 ); gi->timerEnabled = stream_getBits( stream, 1 ); -#ifdef FEATURE_TRAY_EDIT + if ( strVersion >= CUR_STREAM_VERS ) { gi->allowPickTiles = stream_getBits( stream, 1 ); } else { gi->allowPickTiles = XP_FALSE; } -#endif -#ifdef XWFEATURE_SEARCHLIMIT + if ( strVersion >= CUR_STREAM_VERS ) { gi->allowHintRect = stream_getBits( stream, 1 ); } else { gi->allowHintRect = XP_FALSE; } -#endif gi->gameID = stream_getU16( stream ); @@ -389,12 +387,8 @@ gi_writeToStream( XWStreamCtxt* stream, CurGameInfo* gi ) stream_putBits( stream, 2, gi->robotSmartness ); stream_putBits( stream, 2, gi->phoniesAction ); stream_putBits( stream, 1, gi->timerEnabled ); -#ifdef FEATURE_TRAY_EDIT stream_putBits( stream, 1, gi->allowPickTiles ); -#endif -#ifdef XWFEATURE_SEARCHLIMIT stream_putBits( stream, 1, gi->allowHintRect ); -#endif stream_putU16( stream, gi->gameID ); if ( gi->timerEnabled) { diff --git a/xwords4/common/game.h b/xwords4/common/game.h index 59fb0fcbb..b9173f327 100644 --- a/xwords4/common/game.h +++ b/xwords4/common/game.h @@ -30,15 +30,9 @@ extern "C" { #endif -/* WARNING: the following assumes that FEATURE_TRAY_EDIT is defined if - XWFEATURE_SEARCHLIMIT is*/ -#if defined XWFEATURE_SEARCHLIMIT -# define CUR_STREAM_VERS 0x03 -#elif defined FEATURE_TRAY_EDIT -# define CUR_STREAM_VERS 0x02 -#else -# define CUR_STREAM_VERS 0x01 -#endif +#define CUR_STREAM_VERS 0x02 + +#define STREAM_VERS_405 0x01 typedef struct LocalPlayer { XP_UCHAR* name; @@ -62,12 +56,8 @@ typedef struct CurGameInfo { XP_Bool hintsNotAllowed; XP_Bool timerEnabled; -#ifdef FEATURE_TRAY_EDIT XP_Bool allowPickTiles; -#endif -#ifdef XWFEATURE_SEARCHLIMIT XP_Bool allowHintRect; -#endif XP_U8 robotSmartness; XWPhoniesChoice phoniesAction;