void AGOSEngine_Elvira2::oe2_pauseGame() { // 135: pause game HitArea *ha; uint32 pauseTime = getTime(); haltAnimation(); while (!shouldQuit()) { _lastHitArea = NULL; _lastHitArea3 = NULL; while (!shouldQuit()) { if (processSpecialKeys() != 0 || _lastHitArea3 != 0) break; delay(1); } ha = _lastHitArea; if (ha == NULL) { } else if (ha->id == 201) { break; } } restartAnimation(); _gameStoppedClock = getTime() - pauseTime + _gameStoppedClock; }
void AGOSEngine_Simon2::os2_rescan() { // 83: restart subroutine if (_exitCutscene) { if (getBitFlag(9)) { endCutscene(); } } else { processSpecialKeys(); } setScriptReturn(-10); }
void AGOSEngine::waitForSync(uint a) { const uint maxCount = (getGameType() == GType_SIMON1) ? 1000 : 2500; if (getGameType() == GType_SIMON1 && (getFeatures() & GF_TALKIE)) { if (a != 200) { uint16 tmp = _lastVgaWaitFor; _lastVgaWaitFor = 0; if (tmp == a) return; } } _vgaWaitFor = a; _syncCount = 0; _exitCutscene = false; _rightButtonDown = false; while (_vgaWaitFor != 0 && !shouldQuit()) { if (_rightButtonDown) { if (_vgaWaitFor == 200 && (getGameType() == GType_FF || !getBitFlag(14))) { skipSpeech(); break; } } if (_exitCutscene) { if (getGameType() == GType_ELVIRA1) { if (_variableArray[105] == 0) { _variableArray[105] = 255; break; } } else if (getGameType() == GType_ELVIRA2 || getGameType() == GType_WW) { if (_vgaWaitFor == 51) { setBitFlag(244, 1); break; } } else { if (getBitFlag(9)) { endCutscene(); break; } } } processSpecialKeys(); if (_syncCount >= maxCount) { warning("waitForSync: wait timed out"); break; } delay(1); } }
void AGOSEngine::waitForMark(uint i) { _exitCutscene = false; while (!(_marks & (1 << i))) { if (_exitCutscene) { if (getGameType() == GType_PP) { if (_picture8600) break; } else { if (getBitFlag(9)) { endCutscene(); break; } } } else { processSpecialKeys(); } delay(10); } }