diff options
| author | James Brown | 2002-03-05 16:13:09 +0000 |
|---|---|---|
| committer | James Brown | 2002-03-05 16:13:09 +0000 |
| commit | a2a497a46f2389096c2009a8dfa1676c889a42be (patch) | |
| tree | 2b7c41f93c8e3438bb8bcca5571ca83b44c27c7f | |
| parent | 441ad35080de4172e4262e653bd3929c35875574 (diff) | |
| download | scummvm-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.cpp | 1 | ||||
| -rw-r--r-- | scumm.h | 4 | ||||
| -rw-r--r-- | sound.cpp | 2 | ||||
| -rw-r--r-- | sound/imuse.cpp | 18 |
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 */ @@ -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 }; @@ -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; |
