summaryrefslogtreecommitdiffhomepage
path: root/src/character.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-03-18 23:42:07 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-03-18 23:42:07 +0100
commit4d9a82b720c8ce74b94f43f72ddd819ef21abbdf (patch)
treec0a5d21b8e19fbb60c286faec8e302e6f32b6679 /src/character.cpp
parent32b8c22828315292857e2cd9909fba620f30ff70 (diff)
pre-declare integer types without cstddef/cstdint
Diffstat (limited to 'src/character.cpp')
-rw-r--r--src/character.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/character.cpp b/src/character.cpp
index 7cded2ba..84289f01 100644
--- a/src/character.cpp
+++ b/src/character.cpp
@@ -79,7 +79,7 @@ int character::allocate_frame_time(float dt)
constexpr int framerate_ = 65535/framerate;
static_assert(framerate_ > 0);
auto ret = d / framerate_;
- delta = (std::uint16_t)std::clamp(d - ret*65535, 0, 65535);
+ delta = (uint16_t)std::clamp(d - ret*65535, 0, 65535);
return ret;
}
@@ -97,7 +97,7 @@ void character::set_keys(bool L, bool R, bool U, bool D)
b_D = D;
}
-bool character::update(std::size_t i, float dt)
+bool character::update(size_t i, float dt)
{
auto [lr, ud, new_r] = arrows_to_dir(b_L, b_R, b_U, b_D);
@@ -141,7 +141,7 @@ character::operator character_proto() const
return ret;
}
-character::character(std::uint64_t id, struct chunk& c, entity_type type, const character_proto& proto) :
+character::character(object_id id, struct chunk& c, entity_type type, const character_proto& proto) :
entity{id, c, type, proto},
name{proto.name},
playable{proto.playable}