summaryrefslogtreecommitdiffhomepage
path: root/src/entity.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-05-10 14:11:02 +0200
committerStanislaw Halik <sthalik@misaki.pl>2023-05-11 00:33:47 +0200
commitf29ee994108bf443de4aeeabd7519f13ca4b7a4d (patch)
tree6f1ad0d719dcfcc5c5c199ce1d25c5531550835d /src/entity.cpp
parentaad0d8fd8e2d3409db1b591c6dbc401e02eaeef3 (diff)
wip virtual entity stuff
Diffstat (limited to 'src/entity.cpp')
-rw-r--r--src/entity.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/entity.cpp b/src/entity.cpp
index 93233aae..6361c118 100644
--- a/src/entity.cpp
+++ b/src/entity.cpp
@@ -29,11 +29,9 @@ entity::entity(object_id id, struct chunk& c, const entity_proto& proto) :
bbox_size{proto.bbox_size}, delta{proto.delta},
frame{proto.frame}, r{proto.r}, pass{proto.pass}
{
- if (atlas)
- {
- fm_soft_assert(atlas->check_rotation(r));
- fm_soft_assert(frame < atlas->info().nframes);
- }
+ fm_soft_assert(atlas);
+ fm_soft_assert(atlas->check_rotation(r));
+ fm_soft_assert(frame < atlas->info().nframes);
}
entity::~entity() noexcept
@@ -76,6 +74,11 @@ size_t entity::index() const
return (size_t)std::distance(es.cbegin(), it);
}
+bool entity::is_virtual() const
+{
+ return false;
+}
+
bool entity::can_rotate(global_coords coord, rotation new_r, rotation old_r, Vector2b offset, Vector2b bbox_offset, Vector2ub bbox_size)
{
if (bbox_offset.isZero() && bbox_size[0] == bbox_size[1])