/* Handle changes made to global settings in the options menu. */ void process_options_menu(void) { switch (options_menu->check()) { case MNID_OPENGL: #ifndef NOOPENGL if(use_gl != options_menu->isToggled(MNID_OPENGL)) { use_gl = !use_gl; st_video_setup(); } #else options_menu->get_item_by_id(MNID_OPENGL).toggled = false; #endif break; case MNID_FULLSCREEN: if(use_fullscreen != options_menu->isToggled(MNID_FULLSCREEN)) { use_fullscreen = !use_fullscreen; st_video_setup(); } break; case MNID_SOUND: if(use_sound != options_menu->isToggled(MNID_SOUND)) use_sound = !use_sound; break; case MNID_MUSIC: if(use_music != options_menu->isToggled(MNID_MUSIC)) { use_music = !use_music; music_manager->enable_music(use_music); } break; case MNID_SHOWFPS: if(show_fps != options_menu->isToggled(MNID_SHOWFPS)) show_fps = !show_fps; break; } }
int main(int argc, char * argv[]) { #ifdef _WII_ IO::SD OurSD; OurSD.Mount(); IO::USB OurUSB; OurUSB.Startup(); OurUSB.Mount(); #endif st_directory_setup(); #ifndef _WII_ parseargs(argc, argv); //// #endif st_audio_setup(); st_video_setup(); clearscreen(0, 0, 0); loading_surf = new Surface(datadir + "/images/title/loading.png", USE_ALPHA); loading_surf->draw( 160, 30); updatescreen(); st_joystick_setup(); st_general_setup(); st_menu(); loadshared(); if (launch_leveleditor_mode && level_startup_file) { leveleditor(level_startup_file); } else if (level_startup_file) { GameSession session(level_startup_file, 1, ST_GL_LOAD_LEVEL_FILE); session.run(); } else { title(); } clearscreen(0, 0, 0); updatescreen(); unloadshared(); st_general_free(); TileManager::destroy_instance(); #ifdef DEBUG Surface::debug_check(); #endif st_shutdown(); delete loading_surf; return 0; }