summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--serialize/savegame.cpp (renamed from serialize/world-writer.cpp)6
-rw-r--r--serialize/world-impl.hpp34
-rw-r--r--serialize/world-reader.cpp5
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);
}