diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-23 19:16:19 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-23 19:16:19 +0200 |
commit | 1e0a52b03fe655d7073ef20703dbb2e7646f74d3 (patch) | |
tree | f1709c2e9565d78c791653e71e6a4b26b3138423 /Canvas.h | |
parent | 277157b3e06b2deeacbdbc8bf6190de19f88169d (diff) |
add XY struct for 2d points and offsets
Diffstat (limited to 'Canvas.h')
-rw-r--r-- | Canvas.h | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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; }; |