summaryrefslogtreecommitdiffhomepage
path: root/src/scenery.hpp
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/scenery.hpp
parent32b8c22828315292857e2cd9909fba620f30ff70 (diff)
pre-declare integer types without cstddef/cstdint
Diffstat (limited to 'src/scenery.hpp')
-rw-r--r--src/scenery.hpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/scenery.hpp b/src/scenery.hpp
index 0c074e5e..a985d7d7 100644
--- a/src/scenery.hpp
+++ b/src/scenery.hpp
@@ -3,7 +3,6 @@
#include "tile-defs.hpp"
#include "rotation.hpp"
#include "entity.hpp"
-#include <cstdint>
#include <memory>
#include <type_traits>
#include <Magnum/Math/Vector2.h>
@@ -18,7 +17,7 @@ struct world;
enum class scenery_type : unsigned char {
none, generic, door,
};
-constexpr inline std::size_t scenery_type_BITS = 3;
+constexpr inline size_t scenery_type_BITS = 3;
struct scenery_proto : entity_proto
{
@@ -42,14 +41,14 @@ struct scenery final : entity
unsigned char closing : 1 = false;
unsigned char interactive : 1 = false;
- bool can_activate(std::size_t i) const override;
- bool activate(std::size_t i) override;
- bool update(std::size_t i, float dt) override;
+ bool can_activate(size_t i) const override;
+ bool activate(size_t i) override;
+ bool update(size_t i, float dt) override;
explicit operator scenery_proto() const;
private:
friend struct world;
- scenery(std::uint64_t id, struct chunk& c, entity_type type, const scenery_proto& proto);
+ scenery(object_id id, struct chunk& c, entity_type type, const scenery_proto& proto);
};
template<> struct entity_type_<scenery> : std::integral_constant<entity_type, entity_type::scenery> {};