diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dreamweb/dreamweb.h | 2 | ||||
-rw-r--r-- | engines/kyra/graphics/screen.cpp | 4 | ||||
-rw-r--r-- | engines/queen/display.cpp | 2 | ||||
-rw-r--r-- | engines/sci/graphics/frameout.cpp | 4 | ||||
-rw-r--r-- | engines/sci/graphics/screen.cpp | 10 | ||||
-rw-r--r-- | engines/sci/graphics/screen.h | 2 | ||||
-rw-r--r-- | engines/scumm/gfx.cpp | 6 | ||||
-rw-r--r-- | engines/scumm/saveload.cpp | 2 | ||||
-rw-r--r-- | engines/supernova/game-manager.cpp | 4 | ||||
-rw-r--r-- | engines/teenagent/scene.cpp | 8 | ||||
-rw-r--r-- | engines/testbed/graphics.cpp | 8 | ||||
-rw-r--r-- | engines/toltecs/screen.cpp | 4 |
12 files changed, 28 insertions, 28 deletions
diff --git a/engines/dreamweb/dreamweb.h b/engines/dreamweb/dreamweb.h index d34af40a05..d770c20bae 100644 --- a/engines/dreamweb/dreamweb.h +++ b/engines/dreamweb/dreamweb.h @@ -138,7 +138,7 @@ public: Common::String getSavegameFilename(int slot) const; - void setShakePos(int pos) { _system->setShakePos(pos); } + void setShakePos(int pos) { _system->setShakePos(0, pos); } void printUnderMonitor(); void quit(); diff --git a/engines/kyra/graphics/screen.cpp b/engines/kyra/graphics/screen.cpp index b20fa46c48..f53400a22c 100644 --- a/engines/kyra/graphics/screen.cpp +++ b/engines/kyra/graphics/screen.cpp @@ -3223,9 +3223,9 @@ void Screen::shakeScreen(int times) { while (times--) { // seems to be 1 line (320 pixels) offset in the original // 4 looks more like dosbox though, maybe check this again - _system->setShakePos(4); + _system->setShakePos(0, 4); _system->updateScreen(); - _system->setShakePos(0); + _system->setShakePos(0, 0); _system->updateScreen(); } } diff --git a/engines/queen/display.cpp b/engines/queen/display.cpp index d92afc04c7..b3763ac83a 100644 --- a/engines/queen/display.cpp +++ b/engines/queen/display.cpp @@ -1082,7 +1082,7 @@ void Display::drawBox(int16 x1, int16 y1, int16 x2, int16 y2, uint8 col) { } void Display::shake(bool reset) { - _system->setShakePos(reset ? 0 : 3); + _system->setShakePos(0, reset ? 0 : 3); } void Display::blankScreen() { diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index d299f8ea73..f7464d460c 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -1201,14 +1201,14 @@ void GfxFrameout::shakeScreen(int16 numShakes, const ShakeDirection direction) { } if (direction & kShakeVertical) { - g_system->setShakePos(_isHiRes ? 8 : 4); + g_system->setShakePos(0, _isHiRes ? 8 : 4); } updateScreen(); g_sci->getEngineState()->sleep(3); if (direction & kShakeVertical) { - g_system->setShakePos(0); + g_system->setShakePos(0, 0); } updateScreen(); diff --git a/engines/sci/graphics/screen.cpp b/engines/sci/graphics/screen.cpp index c6f6c4043d..cd81fdf36f 100644 --- a/engines/sci/graphics/screen.cpp +++ b/engines/sci/graphics/screen.cpp @@ -595,23 +595,23 @@ void GfxScreen::bitsRestoreDisplayScreen(Common::Rect rect, byte *&memoryPtr) { } } -void GfxScreen::setVerticalShakePos(uint16 shakePos) { +void GfxScreen::setShakePos(uint16 shakeXOffset, uint16 shakeYOffset) { if (!_upscaledHires) - g_system->setShakePos(shakePos); + g_system->setShakePos(shakeXOffset, shakeYOffset); else - g_system->setShakePos(_upscaledHeightMapping[shakePos]); + g_system->setShakePos(_upscaledWidthMapping[shakeXOffset], _upscaledHeightMapping[shakeYOffset]); } void GfxScreen::kernelShakeScreen(uint16 shakeCount, uint16 directions) { while (shakeCount--) { if (directions & kShakeVertical) - setVerticalShakePos(10); + setShakePos(0, 10); // TODO: horizontal shakes g_system->updateScreen(); g_sci->getEngineState()->sleep(3); if (directions & kShakeVertical) - setVerticalShakePos(0); + setShakePos(0, 0); g_system->updateScreen(); g_sci->getEngineState()->sleep(3); diff --git a/engines/sci/graphics/screen.h b/engines/sci/graphics/screen.h index 8bdf64719c..a9baf2bc10 100644 --- a/engines/sci/graphics/screen.h +++ b/engines/sci/graphics/screen.h @@ -157,7 +157,7 @@ private: void bitsSaveScreen(Common::Rect rect, byte *screen, uint16 screenWidth, byte *&memoryPtr); void bitsSaveDisplayScreen(Common::Rect rect, byte *&memoryPtr); - void setVerticalShakePos(uint16 shakePos); + void setShakePos(uint16 shakeXOffset, uint16 shakeYOffset); /** * If this flag is true, undithering is enabled, otherwise disabled. diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp index 9bf5133c82..3fb93afcd5 100644 --- a/engines/scumm/gfx.cpp +++ b/engines/scumm/gfx.cpp @@ -523,10 +523,10 @@ void ScummEngine::drawDirtyScreenParts() { // Handle shaking if (_shakeEnabled) { _shakeFrame = (_shakeFrame + 1) % NUM_SHAKE_POSITIONS; - _system->setShakePos(shake_positions[_shakeFrame]); + _system->setShakePos(0, shake_positions[_shakeFrame]); } else if (!_shakeEnabled &&_shakeFrame != 0) { _shakeFrame = 0; - _system->setShakePos(0); + _system->setShakePos(0, 0); } } @@ -1519,7 +1519,7 @@ void ScummEngine::setShake(int mode) { _shakeEnabled = mode != 0; _shakeFrame = 0; - _system->setShakePos(0); + _system->setShakePos(0, 0); } #pragma mark - diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp index 0997fd0a55..e3557ee233 100644 --- a/engines/scumm/saveload.cpp +++ b/engines/scumm/saveload.cpp @@ -1147,7 +1147,7 @@ void ScummEngine::saveLoadWithSerializer(Common::Serializer &s) { // When loading, reset the ShakePos. Fixes one part of bug #7141 if (s.isLoading() && s.getVersion() >= VER(10)) - _system->setShakePos(0); + _system->setShakePos(0, 0); // When loading, move the mouse to the saved mouse position. if (s.isLoading() && s.getVersion() >= VER(20)) { diff --git a/engines/supernova/game-manager.cpp b/engines/supernova/game-manager.cpp index 66fb013f86..1af355b4d9 100644 --- a/engines/supernova/game-manager.cpp +++ b/engines/supernova/game-manager.cpp @@ -804,9 +804,9 @@ void GameManager::saveTime() { void GameManager::screenShake() { for (int i = 0; i < 12; ++i) { - _vm->_system->setShakePos(8); + _vm->_system->setShakePos(0, 8); wait(1); - _vm->_system->setShakePos(0); + _vm->_system->setShakePos(0, 0); wait(1); } } diff --git a/engines/teenagent/scene.cpp b/engines/teenagent/scene.cpp index 5a8589a7cd..689fe1f55b 100644 --- a/engines/teenagent/scene.cpp +++ b/engines/teenagent/scene.cpp @@ -1111,19 +1111,19 @@ bool Scene::processEventQueue() { case SceneEvent::kEffect: _vm->_system->delayMillis(80); // 2 vsyncs - _vm->_system->setShakePos(8); + _vm->_system->setShakePos(0, 8); _vm->_system->updateScreen(); _vm->_system->delayMillis(80); // 2 vsyncs - _vm->_system->setShakePos(0); + _vm->_system->setShakePos(0, 0); _vm->_system->updateScreen(); _vm->_system->delayMillis(80); // 2 vsyncs - _vm->_system->setShakePos(4); + _vm->_system->setShakePos(0, 4); _vm->_system->updateScreen(); _vm->_system->delayMillis(80); // 2 vsyncs - _vm->_system->setShakePos(0); + _vm->_system->setShakePos(0, 0); _vm->_system->updateScreen(); currentEvent.clear(); diff --git a/engines/testbed/graphics.cpp b/engines/testbed/graphics.cpp index 65833d1de8..1eac3a8ffb 100644 --- a/engines/testbed/graphics.cpp +++ b/engines/testbed/graphics.cpp @@ -981,10 +981,10 @@ TestExitStatus GFXtests::shakingEffect() { Testsuite::writeOnScreen("If Shaking Effect works, this should shake!", pt); int times = 15; while (times--) { - g_system->setShakePos(25); + g_system->setShakePos(25, 25); g_system->delayMillis(50); g_system->updateScreen(); - g_system->setShakePos(0); + g_system->setShakePos(0, 0); g_system->delayMillis(50); g_system->updateScreen(); } @@ -1187,12 +1187,12 @@ TestExitStatus GFXtests::cursorTrails() { return kTestSkipped; } TestExitStatus passed = kTestFailed; - g_system->setShakePos(25); + g_system->setShakePos(25, 25); g_system->updateScreen(); if (Testsuite::handleInteractiveInput("Does the cursor leaves trails while moving?", "Yes", "No", kOptionRight)) { passed = kTestPassed; } - g_system->setShakePos(0); + g_system->setShakePos(0, 0); g_system->updateScreen(); return passed; } diff --git a/engines/toltecs/screen.cpp b/engines/toltecs/screen.cpp index 6bacc5dff7..efce0bc389 100644 --- a/engines/toltecs/screen.cpp +++ b/engines/toltecs/screen.cpp @@ -159,7 +159,7 @@ void Screen::startShakeScreen(int16 shakeCounter) { void Screen::stopShakeScreen() { _shakeActive = false; - _vm->_system->setShakePos(0); + _vm->_system->setShakePos(0, 0); } bool Screen::updateShakeScreen() { @@ -170,7 +170,7 @@ bool Screen::updateShakeScreen() { if (_shakeCounter == 0) { _shakeCounter = _shakeCounterInit; _shakePos ^= 8; - _vm->_system->setShakePos(_shakePos); + _vm->_system->setShakePos(0, _shakePos); return true; } } |