aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Brown2002-03-05 16:13:09 +0000
committerJames Brown2002-03-05 16:13:09 +0000
commita2a497a46f2389096c2009a8dfa1676c889a42be (patch)
tree2b7c41f93c8e3438bb8bcca5571ca83b44c27c7f
parent441ad35080de4172e4262e653bd3929c35875574 (diff)
downloadscummvm-rg350-a2a497a46f2389096c2009a8dfa1676c889a42be.tar.gz
scummvm-rg350-a2a497a46f2389096c2009a8dfa1676c889a42be.tar.bz2
scummvm-rg350-a2a497a46f2389096c2009a8dfa1676c889a42be.zip
Fixed the actor crash bug properly. NOTE: This -will- break ALL saved games
made with previous versions. svn-id: r3648
-rw-r--r--script_v2.cpp1
-rw-r--r--scumm.h4
-rw-r--r--sound.cpp2
-rw-r--r--sound/imuse.cpp18
4 files changed, 11 insertions, 14 deletions
diff --git a/script_v2.cpp b/script_v2.cpp
index 3c20d0c069..e4f3cec9f7 100644
--- a/script_v2.cpp
+++ b/script_v2.cpp
@@ -1762,6 +1762,7 @@ void Scumm::o6_actorSet() {
}
a = derefActorSafe(_curActor, "o6_actorSet");
+ if (!a) return;
switch(b) {
case 76: /* actor-costume */
diff --git a/scumm.h b/scumm.h
index ab72b5560e..13185a5a6a 100644
--- a/scumm.h
+++ b/scumm.h
@@ -40,11 +40,7 @@ enum {
NUM_SCRIPT_SLOT = 25,
NUM_LOCALSCRIPT = 60,
NUM_SHADOW_PALETTE = 8,
-#if defined(FULL_THROTTLE)
NUM_ACTORS = 30
-#else
- NUM_ACTORS = 13
-#endif
};
diff --git a/sound.cpp b/sound.cpp
index 62f05e9f7d..8f3cfa1386 100644
--- a/sound.cpp
+++ b/sound.cpp
@@ -385,8 +385,6 @@ void *Scumm::openSfxFile() {
return file;
}
-#define NUM_MIXER 4
-
MixerChannel *Scumm::allocateMixer() {
int i;
MixerChannel *mc = _mixer_channel;
diff --git a/sound/imuse.cpp b/sound/imuse.cpp
index d074e78056..84aeefe577 100644
--- a/sound/imuse.cpp
+++ b/sound/imuse.cpp
@@ -40,11 +40,11 @@ int num_mix;
#define TRIGGER_ID 0
#define COMMAND_ID 1
-#ifdef SAMNMAX
+//#ifdef SAMNMAX
#define MDHD_TAG "MDpg"
-#else
- #define MDHD_TAG "MDhd"
-#endif
+//#else
+// #define MDHD_TAG "MDhd"
+//#endif
int clamp(int val, int min, int max) {
if (val<min)
@@ -181,9 +181,10 @@ bool SoundEngine::start_sound(int sound) {
void *mdhd;
mdhd = findTag(sound, MDHD_TAG, 0);
- if (!mdhd)
+ if (!mdhd) {
+ warning("SE::start_sound failed: Couldn't find %s", MDHD_TAG);
return false;
-
+ }
player = allocate_player(128);
if (!player)
return false;
@@ -996,9 +997,10 @@ bool Player::start_sound(int sound) {
void *mdhd;
mdhd = _se->findTag(sound, MDHD_TAG, 0);
- if (mdhd==NULL)
+ if (mdhd==NULL) {
+ warning("P::start_sound failed: Couldn't find %s", MDHD_TAG);
return false;
-
+ }
_parts = NULL;
_active = true;
_id = sound;