summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--anim/control-panel.json44
-rw-r--r--anim/control-panel.tgabin0 -> 15047 bytes
-rw-r--r--editor/app.cpp3
-rw-r--r--editor/app.hpp2
-rw-r--r--editor/update.cpp1
5 files changed, 48 insertions, 2 deletions
diff --git a/anim/control-panel.json b/anim/control-panel.json
new file mode 100644
index 00000000..e7f372a2
--- /dev/null
+++ b/anim/control-panel.json
@@ -0,0 +1,44 @@
+{
+ "actionframe": 0,
+ "anim_name": "",
+ "fps": 24,
+ "groups": [
+ {
+ "frames": [
+ {
+ "ground": "17 x 66",
+ "offset": "0 x 0",
+ "size": "41 x 78"
+ }
+ ],
+ "ground": "17 x 66",
+ "name": "n",
+ "offset": [
+ 0,
+ -32,
+ 8
+ ]
+ },
+ {
+ "frames": [
+ {
+ "ground": "23 x 66",
+ "offset": "0 x 78",
+ "size": "41 x 78"
+ }
+ ],
+ "ground": "23 x 66",
+ "name": "w",
+ "offset": [
+ -32,
+ 0,
+ 8
+ ]
+ }
+ ],
+ "height": 0,
+ "nframes": 1,
+ "object_name": "control-panel",
+ "pixel_size": "41 x 156",
+ "width": 41
+}
diff --git a/anim/control-panel.tga b/anim/control-panel.tga
new file mode 100644
index 00000000..537d6de5
--- /dev/null
+++ b/anim/control-panel.tga
Binary files differ
diff --git a/editor/app.cpp b/editor/app.cpp
index 4fcc051b..9a897d57 100644
--- a/editor/app.cpp
+++ b/editor/app.cpp
@@ -17,7 +17,8 @@ app::app(fm_settings&& opts) :
_wall1{loader.tile_atlas("wood2", {2, 1})},
_wall2{loader.tile_atlas("wood1", {2, 1})},
_door{loader.anim_atlas("door-close")},
- _table{loader.anim_atlas("table")}
+ _table{loader.anim_atlas("table")},
+ _control_panel(loader.anim_atlas("control-panel"))
{
world& w = M->world();
chunk_coords coord{0 ,0};
diff --git a/editor/app.hpp b/editor/app.hpp
index aac86d76..381b4c83 100644
--- a/editor/app.hpp
+++ b/editor/app.hpp
@@ -114,7 +114,7 @@ private:
Containers::Pointer<floormat_main> M;
ImGuiIntegration::Context _imgui{NoCreate};
std::shared_ptr<tile_atlas> _floor1, _floor2, _wall1, _wall2;
- std::shared_ptr<anim_atlas> _door, _table;
+ std::shared_ptr<anim_atlas> _door, _table, _control_panel;
GL::Texture2D _wireframe_texture = wireframe::make_constant_texture();
wireframe_mesh<wireframe::quad_floor> _wireframe_quad {_wireframe_texture};
wireframe_mesh<wireframe::quad_wall_n> _wireframe_wall_n {_wireframe_texture};
diff --git a/editor/update.cpp b/editor/update.cpp
index 15d99d39..9e479050 100644
--- a/editor/update.cpp
+++ b/editor/update.cpp
@@ -32,6 +32,7 @@ void app::maybe_initialize_chunk_(const chunk_coords& pos, chunk& c)
c[{K+1, K }].wall_west() = { _wall2, 0 };
c[{K+3, K+1}].scenery() = { scenery::door, rotation::N, _door, false };
c[{ 3, 4 }].scenery() = { scenery::generic, rotation::N, _table };
+ c[{K, K+1}].scenery() = { scenery::generic, rotation::N, _control_panel, true };
c.mark_modified();
}