aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorJohannes Schickel2011-04-17 16:26:30 +0200
committerJohannes Schickel2011-04-17 16:26:30 +0200
commitaca673372189a6a44de75a6808396d3e3fd4072d (patch)
tree742d23fd9f879c15f9f5a688b5688e5349f2a2b7 /engines
parenta2a22980d8e23bec6e1224d3615872a52ba1a469 (diff)
downloadscummvm-rg350-aca673372189a6a44de75a6808396d3e3fd4072d.tar.gz
scummvm-rg350-aca673372189a6a44de75a6808396d3e3fd4072d.tar.bz2
scummvm-rg350-aca673372189a6a44de75a6808396d3e3fd4072d.zip
GROOVIE: Prefer Surface::create taking a PixelFormat over the one taking a byte depth.
Groovie seems to use Graphics::Surface also to store YUV data, I used a fake PixelFormat setup there and added a TODO about it.
Diffstat (limited to 'engines')
-rw-r--r--engines/groovie/graphics.cpp4
-rw-r--r--engines/groovie/roq.cpp7
2 files changed, 7 insertions, 4 deletions
diff --git a/engines/groovie/graphics.cpp b/engines/groovie/graphics.cpp
index 3ceeeb6018..7f205a1dc0 100644
--- a/engines/groovie/graphics.cpp
+++ b/engines/groovie/graphics.cpp
@@ -32,8 +32,8 @@ namespace Groovie {
GraphicsMan::GraphicsMan(GroovieEngine *vm) :
_vm(vm), _changed(false), _fading(0) {
// Create the game surfaces
- _foreground.create(640, 320, _vm->_pixelFormat.bytesPerPixel);
- _background.create(640, 320, _vm->_pixelFormat.bytesPerPixel);
+ _foreground.create(640, 320, _vm->_pixelFormat);
+ _background.create(640, 320, _vm->_pixelFormat);
}
GraphicsMan::~GraphicsMan() {
diff --git a/engines/groovie/roq.cpp b/engines/groovie/roq.cpp
index 4d7157c797..a929c8ba0b 100644
--- a/engines/groovie/roq.cpp
+++ b/engines/groovie/roq.cpp
@@ -328,8 +328,11 @@ bool ROQPlayer::processBlockInfo(ROQBlockHeader &blockHeader) {
_prevBuf->free();
// Allocate new buffers
- _currBuf->create(width, height, 3);
- _prevBuf->create(width, height, 3);
+ // TODO: According to the comment below these are actually YUV
+ // surfaces, thus we can not setup a proper PixelFormat here.
+ // Think of a proper way to indicate that it is YUV data.
+ _currBuf->create(width, height, Graphics::PixelFormat(3, 0, 0, 0, 0, 0, 0, 0, 0));
+ _prevBuf->create(width, height, Graphics::PixelFormat(3, 0, 0, 0, 0, 0, 0, 0, 0));
// Clear the buffers with black YUV values
byte *ptr1 = (byte *)_currBuf->getBasePtr(0, 0);