void AGOSEngine::sendSync(uint a) { uint16 id = to16Wrapper(a); _videoLockOut |= 0x8000; _vcPtr = (byte *)&id; vc15_sync(); _videoLockOut &= ~0x8000; }
void AGOSEngine_PN::timerProc() { if (_videoLockOut & 0x80E9 || _videoLockOut & 2) return; _syncCount++; _videoLockOut |= 2; _sound->handleSoundQueue(); handleMouseMoved(); handleKeyboard(); if (!(_videoLockOut & 0x10)) { if (_sampleWait) { _vgaCurSpriteId = 0xFFFF; vc15_sync(); _sampleWait = false; } if (_sampleEnd) { _vgaCurSpriteId = 0xFFFE; vc15_sync(); _sampleEnd = false; } processVgaEvents(); processVgaEvents(); _cepeFlag = !_cepeFlag; if (!_cepeFlag) processVgaEvents(); } if (_displayFlag) { displayScreen(); _displayFlag = 0; } _videoLockOut &= ~2; }