Better file structure, stuff is better in general
This commit is contained in:
parent
40a568c502
commit
d8b164e472
@ -2,18 +2,17 @@
|
|||||||
# Logan Hunt
|
# Logan Hunt
|
||||||
# Summary:
|
# Summary:
|
||||||
# Play the game asteroids
|
# Play the game asteroids
|
||||||
# Above and Beyond
|
# Above and Beyond (Extra Credit)
|
||||||
# Changed colors
|
# Changed colors
|
||||||
# Added fuel
|
# Added fuel
|
||||||
# rotation: -1 units/frame
|
# rotation: -1 units/frame
|
||||||
# movement: -3 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
|
# not hit ship
|
||||||
# There's a chance of medium asteroids spawning at the start
|
# There's a chance of medium asteroids spawning at the start
|
||||||
# The initial amount of large rocks is random
|
# The initial amount of large rocks is random
|
||||||
###############################################################
|
###############################################################
|
||||||
|
|
||||||
|
|
||||||
LFLAGS = -lglut -lGLU -lGL
|
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
|
# bullet.o The bullets fired from the ship
|
||||||
# rocks.o Contains all of the Rock classes
|
# 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
|
g++ -c uiDraw.cpp
|
||||||
|
|
||||||
uiInteract.o: uiInteract.cpp uiInteract.h
|
uiInteract.o: uiInteract.cpp ../include/uiInteract.h
|
||||||
g++ -c uiInteract.cpp
|
g++ -c uiInteract.cpp
|
||||||
|
|
||||||
point.o: point.cpp point.h
|
point.o: point.cpp ../include/point.h
|
||||||
g++ -c point.cpp
|
g++ -c point.cpp
|
||||||
|
|
||||||
driver.o: driver.cpp game.h
|
driver.o: driver.cpp ../include/game.h
|
||||||
g++ -c driver.cpp
|
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
|
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
|
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
|
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
|
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
|
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
|
g++ -c rocks.cpp
|
||||||
|
|
||||||
###############################################################
|
###############################################################
|
@ -1,5 +1,5 @@
|
|||||||
#include "bullet.h"
|
#include "../include/bullet.h"
|
||||||
#include "ship.h"
|
#include "../include/ship.h"
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
#define M_PI 3.14159265
|
#define M_PI 3.14159265
|
||||||
|
BIN
src/bullet.o
Normal file
BIN
src/bullet.o
Normal file
Binary file not shown.
@ -7,8 +7,8 @@
|
|||||||
* that specifies what methods of the game class are
|
* that specifies what methods of the game class are
|
||||||
* called each time through the game loop.
|
* called each time through the game loop.
|
||||||
******************************************************/
|
******************************************************/
|
||||||
#include "game.h"
|
#include "../include/game.h"
|
||||||
#include "uiInteract.h"
|
#include "../include/uiInteract.h"
|
||||||
|
|
||||||
/*************************************
|
/*************************************
|
||||||
* All the interesting work happens here, when
|
* All the interesting work happens here, when
|
||||||
|
BIN
src/driver.o
Normal file
BIN
src/driver.o
Normal file
Binary file not shown.
@ -1,4 +1,4 @@
|
|||||||
#include "flyingObject.h"
|
#include "../include/flyingObject.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
// Advance flyingobjects
|
// Advance flyingobjects
|
||||||
|
BIN
src/flyingObject.o
Normal file
BIN
src/flyingObject.o
Normal file
Binary file not shown.
@ -5,9 +5,9 @@
|
|||||||
*
|
*
|
||||||
*********************************************************************/
|
*********************************************************************/
|
||||||
|
|
||||||
#include "game.h"
|
#include "../include/game.h"
|
||||||
#include "uiDraw.h"
|
#include "../include/uiDraw.h"
|
||||||
#include "bullet.h"
|
#include "../include/bullet.h"
|
||||||
// These are needed for the getClosestDistance function...
|
// These are needed for the getClosestDistance function...
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
BIN
src/game.o
Normal file
BIN
src/game.o
Normal file
Binary file not shown.
@ -8,9 +8,9 @@
|
|||||||
* the location and the bounds.
|
* the location and the bounds.
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
#include "point.h"
|
#include "../include/point.h"
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include "uiDraw.h"
|
#include "../include/uiDraw.h"
|
||||||
using namespace std;
|
using namespace std;
|
||||||
/******************************************
|
/******************************************
|
||||||
* POINT : CONSTRUCTOR WITH X,Y
|
* POINT : CONSTRUCTOR WITH X,Y
|
||||||
|
BIN
src/point.o
Normal file
BIN
src/point.o
Normal file
Binary file not shown.
@ -1,5 +1,5 @@
|
|||||||
#include "rocks.h"
|
#include "../include/rocks.h"
|
||||||
#include "uiDraw.h"
|
#include "../include/uiDraw.h"
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#define M_PI 3.14159265
|
#define M_PI 3.14159265
|
||||||
|
|
||||||
|
BIN
src/rocks.o
Normal file
BIN
src/rocks.o
Normal file
Binary file not shown.
@ -1,5 +1,5 @@
|
|||||||
#include "ship.h"
|
#include "../include/ship.h"
|
||||||
#include "bullet.h"
|
#include "../include/bullet.h"
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
|
BIN
src/ship.o
Normal file
BIN
src/ship.o
Normal file
Binary file not shown.
@ -34,8 +34,8 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
#endif // _WIN32
|
#endif // _WIN32
|
||||||
|
|
||||||
#include "point.h"
|
#include "../include/point.h"
|
||||||
#include "uiDraw.h"
|
#include "../include/uiDraw.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
BIN
src/uiDraw.o
Normal file
BIN
src/uiDraw.o
Normal file
Binary file not shown.
@ -38,8 +38,8 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
#endif // _WIN32
|
#endif // _WIN32
|
||||||
|
|
||||||
#include "uiInteract.h"
|
#include "../include/uiInteract.h"
|
||||||
#include "point.h"
|
#include "../include/point.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
BIN
src/uiInteract.o
Normal file
BIN
src/uiInteract.o
Normal file
Binary file not shown.
@ -1,4 +1,4 @@
|
|||||||
#include "velocity.h"
|
#include "../include/velocity.h"
|
||||||
|
|
||||||
// Default velocity constructor
|
// Default velocity constructor
|
||||||
Velocity :: Velocity ()
|
Velocity :: Velocity ()
|
||||||
@ -7,7 +7,7 @@ Velocity :: Velocity ()
|
|||||||
setDy ( 0.0 );
|
setDy ( 0.0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Velocity constructor
|
// Velocity constructor with data
|
||||||
Velocity :: Velocity ( float dx , float dy )
|
Velocity :: Velocity ( float dx , float dy )
|
||||||
{
|
{
|
||||||
setDx ( dx );
|
setDx ( dx );
|
||||||
|
BIN
src/velocity.o
Normal file
BIN
src/velocity.o
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user