diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-02-13 14:58:17 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-02-13 21:22:32 +0100 |
commit | 8f7b089e246b5e55d1cacb756da4219bb751236f (patch) | |
tree | b302742a6cdc70c393c6020bc8e3b4d1bc08d348 /loader/scenery-cell.hpp | |
parent | 9b70fb78e70a509ba5bfa1c1d0a839eddd0902dc (diff) |
scenery loader now works
Diffstat (limited to 'loader/scenery-cell.hpp')
-rw-r--r-- | loader/scenery-cell.hpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/loader/scenery-cell.hpp b/loader/scenery-cell.hpp index 28f35368..2b74cfef 100644 --- a/loader/scenery-cell.hpp +++ b/loader/scenery-cell.hpp @@ -1,19 +1,34 @@ #pragma once #include "compat/vector-wrapper-fwd.hpp" +#include "compat/safe-ptr.hpp" #include "src/scenery.hpp" #include <memory> #include <cr/String.h> +#include <cr/Optional.h> namespace floormat { +struct json_wrapper; struct scenery_proto; +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-dtor" +#endif + struct scenery_cell final { String name; - scenery_proto proto; + safe_ptr<json_wrapper> data{make_json_wrapper()}; + Optional<scenery_proto> proto; + ~scenery_cell() noexcept; static vector_wrapper<const scenery_cell> load_atlases_from_json(); + [[nodiscard]] static json_wrapper* make_json_wrapper(); }; +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + } // namespace floormat |