From 0954a278733649b9e1e8e6646eec0090b464f599 Mon Sep 17 00:00:00 2001 From: Ben Date: Fri, 17 Sep 2021 17:37:47 +0100 Subject: [PATCH] moved a little around --- Aeon/Aeon.hpp | 3 +++ Aeon/Core/Display.hpp | 14 +------------- Aeon/Core/EngineConfig.hpp | 28 ++++++++++++++++++++++++++++ Aeon/Core/Events.hpp | 2 +- 4 files changed, 33 insertions(+), 14 deletions(-) diff --git a/Aeon/Aeon.hpp b/Aeon/Aeon.hpp index 4d349d2..9b95492 100644 --- a/Aeon/Aeon.hpp +++ b/Aeon/Aeon.hpp @@ -9,6 +9,9 @@ namespace Aeon::Core { +// NOTE: Derivations / children of "App" cannot attatch +// event listeners to themselves, the programmer must +// first add a gamelayer to handle events class App : public EventListener { public: diff --git a/Aeon/Core/Display.hpp b/Aeon/Core/Display.hpp index 805e1e6..e8f507d 100644 --- a/Aeon/Core/Display.hpp +++ b/Aeon/Core/Display.hpp @@ -8,23 +8,11 @@ extern "C" { #include } +#include "Aeon/Core/EngineConfig.hpp" #include "Aeon/Core/Events.hpp" namespace Aeon::Core { -struct DisplayProperties -{ - std::string Name; - int Width, Height; - bool VSync; - - DisplayProperties( std::string name, int width = 1200, int height = 900, bool vSync = true ) - : Name( name ), - Width( width ), - Height( height ), - VSync( vSync ) { } -}; - class Display : public EventListener { public: diff --git a/Aeon/Core/EngineConfig.hpp b/Aeon/Core/EngineConfig.hpp index e69de29..5f838de 100644 --- a/Aeon/Core/EngineConfig.hpp +++ b/Aeon/Core/EngineConfig.hpp @@ -0,0 +1,28 @@ +#ifndef AEON_CORE_ENGINECONFIG_H_ +#define AEON_CORE_ENGINECONFIG_H_ + +namespace Aeon::Core +{ + +// TODO: this +struct AppProperties +{ + std::string Name; +}; + +struct DisplayProperties +{ + std::string Name; + int Width, Height; + bool VSync; + + DisplayProperties( std::string name, int width = 1200, int height = 900, bool vSync = true ) + : Name( name ), + Width( width ), + Height( height ), + VSync( vSync ) { } +}; + +} + +#endif diff --git a/Aeon/Core/Events.hpp b/Aeon/Core/Events.hpp index 0a94d56..cfd22ce 100644 --- a/Aeon/Core/Events.hpp +++ b/Aeon/Core/Events.hpp @@ -82,7 +82,7 @@ public: EventListener(); virtual ~EventListener(); - void RegisterAsSink( std::string system, int layer ); + void RegisterAsSink( std::string system, int layer = 0 ); void DeRegisterAsSink( std::string system ); void UpdateLayer( int layer );