summaryrefslogtreecommitdiff
path: root/src/common.hpp
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2017-10-09 22:51:50 +0200
committerPaweł Redman <pawel.redman@gmail.com>2017-10-09 22:51:50 +0200
commitff4929c650e6ed446b6faff9f6b0f078d0a3644c (patch)
tree932671a8f9e06d0add2fb2ae9c0f542bd3980304 /src/common.hpp
parent8d6cb03cd83b9f6576909058601af54f16c8acfe (diff)
Initial work on entities.
Diffstat (limited to 'src/common.hpp')
-rw-r--r--src/common.hpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/common.hpp b/src/common.hpp
index 2dd7c45..6a30f9e 100644
--- a/src/common.hpp
+++ b/src/common.hpp
@@ -78,11 +78,15 @@ namespace world {
world_t *parent_world;
std::vector<sector_t*> parents;
+ void link_to_sector(sector_t *sector);
+
public:
- sf::Vector2f origin, size;
+ sf::FloatRect bounds;
void link(world_t *world);
void unlink();
+
+ virtual void render(sf::RenderWindow *window) = 0;
};
}
@@ -91,9 +95,15 @@ namespace game {
world::world_t world;
public:
+ void start(void);
void tick(void);
void render(sf::RenderWindow *window_);
};
+
+ class human_t : public world::entity_t {
+ public:
+ void render(sf::RenderWindow *window);
+ };
}
namespace interface {