summaryrefslogtreecommitdiffhomepage
path: root/loader/scenery-cell.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-02-13 07:02:14 +0100
committerStanislaw Halik <sthalik@misaki.pl>2024-02-13 07:02:14 +0100
commit9b70fb78e70a509ba5bfa1c1d0a839eddd0902dc (patch)
tree8b662923591c273e8761787d3e74f3b659606c07 /loader/scenery-cell.cpp
parent985ce7d9b033d16f49170af8505af46ddcf29081 (diff)
wip atlas
Diffstat (limited to 'loader/scenery-cell.cpp')
-rw-r--r--loader/scenery-cell.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/loader/scenery-cell.cpp b/loader/scenery-cell.cpp
index 03fefdcc..9a4a28d4 100644
--- a/loader/scenery-cell.cpp
+++ b/loader/scenery-cell.cpp
@@ -1 +1,17 @@
#include "scenery-cell.hpp"
+#include "compat/vector-wrapper.hpp"
+#include "src/anim-atlas.hpp"
+#include "loader/loader.hpp"
+#include "serialize/json-helper.hpp"
+#include "serialize/scenery.hpp"
+
+namespace floormat {
+
+vector_wrapper<const scenery_cell> scenery_cell::load_atlases_from_json()
+{
+ char buf[fm_FILENAME_MAX];
+ auto path = loader.make_atlas_path(buf, loader.SCENERY_PATH, "scenery.json"_s);
+ return { json_helper::from_json<std::vector<scenery_cell>>(path) };
+}
+
+} // namespace floormat