[Scummvm-git-logs] scummvm master -> 5190796a3d67d29fe976409768b8b26cf74cf2e8
AndywinXp
noreply at scummvm.org
Sun Dec 4 21:21:29 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
5190796a3d JANITORIAL: SCUMM: Rename _budleDirCache to _bundleDirCache
Commit: 5190796a3d67d29fe976409768b8b26cf74cf2e8
https://github.com/scummvm/scummvm/commit/5190796a3d67d29fe976409768b8b26cf74cf2e8
Author: AndywinXp (andywinxp at gmail.com)
Date: 2022-12-04T22:21:18+01:00
Commit Message:
JANITORIAL: SCUMM: Rename _budleDirCache to _bundleDirCache
Typo :-)
Changed paths:
engines/scumm/imuse_digi/dimuse_bndmgr.cpp
engines/scumm/imuse_digi/dimuse_bndmgr.h
diff --git a/engines/scumm/imuse_digi/dimuse_bndmgr.cpp b/engines/scumm/imuse_digi/dimuse_bndmgr.cpp
index ca2bfec9150..c4e6353e5e8 100644
--- a/engines/scumm/imuse_digi/dimuse_bndmgr.cpp
+++ b/engines/scumm/imuse_digi/dimuse_bndmgr.cpp
@@ -30,36 +30,36 @@
namespace Scumm {
BundleDirCache::BundleDirCache() {
- for (int fileId = 0; fileId < ARRAYSIZE(_budleDirCache); fileId++) {
- _budleDirCache[fileId].bundleTable = nullptr;
- _budleDirCache[fileId].fileName[0] = 0;
- _budleDirCache[fileId].numFiles = 0;
- _budleDirCache[fileId].isCompressed = false;
- _budleDirCache[fileId].indexTable = nullptr;
+ for (int fileId = 0; fileId < ARRAYSIZE(_bundleDirCache); fileId++) {
+ _bundleDirCache[fileId].bundleTable = nullptr;
+ _bundleDirCache[fileId].fileName[0] = 0;
+ _bundleDirCache[fileId].numFiles = 0;
+ _bundleDirCache[fileId].isCompressed = false;
+ _bundleDirCache[fileId].indexTable = nullptr;
}
}
BundleDirCache::~BundleDirCache() {
- for (int fileId = 0; fileId < ARRAYSIZE(_budleDirCache); fileId++) {
- free(_budleDirCache[fileId].bundleTable);
- free(_budleDirCache[fileId].indexTable);
+ for (int fileId = 0; fileId < ARRAYSIZE(_bundleDirCache); fileId++) {
+ free(_bundleDirCache[fileId].bundleTable);
+ free(_bundleDirCache[fileId].indexTable);
}
}
BundleDirCache::AudioTable *BundleDirCache::getTable(int slot) {
- return _budleDirCache[slot].bundleTable;
+ return _bundleDirCache[slot].bundleTable;
}
int32 BundleDirCache::getNumFiles(int slot) {
- return _budleDirCache[slot].numFiles;
+ return _bundleDirCache[slot].numFiles;
}
BundleDirCache::IndexNode *BundleDirCache::getIndexTable(int slot) {
- return _budleDirCache[slot].indexTable;
+ return _bundleDirCache[slot].indexTable;
}
bool BundleDirCache::isSndDataExtComp(int slot) {
- return _budleDirCache[slot].isCompressed;
+ return _bundleDirCache[slot].isCompressed;
}
int BundleDirCache::matchFile(const char *filename) {
@@ -68,11 +68,11 @@ int BundleDirCache::matchFile(const char *filename) {
int freeSlot = -1;
int fileId;
- for (fileId = 0; fileId < ARRAYSIZE(_budleDirCache); fileId++) {
- if ((_budleDirCache[fileId].bundleTable == nullptr) && (freeSlot == -1)) {
+ for (fileId = 0; fileId < ARRAYSIZE(_bundleDirCache); fileId++) {
+ if ((_bundleDirCache[fileId].bundleTable == nullptr) && (freeSlot == -1)) {
freeSlot = fileId;
}
- if (scumm_stricmp(filename, _budleDirCache[fileId].fileName) == 0) {
+ if (scumm_stricmp(filename, _bundleDirCache[fileId].fileName) == 0) {
found = true;
break;
}
@@ -91,27 +91,27 @@ int BundleDirCache::matchFile(const char *filename) {
tag = file.readUint32BE();
if (tag == MKTAG('L','B','2','3'))
- _budleDirCache[freeSlot].isCompressed = true;
+ _bundleDirCache[freeSlot].isCompressed = true;
offset = file.readUint32BE();
- Common::strlcpy(_budleDirCache[freeSlot].fileName, filename, sizeof(_budleDirCache[freeSlot].fileName));
- _budleDirCache[freeSlot].numFiles = file.readUint32BE();
- _budleDirCache[freeSlot].bundleTable = (AudioTable *)malloc(_budleDirCache[freeSlot].numFiles * sizeof(AudioTable));
- assert(_budleDirCache[freeSlot].bundleTable);
+ Common::strlcpy(_bundleDirCache[freeSlot].fileName, filename, sizeof(_bundleDirCache[freeSlot].fileName));
+ _bundleDirCache[freeSlot].numFiles = file.readUint32BE();
+ _bundleDirCache[freeSlot].bundleTable = (AudioTable *)malloc(_bundleDirCache[freeSlot].numFiles * sizeof(AudioTable));
+ assert(_bundleDirCache[freeSlot].bundleTable);
file.seek(offset, SEEK_SET);
- _budleDirCache[freeSlot].indexTable =
- (IndexNode *)calloc(_budleDirCache[freeSlot].numFiles, sizeof(IndexNode));
- assert(_budleDirCache[freeSlot].indexTable);
+ _bundleDirCache[freeSlot].indexTable =
+ (IndexNode *)calloc(_bundleDirCache[freeSlot].numFiles, sizeof(IndexNode));
+ assert(_bundleDirCache[freeSlot].indexTable);
- for (int32 i = 0; i < _budleDirCache[freeSlot].numFiles; i++) {
+ for (int32 i = 0; i < _bundleDirCache[freeSlot].numFiles; i++) {
char name[24], c;
int32 z = 0;
int32 z2;
if (tag == MKTAG('L','B','2','3')) {
- file.read(_budleDirCache[freeSlot].bundleTable[i].filename, 24);
+ file.read(_bundleDirCache[freeSlot].bundleTable[i].filename, 24);
} else {
for (z2 = 0; z2 < 8; z2++)
if ((c = file.readByte()) != 0)
@@ -122,14 +122,14 @@ int BundleDirCache::matchFile(const char *filename) {
name[z++] = c;
name[z] = '\0';
- Common::strlcpy(_budleDirCache[freeSlot].bundleTable[i].filename, name, sizeof(_budleDirCache[freeSlot].bundleTable[i].filename));
+ Common::strlcpy(_bundleDirCache[freeSlot].bundleTable[i].filename, name, sizeof(_bundleDirCache[freeSlot].bundleTable[i].filename));
}
- _budleDirCache[freeSlot].bundleTable[i].offset = file.readUint32BE();
- _budleDirCache[freeSlot].bundleTable[i].size = file.readUint32BE();
- Common::strlcpy(_budleDirCache[freeSlot].indexTable[i].filename, _budleDirCache[freeSlot].bundleTable[i].filename, sizeof(_budleDirCache[freeSlot].indexTable[i].filename));
- _budleDirCache[freeSlot].indexTable[i].index = i;
+ _bundleDirCache[freeSlot].bundleTable[i].offset = file.readUint32BE();
+ _bundleDirCache[freeSlot].bundleTable[i].size = file.readUint32BE();
+ Common::strlcpy(_bundleDirCache[freeSlot].indexTable[i].filename, _bundleDirCache[freeSlot].bundleTable[i].filename, sizeof(_bundleDirCache[freeSlot].indexTable[i].filename));
+ _bundleDirCache[freeSlot].indexTable[i].index = i;
}
- qsort(_budleDirCache[freeSlot].indexTable, _budleDirCache[freeSlot].numFiles,
+ qsort(_bundleDirCache[freeSlot].indexTable, _bundleDirCache[freeSlot].numFiles,
sizeof(IndexNode), (int (*)(const void *, const void *))scumm_stricmp);
return freeSlot;
} else {
diff --git a/engines/scumm/imuse_digi/dimuse_bndmgr.h b/engines/scumm/imuse_digi/dimuse_bndmgr.h
index 6b91ff9617b..ec7993e78ed 100644
--- a/engines/scumm/imuse_digi/dimuse_bndmgr.h
+++ b/engines/scumm/imuse_digi/dimuse_bndmgr.h
@@ -51,7 +51,7 @@ private:
int32 numFiles;
bool isCompressed;
IndexNode *indexTable;
- } _budleDirCache[4];
+ } _bundleDirCache[4];
public:
BundleDirCache();
More information about the Scummvm-git-logs
mailing list