void Activate(unsigned int aId) { Overlay *overlay = new Overlay(aId); Database::overlay.Put(aId, overlay); overlay->SetAction(RenderDrawlist); overlay->Show(); }
// enter shell state void EnterShellState() { // set up drawlists InitDrawlists(); // create default font CreateDefaultFont(); // clear the screen glClear( GL_COLOR_BUFFER_BIT #ifdef ENABLE_DEPTH_TEST | GL_DEPTH_BUFFER_BIT #endif ); // show back buffer Platform::Present(); // reset simulation timer sim_rate = float(SIMULATION_RATE); sim_step = 1.0f / sim_rate; sim_turn = 0; sim_fraction = 1.0f; // input binding InitInput(INPUT_CONFIG.c_str()); // level configuration InitLevel("shell.xml"); // create options overlay shellmenu.mActive = NULL; shellmenu.Push(&shellmenumainpage); Overlay *options = new Overlay(0xef286ca5 /* "options" */); Database::overlay.Put(0xef286ca5 /* "options" */, options); options->SetAction(Overlay::Action(RenderShellOptions)); options->Show(); // start audio Sound::Resume(); // play the startup sound (HACK) PlaySoundCue(0x94326baa /* "startup" */); // set to runtime mode runtime = true; }