fixed DUMMY resource in old mac cd

fixed intro voice at endscene

svn-id: r18616
This commit is contained in:
Andrew Kurushin 2005-08-04 14:49:04 +00:00
parent 5fb85d659c
commit b4bd032f54
4 changed files with 30 additions and 9 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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);
}
}
}
}

View File

@ -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)) {