diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7739ede..d516876 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,6 +15,7 @@ find_package(SDL2 REQUIRED COMPONENTS SDL2::SDL2-static SDL2::SDL2main CONFIG)
find_package(OpenAL REQUIRED CONFIG)
find_library(physfs REQUIRED NAMES physfs-static PATHS "${CMAKE_PREFIX_PATH}/lib")
+
# Determine dependencies
set(STATIC_LIBS
vmq
diff --git a/src/animation/ease.hpp b/src/animation/ease.hpp
new file mode 100644
index 0000000..73875c6
--- /dev/null
+++ b/src/animation/ease.hpp
@@ -0,0 +1,418 @@
+/*
+ * Copyright (C) 2020 Christopher J. Howard
+ *
+ * This file is part of Antkeeper source code.
+ *
+ * Antkeeper source code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Antkeeper source code is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Antkeeper source code. If not, see .
+ */
+
+/*
+ * Easing Functions (Equations)
+ *
+ * Copyright (C) 2001 Robert Penner
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * * Neither the name of the author nor the names of contributors may be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ANTKEEPER_EASE_HPP
+#define ANTKEEPER_EASE_HPP
+
+#include
+#include
+#include
+
+/**
+ * Container for templated easing functions.
+ *
+ * All easing functions require the following operators to be defined:
+ *
+ * value_type operator+(const value_type&, const value_type&);
+ * value_type operator-(const value_type&, const value_type&);
+ * value_type operator*(const value_type&, scalar_type) const;
+ *
+ * @tparam T Value type.
+ * @tparam S Scalar type.
+ */
+template
+struct ease
+{
+ typedef T value_type;
+ typedef S scalar_type;
+
+ /// Linearly interpolates between @p x and @p y.
+ static T linear(const T& x, const T& y, S a);
+
+ /// Logarithmically interpolates between @p x and @p y.
+ static T log(const T& x, const T& y, S a);
+
+ static T in_sine(const T& x, const T& y, S a);
+ static T out_sine(const T& x, const T& y, S a);
+ static T in_out_sine(const T& x, const T& y, S a);
+
+ static T in_quad(const T& x, const T& y, S a);
+ static T out_quad(const T& x, const T& y, S a);
+ static T in_out_quad(const T& x, const T& y, S a);
+
+ static T in_cubic(const T& x, const T& y, S a);
+ static T out_cubic(const T& x, const T& y, S a);
+ static T in_out_cubic(const T& x, const T& y, S a);
+
+ static T in_quart(const T& x, const T& y, S a);
+ static T out_quart(const T& x, const T& y, S a);
+ static T in_out_quart(const T& x, const T& y, S a);
+
+ static T in_quint(const T& x, const T& y, S a);
+ static T out_quint(const T& x, const T& y, S a);
+ static T in_out_quint(const T& x, const T& y, S a);
+
+ static T in_expo(const T& x, const T& y, S a);
+ static T out_expo(const T& x, const T& y, S a);
+ static T in_out_expo(const T& x, const T& y, S a);
+
+ static T in_circ(const T& x, const T& y, S a);
+ static T out_circ(const T& x, const T& y, S a);
+ static T in_out_circ(const T& x, const T& y, S a);
+
+ static T in_back(const T& x, const T& y, S a);
+ static T out_back(const T& x, const T& y, S a);
+ static T in_out_back(const T& x, const T& y, S a);
+
+ static T in_elastic(const T& x, const T& y, S a);
+ static T out_elastic(const T& x, const T& y, S a);
+ static T in_out_elastic(const T& x, const T& y, S a);
+
+ static T in_bounce(const T& x, const T& y, S a);
+ static T out_bounce(const T& x, const T& y, S a);
+ static T in_out_bounce(const T& x, const T& y, S a);
+};
+
+template
+inline T ease::linear(const T& x, const T& y, S a)
+{
+ return (y - x) * a + x;
+}
+
+template
+inline T ease::log(const T& x, const T& y, S a)
+{
+ //return std::exp(linear(std::log(x), std::log(y), a));
+ return x * std::pow(y / x, a);
+}
+
+template
+T ease::in_sine(const T& x, const T& y, S a)
+{
+ return linear(y, x, std::cos(a * vmq::half_pi));
+}
+
+template
+T ease::out_sine(const T& x, const T& y, S a)
+{
+ return linear(x, y, std::sin(a * vmq::half_pi));
+}
+
+template
+T ease::in_out_sine(const T& x, const T& y, S a)
+{
+ return linear(x, y, -(std::cos(a * vmq::pi) - S(1)) * S(0.5));
+}
+
+template
+T ease::in_quad(const T& x, const T& y, S a)
+{
+ return linear(x, y, a * a);
+}
+
+template
+T ease::out_quad(const T& x, const T& y, S a)
+{
+ return linear(x, y, (S(2) - a) * a);
+}
+
+template
+T ease::in_out_quad(const T& x, const T& y, S a)
+{
+ return linear(x, y, (a < S(0.5)) ? S(2) * a * a : -(S(2) * a * a - S(4) * a + S(1)));
+}
+
+template
+T ease::in_cubic(const T& x, const T& y, S a)
+{
+ return linear(x, y, a * a * a);
+}
+
+template
+T ease::out_cubic(const T& x, const T& y, S a)
+{
+ return linear(x, y, a * ((a - S(3)) * a + S(3)));
+}
+
+template
+T ease::in_out_cubic(const T& x, const T& y, S a)
+{
+ return linear(x, y, (a < S(0.5)) ? S(4) * a * a * a : S(4) * a * a * a - S(12) * a * a + S(12) * a - 3);
+}
+
+template
+T ease::in_quart(const T& x, const T& y, S a)
+{
+ return linear(x, y, a * a * a * a);
+}
+
+template
+T ease::out_quart(const T& x, const T& y, S a)
+{
+ return linear(x, y, a * (a * ((S(4) - a) * a - S(6)) + S(4)));
+}
+
+template
+T ease::in_out_quart(const T& x, const T& y, S a)
+{
+ return linear(x, y, (a < S(0.5)) ? S(8) * a * a * a * a : a * (a * ((S(32) - S(8) * a) * a - S(48)) + S(32)) - S(7));
+}
+
+template
+T ease::in_quint(const T& x, const T& y, S a)
+{
+ return linear(x, y, a * a * a * a * a);
+}
+
+template
+T ease::out_quint(const T& x, const T& y, S a)
+{
+ return linear(x, y, a * (a * (a * ((a - S(5)) * a + S(10)) - S(10)) + S(5)));
+}
+
+template
+T ease::in_out_quint(const T& x, const T& y, S a)
+{
+ if (a < S(0.5))
+ {
+ return linear(x, y, S(16) * a * a * a * a * a);
+ }
+ else
+ {
+ a = S(2) * (S(1) - a);
+ return linear(x, y, S(0.5) * (S(2) - a * a * a * a * a));
+ }
+}
+
+template
+T ease::in_expo(const T& x, const T& y, S a)
+{
+ return (a == S(0)) ? x : linear(x, y, std::pow(S(1024), a - S(1)));
+}
+
+template
+T ease::out_expo(const T& x, const T& y, S a)
+{
+ return (a == S(1)) ? y : linear(y, x, std::pow(S(2), S(-10) * a));
+}
+
+template
+T ease::in_out_expo(const T& x, const T& y, S a)
+{
+ if (a == S(0))
+ {
+ return x;
+ }
+ else if (a == S(1))
+ {
+ return y;
+ }
+
+ return linear(x, y, (a < S(0.5)) ? std::pow(S(2), S(20) * a - S(11)) : S(1) - std::pow(S(2), S(9) - S(20) * a));
+}
+
+template
+T ease::in_circ(const T& x, const T& y, S a)
+{
+ return linear(y, x, std::sqrt(S(1) - a * a));
+}
+
+template
+T ease::out_circ(const T& x, const T& y, S a)
+{
+ return linear(x, y, std::sqrt(-(a - S(2)) * a));
+}
+
+template
+T ease::in_out_circ(const T& x, const T& y, S a)
+{
+ if (a < S(0.5))
+ {
+ return linear(x, y, S(0.5) - S(0.5) * std::sqrt(S(1) - S(4) * a * a));
+ }
+ else
+ {
+ return linear(x, y, S(0.5) * (std::sqrt(S(-4) * (a - S(2)) * a - S(3)) + S(1)));
+ }
+}
+
+template
+T ease::in_back(const T& x, const T& y, S a)
+{
+ const S c = S(1.70158);
+ return linear(x, y, a * a * (a * c + a - c));
+}
+
+template
+T ease::out_back(const T& x, const T& y, S a)
+{
+ const S c = S(1.70158);
+ a -= S(1);
+ return linear(x, y, a * a * (a * c + a + c) + S(1));
+}
+
+template
+T ease::in_out_back(const T& x, const T& y, S a)
+{
+ const S c = S(1.70158) * S(1.525f);
+
+ if (a < S(0.5))
+ {
+ return linear(x, y, a * a * (a * (S(4) * c + S(4)) - S(2) * c));
+ }
+ else
+ {
+ S b = S(1) - S(2) * a;
+ return linear(x, y, b * b * (a * c + a - c * S(0.5) - S(1)) + S(1));
+ }
+}
+
+template
+T ease::in_elastic(const T& x, const T& y, S a)
+{
+ if (a == S(0))
+ {
+ return x;
+ }
+ else if (a == S(1))
+ {
+ return y;
+ }
+
+ return linear(x, y, -std::pow(S(1024), a - S(1)) * std::sin(S(20.944) * (a - S(1.075))));
+}
+
+template
+T ease::out_elastic(const T& x, const T& y, S a)
+{
+ if (a == S(0))
+ {
+ return x;
+ }
+ else if (a == S(1))
+ {
+ return y;
+ }
+
+ return linear(x, y, std::pow(S(2), S(-10) * a) * std::sin(S(20.944) * (a - S(0.075))) + S(1));
+}
+
+template
+T ease::in_out_elastic(const T& x, const T& y, S a)
+{
+ if (a == S(0))
+ {
+ return x;
+ }
+ else if (a == S(1))
+ {
+ return y;
+ }
+
+ if (a < S(0.5))
+ {
+ return linear(x, y, std::pow(S(2), S(20) * a - S(11)) * std::sin(S(15.5334) - S(27.5293) * a));
+
+ }
+ else
+ {
+ return linear(y, x, std::pow(2, S(9) - S(20) * a) * std::sin(S(15.5334) - S(27.5293) * a));
+ }
+}
+
+template
+T ease::in_bounce(const T& x, const T& y, S a)
+{
+ return linear(x, y, S(1) - ease::out_bounce(S(0), S(1), S(1) - a));
+}
+
+template
+T ease::out_bounce(const T& x, const T& y, S a)
+{
+ const S n = S(7.5625);
+ const S d = S(2.75);
+
+ if (a < S(1) / d)
+ {
+ a = n * a * a;
+ }
+ else if (a < S(2) / d)
+ {
+ a -= S(1.5) / d;
+ a = n * a * a + S(0.75);
+ }
+ else if (a < S(2.5) / d)
+ {
+ a -= S(2.25) / d;
+ a = n * a * a + S(0.9375);
+ }
+ else
+ {
+ a -= S(2.625) / d;
+ a = n * a * a + S(0.984375);
+ }
+
+ return linear(x, y, a);
+}
+
+template
+T ease::in_out_bounce(const T& x, const T& y, S a)
+{
+ if (a < S(0.5))
+ {
+ return linear(x, y, (S(1) - ease::out_bounce(S(0), S(1), S(1) - S(2) * a)) * S(0.5));
+ }
+ else
+ {
+ return linear(x, y, (S(1) + ease::out_bounce(S(0), S(1), S(2) * a - S(1))) * S(0.5));
+ }
+}
+
+#endif // ANTKEEPER_EASE_HPP
diff --git a/src/animation/easings.hpp b/src/animation/easings.hpp
deleted file mode 100644
index ce8653c..0000000
--- a/src/animation/easings.hpp
+++ /dev/null
@@ -1,284 +0,0 @@
-/*
- * Copyright (C) 2020 Christopher J. Howard
- *
- * This file is part of Antkeeper source code.
- *
- * Antkeeper source code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Antkeeper source code is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Antkeeper source code. If not, see .
- */
-
-/*
- * Easing Functions (Equations)
- *
- * Copyright (C) 2001 Robert Penner
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * * Neither the name of the author nor the names of contributors may be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef ANTKEEPER_EASINGS_HPP
-#define ANTKEEPER_EASINGS_HPP
-
-#include
-#include
-
-template
-inline T ease_linear(const T& x, const T& y, S a)
-{
- return (y - x) * a + x;
-}
-
-template
-T ease_in_sine(const T& x, const T& y, S a)
-{
- return -(y - x) * std::cos(a * vmq::half_pi) + (y - x) + x;
-}
-
-template
-T ease_out_sine(const T& x, const T& y, S a)
-{
- return (y - x) * std::sin(a * vmq::half_pi) + x;
-}
-
-template
-T ease_in_out_sine(const T& x, const T& y, S a)
-{
- return -(y - x) * S(0.5) * (std::cos(vmq::pi * a) - S(1.0)) + x;
-}
-
-template
-T ease_in_quad(const T& x, const T& y, S a)
-{
- return (y - x) * a * a + x;
-}
-
-template
-T ease_out_quad(const T& x, const T& y, S a)
-{
- return -(y - x) * a * (a - S(2.0)) + x;
-}
-
-template
-T ease_in_out_quad(const T& x, const T& y, S a)
-{
- a *= S(2.0);
- if (a < S(1.0))
- {
- return (y - x) * S(0.5) * a * a + x;
- }
-
- a -= S(1.0);
- return -(y - x) * S(0.5) * (a * (a - S(2.0)) - S(1.0)) + x;
-}
-
-template
-T ease_in_cubic(const T& x, const T& y, S a)
-{
- return (y - x) * a * a * a + x;
-}
-
-template
-T ease_out_cubic(const T& x, const T& y, S a)
-{
- a -= S(1.0);
- return (y - x) * (a * a * a + S(1.0)) + x;
-}
-
-template
-T ease_in_out_cubic(const T& x, const T& y, S a)
-{
- a *= S(2.0);
- if (a < S(1.0))
- {
- return (y - x) * S(0.5) * a * a * a + x;
- }
-
- a -= S(2.0);
- return (y - x) * S(0.5) * (a * a * a + S(2.0)) + x;
-}
-
-template
-T ease_in_quart(const T& x, const T& y, S a)
-{
- return (y - x) * a * a * a * a + x;
-}
-
-template
-T ease_out_quart(const T& x, const T& y, S a)
-{
- a -= S(1.0);
- return -(y - x) * (a * a * a * a - S(1.0)) + x;
-}
-
-template
-T ease_in_out_quart(const T& x, const T& y, S a)
-{
- a *= S(2.0);
- if (a < S(1.0))
- {
- return (y - x) * S(0.5) * a * a * a * a + x;
- }
-
- a -= S(2.0);
- return -(y - x) * S(0.5) * (a * a * a * a - S(2.0)) + x;
-}
-
-template
-T ease_in_quint(const T& x, const T& y, S a)
-{
- return (y - x) * a * a * a * a * a + x;
-}
-
-template
-T ease_out_quint(const T& x, const T& y, S a)
-{
- a -= S(1.0);
- return (y - x) * (a * a * a * a * a + S(1.0)) + x;
-}
-
-template
-T ease_in_out_quint(const T& x, const T& y, S a)
-{
- a *= S(2.0);
- if (a < S(1.0))
- {
- return (y - x) * S(0.5) * a * a * a * a * a + x;
- }
-
- a -= S(2.0);
- return (y - x) * S(0.5) * (a * a * a * a * a + S(2.0)) + x;
-}
-
-template
-T ease_in_expo(const T& x, const T& y, S a)
-{
- if (a == S(0.0))
- {
- return x;
- }
-
- return (y - x) * std::pow(S(2.0), S(10.0) * (a - S(1.0))) + x;
-}
-
-template
-T ease_out_expo(const T& x, const T& y, S a)
-{
- if (a == S(1.0))
- {
- return y;
- }
-
- return (y - x) * (-std::pow(S(2.0), -S(10.0) * a) + S(1.0)) + x;
-}
-
-template
-T ease_in_out_expo(const T& x, const T& y, S a)
-{
- if (a == S(0.0))
- {
- return x;
- }
- else if (a == S(1.0))
- {
- return y;
- }
-
- a *= S(2.0);
- if (a < S(1.0))
- {
- return (y - x) * S(0.5) * std::pow(S(2.0), S(10.0) * (a - S(1.0))) + x;
- }
-
- a -= S(1.0);
- return (y - x) * S(0.5) * (-std::pow(S(2.0), -S(10.0) * a) + S(2.0)) + x;
-}
-
-template
-T ease_in_circ(const T& x, const T& y, S a)
-{
- return -(y - x) * (std::sqrt(S(1.0) - a * a) - S(1.0)) + x;
-}
-
-template
-T ease_out_circ(const T& x, const T& y, S a)
-{
- a -= S(1.0);
- return (y - x) * std::sqrt(S(1.0) - a * a) + x;
-}
-
-template
-T ease_in_out_circ(const T& x, const T& y, S a)
-{
- a *= S(2.0);
- if (a < S(1.0))
- {
- return -(y - x) * S(0.5) * (std::sqrt(S(1.0) - a * a) - S(1.0)) + x;
- }
-
- a -= S(2.0);
- return (y - x) * S(0.5) * (std::sqrt(S(1.0) - a * a) + S(1.0)) + x;
-}
-
-template
-T ease_in_back(const T& x, const T& y, S a)
-{
- const S s = S(1.70158);
- return (y - x) * a * a * ((s + S(1.0)) * a - s) + x;
-}
-
-template
-T ease_out_back(const T& x, const T& y, S a)
-{
- const S s = S(1.70158);
- a -= S(1.0);
- return (y - x) * (a * a * ((s + S(1.0)) * a + s) + S(1.0)) + x;
-}
-
-template
-T ease_in_out_back(const T& x, const T& y, S a)
-{
- const S s = S(1.70158) * S(1.525f);
-
- a *= S(2.0);
- if (a < S(1.0))
- {
- return (y - x) * S(0.5) * (a * a * ((s + S(1.0)) * a - s)) + x;
- }
-
- a -= S(2.0);
- return (y - x) * S(0.5) * (a * a * ((s + S(1.0)) * a + s) + S(2.0)) + x;
-}
-
-#endif // ANTKEEPER_EASINGS_HPP
diff --git a/src/frame-scheduler.cpp b/src/animation/frame-scheduler.cpp
similarity index 100%
rename from src/frame-scheduler.cpp
rename to src/animation/frame-scheduler.cpp
diff --git a/src/frame-scheduler.hpp b/src/animation/frame-scheduler.hpp
similarity index 100%
rename from src/frame-scheduler.hpp
rename to src/animation/frame-scheduler.hpp
diff --git a/src/application.cpp b/src/application.cpp
index c9ea6d2..e395ee3 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -20,9 +20,7 @@
#include "application.hpp"
#include "configuration.hpp"
#include "state/application-states.hpp"
-#include "filesystem.hpp"
#include "math.hpp"
-#include "timestamp.hpp"
// STL
#include
@@ -79,7 +77,7 @@
#include "animation/animation.hpp"
#include "animation/animator.hpp"
#include "animation/screen-transition.hpp"
-#include "animation/easings.hpp"
+#include "animation/ease.hpp"
// Scene
#include "scene/billboard.hpp"
@@ -106,6 +104,10 @@
// Entity components
#include "entity/components/cavity-component.hpp"
+// Utilities
+#include "utility/paths.hpp"
+#include "utility/timestamp.hpp"
+
using namespace vmq::operators;
application::application(int argc, char** argv):
@@ -703,13 +705,13 @@ application::application(int argc, char** argv):
if (this->active_scene == &this->overworld_scene)
{
this->active_scene = &this->underworld_scene;
- this->radial_transition_inner->transition(0.5f, false, ease_in_quad);
+ this->radial_transition_inner->transition(0.5f, false, ease::in_quad);
auto switch_cameras = [this]()
{
this->overworld_camera.set_active(false);
this->underworld_camera.set_active(true);
- this->fade_transition->transition(0.25f, true, ease_out_quad);
+ this->fade_transition->transition(0.25f, true, ease::out_quad);
};
float t = timeline.get_position();
@@ -718,13 +720,13 @@ application::application(int argc, char** argv):
else
{
this->active_scene = &this->overworld_scene;
- this->fade_transition->transition(0.25f, false, ease_out_quad);
+ this->fade_transition->transition(0.25f, false, ease::out_quad);
auto switch_cameras = [this]()
{
this->overworld_camera.set_active(true);
this->underworld_camera.set_active(false);
- this->radial_transition_inner->transition(0.5f, true, ease_out_quad);
+ this->radial_transition_inner->transition(0.5f, true, ease::out_quad);
};
float t = timeline.get_position();
diff --git a/src/application.hpp b/src/application.hpp
index ab827b5..bc263e5 100644
--- a/src/application.hpp
+++ b/src/application.hpp
@@ -61,13 +61,13 @@
#include "scene/model-instance.hpp"
// Animation
+#include "animation/frame-scheduler.hpp"
#include "animation/timeline.hpp"
#include "animation/tween.hpp"
#include "animation/animation.hpp"
// Misc
#include "state/fsm.hpp"
-#include "frame-scheduler.hpp"
#include "pheromone-matrix.hpp"
#include "orbit-cam.hpp"
diff --git a/src/debug/logger.cpp b/src/debug/logger.cpp
index 23bfbbe..d8d10f0 100644
--- a/src/debug/logger.cpp
+++ b/src/debug/logger.cpp
@@ -18,7 +18,7 @@
*/
#include "logger.hpp"
-#include "timestamp.hpp"
+#include "utility/timestamp.hpp"
#include
logger::logger():
diff --git a/src/entity/components/chamber-component.hpp b/src/entity/components/chamber-component.hpp
index a6e90cd..8b539ef 100644
--- a/src/entity/components/chamber-component.hpp
+++ b/src/entity/components/chamber-component.hpp
@@ -29,6 +29,10 @@ struct chamber_component
{
entt::entity nest;
float depth;
+ float outer_radius;
+ float inner_radius;
+ float inner_sector_angle;
+ float tile_radius;
std::unordered_set> tiles;
}
diff --git a/src/entity/components/nest-component.hpp b/src/entity/components/nest-component.hpp
index 183d5dd..d997e93 100644
--- a/src/entity/components/nest-component.hpp
+++ b/src/entity/components/nest-component.hpp
@@ -20,14 +20,20 @@
#ifndef ANTKEEPER_ECS_NEST_COMPONENT_HPP
#define ANTKEEPER_ECS_NEST_COMPONENT_HPP
+#include
+#include
+
namespace ecs {
struct nest_component
{
- int bla;
+ std::vector chambers;
+ float helix_radius;
+ float helix_pitch;
+ float helix_chirality;
+ float helix_turns;
};
} // namespace ecs
#endif // ANTKEEPER_ECS_NEST_COMPONENT_HPP
-
diff --git a/src/marching-cubes.cpp b/src/geometry/marching-cubes.cpp
similarity index 100%
rename from src/marching-cubes.cpp
rename to src/geometry/marching-cubes.cpp
diff --git a/src/marching-cubes.hpp b/src/geometry/marching-cubes.hpp
similarity index 100%
rename from src/marching-cubes.hpp
rename to src/geometry/marching-cubes.hpp
diff --git a/src/morton.cpp b/src/geometry/morton.cpp
similarity index 100%
rename from src/morton.cpp
rename to src/geometry/morton.cpp
diff --git a/src/morton.hpp b/src/geometry/morton.hpp
similarity index 100%
rename from src/morton.hpp
rename to src/geometry/morton.hpp
diff --git a/src/octree.hpp b/src/geometry/octree.hpp
similarity index 100%
rename from src/octree.hpp
rename to src/geometry/octree.hpp
diff --git a/src/sdf.hpp b/src/geometry/sdf.hpp
similarity index 100%
rename from src/sdf.hpp
rename to src/geometry/sdf.hpp
diff --git a/src/nest.cpp b/src/nest.cpp
index 34fd8f8..fbacac1 100644
--- a/src/nest.cpp
+++ b/src/nest.cpp
@@ -18,18 +18,8 @@
*/
#include "nest.hpp"
-#include "animation/easings.hpp"
-#include "marching-cubes.hpp"
-#include "geometry/mesh-functions.hpp"
-#include "sdf.hpp"
-#include
-#include
-#include