Patch - Logger opti

This commit is contained in:
CatChow0 2025-01-12 18:40:23 +01:00
parent f337e58dcc
commit c5de18a9b3
4 changed files with 5 additions and 14 deletions

View File

@ -400,6 +400,7 @@ bool ApplicationClass::Initialize(int screenWidth, int screenHeight, HWND hwnd)
return false;
}
}
catch (const std::exception& e)
{
@ -1884,7 +1885,6 @@ bool ApplicationClass::RenderPass(const std::vector<std::reference_wrapper<std::
// Vérifie si l'objet est dans le frustum
if (!m_FrustumCulling.CheckCube(x, y, z, radius, GetFrustumTolerance()))
{
continue;
}

View File

@ -106,7 +106,7 @@ public:
Physics* GetPhysics() const { return m_Physics; };
// ----------------------------------- //
// ------------- Frustum ------------- //
// ------------- Culling ------------- //
// ----------------------------------- //
Frustum GetFrustum() const { return m_FrustumCulling; };
@ -118,6 +118,7 @@ public:
float GetFrustumTolerance() const { return m_FrustumCullingTolerance; };
void SetFrustumTolerance(float frustumTolerance) { m_FrustumCullingTolerance = frustumTolerance; };
private:
bool Render(float, float, float, float, float);
bool RenderPhysics(float x, float y, float z);
@ -220,7 +221,7 @@ private :
XMVECTOR m_previousPosition;
// ------------------------------------------------- //
// ------------------- Frustum --------------------- //
// ------------------- Culling --------------------- //
// ------------------------------------------------- //
Frustum m_FrustumCulling;

View File

@ -3,7 +3,7 @@ Pos=60,60
Size=400,400
[Window][Khaotic Engine]
Pos=1143,44
Pos=1142,43
Size=392,273
[Window][Objects]

View File

@ -282,7 +282,6 @@ bool InputClass::IsLeftArrowPressed() const
{
if (m_keyboardState[DIK_LEFT] & 0x80)
{
Logger::Get().Log("Left arrow pressed", __FILE__, __LINE__, Logger::LogLevel::Input);
return true;
}
@ -294,7 +293,6 @@ bool InputClass::IsRightArrowPressed() const
{
if (m_keyboardState[DIK_RIGHT] & 0x80)
{
Logger::Get().Log("Right arrow pressed", __FILE__, __LINE__, Logger::LogLevel::Input);
return true;
}
@ -331,7 +329,6 @@ bool InputClass::IsAPressed() const
// Touche A sur QWERTY, Q sur AZERTY
if (m_keyboardState[DIK_A] & 0x80)
{
Logger::Get().Log("A pressed", __FILE__, __LINE__, Logger::LogLevel::Input);
return true;
}
@ -342,7 +339,6 @@ bool InputClass::IsDPressed() const
{
if (m_keyboardState[DIK_D] & 0x80)
{
Logger::Get().Log("D pressed", __FILE__, __LINE__, Logger::LogLevel::Input);
return true;
}
@ -354,7 +350,6 @@ bool InputClass::IsWPressed() const
// Touche W sur QWERTY, Z sur AZERTY
if (m_keyboardState[DIK_W] & 0x80)
{
Logger::Get().Log("W pressed", __FILE__, __LINE__, Logger::LogLevel::Input);
return true;
}
@ -365,7 +360,6 @@ bool InputClass::IsSPressed() const
{
if (m_keyboardState[DIK_S] & 0x80)
{
Logger::Get().Log("S pressed", __FILE__, __LINE__, Logger::LogLevel::Input);
return true;
}
@ -377,7 +371,6 @@ bool InputClass::IsQPressed() const
// Touche Q sur QWERTY, A sur AZERTY
if (m_keyboardState[DIK_Q] & 0x80)
{
Logger::Get().Log("Q pressed", __FILE__, __LINE__, Logger::LogLevel::Input);
return true;
}
@ -388,7 +381,6 @@ bool InputClass::IsEPressed() const
{
if (m_keyboardState[DIK_E] & 0x80)
{
Logger::Get().Log("E pressed", __FILE__, __LINE__, Logger::LogLevel::Input);
return true;
}
@ -407,7 +399,6 @@ bool InputClass::IsLeftMousePressed() const
// Check the left mouse button state.
if (m_mouseState.rgbButtons[0] & 0x80)
{
Logger::Get().Log("Left mouse button pressed", __FILE__, __LINE__, Logger::LogLevel::Input);
return true;
}
@ -419,7 +410,6 @@ bool InputClass::IsRightMousePressed() const
// Check the left mouse button state.
if (m_mouseState.rgbButtons[1] & 0x80)
{
Logger::Get().Log("Right mouse button pressed", __FILE__, __LINE__, Logger::LogLevel::Input);
return true;
}