more missing asserts
[supertux.git] / src / scripting / level.cpp
index d29e18b..3c21ed0 100644 (file)
@@ -2,9 +2,9 @@
 
 #include <string>
 #include <stdio.h>
-#include "level.h"
-
-#define NOIMPL      printf("%s not implemented.\n", __PRETTY_FUNCTION__);
+#include "level.hpp"
+#include "game_session.hpp"
+#include "flip_level_transformer.hpp"
 
 namespace Scripting
 {
@@ -15,14 +15,21 @@ namespace Scripting
   {}
 
   void
-  Level::finish()
+  Level::finish(bool win)
+  {
+    GameSession::current()->finish(win);
+  }
+
+  void
+  Level::spawn(const std::string& sector, const std::string& spawnpoint)
   {
-    NOIMPL;
+    GameSession::current()->respawn(sector, spawnpoint);
   }
 
   void
-  Level::spawn(const std::string& , const std::string& )
+  Level::flip_vertically()
   {
-    NOIMPL;
+    FlipLevelTransformer flip_transformer;
+    flip_transformer.transform(GameSession::current()->get_current_level());
   }
 }