Give more feedback to users who misused our SAN compression tool and ignored

FLU index for cideos which are used by INSANE.

svn-id: r22506
This commit is contained in:
Eugene Sandulenko
2006-05-18 00:20:53 +00:00
parent 14ec3f45fa
commit 9103ddda4e
2 changed files with 8 additions and 1 deletions
+7 -1
View File
@@ -44,7 +44,8 @@ const char *Chunk::ChunkString(Chunk::type t) {
BaseChunk::BaseChunk() :
_type(0),
_size(0),
_curPos(0) {
_curPos(0),
_name("") {
}
bool BaseChunk::eof() const {
@@ -81,7 +82,11 @@ bool BaseChunk::seek(int32 delta, seek_type dir) {
_curPos = (uint32)(_size + delta);
break;
}
if (_curPos > _size) {
if (g_scumm->_insaneRunning) {
warning("Looks like you compressed file %s in wrong way. It has FLU index which was not updated", _name.c_str());
}
error("invalid seek request : %d > %d (delta == %d)", _curPos, _size, delta);
}
return true;
@@ -109,6 +114,7 @@ FileChunk::FileChunk(const Common::String &name, int offset) {
_size = _data->readUint32BE();
_offset = _data->pos();
_curPos = 0;
_name = name;
}
FileChunk::~FileChunk() {
+1
View File
@@ -57,6 +57,7 @@ protected:
Chunk::type _type;
uint32 _size;
uint32 _curPos;
Common::String _name;
BaseChunk();