diff options
author | Eugene Sandulenko | 2009-06-06 17:39:42 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2009-06-06 17:39:42 +0000 |
commit | 194ab100c7c9b729c974e0c90434a2a86c1846ec (patch) | |
tree | 1259323102e2a798ef12ded1c8d42df6fa990e9e | |
parent | 93d62da652d8bf514047b79aedb5412a7380397b (diff) | |
download | scummvm-rg350-194ab100c7c9b729c974e0c90434a2a86c1846ec.tar.gz scummvm-rg350-194ab100c7c9b729c974e0c90434a2a86c1846ec.tar.bz2 scummvm-rg350-194ab100c7c9b729c974e0c90434a2a86c1846ec.zip |
Fix bug #2434187: "SQ2: message not displayed, or vanishes too quickly"
svn-id: r41240
-rw-r--r-- | engines/agi/agi.cpp | 10 | ||||
-rw-r--r-- | engines/agi/agi.h | 2 | ||||
-rw-r--r-- | engines/agi/cycle.cpp | 6 | ||||
-rw-r--r-- | engines/agi/graphics.cpp | 11 | ||||
-rw-r--r-- | engines/agi/graphics.h | 2 |
5 files changed, 29 insertions, 2 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp index 07b66b9c05..9b3e335238 100644 --- a/engines/agi/agi.cpp +++ b/engines/agi/agi.cpp @@ -309,6 +309,16 @@ void AgiEngine::releaseImageStack(void) { _imageStack.clear(); } +void AgiEngine::pause(uint32 msec) { + uint32 endTime = _system->getMillis() + msec; + + while (_system->getMillis() < endTime) { + processEvents(); + _system->updateScreen(); + _system->delayMillis(10); + } +} + void AgiEngine::recordImageStackCall(uint8 type, int16 p1, int16 p2, int16 p3, int16 p4, int16 p5, int16 p6, int16 p7) { ImageStackElement pnew; diff --git a/engines/agi/agi.h b/engines/agi/agi.h index 3d4cfc78ee..c38ffbfbcc 100644 --- a/engines/agi/agi.h +++ b/engines/agi/agi.h @@ -828,6 +828,8 @@ public: int16 p4, int16 p5, int16 p6, int16 p7); void releaseImageStack(); + void pause(uint32 msec); + Console *_console; int agiInit(); diff --git a/engines/agi/cycle.cpp b/engines/agi/cycle.cpp index 2a4b9fa0c3..09df39248f 100644 --- a/engines/agi/cycle.cpp +++ b/engines/agi/cycle.cpp @@ -40,6 +40,12 @@ void AgiEngine::newRoom(int n) { VtEntry *v; int i; + // Simulate slowww computer. + // Many effects rely on it. + _gfx->setCursor(_renderMode == Common::kRenderAmiga, true); + pause(2000); + _gfx->setCursor(_renderMode == Common::kRenderAmiga); + debugC(4, kDebugLevelMain, "*** room %d ***", n); _sound->stopSound(); diff --git a/engines/agi/graphics.cpp b/engines/agi/graphics.cpp index 3be0318cbb..d69b7e1203 100644 --- a/engines/agi/graphics.cpp +++ b/engines/agi/graphics.cpp @@ -1013,7 +1013,14 @@ static const byte busyAmigaMouseCursor[] = { 1,1,1,1,1,1,1,1,1,1,1,1,1 }; -void GfxMgr::setCursor(bool amigaStyleCursor) { +void GfxMgr::setCursor(bool amigaStyleCursor, bool busy) { + if (busy) { + CursorMan.replaceCursorPalette(amigaMouseCursorPalette, 1, ARRAYSIZE(amigaMouseCursorPalette) / 4); + CursorMan.replaceCursor(busyAmigaMouseCursor, 13, 16, 7, 8, 0); + + return; + } + if (!amigaStyleCursor) { CursorMan.replaceCursorPalette(sciMouseCursorPalette, 1, ARRAYSIZE(sciMouseCursorPalette) / 4); CursorMan.replaceCursor(sciMouseCursor, 11, 16, 1, 1, 0); @@ -1155,6 +1162,8 @@ void GfxMgr::doUpdate() { update.y1 = MAX_INT; update.x2 = 0; update.y2 = 0; + + g_system->updateScreen(); } /** diff --git a/engines/agi/graphics.h b/engines/agi/graphics.h index 2965dd0da3..ac59137c07 100644 --- a/engines/agi/graphics.h +++ b/engines/agi/graphics.h @@ -92,7 +92,7 @@ public: void putBlock(int x1, int y1, int x2, int y2); void gfxSetPalette(); - void setCursor(bool amigaStyleCursor = false); + void setCursor(bool amigaStyleCursor = false, bool busy = false); void setCursorPalette(bool amigaStylePalette = false); int keypress(); |