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.
24 lines
459 B
24 lines
459 B
#pragma once
|
|
#include "SDL.h"
|
|
|
|
#include "vector2.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_Surface* surface)
|
|
{
|
|
SDL_Rect rect{ this->x, this->y, this->radius, this->radius };
|
|
SDL_FillRect(surface, &rect, SDL_MapRGB(surface->format, 0xFF, 0xFF, 0xFF));
|
|
}
|
|
}; |