diff options
author | Johannes Schickel | 2013-08-07 21:57:51 +0200 |
---|---|---|
committer | Johannes Schickel | 2013-08-07 22:01:19 +0200 |
commit | fffb2ee3ffab2a4689b32651efa0b345923ddd69 (patch) | |
tree | 9068e47a0e2a87fb0953e4bc0004d078c9fae239 /engines/hopkins/graphics.cpp | |
parent | 952a119ae16da8795785ca05a3f62ba7f5aee50b (diff) | |
download | scummvm-rg350-fffb2ee3ffab2a4689b32651efa0b345923ddd69.tar.gz scummvm-rg350-fffb2ee3ffab2a4689b32651efa0b345923ddd69.tar.bz2 scummvm-rg350-fffb2ee3ffab2a4689b32651efa0b345923ddd69.zip |
HOPKINS: Respect pitch when drawing on OSystem's screen surface.
Diffstat (limited to 'engines/hopkins/graphics.cpp')
-rw-r--r-- | engines/hopkins/graphics.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp index 66ddbfaae6..de9f043763 100644 --- a/engines/hopkins/graphics.cpp +++ b/engines/hopkins/graphics.cpp @@ -1202,15 +1202,13 @@ void GraphicsManager::displayZones() { void GraphicsManager::displayLines() { Graphics::Surface *screenSurface = g_system->lockScreen(); - uint16 *pixels = (uint16 *)screenSurface->getPixels(); - for (int lineIndex = 0; lineIndex < _vm->_linesMan->_linesNumb; lineIndex++) { int i = 0; do { int x = _vm->_linesMan->_lineItem[lineIndex]._lineData[i] - _scrollPosX; int y = _vm->_linesMan->_lineItem[lineIndex]._lineData[i+1]; if (x >= 0 && x < SCREEN_WIDTH && y >= 0 && y < SCREEN_HEIGHT) { - pixels[ y * screenSurface->w + x ] = 0xffff; + WRITE_UINT16(screenSurface->getBasePtr(x, y), 0xffff); } i += 2; } |