diff options
author | johndoe123 | 2012-11-19 22:24:03 +0000 |
---|---|---|
committer | Willem Jan Palenstijn | 2013-05-08 20:47:38 +0200 |
commit | b2934eb166ba5b442a93969ad8b4dfbbc6ef3314 (patch) | |
tree | b2ffdaa149da1a7e1a989a6617b19849b3184923 /engines/neverhood/resourceman.cpp | |
parent | cc015e3d24d15dc0c3532063927fd40e2329f43e (diff) | |
download | scummvm-rg350-b2934eb166ba5b442a93969ad8b4dfbbc6ef3314.tar.gz scummvm-rg350-b2934eb166ba5b442a93969ad8b4dfbbc6ef3314.tar.bz2 scummvm-rg350-b2934eb166ba5b442a93969ad8b4dfbbc6ef3314.zip |
NEVERHOOD: Fix Klaymen "grow" animation after drinking the potion
- Remove static sprite 0x50C027A8 Scene2803/Scene2803Small because the resource doesn't exist!
- Remove some old comments
- Fix resource extData handling which fixes some crashes
- Enable reusing deleted sound/music slots in SoundMan (was disabled for debugging)
Diffstat (limited to 'engines/neverhood/resourceman.cpp')
-rw-r--r-- | engines/neverhood/resourceman.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/neverhood/resourceman.cpp b/engines/neverhood/resourceman.cpp index 3b67b26a06..c30e272eab 100644 --- a/engines/neverhood/resourceman.cpp +++ b/engines/neverhood/resourceman.cpp @@ -66,8 +66,10 @@ ResourceFileEntry *ResourceMan::findEntrySimple(uint32 fileHash) { return p != _entries.end() ? &(*p)._value : NULL; } -ResourceFileEntry *ResourceMan::findEntry(uint32 fileHash) { +ResourceFileEntry *ResourceMan::findEntry(uint32 fileHash, ResourceFileEntry **firstEntry) { ResourceFileEntry *entry = findEntrySimple(fileHash); + if (firstEntry) + *firstEntry = entry; for (; entry && entry->archiveEntry->comprType == 0x65; fileHash = entry->archiveEntry->diskSize) entry = findEntrySimple(fileHash); return entry; @@ -79,7 +81,9 @@ Common::SeekableReadStream *ResourceMan::createStream(uint32 fileHash) { } void ResourceMan::queryResource(uint32 fileHash, ResourceHandle &resourceHandle) { - resourceHandle._resourceFileEntry = findEntry(fileHash); + ResourceFileEntry *firstEntry; + resourceHandle._resourceFileEntry = findEntry(fileHash, &firstEntry); + resourceHandle._extData = firstEntry ? firstEntry->archiveEntry->extData : NULL; } void ResourceMan::loadResource(ResourceHandle &resourceHandle) { |