From 07779fb0e78f5955c58736cab474a50973b9e683 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 23 Jan 2024 09:19:06 +0100 Subject: a --- serialize/old-savegame.cpp | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/serialize/old-savegame.cpp b/serialize/old-savegame.cpp index 9c5f7090..d63447a4 100644 --- a/serialize/old-savegame.cpp +++ b/serialize/old-savegame.cpp @@ -14,7 +14,6 @@ #include "src/rotation.hpp" #include "src/object-type.hpp" #include -#include #include #include #include @@ -62,12 +61,9 @@ template struct int_traits { static constexpr T max = namespace { -#define file_magic ".floormat.save" - constexpr inline proto_t proto_version = 19; constexpr inline size_t atlas_name_max = 128; -constexpr inline auto null_atlas = (atlasid)-1LL; constexpr inline size_t critter_name_max = 128; constexpr inline size_t string_max = 512; @@ -85,9 +81,6 @@ template constexpr T lowbits = N == sizeof(T)*8 ? (T)-1 : T((T{1} << N)-T{1}); constexpr inline uint8_t meta_short_scenery_bit = highbits; -constexpr inline uint8_t meta_rotation_bits = highbits; -constexpr inline uint8_t scenery_id_flag_mask = meta_short_scenery_bit | meta_rotation_bits; -constexpr inline uint8_t scenery_id_max = int_traits::max & ~scenery_id_flag_mask; } // namespace @@ -110,15 +103,6 @@ namespace floormat { namespace { -struct FILE_raii final { - FILE_raii(FILE* s) noexcept : s{s} {} - ~FILE_raii() noexcept { close(); } - operator FILE*() noexcept { return s; } - void close() noexcept { if (s) ::fclose(s); s = nullptr; } -private: - FILE* s; -}; - } // namespace } // namespace floormat -- cgit v1.2.3