diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-24 03:58:06 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-24 03:58:06 +0100 |
commit | e2076fa741ed64f49f96bbbdc89dad4497794706 (patch) | |
tree | 5aa21f306d8e68ed08a1ef41b129dfe1049cb31a /serialize | |
parent | 23afbcb7b32be0d3d64a6931a1f03034a4d62e1a (diff) |
c
Diffstat (limited to 'serialize')
-rw-r--r-- | serialize/savegame.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/serialize/savegame.cpp b/serialize/savegame.cpp index 0bc18d32..965f4fca 100644 --- a/serialize/savegame.cpp +++ b/serialize/savegame.cpp @@ -698,10 +698,22 @@ void world::serialize(StringView filename) namespace { template<atlas_type Type> struct atlas_from_type; -template<> struct atlas_from_type<atlas_type::ground> { using Type = ground_atlas; static StringView name(void* ptr) { return reinterpret_cast<Type*>(ptr)->name(); } }; -template<> struct atlas_from_type<atlas_type::wall> { using Type = wall_atlas; static StringView name(void* ptr) { return reinterpret_cast<Type*>(ptr)->name(); }}; -template<> struct atlas_from_type<atlas_type::anim> { using Type = anim_atlas; static StringView name(void* ptr) { return reinterpret_cast<Type*>(ptr)->name(); } }; -template<> struct atlas_from_type<atlas_type::vobj> { using Type = anim_atlas; static StringView name(void* ptr) { return reinterpret_cast<Type*>(ptr)->name(); } }; +template<> struct atlas_from_type<atlas_type::ground> { + using Type = ground_atlas; + static StringView name(void* ptr) { return reinterpret_cast<Type*>(ptr)->name(); } +}; +template<> struct atlas_from_type<atlas_type::wall> { + using Type = wall_atlas; + static StringView name(void* ptr) { return reinterpret_cast<Type*>(ptr)->name(); } +}; +template<> struct atlas_from_type<atlas_type::anim> { + using Type = anim_atlas; + static StringView name(void* ptr) { return reinterpret_cast<Type*>(ptr)->name(); } +}; +template<> struct atlas_from_type<atlas_type::vobj> { + using Type = anim_atlas; + static StringView name(void* ptr) { return reinterpret_cast<Type*>(ptr)->name(); } +}; struct reader final : visitor_<reader> { |