Commit Graph

6176 Commits

Author SHA1 Message Date
Pasi Kallinen
93cbd1fbb1 Allow all text attributes for menu_headings 2015-04-27 18:44:18 +03:00
Pasi Kallinen
eecd19caa9 Allow changing menucolors in-game via Options 2015-04-27 17:45:48 +03:00
Pasi Kallinen
4fa3c39b55 Show only beginning of annotation when redoing it 2015-04-27 16:18:59 +03:00
PatR
b4741d6206 more BUCX: union vs intersection
Fix filtering used by the 'D' command, and a few other activities that
allow both object class filtering and bless/curse state filtering, so
that when both class(es) and state(s) are specified, objects need to
match both rather than either.  D?C will present the player with cursed
scrolls to drop rather than all scrolls plus all other cursed objects.

This also fixes another instance when gold could end up with its bknown
flag set.
2015-04-27 01:22:39 -07:00
nhmall
ea21088d2a Merge branch 'AlexK-misc' into win32-x64-working 2015-04-26 18:08:50 -04:00
Alex Kompel
664b4eb643 bubble structure contains pointer into static array. Bubble objects
are being flat-dumped into save file and this causes segfault in restore()
whenever data segment layout changes (e.g. global variables added/removed).
bmask should either be stored with the objects.
2015-04-26 14:47:38 -07:00
Dion Nicolaas
701fa5afea Make nhsetup switch to the right directory always, and improve detection of double-click 2015-04-26 19:17:04 +02:00
Dion Nicolaas
497247ace0 Merge branch 'win32-x64-working' of https://rodney.nethack.org:20040/git/NHsource into win32-x64-working 2015-04-26 15:49:18 +02:00
Dion Nicolaas
29b9cb7c7d Fix a Borland compile error. Now fix the linking... 2015-04-26 15:47:14 +02:00
Pasi Kallinen
467ee34b2f Prevent possible buffer overflow
getlin() gets at most a BUFSZ string from user; make the buf big
enough to hold that _and_ the query itself.
2015-04-26 16:15:44 +03:00
nhmall
fa238fad65 Merge branch 'master' into win32-x64-working 2015-04-26 08:39:18 -04:00
PatR
6386331148 'I' command support for BUCX
Allow the 'I' command to show inventory of known blessed items via
pseudo object classes B, C, U, and X.  That's instead of an showing
inventory of specific object class.  The two can't be combined
because 'I' operates on single character input.

I had to modify tty_yn_function to prevent it from forcing a BUCX
character into lower case (simply using lower case would cause a
conflict with 'u' and 'x' for inventory of shopping bill), and did
that by checking whether any of the acceptable response characters
are upper case.  Pretty straightforward and shouldn't impact any
other uses that don't specify upper case choices.

I did the same thing for X11.  Other interfaces most likely need
to do something similar.  If they don't, a response of 'B' or 'C'
(for menustyle:traditional or menustyle:combination) will simply
not work, without causing any problems, same as typing an invalid
choice, and 'U' or 'X' will give shop feedback instead of the
requested subset of inventory.

The Guidebook revisions are untested.
2015-04-26 03:20:58 -07:00
Pasi Kallinen
54a22d39ea Add level annotating to the Call menu
Via UnNetHack
2015-04-26 11:29:59 +03:00
Pasi Kallinen
f28ba6f131 Show level annotation when overwriting existing one
Idea by Chris Smith, via UnNetHack
2015-04-26 11:10:38 +03:00
Pasi Kallinen
cc5274d0b6 Mung annotation spaces 2015-04-26 10:57:21 +03:00
Pasi Kallinen
4e067f5f2b Show level annotation on level entry
Idea by Chris Smith, via Unnethack
2015-04-26 10:46:42 +03:00
nhmall
8624709c0d comment termination bit 2015-04-25 15:49:14 -04:00
nhmall
07c5467434 checkfile protection from caller
Changes to be committed:
	modified:   src/pager.c
2015-04-25 10:51:07 -04:00
nhmall
a717d06ce4 Merge branch 'master' into win32-x64-working
Conflicts:
	src/end.c
	src/files.c
	src/options.c
2015-04-25 08:58:59 -04:00
Pasi Kallinen
5828d17eef Show only the short automatic glyph description
When you turn on the automatic description of a glyph under cursor,
we want to show the short description of what glyph it actually is.
The long full description of all possibilities is far too long, so
may cause more-prompts, and is awkward for blind players.
2015-04-25 15:19:19 +03:00
Pasi Kallinen
5479a0b44c Also allow q at the Itemized billing -prompt
Original change via AceHack by Alex Smith
2015-04-25 12:56:55 +03:00
PatR
27d8b631cd isspace() usage
Replace most uses of isspace() with a simple test for ' ' after
processing the string buffer with mungspaces (which replaces tab
with space, converts instances of consecutive whitespace into a
single space, and removes leading and trailing spaces).  The uses
where this wasn't done now cast their argument to (uchar) so that
platforms with signed chars will never pass negative values to it.

I didn't mess with the menu coloring code (except for casts to the
isspace() argument); it almost certainly could benefit from using
mungspaces.  I did mess with the symset processing quite a bit,
and hope I haven't accidentally broken anything.  Default symbols
and DECgraphics symbols still parse and display ok, so the rest of
dat/symbols should be ok too.  I didn't test symbols in the user's
config file because I don't remember how that's supposed to work.
2015-04-25 02:11:13 -07:00
Pasi Kallinen
672ef5223a Fix adding doors to levels 2015-04-25 12:00:44 +03:00
Pasi Kallinen
8e6dde226f Fix out-of-map condition in buzz 2015-04-25 06:24:43 +03:00
nhmall
3d5415b33a Merge branch 'master' into win32-x64-working 2015-04-24 22:40:46 -04:00
PatR
1eff16afcb do_look fix fix
Avoid initializer for auto-class array since many pre-ANSI compilers
didn't support that.  Also, when ESC is used to cancel inventory
selection, don't continue on searching for that selection in invent.
2015-04-24 16:07:00 -07:00
nhmall
ed2e70b506 Merge branch 'master' into win32-x64-working 2015-04-24 11:50:34 -04:00
nhmall
65e699b646 fix an observed stack corruption
Changes to be committed:
	modified:   src/pager.c
2015-04-24 11:23:07 -04:00
keni
24eb44a8c0 force date change (another mail test) 2015-04-24 10:11:17 -04:00
keni
de87c7550c and fill in the line (another mail test) 2015-04-24 10:01:00 -04:00
keni
34508d5df2 add a date line (another mail test) 2015-04-24 09:56:24 -04:00
keni
5e39fdffde Merge branch 'master' of https://rodney.nethack.org:20040/git/NHsource 2015-04-24 09:33:35 -04:00
keni
2774278607 enable subst for all DEVEL/*.txt (really another mail test) 2015-04-24 09:32:50 -04:00
Pasi Kallinen
1369b17e3b Stop travel or run when you get hungry 2015-04-24 16:24:50 +03:00
keni
a2dcc89838 force the date (really testing email) 2015-04-24 09:11:33 -04:00
PatR
ce58721890 more data.base lookup tidbits
Still doesn't address the reported stack corruption.

* 'alt' points to a buffer which has already been processed by
  lcase(), so remove the redundant call to that routine;
* common error exit accessed via 'goto' could potentially leave
  a dangling window structure (only if 'data' is corrupted though;
  it's the only way a failure at that late point could occur).
2015-04-24 02:18:07 -07:00
Derek S. Ray
22ffe3b84e initial pass for toning down Elbereth 2015-04-23 23:04:35 -04:00
PatR
d65fba4ebe do_look bits
I didn't find Michael's crasher, but I did find a couple of minor
problems:

knight's saddled pony wasn't found in the file lookup either though
there is an entry for pony ("tame saddled <foo>" stripped off "tame "
but not "saddled "; "saddled <foo>" would only be found of there was
a wildcard entry key of "*<foo>", like "*horse" to catch both horse
and warhorse);

"wombat" matched the bat entry rather than reporting an unknown
entity.
2015-04-23 19:25:01 -07:00
Pasi Kallinen
aea472c0c0 Give honorifics to vampires and elves 2015-04-23 21:46:10 +03:00
Pasi Kallinen
ea6157c475 Give gnomes occasionally a candle
...and if in unlit area, light the candle.
2015-04-23 21:19:25 +03:00
Pasi Kallinen
23ad7a8635 Hallucinated currencies
Originally via UnNetHack by Patric Mueller
2015-04-23 20:30:59 +03:00
Pasi Kallinen
fbf787c4fe Indicate how far you fall down a hole or trapdoor
No extra message when falling down to the next level,
otherwise give "You fall down a [very] [deep] shaft!".
2015-04-23 19:27:12 +03:00
nhmall
5a87938c7d Merge branch 'master' into win32-x64-working
Conflicts:
	src/restore.c
	src/save.c
2015-04-23 07:03:45 -04:00
PatR
ae6eeec22a statue glyph save/restore
Remove the code that converted statues shown as monsters into stautes
shown as big rocks when saving and then reversed the effect when
restoring.  It was done to preserve save file compatability with 3.4.3
where statue-as-monster glyphs didn't exist, so is no longer useful.
2015-04-22 19:47:55 -07:00
nhmall
67e7565ee2 Merge branch 'master' into win32-x64-working
Conflicts:
	src/sp_lev.c
2015-04-22 22:33:22 -04:00
PatR
51a70d0277 sp_lev.c cleanup
* remove several unreachable panic() calls; alloc() already panics
  rather than return a null pointer;
* replace a couple of calls to malloc() with alloc() so that
  MONITOR_HEAP won't produce spurious alloc/free discrepancies;
* replace several instances of variable 'd' with 'd0' so that it
  doesn't conflict with the name of a function;
* comment out opvar_new_region() since it isn't used anywhere.
2015-04-22 19:18:57 -07:00
PatR
16d8074352 lint 2015-04-22 19:17:49 -07:00
nhmall
03dc59b763 put back resource file 2015-04-22 22:05:23 -04:00
nhmall
89c862b15a fix typo in typo fix 2015-04-22 21:44:04 -04:00
Alex Kompel
cd72c7ec68 win32: fix broken dependency for ttystub.o 2015-04-22 18:12:14 -07:00