summaryrefslogtreecommitdiffhomepage
path: root/test/serializer.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-05-30 16:20:01 +0200
committerStanislaw Halik <sthalik@misaki.pl>2023-05-30 16:20:01 +0200
commit25acfd26024bf4d1ab806c1b3cbc885118b0eb7b (patch)
treea56047b16732eee9a689588970c5d61d296614b5 /test/serializer.cpp
parent64dcfaca1548a669c93fae686cacd634048cb2ea (diff)
add light entity serialization
Diffstat (limited to 'test/serializer.cpp')
-rw-r--r--test/serializer.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/serializer.cpp b/test/serializer.cpp
index 75b0c13c..5d883ac1 100644
--- a/test/serializer.cpp
+++ b/test/serializer.cpp
@@ -3,6 +3,7 @@
#include "loader/loader.hpp"
#include "src/scenery.hpp"
#include "src/character.hpp"
+#include "src/light.hpp"
#include "src/tile-atlas.hpp"
#include "src/anim-atlas.hpp"
#include "src/tile-iterator.hpp"
@@ -77,6 +78,13 @@ void assert_chunks_equal(const chunk& a, const chunk& b)
fm_assert(p1 == p2);
break;
}
+ case entity_type::light: {
+ const auto& e1 = static_cast<const light&>(ae);
+ const auto& e2 = static_cast<const light&>(be);
+ const auto p1 = light_proto(e1), p2 = light_proto(e2);
+ fm_assert(p1 == p2);
+ break;
+ }
default:
fm_abort("invalid entity type '%d'", (int)ae.type());
}