aboutsummaryrefslogtreecommitdiff
path: root/engines/pegasus/pegasus.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/pegasus/pegasus.cpp')
-rw-r--r--engines/pegasus/pegasus.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/engines/pegasus/pegasus.cpp b/engines/pegasus/pegasus.cpp
index d9f296d3e2..fe140cd05b 100644
--- a/engines/pegasus/pegasus.cpp
+++ b/engines/pegasus/pegasus.cpp
@@ -75,6 +75,9 @@ PegasusEngine::~PegasusEngine() {
delete _cursor;
delete _continuePoint;
delete _gameMenu;
+ delete _neighborhood;
+
+ // NOTE: This must be deleted last!
delete _gfx;
}
@@ -1108,4 +1111,18 @@ tInventoryResult PegasusEngine::addItemToInventory(InventoryItem *item) {
return result;
}
+void PegasusEngine::useNeighborhood(Neighborhood *neighborhood) {
+ delete _neighborhood;
+ _neighborhood = neighborhood;
+
+ if (_neighborhood) {
+ InputHandler::setInputHandler(_neighborhood);
+ _neighborhood->init();
+ _neighborhood->moveNavTo(kNavAreaLeft, kNavAreaTop);
+ g_interface->setDate(_neighborhood->getDateResID());
+ } else {
+ InputHandler::setInputHandler(this);
+ }
+}
+
} // End of namespace Pegasus