aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/nebular
diff options
context:
space:
mode:
authorPaul Gilbert2014-04-05 22:41:25 -0400
committerPaul Gilbert2014-04-05 22:41:25 -0400
commitff7d2e2dbf60202cc24b26b1ac61c0e76e802191 (patch)
treec54249ca263e20ec7e2221ef9b7e2bcfc9f73d45 /engines/mads/nebular
parent11403c5db6eac282e0e1f28623ac25ab95517792 (diff)
downloadscummvm-rg350-ff7d2e2dbf60202cc24b26b1ac61c0e76e802191.tar.gz
scummvm-rg350-ff7d2e2dbf60202cc24b26b1ac61c0e76e802191.tar.bz2
scummvm-rg350-ff7d2e2dbf60202cc24b26b1ac61c0e76e802191.zip
MADS: Add missing scene codes variant handling
Diffstat (limited to 'engines/mads/nebular')
-rw-r--r--engines/mads/nebular/nebular_scenes.cpp4
-rw-r--r--engines/mads/nebular/nebular_scenes.h2
-rw-r--r--engines/mads/nebular/nebular_scenes1.cpp6
-rw-r--r--engines/mads/nebular/nebular_scenes2.cpp4
4 files changed, 8 insertions, 8 deletions
diff --git a/engines/mads/nebular/nebular_scenes.cpp b/engines/mads/nebular/nebular_scenes.cpp
index 3a6e6a609f..0538f1b10e 100644
--- a/engines/mads/nebular/nebular_scenes.cpp
+++ b/engines/mads/nebular/nebular_scenes.cpp
@@ -90,10 +90,10 @@ Common::String NebularScene::formAnimName(char sepChar, int suffixNum) {
/*------------------------------------------------------------------------*/
-void SceneInfoNebular::loadCodes(MSurface &depthSurface) {
+void SceneInfoNebular::loadCodes(MSurface &depthSurface, int variant) {
File f(Resources::formatName(RESPREFIX_RM, _sceneId, ".DAT"));
MadsPack codesPack(&f);
- Common::SeekableReadStream *stream = codesPack.getItemStream(0);
+ Common::SeekableReadStream *stream = codesPack.getItemStream(variant + 1);
loadCodes(depthSurface, stream);
diff --git a/engines/mads/nebular/nebular_scenes.h b/engines/mads/nebular/nebular_scenes.h
index 895ee51cfa..8e5bc05348 100644
--- a/engines/mads/nebular/nebular_scenes.h
+++ b/engines/mads/nebular/nebular_scenes.h
@@ -131,7 +131,7 @@ public:
class SceneInfoNebular : public SceneInfo {
friend class SceneInfo;
protected:
- virtual void loadCodes(MSurface &depthSurface);
+ virtual void loadCodes(MSurface &depthSurface, int variant);
virtual void loadCodes(MSurface &depthSurface, Common::SeekableReadStream *stream);
diff --git a/engines/mads/nebular/nebular_scenes1.cpp b/engines/mads/nebular/nebular_scenes1.cpp
index f7a2a6031e..2a9b3c64ee 100644
--- a/engines/mads/nebular/nebular_scenes1.cpp
+++ b/engines/mads/nebular/nebular_scenes1.cpp
@@ -266,7 +266,7 @@ void Scene103::actions() {
} else if (_action.isAction(VERB_TAKE, 371) && _game._objects.isInRoom(OBJ_TIMER_MODULE)) {
switch (_vm->_game->_trigger) {
case 0:
- _scene->changeDepthSurface(1);
+ _scene->changeVariant(1);
_globals._spriteIndexes[28] = _scene->_sequences.startReverseCycle(
_globals._spriteIndexes[13], false, 3, 2);
_scene->_sequences.setMsgLayout(_globals._spriteIndexes[28]);
@@ -284,7 +284,7 @@ void Scene103::actions() {
case 2:
_vm->_sound->command(22);
_game._objects.addToInventory(OBJ_TIMER_MODULE);
- _scene->changeDepthSurface(0);
+ _scene->changeVariant(0);
_scene->drawElements(kTransitionNone, false);
_scene->_hotspots.activate(371, false);
_vm->_game->_player._visible = true;
@@ -298,7 +298,7 @@ void Scene103::actions() {
} else if (_action.isAction(VERB_TAKE, 289, 0) && _game._objects.isInRoom(OBJ_REBREATHER)) {
switch (_vm->_game->_trigger) {
case 0:
- _scene->changeDepthSurface(1);
+ _scene->changeVariant(1);
_globals._spriteIndexes[27] = _scene->_sequences.startReverseCycle(
_globals._spriteIndexes[12], false, 3, 2);
_scene->_sequences.setMsgLayout(_globals._spriteIndexes[27]);
diff --git a/engines/mads/nebular/nebular_scenes2.cpp b/engines/mads/nebular/nebular_scenes2.cpp
index 0bf5c21e59..9e4edc0bca 100644
--- a/engines/mads/nebular/nebular_scenes2.cpp
+++ b/engines/mads/nebular/nebular_scenes2.cpp
@@ -381,7 +381,7 @@ void Scene202::enter() {
}
if (_globals[kBone202Status])
- _scene->changeDepthSurface(_globals[kBone202Status]);
+ _scene->changeVariant(_globals[kBone202Status]);
if (_scene->_priorSceneId == 201) {
_game._player._playerPos = Common::Point(190, 91);
@@ -789,7 +789,7 @@ void Scene202::actions() {
_game._objects.addToInventory(OBJ_BONE);
_vm->_dialogs->showPicture(OBJ_BONE, 0x4EFA, 0);
}
- _scene->changeDepthSurface(_globals[kBone202Status]);
+ _scene->changeVariant(_globals[kBone202Status]);
_game._player._stepEnabled = true;
_game._player._visible = true;
} else {