[Scummvm-cvs-logs] CVS: scummvm/scumm/smush chunk.cpp,1.25,1.26 smush_player.cpp,1.104,1.105
Eugene Sandulenko
sev at users.sourceforge.net
Tue Jan 27 20:12:09 CET 2004
Update of /cvsroot/scummvm/scummvm/scumm/smush
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3355/scumm/smush
Modified Files:
chunk.cpp smush_player.cpp
Log Message:
Partial fix for bug #885488 (Some INSANE trouble)
o Finally fixed seek error. Now I never encounter it, though there are weird
SAUD errors in some cases.
o Started to hunt cave-dude-only bug
Index: chunk.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/chunk.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- chunk.cpp 25 Jan 2004 05:25:50 -0000 1.25
+++ chunk.cpp 28 Jan 2004 04:07:54 -0000 1.26
@@ -191,6 +191,7 @@
void FileChunk::reinit(uint32 offset) {
_offset = 0;
+ _data->seek(0);
_type = _data->readUint32BE();
_size = _data->readUint32BE();
_curPos = 0;
Index: smush_player.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_player.cpp,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -d -r1.104 -r1.105
--- smush_player.cpp 26 Jan 2004 22:44:46 -0000 1.104
+++ smush_player.cpp 28 Jan 2004 04:07:54 -0000 1.105
@@ -872,6 +872,9 @@
case TYPE_FRME:
handleFrame(*sub);
break;
+ case TYPE_AHDR: // FT INSANE may seek file to the beginning
+ handleAnimHeader(*sub);
+ break;
default:
error("Unknown Chunk found at %x: %x, %d", _base->tell(), sub->getType(), sub->getSize());
}
@@ -964,28 +967,23 @@
}
void SmushPlayer::seekSan(const char *file, const char *directory, int32 pos, int32 contFrame) {
- Chunk *sub;
-
if (file) {
if (_base)
delete _base;
_base = new FileChunk(file, directory);
- pos = 0;
+ if (pos >= 8)
+ pos -= 8;
} else {
_base->reinit(pos);
}
if (pos != 8 && pos) {
- _base->seek(pos, FileChunk::seek_start);
_middleAudio = true;
- } else {
- _base->seek(pos, FileChunk::seek_start);
- sub = _base->subBlock();
- checkBlock(*sub, TYPE_AHDR);
- handleAnimHeader(*sub);
}
+ _base->seek(pos, FileChunk::seek_start);
+
_frame = contFrame;
}
More information about the Scummvm-git-logs
mailing list