|
|
|
@ -155,7 +155,7 @@ int main(int argc, char* argv[])
|
|
|
|
|
class plSoundBufferCollector : public plRegistryPageIterator, public plKeyCollector |
|
|
|
|
{ |
|
|
|
|
public: |
|
|
|
|
plSoundBufferCollector(hsTArray<plKey>& keyArray)
|
|
|
|
|
plSoundBufferCollector(std::set<plKey>& keyArray) |
|
|
|
|
: plKeyCollector(keyArray) {} |
|
|
|
|
|
|
|
|
|
hsBool EatPage(plRegistryPageNode* page) |
|
|
|
@ -169,14 +169,14 @@ public:
|
|
|
|
|
|
|
|
|
|
bool DumpSounds() |
|
|
|
|
{ |
|
|
|
|
hsTArray<plKey> soundKeys; |
|
|
|
|
std::set<plKey> soundKeys; |
|
|
|
|
|
|
|
|
|
plSoundBufferCollector soundCollector(soundKeys); |
|
|
|
|
gResMgr->IterateAllPages(&soundCollector); |
|
|
|
|
|
|
|
|
|
for (int i = 0; i < soundKeys.GetCount(); i++) |
|
|
|
|
for (std::set<plKey>::iterator it = soundKeys.begin(); it != soundKeys.end(); ++it) |
|
|
|
|
{ |
|
|
|
|
plSoundBuffer* buffer = plSoundBuffer::ConvertNoRef(soundKeys[i]->VerifyLoaded()); |
|
|
|
|
plSoundBuffer* buffer = plSoundBuffer::ConvertNoRef((*it)->VerifyLoaded()); |
|
|
|
|
if (buffer) |
|
|
|
|
{ |
|
|
|
|
// Ref it...
|
|
|
|
@ -207,7 +207,7 @@ bool DumpSounds()
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
soundKeys.Reset(); |
|
|
|
|
soundKeys.clear(); |
|
|
|
|
plIndirectUnloadIterator iter; |
|
|
|
|
gResMgr->IterateAllPages(&iter); |
|
|
|
|
|
|
|
|
@ -267,4 +267,4 @@ bool DumpStats(const char* patchDir)
|
|
|
|
|
plStatDumpIterator statDump(patchDir); |
|
|
|
|
gResMgr->IterateAllPages(&statDump); |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|