From da7b14eeeda044dc523653b4c0b365e15495282e Mon Sep 17 00:00:00 2001 From: haranp Date: Tue, 3 Jul 2007 12:02:02 +0000 Subject: Minor cleanups (especially of Xom code.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1728 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/defines.h | 1 + 1 file changed, 1 insertion(+) (limited to 'crawl-ref/source/defines.h') diff --git a/crawl-ref/source/defines.h b/crawl-ref/source/defines.h index a3e2b3b63f..348c275080 100644 --- a/crawl-ref/source/defines.h +++ b/crawl-ref/source/defines.h @@ -290,6 +290,7 @@ #define CONTROL( xxx ) ((xxx) - 'A' + 1) #define ARRAYSIZE(x) (sizeof(x) / sizeof(x[0])) +#define RANDOM_ELEMENT(x) (x[random2(ARRAYSIZE(x))]) #define MIN(x, y) MINIMUM(x, y) #define MAX(x,y) (((x) > (y)) ? (x) : (y)) -- cgit v1.2.3-54-g00ecf