summaryrefslogtreecommitdiffhomepage
path: root/src/scenery.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-03-05 21:04:20 +0100
committerStanislaw Halik <sthalik@misaki.pl>2024-03-05 21:56:56 +0100
commit71d8fa55ab671ae152c420738b2d9d49f8f1106d (patch)
treea4ad0eb37840245622b99ee49c1d555ccb238b02 /src/scenery.cpp
parenta56a8cc899dc90701f1690051da4e4318e95566c (diff)
clean up timer & nanosecond includes
Diffstat (limited to 'src/scenery.cpp')
-rw-r--r--src/scenery.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/scenery.cpp b/src/scenery.cpp
index aa558f52..fc018107 100644
--- a/src/scenery.cpp
+++ b/src/scenery.cpp
@@ -1,14 +1,13 @@
#include "scenery.hpp"
+#include "compat/assert.hpp"
+#include "compat/exception.hpp"
#include "tile-constants.hpp"
#include "anim-atlas.hpp"
-#include "chunk.hpp"
-#include "compat/assert.hpp"
+#include "rotation.inl"
+#include "nanosecond.hpp"
#include "world.hpp"
#include "shaders/shader.hpp"
-#include "src/rotation.inl"
-#include "compat/exception.hpp"
-#include "src/timer.hpp"
-#include <algorithm>
+#include <mg/Functions.h>
namespace floormat {
@@ -103,7 +102,7 @@ void door_scenery::update(scenery& s, size_t, Ns dt)
else
p = pass_mode::see_through;
s.set_bbox(s.offset, s.bbox_offset, s.bbox_size, p);
- const auto new_frame = (uint16_t)std::clamp(fr, 0, nframes-1);
+ const auto new_frame = (uint16_t)Math::clamp(fr, 0, nframes-1);
//Debug{} << "frame" << new_frame << nframes-1;
s.frame = new_frame;
if (!active)