#ifndef MAP_MAPSTATE_H_
#define MAP_MAPSTATE_H_
+namespace common {
+ struct GameConfig;
+}
+namespace map {
+ class Map;
+ class Trigger;
+}
+
#include "Entity.h"
-#include "fwd.h"
#include "../app/State.h"
-#include "../common/fwd.h"
#include "../common/ScriptHost.h"
#include "../common/ScriptRunner.h"
+#include "../math/Fixed.h"
#include "../math/Vector.h"
#include "../graphics/Camera.h"
public:
virtual void HandleEvents(const app::Input &);
- virtual void UpdateWorld(float deltaT);
+ virtual void UpdateWorld(Uint32 deltaT);
virtual void Render(SDL_Surface *);
public:
void AddEntity(Entity *e) { entities.push_back(e); }
void ControlEntity(Entity *e) { controlled = e; camera.SetTarget(&e->Position()); }
- void SetWalkingSpeed(float s) { walkingSpeed = s; }
+ void SetWalkingSpeed(math::Fixed<8> s) { walkingSpeed = s; }
void Transition(Map *, const math::Vector<int> &coordinates);
Entity *controlled;
Entity *pushed;
common::ScriptRunner runner;
- app::Timer<float> moveTimer;
+ app::Timer<Uint32> moveTimer;
math::Vector<int> lastLock;
graphics::Camera camera;
std::vector<Entity *> entities;
- float walkingSpeed;
+ math::Fixed<8> walkingSpeed;
int nextDirection;
bool afterLock;
bool skipLock;
}
-#endif /* MAP_MAPSTATE_H_ */
+#endif