2022-03-10 17:21:50 -09:00
|
|
|
#ifndef __pbsplash_h__
|
|
|
|
|
#define __pbsplash_h__
|
|
|
|
|
|
2023-02-19 16:25:37 -09:00
|
|
|
#define MM_TO_PX(dpi, mm) (dpi / 25.4) * (mm)
|
|
|
|
|
|
2023-07-28 11:15:06 -08:00
|
|
|
#define ARRAY_SIZE(a) ((int)(sizeof(a) / sizeof(a[0])))
|
|
|
|
|
#define INT_ABS(x) ((x) > 0 ? (x) : (-(x)))
|
|
|
|
|
|
|
|
|
|
#define MIN(x, y) \
|
|
|
|
|
({ \
|
|
|
|
|
__typeof__(x) _x = (x); \
|
|
|
|
|
__typeof__(y) _y = (y); \
|
|
|
|
|
_x <= _y ? _x : _y; \
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
#define MAX(x, y) \
|
|
|
|
|
({ \
|
|
|
|
|
__typeof__(x) _x = (x); \
|
|
|
|
|
__typeof__(y) _y = (y); \
|
|
|
|
|
_x > _y ? _x : _y; \
|
|
|
|
|
})
|
|
|
|
|
|
2022-03-10 17:21:50 -09:00
|
|
|
struct col {
|
2023-07-28 11:15:06 -08:00
|
|
|
union {
|
|
|
|
|
unsigned int rgba;
|
|
|
|
|
struct {
|
|
|
|
|
unsigned char r, g, b, a;
|
|
|
|
|
};
|
|
|
|
|
};
|
2022-03-10 17:21:50 -09:00
|
|
|
};
|
|
|
|
|
|
2022-07-31 11:10:04 -08:00
|
|
|
void animate_frame(int frame, int w, int y_off, long dpi);
|
2022-03-10 17:21:50 -09:00
|
|
|
|
2022-07-04 07:40:17 -08:00
|
|
|
#endif
|