diff options
author | Johannes Schickel | 2011-05-01 16:54:45 +0200 |
---|---|---|
committer | Johannes Schickel | 2011-05-01 16:54:45 +0200 |
commit | 71bdb86e028db9556611f88b3686ce93312a8131 (patch) | |
tree | 3c24233044a8e72bd8ecd73b981f50c725d5d282 /engines/hugo | |
parent | 89b63e3adb4692c9659f8b133727ccc1e2af75b4 (diff) | |
parent | 8ff527ac4ef4237e63c0802a22eb0f942089e6c4 (diff) | |
download | scummvm-rg350-71bdb86e028db9556611f88b3686ce93312a8131.tar.gz scummvm-rg350-71bdb86e028db9556611f88b3686ce93312a8131.tar.bz2 scummvm-rg350-71bdb86e028db9556611f88b3686ce93312a8131.zip |
Merge pull request #16 "Add a PixelFormat to Graphics::Surface.".
For further discussion check here:
https://github.com/scummvm/scummvm/pull/16
Conflicts:
graphics/png.cpp
Diffstat (limited to 'engines/hugo')
-rw-r--r-- | engines/hugo/dialogs.cpp | 8 | ||||
-rw-r--r-- | engines/hugo/intro.cpp | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/engines/hugo/dialogs.cpp b/engines/hugo/dialogs.cpp index 50fcfa27db..f0dc84eae8 100644 --- a/engines/hugo/dialogs.cpp +++ b/engines/hugo/dialogs.cpp @@ -133,7 +133,7 @@ void TopMenu::loadBmpArr(Common::SeekableReadStream &in) { Common::SeekableSubReadStream stream(&in, filPos, filPos + bmpSize); arrayBmp[i * 2] = Graphics::ImageDecoder::loadFile(stream, g_system->getOverlayFormat()); arrayBmp[i * 2 + 1] = new Graphics::Surface(); - arrayBmp[i * 2 + 1]->create(arrayBmp[i * 2]->w * 2, arrayBmp[i * 2]->h * 2, arrayBmp[i * 2]->bytesPerPixel); + arrayBmp[i * 2 + 1]->create(arrayBmp[i * 2]->w * 2, arrayBmp[i * 2]->h * 2, g_system->getOverlayFormat()); byte *src = (byte *)arrayBmp[i * 2]->pixels; byte *dst = (byte *)arrayBmp[i * 2 + 1]->pixels; @@ -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 65dff78bb4..c31d76abd0 100644 --- a/engines/hugo/intro.cpp +++ b/engines/hugo/intro.cpp @@ -94,7 +94,7 @@ void intro_v1d::introInit() { surf.h = 200; surf.pixels = _vm->_screen->getFrontBuffer(); surf.pitch = 320; - surf.bytesPerPixel = 1; + surf.format = Graphics::PixelFormat::createFormatCLUT8(); _vm->_screen->displayList(kDisplayInit); } @@ -248,7 +248,7 @@ void intro_v2d::introInit() { surf.h = 200; surf.pixels = _vm->_screen->getFrontBuffer(); surf.pitch = 320; - surf.bytesPerPixel = 1; + surf.format = Graphics::PixelFormat::createFormatCLUT8(); char buffer[128]; @@ -294,7 +294,7 @@ void intro_v3d::introInit() { surf.h = 200; surf.pixels = _vm->_screen->getFrontBuffer(); surf.pitch = 320; - surf.bytesPerPixel = 1; + surf.format = Graphics::PixelFormat::createFormatCLUT8(); char buffer[128]; if (_vm->_boot.registered) |