forked from len0rd/rockbox
Bubbles: Have one quit item that doesn't save anything ("Quit without Saving") and one that saves everything again, partly reverting r22143 and picking up Hilton Shumway's suggestion about naming it "Quit without Saving".
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22488 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
22ddbd9ff0
commit
11def4a3b7
1 changed files with 13 additions and 10 deletions
|
|
@ -41,8 +41,8 @@ PLUGIN_HEADER
|
||||||
/* final game return status */
|
/* final game return status */
|
||||||
enum {
|
enum {
|
||||||
BB_LOSE,
|
BB_LOSE,
|
||||||
|
BB_QUIT_WITHOUT_SAVING,
|
||||||
BB_QUIT,
|
BB_QUIT,
|
||||||
BB_SAVE_AND_QUIT,
|
|
||||||
BB_USB,
|
BB_USB,
|
||||||
BB_END,
|
BB_END,
|
||||||
BB_WIN,
|
BB_WIN,
|
||||||
|
|
@ -2369,7 +2369,7 @@ static int bubbles_menu(struct game_context* bb) {
|
||||||
MENUITEM_STRINGLIST(menu,"Bubbles Menu",NULL,
|
MENUITEM_STRINGLIST(menu,"Bubbles Menu",NULL,
|
||||||
"Resume Game", "Start New Game",
|
"Resume Game", "Start New Game",
|
||||||
"Level", "High Scores", "Playback Control",
|
"Level", "High Scores", "Playback Control",
|
||||||
"Quit", "Save and Quit");
|
"Quit without Saving", "Quit");
|
||||||
|
|
||||||
while(!startgame){
|
while(!startgame){
|
||||||
switch (rb->do_menu(&menu, &selected, NULL, false))
|
switch (rb->do_menu(&menu, &selected, NULL, false))
|
||||||
|
|
@ -2400,10 +2400,10 @@ static int bubbles_menu(struct game_context* bb) {
|
||||||
case 4: /* Playback Control */
|
case 4: /* Playback Control */
|
||||||
playback_control(NULL);
|
playback_control(NULL);
|
||||||
break;
|
break;
|
||||||
case 5: /* quit */
|
case 5: /* quit but don't save */
|
||||||
return BB_QUIT;
|
return BB_QUIT_WITHOUT_SAVING;
|
||||||
case 6: /* save and quit */
|
case 6: /* save and quit */
|
||||||
return BB_SAVE_AND_QUIT;
|
return BB_QUIT;
|
||||||
case MENU_ATTACHED_USB:
|
case MENU_ATTACHED_USB:
|
||||||
bubbles_callback(bb);
|
bubbles_callback(bb);
|
||||||
return BB_USB;
|
return BB_USB;
|
||||||
|
|
@ -2518,14 +2518,17 @@ enum plugin_status plugin_start(const void* parameter) {
|
||||||
exit = true;
|
exit = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BB_SAVE_AND_QUIT:
|
|
||||||
rb->splash(HZ/2, "Saving Game ...");
|
|
||||||
bubbles_savegame(&bb);
|
|
||||||
/* fall through */
|
|
||||||
|
|
||||||
case BB_QUIT:
|
case BB_QUIT:
|
||||||
|
/* the first splash is to make sure it's read, but don't make it
|
||||||
|
* too long to not delay the saving further */
|
||||||
|
rb->splash(HZ/5, "Saving Game ...");
|
||||||
|
rb->splash(0, "Saving Game ...");
|
||||||
|
bubbles_savegame(&bb);
|
||||||
bubbles_savedata();
|
bubbles_savedata();
|
||||||
highscore_save(SCORE_FILE, highscores, NUM_SCORES);
|
highscore_save(SCORE_FILE, highscores, NUM_SCORES);
|
||||||
|
/* fall through */
|
||||||
|
|
||||||
|
case BB_QUIT_WITHOUT_SAVING:
|
||||||
exit = true;
|
exit = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue