Commit Graph

494 Commits

Author SHA1 Message Date
PatR
45c5a79681 tty menu hack for ':'
Looting a container generates a menu which contains ': - look inside'
but the recent change to make ':' be a menu command for selecting
items which match a search string made it impossible to pick that item.
(Well, I suppose you could enter a search string which matched it, but
that's a nuisance compared to just directly picking a choice.)  This
makes menu selection for tty give precedence to menu choice characters
over mapped menu commands when some character happens to be both.  I'm
not sure whether it ought to be expended to group accelerators too, so
didn't do that.

There's bound to be a better way to do this, but it works.
2015-03-27 18:24:53 -07:00
Pasi Kallinen
911a3756c6 TTY: Guard against impossible x coord
If a menu item was longer than terminal width, the menu wasn't
cleared away after it was finished with.  This easily happened
when an inventory item was named.
2015-03-27 15:29:54 +02:00
PatR
14525ed0c6 DEBUG/debugpline() fixup
* Replace variadic debugpline() with fixed argument debugpline0(str),
   debugpline1(fmt,arg), and so on so that C99 support isn't required;
 * showdebug() becomes a function rather than a macro and handles a
   bit more;
 * two debugpline() calls in light.c have been changed to impossible();
 * DEBUGFILES macro (in sys.c) can substitute for SYSCF's DEBUGFILES
   setting in !SYSCF configuration (I hope that's temporary).
2015-03-15 18:02:26 -07:00
Pasi Kallinen
a46b7a3cf3 TTY: Implement the menu_search command
When in a menu that allows selecting entries, press ':'
to enter any text. Entries that match the text (via pmatch)
will be toggled.
2015-03-11 21:56:12 +02:00
Pasi Kallinen
8c048e6086 TTY: Prevent accidental escapes from string entries
On NAO, one of the major complaints was accidental escaping
from wishing prompt when using cursor keys.  The users were
trying to go "back" on the entry to fix a typo, but lost
the wish instead.

This prevents escaping out of a text prompt if there is any
text entered into the prompt; pressing escape clears the prompt.
2015-03-08 15:11:01 +02:00
Pasi Kallinen
a66b498dda TTY: Do not cut off statuslines at 80 characters
Show as much of the status line as possible, instead of chopping
it at COLNO - this prevents possible game-influencing status
effects (Ill, Burdened, etc) from being hidden.
2015-03-08 10:40:26 +02:00
Pasi Kallinen
9da976f004 Fix TTY crashing when a location has more than 32k items 2015-03-02 20:34:25 +02:00
Pasi Kallinen
748d9ea55b Fix segfault when MD termcap is not defined 2015-03-02 20:21:34 +02:00
keni
6fd30ab1ce Manually fix botched NHDT-Branch expansions. 2015-03-01 20:32:28 -05:00
Pasi Kallinen
7cbd2fd592 Remove last mention of EXP_ON_BOTL 2015-03-01 10:26:24 +02:00
Sean Hunt
a3faa93403 Remove experimental Unicode support.
This reverts commit 7f0f43e6f9 and some related
subsequent commits.

This compiles, but I have not done extensive testing.

Conflicts:
	include/config.h
	include/decl.h
	include/extern.h
	include/global.h
	include/tradstdc.h
	include/wintty.h
	src/drawing.c
	src/files.c
	src/hacklib.c
	src/mapglyph.c
	src/options.c
	sys/winnt/nttty.c
	win/tty/getline.c
	win/tty/topl.c
	win/tty/wintty.c
2015-02-27 19:34:29 -05:00
Sean Hunt
7c09285a8c Make EXP_ON_BOTL unconditional. 2015-02-27 19:34:26 -05:00
Sean Hunt
0001534d04 Make REDO unconditional. 2015-02-27 19:33:52 -05:00
Pasi Kallinen
612852f7de Apply paxed's DEBUG patch to remove DEBUG/D_DEBUG.
Move debugging output into couple preprocessor defines, which
    are no-op without DEBUG.  To show debugging output from a
    certain source files, use sysconf:

    DEBUGFILES=dungeon.c questpgr.c

    Also fix couple debug lines which did not compile.

This also includes fixes due to Derek Ray to depugpline to work better
on other platforms.
2015-02-27 19:33:45 -05:00
Sean Hunt
ac108cd365 Make GOLDOBJ unconditional. 2015-02-27 19:33:40 -05:00
Sean Hunt
1edadd1d48 Make REINCARNATION unconditional.
There is a lot of code affected by this, and Pat Rankin correctly
observes that it would be better to store roguelike as a level flag
rather than just using Is_rogue_level. A note for the future.
2015-02-27 19:33:16 -05:00
Sean Hunt
260f7ea860 Make TOURIST unconditional. 2015-02-27 19:33:12 -05:00
Sean Hunt
5ee71d2757 Make SINKS unconditional. 2015-02-27 19:33:06 -05:00
Sean Hunt
b066b7c170 Make KOPS unconditional. 2015-02-27 19:33:04 -05:00
Sean Hunt
9e65758947 Make STEED unconditional. 2015-02-27 19:33:01 -05:00
keni
7d9ea49e92 Another batch of manual header var additions 2015-02-26 17:43:47 -05:00
keni
0109f9715b A batch of manual header var additions. 2015-02-26 17:10:11 -05:00
keni
971ff1d4f3 Fix lost mode bits. 2015-02-26 09:22:52 -05:00
keni
03140969ee Bulk recovery of file CVS headers and addition of NHDT- headers. 2015-02-26 09:19:03 -05:00
Derek
bae3c6088f Exclude all the Win32 build artifacts (Studio and otherwise)
Squashed commit of the following:

commit e37c7626f035a29321c9ac12cca83a0af2132abb
commit 86ebb3e66aedb6b5a31d61d57c39cf84c12d2276
commit 6cd677c8fca4102f223fb1708d00a65c2ded6658
Author: Derek <derekray@gmail.com>
Date:   Fri Feb 13 13:24:29 2015 -0500
2015-02-13 13:26:05 -05:00
nethack.rankin
a871ad06e9 outrip() updating (trunk only)
Part II of the bones tracking patch.  Change umpteen different outrip()
routines to handle its new time_t argument, and use formatkiller() instead
of directly accessing killer.{format,name} and killed_by_prefix[].  The
latter is now static within formatkiller().

     The many sys/* and win/* changes are untested....
2012-01-24 04:26:33 +00:00
nethack.rankin
9721470635 bones tracking (trunk only)
[See cvs log for include/rm.h or doc/window.doc for more complete description.]

Attach hero info, death reason, and date+time to a level that's being saved
as bones.  Read such data back when loading a bones file, then treat it as
part of that level for the rest of the game.  Dying on a loaded bones file
will chain the new hero+death+date to previous one(s) if new bones get saved.

outrip() now takes an extra argument of type time_t, and interface-specific
implementations of this routine need to be updated to handle that.
2012-01-23 10:45:31 +00:00
nethack.rankin
fa80181ed0 lint bit, shadowed 'restoring' (trunk only) 2012-01-23 06:29:37 +00:00
nethack.allison
b5ca45599c msdos build (trunk only) 2012-01-22 06:27:09 +00:00
nethack.rankin
756bd2230f fix date.h/patchlevel.h removal typo 2012-01-21 09:00:37 +00:00
nethack.rankin
7db7b8de73 date.h/patchlevel.h dependencies (trunk only)
Remove date.h and patchlevel.h from win/tty/wintty.c, win/X11/winX.c,
and sys/share/pcmain.c (caveat: the latter two are untested) so that they
don't get recompiled every time any other source file changes and triggers
creation of a new date.h.  Only version.c needs to be recompiled in that
situation.  Also, Makefile.src was missing a reference to botl.h.
2012-01-20 03:41:33 +00:00
keni
f5fa250691 drop extra includes
Remove includes already pulled in by hack.h
2012-01-12 15:08:29 +00:00
keni
7f6ee2f759 WINCHAIN - a framework allowing multiple processors between core and winport
This is the code I built trying to figure out the large window size issue.
It completely compiles out if not needed (see -DWINCHAIN in hints/macos10.7)
and except for one call during setup has zero overhead if compiled in and
not used.  See window.doc for more info.

Defs for UNUSED parms.  I know this has been controversial, so use is isolated
to the chain code and windows.c (where it shouldn't be intrusive and saves about
50 warnings).

Hints file for 10.7, but the build process still needs to be migrated from
the branch.
2012-01-11 18:23:35 +00:00
nethack.allison
586e2cb67e Suppress an x64 build warning (trunk only) 2012-01-11 01:53:44 +00:00
nethack.allison
593181421d More clean up of the Windows x64 build (trunk only) 2012-01-11 01:45:02 +00:00
nethack.allison
783413bb57 Start trying to clean up the Windows x64 build (trunk only) 2012-01-11 01:15:37 +00:00
keni
b97d53fb30 cleanup: outdated SCCS lines
Pat noted that I neglected to drop the SCCS lines on the files I've been
committing, so clean up those and any others I could find where the SCCS
line date is out of date.
2012-01-10 17:47:45 +00:00
keni
92b15c5f8a another shot at H2344 (large window)
Conditional on H2344_BROKEN which can be disabled at the top of the file if
necessary.  This appears to handle all the cases I was able to reproduce from
Pat's list, with the caveat that msg_window=f fails on very wide windows on
Mac OSX Lion with the default terminal emulation.  When the emulation is set
to ANSI, it works (the failure mode is the output from a simple putchar() loop
across the contents of history called up from ^P wraps at about the middle
of the window).
2012-01-10 02:33:36 +00:00
keni
c119e8c3d9 add param to ini winsys routines
Provide a mechanism for cleanly moving between tentative window system
selections during startup.  Now, before a second (or later) system is selected,
the first will be notified that it is losing control.  See window.doc.
2012-01-10 01:39:31 +00:00
nethack.allison
93ee252e87 More MS Visual Studio 2010 Express stuff 2012-01-07 22:57:39 +00:00
keni
9c1268d581 H2344 fix backout (trunk only)
Undo the win/tty/wintty.c bands of the H2344 fix until the fix is fixed.  I
didn't take out the type changes to hopefully avoid putting people through
a full recompile.
2011-12-11 21:58:29 +00:00
nethack.rankin
77593aa294 tty_getlin cleanup (trunk only)
The presence of conditional code for both UNICODE_WIDEWINPORT and
NEWAUTOCOMP in hooked_tty_getlin() was making it be pretty hard to read.
This simplifies the UNICODE_WIDEWINPORT parts similar to what was done in
topl.c a year or two back.  The NEWAUTOCOMP parts are still cluttered.

     This compiles successfully with UNICODE_WIDEWINPORT enabled but that
configuration is otherwise untested.
2011-12-11 01:54:56 +00:00
keni
eef41ba4a8 fix H2488 - wide and/or tall screens don't work
Make windows with more than 255 rows or columns work.  Touches
some very old magic involving the constant 10.
2011-12-04 20:06:00 +00:00
keni
2402f43776 mac term packaging code (trunk only)
: Modified Files:
: 	sys/unix/hints/macosx.sh sys/unix/hints/macosx10.5
: 	win/macosx/NetHackRecover.applescript win/macosx/recover.pl
: Added Files:
: 	win/macosx/NetHackGuidebook.applescript
: 	win/macosx/NetHackTerm.applescript
2011-10-17 01:29:20 +00:00
keni
4e5e720334 display version and build info at startup (trunk only)
Tested on the unix port; I've updated as many other ports as I can figure
out but they're not tested.  See window.doc for info on the changed banner
lines.  Also adds the ability to override the generic "Unix" port - used now to get
"MacOSX" into the version line instead of "Unix" (so we don't scare people who don't
know what's going on).
2011-10-11 02:37:31 +00:00
nethack.rankin
ddf5aced48 fix W343-7 - strange topten output on Windows
Move the toptenwin option from flags to iflags to keep it out of
save files, thus preventing odd behavior from win32 (nethackW.exe) when
restoring and finishing games started and saved with tty (nethack.exe).
[See cvs log entry for flag.h for more complete explanation.]
2011-09-19 03:10:01 +00:00
nethack.allison
aac052f0f0 Clean up the visual studio express build further
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/
2010-09-05 14:22:20 +00:00
nethack.allison
0823f48b7d Enable build under current MS Visual Studio Express 2010 tools
Since the current suite is freely downloadable, remove the older VS files.

Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/
2010-08-30 12:34:10 +00:00
keni
cbd2a516e1 First batch of changes from FailSafeC
This is all tiny stuff - allow overriding WIDENED_PROTOTYPES from the hints
file, missing NO_SIGNAL conditionals, remove a GCC-ism, conditional indentation,
void return in a non-void function.
2010-02-10 16:08:51 +00:00
keni
f6e40b8bf8 have core ask windowport if suspend is ok
PORTS: Please make sure I've done the right thing for/to your code.
This patch adds a new winproc that lets the window port approve or cancel
the suspend request - this should take care of the Mac Qt lockup issue.
In addition, Unix suspend is restricted to accounts that can use the shell
if SYSCF is defined.
2010-01-15 17:51:28 +00:00