mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-05-12 11:43:16 -04:00
Compare commits
5 commits
4698be4a17
...
5aa2b339d5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5aa2b339d5 | ||
|
|
fe690dfa20 | ||
|
|
4e211b55f9 | ||
|
|
f316535684 | ||
|
|
a2e63fca59 |
64 changed files with 392 additions and 431 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -12754,20 +12754,6 @@
|
|||
*: "Average bit rate"
|
||||
</voice>
|
||||
</phrase>
|
||||
<phrase>
|
||||
id: LANG_PLAYTIME_ERROR
|
||||
desc: playing time screen
|
||||
user: core
|
||||
<source>
|
||||
*: "Error while gathering info"
|
||||
</source>
|
||||
<dest>
|
||||
*: "Error while gathering info"
|
||||
</dest>
|
||||
<voice>
|
||||
*: "Error while gathering info"
|
||||
</voice>
|
||||
</phrase>
|
||||
<phrase>
|
||||
id: LANG_PLAYING_TIME
|
||||
desc: onplay menu
|
||||
|
|
@ -16079,20 +16065,6 @@
|
|||
*: "Default Browser"
|
||||
</voice>
|
||||
</phrase>
|
||||
<phrase>
|
||||
id: LANG_AMAZE_MENU
|
||||
desc: Amaze game
|
||||
user: core
|
||||
<source>
|
||||
*: "Amaze Main Menu"
|
||||
</source>
|
||||
<dest>
|
||||
*: "Amaze Main Menu"
|
||||
</dest>
|
||||
<voice>
|
||||
*: "Amaze Main Menu"
|
||||
</voice>
|
||||
</phrase>
|
||||
<phrase>
|
||||
id: LANG_SET_MAZE_SIZE
|
||||
desc: Maze size in Amaze game
|
||||
|
|
@ -16345,34 +16317,6 @@
|
|||
*: "Mik mod Settings"
|
||||
</voice>
|
||||
</phrase>
|
||||
<phrase>
|
||||
id: LANG_MIKMOD_MENU
|
||||
desc: mikmod plugin
|
||||
user: core
|
||||
<source>
|
||||
*: "Mikmod Menu"
|
||||
</source>
|
||||
<dest>
|
||||
*: "Mikmod Menu"
|
||||
</dest>
|
||||
<voice>
|
||||
*: "Mik mod Menu"
|
||||
</voice>
|
||||
</phrase>
|
||||
<phrase>
|
||||
id: LANG_CHESSBOX_MENU
|
||||
desc: chessbox plugin
|
||||
user: core
|
||||
<source>
|
||||
*: "Chessbox Menu"
|
||||
</source>
|
||||
<dest>
|
||||
*: "Chessbox Menu"
|
||||
</dest>
|
||||
<voice>
|
||||
*: "Chess box Menu"
|
||||
</voice>
|
||||
</phrase>
|
||||
<phrase>
|
||||
id: VOICE_INVALID_VOICE_FILE
|
||||
desc: played if the voice file fails to load
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
# - Olivier Kaloudoff
|
||||
# - Jaussoin Timothée
|
||||
# - CHAPUIS Adhemar
|
||||
# - Matthieu BACHELIER
|
||||
#
|
||||
# Original comments below:
|
||||
#
|
||||
|
|
@ -3442,57 +3443,6 @@
|
|||
*: "Capacité de la batterie"
|
||||
</voice>
|
||||
</phrase>
|
||||
<phrase>
|
||||
id: LANG_BATTERY_TYPE
|
||||
desc: deprecated
|
||||
user: core
|
||||
<source>
|
||||
*: none
|
||||
battery_types: ""
|
||||
</source>
|
||||
<dest>
|
||||
*: none
|
||||
battery_types: ""
|
||||
</dest>
|
||||
<voice>
|
||||
*: none
|
||||
battery_types: ""
|
||||
</voice>
|
||||
</phrase>
|
||||
<phrase>
|
||||
id: LANG_BATTERY_TYPE_1
|
||||
desc: deprecated
|
||||
user: core
|
||||
<source>
|
||||
*: none
|
||||
battery_types,xduoox3: ""
|
||||
</source>
|
||||
<dest>
|
||||
*: none
|
||||
battery_types,xduoox3: ""
|
||||
</dest>
|
||||
<voice>
|
||||
*: none
|
||||
battery_types,xduoox3: ""
|
||||
</voice>
|
||||
</phrase>
|
||||
<phrase>
|
||||
id: LANG_BATTERY_TYPE_2
|
||||
desc: deprecated
|
||||
user: core
|
||||
<source>
|
||||
*: none
|
||||
battery_types,xduoox3: ""
|
||||
</source>
|
||||
<dest>
|
||||
*: none
|
||||
battery_types,xduoox3: ""
|
||||
</dest>
|
||||
<voice>
|
||||
*: none
|
||||
battery_types,xduoox3: ""
|
||||
</voice>
|
||||
</phrase>
|
||||
<phrase>
|
||||
id: LANG_DISK_MENU
|
||||
desc: in the system sub menu
|
||||
|
|
@ -3634,8 +3584,8 @@
|
|||
<dest>
|
||||
*: none
|
||||
rtc: "ON = Valider"
|
||||
gigabeat*,iaudiom5,iaudiox5,ipod*,iriverh10,iriverh10_5gb,mrobe100,sansac200*,sansaclip*,sansaconnect,sansae200*,sansafuze*: "SELECT = Valider"
|
||||
aigoerosq,erosqnative,gogearsa9200,samsungyh*,xduoox3*: "PLAY = Valider"
|
||||
gigabeat*,iaudiom5,iaudiox5,ipod*,iriverh10,iriverh10_5gb,mrobe100,sansac200*,sansaclip*,sansaconnect,sansae200*,sansafuze*: "SELECT = Valider"
|
||||
iriverh100,iriverh120,iriverh300: "NAVI = Valider"
|
||||
mpiohd300: "ENTER = Valider"
|
||||
mrobe500: "HEART = Valider"
|
||||
|
|
@ -3643,7 +3593,6 @@
|
|||
</dest>
|
||||
<voice>
|
||||
*: none
|
||||
gigabeat*,gogearsa9200,iaudiom5,iaudiox5,ipod*,iriverh10,iriverh100,iriverh10_5gb,iriverh120,iriverh300,mrobe100,rtc,samsungyh*,sansac200*,sansae200*: ""
|
||||
</voice>
|
||||
</phrase>
|
||||
<phrase>
|
||||
|
|
@ -3667,8 +3616,8 @@
|
|||
<dest>
|
||||
*: none
|
||||
rtc: "OFF = Annuler"
|
||||
gigabeatfx,mrobe500: "POWER = Annuler"
|
||||
aigoerosq,erosqnative,gigabeats,sansafuzeplus,xduoox3*: "BACK = Annuler"
|
||||
gigabeatfx,mrobe500: "POWER = Annuler"
|
||||
gogearsa9200: "LEFT = Annuler"
|
||||
iaudiom5,iaudiox5: "RECORD = Annuler"
|
||||
ipod*,mpiohd300,sansac200*: "MENU = Annuler"
|
||||
|
|
@ -3680,7 +3629,6 @@
|
|||
</dest>
|
||||
<voice>
|
||||
*: none
|
||||
gigabeat*,gogearsa9200,iaudiom5,iaudiox5,ipod*,iriverh10,iriverh100,iriverh10_5gb,iriverh120,iriverh300,mrobe100,rtc,samsungyh*,sansac200*,sansae200*: ""
|
||||
</voice>
|
||||
</phrase>
|
||||
<phrase>
|
||||
|
|
@ -4758,7 +4706,7 @@
|
|||
</dest>
|
||||
<voice>
|
||||
*: none
|
||||
radio: ""
|
||||
radio: "Recherche en cours"
|
||||
</voice>
|
||||
</phrase>
|
||||
<phrase>
|
||||
|
|
@ -5868,20 +5816,6 @@
|
|||
*: "pistes enregistrées"
|
||||
</voice>
|
||||
</phrase>
|
||||
<phrase>
|
||||
id: LANG_CATALOG
|
||||
desc: deprecated
|
||||
user: core
|
||||
<source>
|
||||
*: ""
|
||||
</source>
|
||||
<dest>
|
||||
*: ""
|
||||
</dest>
|
||||
<voice>
|
||||
*: ""
|
||||
</voice>
|
||||
</phrase>
|
||||
<phrase>
|
||||
id: LANG_RECURSE_DIRECTORY
|
||||
desc: In playlist menu
|
||||
|
|
@ -7332,7 +7266,7 @@
|
|||
*: "Impossible d'ouvrir %s"
|
||||
</dest>
|
||||
<voice>
|
||||
*: ""
|
||||
*: "Impossible d'ouvrir cette extension"
|
||||
</voice>
|
||||
</phrase>
|
||||
<phrase>
|
||||
|
|
@ -7346,7 +7280,7 @@
|
|||
*: "Lecture de %s impossible"
|
||||
</dest>
|
||||
<voice>
|
||||
*: ""
|
||||
*: "Lecture du fichier impossible"
|
||||
</voice>
|
||||
</phrase>
|
||||
<phrase>
|
||||
|
|
@ -12580,20 +12514,6 @@
|
|||
*: "Intégration de l'écran de lecture en cours"
|
||||
</voice>
|
||||
</phrase>
|
||||
<phrase>
|
||||
id: LANG_PLAYTIME_REMAINING
|
||||
desc: deprecated
|
||||
user: core
|
||||
<source>
|
||||
*: ""
|
||||
</source>
|
||||
<dest>
|
||||
*: ""
|
||||
</dest>
|
||||
<voice>
|
||||
*: ""
|
||||
</voice>
|
||||
</phrase>
|
||||
<phrase>
|
||||
id: LANG_RESIZE_COVERS
|
||||
desc: in the pictureflow settings menu
|
||||
|
|
@ -12694,16 +12614,16 @@
|
|||
</phrase>
|
||||
<phrase>
|
||||
id: LANG_TOGGLE_ITEM
|
||||
desc: in main_menu_config
|
||||
desc: deprecated
|
||||
user: core
|
||||
<source>
|
||||
*: "Toggle Item"
|
||||
*: ""
|
||||
</source>
|
||||
<dest>
|
||||
*: "Changer l'état"
|
||||
*: ""
|
||||
</dest>
|
||||
<voice>
|
||||
*: "Changer l'état"
|
||||
*: ""
|
||||
</voice>
|
||||
</phrase>
|
||||
<phrase>
|
||||
|
|
@ -13382,13 +13302,13 @@
|
|||
</phrase>
|
||||
<phrase>
|
||||
id: LANG_MAIN_MENU_ORDER
|
||||
desc: main_menu_config plugin title
|
||||
desc: deprecated
|
||||
user: core
|
||||
<source>
|
||||
*: "Rockbox Main Menu Order"
|
||||
*: ""
|
||||
</source>
|
||||
<dest>
|
||||
*: "Ordre du menu principal Rockbox"
|
||||
*: ""
|
||||
</dest>
|
||||
<voice>
|
||||
*: ""
|
||||
|
|
@ -13759,20 +13679,6 @@
|
|||
*: "Mettre à jour le cache"
|
||||
</voice>
|
||||
</phrase>
|
||||
<phrase>
|
||||
id: LANG_CACHE_REBUILT_NEXT_RESTART
|
||||
desc: deprecated
|
||||
user: core
|
||||
<source>
|
||||
*: ""
|
||||
</source>
|
||||
<dest>
|
||||
*: ""
|
||||
</dest>
|
||||
<voice>
|
||||
*: ""
|
||||
</voice>
|
||||
</phrase>
|
||||
<phrase>
|
||||
id: LANG_CHANGE_VOLUME
|
||||
desc: in playback control menu
|
||||
|
|
@ -17021,3 +16927,85 @@
|
|||
*: "Liste de lecture terminée. Rejouer?"
|
||||
</voice>
|
||||
</phrase>
|
||||
<phrase>
|
||||
id: LANG_USB_DAC
|
||||
desc: in settings_menu
|
||||
user: core
|
||||
<source>
|
||||
*: none
|
||||
usbdac: "USB-DAC"
|
||||
</source>
|
||||
<dest>
|
||||
*: none
|
||||
usbdac: "USB-DAC"
|
||||
</dest>
|
||||
<voice>
|
||||
*: none
|
||||
usbdac: "USB-DAC"
|
||||
</voice>
|
||||
</phrase>
|
||||
<phrase>
|
||||
id: LANG_WHILE_USB_CHARGE_ONLY
|
||||
desc: in settings_menu
|
||||
user: core
|
||||
<source>
|
||||
*: none
|
||||
usbdac: "While In USB Charge-Only Mode"
|
||||
</source>
|
||||
<dest>
|
||||
*: none
|
||||
usbdac: "En mode de charge USB, uniquement"
|
||||
</dest>
|
||||
<voice>
|
||||
*: none
|
||||
usbdac: "En mode de charge USB, uniquement"
|
||||
</voice>
|
||||
</phrase>
|
||||
<phrase>
|
||||
id: LANG_WHILE_MASS_STORAGE_USB_ONLY
|
||||
desc: in settings_menu
|
||||
user: core
|
||||
<source>
|
||||
*: none
|
||||
usbdac: "While In USB Mass-Storage Mode"
|
||||
</source>
|
||||
<dest>
|
||||
*: none
|
||||
usbdac: "En mode de stockage de masse USB"
|
||||
</dest>
|
||||
<voice>
|
||||
*: none
|
||||
usbdac: "En mode de stockage de masse USB"
|
||||
</voice>
|
||||
</phrase>
|
||||
<phrase>
|
||||
id: LANG_USB_DAC_ACTIVE
|
||||
desc: for splash
|
||||
user: core
|
||||
<source>
|
||||
*: none
|
||||
usbdac: "USB-DAC Active"
|
||||
</source>
|
||||
<dest>
|
||||
*: none
|
||||
usbdac: "DAC USB actif"
|
||||
</dest>
|
||||
<voice>
|
||||
*: none
|
||||
usbdac: "DAC USB actif"
|
||||
</voice>
|
||||
</phrase>
|
||||
<phrase>
|
||||
id: LANG_SORT_PLAYLISTS
|
||||
desc: playlists sorting setting
|
||||
user: core
|
||||
<source>
|
||||
*: "Sort Playlists"
|
||||
</source>
|
||||
<dest>
|
||||
*: "Trier les listes de lecture"
|
||||
</dest>
|
||||
<voice>
|
||||
*: "trier les listes de lecture"
|
||||
</voice>
|
||||
</phrase>
|
||||
|
|
|
|||
|
|
@ -886,6 +886,7 @@ int plugin_load(const char* plugin, const void* parameter)
|
|||
/* for some plugins, the SBS can be left enabled */
|
||||
const char *sepch = strrchr(plugin, PATH_SEPCH);
|
||||
bool theme_enabled = sepch && (!strcmp("properties.rock", sepch + 1) ||
|
||||
!strcmp("playing_time.rock", sepch + 1) ||
|
||||
!strcmp("main_menu_config.rock", sepch + 1) ||
|
||||
!strcmp("disktidy.rock", sepch + 1));
|
||||
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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; j<cd->l_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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -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" );
|
||||
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ enum ePT_SUM {
|
|||
|
||||
struct playing_time_info {
|
||||
char single_mode_tag[MAX_PATH]; /* Relevant tag when single mode enabled */
|
||||
char error_str[16]; /* Error message to display to user */
|
||||
unsigned long long size[ePT_COUNT]; /* File size of tracks */
|
||||
unsigned long long length[ePT_COUNT]; /* Length of tracks */
|
||||
unsigned long curr_track_length[ePT_COUNT]; /* Current track length */
|
||||
|
|
@ -529,7 +530,19 @@ static bool playing_time(void)
|
|||
if (!success)
|
||||
return false;
|
||||
if (pti.error_count > 0)
|
||||
rb->splash(HZ, ID2P(LANG_PLAYTIME_ERROR));
|
||||
{
|
||||
rb->snprintf(pti.error_str, sizeof pti.error_str,
|
||||
"%d %s", pti.error_count, rb->str(LANG_TRACKS));
|
||||
if (rb->global_settings->talk_menu)
|
||||
{
|
||||
rb->talk_id(LANG_ERROR_FORMATSTR, false);
|
||||
rb->talk_number(pti.error_count, true);
|
||||
rb->talk_id(LANG_TRACKS, true);
|
||||
rb->talk_force_enqueue_next();
|
||||
}
|
||||
/* (voiced above) */
|
||||
rb->splashf(HZ, rb->str(LANG_ERROR_FORMATSTR), pti.error_str);
|
||||
}
|
||||
|
||||
pt_store_converted_totals(&pti);
|
||||
return pt_display_stats(&pti);
|
||||
|
|
@ -547,6 +560,8 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
return status;
|
||||
}
|
||||
|
||||
/* Only relevant if launched using hotkey from the
|
||||
WPS. Otherwise theme should be enabled already. */
|
||||
FOR_NB_SCREENS(i)
|
||||
rb->viewportmanager_theme_enable(i, true, NULL);
|
||||
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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)<BOARD_SIZE) &&
|
||||
if( (CELL_R(button_y)<BOARD_SIZE) &&
|
||||
(CELL_C(button_x)<BOARD_SIZE) )
|
||||
{
|
||||
reversi_gui_move_cursor(CELL_R(button_y), CELL_C(button_x));
|
||||
|
|
@ -708,7 +708,7 @@ enum plugin_status plugin_start(const void *parameter) {
|
|||
}
|
||||
draw_screen = true;
|
||||
}
|
||||
|
||||
|
||||
if(button&REVERSI_BUTTON_MAKE_MOVE
|
||||
#if defined(REVERSI_BUTTON_MAKE_MOVE_SHORTPRESS)
|
||||
&& !(lastbutton&BUTTON_REPEAT)
|
||||
|
|
@ -717,7 +717,7 @@ enum plugin_status plugin_start(const void *parameter) {
|
|||
/* If you touch the game board instead of hitting menu after it
|
||||
* has completed the game will exit out.
|
||||
*/
|
||||
if (game_finished)
|
||||
if (game_finished)
|
||||
break;
|
||||
if (reversi_make_move(&game, cur_row, cur_col, cur_player) > 0) {
|
||||
/* Move was made. Global changes on the board are possible */
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -185,7 +185,11 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
{
|
||||
char *buf;
|
||||
int rc;
|
||||
if(!parameter) return PLUGIN_ERROR;
|
||||
if(!parameter)
|
||||
return PLUGIN_ERROR;
|
||||
|
||||
if (!rb->yesno_pop_confirm(ID2P(LANG_REALLY_OVERWRITE)))
|
||||
return PLUGIN_OK;
|
||||
|
||||
filename = (char *)parameter;
|
||||
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -281,6 +281,9 @@ enum plugin_status plugin_start(const void *parameter)
|
|||
if (!parameter)
|
||||
return PLUGIN_ERROR;
|
||||
|
||||
if (!rb->yesno_pop_confirm(ID2P(LANG_REALLY_OVERWRITE)))
|
||||
return PLUGIN_OK;
|
||||
|
||||
audiobuf = rb->plugin_get_audio_buffer(&audiobuflen);
|
||||
|
||||
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@
|
|||
/* this is the plugin entry point */
|
||||
enum plugin_status plugin_start(const void* parameter)
|
||||
{
|
||||
if (!parameter)
|
||||
return PLUGIN_ERROR;
|
||||
|
||||
char** title_and_text = (char**)parameter;
|
||||
view_text(title_and_text[0], title_and_text[1]);
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -57,6 +57,9 @@ long start_time IBSS_ATTR = 0;
|
|||
|
||||
enum plugin_status plugin_start(const void* parameter)
|
||||
{
|
||||
if (!parameter)
|
||||
return PLUGIN_ERROR;
|
||||
|
||||
#if LCD_DEPTH > 1
|
||||
rb->lcd_set_backdrop(NULL);
|
||||
#endif
|
||||
|
|
@ -211,7 +214,7 @@ void spkb_process_events( int evenframe )
|
|||
ki = KS_TO_KEY(intkeys[3]);
|
||||
spkb_kbstate[ki].state = 0;
|
||||
}
|
||||
|
||||
|
||||
if ( buttons & ZX_LEFT ){
|
||||
ki = KS_TO_KEY(intkeys[2]);
|
||||
spkb_kbstate[ki].state = 1;
|
||||
|
|
@ -220,7 +223,7 @@ void spkb_process_events( int evenframe )
|
|||
ki = KS_TO_KEY(intkeys[2]);
|
||||
spkb_kbstate[ki].state = 0;
|
||||
}
|
||||
|
||||
|
||||
if ( buttons & ZX_UP ){
|
||||
ki = KS_TO_KEY(intkeys[0]);
|
||||
spkb_kbstate[ki].state = 1;
|
||||
|
|
@ -229,7 +232,7 @@ void spkb_process_events( int evenframe )
|
|||
ki = KS_TO_KEY(intkeys[0]);
|
||||
spkb_kbstate[ki].state = 0;
|
||||
}
|
||||
|
||||
|
||||
if ( buttons & ZX_DOWN ){
|
||||
ki = KS_TO_KEY(intkeys[1]);
|
||||
spkb_kbstate[ki].state = 1;
|
||||
|
|
@ -238,7 +241,7 @@ void spkb_process_events( int evenframe )
|
|||
ki = KS_TO_KEY(intkeys[1]);
|
||||
spkb_kbstate[ki].state = 0;
|
||||
}
|
||||
|
||||
|
||||
if ( buttons & ZX_SELECT ){
|
||||
ki = KS_TO_KEY(intkeys[4]);
|
||||
spkb_kbstate[ki].state = 1;
|
||||
|
|
|
|||
|
|
@ -748,6 +748,7 @@ Chu Khánh Hanh
|
|||
Hoàng Manh Phú
|
||||
Gyúróczki Norbert
|
||||
Ivan Romaniuk-Mikhailovsky
|
||||
Matthieu BACHELIER
|
||||
|
||||
The libmad team
|
||||
The wavpack team
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue