adjustment of win32 console colours (trunk only)
Allow config file entries to adjust win32 console colours.
The following entries in a config file are examples:
OPTIONS=palette:black-0-0-0
OPTIONS=palette:red-210-0-0
OPTIONS=palette:green-80-200-0
OPTIONS=palette:brown-180-100-0
OPTIONS=palette:blue-0-0-200
OPTIONS=palette:magenta-128-0-128
OPTIONS=palette:cyan-50-180-180
OPTIONS=palette:gray-192-192-192
OPTIONS=palette:dark gray-100-100-100
OPTIONS=palette:orange-255-128-0
OPTIONS=palette:bright green-0-255-0
OPTIONS=palette:yellow-255-255-0
OPTIONS=palette:bright blue-100-100-240
OPTIONS=palette:bright magenta-255-0-255
OPTIONS=palette:bright cyan-0-255-255
OPTIONS=palette:white-255-255-255
This uses an undocumented way to adjust the console
colours in a win32 console application. The method and
code snippet used comes from www.catch22.net by James Brown.
This page:
http://www.catch22.net/about.asp
states the following:
"you do not have to pay anything to use the software, and there are no
licencing terms for any sourcecode that you may download from this site.
This means you can freely use any sourcecode or portions of code in
your applications, whether they be free software or professional, retail
products."
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#define USER_SOUNDS
|
||||
|
||||
#ifdef WIN32CON
|
||||
#define CHANGE_COLOR /* allow palette changes in win32 console */
|
||||
#define SELECTSAVED /* Provide menu of saved games to choose from at start */
|
||||
#endif
|
||||
|
||||
@@ -231,6 +232,9 @@ extern int FDECL(set_win32_option, (const char *, const char *));
|
||||
#define RIGHTBUTTON RIGHTMOST_BUTTON_PRESSED
|
||||
#define MIDBUTTON FROM_LEFT_2ND_BUTTON_PRESSED
|
||||
#define MOUSEMASK (LEFTBUTTON | RIGHTBUTTON | MIDBUTTON)
|
||||
#ifdef CHANGE_COLOR
|
||||
extern int FDECL(alternative_palette, (char *));
|
||||
#endif
|
||||
#endif /* WIN32CON */
|
||||
|
||||
#endif /* NTCONF_H */
|
||||
|
||||
Reference in New Issue
Block a user