From 1c0c15dd957cb0a136f5860552aae1875475068b Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 17 Apr 2011 17:27:01 +0200 Subject: HUGO: Prefer Surface::format over Surface::bytesPerPixel. --- engines/hugo/dialogs.cpp | 6 +++--- engines/hugo/intro.cpp | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'engines/hugo') diff --git a/engines/hugo/dialogs.cpp b/engines/hugo/dialogs.cpp index 54aaeeb400..178ec12726 100644 --- a/engines/hugo/dialogs.cpp +++ b/engines/hugo/dialogs.cpp @@ -141,12 +141,12 @@ void TopMenu::loadBmpArr(Common::SeekableReadStream &in) { src = (byte *)arrayBmp[i * 2]->getBasePtr(0, j); dst = (byte *)arrayBmp[i * 2 + 1]->getBasePtr(0, j * 2); for (int k = arrayBmp[i * 2]->w; k > 0; k--) { - for (int m = arrayBmp[i * 2]->bytesPerPixel; m > 0; m--) { + for (int m = arrayBmp[i * 2]->format.bytesPerPixel; m > 0; m--) { *dst++ = *src++; } - src -= arrayBmp[i * 2]->bytesPerPixel; + src -= arrayBmp[i * 2]->format.bytesPerPixel; - for (int m = arrayBmp[i * 2]->bytesPerPixel; m > 0; m--) { + for (int m = arrayBmp[i * 2]->format.bytesPerPixel; m > 0; m--) { *dst++ = *src++; } } diff --git a/engines/hugo/intro.cpp b/engines/hugo/intro.cpp index 63e81924c4..e79c0a72c0 100644 --- a/engines/hugo/intro.cpp +++ b/engines/hugo/intro.cpp @@ -94,6 +94,7 @@ void intro_v1d::introInit() { surf.pixels = _vm->_screen->getFrontBuffer(); surf.pitch = 320; surf.bytesPerPixel = 1; + surf.format = Graphics::PixelFormat::createFormatCLUT8(); _vm->_screen->displayList(kDisplayInit); } @@ -248,6 +249,7 @@ void intro_v2d::introInit() { surf.pixels = _vm->_screen->getFrontBuffer(); surf.pitch = 320; surf.bytesPerPixel = 1; + surf.format = Graphics::PixelFormat::createFormatCLUT8(); char buffer[128]; @@ -294,6 +296,7 @@ void intro_v3d::introInit() { surf.pixels = _vm->_screen->getFrontBuffer(); surf.pitch = 320; surf.bytesPerPixel = 1; + surf.format = Graphics::PixelFormat::createFormatCLUT8(); char buffer[128]; if (_vm->_boot.registered) -- cgit v1.2.3