aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2014-03-22 19:25:26 +0100
committerStrangerke2014-03-22 19:26:41 +0100
commitadddf02e70a82e34e990f932f9955b947f7dcbc0 (patch)
tree5ba54076683e3a1468a2d435f0c96f7cd9675cf6
parentbbabe2b06b479fb5775b55c0de7b10df7ff67501 (diff)
downloadscummvm-rg350-adddf02e70a82e34e990f932f9955b947f7dcbc0.tar.gz
scummvm-rg350-adddf02e70a82e34e990f932f9955b947f7dcbc0.tar.bz2
scummvm-rg350-adddf02e70a82e34e990f932f9955b947f7dcbc0.zip
MADS: Implemente Scene::changeDepthSurface()
-rw-r--r--engines/mads/nebular/nebular_scenes2.cpp4
-rw-r--r--engines/mads/scene.cpp6
-rw-r--r--engines/mads/scene.h3
-rw-r--r--engines/mads/scene_data.h10
4 files changed, 16 insertions, 7 deletions
diff --git a/engines/mads/nebular/nebular_scenes2.cpp b/engines/mads/nebular/nebular_scenes2.cpp
index 90665a8a1e..bec3fe4ed5 100644
--- a/engines/mads/nebular/nebular_scenes2.cpp
+++ b/engines/mads/nebular/nebular_scenes2.cpp
@@ -387,7 +387,7 @@ void Scene202::enter() {
}
if (_globals[32])
- warning("TODO: sub1EB6E(_globals[32];");
+ _scene->changeDepthSurface(_globals[32]);
if (_scene->_priorSceneId == 201) {
_game._player._playerPos = Common::Point(190, 91);
@@ -811,7 +811,7 @@ void Scene202::actions() {
_game._objects.addToInventory(OBJ_BONE);
warning("TODO: Dialog::showPicture(OBJ_BONE, 0x4EFA, 0);");
}
- warning("TODO: sub1EB6E(_globals[32];");
+ _scene->changeDepthSurface(_globals[32]);
_game._player._stepEnabled = true;
_game._player._visible = true;
} else {
diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp
index ee5ff1f503..e01720f788 100644
--- a/engines/mads/scene.cpp
+++ b/engines/mads/scene.cpp
@@ -514,4 +514,10 @@ void Scene::free() {
warning("TODO: Scene::free");
}
+void Scene::changeDepthSurface(int arg1) {
+ _v1 = arg1;
+ _sceneInfo->loadCodes(_depthSurface, nullptr);
+ _spriteSlots.fullRefresh();
+}
+
} // End of namespace MADS
diff --git a/engines/mads/scene.h b/engines/mads/scene.h
index 16684c47a2..a51d820d1c 100644
--- a/engines/mads/scene.h
+++ b/engines/mads/scene.h
@@ -201,6 +201,9 @@ public:
* Clear the data for the scene
*/
void free();
+
+ void changeDepthSurface(int arg1);
+
};
} // End of namespace MADS
diff --git a/engines/mads/scene_data.h b/engines/mads/scene_data.h
index d29d4e319a..8f03783460 100644
--- a/engines/mads/scene_data.h
+++ b/engines/mads/scene_data.h
@@ -163,11 +163,6 @@ protected:
* Loads the given surface with depth information of a given scene
*/
virtual void loadCodes(MSurface &depthSurface) = 0;
-
- /**
- * Loads the given surface with depth information of a given scene
- */
- virtual void loadCodes(MSurface &depthSurface, Common::SeekableReadStream *stream) = 0;
public:
int _sceneId;
int _artFileNum;
@@ -206,6 +201,11 @@ public:
* Set up a route node
*/
void setRouteNode(int nodeIndex, const Common::Point &pt, MSurface &depthSurface);
+
+ /**
+ * Loads the given surface with depth information of a given scene
+ */
+ virtual void loadCodes(MSurface &depthSurface, Common::SeekableReadStream *stream) = 0;
};
} // End of namespace MADS