mirror of
https://github.com/vattam/BSDGames.git
synced 2025-12-20 19:04:49 +00:00
Initial revision
git-svn-id: file:///srv/svn/joey/bsdgames-trunk@5086 a4a2c43b-8ac3-0310-8836-e0e880c912e2
This commit is contained in:
20
phantasia/macros.h
Normal file
20
phantasia/macros.h
Normal file
@@ -0,0 +1,20 @@
|
||||
/* $NetBSD: macros.h,v 1.3 1995/04/24 12:24:34 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* macros.h - macro definitions for Phantasia
|
||||
*/
|
||||
|
||||
#define ROLL(BASE,INTERVAL) floor((BASE) + (INTERVAL) * drandom())
|
||||
#define SGN(X) ((X) < 0 ? -1 : 1)
|
||||
#define CIRCLE(X, Y) floor(distance(X, 0.0, Y, 0.0) / 125.0 + 1)
|
||||
#undef MAX
|
||||
#define MAX(A, B) ((A) > (B) ? (A) : (B))
|
||||
#undef MIN
|
||||
#define MIN(A, B) ((A) < (B) ? (A) : (B))
|
||||
#define ILLCMD() mvaddstr(5, 0, Illcmd)
|
||||
#define MAXMOVE() (Player.p_level * 1.5 + 1)
|
||||
#define ILLMOVE() mvaddstr(5, 0, Illmove)
|
||||
#define ILLSPELL() mvaddstr(5, 0, Illspell)
|
||||
#define NOMANA() mvaddstr(5, 0, Nomana)
|
||||
#define SOMEBETTER() addstr(Somebetter)
|
||||
#define NOBETTER() mvaddstr(17, 0, Nobetter)
|
||||
Reference in New Issue
Block a user