X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmap%2FMapState.h;h=0ca5a847a5805ef37881ac2c519cc717720d6449;hb=978ccdf2644bc445c864dbe581ead365b238cff8;hp=dc352f69522636e5f2248076f6cddb59bea2a804;hpb=e02068d51f5e7f82d4d3195e9a9ce5c9d76f727d;p=l2e.git diff --git a/src/map/MapState.h b/src/map/MapState.h index dc352f6..0ca5a84 100644 --- a/src/map/MapState.h +++ b/src/map/MapState.h @@ -11,6 +11,7 @@ #include "Entity.h" #include "fwd.h" #include "../app/State.h" +#include "../common/fwd.h" #include "../geometry/Vector.h" #include "../graphics/Camera.h" @@ -22,7 +23,7 @@ class MapState : public app::State { public: - explicit MapState(Map *); + explicit MapState(common::GameConfig *, Map *); virtual ~MapState() { } public: @@ -50,25 +51,27 @@ private: void UnloadMap(); void LoadMap(Map *); - bool CheckBlocking() const; + bool CheckBlocking(); + bool CheckBlocking(const geometry::Vector &position, Entity::Orientation direction) const; void OnTileLock(); - void OnGridLock(); + bool OnGridLock(); void OnMove(bool); void UpdateFollower(Entity &); void StopFollowers(Entity &); void LockEntities(); - void CheckMonster(); - void CheckTrigger(); + bool CheckMonster(); + bool CheckTrigger(); private: + common::GameConfig *game; app::Application *ctrl; Map *map; Entity *controlled; + Entity *pushed; app::Timer moveTimer; - geometry::Vector tempTarget; geometry::Vector lastLock; graphics::Camera camera; std::vector entities; @@ -76,6 +79,7 @@ private: int nextDirection; bool afterLock; bool skipLock; + bool pushing; bool debug; };