diff options
author | Bardur Arantsson <bardur@scientician.net> | 2015-03-07 17:27:02 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2015-03-07 17:27:02 +0100 |
commit | ee2234b03fdc201045261d13b4c9101befbe074d (patch) | |
tree | 617001e0cbd10611a13ad3f30e661b27e7d94fc9 /src/spells1.cc | |
parent | ca352fcaf16405a6edf348cca431ea173511af3f (diff) |
Move PICT* macros from defines.h to spells1.cc
Diffstat (limited to 'src/spells1.cc')
-rw-r--r-- | src/spells1.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/spells1.cc b/src/spells1.cc index 594c2e73..dbbf4e24 100644 --- a/src/spells1.cc +++ b/src/spells1.cc @@ -51,6 +51,25 @@ using std::chrono::milliseconds; #define MAX_TRIES 100 /* + * Convert an "attr"/"char" pair into a "pict" (P) + */ +#define PICT(A,C) \ + ((((u16b)(A)) << 8) | ((byte)(C))) + +/* + * Convert a "pict" (P) into an "attr" (A) + */ +#define PICT_A(P) \ + ((byte)((P) >> 8)) + +/* + * Convert a "pict" (P) into an "char" (C) + */ +#define PICT_C(P) \ + ((char)((byte)(P))) + + +/* * Helper function -- return a "nearby" race for polymorphing * * Note that this function is one of the more "dangerous" ones... |