summaryrefslogtreecommitdiffhomepage
path: root/editor
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-11-23 15:33:38 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-11-23 15:34:12 +0100
commiteb4922fc429764504a7e94e8c712c368c51685f2 (patch)
treedc2338c69f7811c46c8820846d62dca61271e7a7 /editor
parent62effff4a9bb2cddd515f6d6123c7ed141258ac1 (diff)
scenery: add table
Diffstat (limited to 'editor')
-rw-r--r--editor/app.cpp3
-rw-r--r--editor/app.hpp2
-rw-r--r--editor/update.cpp1
3 files changed, 4 insertions, 2 deletions
diff --git a/editor/app.cpp b/editor/app.cpp
index 9f8914f0..4fcc051b 100644
--- a/editor/app.cpp
+++ b/editor/app.cpp
@@ -16,7 +16,8 @@ app::app(fm_settings&& opts) :
_floor2{loader.tile_atlas("metal1", {2, 2})},
_wall1{loader.tile_atlas("wood2", {2, 1})},
_wall2{loader.tile_atlas("wood1", {2, 1})},
- _door{loader.anim_atlas("door-close")}
+ _door{loader.anim_atlas("door-close")},
+ _table{loader.anim_atlas("table")}
{
world& w = M->world();
chunk_coords coord{0 ,0};
diff --git a/editor/app.hpp b/editor/app.hpp
index 7a1bf89d..aac86d76 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;
+ std::shared_ptr<anim_atlas> _door, _table;
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 a253c3c4..9f347f0d 100644
--- a/editor/update.cpp
+++ b/editor/update.cpp
@@ -31,6 +31,7 @@ void app::maybe_initialize_chunk_(const chunk_coords& pos, chunk& c)
c[{K, K+1}].wall_north() = { _wall1, 0 };
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.mark_modified();
}