summaryrefslogtreecommitdiffhomepage
path: root/src/object.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-03-23 05:58:29 +0100
committerStanislaw Halik <sthalik@misaki.pl>2024-03-23 07:42:30 +0100
commitc69de61bf3873e5de4bb035ee965881a99789142 (patch)
tree80937253965344272c4b9f16448215d1ad433145 /src/object.hpp
parent9f6d6555a2999256d5eceddca1d16329c401804c (diff)
src/object: use forward declaration for dt
Diffstat (limited to 'src/object.hpp')
-rw-r--r--src/object.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/object.hpp b/src/object.hpp
index 4ada39d4..7b9ab019 100644
--- a/src/object.hpp
+++ b/src/object.hpp
@@ -71,7 +71,7 @@ struct object
virtual object_type type() const noexcept = 0;
virtual bool can_activate(size_t i) const;
virtual bool activate(size_t i);
- virtual void update(size_t i, Ns dt) = 0;
+ virtual void update(size_t i, const Ns& dt) = 0;
virtual void rotate(size_t i, rotation r);
virtual bool can_rotate(global_coords coord, rotation new_r, rotation old_r, Vector2b offset, Vector2b bbox_offset, Vector2ub bbox_size);
virtual bool can_move_to(Vector2i delta, global_coords coord, Vector2b offset, Vector2b bbox_offset, Vector2ub bbox_aize);
@@ -91,7 +91,7 @@ struct object
template<typename T>
requires std::is_unsigned_v<T>
- static uint32_t alloc_frame_time(Ns dt, T& accum, uint32_t hz, float speed);
+ static uint32_t alloc_frame_time(const Ns& dt, T& accum, uint32_t hz, float speed);
protected:
object(object_id id, class chunk& c, const object_proto& proto);