//-------------------------------------------------------------- void testApp::update(){ howareyou.update(); menuNOSTALGIC.update(); menuINTROSPECTIVE.update(); menuLOST.update(); menuDETERMINED.update(); fadeOutVid.update(); updateVideos(); playSong(songMood); ofSoundUpdate(); if (fadeOutVid.getIsMovieDone()) { fadeOutVid.closeMovie(); switch (moodSelected) { case 1 : nostalgic[randomNostalgic].play(); nostalgic[randomNostalgic].setLoopState(OF_LOOP_NONE); break; case 2 : introspective[randomIntrospective].play(); introspective[randomIntrospective].setLoopState(OF_LOOP_NONE); break; case 3 : lost[randomLost].play(); lost[randomLost].setLoopState(OF_LOOP_NONE); break; case 4 : determined[randomDetermined].play(); determined[randomDetermined].setLoopState(OF_LOOP_NONE); break; } } }
void BuriedEngine::yield() { // A cut down version of the Win16 yield function. Win32 handles this // asynchronously, which we don't want. Only needed for internal event loops. // Mark us that we're yielding so we can't save or load in a synchronous sequence _yielding = true; updateVideos(); pollForEvents(); // We don't send messages any messages from here. Otherwise, this is the same // as our main loop. _gfx->updateScreen(); _system->delayMillis(10); _yielding = false; }
VideoStore::VideoStore(string hostName, string userName, string password) : RentalStore(hostName, userName, password) { updateVideos(); }
void Console::cmdListVideos(const CommandLine &cl) { updateVideos(); printList(_videos, _maxSizeVideos); }
void Console::updateCaches() { updateVideos(); updateSounds(); }
Common::Error BuriedEngine::run() { _console = new BuriedConsole(this); #ifndef USE_ICONV // The Japanese version needs iconv support if (getLanguage() == Common::JA_JPN) return Common::Error(Common::kUnknownError, "No iconv support available"); #endif if (isTrueColor()) { initGraphics(640, 480, true, 0); if (_system->getScreenFormat().bytesPerPixel == 1) return Common::kUnsupportedColorMode; } else { initGraphics(640, 480, true); } if (isWin95()) { _mainEXE = new DatabasePE(); _library = new DatabasePE(); } else if (isCompressed()) { _mainEXE = new DatabaseNECompressed(); _library = new DatabaseNECompressed(); } else { _mainEXE = new DatabaseNE(); // Demo only uses the main EXE if (!isDemo()) _library = new DatabaseNE(); } if (!_mainEXE->load(getEXEName())) error("Failed to load main EXE '%s'", getEXEName().c_str()); if (_library && !_library->load(getLibraryName())) error("Failed to load library DLL '%s'", getLibraryName().c_str()); syncSoundSettings(); _gfx = new GraphicsManager(this); _sound = new SoundManager(this); _mainWindow = new FrameWindow(this); _mainWindow->showWindow(Window::kWindowShow); if (isDemo()) { ((FrameWindow *)_mainWindow)->showTitleSequence(); ((FrameWindow *)_mainWindow)->showMainMenu(); } else { bool doIntro = true; if (ConfMan.hasKey("save_slot")) { uint32 gameToLoad = ConfMan.getInt("save_slot"); doIntro = (loadGameState(gameToLoad).getCode() != Common::kNoError); // If the trial version tries to load a game without a time // zone that's part of the trial version, force the intro. if (isTrial() && !((FrameWindow *)_mainWindow)->getMainChildWindow()) doIntro = true; } // Play the intro only if we're starting from scratch if (doIntro) ((FrameWindow *)_mainWindow)->showClosingScreen(); } while (!shouldQuit()) { updateVideos(); pollForEvents(); sendAllMessages(); _gfx->updateScreen(); _system->delayMillis(10); } return Common::kNoError; }