diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-02-29 21:29:56 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-03-01 06:06:53 +0100 |
commit | 486e591169af724107ffaf6f24cd1e81b24529a9 (patch) | |
tree | 012ec6c07c474d4695eb5c22b47dd35cfce2767c /test/serializer.cpp | |
parent | 5afe42d6a81eeb81db08d4bd2107ac4c71f6671e (diff) |
time wip
It works now, but some functionality is lost in main/draw.cpp
Diffstat (limited to 'test/serializer.cpp')
-rw-r--r-- | test/serializer.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/serializer.cpp b/test/serializer.cpp index 44746449..cc9405ef 100644 --- a/test/serializer.cpp +++ b/test/serializer.cpp @@ -7,6 +7,7 @@ #include "src/ground-atlas.hpp" #include "src/anim-atlas.hpp" #include "src/tile-iterator.hpp" +#include "src/timer.hpp" #include <Corrade/Utility/Path.h> namespace floormat { @@ -52,15 +53,17 @@ chunk& test_app::make_test_chunk(world& w, chunk_coords_ ch) auto& e = *w.make_object<scenery>(w.make_id(), {ch, {K+3, K+1}}, door); const auto index = e.index(); const auto end = e.atlas->info().nframes-1; + constexpr auto second = Ns(1e9); + constexpr auto dt = second / 60; fm_assert(e.frame == end); { auto& x = std::get<door_scenery>(e.subtype); fm_assert(!x.active); e.activate(e.index()); fm_assert(x.active); - e.update(index, 1.f/60); + e.update(index, dt); fm_assert(e.frame != end); for (int i = 0; i < 60*3; i++) - e.update(index, 1.f/60); + e.update(index, dt); fm_assert(e.frame == 0); fm_assert(!x.active); } |