/* WtWin.H -- Header file for WtWin.C */ /*=====================*/ /*===== Constants =====*/ /*=====================*/ #define DPY_ROWS 25 #define DPY_COLS 80 #define WIN_DOSW 0 /* DOS window (bottom layer) */ #define WIN_STAT 1 /* Status window (top line) */ #define WIN_MAIN 2 /* Main window (most messages) */ #define WIN_LEFT 3 /* Left half of main window */ #define WIN_RITE 4 /* Right half of main window */ #define WIN_INPT 5 /* Input window */ #define WIN_FKEY 6 /* Function key window */ #define WIN_HELP 7 /* HELP display window */ #define WIN_BACK 8 /* Back scroll window */ #define WIN_PPNS 9 /* Window for PPN search */ #define WIN_MACS 10 /* Macro display window */ #define WIN_MAX 10 /* Highest window number */ #define WIN_NUMB (WIN_MAX+1) /* Number of windows, total */ #define WIN_NRMATT 7 /* Normal attribute: White on black */ /*===================*/ /* ===== TYPES ===== */ /*===================*/ #if !defined(__COLORS) #define __COLORS enum COLORS { BLACK, /* dark colors */ BLUE, GREEN, CYAN, RED, MAGENTA, BROWN, LIGHTGRAY, DARKGRAY, /* light colors */ LIGHTBLUE, LIGHTGREEN, LIGHTCYAN, LIGHTRED, LIGHTMAGENTA, YELLOW, WHITE }; #define BLINK 128 /* blink bit */ #endif #define COLR_NULL BLUE #define COLR_NOVI LIGHTGRAY #define COLR_WARR LIGHTGRAY #define COLR_HERO LIGHTGRAY #define COLR_CHAM LIGHTGRAY #define COLR_SUPE CYAN #define COLR_ENCH GREEN #define COLR_SORC MAGENTA #define COLR_NECR RED #define COLR_LEGE BROWN #define COLR_WIZA BLUE /*====================*/ /* ===== MACROS ===== */ /*====================*/ /* xy2a(): convert x,y to 0..1999 screen position */ #define xy2a(x,y) ((x) + DPY_COLS * (y)) /* MK_ATT(): Make an attribute out of a foreground and background color */ #define MK_ATT(fg,bg) ( (byte) (((bg)<<4)|fg) ) /*========================*/ /* ===== PROTOTYPES ===== */ /*========================*/ void win_att(byte att); void win_blink(int sw); void win_clear(void); void win_cursor(int sw); void win_fg(enum COLORS color); void win_hide(void); int win_init(void); void win_open(int wnum, int left, int top, int cols, int rows, byte att); void win_putch(char c); void win_puts(char *txt); void win_scroll(void); void win_select(int wnum); void win_show(void); void win_x(int x); void win_xy(int x, int y); /* EOF(WtWin.H) */