Make Application template and responsible for modules init

This commit is contained in:
Lynix
2023-01-06 20:57:45 +01:00
committed by Jérôme Leclercq
parent 04bfa97579
commit 8db1c04568
6 changed files with 130 additions and 50 deletions

View File

@@ -0,0 +1,32 @@
// Copyright (C) 2022 Jérôme "Lynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Core module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <Nazara/Core/ApplicationBase.hpp>
#include <Nazara/Core/Debug.hpp>
namespace Nz
{
ApplicationBase::ApplicationBase(int argc, const Pointer<const char>* argv) :
m_running(true)
{
}
int ApplicationBase::Run()
{
// Ignore time between creation and Run() call
m_clock.Restart();
while (m_running)
{
Time elapsedTime = m_clock.Restart();
Update(elapsedTime);
}
return 0;
}
void ApplicationBase::Update(Time elapsedTime)
{
}
}