From eb4922fc429764504a7e94e8c712c368c51685f2 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 23 Nov 2022 15:33:38 +0100 Subject: scenery: add table --- editor/app.cpp | 3 ++- editor/app.hpp | 2 +- editor/update.cpp | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'editor') 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 M; ImGuiIntegration::Context _imgui{NoCreate}; std::shared_ptr _floor1, _floor2, _wall1, _wall2; - std::shared_ptr _door; + std::shared_ptr _door, _table; GL::Texture2D _wireframe_texture = wireframe::make_constant_texture(); wireframe_mesh _wireframe_quad {_wireframe_texture}; wireframe_mesh _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(); } -- cgit v1.2.3