diff --git a/apps/plugins/xworld/keymaps.h b/apps/plugins/xworld/keymaps.h index 54021a8981..78d93604a8 100644 --- a/apps/plugins/xworld/keymaps.h +++ b/apps/plugins/xworld/keymaps.h @@ -21,8 +21,8 @@ #ifndef _XWORLD_KEYMAPS_H #define _XWORLD_KEYMAPS_H -#endif +/* Handle the "nice" targets that have directional buttons with normal names */ #if (CONFIG_KEYPAD == PHILIPS_HDD1630_PAD) || \ (CONFIG_KEYPAD == PHILIPS_HDD6330_PAD) || \ (CONFIG_KEYPAD == PHILIPS_SA9200_PAD) || \ @@ -63,15 +63,15 @@ #define BTN_PAUSE BUTTON_SELECT #endif -#if (CONFIG_KEYPAD == PHILIPS_HDD1630_PAD) || \ - (CONFIG_KEYPAD == PHILIPS_HDD6330_PAD) || \ - (CONFIG_KEYPAD == PHILIPS_SA9200_PAD) || \ - (CONFIG_KEYPAD == CREATIVE_ZENXFI2_PAD) || \ - (CONFIG_KEYPAD == CREATIVE_ZENXFI3_PAD) || \ - (CONFIG_KEYPAD == SANSA_CONNECT_PAD) || \ - (CONFIG_KEYPAD == SANSA_C200_PAD) || \ - (CONFIG_KEYPAD == SANSA_FUZEPLUS_PAD) || \ - (CONFIG_KEYPAD == ONDAVX747_PAD) +#if (CONFIG_KEYPAD == PHILIPS_HDD1630_PAD) || \ + (CONFIG_KEYPAD == PHILIPS_HDD6330_PAD) || \ + (CONFIG_KEYPAD == PHILIPS_SA9200_PAD) || \ + (CONFIG_KEYPAD == CREATIVE_ZENXFI2_PAD) || \ + (CONFIG_KEYPAD == CREATIVE_ZENXFI3_PAD) || \ + (CONFIG_KEYPAD == SANSA_CONNECT_PAD) || \ + (CONFIG_KEYPAD == SANSA_C200_PAD) || \ + (CONFIG_KEYPAD == SANSA_FUZEPLUS_PAD) || \ + (CONFIG_KEYPAD == ONDAVX747_PAD) #define BTN_FIRE BUTTON_VOL_UP #define BTN_PAUSE BUTTON_VOL_DOWN @@ -124,8 +124,11 @@ (CONFIG_KEYPAD == GIGABEAT_S_PAD) #define BTN_FIRE BUTTON_VOL_UP #define BTN_PAUSE BUTTON_MENU +/* #if CONFIG_KEYPAD == PHILIPS_HDD1630_PAD */ #endif +/* ... and now for the bad ones that don't have + * standard names for the directional buttons */ #elif (CONFIG_KEYPAD == PBELL_VIBE500_PAD) #define BTN_UP BUTTON_OK #define BTN_DOWN BUTTON_CANCEL @@ -185,12 +188,19 @@ #define BTN_LEFT BUTTON_LEFT #define BTN_RIGHT BUTTON_RIGHT -#if (CONFIG_KEYPAD == MROBE500_PAD) || (CONFIG_KEYPAD == ONDAVX777_PAD) +#if (CONFIG_KEYPAD == MROBE500_PAD) || \ + (CONFIG_KEYPAD == ONDAVX777_PAD) #define BTN_PAUSE BUTTON_BOTTOMLEFT -#elif CONFIG_KEYPAD == !COWON_D2_PAD || !DX50_PAD || !ONDAVX777_PAD +#elif (CONFIG_KEYPAD == !COWON_D2_PAD) || \ + (CONFIG_KEYPAD != !DX50_PAD) || \ + (CONFIG_KEYMAP != ONDAVX777_PAD) #define BTN_FIRE BUTTON_BOTTOMLEFT #define BTN_PAUSE BUTTON_TOPLEFT +#endif +/* HAVE_TOUCHSCREEN */ #endif + +/* _XWORLD_KEYMAPS_H */ #endif diff --git a/apps/plugins/xworld/sys.c b/apps/plugins/xworld/sys.c index 0af13efd11..14c928f067 100644 --- a/apps/plugins/xworld/sys.c +++ b/apps/plugins/xworld/sys.c @@ -787,13 +787,13 @@ void sys_sleep(struct System* sys, uint32_t duration) { (void) sys; /* duration is in ms */ - rb->sleep(duration / 10); + rb->sleep(duration / (1000/HZ)); } uint32_t sys_getTimeStamp(struct System* sys) { (void) sys; - return (uint32_t) (*rb->current_tick) * 10; + return (uint32_t) (*rb->current_tick * (1000/HZ)); } static int16_t rb_soundbuf [MAX_SOUNDBUF_SIZE] IBSS_ATTR; diff --git a/apps/plugins/xworld/util.h b/apps/plugins/xworld/util.h index 8852335661..bacb149da9 100644 --- a/apps/plugins/xworld/util.h +++ b/apps/plugins/xworld/util.h @@ -25,12 +25,16 @@ #include "intern.h" -/* #define XWORLD_DEBUG */ +#ifdef ROCKBOX_HAS_LOGF +#define XWORLD_DEBUG +#endif #ifdef XWORLD_DEBUG #define debug(m,f,...) debug_real(m, f, ##__VA_ARGS__) +#define XWORLD_DEBUGMASK ~0 #else #define debug(m,f,...) +#define XWORLD_DEBUGMASK 0 #endif enum { diff --git a/apps/plugins/xworld/xworld.c b/apps/plugins/xworld/xworld.c index 932ff1c3e1..b0e701cec3 100644 --- a/apps/plugins/xworld/xworld.c +++ b/apps/plugins/xworld/xworld.c @@ -36,7 +36,7 @@ enum plugin_status plugin_start(const void* parameter) /* no trailing slashes */ const char *dataPath = "/.rockbox/xworld"; const char *savePath = "/.rockbox/xworld"; - g_debugMask = 0; + g_debugMask = XWORLD_DEBUGMASK; engine_create(&e, &sys, dataPath, savePath); engine_init(&e); diff --git a/manual/plugins/xworld.tex b/manual/plugins/xworld.tex index 32e3ecbf78..4ea7559b6b 100644 --- a/manual/plugins/xworld.tex +++ b/manual/plugins/xworld.tex @@ -3,8 +3,10 @@ In this cinematic, award winning platform game by Éric Chahi, you must evade capture and do your best to escape an alien planet. After an experiment goes awry the hero must team up with an unlikely ally, when they both become fugitives on another world. -XWorld requires the data files, bank* and memlist.bin, from the original "Another World" -PC game to be copied into the .rockbox/xworld/ directory before the game can be played. +XWorld requires the data files, \fname{BANK*} and \fname{MEMLIST.BIN}, from the original ``Another World'' +PC game to be copied into the \fname{.rockbox/xworld/} directory before the game can be played. + +Additionally, ``extra'' data files that modify the in-game strings and font can be placed in the \fname{.rockbox/xworld/} directory with the names \fname{xworld.strings} and \fname{xworld.font}, respectively. \begin{btnmap} % @@ -37,9 +39,9 @@ PC game to be copied into the .rockbox/xworld/ directory before the game can be ,GIGABEAT_S_PAD,MROBE100_PAD,PBELL_VIBE500_PAD,SANSA_FUZEPLUS_PAD% ,SAMSUNG_YH92X_PAD,SAMSUNG_YH820_PAD,IPOD_4G_PAD,IPOD_3G_PAD,IPOD_1G2G_PAD% ,IRIVER_H10_PAD} - {\ButtonLeft / \ButtonRight} - \opt{HAVE_TOUCHSCREEN}{\TouchMidLeft / \TouchMidRight} - \opt{PBELL_VIBE500_PAD}{\ButtonMenu / \ButtonPlay} + {\ButtonLeft{} / \ButtonRight} + \opt{HAVE_TOUCHSCREEN}{\TouchMidLeft{} / \TouchMidRight} + \opt{PBELL_VIBE500_PAD}{\ButtonMenu{} / \ButtonPlay} \opt{HAVEREMOTEKEYMAP}{& } & Move Left and Right\\ % @@ -75,7 +77,7 @@ PC game to be copied into the .rockbox/xworld/ directory before the game can be \opt{HM801_PAD}{\ButtonNext} \opt{PBELL_VIBE500_PAD}{\ButtonRec} \opt{IRIVER_H10_PAD}{\ButtonPlay} - \opt{IPOD_4G_PAD,IPOD_3G_PAD,IPOD_1G2G_PAD}{\ButtonMenu / \ButtonSelect} + \opt{IPOD_4G_PAD,IPOD_3G_PAD,IPOD_1G2G_PAD}{\ButtonMenu{} / \ButtonSelect} \opt{HAVEREMOTEKEYMAP}{& } & Menu\\ \end{btnmap}