summaryrefslogtreecommitdiffhomepage
path: root/editor
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-11-21 12:01:48 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-11-21 12:28:53 +0100
commit9b063b749faedd17fd8f6d76a25d84f066a92814 (patch)
tree4bf4b7106ade3cd762281204bc1e72344bc12739 /editor
parent3ed15b56aded3a6f58ef98d0cbe17012e28e9430 (diff)
scenery work
Diffstat (limited to 'editor')
-rw-r--r--editor/scenery-editor.cpp6
-rw-r--r--editor/scenery-editor.hpp2
-rw-r--r--editor/update.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/editor/scenery-editor.cpp b/editor/scenery-editor.cpp
index 1f2fabf3..482b2131 100644
--- a/editor/scenery-editor.cpp
+++ b/editor/scenery-editor.cpp
@@ -29,7 +29,7 @@ void scenery_editor::next_rotation()
{
auto r_1 = (rotation_t)_selected.r + 1;
auto rot = (rotation_)r_1;
- if (rot >= rotation_::COUNT)
+ if (rot >= rotation_COUNT)
rot = (rotation_)0;
_selected.r = rot;
}
@@ -37,7 +37,7 @@ void scenery_editor::next_rotation()
void scenery_editor::prev_rotation()
{
if (_selected.r == (rotation_)0)
- _selected.r = (rotation_)((rotation_t)rotation_::COUNT - 1);
+ _selected.r = (rotation_)((rotation_t)rotation_COUNT - 1);
else
_selected.r = (rotation_)((rotation_t)_selected.r - 1);
}
@@ -52,7 +52,7 @@ void scenery_editor::select_tile(const std::shared_ptr<anim_atlas>& atlas, rotat
void scenery_editor::clear_selection()
{
- _selected = { nullptr, rotation_::COUNT, scenery::NO_FRAME };
+ _selected = { nullptr, rotation_COUNT, scenery::NO_FRAME };
}
auto scenery_editor::get_selected() -> pair
diff --git a/editor/scenery-editor.hpp b/editor/scenery-editor.hpp
index 9b89d2da..85ccd3be 100644
--- a/editor/scenery-editor.hpp
+++ b/editor/scenery-editor.hpp
@@ -14,7 +14,7 @@ struct scenery_editor final
struct pair final {
std::shared_ptr<anim_atlas> atlas;
- enum rotation r = rotation::COUNT;
+ enum rotation r = rotation_COUNT;
frame_t frame = scenery::NO_FRAME;
operator bool() const;
};
diff --git a/editor/update.cpp b/editor/update.cpp
index cc765268..60d012d2 100644
--- a/editor/update.cpp
+++ b/editor/update.cpp
@@ -29,7 +29,7 @@ void app::maybe_initialize_chunk_(const chunk_coords& pos, chunk& c)
c[{K, K }].wall_west() = { _wall2, 0 };
c[{K, K+1}].wall_north() = { _wall1, 0 };
c[{K+1, K }].wall_west() = { _wall2, 0 };
- c[{K+1, K+1}].scenery() = { _door, scenery{0, rotation::N} };
+ c[{K+1, K+1}].scenery() = { scenery::door, rotation::N, _door, false };
c.mark_modified();
}