projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* svn:ignored .externalToolBuilders in root directory (Eclipse+CDT)
[supertux.git]
/
src
/
scripting
/
script_interpreter.h
diff --git
a/src/scripting/script_interpreter.h
b/src/scripting/script_interpreter.h
index
73f596b
..
c4ecabc
100644
(file)
--- a/
src/scripting/script_interpreter.h
+++ b/
src/scripting/script_interpreter.h
@@
-13,11
+13,13
@@
class Sector;
class ScriptInterpreter : public GameObject
{
public:
class ScriptInterpreter : public GameObject
{
public:
- ScriptInterpreter(
Sector* secto
r);
+ ScriptInterpreter(
const std::string& working_di
r);
~ScriptInterpreter();
~ScriptInterpreter();
+ void register_sector(Sector* sector);
+
void draw(DrawingContext& );
void draw(DrawingContext& );
- void
action
(float );
+ void
update
(float );
void load_script(std::istream& in, const std::string& sourcename = "");
void start_script();
void load_script(std::istream& in, const std::string& sourcename = "");
void start_script();
@@
-32,11
+34,18
@@
public:
return _current;
}
return _current;
}
+ const std::string& get_working_directory() const
+ {
+ return working_directory;
+ }
+
private:
HSQUIRRELVM v;
static ScriptInterpreter* _current;
Timer wakeup_timer;
private:
HSQUIRRELVM v;
static ScriptInterpreter* _current;
Timer wakeup_timer;
+ /// this directory is used as base for all filenames used in scripts
+ std::string working_directory;
Scripting::Sound* sound;
Scripting::Level* level;
};
Scripting::Sound* sound;
Scripting::Level* level;
};