summaryrefslogtreecommitdiff
path: root/src/gui/game/GameController.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-05-15 17:51:45 (GMT)
committer jacob1 <jfu614@gmail.com>2013-05-15 17:51:45 (GMT)
commitdfc33aaeeaa066ff0107b4ed68ec7756fbc5acb3 (patch)
tree51d5c2e1fd34f26d862b6eee80e3960c3243d7c1 /src/gui/game/GameController.cpp
parent94d21a1679749df49342903545192254a27f8ffc (diff)
downloadpowder-dfc33aaeeaa066ff0107b4ed68ec7756fbc5acb3.zip
powder-dfc33aaeeaa066ff0107b4ed68ec7756fbc5acb3.tar.gz
finish return values for the legacy api, add sim.saveStamp and sim.loadStamp
Diffstat (limited to 'src/gui/game/GameController.cpp')
-rw-r--r--src/gui/game/GameController.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/game/GameController.cpp b/src/gui/game/GameController.cpp
index ad48f66..267133b 100644
--- a/src/gui/game/GameController.cpp
+++ b/src/gui/game/GameController.cpp
@@ -509,17 +509,20 @@ void GameController::ToolClick(int toolSelection, ui::Point point)
activeTool->Click(sim, cBrush, point);
}
-void GameController::StampRegion(ui::Point point1, ui::Point point2)
+std::string GameController::StampRegion(ui::Point point1, ui::Point point2)
{
GameSave * newSave;
newSave = gameModel->GetSimulation()->Save(point1.X, point1.Y, point2.X, point2.Y);
if(newSave)
{
newSave->paused = gameModel->GetPaused();
- gameModel->AddStamp(newSave);
+ return gameModel->AddStamp(newSave);
}
else
+ {
new ErrorMessage("Could not create stamp", "Error generating save file");
+ return "";
+ }
}
void GameController::CopyRegion(ui::Point point1, ui::Point point2)