diff options
author | Willem Jan Palenstijn | 2013-10-03 23:48:56 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2013-10-03 23:48:56 +0200 |
commit | 97f26f679408fe8d9196ea36924c3e24adc11d3e (patch) | |
tree | dd954d3ca8f6652232a5c4029689dbc33a156f3b | |
parent | a6bdec5ca5dd92c4613b0e684f838326ec89939b (diff) | |
download | scummvm-rg350-97f26f679408fe8d9196ea36924c3e24adc11d3e.tar.gz scummvm-rg350-97f26f679408fe8d9196ea36924c3e24adc11d3e.tar.bz2 scummvm-rg350-97f26f679408fe8d9196ea36924c3e24adc11d3e.zip |
AVALANCHE: Use memcpy in refreshScreen
-rw-r--r-- | engines/avalanche/graphics.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/engines/avalanche/graphics.cpp b/engines/avalanche/graphics.cpp index 5e17dcda3e..23807ac45a 100644 --- a/engines/avalanche/graphics.cpp +++ b/engines/avalanche/graphics.cpp @@ -677,10 +677,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); |