aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/graphics.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2011-02-13 16:11:22 -0500
committerMatthew Hoops2011-02-13 16:14:07 -0500
commitd096b78acaa510e02cb9be9a2e2dc17e53f80e3e (patch)
tree69e372018d0a36794f9c4ea706a19725c7c70aa2 /engines/mohawk/graphics.cpp
parentb4ca2da72ebf587fd067f82551b2ccff3cc29a40 (diff)
downloadscummvm-rg350-d096b78acaa510e02cb9be9a2e2dc17e53f80e3e.tar.gz
scummvm-rg350-d096b78acaa510e02cb9be9a2e2dc17e53f80e3e.tar.bz2
scummvm-rg350-d096b78acaa510e02cb9be9a2e2dc17e53f80e3e.zip
MOHAWK: Add support for Mac LB v2 games
Diffstat (limited to 'engines/mohawk/graphics.cpp')
-rw-r--r--engines/mohawk/graphics.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/mohawk/graphics.cpp b/engines/mohawk/graphics.cpp
index fe015b4527..be2fe01c4d 100644
--- a/engines/mohawk/graphics.cpp
+++ b/engines/mohawk/graphics.cpp
@@ -956,7 +956,7 @@ void RivenGraphics::drawExtrasImage(uint16 id, Common::Rect dstRect) {
}
LBGraphics::LBGraphics(MohawkEngine_LivingBooks *vm, uint16 width, uint16 height) : GraphicsManager(), _vm(vm) {
- _bmpDecoder = (_vm->getGameType() == GType_LIVINGBOOKSV1) ? new OldMohawkBitmap() : new MohawkBitmap();
+ _bmpDecoder = _vm->isPreMohawk() ? new OldMohawkBitmap() : new MohawkBitmap();
initGraphics(width, height, true);
}
@@ -966,7 +966,7 @@ LBGraphics::~LBGraphics() {
}
MohawkSurface *LBGraphics::decodeImage(uint16 id) {
- if (_vm->getGameType() == GType_LIVINGBOOKSV1)
+ if (_vm->isPreMohawk())
return _bmpDecoder->decodeImage(_vm->wrapStreamEndian(ID_BMAP, id));
return _bmpDecoder->decodeImage(_vm->getResource(ID_TBMP, id));
@@ -1002,7 +1002,7 @@ bool LBGraphics::imageIsTransparentAt(uint16 image, bool useOffsets, int x, int
void LBGraphics::setPalette(uint16 id) {
// Old Living Books games use the old CTBL-style palette format while newer
// games use the better tPAL format which can store partial palettes.
- if (_vm->getGameType() == GType_LIVINGBOOKSV1) {
+ if (_vm->isPreMohawk()) {
Common::SeekableSubReadStreamEndian *ctblStream = _vm->wrapStreamEndian(ID_CTBL, id);
uint16 colorCount = ctblStream->readUint16();
byte *palette = new byte[colorCount * 4];