phantasia4/
phantasia4/conf/
phantasia4/phantasia/bin/
phantasia4/phantasia/src/utilities/
phantasia4/public_html/cgi-bin/
/*
 * macros.h - macro definitions for Phantasia
 */

#define RND()		((double)Do_random() / 2147483647.0)
#define ROLL(BASE,INTERVAL)    floor(BASE + ((double)INTERVAL * RND()))
#define SGN(X)          ((X) < 0 ? -1 : 1)
/*
#define CIRCLE(X, Y)    floor(Do_distance(X, 0.0, Y, 0.0) / D_CIRCLE + 1)
*/
#define ANY(X)	((X) > 0 ? 1 : 0)
#define CRACKS()        ((c->player.circle > 25) && (c->player.circle < 30))
#define MAX(A, B)	((A) > (B) ? (A) : (B))
#define MIN(A, B)       ((A) < (B) ? (A) : (B))
#define CALCLEVEL(XP)   floor(sqrt(XP / 1800.0))