diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2023-03-17 15:31:57 +0100 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-03-17 23:23:12 +0100 |
| commit | 72782ef1298deabbae0598d0d50159210ed64b27 (patch) | |
| tree | 6107108a7733b9beda77a36dea0209fe1367d8b9 /test | |
| parent | 90742e5c5abd4fb996f548e0cff6661a950057c1 (diff) | |
buffer flush (wip)
Diffstat (limited to 'test')
| -rw-r--r-- | test/serializer.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/serializer.cpp b/test/serializer.cpp index c74f4ddf..d1c78df2 100644 --- a/test/serializer.cpp +++ b/test/serializer.cpp @@ -3,6 +3,7 @@ #include "loader/loader.hpp" #include "loader/scenery.hpp" #include "src/tile-atlas.hpp" +#include "src/anim-atlas.hpp" #include <Corrade/Utility/Path.h> namespace floormat { @@ -28,9 +29,16 @@ chunk& test_app::make_test_chunk(chunk_coords ch) c[{K, K }].wall_west() = { metal2, 0 }; c[{K, K+1}].wall_north() = { metal1, 0 }; c[{K+1, K }].wall_west() = { metal2, 0 }; - w.make_entity<scenery>({ch, {K+3, K+1}}, door); w.make_entity<scenery>({ch, {3, 4}}, table); w.make_entity<scenery>({ch, {K, K+1}}, control_panel); + { + auto& e = *w.make_entity<scenery>({ch, {K+3, K+1}}, door); + auto i = e.index(); + e.activate(i); + e.update(i, 1.f/60); + fm_assert(e.active); + fm_assert(e.frame != 0 && e.frame != e.atlas->info().nframes - 1); + } return c; } |
