aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kiewitz2010-06-15 13:14:23 +0000
committerMartin Kiewitz2010-06-15 13:14:23 +0000
commitaf5346e7ab97190f45be17192deef9a764cd128d (patch)
treee8c74c0f262a31f4aedbd1a55479246fd7196518
parenta21b9c7b96a29d3be9285b4217e91f835fed31ec (diff)
downloadscummvm-rg350-af5346e7ab97190f45be17192deef9a764cd128d.tar.gz
scummvm-rg350-af5346e7ab97190f45be17192deef9a764cd128d.tar.bz2
scummvm-rg350-af5346e7ab97190f45be17192deef9a764cd128d.zip
SCI: calling wait() directly and removing it from SciGui
svn-id: r49853
-rw-r--r--engines/sci/graphics/gui.cpp4
-rw-r--r--engines/sci/graphics/gui.h2
-rw-r--r--engines/sci/graphics/paint16.cpp16
-rw-r--r--engines/sci/graphics/portrait.cpp2
-rw-r--r--engines/sci/graphics/transitions.cpp4
5 files changed, 7 insertions, 21 deletions
diff --git a/engines/sci/graphics/gui.cpp b/engines/sci/graphics/gui.cpp
index 847831c909..7febbeba69 100644
--- a/engines/sci/graphics/gui.cpp
+++ b/engines/sci/graphics/gui.cpp
@@ -91,8 +91,4 @@ void SciGui::init(bool usesOldGfxFunctions) {
_paint16->init(_animate, _text16);
}
-void SciGui::wait(int16 ticks) {
- _s->wait(ticks);
-}
-
} // End of namespace Sci
diff --git a/engines/sci/graphics/gui.h b/engines/sci/graphics/gui.h
index edb93e10cb..c3954286b3 100644
--- a/engines/sci/graphics/gui.h
+++ b/engines/sci/graphics/gui.h
@@ -51,8 +51,6 @@ public:
virtual void init(bool usesOldGfxFunctions);
- virtual void wait(int16 ticks);
-
protected:
GfxCursor *_cursor;
EngineState *_s;
diff --git a/engines/sci/graphics/paint16.cpp b/engines/sci/graphics/paint16.cpp
index 10eae3c618..103da594e6 100644
--- a/engines/sci/graphics/paint16.cpp
+++ b/engines/sci/graphics/paint16.cpp
@@ -562,22 +562,14 @@ void GfxPaint16::kernelShakeScreen(uint16 shakeCount, uint16 directions) {
if (directions & SCI_SHAKE_DIRECTION_VERTICAL)
_screen->setVerticalShakePos(10);
// TODO: horizontal shakes
+ g_system->updateScreen();
+ g_sci->getEngineState()->wait(3);
- if (g_system->getMillis() - g_sci->getEngineState()->_screenUpdateTime >= 1000 / 60) {
- g_system->updateScreen();
- g_sci->getEngineState()->_screenUpdateTime = g_system->getMillis();
- }
-
- _gui->wait(3);
if (directions & SCI_SHAKE_DIRECTION_VERTICAL)
_screen->setVerticalShakePos(0);
- if (g_system->getMillis() - g_sci->getEngineState()->_screenUpdateTime >= 1000 / 60) {
- g_system->updateScreen();
- g_sci->getEngineState()->_screenUpdateTime = g_system->getMillis();
- }
-
- _gui->wait(3);
+ g_system->updateScreen();
+ g_sci->getEngineState()->wait(3);
}
}
diff --git a/engines/sci/graphics/portrait.cpp b/engines/sci/graphics/portrait.cpp
index b912bf552e..a85d9a3b06 100644
--- a/engines/sci/graphics/portrait.cpp
+++ b/engines/sci/graphics/portrait.cpp
@@ -182,7 +182,7 @@ void Portrait::doit(Common::Point position, uint16 resourceId, uint16 noun, uint
// Wait till syncTime passed, then show specific animation bitmap
do {
- _gui->wait(1);
+ g_sci->getEngineState()->wait(1);
curEvent = _event->get(SCI_EVENT_ANY);
if (curEvent.type == SCI_EVENT_MOUSE_PRESS ||
(curEvent.type == SCI_EVENT_KEYBOARD && curEvent.data == SCI_KEY_ESC) ||
diff --git a/engines/sci/graphics/transitions.cpp b/engines/sci/graphics/transitions.cpp
index f73525caaf..0bb1a87fc2 100644
--- a/engines/sci/graphics/transitions.cpp
+++ b/engines/sci/graphics/transitions.cpp
@@ -291,7 +291,7 @@ void GfxTransitions::fadeOut() {
workPalette[colorNr * 4 + 2] = oldPalette[colorNr * 4 + 2] * stepNr / 100;
}
g_system->setPalette(workPalette + 4, 1, 254);
- _gui->wait(2);
+ g_sci->getEngineState()->wait(2);
}
}
@@ -301,7 +301,7 @@ void GfxTransitions::fadeIn() {
for (stepNr = 0; stepNr <= 100; stepNr += 10) {
_palette->kernelSetIntensity(1, 255, stepNr, true);
- _gui->wait(2);
+ g_sci->getEngineState()->wait(2);
}
}