summaryrefslogtreecommitdiff
path: root/apps/plugins/wormlet.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/wormlet.c')
-rw-r--r--apps/plugins/wormlet.c298
1 files changed, 149 insertions, 149 deletions
diff --git a/apps/plugins/wormlet.c b/apps/plugins/wormlet.c
index b4469eafda..279fcfcb61 100644
--- a/apps/plugins/wormlet.c
+++ b/apps/plugins/wormlet.c
@@ -2103,9 +2103,9 @@ bool set_worm_num_worms(void)
2103{ 2103{
2104 bool ret; 2104 bool ret;
2105 static const struct opt_items num_worms_option[3] = { 2105 static const struct opt_items num_worms_option[3] = {
2106 { "1", 0 }, 2106 { "1", -1 },
2107 { "2", 0 }, 2107 { "2", -1 },
2108 { "3", 0 }, 2108 { "3", -1 },
2109 }; 2109 };
2110 2110
2111 ret = rb->set_option("Number Of Worms", &worm_count,INT, num_worms_option, 3, NULL); 2111 ret = rb->set_option("Number Of Worms", &worm_count,INT, num_worms_option, 3, NULL);
@@ -2122,10 +2122,10 @@ bool set_worm_num_players(void)
2122{ 2122{
2123 bool ret; 2123 bool ret;
2124 static const struct opt_items num_players_option[4] = { 2124 static const struct opt_items num_players_option[4] = {
2125 { "0", 0 }, 2125 { "0", -1 },
2126 { "1", 0 }, 2126 { "1", -1 },
2127 { "2", 0 }, 2127 { "2", -1 },
2128 { "3", 0 } 2128 { "3", -1 }
2129 }; 2129 };
2130 2130
2131 ret = rb->set_option("Number of Players", &players, INT,num_players_option , 4, NULL); 2131 ret = rb->set_option("Number of Players", &players, INT,num_players_option , 4, NULL);
@@ -2144,17 +2144,17 @@ Sets the size of each argh block created
2144bool set_worm_argh_size(void) 2144bool set_worm_argh_size(void)
2145{ 2145{
2146 static const struct opt_items argh_size_option[11] = { 2146 static const struct opt_items argh_size_option[11] = {
2147 { "0", 0 }, 2147 { "0", -1 },
2148 { "1", 0 }, 2148 { "1", -1 },
2149 { "2", 0 }, 2149 { "2", -1 },
2150 { "3", 0 }, 2150 { "3", -1 },
2151 { "4", 0 }, 2151 { "4", -1 },
2152 { "5", 0 }, 2152 { "5", -1 },
2153 { "6", 0 }, 2153 { "6", -1 },
2154 { "7", 0 }, 2154 { "7", -1 },
2155 { "8", 0 }, 2155 { "8", -1 },
2156 { "9", 0 }, 2156 { "9", -1 },
2157 { "10", 0 } 2157 { "10", -1 }
2158 }; 2158 };
2159 2159
2160 return rb->set_option("Argh Size", &argh_size,INT,argh_size_option , 11, NULL); 2160 return rb->set_option("Argh Size", &argh_size,INT,argh_size_option , 11, NULL);
@@ -2166,17 +2166,17 @@ Sets the amount a worm grows per food
2166bool set_worm_food(void) 2166bool set_worm_food(void)
2167{ 2167{
2168 static const struct opt_items worm_food_option[11] = { 2168 static const struct opt_items worm_food_option[11] = {
2169 { "0", 0 }, 2169 { "0", -1 },
2170 { "1", 0 }, 2170 { "1", -1 },
2171 { "2", 0 }, 2171 { "2", -1 },
2172 { "3", 0 }, 2172 { "3", -1 },
2173 { "4", 0 }, 2173 { "4", -1 },
2174 { "5", 0 }, 2174 { "5", -1 },
2175 { "6", 0 }, 2175 { "6", -1 },
2176 { "7", 0 }, 2176 { "7", -1 },
2177 { "8", 0 }, 2177 { "8", -1 },
2178 { "9", 0 }, 2178 { "9", -1 },
2179 { "10", 0 } 2179 { "10", -1 }
2180 }; 2180 };
2181 return rb->set_option("Worm Growth Per Food", &worm_food,INT,worm_food_option , 11, NULL); 2181 return rb->set_option("Worm Growth Per Food", &worm_food,INT,worm_food_option , 11, NULL);
2182} 2182}
@@ -2187,11 +2187,11 @@ Sets the number of arghs created per food
2187bool set_argh_per_food(void) 2187bool set_argh_per_food(void)
2188{ 2188{
2189 static const struct opt_items argh_food_option[5] = { 2189 static const struct opt_items argh_food_option[5] = {
2190 { "0", 0 }, 2190 { "0", -1 },
2191 { "1", 0 }, 2191 { "1", -1 },
2192 { "2", 0 }, 2192 { "2", -1 },
2193 { "3", 0 }, 2193 { "3", -1 },
2194 { "4", 0 }, 2194 { "4", -1 },
2195 }; 2195 };
2196 return rb->set_option("Arghs Per Food", &arghs_per_food,INT,argh_food_option , 5, NULL); 2196 return rb->set_option("Arghs Per Food", &arghs_per_food,INT,argh_food_option , 5, NULL);
2197} 2197}
@@ -2203,25 +2203,25 @@ bool set_worm_speed(void)
2203{ 2203{
2204 bool ret; 2204 bool ret;
2205 static const struct opt_items speed_option[19] = { 2205 static const struct opt_items speed_option[19] = {
2206 { "0", 0 }, 2206 { "0", -1 },
2207 { "1", 0 }, 2207 { "1", -1 },
2208 { "2", 0 }, 2208 { "2", -1 },
2209 { "3", 0 }, 2209 { "3", -1 },
2210 { "4", 0 }, 2210 { "4", -1 },
2211 { "5", 0 }, 2211 { "5", -1 },
2212 { "6", 0 }, 2212 { "6", -1 },
2213 { "7", 0 }, 2213 { "7", -1 },
2214 { "8", 0 }, 2214 { "8", -1 },
2215 { "9", 0 }, 2215 { "9", -1 },
2216 { "10", 0 }, 2216 { "10", -1 },
2217 { "11", 0 }, 2217 { "11", -1 },
2218 { "12", 0 }, 2218 { "12", -1 },
2219 { "13", 0 }, 2219 { "13", -1 },
2220 { "14", 0 }, 2220 { "14", -1 },
2221 { "15", 0 }, 2221 { "15", -1 },
2222 { "16", 0 }, 2222 { "16", -1 },
2223 { "17", 0 }, 2223 { "17", -1 },
2224 { "18", 0 }, 2224 { "18", -1 },
2225 }; 2225 };
2226 2226
2227 2227
@@ -2240,17 +2240,17 @@ bool set_bool_options(char* string, bool* variable,
2240bool set_worm_control_style(void) 2240bool set_worm_control_style(void)
2241{ 2241{
2242 static const struct opt_items key1_option[2] = { 2242 static const struct opt_items key1_option[2] = {
2243 { "Remote Control", 0 }, 2243 { "Remote Control", -1 },
2244 { "No Rem. Control", 0 }, 2244 { "No Rem. Control", -1 },
2245 }; 2245 };
2246 2246
2247 static const struct opt_items key2_option[2] = { 2247 static const struct opt_items key2_option[2] = {
2248 { "2 Key Control", 0 }, 2248 { "2 Key Control", -1 },
2249 { "4 Key COntrol", 0 }, 2249 { "4 Key COntrol", -1 },
2250 }; 2250 };
2251 2251
2252 static const struct opt_items key3_option[1] = { 2252 static const struct opt_items key3_option[1] = {
2253 { "Out of Control", 0 }, 2253 { "Out of Control", -1 },
2254 }; 2254 };
2255 2255
2256 if (players > 1) { 2256 if (players > 1) {
@@ -2352,14 +2352,14 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
2352 /* Setup screen */ 2352 /* Setup screen */
2353 2353
2354 static const struct opt_items noyes[2] = { 2354 static const struct opt_items noyes[2] = {
2355 { "No", 0 }, 2355 { "No", -1 },
2356 { "Yes", 0 }, 2356 { "Yes", -1 },
2357 }; 2357 };
2358 2358
2359 static const struct opt_items num_worms_option[3] = { 2359 static const struct opt_items num_worms_option[3] = {
2360 { "1", 0 }, 2360 { "1", -1 },
2361 { "2", 0 }, 2361 { "2", -1 },
2362 { "3", 0 } 2362 { "3", -1 }
2363 }; 2363 };
2364 2364
2365#ifdef MULTIPLAYER 2365#ifdef MULTIPLAYER
@@ -2367,129 +2367,129 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
2367#else 2367#else
2368 static const struct opt_items num_players_option[2] = { 2368 static const struct opt_items num_players_option[2] = {
2369#endif 2369#endif
2370 { "0", 0 }, 2370 { "0", -1 },
2371 { "1", 0 } 2371 { "1", -1 }
2372#ifdef MULTIPLAYER 2372#ifdef MULTIPLAYER
2373 ,{ "2", 0 }, 2373 ,{ "2", -1 },
2374 { "3", 0 } 2374 { "3", -1 }
2375#endif 2375#endif
2376 }; 2376 };
2377 2377
2378 static const struct opt_items argh_size_option[9] = { 2378 static const struct opt_items argh_size_option[9] = {
2379 { "2", 0 }, 2379 { "2", -1 },
2380 { "3", 0 }, 2380 { "3", -1 },
2381 { "4", 0 }, 2381 { "4", -1 },
2382 { "5", 0 }, 2382 { "5", -1 },
2383 { "6", 0 }, 2383 { "6", -1 },
2384 { "7", 0 }, 2384 { "7", -1 },
2385 { "8", 0 }, 2385 { "8", -1 },
2386 { "9", 0 }, 2386 { "9", -1 },
2387 { "10", 0 } 2387 { "10", -1 }
2388 }; 2388 };
2389 2389
2390 static const struct opt_items food_size_option[9] = { 2390 static const struct opt_items food_size_option[9] = {
2391 { "2", 0 }, 2391 { "2", -1 },
2392 { "3", 0 }, 2392 { "3", -1 },
2393 { "4", 0 }, 2393 { "4", -1 },
2394 { "5", 0 }, 2394 { "5", -1 },
2395 { "6", 0 }, 2395 { "6", -1 },
2396 { "7", 0 }, 2396 { "7", -1 },
2397 { "8", 0 }, 2397 { "8", -1 },
2398 { "9", 0 }, 2398 { "9", -1 },
2399 { "10", 0 } 2399 { "10", -1 }
2400 }; 2400 };
2401 2401
2402 static const struct opt_items worm_food_option[16] = { 2402 static const struct opt_items worm_food_option[16] = {
2403 { "0", 0 }, 2403 { "0", -1 },
2404 { "1", 0 }, 2404 { "1", -1 },
2405 { "2", 0 }, 2405 { "2", -1 },
2406 { "3", 0 }, 2406 { "3", -1 },
2407 { "4", 0 }, 2407 { "4", -1 },
2408 { "5", 0 }, 2408 { "5", -1 },
2409 { "6", 0 }, 2409 { "6", -1 },
2410 { "7", 0 }, 2410 { "7", -1 },
2411 { "8", 0 }, 2411 { "8", -1 },
2412 { "9", 0 }, 2412 { "9", -1 },
2413 { "10", 0 }, 2413 { "10", -1 },
2414 { "11", 0 }, 2414 { "11", -1 },
2415 { "12", 0 }, 2415 { "12", -1 },
2416 { "13", 0 }, 2416 { "13", -1 },
2417 { "14", 0 }, 2417 { "14", -1 },
2418 { "15", 0 } 2418 { "15", -1 }
2419 }; 2419 };
2420 2420
2421 static const struct opt_items argh_food_option[9] = { 2421 static const struct opt_items argh_food_option[9] = {
2422 { "0", 0 }, 2422 { "0", -1 },
2423 { "1", 0 }, 2423 { "1", -1 },
2424 { "2", 0 }, 2424 { "2", -1 },
2425 { "3", 0 }, 2425 { "3", -1 },
2426 { "4", 0 }, 2426 { "4", -1 },
2427 { "5", 0 }, 2427 { "5", -1 },
2428 { "6", 0 }, 2428 { "6", -1 },
2429 { "7", 0 }, 2429 { "7", -1 },
2430 { "8", 0 } 2430 { "8", -1 }
2431 }; 2431 };
2432 2432
2433 static const struct opt_items speed_option[21] = { 2433 static const struct opt_items speed_option[21] = {
2434 { "0", 0 }, 2434 { "0", -1 },
2435 { "1", 0 }, 2435 { "1", -1 },
2436 { "2", 0 }, 2436 { "2", -1 },
2437 { "3", 0 }, 2437 { "3", -1 },
2438 { "4", 0 }, 2438 { "4", -1 },
2439 { "5", 0 }, 2439 { "5", -1 },
2440 { "6", 0 }, 2440 { "6", -1 },
2441 { "7", 0 }, 2441 { "7", -1 },
2442 { "8", 0 }, 2442 { "8", -1 },
2443 { "9", 0 }, 2443 { "9", -1 },
2444 { "10", 0 }, 2444 { "10", -1 },
2445 { "11", 0 }, 2445 { "11", -1 },
2446 { "12", 0 }, 2446 { "12", -1 },
2447 { "13", 0 }, 2447 { "13", -1 },
2448 { "14", 0 }, 2448 { "14", -1 },
2449 { "15", 0 }, 2449 { "15", -1 },
2450 { "16", 0 }, 2450 { "16", -1 },
2451 { "17", 0 }, 2451 { "17", -1 },
2452 { "18", 0 }, 2452 { "18", -1 },
2453 { "19", 0 }, 2453 { "19", -1 },
2454 { "20", 0 } 2454 { "20", -1 }
2455 }; 2455 };
2456 2456
2457 static const struct opt_items remoteonly_option[1] = { 2457 static const struct opt_items remoteonly_option[1] = {
2458 { "Remote Control", 0 } 2458 { "Remote Control", -1 }
2459 }; 2459 };
2460 2460
2461 static const struct opt_items key24_option[2] = { 2461 static const struct opt_items key24_option[2] = {
2462 { "4 Key Control", 0 }, 2462 { "4 Key Control", -1 },
2463 { "2 Key Control", 0 } 2463 { "2 Key Control", -1 }
2464 }; 2464 };
2465 2465
2466#ifdef REMOTE 2466#ifdef REMOTE
2467 static const struct opt_items remote_option[2] = { 2467 static const struct opt_items remote_option[2] = {
2468 { "Remote Control", 0 }, 2468 { "Remote Control", -1 },
2469 { "No Rem. Control", 0 } 2469 { "No Rem. Control", -1 }
2470 }; 2470 };
2471#else 2471#else
2472 static const struct opt_items key2_option[1] = { 2472 static const struct opt_items key2_option[1] = {
2473 { "2 Key Control", 0 } 2473 { "2 Key Control", -1 }
2474 }; 2474 };
2475#endif 2475#endif
2476 2476
2477 static const struct opt_items nokey_option[1] = { 2477 static const struct opt_items nokey_option[1] = {
2478 { "Out of Control", 0 } 2478 { "Out of Control", -1 }
2479 }; 2479 };
2480 2480
2481 static const struct menu_item items[] = { 2481 static const struct menu_item items[] = {
2482 { "Play Wormlet!", 0 }, 2482 { "Play Wormlet!", NULL },
2483 { "Number of Worms", 0 }, 2483 { "Number of Worms", NULL },
2484 { "Number of Players", 0 }, 2484 { "Number of Players", NULL },
2485 { "Control Style", 0 }, 2485 { "Control Style", NULL },
2486 { "Worm Growth Per Food", 0 }, 2486 { "Worm Growth Per Food", NULL },
2487 { "Worm Speed", 0 }, 2487 { "Worm Speed", NULL },
2488 { "Arghs Per Food", 0 }, 2488 { "Arghs Per Food", NULL },
2489 { "Argh Size", 0 }, 2489 { "Argh Size", NULL },
2490 { "Food Size", 0 }, 2490 { "Food Size", NULL },
2491 { "Revert to Default Settings", 0 }, 2491 { "Revert to Default Settings", NULL },
2492 { "Quit", 0 } 2492 { "Quit", NULL }
2493 }; 2493 };
2494 2494
2495 m = rb->menu_init(items, sizeof(items) / sizeof(*items), 2495 m = rb->menu_init(items, sizeof(items) / sizeof(*items),