From 182db5a3962cb31723dd4979ac90933081a1add8 Mon Sep 17 00:00:00 2001 From: ehouse Date: Sat, 11 Oct 2008 16:46:08 +0000 Subject: [PATCH] debug changes: change defines to remove gremlin-only code; add missing constants. --- common/board.h | 2 +- common/dbgutil.c | 4 ++++ common/scorebdp.c | 2 ++ common/tray.c | 4 ++-- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/common/board.h b/common/board.h index 8b5832eec..8668ada24 100644 --- a/common/board.h +++ b/common/board.h @@ -153,7 +153,7 @@ void board_invalTrayTiles( BoardCtxt* board, TileBit what ); XP_Bool board_juggleTray( BoardCtxt* board ); XP_Bool board_beginTrade( BoardCtxt* board ); -#if defined FOR_GREMLINS || defined KEYBOARD_NAV +#if defined FOR_GREMLINS XP_Bool board_moveDivider( BoardCtxt* board, XP_Bool right ); #endif diff --git a/common/dbgutil.c b/common/dbgutil.c index 94c74f107..5ee32c935 100644 --- a/common/dbgutil.c +++ b/common/dbgutil.c @@ -31,9 +31,13 @@ XP_Key_2str( XP_Key key ) switch( key ) { CASESTR(XP_KEY_NONE); CASESTR(XP_CURSOR_KEY_DOWN); + CASESTR(XP_CURSOR_KEY_ALTDOWN); CASESTR(XP_CURSOR_KEY_RIGHT); + CASESTR(XP_CURSOR_KEY_ALTRIGHT); CASESTR(XP_CURSOR_KEY_UP); + CASESTR(XP_CURSOR_KEY_ALTUP); CASESTR(XP_CURSOR_KEY_LEFT); + CASESTR(XP_CURSOR_KEY_ALTLEFT); CASESTR(XP_CURSOR_KEY_DEL); CASESTR(XP_RAISEFOCUS_KEY); CASESTR(XP_RETURN_KEY); diff --git a/common/scorebdp.c b/common/scorebdp.c index c4228a6b3..520074fe4 100644 --- a/common/scorebdp.c +++ b/common/scorebdp.c @@ -22,6 +22,7 @@ #include "model.h" #include "game.h" #include "strutils.h" +#include "dbgutil.h" #ifdef CPLUS extern "C" { @@ -302,6 +303,7 @@ flipKey( XP_Key key, XP_Bool flip ) case XP_CURSOR_KEY_ALTRIGHT: result = XP_CURSOR_KEY_ALTDOWN; break; default: + XP_LOGF( "unexpected key: %s", XP_Key_2str(key) ); XP_ASSERT(0); } } diff --git a/common/tray.c b/common/tray.c index f7237a918..4244e4847 100644 --- a/common/tray.c +++ b/common/tray.c @@ -635,7 +635,7 @@ tray_moveCursor( BoardCtxt* board, XP_Key cursorKey, XP_Bool preflightOnly, break; /* always exit loop if we get here */ } - /* fix this!!! */ + /* PENDING: don't just inval everything */ board->dividerInvalid = XP_TRUE; board_invalTrayTiles( board, ALLTILES ); if ( resetEngine ) { @@ -669,7 +669,7 @@ getFocussedTileCenter( BoardCtxt* board, XP_U16* xp, XP_U16* yp ) #endif /* KEYBOARD_NAV */ -#if defined FOR_GREMLINS || defined KEYBOARD_NAV +#if defined FOR_GREMLINS XP_Bool board_moveDivider( BoardCtxt* board, XP_Bool right ) {