make util_hiliteCell conditional, and remove from android where it

wasn't used anyway.
This commit is contained in:
Eric House 2012-10-05 18:51:32 -07:00
parent b11da9d8eb
commit fd9b9f85e2
6 changed files with 22 additions and 3 deletions

View file

@ -291,13 +291,14 @@ and_util_notifyGameOver( XW_UtilCtxt* uc )
UTIL_CBK_TAIL();
}
#ifdef XWFEATURE_HILITECELL
static XP_Bool
and_util_hiliteCell( XW_UtilCtxt* uc, XP_U16 col, XP_U16 row )
{
/* don't log; this is getting called a lot */
return XP_TRUE; /* means keep going */
}
#endif
static XP_Bool
and_util_engineProgressCallback( XW_UtilCtxt* uc )
@ -607,7 +608,9 @@ makeUtil( MPFORMAL JNIEnv** envp, jobject jutil, CurGameInfo* gi,
SET_PROC(informUndo);
SET_PROC(informNetDict);
SET_PROC(notifyGameOver);
#ifdef XWFEATURE_HILITECELL
SET_PROC(hiliteCell);
#endif
SET_PROC(engineProgressCallback);
SET_PROC(setTimer);
SET_PROC(clearTimer);

View file

@ -794,6 +794,7 @@ isAnchorSquare( EngineCtxt* engine, XP_U16 col, XP_U16 row )
return XP_FALSE;
} /* isAnchorSquare */
#ifdef XWFEATURE_HILITECELL
static void
hiliteForAnchor( EngineCtxt* engine, XP_U16 col, XP_U16 row )
{
@ -807,6 +808,9 @@ hiliteForAnchor( EngineCtxt* engine, XP_U16 col, XP_U16 row )
engine->returnNOW = XP_TRUE;
}
} /* hiliteForAnchor */
#else
# define hiliteForAnchor( engine, col, row )
#endif
static void
findMovesForAnchor( EngineCtxt* engine, XP_S16* prevAnchor,

View file

@ -136,8 +136,9 @@ typedef struct UtilVtable {
XWPhoniesChoice phoniesAction );
void (*m_util_notifyGameOver)( XW_UtilCtxt* uc );
#ifdef XWFEATURE_HILITECELL
XP_Bool (*m_util_hiliteCell)( XW_UtilCtxt* uc, XP_U16 col, XP_U16 row );
#endif
XP_Bool (*m_util_engineProgressCallback)( XW_UtilCtxt* uc );
@ -255,8 +256,10 @@ struct XW_UtilCtxt {
#define util_notifyGameOver( uc ) \
(uc)->vtable->m_util_notifyGameOver((uc))
#define util_hiliteCell( uc, c, r ) \
#ifdef XWFEATURE_HILITECELL
# define util_hiliteCell( uc, c, r ) \
(uc)->vtable->m_util_hiliteCell((uc), (c), (r))
#endif
#define util_engineProgressCallback( uc ) \
(uc)->vtable->m_util_engineProgressCallback((uc))

View file

@ -104,6 +104,7 @@ DEFINES += -DHASH_STREAM
DEFINES += -DXWFEATURE_TRAYUNDO_ONE
DEFINES += -DXWFEATURE_BONUSALL
# DEFINES += -DXWFEATURE_BONUSALLHINT
DEFINES += -DXWFEATURE_HILITECELL
# MAX_ROWS controls STREAM_VERS_BIGBOARD and with it move hashing
DEFINES += -DMAX_ROWS=32

View file

@ -404,6 +404,7 @@ curses_util_informNetDict( XW_UtilCtxt* uc, const XP_UCHAR* oldName,
XP_LOGF( "%s: %s => %s (cksum: %s)", __func__, oldName, newName, newSum );
}
#ifdef XWFEATURE_HILITECELL
static XP_Bool
curses_util_hiliteCell( XW_UtilCtxt* uc,
XP_U16 XP_UNUSED(col), XP_U16 XP_UNUSED(row) )
@ -414,6 +415,7 @@ curses_util_hiliteCell( XW_UtilCtxt* uc,
}
return XP_TRUE;
} /* curses_util_hiliteCell */
#endif
static XP_Bool
curses_util_engineProgressCallback( XW_UtilCtxt* XP_UNUSED(uc) )
@ -1527,7 +1529,9 @@ setupCursesUtilCallbacks( CursesAppGlobals* globals, XW_UtilCtxt* util )
util->vtable->m_util_informUndo = curses_util_informUndo;
util->vtable->m_util_notifyGameOver = curses_util_notifyGameOver;
util->vtable->m_util_informNetDict = curses_util_informNetDict;
#ifdef XWFEATURE_HILITECELL
util->vtable->m_util_hiliteCell = curses_util_hiliteCell;
#endif
util->vtable->m_util_engineProgressCallback =
curses_util_engineProgressCallback;

View file

@ -1479,6 +1479,7 @@ gtk_util_informNetDict( XW_UtilCtxt* uc, const XP_UCHAR* oldName,
/* define this to prevent user events during debugging from stopping the engine */
/* #define DONT_ABORT_ENGINE */
#ifdef XWFEATURE_HILITECELL
static XP_Bool
gtk_util_hiliteCell( XW_UtilCtxt* uc, XP_U16 col, XP_U16 row )
{
@ -1502,6 +1503,7 @@ gtk_util_hiliteCell( XW_UtilCtxt* uc, XP_U16 col, XP_U16 row )
return !pending;
#endif
} /* gtk_util_hiliteCell */
#endif
static XP_Bool
gtk_util_altKeyDown( XW_UtilCtxt* uc )
@ -2002,7 +2004,9 @@ setupGtkUtilCallbacks( GtkAppGlobals* globals, XW_UtilCtxt* util )
util->vtable->m_util_informUndo = gtk_util_informUndo;
util->vtable->m_util_notifyGameOver = gtk_util_notifyGameOver;
util->vtable->m_util_informNetDict = gtk_util_informNetDict;
#ifdef XWFEATURE_HILITECELL
util->vtable->m_util_hiliteCell = gtk_util_hiliteCell;
#endif
util->vtable->m_util_altKeyDown = gtk_util_altKeyDown;
util->vtable->m_util_engineProgressCallback =
gtk_util_engineProgressCallback;