Skip to content

Commit

Permalink
HOPKINS: Respect pitch when drawing on OSystem's screen surface.
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Schickel committed Aug 7, 2013
1 parent 952a119 commit fffb2ee
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions engines/hopkins/graphics.cpp
Expand Up @@ -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;
}
Expand Down

0 comments on commit fffb2ee

Please sign in to comment.