diff --git a/include/Components.h b/include/Components.h deleted file mode 100644 index b6f506f..0000000 --- a/include/Components.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -#include "ECS.h" -#include "Component.h" -#include "Manager.h" -#include "Entity.h" -#include "TransformComponent.h" -#include "SpriteComponent.h" -#include "KeyboardController.h" -#include "ColliderComponent.h" -#include "TileComponent.h" -#include "ProjectileComponent.h" -#include "HealthComponent.h" diff --git a/include/Entity.h b/include/Entity.h index 82ed6a5..7e1fa88 100644 --- a/include/Entity.h +++ b/include/Entity.h @@ -9,6 +9,12 @@ #include "ECS.h" #include "Constants.h" +// TODO: remove here if possible +// temporary fix: addComponent function template doesnt know TransformComponent -> error undefined type +#include "TransformComponent.h" +#include "KeyboardController.h" +#include "SpriteComponent.h" + class Manager; class Component; diff --git a/include/Input.h b/include/Input.h index 3fc6f80..b0cdb1d 100644 --- a/include/Input.h +++ b/include/Input.h @@ -1,22 +1,6 @@ #include #include -class Input -{ -public: - Input(); - ~Input(); - - void pollEvents(); - bool isKeyDown(Key key); - -private: - const Uint8* m_keyStates; - SDL_Scancode mapKeyToSDL(Key key); - std::map m_keyMappings; - void InitKeyMappings(); -}; - enum class Key { UP, @@ -99,3 +83,19 @@ enum class Key BACKSLASH, GRAVE }; + +class Input +{ +public: + Input(); + ~Input(); + + void pollEvents(); + bool isKeyDown(Key key); + +private: + const Uint8* m_keyStates; + SDL_Scancode mapKeyToSDL(Key key); + std::map m_keyMappings; + void InitKeyMappings(); +}; diff --git a/src/AssetManager.cpp b/src/AssetManager.cpp index f759b19..27ac965 100644 --- a/src/AssetManager.cpp +++ b/src/AssetManager.cpp @@ -2,8 +2,9 @@ #include "TextureManager.h" #include "SoundManager.h" -#include "Components.h" +#include "ProjectileComponent.h" #include "Game.h" +#include "TextureDict.h" #include "TransformComponent.h" diff --git a/src/Game.cpp b/src/Game.cpp index e7ac1d4..5da420f 100644 --- a/src/Game.cpp +++ b/src/Game.cpp @@ -3,8 +3,10 @@ #include #include "CollisionHandler.h" -#include "Components.h" #include "AssetManager.h" +#include "SoundManager.h" +#include "KeyboardController.h" +#include "TileComponent.h" #include "Direction.h" #include "Entity.h" #include "HealthComponent.h" diff --git a/src/HealthComponent.cpp b/src/HealthComponent.cpp index 7bbaa60..25dd3ff 100644 --- a/src/HealthComponent.cpp +++ b/src/HealthComponent.cpp @@ -1,6 +1,5 @@ #include "HealthComponent.h" -#include "Components.h" #include "Direction.h" #include "Entity.h" #include "Game.h" diff --git a/src/ProjectileComponent.cpp b/src/ProjectileComponent.cpp index 957fc66..deb588d 100644 --- a/src/ProjectileComponent.cpp +++ b/src/ProjectileComponent.cpp @@ -1,7 +1,8 @@ #include "ProjectileComponent.h" #include "CollisionHandler.h" -#include "Components.h" +#include "SoundManager.h" +#include "TransformComponent.h" #include "Entity.h" #include "Game.h" #include "HealthComponent.h"