diff options
author | Strangerke | 2013-10-04 18:14:47 +0200 |
---|---|---|
committer | Strangerke | 2013-10-04 18:14:47 +0200 |
commit | b0a498c1e5b0d1e9db7f37e7119c2a49d589b721 (patch) | |
tree | 3a7c4115aee5a689db332d537f9bc50eb12c90bb | |
parent | c53917ec64eae2bdc2e5eed52cf1f542a07cccbd (diff) | |
parent | 97f26f679408fe8d9196ea36924c3e24adc11d3e (diff) | |
download | scummvm-rg350-b0a498c1e5b0d1e9db7f37e7119c2a49d589b721.tar.gz scummvm-rg350-b0a498c1e5b0d1e9db7f37e7119c2a49d589b721.tar.bz2 scummvm-rg350-b0a498c1e5b0d1e9db7f37e7119c2a49d589b721.zip |
Merge branch 'avalanche' of https://github.com/urukgit/scummvm into avalanche
-rw-r--r-- | engines/avalanche/dialogs.cpp | 19 | ||||
-rw-r--r-- | engines/avalanche/graphics.cpp | 6 |
2 files changed, 13 insertions, 12 deletions
diff --git a/engines/avalanche/dialogs.cpp b/engines/avalanche/dialogs.cpp index fd2e47b34d..0c90d12293 100644 --- a/engines/avalanche/dialogs.cpp +++ b/engines/avalanche/dialogs.cpp @@ -128,15 +128,18 @@ void Dialogs::scrollModeNormal() { _vm->_graphics->showScroll(); Common::Event event; - while (!_vm->shouldQuit()) { + bool escape = false; + while (!_vm->shouldQuit() && !escape) { _vm->_graphics->refreshScreen(); - - _vm->getEvent(event); - if ((event.type == Common::EVENT_LBUTTONUP) || - ((event.type == Common::EVENT_KEYDOWN) && ((event.kbd.keycode == Common::KEYCODE_ESCAPE) || - (event.kbd.keycode == Common::KEYCODE_RETURN) || (event.kbd.keycode == Common::KEYCODE_HASH) || - (event.kbd.keycode == Common::KEYCODE_PLUS)))) - break; + while (_vm->getEvent(event)) { + if ((event.type == Common::EVENT_LBUTTONUP) || + ((event.type == Common::EVENT_KEYDOWN) && ((event.kbd.keycode == Common::KEYCODE_ESCAPE) || + (event.kbd.keycode == Common::KEYCODE_RETURN) || (event.kbd.keycode == Common::KEYCODE_HASH) || + (event.kbd.keycode == Common::KEYCODE_PLUS)))) { + escape = true; + break; + } + } } _vm->_graphics->restoreScreen(); diff --git a/engines/avalanche/graphics.cpp b/engines/avalanche/graphics.cpp index 92a9f0bed9..be397f520d 100644 --- a/engines/avalanche/graphics.cpp +++ b/engines/avalanche/graphics.cpp @@ -678,10 +678,8 @@ void GraphicManager::drawChar(byte ander, int x, int y, Color color) { void GraphicManager::refreshScreen() { // These cycles are for doubling the screen height. for (uint16 y = 0; y < _screen.h / 2; y++) { - for (uint16 x = 0; x < _screen.w; x++) { - for (int j = 0; j < 2; j++) - *(byte *)_screen.getBasePtr(x, y * 2 + j) = *(byte *)_surface.getBasePtr(x, y); - } + memcpy(_screen.getBasePtr(0, y * 2), _surface.getBasePtr(0, y), _screen.w); + memcpy(_screen.getBasePtr(0, y * 2 + 1), _surface.getBasePtr(0, y), _screen.w); } // Now we copy the stretched picture to the screen. g_system->copyRectToScreen(_screen.getPixels(), _screen.pitch, 0, 0, kScreenWidth, kScreenHeight * 2); |