diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-20 18:30:39 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-20 18:31:41 +0100 |
commit | ad9cd66554fc2b57b56ca07f33b87fd16c4cfdab (patch) | |
tree | 43981f417c74318c13a992487dd8c4037e26bd20 | |
parent | 629aa26aa5a8d915184f101a6aee4f505ef29c27 (diff) |
w
-rw-r--r-- | serialize/savegame.cpp (renamed from serialize/world-writer.cpp) | 6 | ||||
-rw-r--r-- | serialize/world-impl.hpp | 34 | ||||
-rw-r--r-- | serialize/world-reader.cpp | 5 |
3 files changed, 8 insertions, 37 deletions
diff --git a/serialize/world-writer.cpp b/serialize/savegame.cpp index 4396b1fd..829459b7 100644 --- a/serialize/world-writer.cpp +++ b/serialize/savegame.cpp @@ -1,4 +1,3 @@ -#include "world-impl.hpp" #include "binary-writer.inl" #include "compat/defs.hpp" #include "compat/strerror.hpp" @@ -34,6 +33,11 @@ namespace floormat::Serialize { namespace { +using tilemeta = uint8_t; +using atlasid = uint32_t; +using chunksiz = uint32_t; +using proto_t = uint32_t; + constexpr inline proto_t proto_version = 20; constexpr inline auto file_magic = ".floormat.save"_s; constexpr inline auto chunk_magic = (uint16_t)0xdead; diff --git a/serialize/world-impl.hpp b/serialize/world-impl.hpp deleted file mode 100644 index 7eb6c7c9..00000000 --- a/serialize/world-impl.hpp +++ /dev/null @@ -1,34 +0,0 @@ -#pragma once -#include <cstdio> -#include <concepts> -#include <Corrade/Containers/StringView.h> - -namespace floormat::Serialize { - -using tilemeta = uint8_t; -using atlasid = uint32_t; -using chunksiz = uint32_t; -using proto_t = uint32_t; - -template<typename T> struct int_traits; - -template<std::unsigned_integral T> struct int_traits<T> { static constexpr T max = T(-1); }; -template<std::signed_integral T> struct int_traits<T> { static constexpr T max = T(-1)&~(T(1) << sizeof(T)*8-1); }; - -namespace { - - - -} // namespace - -} // namespace floormat::Serialize - -namespace floormat { - -namespace { - - - -} // namespace - -} // namespace floormat diff --git a/serialize/world-reader.cpp b/serialize/world-reader.cpp index ab196f7e..a4f33b94 100644 --- a/serialize/world-reader.cpp +++ b/serialize/world-reader.cpp @@ -1,6 +1,6 @@ -#define FM_SERIALIZE_WORLD_IMPL -#include "world-impl.hpp" +#include "compat/assert.hpp" #include "src/world.hpp" +#include <Corrade/Containers/StringView.h> #if 0 #include "binary-reader.inl" #include "src/scenery.hpp" @@ -564,6 +564,7 @@ namespace floormat { class world world::deserialize(StringView filename) { + (void)filename; fm_assert("todo" && false); } |