diff options
author | Paul Gilbert | 2011-03-23 19:16:09 +1100 |
---|---|---|
committer | Paul Gilbert | 2011-03-23 19:16:09 +1100 |
commit | 5e6cc67e2e9b4ccd2cf6b02ec6b1a92841eae421 (patch) | |
tree | 29715daec7f27c625c10b49f29021977eedd6ccb /engines | |
parent | 71354fdf13f84573acba278b420c9d87ede16925 (diff) | |
download | scummvm-rg350-5e6cc67e2e9b4ccd2cf6b02ec6b1a92841eae421.tar.gz scummvm-rg350-5e6cc67e2e9b4ccd2cf6b02ec6b1a92841eae421.tar.bz2 scummvm-rg350-5e6cc67e2e9b4ccd2cf6b02ec6b1a92841eae421.zip |
TSAGE: Implemented Scene #4025 - Village - Puzzle Board
Diffstat (limited to 'engines')
-rw-r--r-- | engines/tsage/converse.cpp | 1 | ||||
-rw-r--r-- | engines/tsage/ringworld_scenes5.cpp | 17 | ||||
-rw-r--r-- | engines/tsage/ringworld_scenes5.h | 1 | ||||
-rw-r--r-- | engines/tsage/scenes.cpp | 4 |
4 files changed, 16 insertions, 7 deletions
diff --git a/engines/tsage/converse.cpp b/engines/tsage/converse.cpp index e8b640ea3d..07186c954b 100644 --- a/engines/tsage/converse.cpp +++ b/engines/tsage/converse.cpp @@ -287,7 +287,6 @@ void SequenceManager::signal() { break; } } - } void SequenceManager::process(Event &event) { diff --git a/engines/tsage/ringworld_scenes5.cpp b/engines/tsage/ringworld_scenes5.cpp index a1cecca5d2..5eb0decb2b 100644 --- a/engines/tsage/ringworld_scenes5.cpp +++ b/engines/tsage/ringworld_scenes5.cpp @@ -1347,15 +1347,15 @@ void Scene4025::Action2::signal() { break; case 1: if (!scene->_pegPtr2) { - // Getting a peg + // Getting a peg from a hole scene->_holePtr->_pegPtr->flag100(); scene->_pegPtr = scene->_holePtr->_pegPtr; scene->_pegPtr->_armStrip = 0; scene->_pegPtr->setPosition(Common::Point(-10, -10)); - scene->_pegPtr2 = scene->_pegPtr; - scene->_pegPtr = NULL; + scene->_pegPtr2 = scene->_holePtr->_pegPtr; + scene->_holePtr->_pegPtr = NULL; } else { - // Placing a peg + // Placing a peg into a hole scene->_pegPtr2 = NULL; if (scene->_holePtr->_pegPtr) { scene->_holePtr->_pegPtr->flag100(); @@ -1414,7 +1414,7 @@ void Scene4025::Hole::doAction(int action) { SceneItem::display2(4025, 3); break; case CURSOR_USE: - if (!scene->_holePtr && !_pegPtr) { + if (!scene->_pegPtr && !_pegPtr) { setAction(&scene->_sequenceManager, scene, 4028, NULL); } else { _globals->_player.disableControl(); @@ -1465,6 +1465,11 @@ void Scene4025::Peg::doAction(int action) { /*--------------------------------------------------------------------------*/ +Scene4025::Scene4025(): Scene() { + _holePtr = NULL; + _pegPtr = _pegPtr2 = NULL; +} + void Scene4025::postInit(SceneObjectList *OwnerList) { loadScene(4025); Scene::postInit(); @@ -1612,7 +1617,7 @@ void Scene4025::process(Event &event) { } void Scene4025::dispatch() { - if ((_peg1._armStrip == 7) && (_peg2._armStrip == 4) && (_peg3._armStrip == 8) && + if (!_action && (_peg1._armStrip == 7) && (_peg2._armStrip == 4) && (_peg3._armStrip == 8) && (_peg4._armStrip == 5) && (_peg5._armStrip == 6)) setAction(&_action3); diff --git a/engines/tsage/ringworld_scenes5.h b/engines/tsage/ringworld_scenes5.h index b6a6a49278..cb95466d47 100644 --- a/engines/tsage/ringworld_scenes5.h +++ b/engines/tsage/ringworld_scenes5.h @@ -246,6 +246,7 @@ public: Peg *_pegPtr, *_pegPtr2; Hole *_holePtr; + Scene4025(); virtual void postInit(SceneObjectList *OwnerList = NULL); virtual void synchronise(Serialiser &s); virtual void remove(); diff --git a/engines/tsage/scenes.cpp b/engines/tsage/scenes.cpp index 40f29e661a..a0172a6507 100644 --- a/engines/tsage/scenes.cpp +++ b/engines/tsage/scenes.cpp @@ -58,6 +58,10 @@ void SceneManager::checkScene() { } void SceneManager::sceneChange() { + // Handle removing the scene + if (_scene) + _scene->remove(); + // Clear the scene objects List<SceneObject *>::iterator io = _globals->_sceneObjects->begin(); while (io != _globals->_sceneObjects->end()) { |