#pragma once #include "editor-enums.hpp" #include "src/rotation.hpp" #include "src/global-coords.hpp" #include #include namespace floormat { struct world; class wall_atlas; class wall_editor { std::map> _atlases; std::shared_ptr _selected_atlas; rotation _r = rotation::N; 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 get_selected() const { return _selected_atlas; } void select_atlas(const std::shared_ptr& atlas); void clear_selection(); bool is_atlas_selected(const std::shared_ptr& atlas) const; bool is_anything_selected() const; void place_tile(world& w, global_coords coords, const std::shared_ptr& atlas); editor_snap_mode check_snap(int mods) const; }; } // namespace floormat