- updated TODO
[supertux.git] / src / camera.h
index 453a06a..648084e 100644 (file)
 #include <cassert>
 
 class LispReader;
-class Player;
-class Level;
+class Sector;
 
 class Camera : public GameObject, public Serializable
 {
 public:
-  Camera(Player* player = 0, Level* level = 0);
+  Camera(Sector* sector);
   virtual ~Camera();
 
-  /** transforms a coordinate in world space to screen space.
-   * Basically you have to apply this function to each coordinate that you want
-   * to display on screen.
-   */
-  Vector world2screen(const Vector& worldpos) const
-  {
-    return worldpos - translation;                   
-  }                                                  
-
   /// parse camera mode from lisp file
   void read(LispReader& reader);
   /// write camera mode to a lisp file
   virtual void write(LispWriter& writer);
 
-  /** returns the current translation (=scroll) vector of the viewport */
-  const Vector& get_translation() const
-  { return translation; }
-  /** set the curren translation vector of the viewport */
-  void set_translation(const Vector& translation);
+  /// reset camera postion
+  virtual void reset(const Vector& tuxpos);
+
+  /** @deprecated@ */
+  const Vector& get_translation() const;
 
   virtual void action(float elapsed_time);
 
+  virtual void draw(DrawingContext& context)
+  {
+    (void) context;
+  }
+
   enum CameraMode
   {
     NORMAL, AUTOSCROLL, MANUAL
@@ -75,8 +70,7 @@ private:
     
   Vector translation;
 
-  Player* player;
-  Level* level;
+  Sector* sector;
 
   // normal mode
   bool do_backscrolling;