aboutsummaryrefslogtreecommitdiff
path: root/Canvas.h
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-23 19:16:19 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-23 19:16:19 +0200
commit1e0a52b03fe655d7073ef20703dbb2e7646f74d3 (patch)
treef1709c2e9565d78c791653e71e6a4b26b3138423 /Canvas.h
parent277157b3e06b2deeacbdbc8bf6190de19f88169d (diff)
add XY struct for 2d points and offsets
Diffstat (limited to 'Canvas.h')
-rw-r--r--Canvas.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/Canvas.h b/Canvas.h
index 6f59c15..e25c4b9 100644
--- a/Canvas.h
+++ b/Canvas.h
@@ -5,6 +5,7 @@
#include "CanvasData.h"
#include "Tile.h"
+#include "XY.h"
#include "TileBehaviorFactory.h"
#include "TileColorFactory.h"
@@ -18,7 +19,7 @@ public:
std::string to_string(bool truecolor = false);
public:
- virtual Tile & get_tile(unsigned x, unsigned y);
+ virtual Tile & get_tile(const XY &);
virtual void set_tile(TileData data);
public:
@@ -36,9 +37,9 @@ private:
private:
std::vector<Tile *> tiles;
- Museum & museum;
+ virtual Tile * & get_tile_unsafe(const XY &);
private:
- size_t pos_to_index(unsigned x, unsigned y);
+ Museum & museum;
};