X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmap%2FMapState.h;h=89d235ddd631e22e0e99e93ac0d9d1b43031f950;hb=5d1a76ae7725af998c6ee46adfe492c68ee1d34f;hp=5bbd6f856648c25bf062e2e015cf50fe2db71aeb;hpb=06db9f596cd1c5aa4c0832b387882f7c74c1b4c0;p=l2e.git diff --git a/src/map/MapState.h b/src/map/MapState.h index 5bbd6f8..89d235d 100644 --- a/src/map/MapState.h +++ b/src/map/MapState.h @@ -7,6 +7,7 @@ #include "../common/fwd.h" #include "../common/ScriptHost.h" #include "../common/ScriptRunner.h" +#include "../math/Fixed.h" #include "../math/Vector.h" #include "../graphics/Camera.h" @@ -25,14 +26,14 @@ public: 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 &coordinates); @@ -80,11 +81,11 @@ private: Entity *controlled; Entity *pushed; common::ScriptRunner runner; - app::Timer moveTimer; + app::Timer moveTimer; math::Vector lastLock; graphics::Camera camera; std::vector entities; - float walkingSpeed; + math::Fixed<8> walkingSpeed; int nextDirection; bool afterLock; bool skipLock;