From 5083033a4b012397cb6cb5a17a2ab12e2be1633d Mon Sep 17 00:00:00 2001 From: Sebastian Krzyszkowiak Date: Fri, 28 Sep 2012 16:43:13 +0200 Subject: [PATCH] more reorganization --- src/CMakeLists.txt | 10 +++++----- src/levels/level1.c | 4 ++-- src/levels/level2.c | 2 +- src/levels/level3.c | 2 +- src/levels/level4.c | 2 +- src/levels/level5.c | 2 +- src/levels/level6.c | 2 +- src/levels/{ => modules}/dodger.c | 4 ++-- src/levels/{ => modules}/dodger.h | 2 +- src/levels/{ => modules}/dodger/actions.c | 4 ++-- src/levels/{ => modules}/dodger/actions.h | 4 ++-- src/levels/{ => modules}/dodger/callbacks.c | 0 src/levels/{ => modules}/dodger/callbacks.h | 2 +- src/levels/{ => modules}/moonwalk.c | 2 +- src/levels/{ => modules}/moonwalk.h | 2 +- 15 files changed, 22 insertions(+), 22 deletions(-) rename src/levels/{ => modules}/dodger.c (99%) rename src/levels/{ => modules}/dodger.h (98%) rename src/levels/{ => modules}/dodger/actions.c (99%) rename src/levels/{ => modules}/dodger/actions.h (96%) rename src/levels/{ => modules}/dodger/callbacks.c (100%) rename src/levels/{ => modules}/dodger/callbacks.h (98%) rename src/levels/{ => modules}/moonwalk.c (99%) rename src/levels/{ => modules}/moonwalk.h (98%) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 439f848..f73fd63 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -17,11 +17,11 @@ SET(SRC_LIST levels/level4.c levels/level5.c levels/level6.c - levels/moonwalk.c - levels/dodger.c - levels/actions.c - levels/dodger/actions.c - levels/dodger/callbacks.c + levels/actions.c + levels/modules/moonwalk.c + levels/modules/dodger.c + levels/modules/dodger/actions.c + levels/modules/dodger/callbacks.c ) find_package(Allegro5 REQUIRED) diff --git a/src/levels/level1.c b/src/levels/level1.c index 123829e..bf1eed1 100644 --- a/src/levels/level1.c +++ b/src/levels/level1.c @@ -20,9 +20,9 @@ */ #include #include "../gamestates/level.h" -#include "dodger.h" #include "actions.h" -#include "dodger/actions.h" +#include "modules/dodger.h" +#include "modules/dodger/actions.h" void Level1_Load(struct Game *game) { Dodger_Load(game); diff --git a/src/levels/level2.c b/src/levels/level2.c index d5a0f55..ac98710 100644 --- a/src/levels/level2.c +++ b/src/levels/level2.c @@ -20,7 +20,7 @@ */ #include #include "../gamestates/level.h" -#include "moonwalk.h" +#include "modules/moonwalk.h" void Level2_Load(struct Game *game) { Moonwalk_Load(game); diff --git a/src/levels/level3.c b/src/levels/level3.c index 902cefe..6869f6c 100644 --- a/src/levels/level3.c +++ b/src/levels/level3.c @@ -20,7 +20,7 @@ */ #include #include "../gamestates/level.h" -#include "moonwalk.h" +#include "modules/moonwalk.h" void Level3_Load(struct Game *game) { Moonwalk_Load(game); diff --git a/src/levels/level4.c b/src/levels/level4.c index 50d979f..3308fb2 100644 --- a/src/levels/level4.c +++ b/src/levels/level4.c @@ -20,7 +20,7 @@ */ #include #include "../gamestates/level.h" -#include "moonwalk.h" +#include "modules/moonwalk.h" void Level4_Load(struct Game *game) { Moonwalk_Load(game); diff --git a/src/levels/level5.c b/src/levels/level5.c index a582489..aa59d34 100644 --- a/src/levels/level5.c +++ b/src/levels/level5.c @@ -20,7 +20,7 @@ */ #include #include "../gamestates/level.h" -#include "moonwalk.h" +#include "modules/moonwalk.h" void Level5_Load(struct Game *game) { Moonwalk_Load(game); diff --git a/src/levels/level6.c b/src/levels/level6.c index d4b36b6..6b94b3a 100644 --- a/src/levels/level6.c +++ b/src/levels/level6.c @@ -20,7 +20,7 @@ */ #include #include "../gamestates/level.h" -#include "moonwalk.h" +#include "modules/moonwalk.h" void Level6_Load(struct Game *game) { Moonwalk_Load(game); diff --git a/src/levels/dodger.c b/src/levels/modules/dodger.c similarity index 99% rename from src/levels/dodger.c rename to src/levels/modules/dodger.c index 8f5a79d..976e832 100644 --- a/src/levels/dodger.c +++ b/src/levels/modules/dodger.c @@ -20,9 +20,9 @@ */ #include #include -#include "../gamestates/level.h" +#include "../../gamestates/level.h" +#include "../actions.h" #include "dodger.h" -#include "actions.h" #include "dodger/actions.h" void Dodger_Logic(struct Game *game) { diff --git a/src/levels/dodger.h b/src/levels/modules/dodger.h similarity index 98% rename from src/levels/dodger.h rename to src/levels/modules/dodger.h index e4ecf04..94bbf80 100644 --- a/src/levels/dodger.h +++ b/src/levels/modules/dodger.h @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "../main.h" +#include "../../main.h" void Dodger_Draw(struct Game *game); void Dodger_Logic(struct Game *game); diff --git a/src/levels/dodger/actions.c b/src/levels/modules/dodger/actions.c similarity index 99% rename from src/levels/dodger/actions.c rename to src/levels/modules/dodger/actions.c index 6fa73f0..6ff69a4 100644 --- a/src/levels/dodger/actions.c +++ b/src/levels/modules/dodger/actions.c @@ -21,8 +21,8 @@ #include "actions.h" #include "callbacks.h" -#include "../actions.h" -#include "../../gamestates/level.h" +#include "../../actions.h" +#include "../../../gamestates/level.h" bool Accelerate(struct Game *game, struct TM_Action *action, enum TM_ActionState state) { diff --git a/src/levels/dodger/actions.h b/src/levels/modules/dodger/actions.h similarity index 96% rename from src/levels/dodger/actions.h rename to src/levels/modules/dodger/actions.h index 88d8b45..dd4cc96 100644 --- a/src/levels/dodger/actions.h +++ b/src/levels/modules/dodger/actions.h @@ -19,8 +19,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "../../main.h" -#include "../../timeline.h" +#include "../../../main.h" +#include "../../../timeline.h" /*! \brief Accelerate current speed game until threshold is reached */ bool Accelerate(struct Game *game, struct TM_Action *action, enum TM_ActionState state); diff --git a/src/levels/dodger/callbacks.c b/src/levels/modules/dodger/callbacks.c similarity index 100% rename from src/levels/dodger/callbacks.c rename to src/levels/modules/dodger/callbacks.c diff --git a/src/levels/dodger/callbacks.h b/src/levels/modules/dodger/callbacks.h similarity index 98% rename from src/levels/dodger/callbacks.h rename to src/levels/modules/dodger/callbacks.h index 860fcde..3c6fed8 100644 --- a/src/levels/dodger/callbacks.h +++ b/src/levels/modules/dodger/callbacks.h @@ -19,7 +19,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "../../main.h" +#include "../../../main.h" /*! \brief Move up or down until reaching the edge of the screen. After that - change direction. */ void Obst_MoveUpDown(struct Game *game, struct Obstacle *obstacle); diff --git a/src/levels/moonwalk.c b/src/levels/modules/moonwalk.c similarity index 99% rename from src/levels/moonwalk.c rename to src/levels/modules/moonwalk.c index 285ae75..84f2a17 100644 --- a/src/levels/moonwalk.c +++ b/src/levels/modules/moonwalk.c @@ -20,7 +20,7 @@ */ #include #include -#include "../gamestates/level.h" +#include "../../gamestates/level.h" #include "moonwalk.h" void Moonwalk_Logic(struct Game *game) { diff --git a/src/levels/moonwalk.h b/src/levels/modules/moonwalk.h similarity index 98% rename from src/levels/moonwalk.h rename to src/levels/modules/moonwalk.h index 6891df5..cd5531f 100644 --- a/src/levels/moonwalk.h +++ b/src/levels/modules/moonwalk.h @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "../main.h" +#include "../../main.h" void Moonwalk_Draw(struct Game *game); void Moonwalk_Logic(struct Game *game);