summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-10-09 12:22:14 +0200
committerStanislaw Halik <sthalik@misaki.pl>2022-10-09 12:22:14 +0200
commitcf6c5668f1d41a0fe02f97351a522ccfb3f245d4 (patch)
tree2dd795feb2b735773ca936effa57884986196aca /src
parentb581b559fe426f39b1d548ca27f03cb22dd2ed22 (diff)
a
Diffstat (limited to 'src')
-rw-r--r--src/chunk.cpp4
-rw-r--r--src/chunk.hpp4
-rw-r--r--src/loader.cpp4
-rw-r--r--src/loader.hpp4
-rw-r--r--src/local-coords.hpp4
-rw-r--r--src/tile-atlas.cpp4
-rw-r--r--src/tile-atlas.hpp4
-rw-r--r--src/tile-defs.hpp4
-rw-r--r--src/tile-iterator.cpp4
-rw-r--r--src/tile-iterator.hpp28
-rw-r--r--src/tile.cpp4
-rw-r--r--src/tile.hpp4
-rw-r--r--src/world.cpp4
-rw-r--r--src/world.hpp4
14 files changed, 40 insertions, 40 deletions
diff --git a/src/chunk.cpp b/src/chunk.cpp
index 221f8132..4537acec 100644
--- a/src/chunk.cpp
+++ b/src/chunk.cpp
@@ -1,5 +1,5 @@
#include "chunk.hpp"
-namespace Magnum::Examples {
+namespace floormat {
-} // namespace Magnum::Examples
+} // namespace floormat
diff --git a/src/chunk.hpp b/src/chunk.hpp
index 1a56b622..a20a12ce 100644
--- a/src/chunk.hpp
+++ b/src/chunk.hpp
@@ -4,7 +4,7 @@
#include <type_traits>
#include <array>
-namespace Magnum::Examples {
+namespace floormat {
template<typename F, typename Tile>
concept tile_iterator_fn = requires(F fn, Tile& tile) {
@@ -36,4 +36,4 @@ private:
std::array<tile, TILE_COUNT> _tiles = {};
};
-} // namespace Magnum::Examples
+} // namespace floormat
diff --git a/src/loader.cpp b/src/loader.cpp
index f6219350..c4329de3 100644
--- a/src/loader.cpp
+++ b/src/loader.cpp
@@ -1,6 +1,6 @@
#include "loader.hpp"
-namespace Magnum::Examples {
+namespace floormat {
loader_::loader_() = default;
loader_::~loader_() = default;
-} // namespace Magnum::Examples
+} // namespace floormat
diff --git a/src/loader.hpp b/src/loader.hpp
index 49299bb6..6657439a 100644
--- a/src/loader.hpp
+++ b/src/loader.hpp
@@ -7,7 +7,7 @@
#include <optional>
#include <memory>
-namespace Magnum::Examples {
+namespace floormat {
struct tile_atlas;
@@ -29,4 +29,4 @@ protected:
extern loader_& loader; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
-} // namespace Magnum::Examples
+} // namespace floormat
diff --git a/src/local-coords.hpp b/src/local-coords.hpp
index 0d62103c..3bb2a33c 100644
--- a/src/local-coords.hpp
+++ b/src/local-coords.hpp
@@ -5,7 +5,7 @@
#include <Magnum/Magnum.h>
#include <Magnum/Math/Vector3.h>
-namespace Magnum::Examples {
+namespace floormat {
struct local_coords final {
std::uint8_t x = 0, y = 0;
@@ -29,4 +29,4 @@ constexpr local_coords::local_coords(std::size_t x, std::size_t y) noexcept
ASSERT(x <= 0xff && y <= 0xff);
}
-} // namespace Magnum::Examples
+} // namespace floormat
diff --git a/src/tile-atlas.cpp b/src/tile-atlas.cpp
index 95e01bfa..dfb0b83c 100644
--- a/src/tile-atlas.cpp
+++ b/src/tile-atlas.cpp
@@ -4,7 +4,7 @@
#include <Magnum/ImageView.h>
#include <Magnum/GL/TextureFormat.h>
-namespace Magnum::Examples {
+namespace floormat {
tile_atlas::tile_atlas(Containers::StringView name, const ImageView2D& image, Vector2ui dims) :
name_{name},
@@ -37,4 +37,4 @@ std::array<Vector2, 4> tile_atlas::texcoords_for_id(std::size_t id_) const
}};
}
-} // namespace Magnum::Examples
+} // namespace floormat
diff --git a/src/tile-atlas.hpp b/src/tile-atlas.hpp
index af9e505b..81cfc857 100644
--- a/src/tile-atlas.hpp
+++ b/src/tile-atlas.hpp
@@ -6,7 +6,7 @@
namespace std::filesystem { class path; }
-namespace Magnum::Examples {
+namespace floormat {
struct tile_atlas final
{
@@ -72,4 +72,4 @@ constexpr tile_atlas::quad tile_atlas::wall_quad_N(const Vector3 center, const V
}};
}
-} // namespace Magnum::Examples
+} // namespace floormat
diff --git a/src/tile-defs.hpp b/src/tile-defs.hpp
index 05aaf82d..69827210 100644
--- a/src/tile-defs.hpp
+++ b/src/tile-defs.hpp
@@ -1,10 +1,10 @@
#pragma once
#include <cstddef>
-namespace Magnum::Examples {
+namespace floormat {
constexpr inline std::size_t TILE_MAX_DIM = 16;
constexpr inline std::size_t TILE_COUNT = TILE_MAX_DIM*TILE_MAX_DIM;
constexpr inline float TILE_SIZE[3] = { 64, 64, 64 };
-} // namespace Magnum::Examples
+} // namespace floormat
diff --git a/src/tile-iterator.cpp b/src/tile-iterator.cpp
index 3e7586dd..97e34008 100644
--- a/src/tile-iterator.cpp
+++ b/src/tile-iterator.cpp
@@ -1,9 +1,9 @@
#include "tile-iterator.hpp"
#include "tile.hpp"
-namespace Magnum::Examples {
+namespace floormat {
template class basic_tile_iterator<tile>;
template class basic_tile_iterator<const tile>;
-} // namespace Magnum::Examples
+} // namespace floormat
diff --git a/src/tile-iterator.hpp b/src/tile-iterator.hpp
index ce4b645e..5ba4bb88 100644
--- a/src/tile-iterator.hpp
+++ b/src/tile-iterator.hpp
@@ -5,28 +5,28 @@
#include <utility>
#include <type_traits>
-namespace Magnum::Examples {
+namespace floormat {
struct tile;
template<typename T> class basic_tile_iterator;
template<typename T> struct tile_tuple;
-} // namespace Magnum::Examples
+} // namespace floormat
namespace std {
-template<typename T> struct tuple_size<Magnum::Examples::tile_tuple<T>> : std::integral_constant<std::size_t, 3> {};
+template<typename T> struct tuple_size<floormat::tile_tuple<T>> : std::integral_constant<std::size_t, 3> {};
-template<> struct tuple_element<0, Magnum::Examples::tile_tuple<Magnum::Examples::tile>> { using type = Magnum::Examples::tile&; };
-template<> struct tuple_element<0, Magnum::Examples::tile_tuple<const Magnum::Examples::tile>> { using type = const Magnum::Examples::tile&; };
-template<> struct tuple_element<0, const Magnum::Examples::tile_tuple<Magnum::Examples::tile>> { using type = const Magnum::Examples::tile&; };
+template<> struct tuple_element<0, floormat::tile_tuple<floormat::tile>> { using type = floormat::tile&; };
+template<> struct tuple_element<0, floormat::tile_tuple<const floormat::tile>> { using type = const floormat::tile&; };
+template<> struct tuple_element<0, const floormat::tile_tuple<floormat::tile>> { using type = const floormat::tile&; };
-template<typename T> struct tuple_element<1, Magnum::Examples::tile_tuple<T>> { using type = std::size_t; };
-template<typename T> struct tuple_element<2, Magnum::Examples::tile_tuple<T>> { using type = Magnum::Examples::local_coords; };
+template<typename T> struct tuple_element<1, floormat::tile_tuple<T>> { using type = std::size_t; };
+template<typename T> struct tuple_element<2, floormat::tile_tuple<T>> { using type = floormat::local_coords; };
} // namespace std
-namespace Magnum::Examples {
+namespace floormat {
template<typename T>
struct tile_tuple {
@@ -59,9 +59,9 @@ protected:
std::tuple<T*, std::size_t> data = {nullptr, 0};
};
-} // namespace Magnum::Examples
+} // namespace floormat
-namespace Magnum::Examples {
+namespace floormat {
template<typename T>
class basic_tile_iterator final : private tile_tuple<T> {
@@ -82,13 +82,13 @@ public:
extern template class basic_tile_iterator<tile>;
extern template class basic_tile_iterator<const tile>;
-} // namespace Magnum::Examples
+} // namespace floormat
namespace std {
template<typename Tile>
-class iterator_traits<Magnum::Examples::basic_tile_iterator<Tile>> {
- using T = Magnum::Examples::basic_tile_iterator<Tile>;
+class iterator_traits<floormat::basic_tile_iterator<Tile>> {
+ using T = floormat::basic_tile_iterator<Tile>;
public:
using difference_type = std::ptrdiff_t;
using value_type = T;
diff --git a/src/tile.cpp b/src/tile.cpp
index b1963415..82970c76 100644
--- a/src/tile.cpp
+++ b/src/tile.cpp
@@ -1,5 +1,5 @@
#include "tile.hpp"
-namespace Magnum::Examples {
+namespace floormat {
-} // namespace Magnum::Examples
+} // namespace floormat
diff --git a/src/tile.hpp b/src/tile.hpp
index c6d4e73d..a58d129a 100644
--- a/src/tile.hpp
+++ b/src/tile.hpp
@@ -5,7 +5,7 @@
#include <cstdint>
#include <memory>
-namespace Magnum::Examples {
+namespace floormat {
struct tile_atlas;
@@ -31,4 +31,4 @@ struct tile final
DECLARE_DEPRECATED_COPY_ASSIGNMENT(tile);
};
-} //namespace Magnum::Examples
+} //namespace floormat
diff --git a/src/world.cpp b/src/world.cpp
index 2d19c7d2..3a04c4c7 100644
--- a/src/world.cpp
+++ b/src/world.cpp
@@ -1,6 +1,6 @@
#include "world.hpp"
-namespace Magnum::Examples {
+namespace floormat {
static_assert(sizeof(decltype(local_coords::x))*8 == 8);
static_assert(sizeof(decltype(chunk_coords::x))*8 == 16);
@@ -9,5 +9,5 @@ static_assert(std::is_same_v<decltype(chunk_coords::x), decltype(chunk_coords::y
static_assert(std::is_same_v<decltype(chunk_coords::x), decltype(chunk_coords::y)>);
-} // namespace Magnum::Examples
+} // namespace floormat
diff --git a/src/world.hpp b/src/world.hpp
index 99b984c2..0d28429e 100644
--- a/src/world.hpp
+++ b/src/world.hpp
@@ -2,7 +2,7 @@
#include "src/chunk.hpp"
#include "compat/assert.hpp"
-namespace Magnum::Examples {
+namespace floormat {
struct chunk_coords final {
std::int16_t x = 0, y = 0;
@@ -26,4 +26,4 @@ constexpr chunk_coords global_coords::local() const noexcept {
return {x_, y_};
}
-} // namespace Magnum::Examples
+} // namespace floormat