summaryrefslogtreecommitdiffhomepage
path: root/editor/editor.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-10-30 19:54:20 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-10-30 19:54:20 +0100
commit7453d878cc1d7549d908414aefd31fb1ac360ccb (patch)
tree3e6d056a56a59bc54af52fc7bb3d744f1fdf5644 /editor/editor.cpp
parentae91983d0a6166910f44e0dc9a151a80359e1908 (diff)
editor: random krap
Diffstat (limited to 'editor/editor.cpp')
-rw-r--r--editor/editor.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/editor/editor.cpp b/editor/editor.cpp
index dca7cfe0..d132574b 100644
--- a/editor/editor.cpp
+++ b/editor/editor.cpp
@@ -160,34 +160,33 @@ void tile_editor::place_tile(world& world, global_coords pos, tile_image& img)
break;
case editor_mode::select:
break;
- case editor_mode::floor: {
+ case editor_mode::floor:
t.ground = {atlas, variant };
break;
- }
- case editor_mode::walls: {
+ case editor_mode::walls:
break; // todo
}
- }
}
-void tile_editor::rotate_tile()
+void tile_editor::toggle_rotation()
{
- if (_rotation == rotation::rot_W)
- _rotation = rotation::rot_N;
+ if (_rotation == editor::rotation_W)
+ _rotation = editor::rotation_N;
else
- _rotation = rotation::rot_W;
+ _rotation = editor::rotation_W;
}
-void tile_editor::rotate_tile(rotation r)
+void tile_editor::set_rotation(editor_wall_rotation r)
{
switch (r)
{
default:
fm_warn_once("invalid rotation '0x%hhx", r);
return;
- case rotation::rot_W:
- case rotation::rot_N:
+ case editor::rotation_W:
+ case editor::rotation_N:
_rotation = r;
+ break;
}
}