1
0
Fork 0
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

36 Zeilen
551 B

#include "glrect.h"
GLRect::GLRect() {
set(0.0f, 0.0f, 0.0f, 0.0f);
}
GLRect::GLRect(float _x, float _y, float _w, float _h) {
set(_x, _y, _w, _h);
}
GLRect::GLRect(const SDL_Rect &r) {
set(r.x, r.y, r.w, r.h);
}
void GLRect::set(float _x, float _y, float _w, float _h) {
x = _x;
y = _y;
w = _w;
h = _h;
}
void GLRect::setPoint(float _x, float _y) {
x = _x;
y = _y;
}
void GLRect::setDim(float _w, float _h) {
w = _w;
h = _h;
}
SDL_Rect GLRect::getSDLRect() {
SDL_Rect tmp = {(Uint8)x, (Uint8)y, (Uint8)w, (Uint8)h};
return tmp;
}