From 75e3c7d4c5d062b54c6cd1de57684708a79eed9c Mon Sep 17 00:00:00 2001 From: Paweł Kołodziejski Date: Fri, 1 Jun 2007 11:41:07 +0000 Subject: rename some imuse variables svn-id: r27040 --- engines/scumm/imuse_digi/dimuse_bndmgr.cpp | 36 +++++++++++++++--------------- engines/scumm/imuse_digi/dimuse_bndmgr.h | 9 ++++---- 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/engines/scumm/imuse_digi/dimuse_bndmgr.cpp b/engines/scumm/imuse_digi/dimuse_bndmgr.cpp index c66999bc59..389ed6897c 100644 --- a/engines/scumm/imuse_digi/dimuse_bndmgr.cpp +++ b/engines/scumm/imuse_digi/dimuse_bndmgr.cpp @@ -36,7 +36,7 @@ BundleDirCache::BundleDirCache() { _budleDirCache[fileId].bundleTable = NULL; _budleDirCache[fileId].fileName[0] = 0; _budleDirCache[fileId].numFiles = 0; - _budleDirCache[fileId].compressedBun = false; + _budleDirCache[fileId].isCompressed = false; _budleDirCache[fileId].indexTable = NULL; } } @@ -61,7 +61,7 @@ BundleDirCache::IndexNode *BundleDirCache::getIndexTable(int slot) { } bool BundleDirCache::isSndDataExtComp(int slot) { - return _budleDirCache[slot].compressedBun; + return _budleDirCache[slot].isCompressed; } int BundleDirCache::matchFile(const char *filename) { @@ -93,7 +93,7 @@ int BundleDirCache::matchFile(const char *filename) { tag = file.readUint32BE(); if (tag == MKID_BE('LB23')) - _budleDirCache[freeSlot].compressedBun = true; + _budleDirCache[freeSlot].isCompressed = true; offset = file.readUint32BE(); strcpy(_budleDirCache[freeSlot].fileName, filename); @@ -146,10 +146,10 @@ BundleMgr::BundleMgr(BundleDirCache *cache) { _compTable = NULL; _numFiles = 0; _numCompItems = 0; - _curSample = -1; + _curSampleId = -1; _fileBundleId = -1; _file = new ScummFile(); - _compInput = NULL; + _compInputBuff = NULL; } BundleMgr::~BundleMgr() { @@ -209,11 +209,11 @@ void BundleMgr::close() { _compTableLoaded = false; _lastBlock = -1; _outputSize = 0; - _curSample = -1; + _curSampleId = -1; free(_compTable); _compTable = NULL; - free(_compInput); - _compInput = NULL; + free(_compInputBuff); + _compInputBuff = NULL; } } @@ -241,14 +241,14 @@ bool BundleMgr::loadCompTable(int32 index) { maxSize = _compTable[i].size; } // CMI hack: one more byte at the end of input buffer - _compInput = (byte *)malloc(maxSize + 1); - assert(_compInput); + _compInputBuff = (byte *)malloc(maxSize + 1); + assert(_compInputBuff); return true; } int32 BundleMgr::decompressSampleByCurIndex(int32 offset, int32 size, byte **comp_final, int header_size, bool header_outside) { - return decompressSampleByIndex(_curSample, offset, size, comp_final, header_size, header_outside); + return decompressSampleByIndex(_curSampleId, offset, size, comp_final, header_size, header_outside); } int32 BundleMgr::decompressSampleByIndex(int32 index, int32 offset, int32 size, byte **comp_final, int header_size, bool header_outside) { @@ -262,10 +262,10 @@ int32 BundleMgr::decompressSampleByIndex(int32 index, int32 offset, int32 size, return 0; } - if (_curSample == -1) - _curSample = index; + if (_curSampleId == -1) + _curSampleId = index; - assert(_curSample == index); + assert(_curSampleId == index); if (!_compTableLoaded) { _compTableLoaded = loadCompTable(index); @@ -290,10 +290,10 @@ int32 BundleMgr::decompressSampleByIndex(int32 index, int32 offset, int32 size, for (i = first_block; i <= last_block; i++) { if (_lastBlock != i) { // CMI hack: one more zero byte at the end of input buffer - _compInput[_compTable[i].size] = 0; + _compInputBuff[_compTable[i].size] = 0; _file->seek(_bundleTable[index].offset + _compTable[i].offset, SEEK_SET); - _file->read(_compInput, _compTable[i].size); - _outputSize = BundleCodecs::decompressCodec(_compTable[i].codec, _compInput, _compOutput, _compTable[i].size); + _file->read(_compInputBuff, _compTable[i].size); + _outputSize = BundleCodecs::decompressCodec(_compTable[i].codec, _compInputBuff, _compOutputBuff, _compTable[i].size); if (_outputSize > 0x2000) { error("_outputSize: %d", _outputSize); } @@ -317,7 +317,7 @@ int32 BundleMgr::decompressSampleByIndex(int32 index, int32 offset, int32 size, assert(final_size + output_size <= blocks_final_size); - memcpy(*comp_final + final_size, _compOutput + skip, output_size); + memcpy(*comp_final + final_size, _compOutputBuff + skip, output_size); final_size += output_size; size -= output_size; diff --git a/engines/scumm/imuse_digi/dimuse_bndmgr.h b/engines/scumm/imuse_digi/dimuse_bndmgr.h index 34cc58511e..a23bb462d4 100644 --- a/engines/scumm/imuse_digi/dimuse_bndmgr.h +++ b/engines/scumm/imuse_digi/dimuse_bndmgr.h @@ -51,7 +51,7 @@ private: char fileName[20]; AudioTable *bundleTable; int32 numFiles; - bool compressedBun; + bool isCompressed; IndexNode *indexTable; } _budleDirCache[4]; @@ -80,14 +80,15 @@ private: BundleDirCache::AudioTable *_bundleTable; BundleDirCache::IndexNode *_indexTable; CompTable *_compTable; + int _numFiles; int _numCompItems; - int _curSample; + int _curSampleId; BaseScummFile *_file; bool _compTableLoaded; int _fileBundleId; - byte _compOutput[0x2000]; - byte *_compInput; + byte _compOutputBuff[0x2000]; + byte *_compInputBuff; int _outputSize; int _lastBlock; -- cgit v1.2.3