X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fobject%2Fcamera.hpp;h=061fe4d1b26a87313b1cdc8788f9042b75d229dc;hb=7e15c4f871809033278711a6e9327616da00c4c9;hp=8a897a572aea05839e13ac1b003f5f6ab91bd257;hpb=4653967c2e0451fa8b73232fe2ce78057efcf63d;p=supertux.git diff --git a/src/object/camera.hpp b/src/object/camera.hpp index 8a897a572..061fe4d1b 100644 --- a/src/object/camera.hpp +++ b/src/object/camera.hpp @@ -50,7 +50,7 @@ public: /// write camera mode to a lisp file virtual void write(lisp::Writer& writer); - /// reset camera postion + /// reset camera position void reset(const Vector& tuxpos); /** return camera position */ @@ -86,6 +86,11 @@ public: }; CameraMode mode; + /** + * get the coordinates of the point directly in the center of this camera + */ + Vector get_center() const; + private: void update_scroll_normal(float elapsed_time); void update_scroll_autoscroll(float elapsed_time); @@ -94,7 +99,7 @@ private: void shake(); /** - * The camera basically provides lookeahead on the left or right side + * The camera basically provides lookahead on the left or right side * or is undecided. */ enum LookaheadMode { @@ -108,6 +113,9 @@ private: // normal mode LookaheadMode lookahead_mode; float changetime; + Vector lookahead_pos; + Vector peek_pos; + Vector cached_translation; // autoscroll mode std::auto_ptr autoscroll_path;