summaryrefslogtreecommitdiffhomepage
path: root/editor/editor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor.cpp')
-rw-r--r--editor/editor.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/editor/editor.cpp b/editor/editor.cpp
index bea41116..ea48eb00 100644
--- a/editor/editor.cpp
+++ b/editor/editor.cpp
@@ -170,6 +170,27 @@ void tile_editor::place_tile(world& world, global_coords pos, tile_image& img)
}
}
+void tile_editor::rotate_tile()
+{
+ if (_rotation == rotation::rot_W)
+ _rotation = rotation::rot_N;
+ else
+ _rotation = rotation::rot_W;
+}
+
+void tile_editor::rotate_tile(rotation r)
+{
+ switch (r)
+ {
+ default:
+ fm_warn_once("invalid rotation '0x%hhx", r);
+ return;
+ case rotation::rot_W:
+ case rotation::rot_N:
+ _rotation = r;
+ }
+}
+
editor::editor()
{
set_mode(editor_mode::floor); // TODO