diff options
author | Andrew Kurushin | 2005-08-04 14:49:04 +0000 |
---|---|---|
committer | Andrew Kurushin | 2005-08-04 14:49:04 +0000 |
commit | b4bd032f544290c7257244df31e3b326519e7b29 (patch) | |
tree | 351b88690f5478f3840bd8eb9f67c8e95a4d637f /saga | |
parent | 5fb85d659c4d09f1274fe94c27ebfe94d6a036b3 (diff) | |
download | scummvm-rg350-b4bd032f544290c7257244df31e3b326519e7b29.tar.gz scummvm-rg350-b4bd032f544290c7257244df31e3b326519e7b29.tar.bz2 scummvm-rg350-b4bd032f544290c7257244df31e3b326519e7b29.zip |
fixed DUMMY resource in old mac cd
fixed intro voice at endscene
svn-id: r18616
Diffstat (limited to 'saga')
-rw-r--r-- | saga/animation.h | 7 | ||||
-rw-r--r-- | saga/ite_introproc.cpp | 18 | ||||
-rw-r--r-- | saga/scene.cpp | 8 | ||||
-rw-r--r-- | saga/sthread.cpp | 6 |
4 files changed, 30 insertions, 9 deletions
diff --git a/saga/animation.h b/saga/animation.h index 25b24fcfa0..dc138eed31 100644 --- a/saga/animation.h +++ b/saga/animation.h @@ -113,7 +113,12 @@ public: void finish(uint16 animId); void resume(uint16 animId, int cycles); int16 getCurrentFrame(uint16 animId); - + bool hasAnimation(uint16 animId) { + if (animId >= MAX_ANIMATIONS) { + return false; + } + return (_animations[animId] != NULL); + } private: void decodeFrame(AnimationData *anim, size_t frameOffset, byte *buf, size_t bufLength); void fillFrameOffsets(AnimationData *anim); diff --git a/saga/ite_introproc.cpp b/saga/ite_introproc.cpp index 46e41ac4c3..b82d654630 100644 --- a/saga/ite_introproc.cpp +++ b/saga/ite_introproc.cpp @@ -875,16 +875,18 @@ int Scene::ITEIntroTreeHouseProc(int param) { q_event = _vm->_events->queue(&event); - // Begin title screen background animation - _vm->_anim->setFrameTime(0, 100); + if (_vm->_anim->hasAnimation(0)) { + // Begin title screen background animation + _vm->_anim->setFrameTime(0, 100); - event.type = ONESHOT_EVENT; - event.code = ANIM_EVENT; - event.op = EVENT_PLAY; - event.param = 0; - event.time = 0; + event.type = ONESHOT_EVENT; + event.code = ANIM_EVENT; + event.op = EVENT_PLAY; + event.param = 0; + event.time = 0; - q_event = _vm->_events->chain(q_event, &event); + q_event = _vm->_events->chain(q_event, &event); + } // Queue game credits list q_event = ITEQueueCredits(DISSOLVE_DURATION + 2000, CREDIT_DURATION1, n_credits1, credits1); diff --git a/saga/scene.cpp b/saga/scene.cpp index 9dc37c952d..2dc3365ac4 100644 --- a/saga/scene.cpp +++ b/saga/scene.cpp @@ -633,6 +633,14 @@ void Scene::loadScene(LoadSceneParams *loadSceneParams) { if (!_resourceList[i].invalid) { _vm->_resource->loadResource(_sceneContext, _resourceList[i].resourceId, _resourceList[i].buffer, _resourceList[i].size); + + + if (_resourceList[i].size >= 6) { + if (!memcmp(_resourceList[i].buffer, "DUMMY!", 6)) { + _resourceList[i].invalid = true; + warning("DUMMY resource %i", _resourceList[i].resourceId); + } + } } } diff --git a/saga/sthread.cpp b/saga/sthread.cpp index c8858c2aed..a52578b554 100644 --- a/saga/sthread.cpp +++ b/saga/sthread.cpp @@ -645,6 +645,12 @@ bool Script::runThread(ScriptThread *thread, uint instructionLimit) { } } + if (_vm->getGameType() == GType_ITE) { + if (sampleResourceId <= 0 || sampleResourceId > 4000) { + sampleResourceId = -1; + } + } + _vm->_actor->actorSpeech(actorId, strings, stringsCount, sampleResourceId, speechFlags); if (!(speechFlags & kSpeakAsync)) { |