From c7a342d71ee93586b073a8e9c73b8ba6b621266f Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 18 Mar 2023 00:08:33 +0100 Subject: a --- src/entity.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/entity.cpp') diff --git a/src/entity.cpp b/src/entity.cpp index 390cf18c..ad599a1c 100644 --- a/src/entity.cpp +++ b/src/entity.cpp @@ -203,6 +203,21 @@ void entity::set_bbox_(Vector2b offset_, Vector2b bbox_offset_, Vector2ub bbox_s const_cast(pass) = pass_; } +entity::operator entity_proto() const +{ + entity_proto ret; + ret.atlas = atlas; + ret.offset = offset; + ret.bbox_offset = bbox_offset; + ret.bbox_size = bbox_size; + ret.delta = delta; + ret.frame = frame; + ret.type = entity_type::character; + ret.r = r; + ret.pass = pass; + return ret; +} + void entity::set_bbox(Vector2b offset_, Vector2b bbox_offset_, Vector2ub bbox_size_, pass_mode pass) { chunk::bbox bb0, bb; @@ -212,21 +227,6 @@ void entity::set_bbox(Vector2b offset_, Vector2b bbox_offset_, Vector2ub bbox_si c->_replace_bbox(bb0, bb, b0, b); } -entity::operator entity_proto() const -{ - entity_proto x; - x.atlas = atlas; - x.offset = offset; - x.bbox_offset = bbox_offset; - x.bbox_size = bbox_size; - x.delta = delta; - x.frame = frame; - x.type = type; - x.r = r; - x.pass = pass; - return x; -} - bool entity::can_activate(std::size_t) const { return false; } bool entity::activate(std::size_t) { return false; } -- cgit v1.2.3