[Scummvm-cvs-logs] CVS: scummvm/scumm/smush insane.cpp,1.27,1.28 insane.h,1.15,1.16 smush_player.cpp,1.92,1.93 smush_player.h,1.19,1.20
Eugene Sandulenko
sev at users.sourceforge.net
Sat Dec 27 23:58:01 CET 2003
Update of /cvsroot/scummvm/scummvm/scumm/smush
In directory sc8-pr-cvs1:/tmp/cvs-serv4872/scumm/smush
Modified Files:
insane.cpp insane.h smush_player.cpp smush_player.h
Log Message:
Proper FLU files seeking. No more seek crashes
Index: insane.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/insane.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- insane.cpp 27 Dec 2003 15:22:59 -0000 1.27
+++ insane.cpp 28 Dec 2003 07:57:36 -0000 1.28
@@ -3991,7 +3991,7 @@
debug(0, "smush_rewindCurrentSan(%d, %d, %d)", arg_0, arg_4, arg_8);
_smush_setupsan2 = arg_0;
- smush_setupSanFile(0, 8);
+ smush_setupSanFile(0, 8, 0);
_smush_isSanFileSetup = 1;
smush_setFrameSteps(arg_4, arg_8);
@@ -8158,7 +8158,7 @@
if (tmp[2] <= 1) {
/* 0x300 -- palette, 0x8 -- header */
offset = READ_LE_UINT32(tmp + 0x308 + numFrames*4);
- smush_setupSanFile(filename, offset);
+ smush_setupSanFile(filename, offset, numFrames);
memcpy(_smush_earlyFluContents, tmp+2, 0x306);
_smush_earlyFluContents[0x30e] = 0;
_smush_earlyFluContents[0x30f] = 0;
@@ -8168,12 +8168,12 @@
_smush_earlyFluContents[0x307] = 0;
} else {
offset = READ_LE_UINT32(tmp + 0x31c + numFrames*4);
- smush_setupSanFile(filename, offset);
+ smush_setupSanFile(filename, offset, numFrames);
memcpy(_smush_earlyFluContents, tmp+2, 0x31a);
}
_smush_isSanFileSetup = 1;
_smush_setupsan4 = 1;
- _smush_numFrames = numFrames;
+ _smush_curFrame = numFrames;
smush_setFrameSteps(step1, step2);
}
@@ -8181,11 +8181,9 @@
int32 step2, int32 setupsan1) {
_smush_setupsan1 = setupsan1;
_smush_setupsan2 = setupsan2;
- smush_setupSanFile(filename, 8);
+ smush_setupSanFile(filename, 8, 0);
_smush_isSanFileSetup = 1;
smush_setFrameSteps(step1, step2);
-
- _smush_curFrame = 0; // HACK
}
void Insane::smush_setFrameSteps(int32 step1, int32 step2) {
@@ -8194,10 +8192,10 @@
_smush_frameStep = step1;
}
-void Insane::smush_setupSanFile(const char *filename, int32 offset) {
+ void Insane::smush_setupSanFile(const char *filename, int32 offset, int32 contFrame) {
debug(0, "smush_setupSanFile(%s, %x)", filename, offset);
- _player->seekSan(filename, _scumm->getGameDataPath(), offset);
+ _player->seekSan(filename, _scumm->getGameDataPath(), offset, contFrame);
_scumm->_imuseDigital->pause(false);
}
Index: insane.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/insane.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- insane.h 27 Dec 2003 15:22:59 -0000 1.15
+++ insane.h 28 Dec 2003 07:57:36 -0000 1.16
@@ -153,7 +153,6 @@
int32 _smush_setupsan1;
int16 _smush_setupsan2;
int32 _smush_setupsan4;
- int16 _smush_numFrames;
int16 _smush_frameStep;
int16 _smush_curFrame;
int16 _smush_frameNum1;
@@ -440,7 +439,7 @@
void smush_setupSanFromStart(const char *filename, int32 setupsan2, int32 step1,
int32 step2, int32 setupsan1);
void smush_setFrameSteps(int32 step1, int32 step2);
- void smush_setupSanFile(const char *filename, int32 offset);
+ void smush_setupSanFile(const char *filename, int32 offset, int32 contFrame);
int32 getLastKey(bool arg_0);
void drawSpeedyActor(int32 arg_0);
void actor11Reaction(int32 buttons);
Index: smush_player.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_player.cpp,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -d -r1.92 -r1.93
--- smush_player.cpp 27 Dec 2003 15:22:59 -0000 1.92
+++ smush_player.cpp 28 Dec 2003 07:57:36 -0000 1.93
@@ -961,7 +961,7 @@
}
// FIXME: now it will work with offsets = 8. No Flu files are supported
-void SmushPlayer::seekSan(const char *file, const char *directory, int32 pos) {
+void SmushPlayer::seekSan(const char *file, const char *directory, int32 pos, int32 contFrame) {
Chunk *sub;
if (file) {
@@ -983,8 +983,7 @@
_middleAudio = true;
}
- // FIXME: is this really applicable for FLU files? HACK
- _frame = 0;
+ _frame = contFrame;
}
void SmushPlayer::play(const char *filename, const char *directory) {
Index: smush_player.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_player.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- smush_player.h 27 Dec 2003 15:22:59 -0000 1.19
+++ smush_player.h 28 Dec 2003 07:57:36 -0000 1.20
@@ -79,7 +79,7 @@
protected:
void insanity(bool);
void setPalette(const byte *palette);
- void seekSan(const char *file, const char *directory, int32 pos);
+ void seekSan(const char *file, const char *directory, int32 pos, int32 contFrame);
private:
void updatePalette(void);
More information about the Scummvm-git-logs
mailing list