mirror of https://github.com/kurisufriend/threedee
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
458 B
26 lines
458 B
#pragma once
|
|
#include "SDL.h"
|
|
|
|
#include "vector2.h"
|
|
#include "argb.h"
|
|
/*
|
|
squares are the basic 2D entity
|
|
*/
|
|
struct square : public vector2
|
|
{
|
|
int radius;
|
|
square() : vector2()
|
|
{
|
|
this->radius = 0;
|
|
}
|
|
square(float x_, float y_, int radius_) : vector2(x_, y_)
|
|
{
|
|
this->radius = radius_;
|
|
}
|
|
void run(SDL_Renderer* renderer)
|
|
{
|
|
SETRENDER_WHITE;
|
|
SDL_Rect rect{ this->x, this->y, this->radius, this->radius };
|
|
SDL_RenderFillRect(renderer, &rect);
|
|
}
|
|
}; |