SRCS := entityManager.cpp
+SRCS += entityCreator.cpp
SRCS += game.cpp
SRCS += main.cpp
SRCS += mathw.cpp
all: ${TARGET}
${TARGET}: ${OBJS}
- ${CXX} ${CXXFLAGS} -o ${TARGET} $^ ${LIBS}
- @echo ""
+ @echo "${CXX}: $@"
+ @${CXX} ${CXXFLAGS} -o ${TARGET} $^ ${LIBS}
# how to make a depend file from a source file
%.d: %.cpp
@echo "DEP: $@"
@${CXX} -M ${CXXFLAGS} $< | sed 's,: , $@: ,' > $@
-
#@${CXX} -M ${CXXFLAGS} $< | sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' > $@
+%.o: %.cpp
+ @echo "${CXX}: $@"
+ @${CXX} ${CXXFLAGS} -c -o $@ $<
+
.PHONY: clean
clean:
--- /dev/null
+#include "entityCreator.h"
+
+void creator::init()
+{
+
+}
+void creator::clean()
+{
+
+}
+
+void creator::addBall()
+{
+
+}
+void creator::removeBall()
+{
+
+}
+void creator::removeAllBalls()
+{
+
+}
--- /dev/null
+#ifndef ENTITYCREATOR_H
+#define ENTITYCREATOR_H
+
+//#include "Entities/Entity.h"
+
+/// ***** Header Methods *****
+namespace creator
+{
+ void init();
+ void clean();
+
+ void addBall();
+ void removeBall();
+ void removeAllBalls();
+}
+#endif // ENTITYCREATOR_H
-#include "entityManager.h"
-#include "Entities/Entity.h"
-#include "Entities/Particle.h"
-#include "Entities/PhysicsEntity.h"
-
#include <set>
using std::set;
#include <iostream>
+#include "entityManager.h"
+#include "Entities/Entity.h"
+#include "Entities/Particle.h"
+#include "Entities/PhysicsEntity.h"
+
/// ***** Private Method Headers *****
void updateParticles(float);
void updatePhysics(float);
+#include <vector>
+using std::vector;
+
#include "game.h"
+#include "debug.h"
+#include "entityCreator.h"
+
#include "GameStates/GameState.h"
#include "GameStates/Running.h"
#include "GameStates/Paused.h"
#include "GameStates/CreatingPolygon.h"
-#include <vector>
-using std::vector;
-
-
/// ***** Private Variables *****
// The stack of active game states
running = new Running();
paused = new Paused();
creating_Polygon = new CreatingPolygon();
+
+ // create starting entities
+
+ creator::init();
+
+#ifdef DEBUGGING
+ cout << "World Created" << endl;
+#endif
}
void gameClean()
{
+ creator::clean();
+
delete creating_Polygon;
delete paused;
delete running;
#ifdef DEBUGGING
cout << "Initialization Complete" << endl;
#endif
-
- // create starting entities
-
-#ifdef DEBUGGING
- cout << "World Created" << endl;
-#endif
}
void cleanUp()