diff options
Diffstat (limited to 'editor/scenery-editor.hpp')
| -rw-r--r-- | editor/scenery-editor.hpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/editor/scenery-editor.hpp b/editor/scenery-editor.hpp new file mode 100644 index 00000000..f4b40c66 --- /dev/null +++ b/editor/scenery-editor.hpp @@ -0,0 +1,37 @@ +#pragma once +#include "src/scenery.hpp" +#include <map> +#include <memory> +#include <Corrade/Containers/StringView.h> + +namespace floormat { + +struct anim_atlas; + +struct scenery_editor final +{ + struct pair final { + std::shared_ptr<anim_atlas> atlas; + scenery s; + }; + + scenery_editor() noexcept; + + void set_rotation(enum rotation r); + enum rotation rotation() const; + void next_rotation(); + void prev_rotation(); + + void select_tile(const std::shared_ptr<anim_atlas>& atlas, enum rotation r, std::uint16_t frame); + void clear_selection(); + bool is_atlas_selected() const; + bool is_item_selected(const std::shared_ptr<anim_atlas>& atlas, enum rotation r, std::uint16_t frame) const; + +private: + void load_atlases(); + + std::map<StringView, std::shared_ptr<anim_atlas>> _atlases; + pair _selected; +}; + +} // namespace floormat |
