We can go down a level and there's a loading screen for it. The map and motion now matches the directions shown in the raycasting. There's now a compass that shows you the direction you're facing.

This commit is contained in:
Zed A. Shaw 2025-02-25 13:15:39 -05:00
parent e9accf14e6
commit 54fbf22b6d
17 changed files with 124 additions and 36 deletions

40
easings.hpp Normal file
View file

@ -0,0 +1,40 @@
#pragma once
#include <cmath>
namespace ease {
inline double sine(double x) {
return (std::sin(x) + 1.0) / 2.0;
}
inline double out_circ(double x) {
return std::sqrt(1.0f - std::pow(x - 1.0f, 2.0f));
}
inline double out_bounce(double x) {
constexpr const double n1 = 7.5625;
constexpr const double d1 = 2.75;
if (x < 1 / d1) {
return n1 * x * x;
} else if (x < 2 / d1) {
x -= 1.5;
return n1 * (x / d1) * x + 0.75;
} else if (x < 2.5 / d1) {
x -= 2.25;
return n1 * (x / d1) * x + 0.9375;
} else {
x -= 2.625;
return n1 * (x / d1) * x + 0.984375;
}
}
inline double in_out_back(double x) {
constexpr const double c1 = 1.70158;
constexpr const double c2 = c1 * 1.525;
return x < 0.5
? (std::pow(2.0 * x, 2.0) * ((c2 + 1.0) * 2.0 * x - c2)) / 2.0
: (std::pow(2.0 * x - 2.0, 2.0) * ((c2 + 1.0) * (x * 2.0 - 2.0) + c2) + 2.0) / 2.0;
}
}