diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/bladerunner/script/scene/hf06.cpp | 5 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ug08.cpp | 4 | ||||
-rw-r--r-- | engines/bladerunner/set.cpp | 44 | ||||
-rw-r--r-- | engines/bladerunner/set.h | 1 |
4 files changed, 44 insertions, 10 deletions
diff --git a/engines/bladerunner/script/scene/hf06.cpp b/engines/bladerunner/script/scene/hf06.cpp index 9a62e39cda..5219d962a5 100644 --- a/engines/bladerunner/script/scene/hf06.cpp +++ b/engines/bladerunner/script/scene/hf06.cpp @@ -49,6 +49,11 @@ void SceneScriptHF06::InitializeScene() { void SceneScriptHF06::SceneLoaded() { Unobstacle_Object("BOX22", true); Unobstacle_Object("BOX34", true); +#if BLADERUNNER_ORIGINAL_BUGS +#else + Obstacle_Object("FRONTBLOCK1", true); + Obstacle_Object("FRONTBLOCK2", true); +#endif // BLADERUNNER_ORIGINAL_BUGS Clickable_Object("BOX19"); Clickable_Object("BOX21"); Clickable_Object("BOX23"); diff --git a/engines/bladerunner/script/scene/ug08.cpp b/engines/bladerunner/script/scene/ug08.cpp index c736f4213e..c9750b68fe 100644 --- a/engines/bladerunner/script/scene/ug08.cpp +++ b/engines/bladerunner/script/scene/ug08.cpp @@ -76,6 +76,10 @@ void SceneScriptUG08::SceneLoaded() { Obstacle_Object("ELEV LEGS", true); Unobstacle_Object("ELEV LEGS", true); Unobstacle_Object("BOX RIGHT WALL ", true); +#if BLADERUNNER_ORIGINAL_BUGS +#else + Obstacle_Object("NORTHBLOCK", true); +#endif // BLADERUNNER_ORIGINAL_BUGS } bool SceneScriptUG08::MouseClick(int x, int y) { diff --git a/engines/bladerunner/set.cpp b/engines/bladerunner/set.cpp index 92798d6500..2e3bd44ee1 100644 --- a/engines/bladerunner/set.cpp +++ b/engines/bladerunner/set.cpp @@ -505,6 +505,17 @@ void Set::overrideSceneObjectInfo(int objectId) const { } } +void Set::setupNewObjectInSet(Common::String objName, BoundingBox objBbox) { + int objectId = _objectCount; + _objects[objectId].name = objName.c_str(); + _objects[objectId].bbox = objBbox; + _objects[objectId].isObstacle = 0; // init as false - Can be changed in Scene script eg. SceneLoaded() with (Un)Obstacle_Object() + _objects[objectId].isClickable = 0; // init as false - Can be changed in Scene script eg. SceneLoaded() with (Un)Clickable_Object() + _objects[objectId].isHotMouse = 0; + _objects[objectId].unknown1 = 0; + _objects[objectId].isTarget = 0; // init as false - Can be changed in Scene script eg. SceneLoaded() with (Un_)Combat_Target_Object + _objectCount++; +} /** * Used for adding objects in a Set mainly to fix a few "McCoy walking to places he should not" issues * This is called in Set::open() @@ -516,33 +527,46 @@ void Set::overrideSceneObjectInfo(int objectId) const { */ void Set::patchInAdditionalObjectsInSet() { Common::String custObjName; - int objectId = _objectCount; BoundingBox bbox; switch (_vm->_scene->getSceneId()) { + case kSceneHF06: + // block clicking / path access to northern part of the scene + // which causes McCoy and Police officers/ rats to go behind the map + bbox = BoundingBox(220.00f, 350.02f, -90.86f, 310.00f, 380.02f, -70.71f); + custObjName = "FRONTBLOCK1"; + setupNewObjectInSet(custObjName, bbox); + + bbox = BoundingBox(20.00f, 350.02f, -90.86f, 170.00f, 380.02f, -45.71f); + custObjName = "FRONTBLOCK2"; + setupNewObjectInSet(custObjName, bbox); + break; + case kScenePS05: // block actual passage to ESPER room because // it causes McCoy to sometimes go behind the wall bbox = BoundingBox(730.50f, -0.0f, -481.10f, 734.51f, 144.75f, -437.55f); custObjName = "MAINFBLOCK"; + setupNewObjectInSet(custObjName, bbox); break; + + case kSceneUG08: + // block clicking / path access to northern part of the scene + // which causes McCoy and Police officers/ rats to go behind the map + bbox = BoundingBox(-386.26f, -8.07f, -1078.99f, 100.00f, 170.63f, -478.99f); + custObjName = "NORTHBLOCK"; + setupNewObjectInSet(custObjName, bbox); + break; + case kSceneUG13: // Underground homeless place // block passage to empty elevator chute bbox = BoundingBox(-80.00f, 35.78f, -951.75f, 74.36f, 364.36f, -810.56f); custObjName = "ELEVBLOCK"; + setupNewObjectInSet(custObjName, bbox); break; default: return; } - - _objectCount++; - _objects[objectId].name = custObjName.c_str(); - _objects[objectId].bbox = bbox; - _objects[objectId].isObstacle = 0; // init as false - Can be changed in Scene script eg. SceneLoaded() with (Un)Obstacle_Object() - _objects[objectId].isClickable = 0; // init as false - Can be changed in Scene script eg. SceneLoaded() with (Un)Clickable_Object() - _objects[objectId].isHotMouse = 0; - _objects[objectId].unknown1 = 0; - _objects[objectId].isTarget = 0; // init as false - Can be changed in Scene script eg. SceneLoaded() with (Un_)Combat_Target_Object } /** diff --git a/engines/bladerunner/set.h b/engines/bladerunner/set.h index dbf4b9a787..3284a5ea71 100644 --- a/engines/bladerunner/set.h +++ b/engines/bladerunner/set.h @@ -110,6 +110,7 @@ private: #if BLADERUNNER_ORIGINAL_BUGS #else void overrideSceneObjectInfo(int objectId) const; + void setupNewObjectInSet(Common::String objName, BoundingBox objBbox); void patchInAdditionalObjectsInSet(); void patchOutBadObjectsFromSet(); #endif // BLADERUNNER_ORIGINAL_BUGS |