summaryrefslogtreecommitdiff
path: root/src/game/GameController.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/GameController.cpp')
-rw-r--r--src/game/GameController.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp
index dfdc12d..40d7501 100644
--- a/src/game/GameController.cpp
+++ b/src/game/GameController.cpp
@@ -348,6 +348,12 @@ void GameController::Tick()
void GameController::Update()
{
+ ui::Point pos = gameView->GetMousePosition();
+ if(pos.X >= 0 && pos.Y >= 0 && pos.X < XRES && pos.Y < YRES)
+ {
+ gameView->SetSample(gameModel->GetSimulation()->Get(pos.X, pos.Y));
+ }
+
gameModel->GetSimulation()->update_particles();
if(renderOptions && renderOptions->HasExited)
{
@@ -558,4 +564,8 @@ void GameController::ReloadSim()
gameModel->GetSimulation()->Load(gameModel->GetSave()->GetData(), gameModel->GetSave()->GetDataLength());
}
+std::string GameController::ElementResolve(int type)
+{
+ return std::string(gameModel->GetSimulation()->ptypes[type].name);
+}