From 7498076d7a8f460230b5a99cd3ac2199eb47de35 Mon Sep 17 00:00:00 2001 From: MarcEricMartel Date: Mon, 11 Dec 2023 07:31:20 -0500 Subject: [PATCH] Corrections timer --- SQCSim2021/SQCSim2021.vcxproj | 2 +- SQCSim2021/engine.cpp | 5 +++-- SQCSim2021/main.cpp | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/SQCSim2021/SQCSim2021.vcxproj b/SQCSim2021/SQCSim2021.vcxproj index cda35f7..7d14bc6 100644 --- a/SQCSim2021/SQCSim2021.vcxproj +++ b/SQCSim2021/SQCSim2021.vcxproj @@ -196,7 +196,7 @@ Fast - Console + Windows false true true diff --git a/SQCSim2021/engine.cpp b/SQCSim2021/engine.cpp index 6b5b9cf..9b63b3e 100644 --- a/SQCSim2021/engine.cpp +++ b/SQCSim2021/engine.cpp @@ -1551,8 +1551,9 @@ void Engine::Render(float elapsedTime) { m_countdown = m_time + COUNTDOWN; m_resetcountdown = false; } - if (!m_stopcountdown) - m_countdown -= (int)m_time; + if (!m_stopcountdown) { + m_countdown = COUNTDOWN - (int)m_time; + } } DrawHud(elapsedTime, bloc); diff --git a/SQCSim2021/main.cpp b/SQCSim2021/main.cpp index 9fea7c8..98dc399 100644 --- a/SQCSim2021/main.cpp +++ b/SQCSim2021/main.cpp @@ -5,5 +5,5 @@ int main() { Engine engine; engine.SetMaxFps(60); - engine.Start("Syndicat Quebecois de la Construction Simulator 2023", BASE_WIDTH, BASE_HEIGHT, false); + engine.Start("Syndicat Quebecois de la Construction Simulator 2023", 1920, 1080, false); }