#include <vector>
#include <cassert>
-#include "defines.h"
#include "math/vector.h"
-#include "special/game_object.h"
+#include "game_object.h"
#include "video/drawing_context.h"
#include "serializable.h"
+#include "timer.h"
using namespace SuperTux;
-
-namespace SuperTux {
-class LispReader;
+namespace lisp {
+class Lisp;
}
class Sector;
virtual ~Camera();
/// parse camera mode from lisp file
- void parse(LispReader& reader);
+ void parse(const lisp::Lisp& reader);
/// write camera mode to a lisp file
- virtual void write(LispWriter& writer);
+ virtual void write(lisp::Writer& writer);
/// reset camera postion
virtual void reset(const Vector& tuxpos);
{
}
+ // shake camera in a direction 1 time
+ void shake(float speed, float x, float y);
+
void set_scrolling(int scroll_x, int scroll_y)
{
translation.x = scroll_x;
void scroll_normal(float elapsed_time);
void scroll_autoscroll(float elapsed_time);
void keep_in_bounds();
+ void shake();
enum LeftRightScrollChange
{
size_t auto_idx;
float auto_t;
Vector current_dir;
+
+ // shaking
+ Timer2 shaketimer;
+ float shakespeed;
+ float shakedepth_x;
+ float shakedepth_y;
};
#endif /*SUPERTUX_CAMERA_H*/