diff options
author | Travis Howell | 2009-03-08 08:45:21 +0000 |
---|---|---|
committer | Travis Howell | 2009-03-08 08:45:21 +0000 |
commit | 2620d6836c001f2f295cb6efd6beab78f5a3c50f (patch) | |
tree | 81d5055b74abfc7b0be105bee13b39e6505fce91 /engines/agos/event.cpp | |
parent | 7bfab75a0814d0655a2504bf4c461df0000da0e4 (diff) | |
download | scummvm-rg350-2620d6836c001f2f295cb6efd6beab78f5a3c50f.tar.gz scummvm-rg350-2620d6836c001f2f295cb6efd6beab78f5a3c50f.tar.bz2 scummvm-rg350-2620d6836c001f2f295cb6efd6beab78f5a3c50f.zip |
Add initial support for Personal Nightmare.
Thanks to dreammaster for file decompression and icon decoding code.
NOTE: setjmp/longjmp code will require conversion for portability.
svn-id: r39216
Diffstat (limited to 'engines/agos/event.cpp')
-rw-r--r-- | engines/agos/event.cpp | 53 |
1 files changed, 47 insertions, 6 deletions
diff --git a/engines/agos/event.cpp b/engines/agos/event.cpp index 1ff2f9245c..248e9ee6c7 100644 --- a/engines/agos/event.cpp +++ b/engines/agos/event.cpp @@ -185,14 +185,13 @@ void AGOSEngine::restartAnimation() { if (!(_lockWord & 0x10)) return; - _window4Flag = 2; - - setMoveRect(0, 0, 224, 127); - displayScreen(); + if (getGameType() != GType_PN) { + _window4Flag = 2; + setMoveRect(0, 0, 224, 127); + displayScreen(); + } _lockWord &= ~0x10; - - // Check picture queue } void AGOSEngine::addVgaEvent(uint16 num, uint8 type, const byte *codePtr, uint16 curSprite, uint16 curZoneNum) { @@ -520,6 +519,9 @@ void AGOSEngine::delay(uint amount) { setBitFlag(92, false); _rightButtonDown++; break; + case Common::EVENT_RBUTTONUP: + _rightClick = true; + break; case Common::EVENT_RTL: case Common::EVENT_QUIT: return; @@ -611,6 +613,45 @@ void AGOSEngine_Feeble::timerProc() { _lockWord &= ~2; } +void AGOSEngine_PN::timerProc() { + if (_lockWord & 0x80E9 || _lockWord & 2) + return; + + _syncCount++; + + _lockWord |= 2; + + _sound->handleSound(); + handleMouseMoved(); + handleKeyboard(); + + if (!(_lockWord & 0x10)) { + if (_sampleWait) { + _vgaCurSpriteId = 0xFFFF; + vc15_sync(); + _sampleWait = false; + } + if (_sampleEnd) { + _vgaCurSpriteId = 0xFFFE; + vc15_sync(); + _sampleEnd = false; + } + + processVgaEvents(); + processVgaEvents(); + _cepeFlag ^= 1; + if (!_cepeFlag) + processVgaEvents(); + } + + if (_displayScreen) { + displayScreen(); + _displayScreen = false; + } + + _lockWord &= ~2; +} + void AGOSEngine::timerProc() { if (_lockWord & 0x80E9 || _lockWord & 2) return; |