diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-07-03 12:02:02 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-07-03 12:02:02 +0000 |
commit | da7b14eeeda044dc523653b4c0b365e15495282e (patch) | |
tree | 2cec3f9fe140b3f6b129ec65eb22a2fcb4c72de1 /crawl-ref/source/defines.h | |
parent | eedaf28e2ab8dfae0eaae2fc308bdf683bf57021 (diff) | |
download | crawl-ref-da7b14eeeda044dc523653b4c0b365e15495282e.tar.gz crawl-ref-da7b14eeeda044dc523653b4c0b365e15495282e.zip |
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
Diffstat (limited to 'crawl-ref/source/defines.h')
-rw-r--r-- | crawl-ref/source/defines.h | 1 |
1 files changed, 1 insertions, 0 deletions
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)) |