various things

- a couple of README updates
- some color changes for windowcolors
- prevent crash From a bug report, but better than a crash. It
probably renders the map_mode:fit_to_screen ignored in defaults.nh.
This commit is contained in:
nethack.allison
2002-03-11 02:29:42 +00:00
parent e9f10080fb
commit c2d1eb267f
4 changed files with 51 additions and 40 deletions
+3 -6
View File
@@ -21,7 +21,7 @@ o more feedback about skill advancement from #enhance command
o End-of-game disclose options can be individually tuned to your liking o End-of-game disclose options can be individually tuned to your liking
o Mac: command-key shortcuts in the player selection dialog o Mac: command-key shortcuts in the player selection dialog
o Amiga: screenmode requester o Amiga: screenmode requester
o Win32: new graphical port contributed by Alex Kompel o Win32: new graphical interface contributed by Alex Kompel
We've also included variations of enhancements contributed by members We've also included variations of enhancements contributed by members
of the NetHack community at large. Among them: of the NetHack community at large. Among them:
@@ -83,7 +83,7 @@ Please read items (1), (2) and (3) BEFORE doing anything with your new code.
x. A 'win/gnome' subdirectory, which contains files specific to GNOME. x. A 'win/gnome' subdirectory, which contains files specific to GNOME.
y. A 'win/tty' subdirectory, which contains files specific to ttys. y. A 'win/tty' subdirectory, which contains files specific to ttys.
z. A 'win/win32' subdirectory, which contains files specific to the z. A 'win/win32' subdirectory, which contains files specific to the
Windows NT Win32 API. Windows Win32 API.
The names of these directories should not be changed unless you are The names of these directories should not be changed unless you are
ready to go through the makefiles and the makedefs program and change ready to go through the makefiles and the makedefs program and change
@@ -160,9 +160,6 @@ Please read items (1), (2) and (3) BEFORE doing anything with your new code.
Unless otherwise mentioned, the compiler used was the OS-vendor's Unless otherwise mentioned, the compiler used was the OS-vendor's
C compiler. C compiler.
The Atari and Amiga ports are struggling to stay supported due to a
lack of people with machines and time.
With the demise of Windows NT on the DEC Alpha, no attempt has been With the demise of Windows NT on the DEC Alpha, no attempt has been
made to build NetHack 3.4.0 on that platform. made to build NetHack 3.4.0 on that platform.
@@ -172,7 +169,7 @@ Please read items (1), (2) and (3) BEFORE doing anything with your new code.
A build for Intel 80286 machines and DOS "real mode" overlaid versions A build for Intel 80286 machines and DOS "real mode" overlaid versions
has not been produced for 3.4.0. Nobody on the porting team has has not been produced for 3.4.0. Nobody on the porting team has
the time or the software to attempt the necessary tuning that will allow the time or the software to attempt the necessary tuning that will allow
it achieve the balance of having just the right amount of available it to achieve the balance of having just the right amount of available
memory, and still have acceptable performance. The sources necessary memory, and still have acceptable performance. The sources necessary
to do so are still included in the source distribution, so if someone to do so are still included in the source distribution, so if someone
has access to a real-mode compiler and lots of spare time on their hands, has access to a real-mode compiler and lots of spare time on their hands,
+25 -16
View File
@@ -161,34 +161,43 @@ Map Window options:
only be specified in the defaults.nh config file. only be specified in the defaults.nh config file.
Default: [default] Default: [default]
tile_height Used with tile_file to specify the width of each tile_height Used with tile_file to specify the height of each
tile in pixels. This option may only be specified tile in pixels. This option may only be specified
in the defaults.nh config file. in the defaults.nh config file.
Default: [16] Default: [16]
tile_width Used with tile_file to specify the height of each tile_width Used with tile_file to specify the width of each
tile in pixels. This option may only be specified tile in pixels. This option may only be specified
in the defaults.nh config file. in the defaults.nh config file.
Default: [16] Default: [16]
windowcolors Specifies the colors for various windows windowcolors Specifies the colors for various windows
This is a single option that has the following This option may only be specified in the
defaults.nh config file and has the following
format: format:
window-type foreground/background window-type foreground/background
Notes: Notes:
- The slash is required. - the slash is required.
- window-type is one of: - window-type is either "message" or "status"
"menu, "message", "status", or "text" (Short forms are: "msg" or "sts").
(Short forms are: "mnu", "msg", "sts", or "txt").
- Foreground and background may be specified as - Foreground and background may be specified as
a color name (for example "blue") or as a a color name (such as "blue"), or by a six
six digit hexadecimal RGB color-number (for digit hexadecimal RGB color value (such as
example "#8F8F8F"). "#8F8F8F")
- The following color names are available:
black, red, green, brown, blue, magenta,
cyan, gray (or grey), orange,
yellow, purple, silver, maroon, fuchsia,
lime, olive, navy, teal, aqua. In addition, you
can use the following names to refer to default
Windows settings: activeborder, activecaption,
appworkspace, background, btnface, btnshadow, btntext,
captiontext, graytext, highlight, highlighttext,
inactiveborder, inactivecaption, menu, menutext,
scrollbar, window, windowframe, windowtext.
Examples include: Example:
OPTIONS=windowcolors:menu white/black OPTIONS=windowcolors:sts #00FF80/blue msg menutext/menu
OPTIONS=msg green/yellow
OPTIONS=windowcolors:sts white/blue txt white/blue
Miscellaneous options: Miscellaneous options:
+1
View File
@@ -178,6 +178,7 @@ int mswin_map_mode(HWND hWnd, int mode)
SIZE mapSize; SIZE mapSize;
data = (PNHMapWindow)GetWindowLong(hWnd, GWL_USERDATA); data = (PNHMapWindow)GetWindowLong(hWnd, GWL_USERDATA);
if (!data) return mode;
if( mode == data->mapMode ) return mode; if( mode == data->mapMode ) return mode;
oldMode = data->mapMode; oldMode = data->mapMode;
+22 -18
View File
@@ -1540,28 +1540,32 @@ mswin_destroy_reg()
typedef struct ctv typedef struct ctv
{ {
char *colorstring; const char *colorstring;
COLORREF colorvalue; COLORREF colorvalue;
} color_table_value; } color_table_value;
static color_table_value color_table[] = { static color_table_value color_table[] = {
{ "black", RGB(0x00, 0x00, 0x00)}, { "black", RGB(0x00, 0x00, 0x00)},
{ "silver", RGB(0xC0, 0xC0, 0xC0)}, { "red", RGB(0xFF, 0x00, 0x00)},
{ "gray", RGB(0x80, 0x80, 0x80)}, { "green", RGB(0x00, 0x80, 0x00)},
{ "grey", RGB(0x80, 0x80, 0x80)}, { "brown", RGB(200,160,0)},
{ "white", RGB(0xFF, 0xFF, 0xFF)}, { "blue", RGB(0,0,170)},
{ "maroon", RGB(0x80, 0x00, 0x00)}, { "magenta", RGB(160,0,160)},
{ "red", RGB(0xFF, 0x00, 0x00)}, { "cyan", RGB(0,160,160,)},
{ "purple", RGB(0x80, 0x00, 0x80)}, { "gray", RGB(0x80, 0x80, 0x80)},
{ "fuchsia", RGB(0xFF, 0x00, 0xFF)}, { "orange", RGB(255,140,0)},
{ "green", RGB(0x00, 0x80, 0x00)},
{ "lime", RGB(0x00, 0xFF, 0x00)},
{ "olive", RGB(0x80, 0x80, 0x00)},
{ "yellow", RGB(0xFF, 0xFF, 0x00)}, { "yellow", RGB(0xFF, 0xFF, 0x00)},
{ "navy", RGB(0x00, 0x00, 0x80)}, { "white", RGB(0xFF, 0xFF, 0xFF)},
{ "blue", RGB(0x00, 0x00, 0xFF)}, { "purple", RGB(0x80, 0x00, 0x80)},
{ "teal", RGB(0x00, 0x80, 0x80)}, { "silver", RGB(0xC0, 0xC0, 0xC0)},
{ "aqua", RGB(0x00, 0xFF, 0xFF)}, { "grey", RGB(0x80, 0x80, 0x80)},
{ "maroon", RGB(0x80, 0x00, 0x00)},
{ "fuchsia", RGB(0xFF, 0x00, 0xFF)},
{ "lime", RGB(0x00, 0xFF, 0x00)},
{ "olive", RGB(0x80, 0x80, 0x00)},
{ "navy", RGB(0x00, 0x00, 0x80)},
{ "teal", RGB(0x00, 0x80, 0x80)},
{ "aqua", RGB(0x00, 0xFF, 0xFF)},
{ "", RGB(0x00, 0x00, 0x00)}, { "", RGB(0x00, 0x00, 0x00)},
}; };
@@ -1636,4 +1640,4 @@ static void mswin_color_from_string(char *colorstring, HBRUSH* brushptr, COLORRE
if (max_brush > TOTAL_BRUSHES) panic("Too many colors!"); if (max_brush > TOTAL_BRUSHES) panic("Too many colors!");
*brushptr = CreateSolidBrush(*colorptr); *brushptr = CreateSolidBrush(*colorptr);
brush_table[max_brush++] = *brushptr; brush_table[max_brush++] = *brushptr;
} }