summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--editor/app.cpp1
-rw-r--r--editor/camera.cpp1
-rw-r--r--editor/editor-enums.hpp1
-rw-r--r--editor/editor.cpp2
-rw-r--r--editor/tile-editor.hpp11
-rw-r--r--main/draw.cpp1
-rw-r--r--main/events.cpp2
-rw-r--r--main/setup.cpp4
-rw-r--r--serialize/binary-reader.hpp2
-rw-r--r--serialize/magnum-vector2i.hpp1
-rw-r--r--serialize/world-impl.hpp1
-rw-r--r--src/anim-atlas.cpp2
12 files changed, 23 insertions, 6 deletions
diff --git a/editor/app.cpp b/editor/app.cpp
index 3e2c2be3..77f77f83 100644
--- a/editor/app.cpp
+++ b/editor/app.cpp
@@ -4,6 +4,7 @@
#include "floormat/settings.hpp"
#include "src/loader.hpp"
#include "world.hpp"
+#include <algorithm>
#include <Corrade/Utility/Arguments.h>
namespace floormat {
diff --git a/editor/camera.cpp b/editor/camera.cpp
index e10a995c..bb69c626 100644
--- a/editor/camera.cpp
+++ b/editor/camera.cpp
@@ -2,6 +2,7 @@
#include "src/global-coords.hpp"
#include "shaders/tile.hpp"
#include "floormat/main.hpp"
+#include <algorithm>
namespace floormat {
diff --git a/editor/editor-enums.hpp b/editor/editor-enums.hpp
index 604956cb..e7e83faf 100644
--- a/editor/editor-enums.hpp
+++ b/editor/editor-enums.hpp
@@ -1,4 +1,5 @@
#pragma once
+#include "compat/integer-types.hpp"
namespace floormat {
diff --git a/editor/editor.cpp b/editor/editor.cpp
index 99948aca..9676a22d 100644
--- a/editor/editor.cpp
+++ b/editor/editor.cpp
@@ -6,8 +6,8 @@
#include <Corrade/Containers/StringView.h>
-#include <string_view>
#include <vector>
+#include <algorithm>
#include <filesystem>
namespace floormat {
diff --git a/editor/tile-editor.hpp b/editor/tile-editor.hpp
index 0458ee79..9593139c 100644
--- a/editor/tile-editor.hpp
+++ b/editor/tile-editor.hpp
@@ -3,8 +3,10 @@
#include "editor-enums.hpp"
#include "src/tile-image.hpp"
#include "global-coords.hpp"
-#include <tuple>
#include <memory>
+#include <vector>
+#include <map>
+#include <Corrade/Containers/String.h>
namespace floormat {
@@ -17,10 +19,15 @@ private:
sel_none, sel_tile, sel_perm,
};
+ struct tuple final {
+ std::shared_ptr<tile_atlas> atlas;
+ std::vector<decltype(tile_image_proto::variant)> variant;
+ };
+
String _name;
std::map<std::string, std::shared_ptr<tile_atlas>> _atlases;
tile_image_proto _selected_tile;
- std::tuple<std::shared_ptr<tile_atlas>, std::vector<decltype(tile_image_proto::variant)>> _permutation;
+ tuple _permutation;
selection_mode _selection_mode = sel_none;
editor_mode _mode;
editor_wall_rotation _rotation = editor_wall_rotation::N;
diff --git a/main/draw.cpp b/main/draw.cpp
index 0d7aa951..1c955099 100644
--- a/main/draw.cpp
+++ b/main/draw.cpp
@@ -2,6 +2,7 @@
#include "floormat/app.hpp"
#include "src/camera-offset.hpp"
#include <Magnum/GL/DefaultFramebuffer.h>
+#include <algorithm>
#include <thread>
namespace floormat {
diff --git a/main/events.cpp b/main/events.cpp
index 0344f1a1..922b2d23 100644
--- a/main/events.cpp
+++ b/main/events.cpp
@@ -1,6 +1,7 @@
#include "main-impl.hpp"
#include "floormat/app.hpp"
#include "floormat/events.hpp"
+#include <cstring>
#include <SDL_events.h>
//#include <SDL_video.h>
@@ -105,4 +106,3 @@ void main_impl::anyEvent(SDL_Event& event)
}
} // namespace floormat
-
diff --git a/main/setup.cpp b/main/setup.cpp
index edd95767..1329374a 100644
--- a/main/setup.cpp
+++ b/main/setup.cpp
@@ -1,5 +1,7 @@
#include "main-impl.hpp"
#include "compat/fpu.hpp"
+#include <algorithm>
+#include <Corrade/Containers/StringView.h>
namespace floormat {
@@ -12,7 +14,7 @@ main_impl::main_impl(floormat_app& app, fm_settings&& s, int& fake_argc) noexcep
{
(void)setSwapInterval(1);
if (const auto list = GL::Context::current().extensionStrings();
- std::find(list.cbegin(), list.cend(), "EXT_swap_control_tear") != list.cbegin())
+ std::find(list.cbegin(), list.cend(), "EXT_swap_control_tear") != list.cend())
(void)setSwapInterval(-1);
}
else
diff --git a/serialize/binary-reader.hpp b/serialize/binary-reader.hpp
index 881ed88f..b95c3713 100644
--- a/serialize/binary-reader.hpp
+++ b/serialize/binary-reader.hpp
@@ -1,5 +1,6 @@
#pragma once
#include "binary-serializer.hpp"
+#include <array>
#include <iterator>
#include <Corrade/Containers/StringView.h>
@@ -46,4 +47,3 @@ template<typename Array>
binary_reader(Array&& array) -> binary_reader<std::decay_t<decltype(std::begin(array))>>;
} // namespace floormat::Serialize
-
diff --git a/serialize/magnum-vector2i.hpp b/serialize/magnum-vector2i.hpp
index c53f26b8..7b78d73f 100644
--- a/serialize/magnum-vector2i.hpp
+++ b/serialize/magnum-vector2i.hpp
@@ -2,6 +2,7 @@
#include "serialize/string.hpp"
#include <cstdio>
#include <Magnum/Math/Vector2.h>
+#include <Corrade/Containers/StringView.h>
#include <nlohmann/json.hpp>
namespace nlohmann {
diff --git a/serialize/world-impl.hpp b/serialize/world-impl.hpp
index 4c206a7e..210b6836 100644
--- a/serialize/world-impl.hpp
+++ b/serialize/world-impl.hpp
@@ -6,6 +6,7 @@
#include "src/tile.hpp"
#include <bit>
#include <cstdio>
+#include <limits>
namespace floormat::Serialize {
diff --git a/src/anim-atlas.cpp b/src/anim-atlas.cpp
index 1aadab21..a4344946 100644
--- a/src/anim-atlas.cpp
+++ b/src/anim-atlas.cpp
@@ -1,5 +1,7 @@
#include "anim-atlas.hpp"
+#include "compat/assert.hpp"
#include <Corrade/Containers/StringStlView.h>
+#include <Magnum/Math/Color.h>
#include <Magnum/GL/TextureFormat.h>
namespace floormat {