mirror of
https://github.com/Kbz-8/42_vox.git
synced 2026-01-11 14:43:34 +00:00
adding loading screen
This commit is contained in:
@@ -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; }
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user