The tty menu code wasn't totally reentrant, causing it to free memory
that wasn't on the heap if you had your inventory displayed, ^C then
ask to see the inventory again. Solved this by converting the buffer used
by process_menu_window to be heap-allocated. If the Quit code could return at
this point, this would still be very bad, but since it doesn't, this is OK.
1. Switch to low-level console routines for performance improvements.
2. Instead of moving the cursor around like a real tty, just track the
destination coordinates of where the cursor should be, and
defer the movement until user input is expected.
Credit to <Someone> for #2.
On September 11, 2003 "<Someone>" wrote:
> When we're going to have a different save file format, could
> the last messages in the message history be saved as well, so
> ^P would work the same before and after saving (possibly
> including a few less messages to make room for the startup
> messages?).
This seemed like a reasonable request. This patch:
- adds the core support required.
- adds the tty supporting routines.
Pat Rankin wrote:
> collect them all into some new struct and
> save that separately rather than jamming more non-option stuff
> into struct flags.
This patch:
- collects all context/tracking related fields from flags
into a new structure called "context."
It also adds the following to the new structure:
- stethoscope turn support
- victual support
- tin support
This is an initial round of SAFERHANGUP hangup changes. It introduces
SAFERHANGUP, provides the core framework, and enables it for UNIX.
Window-port changes are provided for win/tty, win/X11 and win/gnome. Qt
changes should be forthcoming after having Warwick look at them.
window.doc is updated so windowport maintainers have an clue what needs to
be done to support SAFERHANGUP.
<Someone> wishes to add a couple of new options to the wince port ("run fullscreen" and "do not use CE software keyboard").
The wincap field was full, so this adds a second field for
additional options.
The problem with the new autocomplete was tracked down to
be the result of differences between different implementations
of backsp(). The differences go all the way back to the
early MSDOS port by the look of it, and the win32,
and Mac tty ports all seemed to pattern themselves after the
MSDOS port for that routine. Apparently, it didn't cause any
harm until now.
The problem is that backsp() sends a character sequence
of 0x08, 0x20, 0x08 on at least those ports, where the Unix
tty code only sends 0x08. So the characters in the new
autocomplete were all being erased from the screen.
This patch only fixes the win32 tty port, so I've left the
conditional code in getline.c for DOS and Mac. I
Change tty extended command autocomplete, based loosely on <Someone>'s
patch, to allow you to type autocompleted characters. That is, you can type
characters the autocompleter inserted without invalidating the command.
I haven't looked closely, but at least some other windowport extended
command readers seem to already behave similarly.
I've found myself adding a trailing space to various extend
commands from time to time, and the program fails to recognize then
when that happens. It might be less likely once none of them has
any embedded spaces, but this wouldn't hurt anything if that becomes
the case.
This uses pmatch() as a default pattern matcher,
and #defines USER_SOUNDS_REGEX for Qt
to enable the code for regular expressions.
This is enabled for win32tty and win32gui.
When GOLDOBJ is defined, dropping partial amounts of gold using the D
command would not work because gold currently has the same inventory letter
as the coin group accelerator. In this case, the group accelerator should
not be used, since it confuses counts. tty and X11 ports are fixed. The
tty change should fix the Windows console version as well (untested).
by <Someone>
(the following text accompanies the patch at <Someone>'s web page)
add more configurability to the new msg_window option of [..]3.4.0.
It allows the configuration option to take an optional parameter to
specify the style of message history display to use.
allows the following configuration options:
msg_window:s - single message (as was the default in 3.3.0)
msg_window:c - combination; two messages in 'single', then as 'full'
msg_window:f - full window; oldest message first
msg_window:r - full window reversed; newest message first
In the event of no parameter being provided,
the patch is compatible with the current 3.4.0 behaviour:
msg_window = 'full'
!msg_window = 'single'
msg_window can be configured for these options in the
Options menu (Shift-O)
msg_window stores the current window type in the non-persistent
iflags structure, which means that savefile/bones files should be
100% compatible with Vanilla, but at the disadvantage that your
customisations to msg_window will be replaced with your
defaults.nh (or ~/.nethackrc) value every time you restart a saved game.
Credits:
The patch draws inspiration (and code snippets) extensively
from <Someone>'s original msg_window patch, [...] as well as <Someone>'s code for reverse ordering implemented until recently in
Slash'em.
- typing ESC would lose messages if msg_window was not displayed
- incorporate <Someone>'s fix, which causes them to be tracked, just not
displayed, and thus still available for ^P viewing later on
Add "travel" boolean option to enable/disable travel command.
Add "mouse_support" wincap option to enable/disable mouse.
- When running the win32 tty version full-screen, some people
complained about the square mouse cursor.
Newsgroups: rec.games.roguelike.nethack
Subject: Re: Getting rid of the cursor?
<email deleted> <email deleted>
Followup-To:
On Thu, 04 Apr 2002 00:20:06 <email deleted> wrote:
> Ok, let me be more specific: when playing the windows non-GUI version, is
> there a way to get rid of the large rectangular white cursor?
>
> <email deleted> wrote in message
> <email deleted>
>> Can you get rid of the cursor in the windows version? I really hate that
>> thing.
>>
<email deleted>
>Newsgroups: rec.games.roguelike.nethack
>Subject: Disabling Mouse Input
>
>I purchased an older P120 laptop to be able to play Nethack at the hotel.
>I find that I rest my thumbs on the mouse touch pad all too often and my
>@ moves unexpectedly at times. I took a peruse through defaults.nh, but
>came up empty.
>
>Anyone know if mouse input can be disabled?
>
>MRSisson
- menu-window code could access a null pointer when there was no data
- menu-window code can't handle empty contents, because there's no place
to position the cursor, so force text mode
- still looked ugly, so added a check to avoid displaying anything if
the file was empty
Several boolean options were mis-categorized and became
unsettable during play. Also, the eight_bit_tty option got
dropped into limbo. Fixing that revealed a typo which would
have broken compilation for MSDOS.
`eight_bit_tty' has been renamed `wc_eight_bit_input',
but its only use anywhere in the code is for output.
- attempt to determine if tty_wait_synch() is called during the ending
dialogs due to an interrupt, and not re-display the previous message
at the wrong time
- also, "msg_window display anomaly" fix was missing code to still treat ^P
properly while in a prompt
If you interrupt nethack (^C) in tty windowport mode while a pompt is
displayed and and msg_window=true, it can display the full message history
at an unexpected time. Detect this and display only the topl, as expected.
to allow common parsing in the core, and direct access to the
results by the window port.
Notes:
o Adds a new field, wincap, to the window_procs
structure for setting bits related to the preference
features that the window port supports. This allows
run-time determination of whether a particular option
setting is applicable to the running window port. A
window-port is free to support as many, or as few,
of the available options as it wants. Ensure that
only the ones supported have their corresponding bit
set in window_proc.wincap. [see chart in
doc/window.doc for help with that.]
o The settings I stuck into wincap for each window
port are almost certainly not accurate, so each port
team should review them. You should only include
the ones that you will actually react to and make
adjustments for if the user changes that option.
Without the setting in wincap, the option won't even
show up in the 'O'ptions menu.
o preference_update() added to the window-port
interface, so that the window-port can be notified
if an option of interest (an option with its
corresponding bit set in wincap field) is
changed.
o provided a genl_preference_update() routine in
windows.c and used it for all the existing
window ports since they don't have a functional
one of their own yet.
o this messes around heavily with iflags and the options
arrays in options.c
o I hope I didn't break any port's existing code. I
tried not to. The Mac however, in particular, should
be looked at because it suffered a namespace collision
with what I was working on around fontname. It had
Mac specific font stuff in options.c. Please test
the Mac.