summaryrefslogtreecommitdiffhomepage
path: root/editor/wall-editor.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/wall-editor.hpp')
-rw-r--r--editor/wall-editor.hpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/editor/wall-editor.hpp b/editor/wall-editor.hpp
index 87cfa8f7..815b91c6 100644
--- a/editor/wall-editor.hpp
+++ b/editor/wall-editor.hpp
@@ -1,10 +1,13 @@
#pragma once
+#include "editor-enums.hpp"
#include "src/rotation.hpp"
+#include "src/global-coords.hpp"
#include <memory>
#include <map>
namespace floormat {
+struct world;
class wall_atlas;
class wall_editor
@@ -13,13 +16,24 @@ class wall_editor
std::shared_ptr<wall_atlas> _selected_atlas;
rotation _r = rotation::N;
-public:
+ void load_atlases();
+public:
wall_editor();
+ StringView name() const;
enum rotation rotation() const { return _r; }
void set_rotation(enum rotation r);
void toggle_rotation();
+
+ std::shared_ptr<wall_atlas> get_selected() const { return _selected_atlas; }
+ void select_atlas(const std::shared_ptr<wall_atlas>& atlas);
+ void clear_selection();
+ bool is_atlas_selected(const std::shared_ptr<wall_atlas>& atlas) const;
+ bool is_anything_selected() const;
+
+ void place_tile(world& w, global_coords coords, const std::shared_ptr<wall_atlas>& atlas);
+ editor_snap_mode check_snap(int mods) const;
};
} // namespace floormat