summaryrefslogtreecommitdiffhomepage
path: root/src/critter.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-04-06 17:07:48 +0200
committerStanislaw Halik <sthalik@misaki.pl>2024-04-06 17:59:28 +0200
commit683b6838786b28ee3398ae9580cfaa8e003f084f (patch)
treec1b83725559aa7af2ae414378a93afd2ff7c5a7f /src/critter.hpp
parent4ef122afaedc22b4e79c1d3cae3e97e74b11208a (diff)
a
Diffstat (limited to 'src/critter.hpp')
-rw-r--r--src/critter.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/critter.hpp b/src/critter.hpp
index 30b81d33..18f714e5 100644
--- a/src/critter.hpp
+++ b/src/critter.hpp
@@ -37,6 +37,10 @@ struct critter final : object
// the beginning in editor's update world
void update_movement(size_t& i, const Ns& dt, rotation r);
void update_nonplayable(size_t& i, const Ns& dt);
+
+ struct move_result { bool blocked, moved; };
+ [[nodiscard]] move_result move_toward(size_t& i, const Ns& dt, const point& dest);
+
void set_keys(bool L, bool R, bool U, bool D);
void set_keys_auto();
Vector2 ordinal_offset(Vector2b offset) const override;