diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-04 19:35:58 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-04 19:35:58 +0200 |
commit | 7493b452de349f26617171d7e90ecec6c73e0919 (patch) | |
tree | 2b8abc241dd463038123c462555d18dcde7eef3c | |
parent | 4ea49965c93948c971d7de307189bca5ec3b701c (diff) |
a
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | tile/CMakeLists.txt | 12 | ||||
-rw-r--r-- | tile/serialize.cpp | 17 | ||||
-rw-r--r-- | tile/serialize.hpp | 23 |
4 files changed, 0 insertions, 53 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e12d871e..1d4a5056 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,7 +59,6 @@ if(NOT BOOTSTRAP_DEPENDS) add_subdirectory(anim-crop-tool) add_subdirectory(anim) - add_subdirectory(tile) corrade_add_resource(game_RESOURCES resources.conf) file(GLOB sources "*.cpp" "shaders/*.cpp" CONFIGURE_ARGS) diff --git a/tile/CMakeLists.txt b/tile/CMakeLists.txt deleted file mode 100644 index 73cb2b58..00000000 --- a/tile/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -find_package(OpenCV QUIET REQUIRED COMPONENTS core imgcodecs imgproc) -find_package(nlohmann_json QUIET REQUIRED) - -set(self "${PROJECT_NAME}-tile") - -include_directories(SYSTEM PRIVATE ${OpenCV_INCLUDE_DIRS}) -link_libraries(opencv_imgproc opencv_imgcodecs opencv_core) -link_libraries(Magnum::Magnum nlohmann_json::nlohmann_json) - -file(GLOB sources "*.cpp" CONFIGURE_ARGS) -add_library(${self} STATIC ${sources}) - diff --git a/tile/serialize.cpp b/tile/serialize.cpp deleted file mode 100644 index 4043c8de..00000000 --- a/tile/serialize.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include "serialize.hpp" -#include <nlohmann/json.hpp> -#include "json-magnum.hpp" - -std::tuple<big_atlas, bool> big_atlas::from_json(const std::filesystem::path& pathname) noexcept -{ - -} - -bool big_atlas::to_json(const std::filesystem::path& pathname) noexcept -{ - -} - -NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(big_atlas_tile, position) -NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(big_atlas_entry, tiles) -NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(big_atlas, entries) diff --git a/tile/serialize.hpp b/tile/serialize.hpp deleted file mode 100644 index c28aa934..00000000 --- a/tile/serialize.hpp +++ /dev/null @@ -1,23 +0,0 @@ -#include <string> -#include <vector> -#include <tuple> -#include <unordered_map> -#include <Magnum/Magnum.h> -#include <Magnum/Math/Vector2.h> - -namespace std::filesystem { class path; } - -struct big_atlas_tile final { - Magnum::Vector2i position; -}; - -struct big_atlas_entry final { - std::vector<big_atlas_tile> tiles; -}; - -struct big_atlas final { - static std::tuple<big_atlas, bool> from_json(const std::filesystem::path& pathname) noexcept; - [[nodiscard]] bool to_json(const std::filesystem::path& pathname) noexcept; - - std::unordered_map<std::string, big_atlas_entry> entries; -}; |