#include <vector>
#include <cassert>
+#include <memory>
#include "math/vector.hpp"
#include "game_object.hpp"
#include "video/drawing_context.hpp"
#include "serializable.hpp"
#include "timer.hpp"
-#include "object/path.hpp"
+#include "script_interface.hpp"
namespace lisp {
class Lisp;
}
class Sector;
+class Path;
+class PathWalker;
-class Camera : public GameObject, public Serializable
+class Camera : public GameObject, public Serializable, public ScriptInterface
{
public:
Camera(Sector* sector);
{
}
+ virtual void expose(HSQUIRRELVM vm, int table_idx);
+ virtual void unexpose(HSQUIRRELVM vm, int table_idx);
+
// shake camera in a direction 1 time
void shake(float speed, float x, float y);
private:
void update_scroll_normal(float elapsed_time);
- void update_scroll_autoscroll();
+ void update_scroll_autoscroll(float elapsed_time);
void update_scroll_to(float elapsed_time);
void keep_in_bounds(Vector& vector);
void shake();
LeftRightScrollChange scrollchange;
// autoscroll mode
- Path* autoscrollPath;
+ std::auto_ptr<Path> autoscroll_path;
+ std::auto_ptr<PathWalker> autoscroll_walker;
// shaking
Timer shaketimer;