summaryrefslogtreecommitdiffhomepage
path: root/main
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-10-07 22:00:01 +0200
committerStanislaw Halik <sthalik@misaki.pl>2022-10-07 22:00:01 +0200
commit766909047b6873b5af3f9aa98c6ed8cd53c6cc54 (patch)
tree3b32bc3035f14c2072fd687e2c9b18b7860c88e0 /main
parentd19a44bcb53cebbee0ae51981f66b93b31cb9dcb (diff)
a
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/main/main.cpp b/main/main.cpp
index a579f1eb..80d85eef 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -5,10 +5,10 @@
#include "chunk.hpp"
#include "floor-mesh.hpp"
#include "wall-mesh.hpp"
-#include "compat/defs.hpp"
-#include <bitset>
+#include "compat/enum-bitset.hpp"
+
#include <Magnum/Magnum.h>
-#include <Magnum/Math/Vector.h>
+#include <Magnum/Math/Vector2.h>
#include <Magnum/GL/DefaultFramebuffer.h>
#include <Magnum/GL/Renderer.h>
#include <Magnum/Platform/Sdl2Application.h>
@@ -17,17 +17,6 @@
namespace Magnum::Examples {
-template<typename enum_type>
-struct enum_bitset : std::bitset<(std::size_t)enum_type::MAX> {
- static_assert(std::is_same_v<std::size_t, std::common_type_t<std::size_t, std::underlying_type_t<enum_type>>>);
- static_assert(std::is_same_v<enum_type, std::decay_t<enum_type>>);
- using std::bitset<(std::size_t)enum_type::MAX>::bitset;
- constexpr bool operator[](enum_type x) const { return operator[]((std::size_t)x); }
- constexpr decltype(auto) operator[](enum_type x) {
- return std::bitset<(std::size_t)enum_type::MAX>::operator[]((std::size_t)x);
- }
-};
-
struct app final : Platform::Application
{
using dpi_policy = Platform::Implementation::Sdl2DpiScalingPolicy;