Moved some console commands' implementations nearer to target classes
[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 /**
23  * Suspends the script execution for the specified number of seconds
24  */
25 void wait(float seconds) __suspend;
26
27 /** translates a give text into the users language (by looking it up in the .po
28  * files)
29  */
30 std::string translate(const std::string& text);
31
32 /** load a script file and executes it 
33  * This is typically used to import functions from external files.
34  */
35 void import(HSQUIRRELVM v, const std::string& filename);
36
37 /** add a key to the inventory
38  */
39 void add_key(int new_key);
40
41 }
42
43 #endif
44