From 03bf5c4a7dd52a13551cc99c62a36f993c9818ea Mon Sep 17 00:00:00 2001 From: Ben Date: Fri, 13 Aug 2021 22:05:49 +0100 Subject: [PATCH] ennit --- Aeon/Aeon.cpp | 10 ++++++---- Aeon/Aeon.hpp | 30 +++++++++++++++++++++++++----- Aeon/{ => Core}/Display.cpp | 2 +- Aeon/{ => Core}/Display.hpp | 2 +- Aeon/Core/EngineConfig.hpp | 0 Aeon/Core/EngineEvents.hpp | 0 Aeon/Core/GameLayer.hpp | 2 ++ Aeon/Maths/Maths.hpp | 6 ++++++ Aeon/Profiling/Profiler.hpp | 0 Game/ExampleGame.cpp | 21 ++++++++++++++++++--- 10 files changed, 59 insertions(+), 14 deletions(-) rename Aeon/{ => Core}/Display.cpp (73%) rename Aeon/{ => Core}/Display.hpp (87%) create mode 100644 Aeon/Core/EngineConfig.hpp create mode 100644 Aeon/Core/EngineEvents.hpp create mode 100644 Aeon/Core/GameLayer.hpp create mode 100644 Aeon/Profiling/Profiler.hpp diff --git a/Aeon/Aeon.cpp b/Aeon/Aeon.cpp index 01b761f..42eea14 100644 --- a/Aeon/Aeon.cpp +++ b/Aeon/Aeon.cpp @@ -1,11 +1,13 @@ -#include +#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(); } diff --git a/Aeon/Aeon.hpp b/Aeon/Aeon.hpp index 3e79ccd..8184e15 100644 --- a/Aeon/Aeon.hpp +++ b/Aeon/Aeon.hpp @@ -1,18 +1,38 @@ #ifndef AEON_AEON_H_ #define AEON_AEON_H_ -#include +#include + +#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 + \ No newline at end of file diff --git a/Aeon/Display.cpp b/Aeon/Core/Display.cpp similarity index 73% rename from Aeon/Display.cpp rename to Aeon/Core/Display.cpp index 2002d3b..b7a1136 100644 --- a/Aeon/Display.cpp +++ b/Aeon/Core/Display.cpp @@ -1,4 +1,4 @@ -#include +#include "Aeon/Core/Display.hpp" #include diff --git a/Aeon/Display.hpp b/Aeon/Core/Display.hpp similarity index 87% rename from Aeon/Display.hpp rename to Aeon/Core/Display.hpp index ce94da9..e4854e3 100644 --- a/Aeon/Display.hpp +++ b/Aeon/Core/Display.hpp @@ -8,7 +8,7 @@ class Display public: Display(); - static inline Display& getInstance() + static inline Display& GetInstance() { static Display instance; return instance; diff --git a/Aeon/Core/EngineConfig.hpp b/Aeon/Core/EngineConfig.hpp new file mode 100644 index 0000000..e69de29 diff --git a/Aeon/Core/EngineEvents.hpp b/Aeon/Core/EngineEvents.hpp new file mode 100644 index 0000000..e69de29 diff --git a/Aeon/Core/GameLayer.hpp b/Aeon/Core/GameLayer.hpp new file mode 100644 index 0000000..139597f --- /dev/null +++ b/Aeon/Core/GameLayer.hpp @@ -0,0 +1,2 @@ + + diff --git a/Aeon/Maths/Maths.hpp b/Aeon/Maths/Maths.hpp index e69de29..b86f25d 100644 --- a/Aeon/Maths/Maths.hpp +++ b/Aeon/Maths/Maths.hpp @@ -0,0 +1,6 @@ +#ifndef AEON_MATHS_MATHS_H_ +#define AEON_MATHS_MATHS_H_ + +#include + +#endif diff --git a/Aeon/Profiling/Profiler.hpp b/Aeon/Profiling/Profiler.hpp new file mode 100644 index 0000000..e69de29 diff --git a/Game/ExampleGame.cpp b/Game/ExampleGame.cpp index 81f6223..41fd3c9 100644 --- a/Game/ExampleGame.cpp +++ b/Game/ExampleGame.cpp @@ -1,9 +1,24 @@ // simple raycast shooter -#include +#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; }