summaryrefslogtreecommitdiffhomepage
path: root/src/scenery.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-08-27 15:52:23 +0200
committerStanislaw Halik <sthalik@misaki.pl>2023-08-27 17:57:30 +0200
commit364155032c228342e853c8f1661fea0c57f11c15 (patch)
treec65963cae277f67511f5b1fe07ecf8d4ddb69d56 /src/scenery.cpp
parent481fc7e9e2a58abcd1299ccdebcb4b0527b47815 (diff)
src: remove entity::update() 'bool' return value
Diffstat (limited to 'src/scenery.cpp')
-rw-r--r--src/scenery.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/scenery.cpp b/src/scenery.cpp
index ee774282..c5435137 100644
--- a/src/scenery.cpp
+++ b/src/scenery.cpp
@@ -24,18 +24,18 @@ bool scenery::can_activate(size_t) const
return atlas && interactive;
}
-bool scenery::update(size_t, float dt)
+void scenery::update(size_t, float dt)
{
auto& s = *this;
if (!s.active)
- return false;
+ return;
switch (s.sc_type)
{
default:
case scenery_type::none:
case scenery_type::generic:
- return false;
+ return;
case scenery_type::door: {
fm_assert(atlas);
auto& anim = *atlas;
@@ -50,7 +50,7 @@ bool scenery::update(size_t, float dt)
s.delta = (uint16_t)std::clamp(delta_ - frame_time*n, 0, 65535);
fm_debug_assert(s.delta >= 0);
if (n == 0)
- return false;
+ return;
const int8_t dir = s.closing ? 1 : -1;
const int fr = s.frame + dir*n;
s.active = fr > 0 && fr < nframes-1;
@@ -70,8 +70,6 @@ bool scenery::update(size_t, float dt)
//if ((p == pass_mode::pass) != (old_pass == pass_mode::pass)) Debug{} << "update: need reposition" << (s.frame == 0 ? "-1" : "1");
}
}
-
- return false;
}
Vector2 scenery::ordinal_offset(Vector2b offset) const