Working on parser

This commit is contained in:
2023-04-23 18:46:03 -07:00
parent c269841236
commit 3be64a40e7
12 changed files with 232 additions and 5 deletions

View File

@ -18,6 +18,33 @@ namespace Dawn {
(float_t)a / 100.0f
};
}
struct Color operator * (const float_t &x) {
return {
(uint8_t)(r * x),
(uint8_t)(g * x),
(uint8_t)(b * x),
(uint8_t)(a * x)
};
}
struct Color operator - (const struct Color &color) {
return {
(uint8_t)(r - color.r),
(uint8_t)(g - color.g),
(uint8_t)(b - color.b),
(uint8_t)(a - color.a)
};
}
struct Color operator + (const struct Color &color) {
return {
(uint8_t)(r + color.r),
(uint8_t)(g + color.g),
(uint8_t)(b + color.b),
(uint8_t)(a + color.a)
};
}
};
#define COLOR_WHITE { 255, 255, 255, 100 }