summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/plugins/xworld/sys.c81
1 files changed, 37 insertions, 44 deletions
diff --git a/apps/plugins/xworld/sys.c b/apps/plugins/xworld/sys.c
index 14c928f067..03b032c055 100644
--- a/apps/plugins/xworld/sys.c
+++ b/apps/plugins/xworld/sys.c
@@ -23,16 +23,17 @@
23/* vertical stride support (as of Dec. 2014, only the M:Robe 500 has a color, 23/* vertical stride support (as of Dec. 2014, only the M:Robe 500 has a color,
24 vertical stride LCD) */ 24 vertical stride LCD) */
25 25
26/* monochrome/grayscale support (many of these targets have vertical strides, 26/* monochrome/grayscale support (many grayscale targets have vertical strides,
27 so get that working first!) */ 27 so get that working first!) */
28 28
29#include "plugin.h" 29#include "plugin.h"
30
30#include "lib/display_text.h" 31#include "lib/display_text.h"
31#include "lib/helper.h" 32#include "lib/helper.h"
32#include "lib/playback_control.h"
33#include "lib/pluginlib_actions.h" 33#include "lib/pluginlib_actions.h"
34#include "lib/pluginlib_bmp.h" 34#include "lib/pluginlib_bmp.h"
35#include "lib/pluginlib_exit.h" 35#include "lib/pluginlib_exit.h"
36
36#include "sys.h" 37#include "sys.h"
37#include "parts.h" 38#include "parts.h"
38#include "engine.h" 39#include "engine.h"
@@ -293,16 +294,15 @@ void sys_menu(struct System* sys)
293 MENUITEM_STRINGLIST(menu, "XWorld Menu", mainmenu_cb, 294 MENUITEM_STRINGLIST(menu, "XWorld Menu", mainmenu_cb,
294 "Resume Game", /* 0 */ 295 "Resume Game", /* 0 */
295 "Start New Game", /* 1 */ 296 "Start New Game", /* 1 */
296 "Playback Control", /* 2 */ 297 "Video Settings", /* 2 */
297 "Video Settings", /* 3 */ 298 "Sound Settings", /* 3 */
298 "Sound Settings", /* 4 */ 299 "Fast Mode", /* 4 */
299 "Fast Mode", /* 5 */ 300 "Help", /* 5 */
300 "Help", /* 6 */ 301 "Reset Settings", /* 6 */
301 "Reset Settings", /* 7 */ 302 "Load", /* 7 */
302 "Load", /* 8 */ 303 "Save", /* 8 */
303 "Save", /* 9 */ 304 "Quit without Saving", /* 9 */
304 "Quit without Saving", /* 10 */ 305 "Save and Quit"); /* 10 */
305 "Save and Quit"); /* 11 */
306 bool quit = false; 306 bool quit = false;
307 while(!quit) 307 while(!quit)
308 { 308 {
@@ -316,41 +316,38 @@ void sys_menu(struct System* sys)
316 quit = true; 316 quit = true;
317 break; 317 break;
318 case 2: 318 case 2:
319 playback_control(NULL);
320 break;
321 case 3:
322 do_video_settings(sys); 319 do_video_settings(sys);
323 break; 320 break;
324 case 4: 321 case 3:
325 do_sound_settings(sys); 322 do_sound_settings(sys);
326 break; 323 break;
327 case 5: 324 case 4:
328 rb->set_bool("Fast Mode", &sys->e->vm._fastMode); 325 rb->set_bool("Fast Mode", &sys->e->vm._fastMode);
329 sys_save_settings(sys); 326 sys_save_settings(sys);
330 break; 327 break;
331 case 6: 328 case 5:
332 sys_do_help(); 329 sys_do_help();
333 break; 330 break;
334 case 7: 331 case 6:
335 sys_reset_settings(sys); 332 sys_reset_settings(sys);
336 sys_save_settings(sys); 333 sys_save_settings(sys);
337 break; 334 break;
338 case 8: 335 case 7:
339 rb->splash(0, "Loading..."); 336 rb->splash(0, "Loading...");
340 sys->loaded = engine_loadGameState(sys->e, 0); 337 sys->loaded = engine_loadGameState(sys->e, 0);
341 rb->lcd_update(); 338 rb->lcd_update();
342 break; 339 break;
343 case 9: 340 case 8:
344 sys->e->_stateSlot = 0; 341 sys->e->_stateSlot = 0;
345 rb->splash(0, "Saving..."); 342 rb->splash(0, "Saving...");
346 engine_saveGameState(sys->e, sys->e->_stateSlot, "quicksave"); 343 engine_saveGameState(sys->e, sys->e->_stateSlot, "quicksave");
347 rb->lcd_update(); 344 rb->lcd_update();
348 break; 345 break;
349 case 10: 346 case 9:
350 engine_deleteGameState(sys->e, 0); 347 engine_deleteGameState(sys->e, 0);
351 exit(PLUGIN_OK); 348 exit(PLUGIN_OK);
352 break; 349 break;
353 case 11: 350 case 10:
354 /* saves are NOT deleted on loading */ 351 /* saves are NOT deleted on loading */
355 exit(PLUGIN_OK); 352 exit(PLUGIN_OK);
356 break; 353 break;
@@ -606,16 +603,15 @@ static void do_pause_menu(struct System* sys)
606 MENUITEM_STRINGLIST(menu, "XWorld Menu", NULL, 603 MENUITEM_STRINGLIST(menu, "XWorld Menu", NULL,
607 "Resume Game", /* 0 */ 604 "Resume Game", /* 0 */
608 "Start New Game", /* 1 */ 605 "Start New Game", /* 1 */
609 "Playback Control", /* 2 */ 606 "Video Settings", /* 2 */
610 "Video Settings", /* 3 */ 607 "Sound Settings", /* 3 */
611 "Sound Settings", /* 4 */ 608 "Fast Mode", /* 4 */
612 "Fast Mode", /* 5 */ 609 "Enter Code", /* 5 */
613 "Enter Code", /* 6 */ 610 "Help", /* 6 */
614 "Help", /* 7 */ 611 "Reset Settings", /* 7 */
615 "Reset Settings", /* 8 */ 612 "Load", /* 8 */
616 "Load", /* 9 */ 613 "Save", /* 9 */
617 "Save", /* 10 */ 614 "Quit"); /* 10 */
618 "Quit"); /* 11 */
619 615
620 bool quit = false; 616 bool quit = false;
621 while(!quit) 617 while(!quit)
@@ -630,42 +626,39 @@ static void do_pause_menu(struct System* sys)
630 quit = true; 626 quit = true;
631 break; 627 break;
632 case 2: 628 case 2:
633 playback_control(NULL);
634 break;
635 case 3:
636 do_video_settings(sys); 629 do_video_settings(sys);
637 break; 630 break;
638 case 4: 631 case 3:
639 do_sound_settings(sys); 632 do_sound_settings(sys);
640 break; 633 break;
641 case 5: 634 case 4:
642 rb->set_bool("Fast Mode", &sys->e->vm._fastMode); 635 rb->set_bool("Fast Mode", &sys->e->vm._fastMode);
643 sys_save_settings(sys); 636 sys_save_settings(sys);
644 break; 637 break;
645 case 6: 638 case 5:
646 sys->input.code = true; 639 sys->input.code = true;
647 quit = true; 640 quit = true;
648 break; 641 break;
649 case 7: 642 case 6:
650 sys_do_help(); 643 sys_do_help();
651 break; 644 break;
652 case 8: 645 case 7:
653 sys_reset_settings(sys); 646 sys_reset_settings(sys);
654 sys_save_settings(sys); 647 sys_save_settings(sys);
655 break; 648 break;
656 case 9: 649 case 8:
657 rb->splash(0, "Loading..."); 650 rb->splash(0, "Loading...");
658 sys->loaded = engine_loadGameState(sys->e, 0); 651 sys->loaded = engine_loadGameState(sys->e, 0);
659 rb->lcd_update(); 652 rb->lcd_update();
660 quit = true; 653 quit = true;
661 break; 654 break;
662 case 10: 655 case 9:
663 sys->e->_stateSlot = 0; 656 sys->e->_stateSlot = 0;
664 rb->splash(0, "Saving..."); 657 rb->splash(0, "Saving...");
665 engine_saveGameState(sys->e, sys->e->_stateSlot, "quicksave"); 658 engine_saveGameState(sys->e, sys->e->_stateSlot, "quicksave");
666 rb->lcd_update(); 659 rb->lcd_update();
667 break; 660 break;
668 case 11: 661 case 10:
669 exit(PLUGIN_OK); 662 exit(PLUGIN_OK);
670 break; 663 break;
671 } 664 }