Solving attribute constants definition conflicts
This commit is contained in:
@@ -85,57 +85,40 @@ typedef word vatch; // Type of character-attribute groups
|
||||
// Attribute codes for functions that use them
|
||||
|
||||
const vattr DEFATTR = -1;
|
||||
#ifndef MSDOS
|
||||
const vattr BLACK = 0;
|
||||
const vattr BLUE = 1;
|
||||
const vattr GREEN = 2;
|
||||
const vattr CYAN = 3;
|
||||
const vattr RED = 4;
|
||||
const vattr MAGENTA = 5;
|
||||
const vattr BROWN = 6;
|
||||
const vattr LGREY = 7;
|
||||
const vattr DGREY = 8;
|
||||
const vattr LBLUE = 9;
|
||||
const vattr LGREEN = 10;
|
||||
const vattr LCYAN = 11;
|
||||
const vattr LRED = 12;
|
||||
const vattr LMAGENTA = 13;
|
||||
const vattr YELLOW = 14;
|
||||
const vattr WHITE = 15;
|
||||
#else
|
||||
#define BLACK 0
|
||||
#define BLUE 1
|
||||
#define GREEN 2
|
||||
#define CYAN 3
|
||||
#define RED 4
|
||||
#define MAGENTA 5
|
||||
#define BROWN 6
|
||||
#define LGREY 7
|
||||
#define DGREY 8
|
||||
#define LBLUE 9
|
||||
#define LGREEN 10
|
||||
#define LCYAN 11
|
||||
#define LRED 12
|
||||
#define LMAGENTA 13
|
||||
#define YELLOW 14
|
||||
#define WHITE 15
|
||||
#endif
|
||||
const vattr _BLACK = (BLACK << 4);
|
||||
const vattr _BLUE = (BLUE << 4);
|
||||
const vattr _GREEN = (GREEN << 4);
|
||||
const vattr _CYAN = (CYAN << 4);
|
||||
const vattr _RED = (RED << 4);
|
||||
const vattr _MAGENTA = (MAGENTA << 4);
|
||||
const vattr _BROWN = (BROWN << 4);
|
||||
const vattr _LGREY = (LGREY << 4);
|
||||
const vattr _DGREY = (DGREY << 4);
|
||||
const vattr _LBLUE = (LBLUE << 4);
|
||||
const vattr _LGREEN = (LGREEN << 4);
|
||||
const vattr _LCYAN = (LCYAN << 4);
|
||||
const vattr _LRED = (LRED << 4);
|
||||
const vattr _LMAGENTA = (LMAGENTA << 4);
|
||||
const vattr _YELLOW = (YELLOW << 4);
|
||||
const vattr _WHITE = (WHITE << 4);
|
||||
|
||||
const vattr BLACK_ = 0;
|
||||
const vattr BLUE_ = 1;
|
||||
const vattr GREEN_ = 2;
|
||||
const vattr CYAN_ = 3;
|
||||
const vattr RED_ = 4;
|
||||
const vattr MAGENTA_ = 5;
|
||||
const vattr BROWN_ = 6;
|
||||
const vattr LGREY_ = 7;
|
||||
const vattr DGREY_ = 8;
|
||||
const vattr LBLUE_ = 9;
|
||||
const vattr LGREEN_ = 10;
|
||||
const vattr LCYAN_ = 11;
|
||||
const vattr LRED_ = 12;
|
||||
const vattr LMAGENTA_ = 13;
|
||||
const vattr YELLOW_ = 14;
|
||||
const vattr WHITE_ = 15;
|
||||
|
||||
const vattr _BLACK = (BLACK_ << 4);
|
||||
const vattr _BLUE = (BLUE_ << 4);
|
||||
const vattr _GREEN = (GREEN_ << 4);
|
||||
const vattr _CYAN = (CYAN_ << 4);
|
||||
const vattr _RED = (RED_ << 4);
|
||||
const vattr _MAGENTA = (MAGENTA_ << 4);
|
||||
const vattr _BROWN = (BROWN_ << 4);
|
||||
const vattr _LGREY = (LGREY_ << 4);
|
||||
const vattr _DGREY = (DGREY_ << 4);
|
||||
const vattr _LBLUE = (LBLUE_ << 4);
|
||||
const vattr _LGREEN = (LGREEN_ << 4);
|
||||
const vattr _LCYAN = (LCYAN_ << 4);
|
||||
const vattr _LRED = (LRED_ << 4);
|
||||
const vattr _LMAGENTA = (LMAGENTA_<< 4);
|
||||
const vattr _YELLOW = (YELLOW_ << 4);
|
||||
const vattr _WHITE = (WHITE_ << 4);
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
@@ -1228,7 +1228,7 @@ void vgetc(int row, int col, vattr* atr, vchar* chr) {
|
||||
|
||||
if((row < 0) or (row > gvid->numrows-1) or (col < 0) or (col > gvid->numcols-1)) {
|
||||
*chr = ' ';
|
||||
*atr = BLACK|_BLACK;
|
||||
*atr = BLACK_|_BLACK;
|
||||
}
|
||||
else {
|
||||
vatch tmp = vgetw(row, col);
|
||||
|
@@ -826,7 +826,7 @@ void GVid::setrows(int _rows) {
|
||||
#endif
|
||||
|
||||
if(origrows < _rows)
|
||||
vfill(origrows, 0, _rows, 80, ' ', LGREY);
|
||||
vfill(origrows, 0, _rows, 80, ' ', LGREY_|_BLACK);
|
||||
|
||||
detectinfo(&curr);
|
||||
resetcurr();
|
||||
|
@@ -408,7 +408,7 @@ int wshadoff() {
|
||||
throw_xrelease(gwin.active->wsbuf);
|
||||
|
||||
// update window's record
|
||||
gwin.active->wsattr = WHITE|_WHITE;
|
||||
gwin.active->wsattr = WHITE_|_WHITE;
|
||||
|
||||
// return with no error
|
||||
return gwin.werrno=W_NOERROR;
|
||||
|
@@ -228,14 +228,14 @@ inline void gwindow::init() {
|
||||
end_row = gvid->curr.screen.rows - 1;
|
||||
end_column = gvid->curr.screen.columns - 1;
|
||||
window_style = 0;
|
||||
window_color = BLACK|_LGREY;
|
||||
border_hi_color = BLUE|_LGREY;
|
||||
window_color = BLACK_|_LGREY;
|
||||
border_hi_color = BLUE_|_LGREY;
|
||||
border_lo_color = DEFATTR;
|
||||
scrollbar_color = DEFATTR;
|
||||
title_color = BLUE|_LGREY;
|
||||
title_color = BLUE_|_LGREY;
|
||||
title_position = title_center;
|
||||
message_color = BLUE|_LGREY;
|
||||
shadow_color = DGREY|_BLACK;
|
||||
message_color = BLUE_|_LGREY;
|
||||
shadow_color = DGREY_|_BLACK;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -66,10 +66,10 @@ public:
|
||||
file = NULL;
|
||||
helpptr = -1;
|
||||
key = 0;
|
||||
winattr = BLACK|_BLACK;
|
||||
textattr = BLACK|_BLACK;
|
||||
selattr = BLACK|_BLACK;
|
||||
barattr = BLACK|_BLACK;
|
||||
winattr = BLACK_|_BLACK;
|
||||
textattr = BLACK_|_BLACK;
|
||||
selattr = BLACK_|_BLACK;
|
||||
barattr = BLACK_|_BLACK;
|
||||
srow = 3;
|
||||
scol = 8;
|
||||
erow = 21;
|
||||
@@ -113,7 +113,7 @@ int whelpush();
|
||||
int whelpushc(int cat);
|
||||
int whelpwin(int srow, int scol, int erow, int ecol, int btype, int title);
|
||||
void whelpcompile(const char* helpfile, long& offset);
|
||||
inline int whelpundef() { return whelpdef(NULL,0,BLACK|_BLACK,BLACK|_BLACK,BLACK|_BLACK,BLACK|_BLACK,NULL); }
|
||||
inline int whelpundef() { return whelpdef(NULL,0,BLACK_|_BLACK,BLACK_|_BLACK,BLACK_|_BLACK,BLACK_|_BLACK,NULL); }
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
@@ -303,7 +303,7 @@ static void disp_cat() {
|
||||
setonkey(Key_Esc,esc_esc,0);
|
||||
|
||||
// end the menu and process it
|
||||
wmenuend(BASETAGID,M_OMNI|M_NOQS,0,0,whelp.selattr,whelp.selattr,BLACK|_BLACK,whelp.barattr);
|
||||
wmenuend(BASETAGID,M_OMNI|M_NOQS,0,0,whelp.selattr,whelp.selattr,BLACK_|_BLACK,whelp.barattr);
|
||||
gmnudropthrough = YES;
|
||||
kbch = i = (gkey)wmenuget();
|
||||
gmnudropthrough = NO;
|
||||
|
@@ -135,7 +135,7 @@ static void show_mouse_cursor_mnu(void) {
|
||||
#ifdef GOLD_MOUSE
|
||||
if(gmou.FreeCursor()) {
|
||||
gmou.ShowCursor();
|
||||
gmou.SetCursor(0,0xFFFF,((LGREY|_LGREY)<<8));
|
||||
gmou.SetCursor(0,0xFFFF,((LGREY_|_LGREY)<<8));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -762,7 +762,7 @@ int wmenubeg(int srow, int scol, int erow, int ecol, int btype, vattr battr, vat
|
||||
wmenu->item=NULL;
|
||||
wmenu->title = "";
|
||||
wmenu->titlepos = -1;
|
||||
wmenu->titleattr = BLACK|_BLACK;
|
||||
wmenu->titleattr = BLACK_|_BLACK;
|
||||
wmenu->shadattr = DEFATTR;
|
||||
wmenu->items = 0;
|
||||
|
||||
@@ -809,7 +809,7 @@ int wmenuitem(int wrow, int wcol, const char* str, char schar, int tagid, int fm
|
||||
witem->dwhdl = -1;
|
||||
witem->dwrow = 0;
|
||||
witem->dwcol = 0;
|
||||
witem->dattr = BLACK|_BLACK;
|
||||
witem->dattr = BLACK_|_BLACK;
|
||||
witem->redisp = NO;
|
||||
witem->help = help;
|
||||
witem->child = NULL;
|
||||
|
@@ -34,22 +34,22 @@
|
||||
void GMnu::Init() {
|
||||
|
||||
bordertype = 0;
|
||||
bordercolor = BLACK|_BLACK;
|
||||
bordercolor = BLACK_|_BLACK;
|
||||
|
||||
textcolor = BLACK|_BLACK;
|
||||
quickcolor = BLACK|_BLACK;
|
||||
noselcolor = BLACK|_BLACK;
|
||||
barcolor = BLACK|_BLACK;
|
||||
textcolor = BLACK_|_BLACK;
|
||||
quickcolor = BLACK_|_BLACK;
|
||||
noselcolor = BLACK_|_BLACK;
|
||||
barcolor = BLACK_|_BLACK;
|
||||
shadowcolor = DEFATTR;
|
||||
|
||||
title = NULL;
|
||||
titlepos = TCENTER;
|
||||
titlecolor = BLACK|_BLACK;
|
||||
titlecolor = BLACK_|_BLACK;
|
||||
|
||||
deschdl = -1;
|
||||
descrow = 0;
|
||||
desccolumn = 0;
|
||||
desccolor = BLACK|_BLACK;
|
||||
desccolor = BLACK_|_BLACK;
|
||||
|
||||
helpnumber = -1;
|
||||
|
||||
|
@@ -75,7 +75,7 @@ static void show_mouse_cursor_pck() {
|
||||
#ifdef GOLD_MOUSE
|
||||
if(gmou.FreeCursor()) {
|
||||
gmou.ShowCursor();
|
||||
gmou.SetCursor(0,0xFFFF,((LGREY|_LGREY)<<8));
|
||||
gmou.SetCursor(0,0xFFFF,((LGREY_|_LGREY)<<8));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@@ -44,7 +44,7 @@ gwinpick::gwinpick() {
|
||||
keyok = false;
|
||||
ypos = xpos = ylen = xlen = 0;
|
||||
btype = 0;
|
||||
battr = wattr = tattr = sattr = hattr = loattr = sbattr = BLACK|_BLACK;
|
||||
battr = wattr = tattr = sattr = hattr = loattr = sbattr = BLACK_|_BLACK;
|
||||
title = NULL;
|
||||
helpcat = 0;
|
||||
maximum_index = minimum_index = maximum_position = index = position = 0;
|
||||
|
@@ -41,7 +41,7 @@ gwinput::gwinput(gwindow &w) : window(w) {
|
||||
|
||||
first_field = current = NULL;
|
||||
fill_acs = false;
|
||||
idle_attr = active_attr = edit_attr = LGREY;
|
||||
idle_attr = active_attr = edit_attr = LGREY_|_BLACK;
|
||||
idle_fill = active_fill = edit_fill = ' ';
|
||||
insert_mode = true;
|
||||
done = dropped = false;
|
||||
|
@@ -149,8 +149,8 @@ public:
|
||||
Line* prev; // Pointer to previous line
|
||||
Line* next; // Pointer to next line
|
||||
|
||||
Line() : txt ("") { color = BLACK|_BLACK; type = kludge = 0; prev = next = NULL; }
|
||||
Line(const char *str) : txt (str) { color = BLACK|_BLACK; type = kludge = 0; prev = next = NULL; }
|
||||
Line() : txt ("") { color = BLACK_|_BLACK; type = kludge = 0; prev = next = NULL; }
|
||||
Line(const char *str) : txt (str) { color = BLACK_|_BLACK; type = kludge = 0; prev = next = NULL; }
|
||||
~Line() {}
|
||||
|
||||
int istearline() { return !!(type & GLINE_TEAR); }
|
||||
|
Reference in New Issue
Block a user