Fixed intro

This commit is contained in:
Grayson Riffe (Laptop) 2021-10-06 13:24:29 -05:00
parent d2604e9edc
commit f9b6f7b46c
2 changed files with 12 additions and 1 deletions

View File

@ -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);

View File

@ -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<double, std::ratio<1i64>> dur = now - m_start;