SCI: calling wait() directly and removing it from SciGui
svn-id: r49853
This commit is contained in:
parent
a21b9c7b96
commit
af5346e7ab
5 changed files with 7 additions and 21 deletions
|
@ -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
|
||||
|
|
|
@ -51,8 +51,6 @@ public:
|
|||
|
||||
virtual void init(bool usesOldGfxFunctions);
|
||||
|
||||
virtual void wait(int16 ticks);
|
||||
|
||||
protected:
|
||||
GfxCursor *_cursor;
|
||||
EngineState *_s;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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) ||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue