summaryrefslogtreecommitdiffhomepage
path: root/src/scenery.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-03-01 12:32:37 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-03-01 12:32:37 +0100
commit7ebee3863c061b1d0b64839b56bbc70ff4e5d924 (patch)
treeac0356bdcbf9f77864cb2cb2a6b5f2798c6fb3db /src/scenery.hpp
parent078c376b6255fb6fd24362b27862819444327265 (diff)
move scenery modify logic to scenery_ref
Diffstat (limited to 'src/scenery.hpp')
-rw-r--r--src/scenery.hpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/scenery.hpp b/src/scenery.hpp
index 5fe2f043..7d2cb502 100644
--- a/src/scenery.hpp
+++ b/src/scenery.hpp
@@ -49,11 +49,6 @@ struct scenery final
Vector2b offset, Vector2b bbox_offset, Vector2ub bbox_size);
bool operator==(const scenery&) const noexcept;
-
- bool can_activate(const anim_atlas& anim) const noexcept;
- bool activate(const anim_atlas& atlas);
- void update(float dt, const anim_atlas& anim);
- void rotate(rotation r);
};
constexpr scenery::scenery() noexcept : scenery{scenery::none_tag_t{}} {}
@@ -100,6 +95,11 @@ struct scenery_ref final {
std::shared_ptr<anim_atlas>& atlas;
scenery& frame;
+ bool can_activate() noexcept;
+ bool activate();
+ void update(float dt);
+ void rotate(rotation r);
+
private:
struct chunk* c;
std::uint8_t idx;