Crude hack to slow down the game, use set_game_speed(2.0) in console to run at half...
[supertux.git] / src / scripting / functions.cpp
index c2f8c98..e53a837 100644 (file)
@@ -51,6 +51,8 @@
 #include "squirrel_util.hpp"
 #include "time_scheduler.hpp"
 
+extern float game_speed;
+
 namespace Scripting
 {
 
@@ -96,6 +98,11 @@ void shrink_screen(float dest_x, float dest_y, float seconds)
   main_loop->set_screen_fade(new ShrinkFade(Vector(dest_x, dest_y), seconds));
 }
 
+void abort_screenfade()
+{
+  main_loop->set_screen_fade(NULL);
+}
+
 std::string translate(const std::string& text)
 {
   return dictionary_manager.get_dictionary().translate(text);
@@ -280,4 +287,9 @@ int rand()
   return systemRandom.rand();
 }
 
+void set_game_speed(float speed)
+{
+  ::game_speed = speed;
+}
+
 }