general stuff

This commit is contained in:
Solomon W. 2020-06-01 13:19:35 -04:00
parent 5969248278
commit 8780ff977c
4 changed files with 27 additions and 3 deletions

View File

@ -12,6 +12,7 @@ Circle::Circle(Vector c, int r) {
center.y = c.y;
radius = r;
}
Circle::Circle() {}
void Circle::translate(Vector vec) {
if(vec.x != 0) {
@ -38,4 +39,13 @@ void Circle::render(SDL_Renderer *renderer) {
}
}
SDL_SetRenderDrawColor(renderer,r,g,b,a);
}
}
/*
bool Circle::isInitialized() {
if(center.x == NULL) {
return false;
} else {
return true;
}
}*/

View File

@ -3,6 +3,8 @@
#include "Vector.h"
#include "Color.h"
#ifndef CIRCLE
#define CIRCLE
class Circle {
private:
int testpoint(int x,int y) {
@ -26,4 +28,6 @@ class Circle {
void render(SDL_Renderer *renderer);
void translate(Vector vec);
void setColor(Color c);
};
//bool isInitialized();
};
#endif

View File

@ -87,4 +87,13 @@ std::vector<int> Quad::yvalues() {
values.push_back(botR.y);
values.push_back(botL.y);
return values;
}
}
/*
bool Quad::isInitialized() {
if(topL.x != NULL) {
return true;
} else {
return false;
}
}*/

View File

@ -16,4 +16,5 @@ class Quad {
void setColor(Color c);
void render(SDL_Renderer *renderer);
void translate(Vector vec);
//bool isInitialized();
};