adding loading screen

This commit is contained in:
2025-06-03 11:12:45 +02:00
parent 5910541b5c
commit 98dc056786
4 changed files with 111 additions and 49 deletions

View File

@@ -14,6 +14,9 @@ namespace Scop
void Update(class Inputs& input, float aspect, float timestep) override;
inline constexpr void EnableCamera() noexcept { m_inputs_blocked = false; }
inline constexpr void DisableCamera() noexcept { m_inputs_blocked = true; }
[[nodiscard]] inline constexpr std::string GetCameraType() override { return "FirstPerson3D"; }
[[nodiscard]] const Vec3f& GetPosition() const noexcept override { return m_position; }
[[nodiscard]] const Vec3f& GetUp() const noexcept { return c_up; }

View File

@@ -16,17 +16,6 @@ namespace Scop
m_view = Mat4f::LookAt(m_position, m_target, c_up);
m_proj = Mat4f::Perspective(RadianAnglef(m_fov), aspect, 0.1f, 100'000.f);
if(input.IsKeyPressed(SDL_SCANCODE_F1))
{
m_inputs_blocked = true;
input.ReleaseMouse();
}
if(input.IsKeyPressed(SDL_SCANCODE_F2))
{
m_inputs_blocked = false;
input.GrabMouse();
}
if(m_inputs_blocked)
return;