summaryrefslogtreecommitdiffhomepage
path: root/editor/update.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-04-15 01:35:24 +0200
committerStanislaw Halik <sthalik@misaki.pl>2023-04-15 01:35:24 +0200
commit0ce27b41cc735b02f42fe4a67dbe8ee2f4fd2ffc (patch)
treec91e60692a2b6436334cd2f8c5f7f9b67d534673 /editor/update.cpp
parent2bb57f847acc9b611d696240423ed0aa68dcc452 (diff)
editor: cleanup hardcoded seed tile
Diffstat (limited to 'editor/update.cpp')
-rw-r--r--editor/update.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/editor/update.cpp b/editor/update.cpp
index d5eb2039..64090973 100644
--- a/editor/update.cpp
+++ b/editor/update.cpp
@@ -8,6 +8,7 @@
#include "src/character.hpp"
#include "src/tile-iterator.hpp"
#include "keys.hpp"
+#include "loader/loader.hpp"
#include <cmath>
namespace floormat {
@@ -16,12 +17,20 @@ namespace floormat {
void app::maybe_initialize_chunk_(const chunk_coords_& pos, chunk& c)
{
+ auto floor1 = loader.tile_atlas("floor-tiles", {44, 4}, pass_mode::pass);
+ auto floor2 = loader.tile_atlas("metal1", {2, 2}, pass_mode::pass);
+ auto wall1 = loader.tile_atlas("wood2", {2, 1}, pass_mode::blocked);
+ auto wall2 = loader.tile_atlas("wood1", {2, 1}, pass_mode::blocked);
+ auto door = loader.anim_atlas("door-close", loader.SCENERY_PATH);
+ auto table = loader.anim_atlas("table", loader.SCENERY_PATH);
+ auto control_panel = loader.anim_atlas("control-panel", loader.SCENERY_PATH);
+
(void)pos; (void)c;
[[maybe_unused]] constexpr auto N = TILE_MAX_DIM;
for (auto [x, k, pt] : c) {
#if 1
- const auto& atlas = _floor1;
+ const auto& atlas = floor1;
#else
const auto& atlas = pt.x == N/2 || pt.y == N/2 ? _floor2 : _floor1;
#endif