diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2023-05-30 16:20:01 +0200 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-05-30 16:20:01 +0200 |
| commit | 25acfd26024bf4d1ab806c1b3cbc885118b0eb7b (patch) | |
| tree | a56047b16732eee9a689588970c5d61d296614b5 /test | |
| parent | 64dcfaca1548a669c93fae686cacd634048cb2ea (diff) | |
add light entity serialization
Diffstat (limited to 'test')
| -rw-r--r-- | test/save/quicksave - Copy (0024).dat | bin | 0 -> 4030 bytes | |||
| -rw-r--r-- | test/save/quicksave - Copy (0025).dat | bin | 0 -> 3994 bytes | |||
| -rw-r--r-- | test/serializer.cpp | 8 |
3 files changed, 8 insertions, 0 deletions
diff --git a/test/save/quicksave - Copy (0024).dat b/test/save/quicksave - Copy (0024).dat Binary files differnew file mode 100644 index 00000000..35990eeb --- /dev/null +++ b/test/save/quicksave - Copy (0024).dat diff --git a/test/save/quicksave - Copy (0025).dat b/test/save/quicksave - Copy (0025).dat Binary files differnew file mode 100644 index 00000000..a6957b33 --- /dev/null +++ b/test/save/quicksave - Copy (0025).dat 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()); } |
