projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add code to debug collision rectangles
[supertux.git]
/
src
/
scripting
/
functions.cpp
diff --git
a/src/scripting/functions.cpp
b/src/scripting/functions.cpp
index
4856d36
..
d872740
100644
(file)
--- a/
src/scripting/functions.cpp
+++ b/
src/scripting/functions.cpp
@@
-36,6
+36,7
@@
#include "mainloop.hpp"
#include "worldmap.hpp"
#include "world.hpp"
#include "mainloop.hpp"
#include "worldmap.hpp"
#include "world.hpp"
+#include "sector.hpp"
#include "squirrel_error.hpp"
#include "wrapper_util.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);
}
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);
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);
}
player_status->set_keys(new_key);
}
+void debug_collrects(bool enable)
+{
+ Sector::show_collrects = enable;
+}
+
void save_state()
{
if(World::current() == NULL)
void save_state()
{
if(World::current() == NULL)