summaryrefslogtreecommitdiffhomepage
path: root/src/scenery.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-02-28 19:36:41 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-02-28 19:36:50 +0100
commite24f379bccd1d61f68328e74bce2fef99e935713 (patch)
treeb9b0a4dbb0305107b739d150fc0f3934c9014458 /src/scenery.hpp
parente9741774861c37b780929902a4c9fecfaa8cd2e2 (diff)
src/scenery: move rotation stuff to its own file
Diffstat (limited to 'src/scenery.hpp')
-rw-r--r--src/scenery.hpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/scenery.hpp b/src/scenery.hpp
index 3e950e90..9e58f612 100644
--- a/src/scenery.hpp
+++ b/src/scenery.hpp
@@ -1,6 +1,7 @@
#pragma once
#include "pass-mode.hpp"
#include "tile-defs.hpp"
+#include "rotation.hpp"
#include <cstdint>
#include <memory>
#include <type_traits>
@@ -11,14 +12,6 @@ namespace floormat {
struct anim_atlas;
-enum class rotation : std::uint8_t {
- N, NE, E, SE, S, SW, W, NW,
-};
-
-constexpr inline std::size_t rotation_BITS = 3;
-constexpr inline std::size_t rotation_MASK = (1 << rotation_BITS)-1;
-constexpr inline rotation rotation_COUNT = rotation{1 << rotation_BITS};
-
enum class scenery_type : std::uint8_t {
none, generic, door,
};
@@ -60,9 +53,6 @@ struct scenery final
bool activate(const anim_atlas& atlas);
void update(float dt, const anim_atlas& anim);
void rotate(rotation r);
-
- static Vector2b rotate_bbox_offset(Vector2b offset, rotation old_r, rotation r);
- static Vector2ub rotate_bbox_size(Vector2ub size, rotation old_r, rotation r);
};
constexpr scenery::scenery() noexcept : scenery{scenery::none_tag_t{}} {}