From 43065c9ee26bd0f82da0fe00cb6309c77acc029e Mon Sep 17 00:00:00 2001 From: Strangerke Date: Thu, 22 Oct 2015 22:15:57 +0200 Subject: MADS: Dragon: Implement scene 101 --- engines/mads/dragonsphere/dragonsphere_scenes.cpp | 3 +- engines/mads/dragonsphere/dragonsphere_scenes1.cpp | 34 ++++++++++++++++++++++ engines/mads/dragonsphere/dragonsphere_scenes1.h | 11 +++++++ 3 files changed, 47 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/mads/dragonsphere/dragonsphere_scenes.cpp b/engines/mads/dragonsphere/dragonsphere_scenes.cpp index c24d0e93d0..0f0fb5c103 100644 --- a/engines/mads/dragonsphere/dragonsphere_scenes.cpp +++ b/engines/mads/dragonsphere/dragonsphere_scenes.cpp @@ -28,6 +28,7 @@ #include "mads/scene.h" #include "mads/dragonsphere/game_dragonsphere.h" #include "mads/dragonsphere/dragonsphere_scenes.h" +#include "mads/dragonsphere/dragonsphere_scenes1.h" namespace MADS { @@ -42,7 +43,7 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) { switch (scene._nextSceneId) { // Scene group #1 (Castle, river and caves) case 101: // king's bedroom - return new DummyScene(vm); // TODO + return new Scene101(vm); case 102: // queen's bedroom return new DummyScene(vm); // TODO case 103: // outside king's bedroom diff --git a/engines/mads/dragonsphere/dragonsphere_scenes1.cpp b/engines/mads/dragonsphere/dragonsphere_scenes1.cpp index 6635354991..6f107df42b 100644 --- a/engines/mads/dragonsphere/dragonsphere_scenes1.cpp +++ b/engines/mads/dragonsphere/dragonsphere_scenes1.cpp @@ -205,5 +205,39 @@ void Scene1xx::setPlayerSpritesPrefix() { /*------------------------------------------------------------------------*/ +Scene101::Scene101(MADSEngine *vm) : Scene1xx(vm) { +} + +void Scene101::synchronize(Common::Serializer &s) { + Scene1xx::synchronize(s); +} + +void Scene101::setup() { + setPlayerSpritesPrefix(); + setAAName(); +} + +void Scene101::enter() { + sceneEntrySound(); +} + +void Scene101::step() { +} + +void Scene101::actions() { + if (_action.isObject(NOUN_BED)) { + int sprIdx = _scene->_sprites.addSprites("*ob001i", false); + int seqIdx = _scene->_sequences.addStampCycle(sprIdx, false, 1); + _scene->_sequences.setDepth(seqIdx, 0); + _scene->_sequences.setPosition(seqIdx, Common::Point(10, 50)); + _action._inProgress = false; + } +} + +void Scene101::preActions() { +} + +/*------------------------------------------------------------------------*/ + } // End of namespace Dragonsphere } // End of namespace MADS diff --git a/engines/mads/dragonsphere/dragonsphere_scenes1.h b/engines/mads/dragonsphere/dragonsphere_scenes1.h index 4194845975..023a789505 100644 --- a/engines/mads/dragonsphere/dragonsphere_scenes1.h +++ b/engines/mads/dragonsphere/dragonsphere_scenes1.h @@ -53,6 +53,17 @@ public: Scene1xx(MADSEngine *vm) : DragonsphereScene(vm) {} }; +class Scene101 : public Scene1xx { +public: + Scene101(MADSEngine *vm); + virtual void synchronize(Common::Serializer &s); + + virtual void setup(); + virtual void enter(); + virtual void step(); + virtual void preActions(); + virtual void actions(); +}; } // End of namespace Dragonsphere } // End of namespace MADS -- cgit v1.2.3