void parsePad(int pad_gpio) { if (pad_gpio == PAD_SELECT) { stop(); shutdownSound(); program->terminate = true; // program = programs[0]; nextProgram = "Main menu"; } }
void LegacyMenu::onRaceFinishing() { if (_piRaceEngine->inData()->_displayMode == RM_DISP_MODE_NORMAL) { shutdownSound(); unloadCarsGraphics(); shutdownGraphicsView(); unloadTrackGraphics(); RmScreenShutdown(); } else { RmResScreenShutdown(); } }
void LegacyMenu::shutdown() { // Shutdown graphics in case relevant and not already done. if (_piRaceEngine->inData()->_displayMode == RM_DISP_MODE_NORMAL) { shutdownSound(); unloadCarsGraphics(); shutdownGraphicsView(); unloadTrackGraphics(); shutdownGraphics(/*bUnloadModule=*/true); } // Shutdown stuff that needs it. ::RmStopRaceMenuShutdown(); ::RmStartRaceMenuShutdown(); ::RmShutdownReUpdateStateHook(); }
int main(int argc __attribute__((unused)), char *argv[]) { /* init allegro library */ ALLEGRO_TIMER *timer = NULL; al_init(); /* prepare random number generator */ srand(time(NULL)); /* activate all engine subsystems using the startup macro */ resetCollisionTable(); STARTUP(videoInit()) STARTUP(init_datafile(argv)) STARTUP(al_install_keyboard()) STARTUP(al_install_joystick()) STARTUP(fontInit()) STARTUP(setupSound()) timer = al_create_timer(1.0 / 60); al_start_timer(timer); initMediaLib(); initBuffers(); /* prepare game */ startGame(); /* begin game loop */ while(!state.terminate) { runState(timer); } /* finish, return control to os */ al_destroy_timer(timer); shutdownState(); shutdownGame(); videoKill(); shutdownSound(); al_uninstall_system(); PHYSFS_deinit(); /* no problems, exit false */ return EXIT_SUCCESS; }
void parsePad(int pad_gpio) { if (pad_gpio == PAD_PREVIOUS) { if (currentSel > 0) currentSel--; } if (pad_gpio == PAD_NEXT) { if (currentSel < 2) currentSel++; } // select if (pad_gpio == PAD_SELECT) { switch (currentSel) { case 0: if (isPlaying) { pause(); } else { play(); } break; case 1: stop(); break; case 2: stop(); shutdownSound(); program->terminate = true; //program = programs[0]; nextProgram = "Main menu"; break; } } }
void parsePad(int pad_gpio) { if (pad_gpio == PAD_TOP) { rotate(); } if (pad_gpio == PAD_BOTTOM) { } if (pad_gpio == PAD_PREVIOUS) { move(LEFT); } if (pad_gpio == PAD_NEXT) { move(RIGHT); } if (pad_gpio == PAD_SELECT) { stop(); shutdownSound(); program->terminate = true; // program = programs[0]; nextProgram = "Main menu"; } }
void SystemExit() { #ifdef SOUND shutdownSound(); #endif SDL_Quit(); }