major refactor

This commit is contained in:
2026-07-06 17:33:52 -07:00
parent 64dbdb670c
commit a3142a6b18
7 changed files with 119 additions and 465 deletions
+9 -21
View File
@@ -12,6 +12,12 @@ namespace UwU {
this->g = (hex & 0x00ff0000) >> 16;
this->r = (hex & 0xff000000) >> 24;
}
Color(uint8_t r, uint8_t g, uint8_t b, uint8_t a) {
this->r = r;
this->g = g;
this->b = b;
this->a = a;
}
Color() {}
uint8_t r;
uint8_t g;
@@ -21,13 +27,13 @@ namespace UwU {
// Coord2 datatype for xy coordinates, from top-left of surface
struct Coord2 {
Coord2(uint32_t x, uint32_t y) {
Coord2(uint16_t x, uint16_t y) {
this->x = x;
this->y = y;
}
Coord2() {}
uint32_t x;
uint32_t y;
uint16_t x;
uint16_t y;
};
// trapezoid datatype (horizontally constrained)
@@ -48,22 +54,4 @@ namespace UwU {
uint16_t xr0;
uint16_t xr1;
};
struct Triangle {
Triangle(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2) {
this->x0 = x0;
this->y0 = y0;
this->x1 = x1;
this->y1 = y1;
this->x2 = x2;
this->y2 = y2;
}
Triangle() {}
uint16_t x0;
uint16_t y0;
uint16_t x1;
uint16_t y1;
uint16_t x2;
uint16_t y2;
};
}