ac_snowman 50%

This commit is contained in:
Cuyler36
2025-06-06 02:11:16 -04:00
parent dee81a6d87
commit 63f29f3eb4
10 changed files with 846 additions and 26 deletions
+8
View File
@@ -20,6 +20,11 @@ extern "C" {
#define CLAMP(x, min, max) ((x) < (min) ? (min) : (((x) > (max) ? (max) : (x))))
#define CLAMP2(x, min, max) ((min) < (x) ? (((x) < (max) ? (x) : (max))) : (min))
// clamp macro specifically for Animal Crossing
#ifndef M_CLAMP
#define M_CLAMP(v, l, h) MAX(MIN((v), (l)), (h))
#endif
/* Float modulo operator */
#define MOD_F(a, m) (a - (int)((a) * (1.0f / (m))) * (m))
@@ -47,6 +52,9 @@ extern "C" {
/* degrees -> radians */
#define DEG2RAD(deg) ((F_PI / 180.0f) * (deg))
// short angle difference
#define DIFF_SHORT_ANGLE(x, y) ((s16)((x) - (y)))
typedef struct rgba_t { // can be put in other place
u8 r, g, b, a;
} rgba_t;