aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/headers/Tile.hpp
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2018-02-12 19:31:00 +0100
committerNao Pross <naopross@thearcway.org>2018-02-12 19:31:00 +0100
commit6a1ad62b26698e2483a7ec692c60f6cc3fa76561 (patch)
tree9738ac38f2badd87589481a63116b440ee5c9d3c /src/main/headers/Tile.hpp
parentEdit makefile to build and run c++ by default (diff)
downloadSubconscious-old-6a1ad62b26698e2483a7ec692c60f6cc3fa76561.tar.gz
Subconscious-old-6a1ad62b26698e2483a7ec692c60f6cc3fa76561.zip
Add Actor* member to tiles and implement Map::moveActor()
Diffstat (limited to '')
-rw-r--r--src/main/headers/Tile.hpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/headers/Tile.hpp b/src/main/headers/Tile.hpp
index 7292fde..919badc 100644
--- a/src/main/headers/Tile.hpp
+++ b/src/main/headers/Tile.hpp
@@ -1,6 +1,8 @@
#ifndef TILE_HPP
#define TILE_HPP
+#include "Actor.hpp"
+
struct Tile
{
enum Type
@@ -12,6 +14,15 @@ struct Tile
const int x, y;
Tile(Type _type, int _x, int _y) : type(_type), x(_x), y(_y) {}
+
+ Actor* actor() { return _actor; }
+ bool actor(Actor *actor);
+
+ void clearActor() { _actor = nullptr; }
+
+private:
+ Actor *_actor = nullptr;
+
};
#endif