From 6eaefb4dd401a1c5e9cc7fb8e909521e045c0710 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sat, 14 Mar 2015 16:33:29 -0400 Subject: Removed some unnecessary header transculsions --- src/components.cpp | 1 + src/components.h | 10 ++++++---- src/entity.h | 10 +++++----- src/entityfactory.cpp | 1 + src/entityfactory.h | 7 +++---- src/game.cpp | 1 + src/game.h | 9 +++++---- src/map.cpp | 1 + 8 files changed, 23 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/components.cpp b/src/components.cpp index ba4fe72..e41e2cd 100644 --- a/src/components.cpp +++ b/src/components.cpp @@ -1,6 +1,7 @@ #include "components.h" #include "game.h" #include "muxer.h" +#include "map.h" // User movement component diff --git a/src/components.h b/src/components.h index 3d80d1a..2ec19ff 100644 --- a/src/components.h +++ b/src/components.h @@ -1,11 +1,13 @@ #ifndef COMPONENTS_H #define COMPONENTS_H -#include "entity.h" #include #include -#include "map.h" -#include +#include "renderer.h" +#include "entity.h" +#include "game.h" + +class Map; class UserMovementComponent : public Component { public: @@ -33,7 +35,7 @@ class PlayerSpriteComponent : public Component { void receive(Game& game, Entity& entity, const Message& msg); private: - Texture sprite{"../res/Starla.png"}; + Texture sprite {"../res/Starla.png"}; int animFrame = 0; bool facingLeft = false; bool isMoving = false; diff --git a/src/entity.h b/src/entity.h index 44ce973..26febfb 100644 --- a/src/entity.h +++ b/src/entity.h @@ -1,13 +1,13 @@ #ifndef ENTITY_H #define ENTITY_H -class Entity; -class Component; - #include #include "renderer.h" -#include "game.h" -#include "map.h" + +class Game; +class Map; +class Entity; +class Component; class Message { public: diff --git a/src/entityfactory.cpp b/src/entityfactory.cpp index acf9b8e..3fcb9ed 100644 --- a/src/entityfactory.cpp +++ b/src/entityfactory.cpp @@ -3,6 +3,7 @@ #include "components.h" #include "muxer.h" #include +#include struct EntityData { char* sprite; diff --git a/src/entityfactory.h b/src/entityfactory.h index a35b5f7..7b8f399 100644 --- a/src/entityfactory.h +++ b/src/entityfactory.h @@ -1,11 +1,10 @@ #ifndef ENTITYFACTORY_H #define ENTITYFACTORY_H -#include "entity.h" -#include #include -#include -#include "map.h" + +class Entity; +class Map; class EntityFactory { public: diff --git a/src/game.cpp b/src/game.cpp index 1ff3f4f..68c0a13 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -3,6 +3,7 @@ #include "components.h" #include "muxer.h" #include "entityfactory.h" +#include "map.h" Game::Game() { diff --git a/src/game.h b/src/game.h index ab8b906..065aca8 100644 --- a/src/game.h +++ b/src/game.h @@ -1,12 +1,13 @@ #ifndef GAME_H #define GAME_H -class Game; - -#include "map.h" #include -#include "entity.h" #include +#include "renderer.h" +#include + +class Entity; +class Map; const int TILE_WIDTH = 8; const int TILE_HEIGHT = 8; diff --git a/src/map.cpp b/src/map.cpp index 8c1c6f0..2be5071 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -5,6 +5,7 @@ #include #include #include "entityfactory.h" +#include "entity.h" static std::map maps; -- cgit 1.4.1