[Scummvm-cvs-logs] CVS: scummvm/scumm resource.cpp,1.259,1.260 scumm.h,1.461,1.462 sound.cpp,1.378,1.379
Travis Howell
kirben at users.sourceforge.net
Wed Sep 1 21:10:15 CEST 2004
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10670/scumm
Modified Files:
resource.cpp scumm.h sound.cpp
Log Message:
HE games should check _numSounds to check whether sound type is music.
Set maximum resource idx at 8000 for now, some HE games include huge amounts of sound resources.
Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/resource.cpp,v
retrieving revision 1.259
retrieving revision 1.260
diff -u -d -r1.259 -r1.260
--- resource.cpp 30 Aug 2004 00:10:36 -0000 1.259
+++ resource.cpp 2 Sep 2004 03:54:29 -0000 1.260
@@ -713,12 +713,8 @@
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;
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.461
retrieving revision 1.462
diff -u -d -r1.461 -r1.462
--- scumm.h 31 Aug 2004 07:32:53 -0000 1.461
+++ scumm.h 2 Sep 2004 03:54:29 -0000 1.462
@@ -477,10 +477,11 @@
/* 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
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.378
retrieving revision 1.379
diff -u -d -r1.378 -r1.379
--- sound.cpp 1 Sep 2004 06:21:07 -0000 1.378
+++ sound.cpp 2 Sep 2004 03:54:29 -0000 1.379
@@ -162,7 +162,7 @@
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 @@
}
-
music_offs = musicFile.readUint32LE();
size = musicFile.readUint32LE();
More information about the Scummvm-git-logs
mailing list