VOYEUR: Simplify getBoltGroup() by removing the second (useless) parameter

This commit is contained in:
Strangerke 2014-03-03 19:00:14 +01:00
parent 834cd6cc50
commit 6db1e8ae46
2 changed files with 7 additions and 12 deletions

View File

@ -239,7 +239,7 @@ BoltFile::~BoltFile() {
_state._curLibPtr = NULL;
}
BoltGroup *BoltFile::getBoltGroup(uint16 id, bool process) {
BoltGroup *BoltFile::getBoltGroup(uint16 id) {
_state._curLibPtr = this;
_state._curGroupPtr = &_groups[(id >> 8) & 0xff];
@ -248,16 +248,11 @@ BoltGroup *BoltFile::getBoltGroup(uint16 id, bool process) {
_state._curGroupPtr->load(id & 0xff00);
}
if (process) {
// Pre-process the resources
id &= 0xff00;
for (int idx = 0; idx < _state._curGroupPtr->_count; ++idx, ++id) {
byte *member = getBoltMember(id);
assert(member);
}
} else if (!_state._curGroupPtr->_processed) {
_state._curGroupPtr->_processed = true;
_state._curGroupPtr->load(id & 0xff00);
// Pre-process the resources
id &= 0xff00;
for (int idx = 0; idx < _state._curGroupPtr->_count; ++idx, ++id) {
byte *member = getBoltMember(id);
assert(member);
}
resolveAll();

View File

@ -106,7 +106,7 @@ public:
BoltFile(const Common::String &filename, BoltFilesState &state);
virtual ~BoltFile();
BoltGroup *getBoltGroup(uint16 id, bool process = true);
BoltGroup *getBoltGroup(uint16 id);
void freeBoltGroup(uint16 id, bool freeEntries = true);
void freeBoltMember(uint32 id);
byte *memberAddr(uint32 id);