aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2011-04-17 16:29:23 +0200
committerJohannes Schickel2011-04-17 16:29:23 +0200
commitb6fc71b0c5192aea09a240f84e4c380b52c1710b (patch)
tree457b08dc3dcaee509a6154a3b9b3579b3d4b228d
parent7b9b5681488f04a817d70812c18a8f1f88fbc931 (diff)
downloadscummvm-rg350-b6fc71b0c5192aea09a240f84e4c380b52c1710b.tar.gz
scummvm-rg350-b6fc71b0c5192aea09a240f84e4c380b52c1710b.tar.bz2
scummvm-rg350-b6fc71b0c5192aea09a240f84e4c380b52c1710b.zip
MADE: Prefer Surface::create taking a PixelFormat over the one taking a byte depth.
-rw-r--r--engines/made/pmvplayer.cpp2
-rw-r--r--engines/made/resource.cpp6
-rw-r--r--engines/made/screen.cpp6
3 files changed, 7 insertions, 7 deletions
diff --git a/engines/made/pmvplayer.cpp b/engines/made/pmvplayer.cpp
index e37bd87a7e..5ab24c1984 100644
--- a/engines/made/pmvplayer.cpp
+++ b/engines/made/pmvplayer.cpp
@@ -169,7 +169,7 @@ bool PmvPlayer::play(const char *filename) {
if (!_surface) {
_surface = new Graphics::Surface();
- _surface->create(width, height, 1);
+ _surface->create(width, height, Graphics::PixelFormat::createFormatCLUT8());
}
decompressMovieImage(imageData, *_surface, cmdOffs, pixelOffs, maskOffs, lineSize);
diff --git a/engines/made/resource.cpp b/engines/made/resource.cpp
index e556e4ab38..777f0cb443 100644
--- a/engines/made/resource.cpp
+++ b/engines/made/resource.cpp
@@ -95,7 +95,7 @@ void PictureResource::loadRaw(byte *source, int size) {
}
_picture = new Graphics::Surface();
- _picture->create(width, height, 1);
+ _picture->create(width, height, Graphics::PixelFormat::createFormatCLUT8());
decompressImage(source, *_picture, cmdOffs, pixelOffs, maskOffs, lineSize, cmdFlags, pixelFlags, maskFlags);
@@ -171,7 +171,7 @@ void PictureResource::loadChunked(byte *source, int size) {
}
_picture = new Graphics::Surface();
- _picture->create(width, height, 1);
+ _picture->create(width, height, Graphics::PixelFormat::createFormatCLUT8());
decompressImage(source, *_picture, cmdOffs, pixelOffs, maskOffs, lineSize, cmdFlags, pixelFlags, maskFlags);
@@ -227,7 +227,7 @@ void AnimationResource::load(byte *source, int size) {
uint16 lineSize = sourceS->readUint16LE();
Graphics::Surface *frame = new Graphics::Surface();
- frame->create(frameWidth, frameHeight, 1);
+ frame->create(frameWidth, frameHeight, Graphics::PixelFormat::createFormatCLUT8());
decompressImage(source + frameOffs, *frame, cmdOffs, pixelOffs, maskOffs, lineSize, 0, 0, 0, _flags & 1);
diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp
index 2649e2bd37..fe2bf64b82 100644
--- a/engines/made/screen.cpp
+++ b/engines/made/screen.cpp
@@ -36,10 +36,10 @@ Screen::Screen(MadeEngine *vm) : _vm(vm) {
_newPalette = new byte[768];
_backgroundScreen = new Graphics::Surface();
- _backgroundScreen->create(320, 200, 1);
+ _backgroundScreen->create(320, 200, Graphics::PixelFormat::createFormatCLUT8());
_workScreen = new Graphics::Surface();
- _workScreen->create(320, 200, 1);
+ _workScreen->create(320, 200, Graphics::PixelFormat::createFormatCLUT8());
_backgroundScreenDrawCtx.clipRect = Common::Rect(320, 200);
_workScreenDrawCtx.clipRect = Common::Rect(320, 200);
@@ -51,7 +51,7 @@ Screen::Screen(MadeEngine *vm) : _vm(vm) {
// Screen mask is only needed in v2 games
if (_vm->getGameID() != GID_RTZ) {
_screenMask = new Graphics::Surface();
- _screenMask->create(320, 200, 1);
+ _screenMask->create(320, 200, Graphics::PixelFormat::createFormatCLUT8());
_maskDrawCtx.clipRect = Common::Rect(320, 200);
_maskDrawCtx.destSurface = _screenMask;
}