summaryrefslogtreecommitdiff
path: root/src/game/GameController.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-02-05 16:37:36 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-02-05 16:37:36 (GMT)
commit7ae5eaab79a41f31b633ca6f1bfb0dbae2fccb90 (patch)
treeb76fc14cca5e19c5482209f34131973ad1f80e6a /src/game/GameController.cpp
parent8024caec55ff1b93eefe50663d4ddf63934f8d63 (diff)
downloadpowder-7ae5eaab79a41f31b633ca6f1bfb0dbae2fccb90.zip
powder-7ae5eaab79a41f31b633ca6f1bfb0dbae2fccb90.tar.gz
Started intrepreter for tpt script and various things for console
Diffstat (limited to 'src/game/GameController.cpp')
-rw-r--r--src/game/GameController.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp
index 7df654f..73e59a5 100644
--- a/src/game/GameController.cpp
+++ b/src/game/GameController.cpp
@@ -70,7 +70,8 @@ GameController::GameController():
search(NULL),
renderOptions(NULL),
loginWindow(NULL),
- ssave(NULL)
+ ssave(NULL),
+ console(NULL)
{
gameView = new GameView();
gameModel = new GameModel();
@@ -78,6 +79,9 @@ GameController::GameController():
gameView->AttachController(this);
gameModel->AddObserver(gameView);
+ commandInterface = new TPTScriptInterface();
+ commandInterface->AttachGameModel(gameModel);
+
//sim = new Simulation();
}
@@ -312,7 +316,8 @@ void GameController::OpenDisplayOptions()
void GameController::ShowConsole()
{
- console = new ConsoleController(NULL);
+ if(!console)
+ console = new ConsoleController(NULL, commandInterface);
ui::Engine::Ref().ShowWindow(console->GetView());
}