* svn:ignored .externalToolBuilders in root directory (Eclipse+CDT)
[supertux.git] / src / scripting / script_interpreter.h
index 73f596b..c4ecabc 100644 (file)
@@ -13,11 +13,13 @@ class Sector;
 class ScriptInterpreter : public GameObject
 {
 public:
-  ScriptInterpreter(Sector* sector);
+  ScriptInterpreter(const std::string& working_dir);
   ~ScriptInterpreter();
 
+  void register_sector(Sector* sector);
+
   void draw(DrawingContext& );
-  void action(float );
+  void update(float );
 
   void load_script(std::istream& in, const std::string& sourcename = "");
   void start_script();
@@ -32,11 +34,18 @@ public:
     return _current;
   }
 
+  const std::string& get_working_directory() const
+  {
+      return working_directory;
+  }
+
 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;
 };