Merge branch 'NetHack-3.6' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6

This commit is contained in:
Bart House
2019-05-28 20:19:33 -07:00
10 changed files with 93 additions and 92 deletions
+24 -17
View File
@@ -96,12 +96,15 @@ curses_message_win_puts(const char *message, boolean recursed)
mesg_add_line(message);
}
linespace = width - 3 - (mx - border_space);
/* -2: room for trailing ">>" (if More>> is needed) or leading " "
(if combining this message with preceding one) */
linespace = (width - 1) - 2 - (mx - border_space);
if (linespace < message_length) {
if (my - border_space >= height - 1) {
/* bottom of message win */
if (++turn_lines >= height) { /* || height == 1) */
if (++turn_lines > height
|| (turn_lines == height && mx > border_space)) {
/* Pause until key is hit - Esc suppresses any further
messages that turn */
if (curses_more() == '\033') {
@@ -119,6 +122,13 @@ curses_message_win_puts(const char *message, boolean recursed)
++turn_lines;
}
}
} else { /* don't need to move to next line */
/* if we aren't at the start of the line, we're combining multiple
messages on one line; use 2-space separation */
if (mx > border_space) {
waddstr(win, " ");
mx += 2;
}
}
bold = (height > 1 && !last_messages);
@@ -142,14 +152,6 @@ curses_message_win_puts(const char *message, boolean recursed)
free(tmpstr);
} else {
mvwprintw(win, my, mx, "%s", message), mx += message_length;
/* two spaces to separate this message from next one if they happen
to fit on the same line; (FIXME: it would be better if this was
done at start of next message rather than end of this one since
it impacts placement of "More>>") */
if (mx < width - 2) {
if (++mx < width - 2)
++mx;
}
if (bold)
curses_toggle_color_attr(win, NONE, A_BOLD, OFF);
}
@@ -582,6 +584,9 @@ curses_message_win_getline(const char *prompt, char *answer, int buffer)
#endif
curs_set(0);
switch (ch) {
case ERR: /* should not happen */
*answer = '\0';
goto alldone;
case '\033': /* DOESCAPE */
/* if there isn't any input yet, return ESC */
if (len == 0) {
@@ -608,20 +613,25 @@ curses_message_win_getline(const char *prompt, char *answer, int buffer)
*p_answer = '\0';
len = 0;
break;
case ERR: /* should not happen */
*answer = '\0';
goto alldone;
case '\r':
case '\n':
(void) strncpy(answer, p_answer, buffer);
answer[buffer - 1] = '\0';
Strcpy(toplines, tmpbuf);
mesg_add_line(tmpbuf);
#if 1
/* position at end of current line so next message will be
written on next line regardless of whether it could fit here */
mx = border_space ? (width + 1) : (width - 1);
wmove(win, my, mx);
#else /* after various other changes, this resulted in getline()
* prompt+answer being following by a blank message line */
if (++my > maxy) {
scroll_window(MESSAGE_WIN);
my--;
}
mx = border_space;
#endif /*0*/
goto alldone;
case '\177': /* DEL/Rubout */
case KEY_DC: /* delete-character */
@@ -705,10 +715,7 @@ directional_scroll(winid wid, int nlines)
wscrl(win, nlines);
scrollok(win, FALSE);
if (wid == MESSAGE_WIN) {
if (border)
mx = 1;
else
mx = 0;
mx = border ? 1 : 0;
}
if (border) {
box(win, 0, 0);
@@ -320,8 +320,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,6,1,0
PRODUCTVERSION 3,6,1,0
FILEVERSION 3,6,3,0
PRODUCTVERSION 3,6,3,0
FILEFLAGSMASK 0x1fL
#ifdef _DEBUG
FILEFLAGS 0x9L
@@ -337,13 +337,13 @@ BEGIN
BLOCK "040904b0"
BEGIN
VALUE "FileDescription", "NetHack for Windows - Graphical Interface"
VALUE "FileVersion", "3.6.1"
VALUE "FileVersion", "3.6.3"
VALUE "InternalName", "NetHackW"
VALUE "LegalCopyright", "Copyright (C) 1985 - 2018. By Stichting Mathematisch Centrum and M. Stephenson. See license for details."
VALUE "LegalCopyright", "Copyright (C) 1985 - 2019. By Stichting Mathematisch Centrum and M. Stephenson. See license for details."
VALUE "OriginalFilename", "NetHackW.exe"
VALUE "PrivateBuild", "140606"
VALUE "ProductName", "NetHack"
VALUE "ProductVersion", "3.6.1"
VALUE "ProductVersion", "3.6.3"
END
END
BLOCK "VarFileInfo"
+5 -5
View File
@@ -60,8 +60,8 @@ IDI_ICON1 ICON "nethack.ico"
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,6,2,0
PRODUCTVERSION 3,6,2,0
FILEVERSION 3,6,3,0
PRODUCTVERSION 3,6,3,0
FILEFLAGSMASK 0x1fL
#ifdef _DEBUG
FILEFLAGS 0x9L
@@ -77,12 +77,12 @@ BEGIN
BLOCK "040904b0"
BEGIN
VALUE "FileDescription", "NetHack for Windows - TTY Interface"
VALUE "FileVersion", "3.6.2"
VALUE "FileVersion", "3.6.3"
VALUE "InternalName", "NetHack"
VALUE "LegalCopyright", "Copyright (C) 1985 - 2018. By Stichting Mathematisch Centrum and M. Stephenson. See license for details."
VALUE "LegalCopyright", "Copyright (C) 1985 - 2019. By Stichting Mathematisch Centrum and M. Stephenson. See license for details."
VALUE "OriginalFilename", "NetHack.exe"
VALUE "ProductName", "NetHack"
VALUE "ProductVersion", "3.6.2"
VALUE "ProductVersion", "3.6.3"
END
END
BLOCK "VarFileInfo"
+3 -3
View File
@@ -181,10 +181,10 @@
<ClCompile Include="$(WinWin32Dir)mhstatus.c" />
<ClCompile Include="$(WinWin32Dir)mhtext.c" />
<ClCompile Include="$(WinWin32Dir)mswproc.c" />
<ClCompile Include="$(WinWin32Dir)winhack.c" />
<ClCompile Include="$(WinWin32Dir)NetHackW.c" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="$(WinWin32Dir)winhack.rc" />
<ResourceCompile Include="$(WinWin32Dir)NetHackW.rc" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="$(WinWin32Dir)mhaskyn.h" />
@@ -212,4 +212,4 @@
<Target Name="AfterRebuild">
<MSBuild Projects="afternethack.proj" Targets="Build" Properties="Configuration=$(Configuration)" />
</Target>
</Project>
</Project>