From f9b6f7b46cfa25b7b7a0a1f574ed843d36c4e6bd Mon Sep 17 00:00:00 2001 From: "Grayson Riffe (Laptop)" Date: Wed, 6 Oct 2021 13:24:29 -0500 Subject: [PATCH] Fixed intro --- NothinFancy/src/Application.cpp | 6 ++++++ NothinFancy/src/IntroGamestate.cpp | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/NothinFancy/src/Application.cpp b/NothinFancy/src/Application.cpp index f826064..080767c 100644 --- a/NothinFancy/src/Application.cpp +++ b/NothinFancy/src/Application.cpp @@ -75,6 +75,9 @@ namespace nf { } void Application::run() { +#ifdef _DEBUG + SetThreadDescription(GetCurrentThread(), L"Input Thread"); +#endif showWindow(true); m_running = true; MSG msg = { }; @@ -278,6 +281,9 @@ namespace nf { } void Application::runMainGameThread() { +#ifdef _DEBUG + SetThreadDescription(GetCurrentThread(), L"Main Engine Thread"); +#endif m_sIntro = new IntroGamestate; m_currentState = m_sIntro; m_audio = new AudioEngine(this); diff --git a/NothinFancy/src/IntroGamestate.cpp b/NothinFancy/src/IntroGamestate.cpp index 2f8a146..6c62d35 100644 --- a/NothinFancy/src/IntroGamestate.cpp +++ b/NothinFancy/src/IntroGamestate.cpp @@ -11,10 +11,15 @@ namespace nf { m_logoTex.centered(true, true); m_text.create("(c) Grayson Riffe 2021", Vec2(0.01, 0.025), Vec3(0.8)); m_text.setScale(0.6); - m_start = std::chrono::steady_clock::now(); } void IntroGamestate::update(double deltaTime) { + static unsigned int frame = 0; + frame++; + if (frame < 10) return; + if (frame == 10) + m_start = std::chrono::steady_clock::now(); + std::chrono::steady_clock::time_point now = std::chrono::steady_clock::now(); std::chrono::duration> dur = now - m_start;