From bcf87c8591e50731276333dee6a12eaffb04a2a5 Mon Sep 17 00:00:00 2001 From: Stas Degteff Date: Thu, 19 Jan 2006 21:33:24 +0000 Subject: [PATCH] Fix DOS/DJGPP build --- goldlib/gall/gvidall.h | 21 +++++++++++++++++++-- goldlib/gall/gvidinit.cpp | 8 ++++---- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/goldlib/gall/gvidall.h b/goldlib/gall/gvidall.h index f402039..9a8501a 100644 --- a/goldlib/gall/gvidall.h +++ b/goldlib/gall/gvidall.h @@ -85,7 +85,7 @@ 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; @@ -102,7 +102,24 @@ 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); diff --git a/goldlib/gall/gvidinit.cpp b/goldlib/gall/gvidinit.cpp index 5e86e05..7156705 100644 --- a/goldlib/gall/gvidinit.cpp +++ b/goldlib/gall/gvidinit.cpp @@ -132,7 +132,7 @@ GVid::GVid() { // Video Class destructor GVid::~GVid() { - + #if defined(__USE_NCURSES__) attrset(A_NORMAL); @@ -445,7 +445,7 @@ void GVid::detectinfo(GVidInfo* _info) memset(_info, 0, sizeof(GVidInfo)); #if defined(__USE_NCURSES__) - + _info->screen.mode = 0; _info->screen.rows = LINES; _info->screen.columns = COLS; @@ -607,7 +607,7 @@ void GVid::detectinfo(GVidInfo* _info) // Get cursor form CONSOLE_CURSOR_INFO cci; GetConsoleCursorInfo(gvid_hout, &cci); - + _info->cursor.start = (int) 1; _info->cursor.end = cci.bVisible ? (int) 15 : 0; _info->cursor.attr = (word)(cci.bVisible ? 7 : 0); @@ -689,7 +689,7 @@ void GVid::detectinfo(GVidInfo* _info) _info->cursor.attr = 7; _info->color.intensity = 1; _info->color.overscan = 0; - + #endif getpalette(_info->color.palette);