diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-16 21:51:07 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-16 21:51:07 +0200 |
commit | 7ab99aabe8509e84b9b5b04aafa1e1ae20b40512 (patch) | |
tree | e86c02ccaa195b0dc239ff04e50f9efa8cb54a34 /main/editor.cpp | |
parent | 0db5306c483c718076b14349f223840cce2862bd (diff) |
a
Diffstat (limited to 'main/editor.cpp')
-rw-r--r-- | main/editor.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/main/editor.cpp b/main/editor.cpp index 58b1e14a..e95bc6e3 100644 --- a/main/editor.cpp +++ b/main/editor.cpp @@ -5,6 +5,7 @@ #include "random.hpp" #include "compat/assert.hpp" #include "compat/unreachable.hpp" +#include "src/tile-defs.hpp" #include <filesystem> #include <vector> @@ -117,12 +118,23 @@ std::optional<std::tuple<std::shared_ptr<tile_atlas>, std::uint8_t>> tile_type:: case sel_none: return std::nullopt; case sel_tile: return _selected_tile; case sel_perm: return get_selected_perm(); - default: unreachable(); + default : unreachable(); } } -editor_state::editor_state() +editor::editor() { } +void editor::click_at_tile(Vector2 pos, int mouse_button) +{ + if (mouse_button == 0) + { + if (pos[0] >= 0 && pos[1] >= 0 && pos[0] < TILE_MAX_DIM && pos[1] < TILE_MAX_DIM) + { + + } + } +} + } // namespace floormat |