projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
yeti summons snowballs now
[supertux.git]
/
src
/
object
/
camera.h
diff --git
a/src/object/camera.h
b/src/object/camera.h
index
45351b6
..
b913ead
100644
(file)
--- a/
src/object/camera.h
+++ b/
src/object/camera.h
@@
-23,11
+23,11
@@
#include <vector>
#include <cassert>
#include <vector>
#include <cassert>
-#include "defines.h"
#include "math/vector.h"
#include "special/game_object.h"
#include "video/drawing_context.h"
#include "serializable.h"
#include "math/vector.h"
#include "special/game_object.h"
#include "video/drawing_context.h"
#include "serializable.h"
+#include "timer.h"
using namespace SuperTux;
namespace lisp {
using namespace SuperTux;
namespace lisp {
@@
-59,6
+59,9
@@
public:
{
}
{
}
+ // 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 set_scrolling(int scroll_x, int scroll_y)
{
translation.x = scroll_x;
@@
-75,6
+78,7
@@
private:
void scroll_normal(float elapsed_time);
void scroll_autoscroll(float elapsed_time);
void keep_in_bounds();
void scroll_normal(float elapsed_time);
void scroll_autoscroll(float elapsed_time);
void keep_in_bounds();
+ void shake();
enum LeftRightScrollChange
{
enum LeftRightScrollChange
{
@@
-99,6
+103,12
@@
private:
size_t auto_idx;
float auto_t;
Vector current_dir;
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*/
};
#endif /*SUPERTUX_CAMERA_H*/