-
Notifications
You must be signed in to change notification settings - Fork 3
Fix broken extended command entry in curses interface #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
NHTangles
wants to merge
71
commits into
altorg:3.4.3-nao
Choose a base branch
from
NHTangles:3.4.3-nao
base: 3.4.3-nao
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
…aner minimum for messages.
…tom or left+right
rather than just displaying the glyphs regardless.
… NH4-style status bar
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.
This would occur when an item's description was just less than the terminal width, but the description + accelerator + glyph + padding was just more than the terminal width. I believe this fix captures what was originally intended.
- 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;
Authored by Tangles - remove 'else' that meant thrown objects would not be checked for walls/doors/sinks/iron bars/edge of map when missing hero or monster. This issue has caused a number of known segfaults with thrown boulders on plane of fire and in valkyrie quest.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allow entry of non-autocompleted commands, and random text (similar to tty interface), to the width of the window being used for entry.
Inverted underlined/non-underlined text for autocompleted commands to integrate better with the above change.
Unrelated commit to add #ifndef to VAR_PLAYGROUND so it can be defined in makefile for convenience.