Index: talkbox/trunk/tools/genlang =================================================================== --- talkbox.orig/trunk/tools/genlang 2007-10-10 14:16:43.000000000 +0200 +++ talkbox/trunk/tools/genlang 2007-10-10 14:24:27.000000000 +0200 @@ -529,6 +529,20 @@ /* this contains the concatenation of all strings, separated by \\0 chars */ extern const unsigned char language_builtin[]; +#include "${prefix}_enum.h" + +MOO + ; + + close(HFILE); + + open(HFILE, ">${prefix}_enum.h") || + die "couldn't create file ${prefix}_enum.h\n"; + + print HFILE <set_option("Auto-Fire", &autofire_delay, INT, autofire_delay_settings, 16, NULL); + rb->set_option("Auto-Fire", &autofire_delay, INT, autofire_delay_settings, 15, NULL); break; case 2: Index: talkbox/trunk/apps/plugins/jpeg.c =================================================================== --- talkbox.orig/trunk/apps/plugins/jpeg.c 2007-10-10 14:50:00.000000000 +0200 +++ talkbox/trunk/apps/plugins/jpeg.c 2007-10-10 14:53:30.000000000 +0200 @@ -2498,18 +2498,18 @@ }; static const struct opt_items timeout[12] = { - { "1 second", -1 }, - { "2 seconds", -1 }, - { "3 seconds", -1 }, - { "4 seconds", -1 }, - { "5 seconds", -1 }, - { "6 seconds", -1 }, - { "7 seconds", -1 }, - { "8 seconds", -1 }, - { "9 seconds", -1 }, - { "10 seconds", -1 }, - { "15 seconds", -1 }, - { "20 seconds", -1 }, + { "1 second", TALK_ID(1, UNIT_SEC) }, + { "2 seconds", TALK_ID(2, UNIT_SEC) }, + { "3 seconds", TALK_ID(3, UNIT_SEC) }, + { "4 seconds", TALK_ID(4, UNIT_SEC) }, + { "5 seconds", TALK_ID(5, UNIT_SEC) }, + { "6 seconds", TALK_ID(6, UNIT_SEC) }, + { "7 seconds", TALK_ID(7, UNIT_SEC) }, + { "8 seconds", TALK_ID(8, UNIT_SEC) }, + { "9 seconds", TALK_ID(9, UNIT_SEC) }, + { "10 seconds", TALK_ID(10, UNIT_SEC) }, + { "15 seconds", TALK_ID(15, UNIT_SEC) }, + { "20 seconds", TALK_ID(20, UNIT_SEC) }, }; m = menu_init(rb, items, sizeof(items) / sizeof(*items), Index: talkbox/trunk/apps/plugins/wavrecord.c =================================================================== --- talkbox.orig/trunk/apps/plugins/wavrecord.c 2007-10-10 14:16:43.000000000 +0200 +++ talkbox/trunk/apps/plugins/wavrecord.c 2007-10-10 14:26:07.000000000 +0200 @@ -3689,19 +3689,19 @@ bool done = false; static const struct opt_items freqs[9] = { - { "8000Hz", -1 }, - { "11025Hz", -1 }, - { "12000Hz", -1 }, - { "16000Hz", -1 }, - { "22050Hz", -1 }, - { "24000Hz", -1 }, - { "32000Hz", -1 }, - { "44100Hz", -1 }, - { "48000Hz", -1 }, + { "8000Hz", TALK_ID(8, UNIT_KHZ) }, + { "11025Hz", TALK_ID(11, UNIT_KHZ) }, + { "12000Hz", TALK_ID(12, UNIT_KHZ) }, + { "16000Hz", TALK_ID(16, UNIT_KHZ) }, + { "22050Hz", TALK_ID(22, UNIT_KHZ) }, + { "24000Hz", TALK_ID(24, UNIT_KHZ) }, + { "32000Hz", TALK_ID(32, UNIT_KHZ) }, + { "44100Hz", TALK_ID(44, UNIT_KHZ) }, + { "48000Hz", TALK_ID(48, UNIT_KHZ) }, }; static const struct opt_items chans[2] = { - { "Mono", -1 }, - { "Stereo", -1 }, + { STR(LANG_CHANNEL_MONO) }, + { STR(LANG_CHANNEL_STEREO) }, }; static const struct opt_items srcs[WAV_NUM_SRC] = { { "Line In", -1 }, Index: talkbox/trunk/apps/plugins/wormlet.c =================================================================== --- talkbox.orig/trunk/apps/plugins/wormlet.c 2007-10-10 14:16:43.000000000 +0200 +++ talkbox/trunk/apps/plugins/wormlet.c 2007-10-10 14:26:16.000000000 +0200 @@ -2154,9 +2154,9 @@ { bool ret; static const struct opt_items num_worms_option[3] = { - { "1", -1 }, - { "2", -1 }, - { "3", -1 }, + { "1", TALK_ID(1, UNIT_INT) }, + { "2", TALK_ID(2, UNIT_INT) }, + { "3", TALK_ID(3, UNIT_INT) }, }; ret = rb->set_option("Number Of Worms", &worm_count,INT, num_worms_option, 3, NULL); @@ -2173,10 +2173,10 @@ { bool ret; static const struct opt_items num_players_option[4] = { - { "0", -1 }, - { "1", -1 }, - { "2", -1 }, - { "3", -1 } + { "0", TALK_ID(0, UNIT_INT) }, + { "1", TALK_ID(1, UNIT_INT) }, + { "2", TALK_ID(2, UNIT_INT) }, + { "3", TALK_ID(3, UNIT_INT) } }; ret = rb->set_option("Number of Players", &players, INT,num_players_option , 4, NULL); @@ -2195,17 +2195,17 @@ bool set_worm_argh_size(void) { static const struct opt_items argh_size_option[11] = { - { "0", -1 }, - { "1", -1 }, - { "2", -1 }, - { "3", -1 }, - { "4", -1 }, - { "5", -1 }, - { "6", -1 }, - { "7", -1 }, - { "8", -1 }, - { "9", -1 }, - { "10", -1 } + { "0", TALK_ID(0, UNIT_INT) }, + { "1", TALK_ID(1, UNIT_INT) }, + { "2", TALK_ID(2, UNIT_INT) }, + { "3", TALK_ID(3, UNIT_INT) }, + { "4", TALK_ID(4, UNIT_INT) }, + { "5", TALK_ID(5, UNIT_INT) }, + { "6", TALK_ID(6, UNIT_INT) }, + { "7", TALK_ID(7, UNIT_INT) }, + { "8", TALK_ID(8, UNIT_INT) }, + { "9", TALK_ID(9, UNIT_INT) }, + { "10", TALK_ID(10, UNIT_INT) } }; return rb->set_option("Argh Size", &argh_size,INT,argh_size_option , 11, NULL); @@ -2217,17 +2217,17 @@ bool set_worm_food(void) { static const struct opt_items worm_food_option[11] = { - { "0", -1 }, - { "1", -1 }, - { "2", -1 }, - { "3", -1 }, - { "4", -1 }, - { "5", -1 }, - { "6", -1 }, - { "7", -1 }, - { "8", -1 }, - { "9", -1 }, - { "10", -1 } + { "0", TALK_ID(0, UNIT_INT) }, + { "1", TALK_ID(1, UNIT_INT) }, + { "2", TALK_ID(2, UNIT_INT) }, + { "3", TALK_ID(3, UNIT_INT) }, + { "4", TALK_ID(4, UNIT_INT) }, + { "5", TALK_ID(5, UNIT_INT) }, + { "6", TALK_ID(6, UNIT_INT) }, + { "7", TALK_ID(7, UNIT_INT) }, + { "8", TALK_ID(8, UNIT_INT) }, + { "9", TALK_ID(9, UNIT_INT) }, + { "10", TALK_ID(10, UNIT_INT) } }; return rb->set_option("Worm Growth Per Food", &worm_food,INT,worm_food_option , 11, NULL); } @@ -2238,11 +2238,11 @@ bool set_argh_per_food(void) { static const struct opt_items argh_food_option[5] = { - { "0", -1 }, - { "1", -1 }, - { "2", -1 }, - { "3", -1 }, - { "4", -1 }, + { "0", TALK_ID(0, UNIT_INT) }, + { "1", TALK_ID(1, UNIT_INT) }, + { "2", TALK_ID(2, UNIT_INT) }, + { "3", TALK_ID(3, UNIT_INT) }, + { "4", TALK_ID(4, UNIT_INT) }, }; return rb->set_option("Arghs Per Food", &arghs_per_food,INT,argh_food_option , 5, NULL); } @@ -2405,14 +2405,14 @@ /* Setup screen */ static const struct opt_items noyes[2] = { - { "No", -1 }, - { "Yes", -1 }, + { STR(LANG_SET_BOOL_NO) }, + { STR(LANG_SET_BOOL_YES) }, }; static const struct opt_items num_worms_option[3] = { - { "1", -1 }, - { "2", -1 }, - { "3", -1 } + { "1", TALK_ID(1, UNIT_INT) }, + { "2", TALK_ID(2, UNIT_INT) }, + { "3", TALK_ID(3, UNIT_INT) } }; #ifdef MULTIPLAYER @@ -2420,36 +2420,36 @@ #else static const struct opt_items num_players_option[2] = { #endif - { "0", -1 }, - { "1", -1 } + { "0", TALK_ID(0, UNIT_INT) }, + { "1", TALK_ID(1, UNIT_INT) } #ifdef MULTIPLAYER - ,{ "2", -1 }, - { "3", -1 } + ,{ "2", TALK_ID(2, UNIT_INT) }, + { "3", TALK_ID(3, UNIT_INT) } #endif }; static const struct opt_items argh_size_option[9] = { - { "2", -1 }, - { "3", -1 }, - { "4", -1 }, - { "5", -1 }, - { "6", -1 }, - { "7", -1 }, - { "8", -1 }, - { "9", -1 }, - { "10", -1 } + { "2", TALK_ID(2, UNIT_INT) }, + { "3", TALK_ID(3, UNIT_INT) }, + { "4", TALK_ID(4, UNIT_INT) }, + { "5", TALK_ID(5, UNIT_INT) }, + { "6", TALK_ID(6, UNIT_INT) }, + { "7", TALK_ID(7, UNIT_INT) }, + { "8", TALK_ID(8, UNIT_INT) }, + { "9", TALK_ID(9, UNIT_INT) }, + { "10", TALK_ID(10, UNIT_INT) } }; static const struct opt_items food_size_option[9] = { - { "2", -1 }, - { "3", -1 }, - { "4", -1 }, - { "5", -1 }, - { "6", -1 }, - { "7", -1 }, - { "8", -1 }, - { "9", -1 }, - { "10", -1 } + { "2", TALK_ID(2, UNIT_INT) }, + { "3", TALK_ID(3, UNIT_INT) }, + { "4", TALK_ID(4, UNIT_INT) }, + { "5", TALK_ID(5, UNIT_INT) }, + { "6", TALK_ID(6, UNIT_INT) }, + { "7", TALK_ID(7, UNIT_INT) }, + { "8", TALK_ID(8, UNIT_INT) }, + { "9", TALK_ID(9, UNIT_INT) }, + { "10", TALK_ID(10, UNIT_INT) } }; static const struct opt_items worm_food_option[16] = {