aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/graphics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/mohawk/graphics.cpp')
-rw-r--r--engines/mohawk/graphics.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/engines/mohawk/graphics.cpp b/engines/mohawk/graphics.cpp
index e0dce6369a..c1c41e21e7 100644
--- a/engines/mohawk/graphics.cpp
+++ b/engines/mohawk/graphics.cpp
@@ -759,26 +759,26 @@ LBGraphics::~LBGraphics() {
}
void LBGraphics::copyImageToScreen(uint16 image, uint16 left, uint16 right) {
- if (_vm->getGameType() == GType_LIVINGBOOKSV1) {
- // Drawing images in the old format isn't supported (yet)
- ImageData *imageData = _bmpDecoder->decodeImage(_vm->wrapStreamEndian(ID_BMAP, image));
- delete imageData;
- } else {
- ImageData *imageData = _bmpDecoder->decodeImage(_vm->getRawData(ID_TBMP, image));
- imageData->_palette = _palette;
- Graphics::Surface *surface = imageData->getSurface();
- imageData->_palette = NULL; // Unset the palette so it doesn't get deleted
- delete imageData;
-
- uint16 width = MIN<int>(surface->w, 640);
- uint16 height = MIN<int>(surface->h, 480);
- _vm->_system->copyRectToScreen((byte *)surface->pixels, surface->pitch, left, right, width, height);
- surface->free();
- delete surface;
+ ImageData *imageData;
- // FIXME: Remove this and update only at certain points
- _vm->_system->updateScreen();
- }
+ if (_vm->getGameType() == GType_LIVINGBOOKSV1)
+ imageData = _bmpDecoder->decodeImage(_vm->wrapStreamEndian(ID_BMAP, image));
+ else
+ imageData = _bmpDecoder->decodeImage(_vm->getRawData(ID_TBMP, image));
+
+ imageData->_palette = _palette;
+ Graphics::Surface *surface = imageData->getSurface();
+ imageData->_palette = NULL; // Unset the palette so it doesn't get deleted
+ delete imageData;
+
+ uint16 width = MIN<int>(surface->w, _vm->_system->getWidth());
+ uint16 height = MIN<int>(surface->h, _vm->_system->getHeight());
+ _vm->_system->copyRectToScreen((byte *)surface->pixels, surface->pitch, left, right, width, height);
+ surface->free();
+ delete surface;
+
+ // FIXME: Remove this and update only at certain points
+ _vm->_system->updateScreen();
}
void LBGraphics::setPalette(uint16 id) {