X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=libpcsxcore%2Fcdrom.h;h=860930b10bacc9aeb9ce40b866a51732c21023c7;hp=a37f6baff2b85e26529a0c0898ef31bb195e129e;hb=bf4df3ba5781db5600f1ffb3c34e4d76ef490474;hpb=4e70ea5a634f0568c6cb40ff945fb6c3150665df diff --git a/libpcsxcore/cdrom.h b/libpcsxcore/cdrom.h index a37f6baf..860930b1 100644 --- a/libpcsxcore/cdrom.h +++ b/libpcsxcore/cdrom.h @@ -34,6 +34,10 @@ extern "C" { #define btoi(b) ((b) / 16 * 10 + (b) % 16) /* BCD to u_char */ #define itob(i) ((i) / 10 * 16 + (i) % 10) /* u_char to BCD */ +#define ABS_CD(x) ((x >= 0) ? x : -x) +#define MIN_VALUE(a,b) ({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a < _b ? _a : _b; }) +#define MAX_VALUE(a,b) ({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a > _b ? _a : _b; }) + #define MSF2SECT(m, s, f) (((m) * 60 + (s) - 2) * 75 + (f)) #define CD_FRAMESIZE_RAW 2352