diff --git a/Aeon/Aeon.cpp b/Aeon/Aeon.cpp index e15e328..eb77cb9 100644 --- a/Aeon/Aeon.cpp +++ b/Aeon/Aeon.cpp @@ -13,6 +13,7 @@ using Input::InputController; App::App( const AppProperties& props, const DisplayProperties& dispProps ) : mDisplay() , mInput(InputController::GetInstance()) + , mEntityController( ) { PushThisAsSink( "ENGINE_DISPLAY_CORE" ); diff --git a/Aeon/Aeon.hpp b/Aeon/Aeon.hpp index 39a96a5..52b628d 100644 --- a/Aeon/Aeon.hpp +++ b/Aeon/Aeon.hpp @@ -44,10 +44,10 @@ public: private: Display mDisplay; - EC::EntityController& mEntityController; + EC::EntityRegistry mEntityController; Input::InputController& mInput; - // Game layers from z orderxko285132046 + // Game layers from z order std::vector mGameLayers; std::vector mTopLayers; std::vector mDebugLayers; diff --git a/Aeon/Entity/ComponentController.hpp b/Aeon/Entity/ComponentController.hpp index fd9c6a6..aee7e43 100644 --- a/Aeon/Entity/ComponentController.hpp +++ b/Aeon/Entity/ComponentController.hpp @@ -1,15 +1,48 @@ #ifndef AEON_ENTITY_COMPONENTCONTROLLER_H_ #define AEON_ENTITY_COMPONENTCONTROLLER_H_ -#include +#include namespace EC { +struct IComponentArr +{ + +}; + +template +struct ComponentArr : public IComponentArr +{ + + void Destroy(); +}; + class ComponentController { - +public: + ComponentController() + { + + } + ~ComponentController() + { + + } + + template + void Register() + { + const char* name = typeid(TComponent).name(); + std::cout << name << std::endl; + } + + +private: + std::map + + }; } diff --git a/Aeon/Entity/Entity.hpp b/Aeon/Entity/Entity.hpp index ed1be9e..00707ae 100644 --- a/Aeon/Entity/Entity.hpp +++ b/Aeon/Entity/Entity.hpp @@ -6,10 +6,9 @@ namespace EC { -template struct Entity { - T id; + uint32_t id; inline bool operator==( const Entity& rhs ) { diff --git a/Aeon/Entity/EntityController.cpp b/Aeon/Entity/EntityController.cpp deleted file mode 100644 index fd40910..0000000 --- a/Aeon/Entity/EntityController.cpp +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/Aeon/Entity/EntityController.hpp b/Aeon/Entity/EntityController.hpp index 0e11192..94005dc 100644 --- a/Aeon/Entity/EntityController.hpp +++ b/Aeon/Entity/EntityController.hpp @@ -13,8 +13,14 @@ namespace EC class EntityRegistry { public: - EntityRegistry(); - ~EntityRegistry(); + EntityRegistry() + { + + } + ~EntityRegistry() + { + + } Entity& Create(); Entity& Copy(const Entity& entity); @@ -47,7 +53,7 @@ public: // std::vector Sort(std::function<; private: - // std::map, std::vector< + // std::map, std::vector #include +#include + class BackgroundLevel : public Core::GameLayer { }; @@ -104,8 +106,17 @@ public: }; + +struct GenericComponent +{ + int x,y; +}; + int main( int argc, char** argv ) { + EC::ComponentController cController; + + cController.Register(); ExampleGame game; return 0;