aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/riven_graphics.cpp
diff options
context:
space:
mode:
authorBastien Bouclet2016-10-31 12:39:34 +0100
committerEugene Sandulenko2017-07-03 08:50:10 +0200
commit85712e56c8e2cf8a6e04110646f4345c153211fd (patch)
tree437ed24ab4bae025db404049d1b2dc16b5e1a28f /engines/mohawk/riven_graphics.cpp
parente9b67081c36653bfae0d842a261f313fc9f32231 (diff)
downloadscummvm-rg350-85712e56c8e2cf8a6e04110646f4345c153211fd.tar.gz
scummvm-rg350-85712e56c8e2cf8a6e04110646f4345c153211fd.tar.bz2
scummvm-rg350-85712e56c8e2cf8a6e04110646f4345c153211fd.zip
MOHAWK: Only allow a single pixel format in Riven to simplify the implementation
Diffstat (limited to 'engines/mohawk/riven_graphics.cpp')
-rw-r--r--engines/mohawk/riven_graphics.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/engines/mohawk/riven_graphics.cpp b/engines/mohawk/riven_graphics.cpp
index b5fce9ce9e..d5cb3536a1 100644
--- a/engines/mohawk/riven_graphics.cpp
+++ b/engines/mohawk/riven_graphics.cpp
@@ -35,12 +35,9 @@ namespace Mohawk {
RivenGraphics::RivenGraphics(MohawkEngine_Riven* vm) : GraphicsManager(), _vm(vm) {
_bitmapDecoder = new MohawkBitmap();
- // Give me the best you've got!
- initGraphics(608, 436, true, NULL);
- _pixelFormat = _vm->_system->getScreenFormat();
-
- if (_pixelFormat.bytesPerPixel == 1)
- error("Riven requires greater than 256 colors to run");
+ // Restrict ourselves to a single pixel format to simplify the effects implementation
+ _pixelFormat = Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0);
+ initGraphics(608, 436, true, &_pixelFormat);
// The actual game graphics only take up the first 392 rows. The inventory
// occupies the rest of the screen and we don't use the buffer to hold that.