Add Application base classes (WIP)

This commit is contained in:
SirLynix
2023-01-04 17:56:12 +01:00
committed by Jérôme Leclercq
parent 67320e02e9
commit 04bfa97579
10 changed files with 242 additions and 0 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/Application.hpp>
#include <Nazara/Core/Debug.hpp>
namespace Nz
{
Application::Application(int argc, const char** argv) :
m_running(true)
{
}
int Application::Run()
{
// Ignore time between creation and Run() call
m_clock.Restart();
while (m_running)
{
Time elapsedTime = m_clock.Restart();
Update(elapsedTime);
}
return 0;
}
void Application::Update(Time elapsedTime)
{
}
}

View File

@@ -0,0 +1,15 @@
// 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/ApplicationComponent.hpp>
#include <Nazara/Core/Debug.hpp>
namespace Nz
{
ApplicationComponent::~ApplicationComponent() = default;
void ApplicationComponent::Update(Time elapsedTime)
{
}
}

View File

@@ -0,0 +1,14 @@
// Copyright (C) 2022 Jérôme "Lynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Platform module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <Nazara/Platform/AppWindowingComponent.hpp>
#include <Nazara/Platform/Debug.hpp>
namespace Nz
{
void AppWindowingComponent::Update(Time elapsedTime)
{
// SDL_PollEvent
}
}