summaryrefslogtreecommitdiffhomepage
path: root/wall-tileset-tool
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-11-05 07:39:06 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-11-05 07:39:06 +0100
commit98da53beb78d9a617a1c66b404e9a7d8469a443a (patch)
treee708c5133ea5705d402b31b16aadcb24ec25b6c1 /wall-tileset-tool
parent8cd318bc55e9d1588307999618a0d8bef09f9f68 (diff)
a
Diffstat (limited to 'wall-tileset-tool')
-rw-r--r--wall-tileset-tool/main.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/wall-tileset-tool/main.cpp b/wall-tileset-tool/main.cpp
index 511ef4c2..5863bdf4 100644
--- a/wall-tileset-tool/main.cpp
+++ b/wall-tileset-tool/main.cpp
@@ -11,6 +11,7 @@
#include <Corrade/Containers/TripleStl.h>
#include <Corrade/Utility/Path.h>
#include <Corrade/Utility/Arguments.h>
+#include <nlohmann/json.hpp>
#include <opencv2/core/mat.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/imgcodecs/imgcodecs.hpp>
@@ -22,6 +23,18 @@ using namespace std::string_literals;
namespace {
+wall_atlas_def read_atlas_def(const nlohmann::json& j)
+{
+ auto val = wall_atlas_def{};
+ auto& info = val.info;
+ info.name = std::string(j["name"s]);
+ info.depth = j["depth"s];
+
+ fm_assert(loader.check_atlas_name(info.name));
+
+ return val;
+}
+
struct options
{
String input_dir, input_file, output_dir;