diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-13 20:13:07 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-13 20:13:07 +0100 |
commit | f0e70fb7da68d388370f31c0b9b8af8a152fef0c (patch) | |
tree | 49cb14d4f57b8e4df22332ffd5af105bcdc088ef | |
parent | b874b2a50ff1c84c540341797cc9d6fb9ae06d64 (diff) |
a
-rw-r--r-- | test/serializer.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/test/serializer.cpp b/test/serializer.cpp index 09ea7927..05735beb 100644 --- a/test/serializer.cpp +++ b/test/serializer.cpp @@ -36,17 +36,16 @@ chunk& test_app::make_test_chunk(world& w, chunk_coords_ ch) w.make_object<scenery>(w.make_id(), {ch, {3, 4}}, table); w.make_object<scenery>(w.make_id(), {ch, {K, K+1}}, control_panel); -#if 0 const auto add_player = [&](StringView name, Vector2i coord, bool playable) { critter_proto cproto; cproto.name = name; cproto.playable = playable; - w.make_object<critter>(w.make_id(), global_coords{ch, {coord.x(), coord.y()}}, cproto); + auto& p = *w.make_object<critter>(w.make_id(), global_coords{ch, {coord.x(), coord.y()}}, cproto); + p.frame = (uint16_t)coord.x(); }; - add_player("Player 1", {10, 9}, true); - add_player("Player 2", {10, 9}, false); - add_player("Player 3", {10, 9}, true); -#endif + add_player("Player 1", {13, 11}, true); + add_player("Player 2", {14, 11}, false); + add_player("Player 3", {15, 11}, true); { auto& e = *w.make_object<scenery>(w.make_id(), {ch, {K+3, K+1}}, door); @@ -62,7 +61,6 @@ chunk& test_app::make_test_chunk(world& w, chunk_coords_ ch) e.update(index, 1.f/60); fm_assert(e.frame == 0); fm_assert(!e.active); - } return c; } |