diff options
author | Johannes Schickel | 2005-12-10 19:02:56 +0000 |
---|---|---|
committer | Johannes Schickel | 2005-12-10 19:02:56 +0000 |
commit | 38c3df43933b18682ee0c78c9eb2a8e078f9ab64 (patch) | |
tree | faaf2bfeb1e7ff507c832d12cc76a66432fc6a7b /kyra/kyra.cpp | |
parent | d6e9396166d0dbf42f2698fc24cea32c084f74f2 (diff) | |
download | scummvm-rg350-38c3df43933b18682ee0c78c9eb2a8e078f9ab64.tar.gz scummvm-rg350-38c3df43933b18682ee0c78c9eb2a8e078f9ab64.tar.bz2 scummvm-rg350-38c3df43933b18682ee0c78c9eb2a8e078f9ab64.zip |
Implemented drawing of Brynns note.
svn-id: r19774
Diffstat (limited to 'kyra/kyra.cpp')
-rw-r--r-- | kyra/kyra.cpp | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/kyra/kyra.cpp b/kyra/kyra.cpp index d44cfe571e..b3f7e0deb8 100644 --- a/kyra/kyra.cpp +++ b/kyra/kyra.cpp @@ -363,6 +363,8 @@ int KyraEngine::init(GameDetector &detector) { _scenePhasingFlag = 0; _lastProcessedItem = 0; _lastProcessedItemHeight = 16; + + _hidPage = _screenPage = 0; return 0; } @@ -401,7 +403,8 @@ KyraEngine::~KyraEngine() { for (int i = 0; i < ARRAYSIZE(_sceneAnimTable); ++i) { free(_sceneAnimTable[i]); } - + free(_unkPtr1); + free(_unkPtr2); } void KyraEngine::errorString(const char *buf1, char *buf2) { @@ -574,6 +577,37 @@ void KyraEngine::delay(uint32 amount) { } while (!_fastMode && _system->getMillis() < start + amount); } +void KyraEngine::waitForEvent() { + bool finished = false; + OSystem::Event event; + while (!finished) { + while (_system->pollEvent(event)) { + switch (event.type) { + case OSystem::EVENT_KEYDOWN: + finished = true; + break; + case OSystem::EVENT_MOUSEMOVE: + _mouseX = event.mouse.x; + _mouseY = event.mouse.y; + break; + case OSystem::EVENT_QUIT: + quitGame(); + break; + case OSystem::EVENT_LBUTTONDOWN: + finished = true; + break; + default: + break; + } + } + + if (_debugger->isAttached()) + _debugger->onFrame(); + + _system->delayMillis(10); + } +} + void KyraEngine::mainLoop() { debug(9, "KyraEngine::mainLoop()"); |