From 5eed7f091d8d96f3265610afe58006715bf16661 Mon Sep 17 00:00:00 2001 From: Thanasis Antoniou Date: Sat, 1 Jun 2019 02:58:31 +0300 Subject: BLADERUNNER: Remove awry clickables from BB01, CT12, CT01 --- engines/bladerunner/script/scene/bb01.cpp | 6 +++++ engines/bladerunner/script/scene/ct01.cpp | 5 +++++ engines/bladerunner/script/scene/ct12.cpp | 6 +++++ engines/bladerunner/set.cpp | 37 ++++++++++++++++++++----------- 4 files changed, 41 insertions(+), 13 deletions(-) (limited to 'engines') diff --git a/engines/bladerunner/script/scene/bb01.cpp b/engines/bladerunner/script/scene/bb01.cpp index 34ddc47ae8..488022ddd7 100644 --- a/engines/bladerunner/script/scene/bb01.cpp +++ b/engines/bladerunner/script/scene/bb01.cpp @@ -88,6 +88,12 @@ void SceneScriptBB01::InitializeScene() { void SceneScriptBB01::SceneLoaded() { Obstacle_Object("COLUME", true); +#if BLADERUNNER_ORIGINAL_BUGS +#else + Unclickable_Object("OBJECT03"); + Unclickable_Object("OBJECT04"); + Unclickable_Object("OBJECT05"); +#endif // BLADERUNNER_ORIGINAL_BUGS } bool SceneScriptBB01::MouseClick(int x, int y) { diff --git a/engines/bladerunner/script/scene/ct01.cpp b/engines/bladerunner/script/scene/ct01.cpp index 754d939cba..34a2a5b0d9 100644 --- a/engines/bladerunner/script/scene/ct01.cpp +++ b/engines/bladerunner/script/scene/ct01.cpp @@ -146,6 +146,11 @@ void SceneScriptCT01::SceneLoaded() { Unclickable_Object("TURBINE"); Unclickable_Object("SPINNER BODY"); Unclickable_Object("OBJECT04"); +#if BLADERUNNER_ORIGINAL_BUGS +#else + Unclickable_Object("OBJECT03"); + Unclickable_Object("OBJECT05"); +#endif // BLADERUNNER_ORIGINAL_BUGS } bool SceneScriptCT01::MouseClick(int x, int y) { diff --git a/engines/bladerunner/script/scene/ct12.cpp b/engines/bladerunner/script/scene/ct12.cpp index 7c69762061..8cd5210e91 100644 --- a/engines/bladerunner/script/scene/ct12.cpp +++ b/engines/bladerunner/script/scene/ct12.cpp @@ -120,6 +120,12 @@ void SceneScriptCT12::SceneLoaded() { Unobstacle_Object("SPINNER BODY", true); Unobstacle_Object("HOWFLOOR", true); Unclickable_Object("TURBINE"); +#if BLADERUNNER_ORIGINAL_BUGS +#else + Unclickable_Object("OBJECT03"); + Unclickable_Object("OBJECT04"); + Unclickable_Object("OBJECT05"); +#endif // BLADERUNNER_ORIGINAL_BUGS } bool SceneScriptCT12::MouseClick(int x, int y) { diff --git a/engines/bladerunner/set.cpp b/engines/bladerunner/set.cpp index 2e3bd44ee1..6e29a37acb 100644 --- a/engines/bladerunner/set.cpp +++ b/engines/bladerunner/set.cpp @@ -579,27 +579,38 @@ void Set::patchInAdditionalObjectsInSet() { */ void Set::patchOutBadObjectsFromSet() { int removedIndexRef = 0; - switch (_vm->_scene->getSceneId()) { - case kSceneNR11: - for (int objectId = 0; objectId < _objectCount; ++objectId) { + bool removeCurrObj = false; + for (int objectId = 0; objectId < _objectCount; ++objectId) { + switch (_vm->_scene->getSceneId()) { + case kSceneNR11: if ((objectId == 46 && _objects[objectId].name == "BOX53") || (objectId == 36 && _objects[objectId].name == "BOX43") - || (objectId == 37 && _objects[objectId].name == "BOX44") + || (objectId == 37 && _objects[objectId].name == "BOX44") || (objectId == 13 && _objects[objectId].name == "LOFT04") ) { // Removing obj 46, 36, 37 (BOX53, BOX43, BOX44) fixes paths in the scene // Removing obj 13 (LOFT04) fixes duplicate named box that confuses the engine - _objects[objectId].name = Common::String::format("REMOVED%02d", removedIndexRef++); - _objects[objectId].isObstacle = 0; - _objects[objectId].isClickable = 0; - _objects[objectId].isHotMouse = 0; - _objects[objectId].unknown1 = 0; - _objects[objectId].isTarget = 0; + removeCurrObj = true; } + break; + case kSceneDR02: + if ((objectId == 44 && _objects[objectId].name == "TRASH CAN WITH FIRE")) { + // Removing obj 44 (TRASH CAN WITH FIRE) fixes duplicate named box (id: 29) that confuses the engine + removeCurrObj = true; + } + break; + default: + break; + } + if (removeCurrObj) { + removeCurrObj = false; + _objects[objectId].name = Common::String::format("REMOVED%02d", removedIndexRef++); + _objects[objectId].isObstacle = 0; + _objects[objectId].isClickable = 0; + _objects[objectId].isHotMouse = 0; + _objects[objectId].unknown1 = 0; + _objects[objectId].isTarget = 0; } - break; - default: - break; } return; } -- cgit v1.2.3