summaryrefslogtreecommitdiffhomepage
path: root/src/object.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-05-02 16:34:05 +0200
committerStanislaw Halik <sthalik@misaki.pl>2024-05-02 22:35:39 +0200
commit6abcd7d52cda334c58ec999d212491fc24f13c9d (patch)
tree86998508afe8eb7447ad70a2d5beebdbc9995a8f /src/object.hpp
parent03b67a512ec9ef1cf5c337aa5c47a5a76d4a8a61 (diff)
script lifecycle mostly implemented
Diffstat (limited to 'src/object.hpp')
-rw-r--r--src/object.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/object.hpp b/src/object.hpp
index 9d842572..d2607626 100644
--- a/src/object.hpp
+++ b/src/object.hpp
@@ -97,6 +97,10 @@ struct object
requires std::is_unsigned_v<T>
static uint32_t alloc_frame_time(const Ns& dt, T& accum, uint32_t hz, float speed);
+ virtual void init_script(const std::shared_ptr<object>& ptr);
+ virtual void destroy_script_pre(const std::shared_ptr<object>& ptr, script_destroy_reason r);
+ virtual void destroy_script_post();
+
protected:
object(object_id id, class chunk& c, const object_proto& proto);
void set_bbox_(Vector2b offset, Vector2b bbox_offset, Vector2ub bbox_size, pass_mode pass);