Skip to content

Conversation

@NHTangles
Copy link

Hi dtype,
As discussed, this is all the additional curses stuff that (mainly) FIQ has been working on.
menu_glyphs, perm_invent, hitpointbar, and major statusbar tidy-up/rewrite.
Note that options for menu_glyphs, hitpointbar and perm_invent already exist, but just didn't do anything in the curses windowport before now.
Cheers
Tangles.

NHTangles and others added 30 commits April 23, 2017 00:20
Requires player to press TAB, similar to NH4 interface.
Changes window borders red to grab attention of even the sleepiest
players.
1. actually save the default terminal colour for darkgray so that
it doesn't get restored to a random uninitialised value.
2. Actually check the use_darkgray option, and present 'blue' if
it's not set - for consistency with other windowports.
3. Fix clash on >16 colour terminals where darkgray was mapping to
one of the colorpair entries used by hilite-stairs, and appearing
as black-on-red.  Fixed by remapping black-on-default colorpair
entry to darkgray-on-default if these conditions are met.
Still a lot of cruft left before I can start doing some actual work here
Done as follows:
* Run all files through `indent -bad -bap -br -ce -cbi0 -npcs -cs -bs -saf -sai -saw -di4 -nbc -psl -T nhstat -T nhmenu_item -T nhmenu -T menu_op -T nhrgb -T nhprev_mesg -T nethack_window -T nethack_wid -T nethack_char -brs -blf -i4 -lp -ip0 -ppi1 -l80 -nbbo`
* Remove reundant {}s from case statements
* Run "untabify" (Emacs) on all the source files (Probably some indent option I missed somewhere)
* Insert an emacs/vim indent line on top of all files so that these programs obey the new formatting
Uses message window. Word wraps, scrolls, etc.
User couldn't completely fill the buffer if they deliberately
abused the word-wrap to use up lines.
Cherry-picked from dNAO
rather than just displaying the glyphs regardless.
FredrIQ and others added 30 commits May 13, 2017 14:13
If popup_dialog is disabled, the "Shall I pick for you?" question
uses pline() which draws the message window, probably over the
splash screen.  By using the coordinates of the map window we
can mostly avoid this.
On an early panic, dump_format would be called
before meaningful values existed for %n, etc.
This could result in chmod() being called on a
parent directory such as userdata, resulting in
a complete denial of service. Also, dump file
write was being attempted even if file failed
to open.
…ating

Should get rid of any residual redrawing bugs
Remove wrefresh() from putch, and make sure it only gets called
when it needs to.
- New msgtype 'alert', designed to fully grab player's attention for particular messages
- curses - implement msgtype=alert to colour window borders orange and prompt for <TAB>
  (this is the old msgtype=stop behaviour)
         - change msgtype=stop to behave the same as "-more-" (the '>>' prompt)
         - change behaviour of '>>' prompt (msgtype=stop, or msg window full), to only
           accept space or enter, instead of just any key, to prevent unintentional
           eating of keystrokes that were intended for something else. Also allow ESC
           here to dismiss all messages to end of turn.
- tty - implement msgtype=alert to prompt for <TAB> (and display <TAB> prompt in orange)
  (this is the same bahaviour as curses, minus the window border effects)
Caught by automated build test

../win/curses/cursdial.c:598:9: error: non-void function 'curses_display_nhmenu' should return a value [-Wreturn-type]
        return;
        ^
../win/curses/cursdial.c:605:9: error: non-void function 'curses_display_nhmenu' should return a value [-Wreturn-type]
        return;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants