diff options
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/resource.cpp | 8 | ||||
-rw-r--r-- | scumm/scumm.h | 3 | ||||
-rw-r--r-- | scumm/sound.cpp | 3 |
3 files changed, 5 insertions, 9 deletions
diff --git a/scumm/resource.cpp b/scumm/resource.cpp index 7fc256c688..ff816fa5ab 100644 --- a/scumm/resource.cpp +++ b/scumm/resource.cpp @@ -713,12 +713,8 @@ void ScummEngine::allocResTypeData(int id, uint32 tag, int num, const char *name debug(9, "allocResTypeData(%s/%s,%s,%d,%d)", resTypeFromId(id), name, tag2str(TO_BE_32(tag)), num, mode); assert(id >= 0 && id < (int)(ARRAYSIZE(res.mode))); - if (num >= 2000) { - /* FIXME: this used to be an error but it seems the newer humongous titles - * exceed this presumably old limit, need to determine a new ceiling - */ - warning("Too many %ss (%d) in directory", name, num); - } + if (num >= 8000) + error("Too many %ss (%d) in directory", name, num); res.mode[id] = mode; res.num[id] = num; diff --git a/scumm/scumm.h b/scumm/scumm.h index e9f3ed0c8b..4cd8f1661f 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -477,10 +477,11 @@ protected: /* Global resource tables */ int _numVariables, _numBitVariables, _numLocalObjects; int _numGlobalObjects, _numArray, _numVerbs, _numFlObject; - int _numInventory, _numRooms, _numScripts, _numSounds; + int _numInventory, _numRooms, _numScripts; int _numNewNames, _numGlobalScripts; int _numActors, _numImages, _numRoomVariables; public: + int _numSounds; int _numCostumes; // FIXME - should be protected, used by Actor::remapActorPalette int _numCharsets; // FIXME - should be protected, used by CharsetRenderer diff --git a/scumm/sound.cpp b/scumm/sound.cpp index 8b40a54792..da15d35327 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -162,7 +162,7 @@ void Sound::playSound(int soundID, int offset) { byte flags = SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE; bool music = false; - if ((_vm->_heversion >= 70) && soundID >= 4000) { + if (_vm->_heversion >= 70 && soundID > _vm->_numSounds) { debugC(DEBUG_SOUND, "playSound #%d", soundID); int music_offs, total_size; @@ -203,7 +203,6 @@ void Sound::playSound(int soundID, int offset) { } - music_offs = musicFile.readUint32LE(); size = musicFile.readUint32LE(); |