From 215a94ae30082e396ab6179e26ab6e182602f8a7 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 7 Aug 2005 00:00:43 +0000 Subject: WIP on metaResources. Most resources are load. Now we start correct scene. But there are following problems: o Inclomplete support for actors speech, so opSpeak is skipped o For some weird reason actors do not appear at all. Actually code seems to be trying to read only protagonist frames o It crashes on reading sprites due to wrong input svn-id: r18624 --- saga/scene.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'saga/scene.cpp') diff --git a/saga/scene.cpp b/saga/scene.cpp index 23570bb5f7..a131eff7e7 100644 --- a/saga/scene.cpp +++ b/saga/scene.cpp @@ -418,7 +418,10 @@ static struct SceneSubstitutes { }; void Scene::changeScene(int16 sceneNumber, int actorsEntrance, SceneTransitionType transitionType, int chapter) { - // This is used for latter demos where all places on world map except + + debug(5, "Scene::changeScene(%d, %d, %d, %d)", sceneNumber, actorsEntrance, transitionType, chapter); + + // This is used for latter ITE demos where all places on world map except // Tent Faire are substituted with LBM picture and short description if (_vm->getFeatures() & GF_SCENE_SUBSTITUTES) { for (int i = 0; i < ARRAYSIZE(sceneSubstitutes); i++) { @@ -627,13 +630,19 @@ void Scene::loadScene(LoadSceneParams *loadSceneParams) { return; } } -// + if (_sceneLoaded) { error("Scene::loadScene(): Error, a scene is already loaded"); } _loadDescription = true; + if (_vm->getGameType() == GType_IHNM) { + if (loadSceneParams->loadFlag == kLoadBySceneNumber) // When will we get rid of it? + if (loadSceneParams->sceneDescriptor <= 0) + loadSceneParams->sceneDescriptor = _vm->_resource->_metaResource.sceneIndex; + } + switch (loadSceneParams->loadFlag) { case kLoadByResourceId: _sceneNumber = 0; // original assign zero for loaded by resource id @@ -655,7 +664,7 @@ void Scene::loadScene(LoadSceneParams *loadSceneParams) { break; } - debug(3, "Loading scene number %u:", _sceneNumber); + debug(3, "Loading scene number %d:", _sceneNumber); // Load scene descriptor and resource list resources if (_loadDescription) { -- cgit v1.2.3