screen.h
1 /* ************************************************************************ 2 * File: screen.h Part of CircleMUD * 3 * Usage: header file with ANSI color codes for online color * 4 * * 5 * All rights reserved. See license.doc for complete information. * 6 * * 7 * Copyright (C) 1993, 94 by the Trustees of the Johns Hopkins University * 8 * CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991. * 9 ************************************************************************ */ 10 11 #define KNRM "\x1B[0m" 12 #define KRED "\x1B[31m" 13 #define KGRN "\x1B[32m" 14 #define KYEL "\x1B[33m" 15 #define KBLU "\x1B[34m" 16 #define KMAG "\x1B[35m" 17 #define KCYN "\x1B[36m" 18 #define KWHT "\x1B[37m" 19 #define KNUL "" 20 21 /* conditional color. pass it a pointer to a char_data and a color level. */ 22 #define C_OFF 0 23 #define C_SPR 1 24 #define C_NRM 2 25 #define C_CMP 3 26 #define _clrlevel(ch) (!IS_NPC(ch) ? (PRF_FLAGGED((ch), PRF_COLOR_1) ? 1 : 0) + \ 27 (PRF_FLAGGED((ch), PRF_COLOR_2) ? 2 : 0) : 0) 28 #define clr(ch,lvl) (_clrlevel(ch) >= (lvl)) 29 #define CCNRM(ch,lvl) (clr((ch),(lvl))?KNRM:KNUL) 30 #define CCRED(ch,lvl) (clr((ch),(lvl))?KRED:KNUL) 31 #define CCGRN(ch,lvl) (clr((ch),(lvl))?KGRN:KNUL) 32 #define CCYEL(ch,lvl) (clr((ch),(lvl))?KYEL:KNUL) 33 #define CCBLU(ch,lvl) (clr((ch),(lvl))?KBLU:KNUL) 34 #define CCMAG(ch,lvl) (clr((ch),(lvl))?KMAG:KNUL) 35 #define CCCYN(ch,lvl) (clr((ch),(lvl))?KCYN:KNUL) 36 #define CCWHT(ch,lvl) (clr((ch),(lvl))?KWHT:KNUL) 37 38 #define COLOR_LEV(ch) (_clrlevel(ch)) 39 40 #define QNRM CCNRM(ch,C_SPR) 41 #define QRED CCRED(ch,C_SPR) 42 #define QGRN CCGRN(ch,C_SPR) 43 #define QYEL CCYEL(ch,C_SPR) 44 #define QBLU CCBLU(ch,C_SPR) 45 #define QMAG CCMAG(ch,C_SPR) 46 #define QCYN CCCYN(ch,C_SPR) 47 #define QWHT CCWHT(ch,C_SPR) 48