camera can move now
[supertux.git] / src / scripting / functions.hpp
1 #ifndef __FUNCTIONS_H__
2 #define __FUNCTIONS_H__
3
4 #ifndef SCRIPTING_API
5 #define __suspend
6 #include "player_status.hpp"
7 #endif
8
9 namespace Scripting
10 {
11
12 //TODO: Get this from PlayerStatus (update MiniSwig!)
13 static const int KEY_BRASS  = 0x001;
14 static const int KEY_IRON   = 0x002;
15 static const int KEY_BRONZE = 0x004;
16 static const int KEY_SILVER = 0x008;
17 static const int KEY_GOLD   = 0x010;
18
19 /** displays a text file and scrolls it over the screen */
20 void display_text_file(const std::string& filename);
21 /**
22  * Suspends the script execution for the specified number of seconds
23  */
24 void wait(float seconds) __suspend;
25 /** translates a give text into the users language (by looking it up in the .po
26  * files)
27  */
28 std::string translate(const std::string& text);
29 /** load a script file and executes it 
30  * This is typically used to import functions from external files.
31  */
32 void import(HSQUIRRELVM v, const std::string& filename);
33 /** add a key to the inventory
34  */
35 void add_key(int new_key);
36
37 }
38
39 #endif
40