summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/critter.cpp2
-rw-r--r--src/object.cpp6
-rw-r--r--src/object.hpp2
-rw-r--r--src/scenery.cpp2
4 files changed, 6 insertions, 6 deletions
diff --git a/src/critter.cpp b/src/critter.cpp
index 96f7bc2a..d54882e6 100644
--- a/src/critter.cpp
+++ b/src/critter.cpp
@@ -157,7 +157,7 @@ void critter::update_movement(size_t i, Ns dt, rotation new_r)
fm_assert(is_dynamic());
const auto hz = atlas->info().fps;
- const auto nframes = allocate_frame_time<uint16_t>(dt, delta, hz, speed);
+ const auto nframes = alloc_frame_time<uint16_t>(dt, delta, hz, speed);
if (nframes == 0)
{
//static unsigned foo;
diff --git a/src/object.cpp b/src/object.cpp
index 93b80b7d..0b54a159 100644
--- a/src/object.cpp
+++ b/src/object.cpp
@@ -289,7 +289,7 @@ bool object::move_to(Magnum::Vector2i delta)
}
template<typename T> requires std::is_unsigned_v<T>
-uint32_t object::allocate_frame_time(Ns dt, T& accum, uint32_t hz, float speed)
+uint32_t object::alloc_frame_time(Ns dt, T& accum, uint32_t hz, float speed)
{
constexpr auto ns_in_sec = Ns((int)1e9);
constexpr auto accum_max = uint64_t{limits<T>::max};
@@ -319,8 +319,8 @@ uint32_t object::allocate_frame_time(Ns dt, T& accum, uint32_t hz, float speed)
return nframes;
}
-template uint32_t object::allocate_frame_time(Ns dt, uint16_t& accum, uint32_t hz, float speed);
-template uint32_t object::allocate_frame_time(Ns dt, uint32_t& accum, uint32_t hz, float speed);
+template uint32_t object::alloc_frame_time(Ns dt, uint16_t& accum, uint32_t hz, float speed);
+template uint32_t object::alloc_frame_time(Ns dt, uint32_t& accum, uint32_t hz, float speed);
void object::set_bbox_(Vector2b offset_, Vector2b bb_offset_, Vector2ub bb_size_, pass_mode pass_)
{
diff --git a/src/object.hpp b/src/object.hpp
index 97070e75..b77b0f42 100644
--- a/src/object.hpp
+++ b/src/object.hpp
@@ -90,7 +90,7 @@ struct object
template<typename T>
requires std::is_unsigned_v<T>
- static uint32_t allocate_frame_time(Ns dt, T& accum, uint32_t hz, float speed);
+ static uint32_t alloc_frame_time(Ns dt, T& accum, uint32_t hz, float speed);
protected:
object(object_id id, class chunk& c, const object_proto& proto);
diff --git a/src/scenery.cpp b/src/scenery.cpp
index 277a76b5..aa558f52 100644
--- a/src/scenery.cpp
+++ b/src/scenery.cpp
@@ -89,7 +89,7 @@ void door_scenery::update(scenery& s, size_t, Ns dt)
fm_assert(s.atlas);
auto& anim = *s.atlas;
const auto nframes = (int)anim.info().nframes;
- const auto n = (int)s.allocate_frame_time<uint16_t>(dt, s.delta, s.atlas->info().fps, 1);
+ const auto n = (int)s.alloc_frame_time(dt, s.delta, s.atlas->info().fps, 1);
if (n == 0)
return;
const int8_t dir = closing ? 1 : -1;