VOYEUR: Some initial bugfixes for resource decompression

This commit is contained in:
Paul Gilbert 2013-05-22 13:15:43 +10:00
parent a52dffb315
commit ca0eb9bd75
2 changed files with 4 additions and 4 deletions

View File

@ -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;
}

View File

@ -32,7 +32,7 @@ namespace Voyeur {
class VoyeurEngine;
class BoltGroup;
class BoltEntry;
#define DECOMPRESS_SIZE 512
#define DECOMPRESS_SIZE 0x7000
class BoltFile {
private: