aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2013-05-22 13:15:43 +1000
committerPaul Gilbert2013-05-22 13:15:43 +1000
commitca0eb9bd758e35b52f64eb84d225c2b0ffe3f921 (patch)
treec41a62fdc59371dc9a62f366a064f3c9a57fa0a0
parenta52dffb3156220ed8ae7497b0273da0386bb335e (diff)
downloadscummvm-rg350-ca0eb9bd758e35b52f64eb84d225c2b0ffe3f921.tar.gz
scummvm-rg350-ca0eb9bd758e35b52f64eb84d225c2b0ffe3f921.tar.bz2
scummvm-rg350-ca0eb9bd758e35b52f64eb84d225c2b0ffe3f921.zip
VOYEUR: Some initial bugfixes for resource decompression
-rw-r--r--engines/voyeur/files.cpp6
-rw-r--r--engines/voyeur/files.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/engines/voyeur/files.cpp b/engines/voyeur/files.cpp
index 6c4e824f75..472d69062c 100644
--- a/engines/voyeur/files.cpp
+++ b/engines/voyeur/files.cpp
@@ -59,7 +59,7 @@ int BoltFile::_bufSize = 0;
byte *BoltFile::_bufP = NULL;
byte *BoltFile::_bufStart = NULL;
byte *BoltFile::_bufPos = NULL;
-byte BoltFile::_decompressBuf[512];
+byte BoltFile::_decompressBuf[DECOMPRESS_SIZE];
int BoltFile::_historyIndex;
byte BoltFile::_historyBuffer[0x200];
int BoltFile::_runLength;
@@ -278,11 +278,11 @@ void BoltFile::nextBlock() {
if (_curFilePosition != _bufferEnd)
_curFd.seek(_bufferEnd);
- _bufferBegin = _curFilePosition;
+ _bufferBegin = _bufferEnd;
int bytesRead = _curFd.read(_bufStart, _bufSize);
_bufferEnd = _curFilePosition = _bufferBegin + bytesRead;
- _bytesLeft -= bytesRead;
+ _bytesLeft = bytesRead - 1;
_bufPos = _bufStart;
}
diff --git a/engines/voyeur/files.h b/engines/voyeur/files.h
index 3b38dcceb3..b481a08a06 100644
--- a/engines/voyeur/files.h
+++ b/engines/voyeur/files.h
@@ -32,7 +32,7 @@ namespace Voyeur {
class VoyeurEngine;
class BoltGroup;
class BoltEntry;
-#define DECOMPRESS_SIZE 512
+#define DECOMPRESS_SIZE 0x7000
class BoltFile {
private: