add code to debug collision rectangles
[supertux.git] / src / scripting / functions.cpp
index 4856d36..d872740 100644 (file)
@@ -36,6 +36,7 @@
 #include "mainloop.hpp"
 #include "worldmap.hpp"
 #include "world.hpp"
+#include "sector.hpp"
 
 #include "squirrel_error.hpp"
 #include "wrapper_util.hpp"
@@ -63,6 +64,11 @@ void wait_for_screenswitch(HSQUIRRELVM vm)
   script_manager->set_wakeup_event(vm, ScriptManager::SCREEN_SWITCHED);
 }
 
+void exit_screen()
+{
+  main_loop->exit_screen();
+}
+
 std::string translate(const std::string& text)
 {
   return dictionary_manager.get_dictionary().translate(text);
@@ -119,6 +125,11 @@ void add_key(int new_key)
   player_status->set_keys(new_key);
 }
 
+void debug_collrects(bool enable)
+{
+  Sector::show_collrects = enable;
+}
+
 void save_state()
 {
   if(World::current() == NULL)