/** * Run the cutscenes and the main menu. * * @return Error code */ int play () { MainMenu *mainMenu = NULL; JJ1Scene *scene = NULL; // Start the opening music playMusic("MENUSNG.PSM"); // Load and play the startup cutscene try { scene = new JJ1Scene("STARTUP.0SC"); } catch (int e) { return e; } if (scene->play() == E_QUIT) { delete scene; return E_NONE; } delete scene; // Load and run the menu try { mainMenu = new MainMenu(); } catch (int e) { return e; } if (mainMenu->main() == E_QUIT) { delete mainMenu; return E_NONE; } delete mainMenu; // Load and play the ending cutscene try { scene = new JJ1Scene("END.0SC"); } catch (int e) { return e; } scene->play(); delete scene; return E_NONE; }