diff options
author | Eugene Sandulenko | 2009-06-06 17:41:29 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2009-06-06 17:41:29 +0000 |
commit | a5d762c029b904258cc1346fea54fb255585470f (patch) | |
tree | 6b12f0ead924ee3b0c5cb25b8d560cef025bee35 | |
parent | 26d8b2bb727376bdd5fb93f74b2595edcedc087d (diff) | |
download | scummvm-rg350-a5d762c029b904258cc1346fea54fb255585470f.tar.gz scummvm-rg350-a5d762c029b904258cc1346fea54fb255585470f.tar.bz2 scummvm-rg350-a5d762c029b904258cc1346fea54fb255585470f.zip |
Fix bug #1745954: "GR: Intro "jumpy" in parts (Amiga version)"
svn-id: r41244
-rw-r--r-- | engines/agi/agi.cpp | 3 | ||||
-rw-r--r-- | engines/agi/agi.h | 5 | ||||
-rw-r--r-- | engines/agi/cycle.cpp | 2 | ||||
-rw-r--r-- | engines/agi/graphics.cpp | 3 | ||||
-rw-r--r-- | engines/agi/op_cmd.cpp | 9 |
5 files changed, 21 insertions, 1 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp index 7c908eb56b..3b61807dfb 100644 --- a/engines/agi/agi.cpp +++ b/engines/agi/agi.cpp @@ -312,11 +312,14 @@ void AgiEngine::releaseImageStack(void) { void AgiEngine::pause(uint32 msec) { uint32 endTime = _system->getMillis() + msec; + _gfx->setCursor(_renderMode == Common::kRenderAmiga, true); + while (_system->getMillis() < endTime) { processEvents(); _system->updateScreen(); _system->delayMillis(10); } + _gfx->setCursor(_renderMode == Common::kRenderAmiga); } void AgiEngine::recordImageStackCall(uint8 type, int16 p1, int16 p2, int16 p3, diff --git a/engines/agi/agi.h b/engines/agi/agi.h index 01925d3491..5a577c9fba 100644 --- a/engines/agi/agi.h +++ b/engines/agi/agi.h @@ -335,6 +335,11 @@ enum { fNoSaveLoadAllowed }; +enum AgiSlowliness { + kPauseRoom = 1500, + kPausePicture = 500 +}; + struct AgiEvent { uint16 data; uint8 occured; diff --git a/engines/agi/cycle.cpp b/engines/agi/cycle.cpp index 92efbfebb5..45cf57a251 100644 --- a/engines/agi/cycle.cpp +++ b/engines/agi/cycle.cpp @@ -43,7 +43,7 @@ void AgiEngine::newRoom(int n) { // Simulate slowww computer. // Many effects rely on it. _gfx->setCursor(_renderMode == Common::kRenderAmiga, true); - pause(2000); + pause(kPauseRoom); _gfx->setCursor(_renderMode == Common::kRenderAmiga); debugC(4, kDebugLevelMain, "*** room %d ***", n); diff --git a/engines/agi/graphics.cpp b/engines/agi/graphics.cpp index d69b7e1203..d3f381a397 100644 --- a/engines/agi/graphics.cpp +++ b/engines/agi/graphics.cpp @@ -1214,6 +1214,9 @@ void GfxMgr::flushBlockA(int x1, int y1, int x2, int y2) { */ void GfxMgr::flushScreen() { flushBlock(0, 0, GFX_WIDTH - 1, GFX_HEIGHT - 1); + + doUpdate(); + g_system->updateScreen(); } /** diff --git a/engines/agi/op_cmd.cpp b/engines/agi/op_cmd.cpp index a0824c850d..5d08313b52 100644 --- a/engines/agi/op_cmd.cpp +++ b/engines/agi/op_cmd.cpp @@ -626,6 +626,9 @@ cmd(set_simple) { cmd_close_window(NULL); g_picture->showPic(); game.pictureShown = 1; + + // Simulate slowww computer. Many effects rely on this + g_agi->pause(kPausePicture); } } @@ -760,6 +763,9 @@ cmd(draw_pic) { // Fixes bug #1658514: AGI: SQ1 (2.2 DOS ENG) bizzare exploding roger if (g_agi->getGameID() == GID_SQ1 && _v[p0] == 20) g_agi->setflag(103, false); + + // Simulate slowww computer. Many effects rely on this + g_agi->pause(kPausePicture); } cmd(show_pic) { @@ -792,6 +798,9 @@ cmd(overlay_pic) { g_sprites->blitBoth(); game.pictureShown = 0; g_sprites->commitBoth(); + + // Simulate slowww computer. Many effects rely on this + g_agi->pause(kPausePicture); } cmd(show_pri_screen) { |