diff --git a/src/bullet.h b/include/bullet.h similarity index 100% rename from src/bullet.h rename to include/bullet.h diff --git a/src/flyingObject.h b/include/flyingObject.h similarity index 100% rename from src/flyingObject.h rename to include/flyingObject.h diff --git a/src/game.h b/include/game.h similarity index 100% rename from src/game.h rename to include/game.h diff --git a/src/point.h b/include/point.h similarity index 100% rename from src/point.h rename to include/point.h diff --git a/src/rocks.h b/include/rocks.h similarity index 100% rename from src/rocks.h rename to include/rocks.h diff --git a/src/ship.h b/include/ship.h similarity index 100% rename from src/ship.h rename to include/ship.h diff --git a/src/uiDraw.h b/include/uiDraw.h similarity index 100% rename from src/uiDraw.h rename to include/uiDraw.h diff --git a/src/uiInteract.h b/include/uiInteract.h similarity index 100% rename from src/uiInteract.h rename to include/uiInteract.h diff --git a/src/velocity.h b/include/velocity.h similarity index 100% rename from src/velocity.h rename to include/velocity.h diff --git a/src/makefile b/src/Makefile similarity index 62% rename from src/makefile rename to src/Makefile index 22b20f7..d4e921a 100644 --- a/src/makefile +++ b/src/Makefile @@ -2,18 +2,17 @@ # Logan Hunt # Summary: # Play the game asteroids -# Above and Beyond +# Above and Beyond (Extra Credit) # Changed colors -# Added fuel +# Added fuel # rotation: -1 units/frame # movement: -3 units/frame -# Made sure that initially, trajectories of rocks will +# Made sure that initially, trajectories of spawned rocks will # not hit ship # There's a chance of medium asteroids spawning at the start # The initial amount of large rocks is random ############################################################### - LFLAGS = -lglut -lGLU -lGL ############################################################### @@ -34,34 +33,34 @@ a.out: driver.o game.o uiInteract.o uiDraw.o point.o velocity.o flyingObject.o s # bullet.o The bullets fired from the ship # rocks.o Contains all of the Rock classes ############################################################### -uiDraw.o: uiDraw.cpp uiDraw.h +uiDraw.o: uiDraw.cpp ../include/uiDraw.h g++ -c uiDraw.cpp -uiInteract.o: uiInteract.cpp uiInteract.h +uiInteract.o: uiInteract.cpp ../include/uiInteract.h g++ -c uiInteract.cpp -point.o: point.cpp point.h +point.o: point.cpp ../include/point.h g++ -c point.cpp -driver.o: driver.cpp game.h +driver.o: driver.cpp ../include/game.h g++ -c driver.cpp -game.o: game.cpp game.h uiDraw.h uiInteract.h point.h velocity.h flyingObject.h bullet.h rocks.h ship.h +game.o: game.cpp ../include/game.h ../include/uiDraw.h ../include/uiInteract.h ../include/point.h ../include/velocity.h ../include/flyingObject.h ../include/bullet.h ../include/rocks.h ../include/ship.h g++ -c game.cpp -velocity.o: velocity.cpp velocity.h point.h +velocity.o: velocity.cpp ../include/velocity.h ../include/point.h g++ -c velocity.cpp -flyingObject.o: flyingObject.cpp flyingObject.h point.h velocity.h uiDraw.h +flyingObject.o: flyingObject.cpp ../include/flyingObject.h ../include/point.h ../include/velocity.h ../include/uiDraw.h g++ -c flyingObject.cpp -ship.o: ship.cpp ship.h flyingObject.h point.h velocity.h uiDraw.h +ship.o: ship.cpp ../include/ship.h ../include/flyingObject.h ../include/point.h ../include/velocity.h ../include/uiDraw.h g++ -c ship.cpp -bullet.o: bullet.cpp bullet.h flyingObject.h point.h velocity.h uiDraw.h +bullet.o: bullet.cpp ../include/bullet.h ../include/flyingObject.h ../include/point.h ../include/velocity.h ../include/uiDraw.h g++ -c bullet.cpp -rocks.o: rocks.cpp rocks.h flyingObject.h point.h velocity.h uiDraw.h +rocks.o: rocks.cpp ../include/rocks.h ../include/flyingObject.h ../include/point.h ../include/velocity.h ../include/uiDraw.h g++ -c rocks.cpp ############################################################### diff --git a/src/a.out b/src/a.out new file mode 100755 index 0000000..41f0db3 Binary files /dev/null and b/src/a.out differ diff --git a/src/bullet.cpp b/src/bullet.cpp index 69fb603..b2ea253 100644 --- a/src/bullet.cpp +++ b/src/bullet.cpp @@ -1,5 +1,5 @@ -#include "bullet.h" -#include "ship.h" +#include "../include/bullet.h" +#include "../include/ship.h" #include #define M_PI 3.14159265 diff --git a/src/bullet.o b/src/bullet.o new file mode 100644 index 0000000..66eff87 Binary files /dev/null and b/src/bullet.o differ diff --git a/src/driver.cpp b/src/driver.cpp index 5e1b9a5..06d7ca1 100644 --- a/src/driver.cpp +++ b/src/driver.cpp @@ -7,8 +7,8 @@ * that specifies what methods of the game class are * called each time through the game loop. ******************************************************/ -#include "game.h" -#include "uiInteract.h" +#include "../include/game.h" +#include "../include/uiInteract.h" /************************************* * All the interesting work happens here, when diff --git a/src/driver.o b/src/driver.o new file mode 100644 index 0000000..c1b4d8a Binary files /dev/null and b/src/driver.o differ diff --git a/src/flyingObject.cpp b/src/flyingObject.cpp index 149e3f5..08d195b 100644 --- a/src/flyingObject.cpp +++ b/src/flyingObject.cpp @@ -1,4 +1,4 @@ -#include "flyingObject.h" +#include "../include/flyingObject.h" #include // Advance flyingobjects diff --git a/src/flyingObject.o b/src/flyingObject.o new file mode 100644 index 0000000..127099c Binary files /dev/null and b/src/flyingObject.o differ diff --git a/src/game.cpp b/src/game.cpp index f7d4054..2430a10 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -5,9 +5,9 @@ * *********************************************************************/ -#include "game.h" -#include "uiDraw.h" -#include "bullet.h" +#include "../include/game.h" +#include "../include/uiDraw.h" +#include "../include/bullet.h" // These are needed for the getClosestDistance function... #include #include diff --git a/src/game.o b/src/game.o new file mode 100644 index 0000000..09aba02 Binary files /dev/null and b/src/game.o differ diff --git a/src/point.cpp b/src/point.cpp index cad96e4..a40e1ef 100644 --- a/src/point.cpp +++ b/src/point.cpp @@ -8,9 +8,9 @@ * the location and the bounds. ************************************************************************/ -#include "point.h" +#include "../include/point.h" #include -#include "uiDraw.h" +#include "../include/uiDraw.h" using namespace std; /****************************************** * POINT : CONSTRUCTOR WITH X,Y diff --git a/src/point.o b/src/point.o new file mode 100644 index 0000000..2427fb4 Binary files /dev/null and b/src/point.o differ diff --git a/src/rocks.cpp b/src/rocks.cpp index 7c3c13e..b29fb64 100644 --- a/src/rocks.cpp +++ b/src/rocks.cpp @@ -1,5 +1,5 @@ -#include "rocks.h" -#include "uiDraw.h" +#include "../include/rocks.h" +#include "../include/uiDraw.h" #include #define M_PI 3.14159265 diff --git a/src/rocks.o b/src/rocks.o new file mode 100644 index 0000000..0072788 Binary files /dev/null and b/src/rocks.o differ diff --git a/src/ship.cpp b/src/ship.cpp index 2eaa852..da21e69 100644 --- a/src/ship.cpp +++ b/src/ship.cpp @@ -1,5 +1,5 @@ -#include "ship.h" -#include "bullet.h" +#include "../include/ship.h" +#include "../include/bullet.h" #include diff --git a/src/ship.o b/src/ship.o new file mode 100644 index 0000000..4cd5e1a Binary files /dev/null and b/src/ship.o differ diff --git a/src/uiDraw.cpp b/src/uiDraw.cpp index 6d36f24..9e64706 100644 --- a/src/uiDraw.cpp +++ b/src/uiDraw.cpp @@ -34,8 +34,8 @@ #include #endif // _WIN32 -#include "point.h" -#include "uiDraw.h" +#include "../include/point.h" +#include "../include/uiDraw.h" using namespace std; diff --git a/src/uiDraw.o b/src/uiDraw.o new file mode 100644 index 0000000..0748021 Binary files /dev/null and b/src/uiDraw.o differ diff --git a/src/uiInteract.cpp b/src/uiInteract.cpp index 1e89833..bb9f8fe 100644 --- a/src/uiInteract.cpp +++ b/src/uiInteract.cpp @@ -38,8 +38,8 @@ #include #endif // _WIN32 -#include "uiInteract.h" -#include "point.h" +#include "../include/uiInteract.h" +#include "../include/point.h" using namespace std; diff --git a/src/uiInteract.o b/src/uiInteract.o new file mode 100644 index 0000000..b19d945 Binary files /dev/null and b/src/uiInteract.o differ diff --git a/src/velocity.cpp b/src/velocity.cpp index ceca109..ec64cf3 100644 --- a/src/velocity.cpp +++ b/src/velocity.cpp @@ -1,4 +1,4 @@ -#include "velocity.h" +#include "../include/velocity.h" // Default velocity constructor Velocity :: Velocity () @@ -7,7 +7,7 @@ Velocity :: Velocity () setDy ( 0.0 ); } -// Velocity constructor +// Velocity constructor with data Velocity :: Velocity ( float dx , float dy ) { setDx ( dx ); diff --git a/src/velocity.o b/src/velocity.o new file mode 100644 index 0000000..002241b Binary files /dev/null and b/src/velocity.o differ