diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/lang/english.lang | 57 | ||||
-rw-r--r-- | apps/plugins/chessbox/chessbox.c | 4 | ||||
-rw-r--r-- | apps/plugins/mikmod/mikmod.c | 57 |
3 files changed, 92 insertions, 26 deletions
diff --git a/apps/lang/english.lang b/apps/lang/english.lang index a93cff90ec..2303af5c4c 100644 --- a/apps/lang/english.lang +++ b/apps/lang/english.lang | |||
@@ -16388,3 +16388,60 @@ | |||
16388 | *: "Legal Notices" | 16388 | *: "Legal Notices" |
16389 | </voice> | 16389 | </voice> |
16390 | </phrase> | 16390 | </phrase> |
16391 | <phrase> | ||
16392 | id: LANG_ERROR_FORMATSTR | ||
16393 | desc: for general use | ||
16394 | user: core | ||
16395 | <source> | ||
16396 | *: "Error: %s" | ||
16397 | </source> | ||
16398 | <dest> | ||
16399 | *: "Error: %s" | ||
16400 | </dest> | ||
16401 | <voice> | ||
16402 | *: "Error" | ||
16403 | </voice> | ||
16404 | </phrase> | ||
16405 | <phrase> | ||
16406 | id: LANG_MIKMOD_SETTINGS | ||
16407 | desc: mikmod plugin | ||
16408 | user: core | ||
16409 | <source> | ||
16410 | *: "Mikmod Settings" | ||
16411 | </source> | ||
16412 | <dest> | ||
16413 | *: "Mikmod Settings" | ||
16414 | </dest> | ||
16415 | <voice> | ||
16416 | *: "Mik mod Settings" | ||
16417 | </voice> | ||
16418 | </phrase> | ||
16419 | <phrase> | ||
16420 | id: LANG_MIKMOD_MENU | ||
16421 | desc: mikmod plugin | ||
16422 | user: core | ||
16423 | <source> | ||
16424 | *: "Mikmod Menu" | ||
16425 | </source> | ||
16426 | <dest> | ||
16427 | *: "Mikmod Menu" | ||
16428 | </dest> | ||
16429 | <voice> | ||
16430 | *: "Mik mod Menu" | ||
16431 | </voice> | ||
16432 | </phrase> | ||
16433 | <phrase> | ||
16434 | id: LANG_CHESSBOX_MENU | ||
16435 | desc: chessbox plugin | ||
16436 | user: core | ||
16437 | <source> | ||
16438 | *: "Chessbox Menu" | ||
16439 | </source> | ||
16440 | <dest> | ||
16441 | *: "Chessbox Menu" | ||
16442 | </dest> | ||
16443 | <voice> | ||
16444 | *: "Chess box Menu" | ||
16445 | </voice> | ||
16446 | </phrase> | ||
16447 | |||
diff --git a/apps/plugins/chessbox/chessbox.c b/apps/plugins/chessbox/chessbox.c index 089cf7c400..a283be3cda 100644 --- a/apps/plugins/chessbox/chessbox.c +++ b/apps/plugins/chessbox/chessbox.c | |||
@@ -555,7 +555,7 @@ static int cb_menu_viewer(void) | |||
555 | { | 555 | { |
556 | int selection; | 556 | int selection; |
557 | 557 | ||
558 | MENUITEM_STRINGLIST(menu,"Chessbox Menu",NULL, | 558 | MENUITEM_STRINGLIST(menu, ID2P(LANG_CHESSBOX_MENU), NULL, |
559 | ID2P(LANG_CHESSBOX_MENU_RESTART_GAME), | 559 | ID2P(LANG_CHESSBOX_MENU_RESTART_GAME), |
560 | ID2P(LANG_CHESSBOX_MENU_SELECT_OTHER_GAME), | 560 | ID2P(LANG_CHESSBOX_MENU_SELECT_OTHER_GAME), |
561 | ID2P(LANG_CHESSBOX_MENU_RESUME_GAME), | 561 | ID2P(LANG_CHESSBOX_MENU_RESUME_GAME), |
@@ -800,7 +800,7 @@ static int cb_menu(void) | |||
800 | { | 800 | { |
801 | int selection; | 801 | int selection; |
802 | 802 | ||
803 | MENUITEM_STRINGLIST(menu,"Chessbox Menu",NULL, | 803 | MENUITEM_STRINGLIST(menu,ID2P(LANG_CHESSBOX_MENU), NULL, |
804 | ID2P(LANG_CHESSBOX_MENU_NEW_GAME), | 804 | ID2P(LANG_CHESSBOX_MENU_NEW_GAME), |
805 | ID2P(LANG_CHESSBOX_MENU_RESUME_GAME), | 805 | ID2P(LANG_CHESSBOX_MENU_RESUME_GAME), |
806 | ID2P(LANG_CHESSBOX_MENU_SAVE_GAME), | 806 | ID2P(LANG_CHESSBOX_MENU_SAVE_GAME), |
diff --git a/apps/plugins/mikmod/mikmod.c b/apps/plugins/mikmod/mikmod.c index 5179848549..089c338308 100644 --- a/apps/plugins/mikmod/mikmod.c +++ b/apps/plugins/mikmod/mikmod.c | |||
@@ -236,7 +236,7 @@ static int change_filename(int direct) | |||
236 | 236 | ||
237 | if (entries == 0) | 237 | if (entries == 0) |
238 | { | 238 | { |
239 | rb->splash(HZ, "No supported files"); | 239 | rb->splash(HZ, ID2P(LANG_NO_FILES)); |
240 | return PLUGIN_ERROR; | 240 | return PLUGIN_ERROR; |
241 | } | 241 | } |
242 | 242 | ||
@@ -491,20 +491,6 @@ static struct mikmod_settings settings = | |||
491 | 491 | ||
492 | static struct mikmod_settings old_settings; | 492 | static struct mikmod_settings old_settings; |
493 | 493 | ||
494 | static const struct configdata config[] = | ||
495 | { | ||
496 | { TYPE_INT, 0, 128, { .int_p = &settings.pansep }, "Panning Separation", NULL}, | ||
497 | { TYPE_INT, 0, 15, { .int_p = &settings.reverb }, "Reverberation", NULL}, | ||
498 | { TYPE_BOOL, 0, 1, { .bool_p = &settings.interp }, "Interpolation", NULL}, | ||
499 | { TYPE_BOOL, 0, 1, { .bool_p = &settings.reverse }, "Reverse Channels", NULL}, | ||
500 | { TYPE_BOOL, 0, 1, { .bool_p = &settings.surround }, "Surround", NULL}, | ||
501 | { TYPE_BOOL, 0, 1, { .bool_p = &settings.hqmixer }, "HQ Mixer", NULL}, | ||
502 | { TYPE_INT, 0, HW_NUM_FREQ-1, { .int_p = &settings.sample_rate }, "Sample Rate", NULL}, | ||
503 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ | ||
504 | { TYPE_BOOL, 0, 1, { .bool_p = &settings.boost }, "CPU Boost", NULL}, | ||
505 | #endif | ||
506 | }; | ||
507 | |||
508 | static void applysettings(void) | 494 | static void applysettings(void) |
509 | { | 495 | { |
510 | md_pansep = settings.pansep; | 496 | md_pansep = settings.pansep; |
@@ -570,7 +556,7 @@ static int settings_menu(void) | |||
570 | { | 556 | { |
571 | int selection = 0; | 557 | int selection = 0; |
572 | 558 | ||
573 | MENUITEM_STRINGLIST(settings_menu, "Mikmod Settings", NULL, | 559 | MENUITEM_STRINGLIST(settings_menu, ID2P(LANG_MIKMOD_SETTINGS), NULL, |
574 | ID2P(LANG_PANNING_SEPARATION), | 560 | ID2P(LANG_PANNING_SEPARATION), |
575 | ID2P(LANG_REVERBERATION), | 561 | ID2P(LANG_REVERBERATION), |
576 | ID2P(LANG_INTERPOLATION), | 562 | ID2P(LANG_INTERPOLATION), |
@@ -582,7 +568,6 @@ static int settings_menu(void) | |||
582 | ID2P(LANG_CPU_BOOST) | 568 | ID2P(LANG_CPU_BOOST) |
583 | #endif | 569 | #endif |
584 | ); | 570 | ); |
585 | |||
586 | do | 571 | do |
587 | { | 572 | { |
588 | selection=rb->do_menu(&settings_menu,&selection, NULL, false); | 573 | selection=rb->do_menu(&settings_menu,&selection, NULL, false); |
@@ -650,7 +635,7 @@ static int main_menu(void) | |||
650 | int selection = 0; | 635 | int selection = 0; |
651 | int result; | 636 | int result; |
652 | 637 | ||
653 | MENUITEM_STRINGLIST(main_menu,"Mikmod Main Menu",NULL, | 638 | MENUITEM_STRINGLIST(main_menu,ID2P(LANG_MIKMOD_MENU), NULL, |
654 | ID2P(LANG_SETTINGS), | 639 | ID2P(LANG_SETTINGS), |
655 | ID2P(LANG_RETURN), | 640 | ID2P(LANG_RETURN), |
656 | ID2P(LANG_MENU_QUIT)); | 641 | ID2P(LANG_MENU_QUIT)); |
@@ -704,7 +689,12 @@ static void thread(void) | |||
704 | 689 | ||
705 | static void mm_errorhandler(void) | 690 | static void mm_errorhandler(void) |
706 | { | 691 | { |
707 | rb->splashf(HZ, "%s", MikMod_strerror(MikMod_errno)); | 692 | if (rb->global_settings->talk_menu) { |
693 | rb->talk_id(LANG_ERROR_FORMATSTR, true); | ||
694 | rb->talk_value_decimal(MikMod_errno, UNIT_INT, 0, true); | ||
695 | rb->talk_force_enqueue_next(); | ||
696 | } | ||
697 | rb->splashf(HZ, rb->str(LANG_ERROR_FORMATSTR), MikMod_strerror(MikMod_errno)); | ||
708 | quit = true; | 698 | quit = true; |
709 | } | 699 | } |
710 | 700 | ||
@@ -717,13 +707,18 @@ static int playfile(char* filename) | |||
717 | 707 | ||
718 | playingtime = 0; | 708 | playingtime = 0; |
719 | 709 | ||
720 | rb->splashf(HZ, "Loading %s", filename); | 710 | if (rb->global_settings->talk_menu) { |
711 | rb->talk_id(LANG_WAIT, true); | ||
712 | rb->talk_file_or_spell(NULL, filename, NULL, true); | ||
713 | rb->talk_force_enqueue_next(); | ||
714 | } | ||
715 | rb->splashf(HZ, "%s %s", rb->str(LANG_WAIT), filename); | ||
721 | 716 | ||
722 | module = Player_Load(filename, 64, 0); | 717 | module = Player_Load(filename, 64, 0); |
723 | 718 | ||
724 | if (!module) | 719 | if (!module) |
725 | { | 720 | { |
726 | rb->splashf(HZ, "%s", MikMod_strerror(MikMod_errno)); | 721 | mm_errorhandler(); |
727 | retval = PLUGIN_ERROR; | 722 | retval = PLUGIN_ERROR; |
728 | quit = true; | 723 | quit = true; |
729 | } | 724 | } |
@@ -745,7 +740,7 @@ static int playfile(char* filename) | |||
745 | IF_PRIO(, PRIORITY_PLAYBACK) | 740 | IF_PRIO(, PRIORITY_PLAYBACK) |
746 | IF_COP(, CPU))) == 0) | 741 | IF_COP(, CPU))) == 0) |
747 | { | 742 | { |
748 | rb->splash(HZ, "Cannot create thread!"); | 743 | rb->splashf(HZ, ID2P(LANG_ERROR_FORMATSTR), "Cannot create thread!"); |
749 | return PLUGIN_ERROR; | 744 | return PLUGIN_ERROR; |
750 | } | 745 | } |
751 | #endif | 746 | #endif |
@@ -925,9 +920,23 @@ enum plugin_status plugin_start(const void* parameter) | |||
925 | enum plugin_status retval; | 920 | enum plugin_status retval; |
926 | int orig_samplerate = rb->mixer_get_frequency(); | 921 | int orig_samplerate = rb->mixer_get_frequency(); |
927 | 922 | ||
923 | const struct configdata config[] = | ||
924 | { | ||
925 | { TYPE_INT, 0, 128, { .int_p = &settings.pansep }, rb->str(LANG_PANNING_SEPARATION), NULL}, | ||
926 | { TYPE_INT, 0, 15, { .int_p = &settings.reverb }, rb->str(LANG_REVERBERATION), NULL}, | ||
927 | { TYPE_BOOL, 0, 1, { .bool_p = &settings.interp }, rb->str(LANG_INTERPOLATION), NULL}, | ||
928 | { TYPE_BOOL, 0, 1, { .bool_p = &settings.reverse }, rb->str(LANG_SWAP_CHANNELS), NULL}, | ||
929 | { TYPE_BOOL, 0, 1, { .bool_p = &settings.surround }, rb->str(LANG_MIKMOD_SURROUND), NULL}, | ||
930 | { TYPE_BOOL, 0, 1, { .bool_p = &settings.hqmixer }, rb->str(LANG_MIKMOD_HQMIXER), NULL}, | ||
931 | { TYPE_INT, 0, HW_NUM_FREQ-1, { .int_p = &settings.sample_rate }, rb->str(LANG_MIKMOD_SAMPLERATE), NULL}, | ||
932 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ | ||
933 | { TYPE_BOOL, 0, 1, { .bool_p = &settings.boost }, rb->str(LANG_CPU_BOOST), NULL}, | ||
934 | #endif | ||
935 | }; | ||
936 | |||
928 | if (parameter == NULL) | 937 | if (parameter == NULL) |
929 | { | 938 | { |
930 | rb->splash(HZ*2, " Play .mod, .it, .s3m, .xm file "); | 939 | rb->splash(HZ*2, ID2P(LANG_NO_FILES)); |
931 | return PLUGIN_OK; | 940 | return PLUGIN_OK; |
932 | } | 941 | } |
933 | 942 | ||
@@ -978,7 +987,7 @@ enum plugin_status plugin_start(const void* parameter) | |||
978 | 987 | ||
979 | if (MikMod_Init("")) | 988 | if (MikMod_Init("")) |
980 | { | 989 | { |
981 | rb->splashf(HZ, "%s", MikMod_strerror(MikMod_errno)); | 990 | mm_errorhandler(); |
982 | return PLUGIN_ERROR; | 991 | return PLUGIN_ERROR; |
983 | } | 992 | } |
984 | 993 | ||