[Scummvm-cvs-logs] CVS: scummvm/scumm/smush smush_player.h,1.34,1.35 smush_player.cpp,1.133,1.134
Max Horn
fingolfin at users.sourceforge.net
Wed Sep 29 10:51:02 CEST 2004
Update of /cvsroot/scummvm/scummvm/scumm/smush
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21245/smush
Modified Files:
smush_player.h smush_player.cpp
Log Message:
Hack to work around bug #1037052
Index: smush_player.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_player.h,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- smush_player.h 27 Sep 2004 20:44:27 -0000 1.34
+++ smush_player.h 29 Sep 2004 17:50:17 -0000 1.35
@@ -83,6 +83,8 @@
protected:
SmushFont *_sf[5];
int _width, _height;
+
+ int _origPitch, _origNumStrips;
void insanity(bool);
void setPalette(const byte *palette);
Index: smush_player.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_player.cpp,v
retrieving revision 1.133
retrieving revision 1.134
diff -u -d -r1.133 -r1.134
--- smush_player.cpp 28 Sep 2004 20:19:30 -0000 1.133
+++ smush_player.cpp 29 Sep 2004 17:50:17 -0000 1.134
@@ -257,6 +257,18 @@
_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 @@
_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) {
More information about the Scummvm-git-logs
mailing list