void menu(void)
{
    MENUITEM_STRINGLIST(menu, "Menu", NULL, "Start Button", "Load", "Save", "Video", "Sound", "Quit", "MENU function");

    switch (rb->do_menu(&menu, NULL, NULL, false))
    {
        case 0:
            dwPad1 |= 1 << 3;
        case 1:
            load();
            break;
        case 2:
            save();
            break;
        case 3:
            video_menu();
            break;
        case 4:
            sound_onoff();
            break;
        case 5:
            dwSystem|=PAD_SYS_QUIT;
            quit=1;
            break;
        case 6:
if (NES_BUTTON_B == BUTTON_MENU ) 
{
            NES_BUTTON_B = BUTTON_NONE;
            NES_BUTTON_UP = BUTTON_MENU;
            break;   }
else {
            NES_BUTTON_UP = BUTTON_NONE;
            NES_BUTTON_B = BUTTON_MENU; }


        default:
            break;	
    }
    return;
}
예제 #2
0
REGISTER_FILE

#include "moptions.h"
#include "scp.h"
#include "gui.h"

#include "util/aastr.h"
#include "util/helper.h"
#include "other/twconfig.h"
#include "other/dialogs.h"

/*

-	master menu
		client.ini
-			video mode
				exit (exit menu)
				apply (use settings)
				make default (use settings and save)
				screen resolution
				bits per pixel
				fullscreen
				gamma correction?
				custom color filter settings?
-			audio mode
				done (use settings, save, and exit menu)
				cancel (exit menu)
				sound disable
				sound volume
				sound channels?
				music disable
				music volume
				music channels?
				game specific settings?
-			other
-				keyboard configuration
				star depth
				star density
				antialiasing mode
				raw backup images
				alpha blending?
				mouse sensitivity?
-		server.ini
			tic rate
			friendly fire
			shot relativity
			map width
			map height
-		turbo
-		f4turbo

*/

void options_menu (Game *game)
{
	int a;
	while (true) {
		a = tw_popup_dialog(NULL, options_dialog, 0);
		switch (a) {
			default:
			case DIALOG_OPTIONS_DONE:
			{
				return;
			}
			break;
			case DIALOG_OPTIONS_VIDEO:
			{
				video_menu(game);
			}
			break;
			case DIALOG_OPTIONS_AUDIO:
			{
				audio_menu(game);
			}
			break;
			case DIALOG_OPTIONS_CONFIG:
			{
				config_menu(game);
			}
			break;
			case DIALOG_OPTIONS_PHYSICS:
			{
				physics_menu(game);
			}
			break;
			case DIALOG_OPTIONS_DEFAULT:
			{
			}
			break;
		}
	}
	return;
}