diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 3c655bce39..222fc0315f 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c @@ -2937,7 +2937,7 @@ static int menu_action_callback(int btn, struct gui_synclist *lists) } else if (btn == ACTION_STD_CONTEXT) { - MENUITEM_STRINGLIST(menu_items, "Debug Menu", NULL, ID2P(LANG_ADD_TO_FAVES)); + MENUITEM_STRINGLIST(menu_items, "Debug", NULL, ID2P(LANG_ADD_TO_FAVES)); if (do_menu(&menu_items, NULL, NULL, false) == 0) shortcuts_add(SHORTCUT_DEBUGITEM, menuitems[selection].desc); return ACTION_STD_CANCEL; @@ -2974,7 +2974,7 @@ int debug_menu(void) { struct simplelist_info info; - simplelist_info_init(&info, "Debug Menu", ARRAYLEN(menuitems), NULL); + simplelist_info_init(&info, "Debug", ARRAYLEN(menuitems), NULL); info.action_callback = menu_action_callback; info.get_name = menu_get_name; info.get_talk = menu_get_talk; diff --git a/apps/lang/english.lang b/apps/lang/english.lang index 27faa38cf8..530c4e9875 100644 --- a/apps/lang/english.lang +++ b/apps/lang/english.lang @@ -16065,20 +16065,6 @@ *: "Default Browser" - - id: LANG_AMAZE_MENU - desc: Amaze game - user: core - - *: "Amaze Main Menu" - - - *: "Amaze Main Menu" - - - *: "Amaze Main Menu" - - id: LANG_SET_MAZE_SIZE desc: Maze size in Amaze game @@ -16331,34 +16317,6 @@ *: "Mik mod Settings" - - id: LANG_MIKMOD_MENU - desc: mikmod plugin - user: core - - *: "Mikmod Menu" - - - *: "Mikmod Menu" - - - *: "Mik mod Menu" - - - - id: LANG_CHESSBOX_MENU - desc: chessbox plugin - user: core - - *: "Chessbox Menu" - - - *: "Chessbox Menu" - - - *: "Chess box Menu" - - id: VOICE_INVALID_VOICE_FILE desc: played if the voice file fails to load diff --git a/apps/plugins/2048.c b/apps/plugins/2048.c index 8c078ef800..2458554631 100644 --- a/apps/plugins/2048.c +++ b/apps/plugins/2048.c @@ -809,7 +809,7 @@ static bool confirm_quit(void) static int do_2048_pause_menu(void) { int sel = 0; - MENUITEM_STRINGLIST(menu,"2048 Menu", NULL, + MENUITEM_STRINGLIST(menu,"2048", NULL, "Resume Game", "Start New Game", "High Scores", @@ -1014,7 +1014,7 @@ static enum plugin_status do_2048_menu(void) int sel = 0; loaded = load_game(); MENUITEM_STRINGLIST(menu, - "2048 Menu", + "2048", mainmenu_cb, "Resume Game", "Start New Game", diff --git a/apps/plugins/amaze.c b/apps/plugins/amaze.c index 2af9463a16..6664748323 100644 --- a/apps/plugins/amaze.c +++ b/apps/plugins/amaze.c @@ -1301,7 +1301,7 @@ int menu(void) bool exit_menu = false; int selection = 0, result = 0, status = 1; - MENUITEM_STRINGLIST(menu, ID2P(LANG_AMAZE_MENU), menu_cb, + MENUITEM_STRINGLIST(menu, "Amaze", menu_cb, ID2P(LANG_CHESSBOX_MENU_RESUME_GAME), ID2P(LANG_CHESSBOX_MENU_NEW_GAME), ID2P(LANG_SET_MAZE_SIZE), diff --git a/apps/plugins/blackjack.c b/apps/plugins/blackjack.c index 8480adf3cb..124eea1ee6 100644 --- a/apps/plugins/blackjack.c +++ b/apps/plugins/blackjack.c @@ -1412,7 +1412,7 @@ static unsigned int blackjack_menu(void) { int selection = 0; bool breakout = false; - MENUITEM_STRINGLIST(menu, "BlackJack Menu", blackjack_menu_cb, + MENUITEM_STRINGLIST(menu, "Blackjack", blackjack_menu_cb, "Resume Game", "Start New Game", "High Scores", "Help", "Playback Control", diff --git a/apps/plugins/brickmania.c b/apps/plugins/brickmania.c index ff7c717f42..caa6da56d6 100644 --- a/apps/plugins/brickmania.c +++ b/apps/plugins/brickmania.c @@ -1601,7 +1601,7 @@ static int brickmania_menu(void) rb->touchscreen_set_mode(rb->global_settings->touch_mode); #endif - MENUITEM_STRINGLIST(main_menu, "Brickmania Menu", brickmania_menu_cb, + MENUITEM_STRINGLIST(main_menu, "Brickmania", brickmania_menu_cb, "Resume Game", "Start New Game", "Difficulty", "Help", "High Scores", "Playback Control", diff --git a/apps/plugins/bubbles.c b/apps/plugins/bubbles.c index 0f8c594e4d..e8f994cd74 100644 --- a/apps/plugins/bubbles.c +++ b/apps/plugins/bubbles.c @@ -2503,7 +2503,7 @@ static int bubbles_menu(struct game_context* bb) { int selected = 0; bool startgame = false; - MENUITEM_STRINGLIST(menu,"Bubbles Menu",bubbles_menu_cb, + MENUITEM_STRINGLIST(menu,"Bubbles",bubbles_menu_cb, "Resume Game", "Start New Game", "Level", "High Scores", "Playback Control", "Quit without Saving", "Quit"); diff --git a/apps/plugins/calendar.c b/apps/plugins/calendar.c index e0ded217a7..ef0869e377 100644 --- a/apps/plugins/calendar.c +++ b/apps/plugins/calendar.c @@ -893,7 +893,7 @@ static bool edit_memo(int change, struct shown *shown) { "Sun", -1 }, }; - MENUITEM_STRINGLIST(edit_menu, "Edit menu", edit_menu_cb, + MENUITEM_STRINGLIST(edit_menu, "Edit", edit_menu_cb, "Remove", "Edit", "New Weekly", "New Monthly", "New Yearly", "New One off", diff --git a/apps/plugins/chessbox/chessbox.c b/apps/plugins/chessbox/chessbox.c index b3579c6b27..ad75541039 100644 --- a/apps/plugins/chessbox/chessbox.c +++ b/apps/plugins/chessbox/chessbox.c @@ -542,7 +542,7 @@ static int cb_menu_viewer(void) { int selection; - MENUITEM_STRINGLIST(menu, ID2P(LANG_CHESSBOX_MENU), NULL, + MENUITEM_STRINGLIST(menu, "Chessbox", NULL, ID2P(LANG_CHESSBOX_MENU_RESTART_GAME), ID2P(LANG_CHESSBOX_MENU_SELECT_OTHER_GAME), ID2P(LANG_CHESSBOX_MENU_RESUME_GAME), @@ -787,7 +787,7 @@ static int cb_menu(void) { int selection; - MENUITEM_STRINGLIST(menu,ID2P(LANG_CHESSBOX_MENU), NULL, + MENUITEM_STRINGLIST(menu,"Chessbox", NULL, ID2P(LANG_CHESSBOX_MENU_NEW_GAME), ID2P(LANG_CHESSBOX_MENU_RESUME_GAME), ID2P(LANG_CHESSBOX_MENU_SAVE_GAME), diff --git a/apps/plugins/chessclock.c b/apps/plugins/chessclock.c index 746d061e66..6985976df8 100644 --- a/apps/plugins/chessclock.c +++ b/apps/plugins/chessclock.c @@ -688,7 +688,7 @@ static int run_timer(int nr) /* MENU */ case CHC_MENU: { - MENUITEM_STRINGLIST(menu, "Menu", NULL, + MENUITEM_STRINGLIST(menu, "Chess Clock", NULL, "Delete player", "Restart round", "Set round time", "Set total time", "Playback Control"); diff --git a/apps/plugins/chopper.c b/apps/plugins/chopper.c index a3071adfb2..b2a88fb217 100644 --- a/apps/plugins/chopper.c +++ b/apps/plugins/chopper.c @@ -766,7 +766,7 @@ static int chopMenu(int menunum) { "Steep", -1 }, }; - MENUITEM_STRINGLIST(menu,"Chopper Menu",chopMenuCb, + MENUITEM_STRINGLIST(menu,"Chopper",chopMenuCb, "Resume Game","Start New Game", "Level","Playback Control","Quit"); _ingame = (menunum!=0); diff --git a/apps/plugins/clix.c b/apps/plugins/clix.c index 08c77b4a01..b21a17404e 100644 --- a/apps/plugins/clix.c +++ b/apps/plugins/clix.c @@ -781,7 +781,7 @@ static int clix_menu(struct clix_game_state_t* state, bool ingame) _ingame = ingame; - MENUITEM_STRINGLIST (main_menu, "Clix Menu", clix_menu_cb, + MENUITEM_STRINGLIST (main_menu, "Clix", clix_menu_cb, "Resume Game", "Start New Game", "Help", diff --git a/apps/plugins/codebuster.c b/apps/plugins/codebuster.c index 401ce6085f..2b64898d47 100644 --- a/apps/plugins/codebuster.c +++ b/apps/plugins/codebuster.c @@ -375,7 +375,7 @@ static int menu_cb(int action, } static void main_menu(void) { - MENUITEM_STRINGLIST(main_menu, "Codebuster Menu", menu_cb, + MENUITEM_STRINGLIST(main_menu, "Codebuster", menu_cb, "Resume Game", "Start New Game", "Settings", "Playback Control", "Quit"); int cur_item = 0; diff --git a/apps/plugins/dart_scorer.c b/apps/plugins/dart_scorer.c index 1e8dd8f37b..dbf63be598 100644 --- a/apps/plugins/dart_scorer.c +++ b/apps/plugins/dart_scorer.c @@ -262,7 +262,7 @@ static void undo(void) else { /* - negative history means we bust. negative filled for all skipped throws + negative history means we bust. negative filled for all skipped throws from being bust so consume back until no more */ for (; settings.throws < 3 && settings.history[settings.history_ptr - 1] < 0; --settings.history_ptr, ++settings.throws) @@ -526,7 +526,7 @@ static enum plugin_status do_dart_scorer_menu(void) int sel = 0; loaded = load_game(); MENUITEM_STRINGLIST(menu, - "Dart Scorer Menu", + "Dart Scorer", mainmenu_cb, "Resume Game", "Start New Game", diff --git a/apps/plugins/dice.c b/apps/plugins/dice.c index 8f2315cde8..62050c182a 100644 --- a/apps/plugins/dice.c +++ b/apps/plugins/dice.c @@ -150,7 +150,7 @@ static void dice_print(struct dices* dice, struct screen* display){ int nb_dices_per_line=display_nb_col/4;/* 4 char per dice displayed*/ if(!nb_dices_per_line) nb_dices_per_line++; - + int nb_lines_required=dice->nb_dices/nb_dices_per_line; int current_row=0; if(dice->nb_dices%nb_dices_per_line!=0) @@ -182,7 +182,7 @@ static bool dice_menu(struct dices * dice) { int selection; bool menu_quit = false, result = false; - MENUITEM_STRINGLIST(menu, "Dice Menu", NULL, + MENUITEM_STRINGLIST(menu, "Dice", NULL, "Roll Dice", "Number of Dice", "Number of Sides", "Playback Control", "Quit"); diff --git a/apps/plugins/disktidy.c b/apps/plugins/disktidy.c index 57a1390078..eb47eebb20 100644 --- a/apps/plugins/disktidy.c +++ b/apps/plugins/disktidy.c @@ -678,7 +678,7 @@ static enum plugin_status tidy_lcd_menu(void) int selection = 0; struct simplelist_info list; - MENUITEM_STRINGLIST(menu, "Disktidy", disktidy_menu_cb, + MENUITEM_STRINGLIST(menu, "Disk Tidy", disktidy_menu_cb, "Start Cleaning", "Files to Clean", "Last Run Stats", "Playback Control", "Quit"); diff --git a/apps/plugins/doom/rockdoom.c b/apps/plugins/doom/rockdoom.c index 8a8ea0055c..be03d01d8f 100644 --- a/apps/plugins/doom/rockdoom.c +++ b/apps/plugins/doom/rockdoom.c @@ -15,7 +15,7 @@ * * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. - * + * * H300 Port by Karl Kurbjun * IPod port by Dave Chapman and Paul Louden * Additional code contributed by Thom Johansen @@ -273,7 +273,7 @@ bool Dhandle_ver (int dver) { snprintf(addon,sizeof(addon),"%s%s", GAMEBASE"addons/", addons[argvlist.addonnum]); D_AddFile(addon,source_pwad); - modifiedgame = true; + modifiedgame = true; } if(argvlist.demonum) @@ -462,7 +462,7 @@ int Oset_keys() { "Key On", -1 }, #endif }; - + int *keys[]={ &key_right, &key_left, @@ -518,7 +518,7 @@ static bool Doptions() "Rotate Screen 90 deg", #endif ); - + void *options[]={ &enable_sound, &argvlist.timedemo, @@ -537,7 +537,7 @@ static bool Doptions() while(!menuquit) { result = rb->do_menu(&menu, &selected, NULL, false); - if(result==0) + if(result==0) Oset_keys(); else if (result > 0) rb->set_option(menu_[result], options[result-1], RB_INT, onoff, 2, NULL ); @@ -592,7 +592,7 @@ int doom_menu() static struct opt_items names[7]; - MENUITEM_STRINGLIST(menu, "Doom Menu", NULL, + MENUITEM_STRINGLIST(menu, "Doom", NULL, "Game", "Addons", "Demos", "Options", "Play Game", "Quit"); @@ -612,7 +612,7 @@ int doom_menu() gamever=status-1; /* Clean out the button Queue */ - while (rb->button_get(false) != BUTTON_NONE) + while (rb->button_get(false) != BUTTON_NONE) rb->yield(); while(!menuquit) diff --git a/apps/plugins/fireworks.c b/apps/plugins/fireworks.c index 5f547ed5e0..40ed470791 100644 --- a/apps/plugins/fireworks.c +++ b/apps/plugins/fireworks.c @@ -215,7 +215,7 @@ static const struct opt_items fps_settings[9] = { int fps_values[9] = { 20, 25, 30, 35, 40, 45, 50, 55, 60 }; -MENUITEM_STRINGLIST(menu, "Fireworks Menu", NULL, +MENUITEM_STRINGLIST(menu, "Fireworks", NULL, "Start Demo", "Auto-Fire", "Particles Per Firework", "Particle Life", "Gravity", "Show Rockets", "FPS (Speed)", "Playback Control", "Quit"); diff --git a/apps/plugins/goban/goban.c b/apps/plugins/goban/goban.c index b041f7cd73..a0aa39036e 100644 --- a/apps/plugins/goban/goban.c +++ b/apps/plugins/goban/goban.c @@ -612,7 +612,7 @@ static bool do_main_menu (void) { int selection = 0; - MENUITEM_STRINGLIST (menu, "Rockbox Goban", NULL, + MENUITEM_STRINGLIST (menu, "Goban", NULL, "New", "Save", "Save As", @@ -620,7 +620,7 @@ do_main_menu (void) "Playback Control", "Zoom Level", "Options", - "Context Menu", + "Perform Task", "Quit"); /* for "New" in menu */ @@ -997,7 +997,7 @@ do_context_menu (void) bool done = false; int temp; - MENUITEM_STRINGLIST (context_menu, "Context Menu", NULL, + MENUITEM_STRINGLIST (context_menu, "Perform Task", NULL, "Play Mode (default)", "Add Black Mode", "Add White Mode", @@ -1132,7 +1132,7 @@ do_options_menu (void) int selection; bool done = false; - MENUITEM_STRINGLIST (options_menu, "Options Menu", NULL, + MENUITEM_STRINGLIST (options_menu, "Options", NULL, "Show Child Variations?", "Disable Idle Poweroff?", "Idle Autosave Time", diff --git a/apps/plugins/imageviewer/imageviewer.c b/apps/plugins/imageviewer/imageviewer.c index 3595cb9c3c..b9213decf1 100644 --- a/apps/plugins/imageviewer/imageviewer.c +++ b/apps/plugins/imageviewer/imageviewer.c @@ -275,7 +275,7 @@ static int show_menu(void) /* return 1 to quit */ MIID_QUIT, }; - MENUITEM_STRINGLIST(menu, "Image Viewer Menu", NULL, + MENUITEM_STRINGLIST(menu, "Image Viewer", NULL, ID2P(LANG_RETURN), ID2P(LANG_SLIDESHOW_MODE), ID2P(LANG_SLIDESHOW_TIME), @@ -1112,10 +1112,10 @@ enum plugin_status plugin_start(const void* parameter) if (!parameter) { if (!find_album_art(&offset, &filesize, &status)) - { - rb->splash(HZ * 2, "No file"); - return PLUGIN_ERROR; - } + { + rb->splash(HZ * 2, "No file"); + return PLUGIN_ERROR; + } is_album_art = true; } @@ -1123,10 +1123,10 @@ enum plugin_status plugin_start(const void* parameter) { rb->strcpy(np_file, parameter); if ((status = get_image_type(np_file, false)) == IMAGE_UNKNOWN) - { - rb->splash(HZ * 2, "Unsupported file"); - return PLUGIN_ERROR; - } + { + rb->splash(HZ * 2, "Unsupported file"); + return PLUGIN_ERROR; + } } #ifdef USE_PLUG_BUF diff --git a/apps/plugins/jewels.c b/apps/plugins/jewels.c index 66da8bc96a..0f72490256 100644 --- a/apps/plugins/jewels.c +++ b/apps/plugins/jewels.c @@ -1480,7 +1480,7 @@ static int jewels_game_menu(struct game_context* bj, bool ingame) { "Puzzle", -1 }, }; - MENUITEM_STRINGLIST (main_menu, "Jewels Menu", jewels_menu_cb, + MENUITEM_STRINGLIST (main_menu, "Jewels", jewels_menu_cb, "Resume Game", "Start New Game", "Mode", diff --git a/apps/plugins/lrcplayer.c b/apps/plugins/lrcplayer.c index 659373259d..b201a8deb8 100644 --- a/apps/plugins/lrcplayer.c +++ b/apps/plugins/lrcplayer.c @@ -2419,7 +2419,7 @@ static const char* lrc_debug_data(int selected, void * data, static bool lrc_debug_menu(void) { struct simplelist_info info; - rb->simplelist_info_init(&info, "Debug Menu", 6, NULL); + rb->simplelist_info_init(&info, "Debug", 6, NULL); info.scroll_all = true; info.get_name = lrc_debug_data; return rb->simplelist_show_list(&info); @@ -2442,13 +2442,13 @@ static int lrc_menu(void) LRC_MENU_QUIT, }; - MENUITEM_STRINGLIST(menu, "Lrcplayer Menu", NULL, + MENUITEM_STRINGLIST(menu, "Lrcplayer", NULL, "Theme Settings", "Display Settings", "Lyrics Settings", "Playback Control", #ifdef LRC_DEBUG - "Debug Menu", + "Debug", #endif "Time Offset", "Timetag Editor", "Quit"); diff --git a/apps/plugins/mazezam.c b/apps/plugins/mazezam.c index 1183f8f502..c2093e538b 100644 --- a/apps/plugins/mazezam.c +++ b/apps/plugins/mazezam.c @@ -61,7 +61,7 @@ const struct button_mapping *plugin_contexts[] #define MAZEZAM_TEXT_CHECKPOINT "Checkpoint reached" #define MAZEZAM_TEXT_WELLDONE_TITLE "You have escaped!" #define MAZEZAM_TEXT_WELLDONE_OPTION "Goodbye" -#define MAZEZAM_TEXT_MAZEZAM_MENU "MazezaM Menu" +#define MAZEZAM_TEXT_MAZEZAM_MENU "MazezaM" #define MAZEZAM_TEXT_RETRY_LEVEL "Retry level" #define MAZEZAM_TEXT_AUDIO_PLAYBACK "Playback Control" #define MAZEZAM_TEXT_QUIT "Quit" @@ -243,7 +243,7 @@ static struct { /***************************************************************************** * Store the LCD settings ******************************************************************************/ -static void store_lcd_settings(void) +static void store_lcd_settings(void) { /* Store the old settings */ #if LCD_DEPTH > 1 @@ -390,7 +390,7 @@ static void draw_row( /* adding width to i should have a fixed, but randomising effect on * the choice of the colours of the top line of chunks */ - rb->lcd_set_foreground(chunk_colors[(i+width) % + rb->lcd_set_foreground(chunk_colors[(i+width) % MAZEZAM_NUM_CHUNK_COLORS]); #endif for (j = 0; jl_num[i]; j++) { @@ -607,7 +607,7 @@ static void level_loop(struct level_info* li, short* shift, short *x, short *y) blocked = blocked || (*x+1 == shift[*y]+li->cd.c_inset[*y][i]); if (!blocked) *x += 1; - else if (shift[*y] + else if (shift[*y] + li->cd.c_inset[*y][li->cd.l_num[*y]-1] + li->cd.c_width[*y][li->cd.l_num[*y]-1] < li->width) { @@ -673,9 +673,9 @@ static void in_game_menu(void) /***************************************************************************** * Is the level a checkpoint ******************************************************************************/ -static bool at_checkpoint(int level) +static bool at_checkpoint(int level) { - if (level <= MAZEZAM_FIRST_CHECKPOINT) + if (level <= MAZEZAM_FIRST_CHECKPOINT) return level == MAZEZAM_FIRST_CHECKPOINT; else { level = level - MAZEZAM_FIRST_CHECKPOINT; @@ -852,7 +852,7 @@ static void resume_save_data (struct resume_data *r, struct resume_data *old) } /***************************************************************************** -* Manages the main menu +* Manages the main menu ******************************************************************************/ static bool have_continue; static int main_menu_cb(int action, @@ -918,7 +918,7 @@ static void main_menu(void) } /***************************************************************************** -* Plugin entry point +* Plugin entry point ******************************************************************************/ enum plugin_status plugin_start(const void* parameter) { diff --git a/apps/plugins/mikmod/mikmod.c b/apps/plugins/mikmod/mikmod.c index 1c09f7ff39..3ab40f570c 100644 --- a/apps/plugins/mikmod/mikmod.c +++ b/apps/plugins/mikmod/mikmod.c @@ -652,7 +652,7 @@ static int main_menu(void) int selection = 0; int result; - MENUITEM_STRINGLIST(main_menu,ID2P(LANG_MIKMOD_MENU), NULL, + MENUITEM_STRINGLIST(main_menu,"Mikmod", NULL, ID2P(LANG_SETTINGS), ID2P(LANG_RETURN), ID2P(LANG_MENU_QUIT)); diff --git a/apps/plugins/minesweeper.c b/apps/plugins/minesweeper.c index 6ba31598ed..8bf5511b6b 100644 --- a/apps/plugins/minesweeper.c +++ b/apps/plugins/minesweeper.c @@ -821,7 +821,7 @@ static enum minesweeper_status menu( void ) int selection = 0, result = MINESWEEPER_QUIT; bool menu_quit = false; - MENUITEM_STRINGLIST( menu, "Minesweeper Menu", NULL, "Play Minesweeper", + MENUITEM_STRINGLIST( menu, "Minesweeper", NULL, "Play Minesweeper", "Mine Percentage", "Number of Rows", "Number of Columns", "Playback Control", "Quit" ); diff --git a/apps/plugins/mpegplayer/mpeg_settings.c b/apps/plugins/mpegplayer/mpeg_settings.c index e9b14a946a..46f4ad6fed 100644 --- a/apps/plugins/mpegplayer/mpeg_settings.c +++ b/apps/plugins/mpegplayer/mpeg_settings.c @@ -1038,7 +1038,7 @@ static int show_start_menu(uint32_t duration) int result = 0; bool menu_quit = false; - MENUITEM_STRINGLIST(menu, "Mpegplayer Menu", mpeg_sysevent_callback, + MENUITEM_STRINGLIST(menu, "MPEG Player", mpeg_sysevent_callback, ID2P(LANG_RESTART_PLAYBACK), ID2P(LANG_RESUME_PLAYBACK), ID2P(LANG_SET_RESUME_TIME), @@ -1138,7 +1138,7 @@ int mpeg_menu(void) { int result; - MENUITEM_STRINGLIST(menu, "Mpegplayer Menu", mpeg_sysevent_callback, + MENUITEM_STRINGLIST(menu, "MPEG Player", mpeg_sysevent_callback, ID2P(LANG_SETTINGS), ID2P(LANG_RESUME_PLAYBACK), ID2P(LANG_MENU_QUIT)); diff --git a/apps/plugins/multiboot_select.c b/apps/plugins/multiboot_select.c index 02049f80fe..865e9c0066 100644 --- a/apps/plugins/multiboot_select.c +++ b/apps/plugins/multiboot_select.c @@ -336,7 +336,7 @@ static int menu_action_cb(int action, struct gui_synclist* lists) static bool show_menu(void) { struct simplelist_info info; - rb->simplelist_info_init(&info, "Multiboot Settings", MB_NUM_ITEMS, NULL); + rb->simplelist_info_init(&info, "Multiboot", MB_NUM_ITEMS, NULL); info.get_name = menu_get_name_cb; info.action_callback = menu_action_cb; return rb->simplelist_show_list(&info); diff --git a/apps/plugins/pacbox/pacbox.c b/apps/plugins/pacbox/pacbox.c index b306503862..a7f662a823 100755 --- a/apps/plugins/pacbox/pacbox.c +++ b/apps/plugins/pacbox/pacbox.c @@ -175,14 +175,14 @@ static long video_frames = 0; static int dipDifficulty[] = { DipDifficulty_Normal, DipDifficulty_Hard }; static int dipLives[] = { DipLives_1, DipLives_2, DipLives_3, DipLives_5 }; -static int dipBonus[] = { DipBonus_10000, DipBonus_15000, DipBonus_20000, +static int dipBonus[] = { DipBonus_10000, DipBonus_15000, DipBonus_20000, DipBonus_None }; static int dipGhostNames[] = { DipGhostNames_Normal, DipGhostNames_Alternate }; static int settings_to_dip(struct pacman_settings settings) { - return ( DipPlay_OneCoinOneGame | - DipCabinet_Upright | + return ( DipPlay_OneCoinOneGame | + DipCabinet_Upright | DipMode_Play | DipRackAdvance_Off | @@ -245,7 +245,7 @@ static bool pacbox_menu(void) PBMI_QUIT, }; - MENUITEM_STRINGLIST(menu, "Pacbox Menu", NULL, + MENUITEM_STRINGLIST(menu, "Pacbox", NULL, "Difficulty", "Pacmen Per Game", "Bonus Life", "Ghost Names", "Display FPS", "Sound", #ifdef AI @@ -254,7 +254,7 @@ static bool pacbox_menu(void) "Restart", "Quit"); rb->button_clear_queue(); - + #if defined(HAVE_LCD_MODES) && (HAVE_LCD_MODES & LCD_MODE_PAL256) rb->lcd_set_mode(LCD_MODE_RGB565); #endif @@ -323,7 +323,7 @@ static bool pacbox_menu(void) break; } } - + #if defined(HAVE_LCD_MODES) && (HAVE_LCD_MODES & LCD_MODE_PAL256) rb->lcd_set_mode(LCD_MODE_PAL256); #endif @@ -332,7 +332,7 @@ static bool pacbox_menu(void) init_PacmanMachine(settings_to_dip(settings)); } - /* Possible results: + /* Possible results: exit game restart game usb connected @@ -374,7 +374,7 @@ static void get_more(const void **start, size_t *size) while (out < outend); *start = sound_buf; - *size = NBSAMPLES*sizeof(sound_buf[0]); + *size = NBSAMPLES*sizeof(sound_buf[0]); } /* @@ -387,7 +387,7 @@ static void start_sound(void) if (sound_playing) return; -#ifndef PLUGIN_USE_IRAM +#ifndef PLUGIN_USE_IRAM /* Ensure control of PCM - stopping music itn't obligatory */ rb->plugin_get_audio_buffer(NULL); #endif @@ -451,7 +451,7 @@ void joystick(void) #ifdef PACMAN_2UP setDeviceMode( Key_TwoPlayers, (status & PACMAN_2UP) ? DeviceOn : DeviceOff); #endif -#endif +#endif #ifdef CHEATS // skip level for testing purposes if(status == SKIP_LEVEL) @@ -523,7 +523,7 @@ unsigned char ai( unsigned char turn ) rb->splash(HZ/2, "AI will engage at next level start"); return 0; } - + /* reset joystick direction on level start */ if(!(ram_[0x4E0E] || turn)) { @@ -573,12 +573,12 @@ unsigned char ai( unsigned char turn ) { ai_turn(level,turn); turn++; - } + } }else if( position == ai_location[level][turn] ) /* handle turns using pacman's location as basis for turn timing */ { ai_turn(level,turn); turn++; - } + } } /* reset turn counter and joystick direction on level start */ @@ -679,7 +679,7 @@ static int gameProc( void ) #else joystick(); #endif - /* We only update the screen every third frame - Pacman's native + /* We only update the screen every third frame - Pacman's native framerate is 60fps, so we are attempting to display 20fps */ if (frame_counter == 60 / FPS) { @@ -693,16 +693,16 @@ static int gameProc( void ) rb->yield (); } - /* The following functions render the Pacman screen from the - contents of the video and color ram. We first update the - background, and then draw the Sprites on top. + /* The following functions render the Pacman screen from the + contents of the video and color ram. We first update the + background, and then draw the Sprites on top. */ renderBackground( video_buffer ); renderSprites( video_buffer ); #if defined(HAVE_LCD_MODES) && (HAVE_LCD_MODES & LCD_MODE_PAL256) - rb->lcd_blit_pal256( video_buffer, 0, 0, XOFS, YOFS, + rb->lcd_blit_pal256( video_buffer, 0, 0, XOFS, YOFS, ScreenWidth, ScreenHeight); #else blit_display(lcd_fb ,video_buffer); @@ -768,7 +768,7 @@ enum plugin_status plugin_start(const void* parameter) SETTINGS_VERSION); } - /* Keep a copy of the saved version of the settings - so we can check if + /* Keep a copy of the saved version of the settings - so we can check if the settings have changed when we quit */ old_settings = settings; @@ -780,7 +780,7 @@ enum plugin_status plugin_start(const void* parameter) /* Initialise the hardware */ init_PacmanMachine(settings_to_dip(settings)); - + #if defined(HAVE_LCD_MODES) && (HAVE_LCD_MODES & LCD_MODE_PAL256) rb->lcd_set_mode(LCD_MODE_PAL256); #endif @@ -801,7 +801,7 @@ enum plugin_status plugin_start(const void* parameter) } else { rb->splashf(HZ*2, "No ROMs in %s/pacman/", ROCKBOX_DIR); } - + #if defined(HAVE_LCD_MODES) && (HAVE_LCD_MODES & LCD_MODE_PAL256) rb->lcd_set_mode(LCD_MODE_RGB565); #endif diff --git a/apps/plugins/pegbox.c b/apps/plugins/pegbox.c index 72e9ba06bf..63ec9de335 100644 --- a/apps/plugins/pegbox.c +++ b/apps/plugins/pegbox.c @@ -1355,7 +1355,7 @@ static unsigned int pegbox_menu(struct game_context* pb, bool ingame) int selected = 0; int last_level = pb->level; - MENUITEM_STRINGLIST (main_menu, "Pegbox Menu", pegbox_menu_cb, + MENUITEM_STRINGLIST (main_menu, "Pegbox", pegbox_menu_cb, "Resume Game", "Restart Level", "Start Game", "Select Level", "Help", "Playback Control", "Quit"); diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c index 841281c8e6..73bf98154b 100644 --- a/apps/plugins/pictureflow/pictureflow.c +++ b/apps/plugins/pictureflow/pictureflow.c @@ -3700,7 +3700,7 @@ static int main_menu(void) rb->lcd_set_foreground(N_BRIGHT(255)); #endif - MENUITEM_STRINGLIST(main_menu, "PictureFlow Main Menu", NULL, + MENUITEM_STRINGLIST(main_menu, "PictureFlow", NULL, ID2P(LANG_SORT_ALBUMS_BY), ID2P(LANG_SHOW_TRACKS_WHILE_BROWSING), ID2P(LANG_GOTO_LAST_ALBUM), diff --git a/apps/plugins/pixel-painter.lua b/apps/plugins/pixel-painter.lua index 5c1981a7a2..43f21420f7 100644 --- a/apps/plugins/pixel-painter.lua +++ b/apps/plugins/pixel-painter.lua @@ -568,7 +568,7 @@ The bottom right displays the number of moves taken, the number of moves used by function app_menu() local options = {"Resume game", "Start new game", "Change difficulty", "Help", "Quit without saving", "Quit"} - local item = rb.do_menu("Pixel painter menu", options, nil, false) + local item = rb.do_menu("Pixel Painter", options, nil, false) if item == 0 then redraw_game(game_state, highscores) diff --git a/apps/plugins/puzzles/rockbox.c b/apps/plugins/puzzles/rockbox.c index 59761ff475..172207b63b 100644 --- a/apps/plugins/puzzles/rockbox.c +++ b/apps/plugins/puzzles/rockbox.c @@ -2624,7 +2624,7 @@ static void bench_aa(void) static void debug_menu(void) { - MENUITEM_STRINGLIST(menu, "Debug Menu", NULL, + MENUITEM_STRINGLIST(menu, "Debug", NULL, "Slowmo factor", "Randomize colors", "Toggle flash pixel on timer", @@ -2815,7 +2815,7 @@ static int pause_menu(void) "Extensive Help", // 8 "Playback Control", // 9 "Game Type", // 10 - "Debug Menu", // 11 + "Debug", // 11 "Configure Game", // 12 "Preferences", // 13 "Quit without Saving", // 14 @@ -3414,7 +3414,7 @@ static void puzzles_main(void) #endif /* must be done before any menu needs to be displayed */ - rb->snprintf(menu_desc, sizeof(menu_desc), "%s Menu", midend_which_game(me)->name); + rb->snprintf(menu_desc, sizeof(menu_desc), "%s", midend_which_game(me)->name); #ifdef HAVE_ADJUSTABLE_CPU_FREQ /* about to go to menu or button block */ diff --git a/apps/plugins/random_folder_advance_config.c b/apps/plugins/random_folder_advance_config.c index 3d762c6db7..5dd9deac29 100644 --- a/apps/plugins/random_folder_advance_config.c +++ b/apps/plugins/random_folder_advance_config.c @@ -328,7 +328,7 @@ static int edit_list(void) case ACTION_STD_CONTEXT: { int len; - MENUITEM_STRINGLIST(menu, "Remove Menu", NULL, + MENUITEM_STRINGLIST(menu, "Remove", NULL, "Remove Folder", "Remove Folder Tree"); switch (rb->do_menu(&menu, NULL, NULL, false)) @@ -357,7 +357,7 @@ static int edit_list(void) break; case ACTION_STD_CANCEL: { - MENUITEM_STRINGLIST(menu, "Exit Menu", NULL, + MENUITEM_STRINGLIST(menu, "Exit", NULL, "Save and Exit", "Ignore Changes and Exit"); switch (rb->do_menu(&menu, NULL, NULL, false)) @@ -548,7 +548,7 @@ static int start_shuffled_play(void) static enum plugin_status main_menu(void) { bool exit = false; - MENUITEM_STRINGLIST(menu, "Main Menu", NULL, + MENUITEM_STRINGLIST(menu, "Random Folder Advance", NULL, "Generate Folder List", "Edit Folder List", "Export List To Textfile", diff --git a/apps/plugins/resistor.c b/apps/plugins/resistor.c index 4461dc0dea..97a62860dd 100644 --- a/apps/plugins/resistor.c +++ b/apps/plugins/resistor.c @@ -3,7 +3,7 @@ TODO: [ ] Own numeric keypad */ - + #include "plugin.h" #include "lib/display_text.h" #include "lib/pluginlib_actions.h" @@ -89,7 +89,7 @@ enum color { static int common_values[] = { 0, 1, 10, 15, 22, 27, 33, 39, 47, 51, 68, 82 }; static int power_ratings[] = { 125, 250, 500, 1000, 2000, 3000, 5000, 10000, 50000 }; /* All in mW */ - + #ifndef LCD_RGBPACK /* Warning: dirty kludge */ #define LCD_RGBPACK(x,y,z) 0 @@ -130,7 +130,7 @@ static struct screen *display; static int lineno; -static char *get_power_rating_str(int in_rating) +static char *get_power_rating_str(int in_rating) { switch(in_rating) { case 125: @@ -151,7 +151,7 @@ static char *get_power_rating_str(int in_rating) return "10 Watt"; case 500000: return "50 Watt"; - default: + default: return "Unknown"; } } @@ -221,11 +221,11 @@ static void draw_resistor(enum color firstband_color, rb->lcd_clear_display(); display->set_viewport(&bitmap_vp); - rb->lcd_bitmap_transparent(resistor, RESISTOR_BMP_X, 0, + rb->lcd_bitmap_transparent(resistor, RESISTOR_BMP_X, 0, BMPWIDTH_resistor, BMPHEIGHT_resistor); fg = rb->lcd_get_foreground(); - + if(firstband_color != RES_NONE) { rb->lcd_set_foreground(band_data[firstband_color].color_value); rb->lcd_fillrect(first_band_x, universal_y, band_width, band_height); @@ -233,7 +233,7 @@ static void draw_resistor(enum color firstband_color, rb->lcd_set_foreground(LCD_BLACK); rb->lcd_drawrect(first_band_x, universal_y, band_width, band_height); } - + if(secondband_color != RES_NONE) { rb->lcd_set_foreground(band_data[secondband_color].color_value); rb->lcd_fillrect(second_band_x, universal_y, band_width, band_height); @@ -241,25 +241,25 @@ static void draw_resistor(enum color firstband_color, rb->lcd_set_foreground(LCD_BLACK); rb->lcd_drawrect(second_band_x, universal_y, band_width, band_height); } - - if(thirdband_color != RES_NONE) { + + if(thirdband_color != RES_NONE) { rb->lcd_set_foreground(band_data[thirdband_color].color_value); rb->lcd_fillrect(third_band_x, universal_y, band_width, band_height); } else { rb->lcd_set_foreground(LCD_BLACK); rb->lcd_drawrect(third_band_x, universal_y, band_width, band_height); } - - if(fourthband_color != RES_NONE) { + + if(fourthband_color != RES_NONE) { rb->lcd_set_foreground(band_data[fourthband_color].color_value); rb->lcd_fillrect(fourth_band_x, universal_y, band_width, band_height); } else { rb->lcd_set_foreground(LCD_BLACK); rb->lcd_drawrect(fourth_band_x, universal_y, band_width, band_height); } - + rb->lcd_set_foreground(fg); - + rb->lcd_update(); return; } @@ -280,17 +280,17 @@ static void draw_resistor_text(enum color firstband_color, rb->lcd_puts_scroll(resistance_val_x, lineno++, resistance_vals_str); rb->lcd_update(); } - + static int calculate_resistance(enum color first_band, - enum color second_band, + enum color second_band, enum color third_band) { int tens = band_data[first_band].resistance_value; int units = band_data[second_band].resistance_value; int multiplier = band_data[third_band].multiplier; - int total_resistance_centiunits = (10 * tens + units ) * multiplier; - + int total_resistance_centiunits = (10 * tens + units ) * multiplier; + unit_abbrev = band_data[third_band].unit; return total_resistance_centiunits; @@ -300,11 +300,11 @@ static enum color do_first_band_menu(void) { int band_selection = 0; enum color band_color_selection = 0; - - MENUITEM_STRINGLIST(colors_menu_first, "First band colour:", NULL, + + MENUITEM_STRINGLIST(colors_menu_first, "First band colour:", NULL, "Black", "Brown", "Red", "Orange", "Yellow", "Green", "Blue", "Violet", "Grey", "White"); - band_selection = rb->do_menu(&colors_menu_first, &band_selection, NULL, + band_selection = rb->do_menu(&colors_menu_first, &band_selection, NULL, false); switch(band_selection) { case 0: /* Black */ @@ -343,16 +343,16 @@ static enum color do_first_band_menu(void) } return band_color_selection; } - -static enum color do_second_band_menu(void) + +static enum color do_second_band_menu(void) { int band_selection = 0; enum color band_color_selection = 0; - - MENUITEM_STRINGLIST(colors_menu_second, "Second band colour:", NULL, - "Black", "Brown", "Red", "Orange", "Yellow", + + MENUITEM_STRINGLIST(colors_menu_second, "Second band colour:", NULL, + "Black", "Brown", "Red", "Orange", "Yellow", "Green", "Blue", "Violet", "Grey", "White"); - band_selection = rb->do_menu(&colors_menu_second, &band_selection, NULL, + band_selection = rb->do_menu(&colors_menu_second, &band_selection, NULL, false); switch(band_selection) { case 0: /* Black */ @@ -391,17 +391,17 @@ static enum color do_second_band_menu(void) } return band_color_selection; } - -static enum color do_third_band_menu(void) + +static enum color do_third_band_menu(void) { int band_selection = 0; enum color band_color_selection = 0; - - MENUITEM_STRINGLIST(colors_menu_third, "Third band colour:", NULL, + + MENUITEM_STRINGLIST(colors_menu_third, "Third band colour:", NULL, "Black", "Brown", "Red", "Orange", "Yellow", "Green", "Blue", "Violet", "Grey", "White", "Silver", "Gold"); - band_selection = rb->do_menu(&colors_menu_third, &band_selection, NULL, + band_selection = rb->do_menu(&colors_menu_third, &band_selection, NULL, false); switch(band_selection) { case 0: /* Black */ @@ -446,15 +446,15 @@ static enum color do_third_band_menu(void) } return band_color_selection; } - -static enum color do_fourth_band_menu(void) + +static enum color do_fourth_band_menu(void) { int band_selection = 0; enum color band_color_selection = 0; - - MENUITEM_STRINGLIST(colors_menu_fourth, "Fourth band colour:", NULL, + + MENUITEM_STRINGLIST(colors_menu_fourth, "Fourth band colour:", NULL, "Gold", "Brown", "Red", "Silver", "(none)"); - band_selection = rb->do_menu(&colors_menu_fourth, &band_selection, NULL, + band_selection = rb->do_menu(&colors_menu_fourth, &band_selection, NULL, false); switch(band_selection) { case 0: /* Gold */ @@ -487,8 +487,8 @@ static void display_helpfile(void) "Resistor Calculator Helpfile", "", "", "About resistors:", "", /* 7 */ /* -- */ - "A", "resistor", "is", "a ", "two-terminal", "electronic", - "component", "that", "produces", "a", "voltage", "across", "its", + "A", "resistor", "is", "a ", "two-terminal", "electronic", + "component", "that", "produces", "a", "voltage", "across", "its", "terminals", "that", "is", "proportional", "to", "the", "electric", "current", "passing", "through", "it", "in", "accordance", "to", "Ohm's", "Law:", "", /* 29 */ @@ -497,18 +497,18 @@ static void display_helpfile(void) "", "I = V/R", "", "and", "", "R = V/I", "", "", - "Where", "V", "=", "voltage, ", "I", "=", "current", "(in", "amps)", + "Where", "V", "=", "voltage, ", "I", "=", "current", "(in", "amps)", "and", "R", "=", "resistance", "(measured", "in", "Ohms).", "", "", /* 28 */ /* -- */ "The", "primary", "characteristics", "of", "a", "resistor", "are", "the", "resistance,", "the", "tolerance,", "and", "the", "maximum", - "working", "voltage", "and", "the", "power", "rating.", "At", + "working", "voltage", "and", "the", "power", "rating.", "At", "this", "time,", "this", "calculator", "only", "utilises", "the", "resistance", "and", "tolerance.", "", "", /* 33 */ /* -- */ "The", "Ohm", "is", "the", "SI", "unit", "of", "resistance,", "and", - "common", "multiples", "of", "that", "include", "the", "kiloohm", + "common", "multiples", "of", "that", "include", "the", "kiloohm", "(KOhm", "-", "1x10^3)", "and", "the", "megaohm", "(MOhm", "-", "1x10^6),", "both", "of", "which", "are", "supported", "by", "this", "calculator.", "", "", /* 34 */ @@ -536,25 +536,25 @@ static void display_helpfile(void) "resistor", "for", "which", "you", "would", "like", "to", "know", "the", "resistance.", "", "", /* -- */ - "In", "Resistance", "to", "Colour", "mode,", "use", "the", "menus", + "In", "Resistance", "to", "Colour", "mode,", "use", "the", "menus", "to", "select", "which", "unit", "to", "use", "(choose", "from", "Ohms,", "KiloOhms", "and", "MegaOhms)", "and", "the", "on-screen", "keyboard", "to", "input", "the", "value", "of", "the", "resistor", "that", "you", "would", "like", "to", "know", "the", "colour", "codes", "of.", "Output", "will", "be", "both", "graphical", "(with", "bands", "of", - "the", "resistor", "shown", "in", "their", "corresponding", "colours", + "the", "resistor", "shown", "in", "their", "corresponding", "colours", "-", "colour", "targets", "only)", "and", "textually.", "","", /* -- */ "LED", "resistor", "calculator", "mode", "is", "used", "to", "determine", "the", "resistor", "necessary", "to", "light", "a", "LED", "safely", - "at", "a", "given", "voltage.", "First,", "select", "the", "voltage", - "that", "the", "LED", "will", "use", "(the", "first", "option", "is", + "at", "a", "given", "voltage.", "First,", "select", "the", "voltage", + "that", "the", "LED", "will", "use", "(the", "first", "option", "is", "the", "most", "common", "and", "is", "a", "safe", "guess)", "and", "the", "current", "that", "it", "will", "draw", "(likewise", "with", "the", "first", "option).", "Then", "use", "the", "onscreen", "keyboard", "to", - "type", "in", "the", "supply", "voltage", "and,", "if", "selected,", - "the", "custom", "foreward", "current.", "", - "Disclaimer:", "this", + "type", "in", "the", "supply", "voltage", "and,", "if", "selected,", + "the", "custom", "foreward", "current.", "", + "Disclaimer:", "this", "calculator", "produces", "safe", "estimates,", "but", "use", "your", "own", "judgement", "when", "using", "these", "output", "values.", "Power", "rating", "and", "displayed", "resistance", "are", "rounded", @@ -593,30 +593,30 @@ static void led_resistance_calc(void) char true_current_out_str [40]; char rounded_resistance_out_str [40]; char power_rating_out_str [40]; - + int power_ten, first_band_int, second_band_int = 0; - + enum color first_band; enum color second_band; enum color multiplier; enum color fourth_band = RES_NONE; - + rb->lcd_clear_display(); - + MENUITEM_STRINGLIST(voltage_menu, "Select LED voltage:", NULL, "2v (Common red, orange)", "1.5v (IR)", "2.1v (Yellow)", - "2.2v (Green)", "3.3v (True green, blue, white, UV)", + "2.2v (Green)", "3.3v (True green, blue, white, UV)", "4.6v (Blue - 430nm)"); MENUITEM_STRINGLIST(fwd_current_menu, "Select foreward current:", NULL, "20mA - Most common for 5mm and 3mm LEDs - select if unsure.", "Key in other (only if already known)"); - + while(!quit) { int ret; - ret = voltage_menu_selection = rb->do_menu(&voltage_menu, + ret = voltage_menu_selection = rb->do_menu(&voltage_menu, &voltage_menu_selection, NULL, false); if(ret<0) break; - ret = fwd_current_selection = rb->do_menu(&fwd_current_menu, + ret = fwd_current_selection = rb->do_menu(&fwd_current_menu, &fwd_current_selection, NULL, false); if(ret<0) break; rb->lcd_clear_display(); @@ -632,7 +632,7 @@ static void led_resistance_calc(void) input_voltage *= 10; } else { input_voltage *= 100; } - + switch(voltage_menu_selection) { case 0: /* 2v */ led_voltage = 200; @@ -665,30 +665,30 @@ static void led_resistance_calc(void) foreward_current = ((rb->atoi(fwd_kbd_buffer))/10); break; } - + if(foreward_current == 0) break; rb->lcd_clear_display(); - + resistance = (input_voltage - led_voltage) / foreward_current; out_int = resistance; - + int total_common_values = 11; int total_power_values = 9; - + if(led_voltage > input_voltage) { rb->splash(HZ, "Problem: LED voltage is higher than the source."); break; } - + for(j = 0; j < total_common_values; j++) { for(k = 1; k < 5; k++) { if( resistance == (common_values[j] * powi(10, k))) { - rounded_resistance = (common_values[j] * powi(10, k)); + rounded_resistance = (common_values[j] * powi(10, k)); /* perfect match */ break; } - else if(resistance >= (common_values[j] * powi(10, k)) && + else if(resistance >= (common_values[j] * powi(10, k)) && resistance <= (common_values[j+1] * powi(10, k))) { rounded_resistance = (common_values[j+1] * powi(10, k)); /* the higher resistance, to be safe */ @@ -697,8 +697,8 @@ static void led_resistance_calc(void) else { break; } } } - - if(rounded_resistance == 0) + + if(rounded_resistance == 0) { rb->splash(HZ, "Problem: Input voltage too high."); break; @@ -710,16 +710,16 @@ static void led_resistance_calc(void) rounded_power_rating = (power_ratings[l]); break; } - else if(power_rating_in >= power_ratings[l] && + else if(power_rating_in >= power_ratings[l] && power_rating_in <= power_ratings[l+1]) { rounded_power_rating = power_ratings[l+1]; break; } else { break; } } - - get_power_rating_str(rounded_power_rating); - + + get_power_rating_str(rounded_power_rating); + power_ten=0; temp=rounded_resistance; while(temp>=100) { @@ -728,29 +728,29 @@ static void led_resistance_calc(void) } first_band_int=temp/10; second_band_int=temp%10; - + first_band = get_band_rtoc(first_band_int); second_band = get_band_rtoc(second_band_int); multiplier = get_band_rtoc(power_ten); - + rb->lcd_clear_display(); lineno = INITIAL_TEXT_Y; #ifndef USE_TEXT_ONLY draw_resistor(first_band, second_band, multiplier, fourth_band); #endif draw_resistor_text(first_band, second_band, multiplier, fourth_band); - - rb->snprintf(current_out_str, sizeof(current_out_str), "%d mA", + + rb->snprintf(current_out_str, sizeof(current_out_str), "%d mA", (foreward_current*10)); - - rb->snprintf(true_current_out_str, sizeof(true_current_out_str), - "Input: %dv, %d Ohms @ %s", (input_voltage/100), + + rb->snprintf(true_current_out_str, sizeof(true_current_out_str), + "Input: %dv, %d Ohms @ %s", (input_voltage/100), out_int, current_out_str); - rb->snprintf(rounded_resistance_out_str, - sizeof(rounded_resistance_out_str), - "Rounded/displayed: [%d %s]", rounded_resistance, + rb->snprintf(rounded_resistance_out_str, + sizeof(rounded_resistance_out_str), + "Rounded/displayed: [%d %s]", rounded_resistance, band_data[multiplier].unit); - rb->snprintf(power_rating_out_str, sizeof(power_rating_out_str), + rb->snprintf(power_rating_out_str, sizeof(power_rating_out_str), "Recommended: %s or greater", get_power_rating_str(rounded_power_rating)); @@ -792,35 +792,35 @@ static void resistance_to_color(void) int kbd_input_int; int temp; int in_resistance_int; - + int power_ten=0; int first_band_int = 0; int second_band_int = 0; - + enum color first_band; enum color second_band; enum color multiplier; enum color fourth_band = 0; enum color units_used = 0; - + char out_str[20]; memset(kbd_buffer,0,sizeof(kbd_buffer)); /* This cleans out the mysterious garbage that appears */ rb->lcd_clear_display(); rb->splash(HZ/2, "Resistance to Colour"); - MENUITEM_STRINGLIST(r_to_c_menu, "Select unit to use:", NULL, + MENUITEM_STRINGLIST(r_to_c_menu, "Select unit to use:", NULL, "Ohms", "Kiloohms (KOhms)", "Megaohms (MOhms)", "Gigaohms (GOhms)"); MENUITEM_STRINGLIST(r_to_c_menu_tol, "Tolerance to display:", NULL, "5%", "10%", "1%", "2%", "20%"); - + while(!quit) { int ret; ret=menu_selection = rb->do_menu(&r_to_c_menu, &menu_selection, NULL, false); if(ret<0) break; - + rb->kbd_input(kbd_buffer, sizeof(kbd_buffer), NULL); /* As stated above somewhere, we (I) need to make a calculator-like keypad, that keyboard isn't all that fun to use. */ @@ -845,10 +845,10 @@ static void resistance_to_color(void) fourth_band = RES_NONE; break; } - + kbd_input_int = rb->atoi(kbd_buffer); in_resistance_int = kbd_input_int; - + switch(menu_selection) { case 0: power_ten=0; @@ -959,18 +959,18 @@ static void color_to_resistance(void) lineno = INITIAL_TEXT_Y; #ifndef USE_TEXT_ONLY draw_resistor(first_band, second_band, third_band, fourth_band); -#endif +#endif draw_resistor_text(first_band, second_band, third_band, fourth_band); if(total_resistance_centiunits % 100 == 0) { /* No decimals */ - rb->snprintf(total_resistance_str, sizeof(total_resistance_str), + rb->snprintf(total_resistance_str, sizeof(total_resistance_str), "Resistance: %d %s", total_resistance_centiunits/100, unit_abbrev); } else { - rb->snprintf(total_resistance_str, sizeof(total_resistance_str), + rb->snprintf(total_resistance_str, sizeof(total_resistance_str), "Resistance: %d.%2.2d %s", total_resistance_centiunits/100, total_resistance_centiunits%100, @@ -982,7 +982,7 @@ static void color_to_resistance(void) rb->lcd_puts_scroll(tolerance_str_x, lineno++, get_tolerance_str(fourth_band)); rb->lcd_update(); - + button_input = rb->button_get(true); switch(button_input) { case PLA_RIGHT: @@ -1002,7 +1002,7 @@ static void color_to_resistance(void) return; } -enum plugin_status plugin_start(const void* nothing) +enum plugin_status plugin_start(const void* nothing) { (void)nothing; rb->lcd_clear_display(); @@ -1021,12 +1021,12 @@ enum plugin_status plugin_start(const void* nothing) text_vp.height = screen_vp.height - text_vp.y; #endif - MENUITEM_STRINGLIST(main_menu, "Resistor Code Calculator:", NULL, - "Colours -> Resistance", "Resistance -> Colours", + MENUITEM_STRINGLIST(main_menu, "Resistor Calculator", NULL, + "Colours -> Resistance", "Resistance -> Colours", "LED resistor calculator", "Help", "Exit"); while (!menuquit) { display->set_viewport(&screen_vp); - main_menu_selection = rb->do_menu(&main_menu, &main_menu_selection, + main_menu_selection = rb->do_menu(&main_menu, &main_menu_selection, NULL, false); switch(main_menu_selection) { case 0: diff --git a/apps/plugins/reversi/reversi-gui.c b/apps/plugins/reversi/reversi-gui.c index e4bb232a26..eaf9794e40 100644 --- a/apps/plugins/reversi/reversi-gui.c +++ b/apps/plugins/reversi/reversi-gui.c @@ -76,15 +76,15 @@ static int font_height; #define CELL_PRE ( ( (LCD_WIDTH * LCD_PIXEL_ASPECT_WIDTH / \ LCD_PIXEL_ASPECT_HEIGHT) - MARGIN_W) / \ (BOARD_SIZE+MARGIN_C_W) ) - + #define CELL_WIDTH (CELL_PRE*LCD_PIXEL_ASPECT_HEIGHT / LCD_PIXEL_ASPECT_WIDTH) -#define CELL_HEIGHT (CELL_PRE) +#define CELL_HEIGHT (CELL_PRE) #else #define CELL_PRE ( ( (LCD_HEIGHT * LCD_PIXEL_ASPECT_HEIGHT / \ LCD_PIXEL_ASPECT_WIDTH) - MARGIN_H) / \ (BOARD_SIZE+MARGIN_C_H) ) - -#define CELL_WIDTH (CELL_PRE) + +#define CELL_WIDTH (CELL_PRE) #define CELL_HEIGHT (CELL_PRE*LCD_PIXEL_ASPECT_WIDTH / LCD_PIXEL_ASPECT_HEIGHT) #endif @@ -178,7 +178,7 @@ static bool game_finished; #define B_QUIT_H (2*CELL_HEIGHT) #endif -/* This is the button initialization/definition. The first element is the +/* This is the button initialization/definition. The first element is the * Viewport. This is defined in lcd.h, but the elements are: * int x - X location of button/viewport * int y - Y location of button/viewport @@ -193,7 +193,7 @@ static bool game_finished; * bool repeat - requires the area be held for the action * int action - action this button will return * bool invisible - Is this an invisible button? - * char *title - Specify a title + * char *title - Specify a title * fb_data *pixmap- Currently unused, but will allow for a graphic */ struct touchbutton reversi_buttons[TOUCHBUTTON_COUNT] = @@ -257,9 +257,9 @@ static void reversi_gui_draw_cell(int x, int y, int color) { if (color == WHITE) { for (i = 0; i < CELL_LINE_THICKNESS; i++) { rb->lcd_drawrect( - x+STONE_MARGIN+i, + x+STONE_MARGIN+i, y+STONE_MARGIN+i, - CELL_WIDTH+1-2*(STONE_MARGIN+i), + CELL_WIDTH+1-2*(STONE_MARGIN+i), CELL_HEIGHT+1-2*(STONE_MARGIN+i) ); } @@ -315,7 +315,7 @@ static void reversi_gui_display_board(void) { rb->snprintf(buf, sizeof(buf), "%01d", c); rb->viewport_set_defaults(&tempvp, SCREEN_MAIN); - + tempvp.x=x+CELL_WIDTH+2; tempvp.y=y; tempvp.width=LCD_WIDTH-tempvp.x; @@ -330,10 +330,10 @@ static void reversi_gui_display_board(void) { rb->screens[SCREEN_MAIN]->set_viewport(NULL); y = LEGEND_Y(1); - + reversi_gui_draw_cell(x, y+(LEGEND_Y(1)-LEGEND_Y(0))/2-CELL_WIDTH/2, WHITE); rb->snprintf(buf, sizeof(buf), "%01d", r); - + tempvp.y=y; rb->screens[SCREEN_MAIN]->set_viewport(&tempvp); rb->lcd_puts_scroll(0, 0, buf); @@ -398,10 +398,10 @@ static bool reversi_gui_choose_strategy( break; } } - - result = + + result = rb->set_option(prompt, &index, RB_INT, strategy_settings, num_items, NULL); - + (*player) = strategy_values[index]; if((*player)->init_func) @@ -416,7 +416,7 @@ static bool reversi_gui_menu(void) { int index, num_items, i; int result; - MENUITEM_STRINGLIST(menu, "Reversi Menu", NULL, + MENUITEM_STRINGLIST(menu, "Reversi", NULL, "Start new game", "Pass the move", MENU_TEXT_STRAT_BLACK, MENU_TEXT_STRAT_WHITE, MENU_TEXT_WRAP_MODE, "Playback Control", "Quit"); @@ -441,7 +441,7 @@ static bool reversi_gui_menu(void) { break; case 4: /* Cursor wrap mode */ - num_items = sizeof(cursor_wrap_mode_values) / + num_items = sizeof(cursor_wrap_mode_values) / sizeof(cursor_wrap_mode_values[0]); index = 0; for (i = 0; i < num_items; i++) { @@ -475,7 +475,7 @@ static bool reversi_gui_menu(void) { * Returns true iff the cursor would be really moved. In any case, the * new cursor position is stored in (new_row, new_col). */ -static bool +static bool reversi_gui_cursor_pos_vmove(int row_delta, int *new_row, int *new_col) { *new_row = cur_row + row_delta; *new_col = cur_col; @@ -525,7 +525,7 @@ reversi_gui_cursor_pos_vmove(int row_delta, int *new_row, int *new_col) { * Returns true iff the cursor would be really moved. In any case, the * new cursor position is stored in (new_row, new_col). */ -static bool +static bool reversi_gui_cursor_pos_hmove(int col_delta, int *new_row, int *new_col) { *new_row = cur_row; *new_col = cur_col + col_delta; @@ -597,10 +597,10 @@ enum plugin_status plugin_start(const void *parameter) { #endif int row, col; int w_cnt, b_cnt; - + /* Initialize Font Width and height */ rb->lcd_getstringsize("0", &font_width, &font_height); - + #ifdef HAVE_TOUCHSCREEN rb->touchscreen_set_mode(TOUCHSCREEN_POINT); #endif @@ -667,7 +667,7 @@ enum plugin_status plugin_start(const void *parameter) { * Button handling code happens below here **********************************************************************/ button = rb->button_get(true); - + /* The touchscreen buttons can act as true buttons so OR them in */ #ifdef HAVE_TOUCHSCREEN button |= touchbutton_check_button(button, reversi_buttons, TOUCHBUTTON_COUNT); @@ -690,7 +690,7 @@ enum plugin_status plugin_start(const void *parameter) { /* Check if the click was in the gameboard, if so move cursor. * This has to happen before MAKE_MOVE is processed. */ - if( (CELL_R(button_y) 0) { /* Move was made. Global changes on the board are possible */ diff --git a/apps/plugins/rockblox.c b/apps/plugins/rockblox.c index 9a29ebc4f8..f362d3d582 100644 --- a/apps/plugins/rockblox.c +++ b/apps/plugins/rockblox.c @@ -1480,7 +1480,7 @@ static int rockblox_menu(void) { int selected = 0; - MENUITEM_STRINGLIST(main_menu, "Rockblox Menu", rockblox_menu_cb, + MENUITEM_STRINGLIST(main_menu, "Rockblox", rockblox_menu_cb, "Resume Game", "Start New Game", "Help", "High Scores", "Playback Control", "Quit without Saving", "Quit"); diff --git a/apps/plugins/rockboy/menu.c b/apps/plugins/rockboy/menu.c index 4f7b7eb0bb..0cfc6b139a 100644 --- a/apps/plugins/rockboy/menu.c +++ b/apps/plugins/rockboy/menu.c @@ -66,7 +66,7 @@ static void setupkeys(void) /* * do_user_menu - create the user menu on the screen. * - * Returns USER_MENU_QUIT if the user selected "quit", otherwise + * Returns USER_MENU_QUIT if the user selected "quit", otherwise * returns zero. */ int do_user_menu(void) { @@ -74,8 +74,8 @@ int do_user_menu(void) { int selected=0, ret=0; int result; int time = 0; - -#if CONFIG_RTC + +#if CONFIG_RTC time = rb->mktime(rb->get_time()); #endif @@ -86,10 +86,10 @@ int do_user_menu(void) { backlight_use_settings(); /* Clean out the button Queue */ - while (rb->button_get(false) != BUTTON_NONE) + while (rb->button_get(false) != BUTTON_NONE) rb->yield(); - MENUITEM_STRINGLIST(menu, "Rockboy Menu", NULL, + MENUITEM_STRINGLIST(menu, "Rockboy", NULL, "Load Game", "Save Game", "Options", "Reset", "Quit"); @@ -127,7 +127,7 @@ int do_user_menu(void) { rb->lcd_setfont(FONT_SYSFIXED); /* Reset the font */ rb->lcd_clear_display(); /* Clear display for screen size changes */ - + /* Keep the RTC in sync */ #if CONFIG_RTC time = (rb->mktime(rb->get_time()) - time) * 60; @@ -153,7 +153,7 @@ static void munge_name(char *buf, const size_t bufsiz) { /* check strlen */ max = strlen(buf); max = (max < bufsiz) ? max : bufsiz; - + /* iterate over characters and munge them (if necessary) */ for (i = 0; i < max; i++) if (!isalnum(buf[i])) @@ -189,10 +189,10 @@ static void build_slot_path(char *buf, size_t bufsiz, int slot_id) { static bool do_file(char *path, char *desc, bool is_load) { char desc_buf[DESC_SIZE]; int fd, file_mode; - + /* set file mode */ file_mode = is_load ? O_RDONLY : (O_WRONLY | O_CREAT); - + /* attempt to open file descriptor here */ if ((fd = open(path, file_mode, 0666)) < 0) return false; @@ -202,10 +202,10 @@ static bool do_file(char *path, char *desc, bool is_load) { { /* load description */ read(fd, desc_buf, sizeof(desc_buf)); - + /* load state */ loadstate(fd); - + /* print out a status message so the user knows the state loaded */ rb->splashf(HZ * 1, "Loaded state from \"%s\"", path); } @@ -220,7 +220,7 @@ static bool do_file(char *path, char *desc, bool is_load) { write(fd, desc_buf, sizeof(desc_buf)); savestate(fd); } - + /* close file descriptor */ close(fd); @@ -228,7 +228,7 @@ static bool do_file(char *path, char *desc, bool is_load) { return true; } -/* +/* * get information on the given slot */ static void slot_info(char *info_buf, size_t info_bufsiz, int slot_id, @@ -267,7 +267,7 @@ static void slot_info(char *info_buf, size_t info_bufsiz, int slot_id, */ static bool do_slot(int slot_id, bool is_load) { char path_buf[256], desc_buf[DESC_SIZE]; - + /* build slot filename, clear desc buf */ build_slot_path(path_buf, sizeof(path_buf), slot_id); memset(desc_buf, 0, sizeof(desc_buf)); @@ -286,7 +286,7 @@ static bool do_slot(int slot_id, bool is_load) { return do_file(path_buf, desc_buf, is_load); } -/* +/* * slot_get_name */ static const char* slot_get_name(int selected_item, void * data, @@ -380,7 +380,7 @@ static void do_opt_menu(void) { "19 Max", -1 }, { "20 Max", -1 }, }; - + #ifdef HAVE_LCD_COLOR static const struct opt_items rotate[] = { { "No rotation", -1 }, @@ -418,7 +418,7 @@ static void do_opt_menu(void) #endif MENUITEM_STRINGLIST(menu, "Options", NULL, - "Max Frameskip", "Autosave", "Sound", "Volume", + "Max Frameskip", "Autosave", "Sound", "Volume", "Stats", "Set Keys (Buggy)", #ifdef HAVE_LCD_COLOR "Screen Size", "Screen Rotate", "Set Palette", diff --git a/apps/plugins/rockpaint.c b/apps/plugins/rockpaint.c index 8f85721500..1f21fcf093 100644 --- a/apps/plugins/rockpaint.c +++ b/apps/plugins/rockpaint.c @@ -1031,7 +1031,7 @@ enum { TEXT_MENU_PREVIEW, TEXT_MENU_APPLY, TEXT_MENU_CANCEL, }; -MENUITEM_STRINGLIST(main_menu, "RockPaint", NULL, +MENUITEM_STRINGLIST(main_menu, "Rockpaint", NULL, "Resume", "New", "Load", "Save", "Set Width", "Set Height", "Brush Size", "Brush Speed", diff --git a/apps/plugins/snake.c b/apps/plugins/snake.c index 03b8d75d99..6c6ff9aa2a 100644 --- a/apps/plugins/snake.c +++ b/apps/plugins/snake.c @@ -520,7 +520,7 @@ static int snake_menu_cb(int action, static int snake_game_menu(void) { - MENUITEM_STRINGLIST(main_menu,"Snake Menu",snake_menu_cb, + MENUITEM_STRINGLIST(main_menu,"Snake",snake_menu_cb, "Resume Game", "Start New Game", "Snake Speed", diff --git a/apps/plugins/snake2.c b/apps/plugins/snake2.c index 3f0434c2cf..ad26420e7d 100644 --- a/apps/plugins/snake2.c +++ b/apps/plugins/snake2.c @@ -1598,7 +1598,7 @@ static void game_init(void) { "Type B", -1 }, }; - MENUITEM_STRINGLIST(menu, "Snake2 Menu", NULL, + MENUITEM_STRINGLIST(menu, "Snake 2", NULL, "Start New Game", "Game Type", "Select Maze", "Speed", "High Scores", diff --git a/apps/plugins/sokoban.c b/apps/plugins/sokoban.c index f52ade7b71..3649aacdb6 100644 --- a/apps/plugins/sokoban.c +++ b/apps/plugins/sokoban.c @@ -1607,7 +1607,7 @@ static int sokoban_menu(void) bool menu_quit; int start_selected = 0; - MENUITEM_STRINGLIST(menu, "Sokoban Menu", NULL, + MENUITEM_STRINGLIST(menu, "Sokoban", NULL, "Resume", "Select Level", "Audio Playback", "Keys", "Load Default Level Set", "Quit Without Saving", "Save Progress & Quit"); diff --git a/apps/plugins/solitaire.c b/apps/plugins/solitaire.c index 388a01abd2..f0c9982b3b 100644 --- a/apps/plugins/solitaire.c +++ b/apps/plugins/solitaire.c @@ -1095,7 +1095,7 @@ static int solitaire_menu(bool in_game) int selected = 0; int result = -1; - MENUITEM_STRINGLIST(menu, "Solitaire Menu", solitaire_menu_cb, + MENUITEM_STRINGLIST(menu, "Solitaire", solitaire_menu_cb, "Resume Game", "Start New Game", "Draw Cards Option", "Help", "Playback Control", diff --git a/apps/plugins/spacerocks.c b/apps/plugins/spacerocks.c index b5b382b4dc..e3e9b9c3b7 100644 --- a/apps/plugins/spacerocks.c +++ b/apps/plugins/spacerocks.c @@ -1946,7 +1946,7 @@ static int spacerocks_menu_cb(int action, static int spacerocks_menu(void) { int selection = 0; - MENUITEM_STRINGLIST(main_menu, "Spacerocks Menu", spacerocks_menu_cb, + MENUITEM_STRINGLIST(main_menu, "Spacerocks", spacerocks_menu_cb, "Resume Game", "Start New Game", "Help", "High Scores", "Playback Control", "Quit"); diff --git a/apps/plugins/speedread.c b/apps/plugins/speedread.c index 18075803f7..0284b27358 100644 --- a/apps/plugins/speedread.c +++ b/apps/plugins/speedread.c @@ -518,7 +518,7 @@ static bool confirm_restart(void) static int config_menu(void) { - MENUITEM_STRINGLIST(menu, "Speedread Menu", NULL, + MENUITEM_STRINGLIST(menu, "Speedread", NULL, "Resume Reading", "Restart from Beginning", "Change Font", diff --git a/apps/plugins/star.c b/apps/plugins/star.c index fe4b763bc0..0f7589b5ed 100644 --- a/apps/plugins/star.c +++ b/apps/plugins/star.c @@ -1405,7 +1405,7 @@ static int star_menu(void) int selection, level=1; bool menu_quit = false; - MENUITEM_STRINGLIST(menu, "Star Menu", NULL, + MENUITEM_STRINGLIST(menu, "Star", NULL, "Start Game","Choose Level", "Help", "Playback Control", "Quit"); diff --git a/apps/plugins/sudoku/sudoku.c b/apps/plugins/sudoku/sudoku.c index d577e687cc..1b3f41b317 100644 --- a/apps/plugins/sudoku/sudoku.c +++ b/apps/plugins/sudoku/sudoku.c @@ -912,7 +912,7 @@ static int sudoku_menu(struct sudoku_state_t* state) { int result; - MENUITEM_STRINGLIST(menu, "Sudoku Menu", NULL, + MENUITEM_STRINGLIST(menu, "Sudoku", NULL, "Audio Playback", #ifdef HAVE_LCD_COLOR "Number Display", @@ -982,7 +982,7 @@ static int sudoku_edit_menu(struct sudoku_state_t* state) { int result; - MENUITEM_STRINGLIST(menu, "Edit Menu", NULL, + MENUITEM_STRINGLIST(menu, "Edit", NULL, "Save as", "Quit"); result = rb->do_menu(&menu, NULL, NULL, false); diff --git a/apps/plugins/superdom.c b/apps/plugins/superdom.c index 10373e1cc9..55966ea5b7 100644 --- a/apps/plugins/superdom.c +++ b/apps/plugins/superdom.c @@ -660,7 +660,7 @@ static int start_menu(void) { int selection = 0; - MENUITEM_STRINGLIST(menu, "Super Domination Menu", NULL, + MENUITEM_STRINGLIST(menu, "Super Domination", NULL, "Play Super Domination", "Settings", "Help", "Playback Control", "Quit"); @@ -747,7 +747,7 @@ static int save_game(void) static int ingame_menu(void) { - MENUITEM_STRINGLIST(menu, "Super Domination Menu", NULL, + MENUITEM_STRINGLIST(menu, "Super Domination", NULL, "Return to game", "Save Game", "Playback Control", "Quit"); diff --git a/apps/plugins/test_disk.c b/apps/plugins/test_disk.c index fee6c4d0b0..6be18caa81 100644 --- a/apps/plugins/test_disk.c +++ b/apps/plugins/test_disk.c @@ -82,7 +82,7 @@ static bool log_init(void) line = 0; rb->lcd_clear_display(); rb->lcd_update(); - + rb->create_numbered_filename(logfilename, HOME_DIR, "test_disk_log_", ".txt", 2 IF_CNFN_NUM_(, NULL)); log_fd = rb->open(logfilename, O_RDWR|O_CREAT|O_TRUNC, 0666); @@ -206,7 +206,7 @@ static bool file_speed(int chunksize, bool align) int fd, ret; long filesize = 0; long size, time; - + if ((unsigned)chunksize >= audiobuflen) return false; @@ -260,7 +260,7 @@ static bool file_speed(int chunksize, bool align) rb->snprintf(text_buf, sizeof text_buf, "Write (%d,%c): %ld KB/s", chunksize, align ? 'A' : 'U', (25 * (filesize>>8) / time) ); log_text(text_buf, true); - + /* File read speed */ fd = rb->open(TEST_FILE, O_RDONLY); if (fd < 0) @@ -329,7 +329,7 @@ static bool test_speed(void) rb->snprintf(text_buf, sizeof(text_buf), "Create: %d files/s", last_file / TEST_TIME); log_text(text_buf, true); - + /* File open speed */ time = *rb->current_tick + TEST_TIME*HZ; for (n = 0, i = 0; TIME_BEFORE(*rb->current_tick, time); n++, i++) @@ -404,7 +404,7 @@ static bool test_speed(void) rb->snprintf(text_buf, sizeof(text_buf), "Delete: %ld files/s", last_file * HZ / (*rb->current_tick - time)); log_text(text_buf, true); - + if (file_speed(512, true) && file_speed(512, false) && file_speed(4096, true) @@ -435,7 +435,7 @@ static bool test_speed(void) /* this is the plugin entry point */ enum plugin_status plugin_start(const void* parameter) { - MENUITEM_STRINGLIST(menu, "Test Disk Menu", NULL, + MENUITEM_STRINGLIST(menu, "Test Disk", NULL, "Disk speed", "Write & verify"); int selected=0; bool quit = false; diff --git a/apps/plugins/test_sampr.c b/apps/plugins/test_sampr.c index d972ecdefa..64754efc19 100644 --- a/apps/plugins/test_sampr.c +++ b/apps/plugins/test_sampr.c @@ -56,7 +56,7 @@ static const uint32_t gen_frequency = 1000; * phase has range from 0 to 0xffffffff, representing 0 and * 2*pi respectively. * Return value is a signed value from LONG_MIN to LONG_MAX, representing - * -1 and 1 respectively. + * -1 and 1 respectively. */ static int16_t ICODE_ATTR fsin(uint32_t phase) { @@ -85,7 +85,7 @@ static int16_t ICODE_ATTR fsin(uint32_t phase) unsigned int pos = phase >> 25; unsigned short frac = (phase & 0x01ffffff) >> 9; short diff = sinetab[pos + 1] - sinetab[pos]; - + return sinetab[pos] + (frac*diff >> 16); } @@ -285,7 +285,7 @@ enum plugin_status plugin_start(const void *parameter) MENU_QUIT, }; - MENUITEM_STRINGLIST(menu, "Test Sampr Menu", NULL, + MENUITEM_STRINGLIST(menu, "Test Sampr", NULL, #ifndef HAVE_VOLUME_IN_LIST "Set Volume", #endif /* HAVE_VOLUME_IN_LIST */ diff --git a/apps/plugins/text_editor.c b/apps/plugins/text_editor.c index f7d62ca07a..b4f99447ae 100644 --- a/apps/plugins/text_editor.c +++ b/apps/plugins/text_editor.c @@ -485,7 +485,7 @@ enum plugin_status plugin_start(const void* parameter) case ACTION_STD_CANCEL: if (changed) { - MENUITEM_STRINGLIST(menu, "Do What?", NULL, + MENUITEM_STRINGLIST(menu, "Text Editor", NULL, "Return", "Playback Control", "Save Changes", "Save As...", "Save and Exit", diff --git a/apps/plugins/text_viewer/tv_menu.c b/apps/plugins/text_viewer/tv_menu.c index 5b43a910c6..572f9263f0 100644 --- a/apps/plugins/text_viewer/tv_menu.c +++ b/apps/plugins/text_viewer/tv_menu.c @@ -292,7 +292,7 @@ unsigned tv_display_menu(void) { unsigned result = TV_MENU_RESULT_EXIT_MENU; - MENUITEM_STRINGLIST(menu, "Viewer Menu", NULL, + MENUITEM_STRINGLIST(menu, "Text Viewer", NULL, ID2P(LANG_RETURN), "Viewer Options", ID2P(LANG_PLAYBACK_CONTROL), diff --git a/apps/plugins/wormlet.c b/apps/plugins/wormlet.c index cbce41b657..1b8b1507f7 100644 --- a/apps/plugins/wormlet.c +++ b/apps/plugins/wormlet.c @@ -2540,7 +2540,7 @@ enum plugin_status plugin_start(const void* parameter) { STR(LANG_OUT_OF_CONTROL) } }; - MENUITEM_STRINGLIST(menu, "Wormlet Menu", NULL, + MENUITEM_STRINGLIST(menu, "Wormlet", NULL, ID2P(LANG_PLAY_WORMLET), ID2P(LANG_NUMBER_OF_WORMS), ID2P(LANG_NUMBER_OF_PLAYERS), ID2P(LANG_CONTROL_STYLE), ID2P(LANG_WORM_GROWTH_PER_FOOD), ID2P(LANG_WORM_SPEED), diff --git a/apps/plugins/xobox.c b/apps/plugins/xobox.c index 632d32385a..ce243b502b 100644 --- a/apps/plugins/xobox.c +++ b/apps/plugins/xobox.c @@ -1165,7 +1165,7 @@ static int xobox_menu(bool ingame) rb->button_clear_queue(); int selection = 0; - MENUITEM_STRINGLIST(main_menu, "Xobox Menu", xobox_menu_cb, + MENUITEM_STRINGLIST(main_menu, "Xobox", xobox_menu_cb, "Resume Game", "Start New Game", "Speed", "Difficulty", "High Scores", "Playback Control", diff --git a/apps/plugins/xrick/system/sysmenu_rockbox.c b/apps/plugins/xrick/system/sysmenu_rockbox.c index fb80881749..feada4a4bb 100644 --- a/apps/plugins/xrick/system/sysmenu_rockbox.c +++ b/apps/plugins/xrick/system/sysmenu_rockbox.c @@ -124,7 +124,7 @@ void sysmenu_exec(void) Menu_QUIT }; - MENUITEM_STRINGLIST(sysmenu_mainItems, "xrick Menu", NULL, + MENUITEM_STRINGLIST(sysmenu_mainItems, "xrick", NULL, "Resume Game", "Restart Game", #ifdef ENABLE_CHEATS diff --git a/apps/plugins/xworld/sys.c b/apps/plugins/xworld/sys.c index d28c24beff..b2e274388c 100644 --- a/apps/plugins/xworld/sys.c +++ b/apps/plugins/xworld/sys.c @@ -351,7 +351,7 @@ void sys_menu(struct System* sys) rb->lcd_update(); mainmenu_sysptr = sys; - MENUITEM_STRINGLIST(menu, "XWorld Menu", mainmenu_cb, + MENUITEM_STRINGLIST(menu, "XWorld", mainmenu_cb, "Resume Game", /* 0 */ "Start New Game", /* 1 */ "Video Settings", /* 2 */ @@ -730,7 +730,7 @@ static void do_pause_menu(struct System* sys) #endif int sel = 0; - MENUITEM_STRINGLIST(menu, "XWorld Menu", NULL, + MENUITEM_STRINGLIST(menu, "XWorld", NULL, "Resume Game", /* 0 */ "Start New Game", /* 1 */ "Video Settings", /* 2 */ diff --git a/apps/plugins/zxbox/spmain.c b/apps/plugins/zxbox/spmain.c index 38cc175a85..e106165eb0 100644 --- a/apps/plugins/zxbox/spmain.c +++ b/apps/plugins/zxbox/spmain.c @@ -5,7 +5,7 @@ * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. See the file COPYING. + * (at your option) any later version. See the file COPYING. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -326,7 +326,7 @@ static bool zxbox_menu(void) int menu_quit=0; int exit=0; char c; - MENUITEM_STRINGLIST(menu, "ZXBox Menu", NULL, + MENUITEM_STRINGLIST(menu, "ZXBox", NULL, "VKeyboard", "Play/Pause Tape", "Save quick snapshot", "Load quick snapshot", "Save Snapshot", "Toggle \"fast\" mode", @@ -450,7 +450,7 @@ static void run_singlemode(void) halfsec = !(sp_int_ctr % 25); evenframe = !(sp_int_ctr & 1); - if(screen_visible) updateframe = sp_nosync ? halfsec : + if(screen_visible) updateframe = sp_nosync ? halfsec : !((sp_int_ctr+SHOW_OFFS) % showframe); else updateframe = 0; if(halfsec) { @@ -481,7 +481,7 @@ static void run_singlemode(void) } else if(updateframe) update(); } - + } @@ -500,11 +500,11 @@ static void init_load(const void *parameter) #ifndef USE_GREY rb->splashf(HZ, "Loading snapshot '%s'", spcf_init_snapshot); #endif - + load_snapshot_file_type(spcf_init_snapshot, spcf_init_snapshot_type); free_string(spcf_init_snapshot); } - + if(spcf_init_tapefile != NULL) { /*sprintf(msgbuf, "Loading tape '%s'", spcf_init_tapefile); put_msg(msgbuf);*/ @@ -521,7 +521,7 @@ void start_spectemu(const void *parameter) init_spect_scr(); init_spect_sound(); init_spect_key(); - + run_singlemode(); }