5 #include "textscroller.hpp"
6 #include "functions.hpp"
7 #include "script_interpreter.hpp"
8 #include "tinygettext/tinygettext.hpp"
9 #include "resources.hpp"
10 #include "gettext.hpp"
16 void wait(float seconds)
18 ScriptInterpreter::current()->set_wakeup_time(seconds);
21 std::string translate(const std::string& text)
23 return dictionary_manager.get_dictionary().translate(text);
26 void display_text_file(const std::string& filename)
29 = ScriptInterpreter::current()->get_working_directory() + filename;
30 ::display_text_file(file);
33 void import(HSQUIRRELVM v, const std::string& filename)
36 = ScriptInterpreter::current()->get_working_directory() + filename;
37 if(sqstd_loadfile(v, file.c_str(), true) < 0) {
38 msg_warning("couldn't load script '" << filename << "' ("
44 if(sq_call(v, 1, false) < 0) {
45 msg_warning("Couldn't execute script '" << filename << "' ("
51 void add_key(int new_key)
53 player_status->set_keys(new_key);