fix
[supertux.git] / src / sector.h
index 64e2b3d..51a135b 100644 (file)
 #include "audio/musicref.h"
 #include "video/drawing_context.h"
 
-using namespace SuperTux;
-
-namespace SuperTux {
-class Rectangle;
-}
 namespace lisp {
 class Lisp;
 class Writer;
 }
 
+class Rect;
 class Sprite;
 class GameObject;
 class Player;
@@ -44,13 +40,8 @@ class Camera;
 class TileMap;
 class Bullet;
 class CollisionGrid;
-
-class SpawnPoint
-{
-public:
-  std::string name;
-  Vector pos;
-};
+class ScriptInterpreter;
+class SpawnPoint;
 
 enum MusicType {
   LEVEL_MUSIC,
@@ -76,7 +67,7 @@ public:
   void activate(const std::string& spawnpoint);
   void activate(const Vector& player_pos);
 
-  void action(float elapsed_time);
+  void update(float elapsed_time);
   void update_game_objects();
 
   void draw(DrawingContext& context);
@@ -90,7 +81,7 @@ public:
   { return name; }
 
   /// tests if a given rectangle is inside the sector
-  bool inside(const Rectangle& rectangle) const;
+  bool inside(const Rect& rectangle) const;
 
   void play_music(MusicType musictype);
   MusicType get_music_type();
@@ -104,7 +95,7 @@ public:
   bool add_smoke_cloud(const Vector& pos);
   void add_floating_text(const Vector& pos, const std::string& text);
                                                                                 
-  /** @evil@ but can't always be avoided in current design... */
+  /** get currently activated sector. */
   static Sector* current()
   { return _current; }
 
@@ -138,18 +129,20 @@ public:
 private:
   std::vector<Bullet*> bullets;
 
+  std::string init_script;
+
 public: // TODO make this private again
   typedef std::vector<GameObject*> GameObjects;
   GameObjects gameobjects;
   typedef std::vector<SpawnPoint*> SpawnPoints;
   SpawnPoints spawnpoints;                       
 
-  Rectangle get_active_region();
+  Rect get_active_region();
 
 private:
   void fix_old_tiles();
   
-  /// container for newly created objects, they'll be added in Sector::action
+  /// container for newly created objects, they'll be added in Sector::update
   GameObjects gameobjects_new;
  
   MusicType currentmusic;