1 /* $NetBSD: macros.h,v 1.2 1995/03/24 03:58:52 cgd Exp $ */
4 * macros.h - macro definitions for Phantasia
7 #define ROLL(BASE,INTERVAL) floor((BASE) + (INTERVAL) * drandom())
8 #define SGN(X) ((X) < 0 ? -1 : 1)
9 #define CIRCLE(X, Y) floor(distance(X, 0.0, Y, 0.0) / 125.0 + 1)
11 #define MAX(A, B) ((A) > (B) ? (A) : (B))
13 #define MIN(A, B) ((A) < (B) ? (A) : (B))
14 #define ILLCMD() mvaddstr(5, 0, Illcmd)
15 #define MAXMOVE() (Player.p_level * 1.5 + 1)
16 #define ILLMOVE() mvaddstr(5, 0, Illmove)
17 #define ILLSPELL() mvaddstr(5, 0, Illspell)
18 #define NOMANA() mvaddstr(5, 0, Nomana)
19 #define SOMEBETTER() addstr(Somebetter)
20 #define NOBETTER() mvaddstr(17, 0, Nobetter)