X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmap%2FEntity.h;h=12f22c947aae0c903a2468382c0261217ae76456;hb=0fc36d261ef8129debbd4aa15594bc46cb82eb27;hp=94090a1e547806790f3bf7331303749bfc1a7568;hpb=a1c89e41e38eca790e168b8acd3beee974685fcd;p=l2e.git diff --git a/src/map/Entity.h b/src/map/Entity.h index 94090a1..12f22c9 100644 --- a/src/map/Entity.h +++ b/src/map/Entity.h @@ -38,6 +38,9 @@ public: geometry::Vector &Velocity() { return velocity; } const geometry::Vector &Velocity() const { return velocity; } + geometry::Vector &SpriteOffset() { return spriteOffset; } + const geometry::Vector &SpriteOffset() const { return spriteOffset; } + void SetAnimation(const graphics::Animation *a); void StartAnimation(app::Application &ctrl); void StartAnimation(app::State &ctrl); @@ -53,19 +56,20 @@ public: void AddFollower(Entity *); void RemoveFollower(Entity *); - bool TileLock(int width, int height) const; + bool TileLock(const geometry::Vector &tileSize) const; void Update(float deltaT); void Render(SDL_Surface *, const geometry::Vector &offset) const; private: - void UpdateVelocity();; + void UpdateVelocity(); private: Entity *follower; const graphics::Animation *animation; graphics::AnimationRunner runner; + geometry::Vector spriteOffset; geometry::Vector position; geometry::Vector velocity; Orientation orientation;