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

View File

@@ -178,6 +178,7 @@ int mswin_map_mode(HWND hWnd, int mode)
SIZE mapSize;
data = (PNHMapWindow)GetWindowLong(hWnd, GWL_USERDATA);
if (!data) return mode;
if( mode == data->mapMode ) return mode;
oldMode = data->mapMode;

View File

@@ -1540,28 +1540,32 @@ mswin_destroy_reg()
typedef struct ctv
{
char *colorstring;
const char *colorstring;
COLORREF colorvalue;
} color_table_value;
static color_table_value color_table[] = {
{ "black", RGB(0x00, 0x00, 0x00)},
{ "silver", RGB(0xC0, 0xC0, 0xC0)},
{ "gray", RGB(0x80, 0x80, 0x80)},
{ "grey", RGB(0x80, 0x80, 0x80)},
{ "white", RGB(0xFF, 0xFF, 0xFF)},
{ "maroon", RGB(0x80, 0x00, 0x00)},
{ "red", RGB(0xFF, 0x00, 0x00)},
{ "purple", RGB(0x80, 0x00, 0x80)},
{ "fuchsia", RGB(0xFF, 0x00, 0xFF)},
{ "green", RGB(0x00, 0x80, 0x00)},
{ "lime", RGB(0x00, 0xFF, 0x00)},
{ "olive", RGB(0x80, 0x80, 0x00)},
{ "black", RGB(0x00, 0x00, 0x00)},
{ "red", RGB(0xFF, 0x00, 0x00)},
{ "green", RGB(0x00, 0x80, 0x00)},
{ "brown", RGB(200,160,0)},
{ "blue", RGB(0,0,170)},
{ "magenta", RGB(160,0,160)},
{ "cyan", RGB(0,160,160,)},
{ "gray", RGB(0x80, 0x80, 0x80)},
{ "orange", RGB(255,140,0)},
{ "yellow", RGB(0xFF, 0xFF, 0x00)},
{ "navy", RGB(0x00, 0x00, 0x80)},
{ "blue", RGB(0x00, 0x00, 0xFF)},
{ "teal", RGB(0x00, 0x80, 0x80)},
{ "aqua", RGB(0x00, 0xFF, 0xFF)},
{ "white", RGB(0xFF, 0xFF, 0xFF)},
{ "purple", RGB(0x80, 0x00, 0x80)},
{ "silver", RGB(0xC0, 0xC0, 0xC0)},
{ "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)},
};
@@ -1636,4 +1640,4 @@ static void mswin_color_from_string(char *colorstring, HBRUSH* brushptr, COLORRE
if (max_brush > TOTAL_BRUSHES) panic("Too many colors!");
*brushptr = CreateSolidBrush(*colorptr);
brush_table[max_brush++] = *brushptr;
}
}