aboutsummaryrefslogtreecommitdiff
path: root/scumm/smush
diff options
context:
space:
mode:
authorMax Horn2004-09-29 17:50:17 +0000
committerMax Horn2004-09-29 17:50:17 +0000
commit61f8a035c78f9790e8f88dae9b584f6d6c739c13 (patch)
tree992b7118dea6558acd186ad565c1ff81bb9cc269 /scumm/smush
parenta4c6c4725d4dd8536308f262594ffdfc9cbce6d0 (diff)
downloadscummvm-rg350-61f8a035c78f9790e8f88dae9b584f6d6c739c13.tar.gz
scummvm-rg350-61f8a035c78f9790e8f88dae9b584f6d6c739c13.tar.bz2
scummvm-rg350-61f8a035c78f9790e8f88dae9b584f6d6c739c13.zip
Hack to work around bug #1037052
svn-id: r15349
Diffstat (limited to 'scumm/smush')
-rw-r--r--scumm/smush/smush_player.cpp18
-rw-r--r--scumm/smush/smush_player.h2
2 files changed, 20 insertions, 0 deletions
diff --git a/scumm/smush/smush_player.cpp b/scumm/smush/smush_player.cpp
index 88323adaf0..8f83b87f87 100644
--- a/scumm/smush/smush_player.cpp
+++ b/scumm/smush/smush_player.cpp
@@ -257,6 +257,18 @@ void SmushPlayer::init() {
_vm->_smushVideoShouldFinish = false;
_vm->setDirtyColors(0, 255);
_dst = _vm->virtscr[0].getPixels(0, 0);
+
+ // HACK HACK HACK: This is an *evil* trick, beware!
+ // We do this to fix bug #1037052. A proper solution would change all the
+ // drawing code to use the pitch value specified by the virtual screen.
+ // However, since a lot of the SMUSH code currently assumes the screen
+ // width and pitch to be equal, this will require lots of changes. So
+ // we resort to this hackish solution for now.
+ _origPitch = _vm->virtscr[0].pitch;
+ _origNumStrips = _vm->gdi._numStrips;
+ _vm->virtscr[0].pitch = _vm->virtscr[0].w;
+ _vm->gdi._numStrips = _vm->virtscr[0].w / 8;
+
_smixer = new SmushMixer(_vm->_mixer);
g_timer->installTimerProc(&timerCallback, _speed, this);
}
@@ -298,6 +310,12 @@ void SmushPlayer::release() {
_vm->_mixer->stopHandle(_IACTchannel);
_vm->_fullRedraw = true;
+
+
+ // HACK HACK HACK: This is an *evil* trick, beware! See above for
+ // some explanation.
+ _vm->virtscr[0].pitch = _origPitch;
+ _vm->gdi._numStrips = _origNumStrips;
}
void SmushPlayer::checkBlock(const Chunk &b, Chunk::type type_expected, uint32 min_size) {
diff --git a/scumm/smush/smush_player.h b/scumm/smush/smush_player.h
index 5802c60437..4ccb44c84e 100644
--- a/scumm/smush/smush_player.h
+++ b/scumm/smush/smush_player.h
@@ -83,6 +83,8 @@ public:
protected:
SmushFont *_sf[5];
int _width, _height;
+
+ int _origPitch, _origNumStrips;
void insanity(bool);
void setPalette(const byte *palette);