This commit is contained in:
Ben
2021-08-13 22:05:49 +01:00
parent a15b77ad15
commit 03bf5c4a7d
10 changed files with 59 additions and 14 deletions

View File

@@ -1,11 +1,13 @@
#include <Aeon/Aeon.hpp>
#include "Aeon/Aeon.hpp"
Aeon::Core::Engine::Engine()
Aeon::Core::App::App(const AppProperties& props)
{
Aeon::Core::Display::GetInstance();
}
const Aeon::Core::Display& Aeon::Core::Engine::getDisplay()
const Aeon::Core::Display& Aeon::Core::App::GetDisplay()
{
return Aeon::Core::Display::getInstance();
return Aeon::Core::Display::GetInstance();
}

View File

@@ -1,18 +1,38 @@
#ifndef AEON_AEON_H_
#define AEON_AEON_H_
#include <Aeon/Display.hpp>
#include <string>
#include "Aeon/Core/Display.hpp"
namespace Aeon::Core {
class Engine
{
class AppProperties {
public:
Engine();
std::string Name;
int Width, Height;
bool VSync;
AppProperties(std::string name, int width = 1200, int height = 900, bool vSync = true)
: Name(name),
Width(width),
Height(height),
VSync(vSync) { }
};
class App {
public:
App(const AppProperties& props);
virtual ~App();
const Display& GetDisplay();
const Aeon::Core::Display& getDisplay();
};
}
#endif

View File

@@ -1,4 +1,4 @@
#include <Aeon/Display.hpp>
#include "Aeon/Core/Display.hpp"
#include <iostream>

View File

@@ -8,7 +8,7 @@ class Display
public:
Display();
static inline Display& getInstance()
static inline Display& GetInstance()
{
static Display instance;
return instance;

View File

View File

2
Aeon/Core/GameLayer.hpp Normal file
View File

@@ -0,0 +1,2 @@

View File

@@ -0,0 +1,6 @@
#ifndef AEON_MATHS_MATHS_H_
#define AEON_MATHS_MATHS_H_
#include <Aeon/ThirdParty/glm/glm.hpp>
#endif

View File

View File

@@ -1,9 +1,24 @@
// simple raycast shooter
#include <Aeon/Aeon.hpp>
#include "Aeon/Aeon.hpp"
class ExampleGame : public Aeon::Core::App {
public:
ExampleGame()
: App( { "Game with AEON!" } )
{
}
~ExampleGame() override
{
}
};
int main( int argc, char** argv )
{
Aeon::Core::Engine engine;
auto& display = engine.getDisplay();
ExampleGame game;
}