This commit is contained in:
Solomon W. 2020-06-04 23:13:09 -04:00
parent 356f646f95
commit de95a6317e
8 changed files with 25 additions and 11 deletions

View File

@ -1,5 +1,5 @@
CC = clang CC = clang
LINK = -lstdc++ -lSDL2 -lm -ldl -lSDL_gfx LINK = -lstdc++ -lSDL2 -lm -ldl #-lSDL_gfx
DBG = -Wall -g -gmodules -O0 DBG = -Wall -g -gmodules -O0
CC += $(DBG) CC += $(DBG)

View File

@ -1,6 +1,8 @@
#ifndef BOUND
#define BOUND
#include <cstddef> #include <cstddef>
#include "Quad.h" #include "Quad.h"
class BoundingBox { class BoundingBox {
private: private:
size_t parent; size_t parent;
@ -42,3 +44,4 @@ class BoundingBox {
void update(); void update();
void render(SDL_Renderer *rend); void render(SDL_Renderer *rend);
}; };
#endif

View File

@ -1,10 +1,11 @@
#ifndef CIRCLE
#define CIRCLE
#include <SDL2/SDL.h> #include <SDL2/SDL.h>
#include <cmath> #include <cmath>
#include "Vector.h" #include "Vector.h"
#include "Color.h" #include "Color.h"
#ifndef CIRCLE
#define CIRCLE
class Circle { class Circle {
private: private:
int testpoint(int x,int y) { int testpoint(int x,int y) {

View File

@ -1,7 +1,6 @@
#include <stdint.h>
#ifndef COLOR #ifndef COLOR
#define COLOR #define COLOR
#include <stdint.h>
#ifndef RED #ifndef RED
#define RED 255,0,0,255 #define RED 255,0,0,255

View File

@ -1,3 +1,5 @@
#ifndef QUAD
#define QUAD
#include <vector> #include <vector>
#include "SDL2/SDL.h" #include "SDL2/SDL.h"
#include "Vector.h" #include "Vector.h"
@ -18,3 +20,4 @@ class Quad {
void translate(Vector vec); void translate(Vector vec);
//bool isInitialized(); //bool isInitialized();
}; };
#endif

View File

@ -1,3 +1,6 @@
#ifndef WINDOW
#define WINDOW
#include <SDL2/SDL.h> #include <SDL2/SDL.h>
#include <SDL2/SDL_timer.h> #include <SDL2/SDL_timer.h>
#include "Color.h" #include "Color.h"
@ -12,3 +15,4 @@ class Window {
void setClearColor(Color c); void setClearColor(Color c);
void setClearColor(Uint8 r,Uint8 g,Uint8 b,Uint8 a); void setClearColor(Uint8 r,Uint8 g,Uint8 b,Uint8 a);
}; };
#endif

View File

@ -1,3 +1,6 @@
#ifndef PHYS
#define PHYS
#include "BoundingBox.h" #include "BoundingBox.h"
#include "Circle.h" #include "Circle.h"
#include <vector> #include <vector>
@ -20,3 +23,4 @@ class phys_obj {
int distanceTo(Circle c); int distanceTo(Circle c);
void setPosition(Vector vec); void setPosition(Vector vec);
}; };
#endif