Better file structure, stuff is better in general

This commit is contained in:
Simponic 2020-08-13 12:07:52 -06:00
parent 40a568c502
commit d8b164e472
31 changed files with 33 additions and 34 deletions

View File

@ -2,18 +2,17 @@
# Logan Hunt
# Summary:
# Play the game asteroids
# Above and Beyond
# Above and Beyond (Extra Credit)
# Changed colors
# 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
###############################################################

BIN
src/a.out Executable file

Binary file not shown.

View File

@ -1,5 +1,5 @@
#include "bullet.h"
#include "ship.h"
#include "../include/bullet.h"
#include "../include/ship.h"
#include <cmath>
#define M_PI 3.14159265

BIN
src/bullet.o Normal file

Binary file not shown.

View File

@ -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

BIN
src/driver.o Normal file

Binary file not shown.

View File

@ -1,4 +1,4 @@
#include "flyingObject.h"
#include "../include/flyingObject.h"
#include <iostream>
// Advance flyingobjects

BIN
src/flyingObject.o Normal file

Binary file not shown.

View File

@ -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 <limits>
#include <iostream>

BIN
src/game.o Normal file

Binary file not shown.

View File

@ -8,9 +8,9 @@
* the location and the bounds.
************************************************************************/
#include "point.h"
#include "../include/point.h"
#include <cassert>
#include "uiDraw.h"
#include "../include/uiDraw.h"
using namespace std;
/******************************************
* POINT : CONSTRUCTOR WITH X,Y

BIN
src/point.o Normal file

Binary file not shown.

View File

@ -1,5 +1,5 @@
#include "rocks.h"
#include "uiDraw.h"
#include "../include/rocks.h"
#include "../include/uiDraw.h"
#include <cmath>
#define M_PI 3.14159265

BIN
src/rocks.o Normal file

Binary file not shown.

View File

@ -1,5 +1,5 @@
#include "ship.h"
#include "bullet.h"
#include "../include/ship.h"
#include "../include/bullet.h"
#include <cmath>

BIN
src/ship.o Normal file

Binary file not shown.

View File

@ -34,8 +34,8 @@
#include <math.h>
#endif // _WIN32
#include "point.h"
#include "uiDraw.h"
#include "../include/point.h"
#include "../include/uiDraw.h"
using namespace std;

BIN
src/uiDraw.o Normal file

Binary file not shown.

View File

@ -38,8 +38,8 @@
#include <math.h>
#endif // _WIN32
#include "uiInteract.h"
#include "point.h"
#include "../include/uiInteract.h"
#include "../include/point.h"
using namespace std;

BIN
src/uiInteract.o Normal file

Binary file not shown.

View File

@ -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 );

BIN
src/velocity.o Normal file

Binary file not shown.