]> granicus.if.org Git - nethack/log
nethack
9 years agoMerge branch 'status_hilite' of https://rodney.nethack.org:20040/git/NHsource into...
Alex Kompel [Mon, 1 Jun 2015 04:32:13 +0000 (21:32 -0700)]
Merge branch 'status_hilite' of https://rodney.nethack.org:20040/git/NHsource into status_hilite

9 years agowin32-gui: parse value of gold correctly for status hilite
Alex Kompel [Mon, 1 Jun 2015 04:31:27 +0000 (21:31 -0700)]
win32-gui: parse value of gold correctly for status hilite

9 years agomore work on the tty status_hilite code
nhmall [Sun, 31 May 2015 23:39:28 +0000 (19:39 -0400)]
more work on the tty status_hilite code
 Changes to be committed:
modified:   include/wintty.h
modified:   src/botl.c
modified:   win/tty/wintty.c

9 years agoyet more updates
nhmall [Sun, 31 May 2015 20:50:08 +0000 (16:50 -0400)]
yet more updates
 Changes to be committed:
modified:   include/botl.h
modified:   include/extern.h
modified:   include/wintty.h
modified:   src/botl.c
modified:   src/options.c
modified:   src/windows.c
modified:   win/tty/wintty.c

get the tty versions started

9 years agomore updates
nhmall [Sun, 31 May 2015 19:18:59 +0000 (15:18 -0400)]
more updates
 Changes to be committed:
modified:   include/botl.h
modified:   src/botl.c
modified:   src/windows.c
modified:   win/tty/wintty.c

9 years agosome code rearrangement/cleanup in botl.c
nhmall [Sun, 31 May 2015 18:45:29 +0000 (14:45 -0400)]
some code rearrangement/cleanup in botl.c

9 years agonotify windowport of hilites when status is initialized
nhmall [Sun, 31 May 2015 16:06:18 +0000 (12:06 -0400)]
notify windowport of hilites when status is initialized
 Changes to be committed:
modified:   src/botl.c

9 years agomore adjustments
nhmall [Sun, 31 May 2015 15:56:55 +0000 (11:56 -0400)]
more adjustments
 Changes to be committed:
modified:   src/botl.c
modified:   src/options.c

9 years agomore status_hilite work
nhmall [Sun, 31 May 2015 15:54:06 +0000 (11:54 -0400)]
more status_hilite work
 Changes to be committed:
modified:   include/extern.h
modified:   src/botl.c
modified:   src/options.c
modified:   src/windows.c

defer notification of the window port until after
proper initialization. Options are processed very
early in 3.6.0

9 years agointerim updates
nhmall [Sun, 31 May 2015 14:26:54 +0000 (10:26 -0400)]
interim updates
 Changes to be committed:
modified:   include/botl.h
modified:   src/botl.c
modified:   src/windows.c
modified:   win/tty/wintty.c

Move the windowport stuff out of botl.c and into windows.c
where it belongs.

9 years agoMerge branch 'master' into status_hilite
nhmall [Sun, 31 May 2015 02:23:25 +0000 (22:23 -0400)]
Merge branch 'master' into status_hilite

9 years agosome updates
nhmall [Sun, 31 May 2015 02:22:39 +0000 (22:22 -0400)]
some updates
 Changes to be committed:
modified:   include/botl.h
modified:   src/botl.c

9 years agoMerge branch 'master' of https://rodney.nethack.org:20040/git/NHsource
nhmall [Sun, 31 May 2015 02:07:57 +0000 (22:07 -0400)]
Merge branch 'master' of https://rodney.nethack.org:20040/git/NHsource

9 years agosome documentation updates
nhmall [Sun, 31 May 2015 02:06:02 +0000 (22:06 -0400)]
some documentation updates
 Changes to be committed:
modified:   dat/history
modified:   doc/Guidebook.mn
modified:   doc/Guidebook.tex

- include new 3.6.0 beta testers in dungeoneers list

9 years agoget_cost_from_price
PatR [Sun, 31 May 2015 01:22:14 +0000 (18:22 -0700)]
get_cost_from_price

I couldn't figure out why walking over a container in a shop might
give the wrong price; the code looks correct.  But I've reorganized
get_cost_from_price to perform the cheapest tests first.  The u.ushops
check should probably be done in doname to avoid calling this routine
at all 99.99% of the time.

9 years agodisoriented teleport attempt
PatR [Sat, 30 May 2015 19:30:54 +0000 (12:30 -0700)]
disoriented teleport attempt

Reported for pre-beta, getting "you feel disoriented" when attempting
to teleport within a level while carrying the Amulet, you still ended
up teleporting.  Wizard mode allows the disorientation to be overridden
but the logic was wrong.  It worked as intended when in wizard mode but
unintentionally always overrode disorientation when not in that mode.

9 years agoMerge branch 'master' into status_hilite
nhmall [Sat, 30 May 2015 14:59:39 +0000 (10:59 -0400)]
Merge branch 'master' into status_hilite

9 years agoformatting fix
nhmall [Sat, 30 May 2015 08:56:24 +0000 (04:56 -0400)]
formatting fix

9 years agomenucolors parsing
PatR [Sat, 30 May 2015 08:25:46 +0000 (01:25 -0700)]
menucolors parsing

Revise the menucolor parsing (color and attribute portion, not the
regexp part) to switch to the string matching used for wishing in
order to allow space in the "light <foo>" entries instead of forcing
the two words to be run together.  Having them be run together still
works, as does use of dash or underscore to separate the two words.
So the canonical form for light blue is now "light blue" instead of
"lightblue", but all of "light blue", "lightblue", "light-blue", and
"light_blue" match it.  (So do weird things like "--li-gh_-_tbl ue _"
but I won't lose any sleep over that.)

Almost all of this if formatting; mostly blank line after declarations
but also there was new stuff that didn't match the recent reformat.

9 years agoadd warning glow for Orcrist & Grimtooth
PatR [Sat, 30 May 2015 00:42:15 +0000 (17:42 -0700)]
add warning glow for Orcrist & Grimtooth

Make Orcrist glow light blue when orcs are present, just like Sting.
(Sting supposedly glowed because it was made by the elves of Gondolin
rather than any particular attribute built into it, and Orcrist was
made there too.  I think it also glowed in the Hobbit; that was how
Bilbo recognized what the situation was when he first saw Sting glow.
Maybe it was the other sword rather than Orcrist, but they were treated
as being functionally equivalent.)

Also make Grimtooth glow red when elves are present.  That's from thin
air, to give it some novelty.  Unlike Sting, whose double-damage bonus
is restricted to orc targets, Grimtooth's weak 1d6 bonus still applies
to all targets.

9 years ago'Du' bug with non-empty containers
PatR [Fri, 29 May 2015 22:46:13 +0000 (15:46 -0700)]
'Du' bug with non-empty containers

ckunpaid() had the same coding error as allow_category().  A hero-owned
container holding hero-owned contents followed in invent an any unpaid
object was mis-classified unpaid.

9 years agoAdjust the getpos() hint for naming a floor object if the hero happens
PatR [Fri, 29 May 2015 22:14:38 +0000 (15:14 -0700)]
Adjust the getpos() hint for naming a floor object if the hero happens
to polymorphed into something which is hiding under an object.

Also, make the attempt to name a floor object while hallucinating give
a more interesting result.

9 years agoAdd vibrasquare symbol to Guidebooks
Pasi Kallinen [Fri, 29 May 2015 19:47:39 +0000 (22:47 +0300)]
Add vibrasquare symbol to Guidebooks

9 years agoRenumber glyphs for vibrasquare trap conversion
Pasi Kallinen [Fri, 29 May 2015 19:42:11 +0000 (22:42 +0300)]
Renumber glyphs for vibrasquare trap conversion

9 years agoFix typo in potion dilution message, found by Raisse
Pasi Kallinen [Fri, 29 May 2015 10:20:20 +0000 (13:20 +0300)]
Fix typo in potion dilution message, found by Raisse

9 years agousing #name to call a floor object
PatR [Fri, 29 May 2015 09:07:50 +0000 (02:07 -0700)]
using #name to call a floor object

Implement Boudewijn's suggestion that #name be extended to allow naming
something of the floor.  I'm sure he wants this so that he can avoid
picking up gray stones, but it's something I started to implement years
ago (probably at an earlier suggestion from him...) and then forgot all
about.

This changes the #name menu to be
   m - a monster
   i - a particular object in inventory
   o - the type of an object in inventory
   f - the type of an object upon the floor
   d - the type of an object on discoveries list
   a - record an annotation for the current level
   What do you want to name?
with the i and o choices omitted when inventory is empty.  If the
'lootabc' option is set it will use a through f instead, but then the
last three entries change letters when inventory is empty.  'y' and 'n'
are still accelerators (effectively hidden choices) for the i and o
entries, corresponding to the answers for the 3.4.3 and earlier "name
an individual object?" prompt.

The floor choice asks you to pick a location.  If you pick yourself,
then the top object of the pile underneath you is targetted.  Otherwise,
the target must be an object glyph, and the object must have its dknown
bit set, so have previously been seen up close or revealed via blessed
potion of object detection.  To make it be more useful, targetting an
object on an adjacent square will set the dknown bit.  (Just the top
object if there is a pile there.)  There's no cockatrice corpse touch
check since you aren't actually touching anything, just looking.

The setting of dknown bit for an adjacent object has been extended to
the '/' and ';' commands for examining things on the screen as well.
It's only done for adjacent spots you actively select, not all 8 spots
around you.

9 years agoupdate the name of the fixes file in Files
nhmall [Fri, 29 May 2015 03:05:45 +0000 (23:05 -0400)]
update the name of the fixes file in Files
 Changes to be committed:
modified:   Files

9 years agoa note about the reformatting
nhmall [Fri, 29 May 2015 02:09:40 +0000 (22:09 -0400)]
a note about the reformatting
 Changes to be committed:
modified:   doc/fixes36.0

9 years agoMerge branch 'master' of https://rodney.nethack.org:20040/git/NHsource
nhmall [Fri, 29 May 2015 02:04:00 +0000 (22:04 -0400)]
Merge branch 'master' of https://rodney.nethack.org:20040/git/NHsource

9 years agoMerge branch 'master' of https://rodney.nethack.org:20040/git/NHsource
nhmall [Fri, 29 May 2015 01:56:42 +0000 (21:56 -0400)]
Merge branch 'master' of https://rodney.nethack.org:20040/git/NHsource

Conflicts:
src/artifact.c

9 years agoMerge branch 'master' of https://rodney.nethack.org:20040/git/NHsource
karnov [Fri, 29 May 2015 01:56:34 +0000 (21:56 -0400)]
Merge branch 'master' of https://rodney.nethack.org:20040/git/NHsource

Resync prior to pushing tribute changes.

9 years agodon't see Sting glowing light blue if you're blind
nhmall [Fri, 29 May 2015 01:49:13 +0000 (21:49 -0400)]
don't see Sting glowing light blue if you're blind
 Changes to be committed:
modified:   doc/fixes35.0
renamed:    doc/fixes35.0 -> doc/fixes36.0
modified:   src/artifact.c

9 years agoAdd a quote for The Fifth Elephant
karnov [Fri, 29 May 2015 01:48:55 +0000 (21:48 -0400)]
Add a quote for The Fifth Elephant

9 years agoSting's glow while blind
PatR [Fri, 29 May 2015 01:36:51 +0000 (18:36 -0700)]
Sting's glow while blind

Give an alternate message if Sting starts or stops glowing while the
hero can't see.  It probably ought to give an immediate message when
blindness toggles but that looks like it could get messy.

Having an 'o' die or migrate off level should probably also redo the
Sting message immediately, otherwise we see things like:
  The little dog kills the goblin.
  The little dog eats a goblin corpse.
  Sting stops glowing.
(There could be lots of additional intervening messages depending on
other monster activity at the time.)  Calling see_monsters() in the
relevant places--probably m_detach() and migrate_to_level()--would
address this but won't do because that could result in hallucinating
monsters changing appearance mid-turn.

9 years agomore tribute quotes
nhmall [Thu, 28 May 2015 23:04:37 +0000 (19:04 -0400)]
more tribute quotes
 Changes to be committed:
modified:   dat/tribute

9 years agoTerry Pratchett quotes from Raisse
nhmall [Thu, 28 May 2015 22:08:27 +0000 (18:08 -0400)]
Terry Pratchett quotes from Raisse
 Changes to be committed:
modified:   dat/tribute

9 years agoMSGTYPE lint
PatR [Thu, 28 May 2015 09:36:00 +0000 (02:36 -0700)]
MSGTYPE lint

Fix a couple of bits of lint in options.c, plus do some formatting
cleanup (in the vicinity only, not the whole file).

9 years agofix [pre-]beta 'Du' bug with containers in shops
PatR [Thu, 28 May 2015 09:22:48 +0000 (02:22 -0700)]
fix [pre-]beta 'Du' bug with containers in shops

'Du' in a shop was listing hero-owned containers that didn't contain
any unpaid items.  At least one unpaid item must be carried; bug
manifested iff one or more unpaid items followed the container in
the invent list.

Recently revised allow_category() was using count_unpaid() for
container contents incorrectly, inadvertently checking the rest of
inventory after the container in addition to its contents.

9 years agostrncmpi, not strcasecmp
Derek S. Ray [Thu, 28 May 2015 01:09:54 +0000 (21:09 -0400)]
strncmpi, not strcasecmp

9 years agono, really, use the right header
Derek S. Ray [Thu, 28 May 2015 01:00:00 +0000 (21:00 -0400)]
no, really, use the right header

9 years agoShow cost of merchandise when walking over it
Pasi Kallinen [Wed, 27 May 2015 18:43:57 +0000 (21:43 +0300)]
Show cost of merchandise when walking over it

This is another feature the betatesters seemed to miss a lot.

9 years agoMake options-menu more uniform
Pasi Kallinen [Wed, 27 May 2015 17:51:40 +0000 (20:51 +0300)]
Make options-menu more uniform

9 years agoRename omit_buc option to implicit_uncursed
Pasi Kallinen [Wed, 27 May 2015 17:42:06 +0000 (20:42 +0300)]
Rename omit_buc option to implicit_uncursed

... so the name is less cryptic.

9 years agoAdd MSGTYPE config option
Pasi Kallinen [Wed, 27 May 2015 15:29:12 +0000 (18:29 +0300)]
Add MSGTYPE config option

MSGTYPE allows the user to define how messages in the message
area behave. For example:

  MSGTYPE=stop "You swap places with "

would always make that message prompt for -more-.  Allowed types
are "show" (normal message), "hide" (do not show), "stop" (wait
for user), and "norep" (do not repeat message).

Adding this, because it's relatively simple, proven to work, and
it seemed to be the major thing betatesters felt was lacking when
compared to NAO.

9 years agoRemember novel titles in bones.
Sean Hunt [Wed, 27 May 2015 13:17:17 +0000 (22:17 +0900)]
Remember novel titles in bones.

9 years agohacklib.c formatting
PatR [Wed, 27 May 2015 10:49:09 +0000 (03:49 -0700)]
hacklib.c formatting

hacklib.c took a beating in the reformatting, so clean it up.
A tweak to the anti-predictability hack in setrandom() is the only
change in the actual code.

9 years agoomit_buc tweak
PatR [Wed, 27 May 2015 10:35:28 +0000 (03:35 -0700)]
omit_buc tweak

gcc complained about mixing && with || without parantheses.  After
scratching my head a bit, I think this change yields the intended
result.

'omit_buc' is a bad option name.  It's cryptic and it doesn't even
describe the function.  At a minimum it ought to be changed to
'omit_uncursed' to accurately describe what it does.
'implicit_uncursed' or 'explicit_uncursed' (with opposite boolean
value) would be even more precise but probably not any clearer.

9 years agoAdd omit_buc -option
Pasi Kallinen [Wed, 27 May 2015 09:46:31 +0000 (12:46 +0300)]
Add omit_buc -option

The option defaults to on, which is the old-style behaviour.
Turning the option off will never omit the "uncursed" -status
from inventory lines. This is pretty much required if users
want to use menucolors based on the BUC state.

9 years agoNew precompiled versions of these
Derek S. Ray [Wed, 27 May 2015 02:54:55 +0000 (22:54 -0400)]
New precompiled versions of these

9 years agomimics mimicking strange objects
PatR [Wed, 27 May 2015 00:16:30 +0000 (17:16 -0700)]
mimics mimicking strange objects

The code that intended to have mimics occasionally take on the form
of "strange object" always produced downstairs instead because
S_MIMIC_DEF is greater than MAXOCLASSES.

This problem was present in 3.4.3.  I didn't try to go back to see
how long it's been there, but strange objects used to occur once
upon a time.  Either nobody noticed that they'd gone away or there's
an alternate way to produce them.

9 years agoMore wishing nits.
Sean Hunt [Tue, 26 May 2015 00:05:18 +0000 (09:05 +0900)]
More wishing nits.

9 years agoCount only stacks when listing container contents.
Sean Hunt [Mon, 25 May 2015 23:59:31 +0000 (08:59 +0900)]
Count only stacks when listing container contents.

By popular demand of the beta testers.

9 years agoProvide feedback when one of your items gets wet.
Sean Hunt [Mon, 25 May 2015 11:55:48 +0000 (20:55 +0900)]
Provide feedback when one of your items gets wet.

9 years agoquestpgr.c's in_line[], out_line[]
PatR [Mon, 25 May 2015 22:49:44 +0000 (15:49 -0700)]
questpgr.c's in_line[], out_line[]

Replace static in_line[] and out_line[] with local variables that are
released when the quest pager code returns to caller.  QTEXT_IN_SIZ
was already removed from makedefs; now QTEXT_OUTSIZ is removed from
nethack.  Use regular BUFSZ for them instead of trying to maintain a
separate size for quest text.

9 years agowishing bit - royal jelly
PatR [Mon, 25 May 2015 21:54:48 +0000 (14:54 -0700)]
wishing bit - royal jelly

9 years agoFix squeaky board creation segfault
Pasi Kallinen [Mon, 25 May 2015 19:02:59 +0000 (22:02 +0300)]
Fix squeaky board creation segfault

If a trap is created on top of another trap, maketrap reuses
the trap struct in place, instead of deleting and recreating it.

If a squeaky trap was created on top of another trap, maketrap
first set the trap type to squeaky board, and then tried to
look through all squeaky boards on the level, to determine
what note the new trap should play. Unfortunately, the union
with the trap note most likely contained a rolling boulder
coordinate or something else outside the 12 note range, so
then the tavail-array lookup would cause a segfault.

9 years agoFix dark room glyphs on level re-entry
Pasi Kallinen [Mon, 25 May 2015 07:02:09 +0000 (10:02 +0300)]
Fix dark room glyphs on level re-entry

9 years agotrickier lint cleanup
PatR [Mon, 25 May 2015 06:49:05 +0000 (23:49 -0700)]
trickier lint cleanup

Suppress some mostly longstanding "unused parameter" warnings where
the usage was generally conditional.

restlevl() had a conditional closing brace that confused the recent
reformat, resulting in some code inside a funciton ending up flush
against the left border (first column, that is, as if outside of the
function).

9 years agomakedefs lint
PatR [Mon, 25 May 2015 06:26:35 +0000 (23:26 -0700)]
makedefs lint

makedefs.c: In function 'fgetline':
makedefs.c:2630: warning: comparison between signed and unsigned
makedefs.c: At top level:
makedefs.c:2638: warning: ISO C does not allow extra ';' outside of a function

fgetline() makes my recent check for quest line truncation become
redundant, so strip that out.  I haven't taken the corresponding
macro out of qtext.h though.

[I didn't see any patch introducing 'fgetline'.  Was it hidden as
part of some big merge?]

9 years agoadd missing tile and correct clobbered header file
nhmall [Mon, 25 May 2015 01:10:22 +0000 (21:10 -0400)]
add missing tile and correct clobbered header file

9 years agoAdd clang-formatting file.
Sean Hunt [Mon, 25 May 2015 00:15:36 +0000 (09:15 +0900)]
Add clang-formatting file.

This should be in the repository, even though nobody can use it yet.

9 years agoRemove stale version control lines.
Sean Hunt [Mon, 25 May 2015 00:14:13 +0000 (09:14 +0900)]
Remove stale version control lines.

9 years agoReformat .h files.
Sean Hunt [Mon, 25 May 2015 00:03:10 +0000 (09:03 +0900)]
Reformat .h files.

I did my best to exempt some of the bigger aligned blocks from the reformatting
using the /* clang-format off */ and /* clang-format on */ tags. Probably some
that shouldn't have been formatted were anyway; if you encounter them, please
fix.

The clang-format tags were left in on the basis that it's much easier to prune
those out later than to put them back in, and it means that, modulo my custom
version of clang-format, I should be able to run clang-format on the source tree
again without changing anything, now that Pat has fixed the VA_DECL issues.

9 years agoConvert the vibrating square to a trap
Sean Hunt [Sun, 24 May 2015 15:32:45 +0000 (00:32 +0900)]
Convert the vibrating square to a trap

Patch due to ais523 in NetHack 4.

This is not ready to be merged yet; the vibrating square needs a tile
image for tiles builds.

9 years agoremove #include of file that doesn't exist
nhmall [Sun, 24 May 2015 23:29:20 +0000 (19:29 -0400)]
remove #include of file that doesn't exist

9 years agofix a mistake on patch merge
nhmall [Sun, 24 May 2015 23:17:05 +0000 (19:17 -0400)]
fix a mistake on patch merge
Changes to be committed:
modified:   util/makedefs.c

9 years agoWarning cleanup.
Sean Hunt [Sun, 24 May 2015 15:08:34 +0000 (00:08 +0900)]
Warning cleanup.

9 years agoMake the wand of wishing chest immune to trapping
Sean Hunt [Sun, 24 May 2015 15:04:05 +0000 (00:04 +0900)]
Make the wand of wishing chest immune to trapping

This eliminates a source of very random, unpreventable frustration to
players.

9 years agoMake long worms unleashable.
Sean Hunt [Sun, 24 May 2015 15:04:04 +0000 (00:04 +0900)]
Make long worms unleashable.

Fixes a bug reported by ais523. Rather than account for individual
segments, I opted just to make them unleashable, because it's not very
useful behaviour anyhow.

9 years agoClean up ceiling nits.
Sean Hunt [Sun, 24 May 2015 15:04:03 +0000 (00:04 +0900)]
Clean up ceiling nits.

Fixes C343-102.

9 years agoFiles update
nhmall [Sun, 24 May 2015 14:30:55 +0000 (10:30 -0400)]
Files update

9 years agomerge two sets of patches to makedefs.c,qtext.h
nhmall [Sun, 24 May 2015 14:27:03 +0000 (10:27 -0400)]
merge two sets of patches to makedefs.c,qtext.h
 Changes to be committed:
modified:   include/qtext.h
modified:   util/makedefs.c

9 years agoProvide documentation for the regex engine.
Sean Hunt [Sun, 24 May 2015 13:23:18 +0000 (22:23 +0900)]
Provide documentation for the regex engine.

The guidebook entries could do with more detailed descriptions, but this
will do for now.

9 years agoUse the common regex engine in more places.
Sean Hunt [Sun, 24 May 2015 13:23:17 +0000 (22:23 +0900)]
Use the common regex engine in more places.

In particular, in autopickup_exceptions and user sounds.

9 years agoModify makedefs to use dynamic buffers for reading.
Sean Hunt [Sun, 24 May 2015 12:40:30 +0000 (21:40 +0900)]
Modify makedefs to use dynamic buffers for reading.

This will prevent crashing due to excessively long lines.

9 years agoprep for sean's emailed patch
nhmall [Sun, 24 May 2015 14:16:38 +0000 (10:16 -0400)]
prep for sean's emailed patch

9 years agoprep for sean's emailed patch
nhmall [Sun, 24 May 2015 14:09:44 +0000 (10:09 -0400)]
prep for sean's emailed patch

9 years agoAdd pmatch-based regex engine.
Sean Hunt [Sun, 24 May 2015 13:23:16 +0000 (22:23 +0900)]
Add pmatch-based regex engine.

As mentioned, this is not tested. It should be simple though.

9 years agoAudit rloc()
Sean Hunt [Sun, 24 May 2015 12:40:33 +0000 (21:40 +0900)]
Audit rloc()

Most of the time, rloc() is used for teleporting monsters and it's not a
big deal if they can't find somewhere to go. In a few cases, it is. I
went through all the callsites and made calls to rloc() not cause
impossible()s if they don't need to.

Fixes a bug/suite of bugs reported by ais523.

9 years agoClean up a rare corner case with mnearto().
Sean Hunt [Sun, 24 May 2015 12:40:32 +0000 (21:40 +0900)]
Clean up a rare corner case with mnearto().

With this fix, if the second mnearto fails, we don't accidentally strand
othermon at (0,0).

9 years agoFix sleep explosion causing impossible().
Sean Hunt [Sun, 24 May 2015 12:40:31 +0000 (21:40 +0900)]
Fix sleep explosion causing impossible().

Also clean up come ternaries while I'm here.

My first attempt to fix was to add AD_SLEE to explode(), but that failed
because do_break_wand() already does the sleeping portion. I don't
generally like the duplication between explode() and do_break_wand as a
result, but I consider that issue a project for another day.

9 years agominor comment typo spotted
nhmall [Sun, 24 May 2015 12:17:32 +0000 (08:17 -0400)]
minor comment typo spotted
 Changes to be committed:
modified:   src/objnam.c

9 years agomakedefs -q fix
PatR [Sun, 24 May 2015 06:11:41 +0000 (23:11 -0700)]
makedefs -q fix

Make the input buffer for quest messages bigger so that the expanded
header line from nhsub won't be too long.  Also, makedefs will notice
and report too long lines ('makedefs -q' only) and sanely proceed with
the rest of the file instead of treating the excess part of a long
line as a separate line.

9 years agoquest summary messages for B and C
PatR [Sat, 23 May 2015 08:10:56 +0000 (01:10 -0700)]
quest summary messages for B and C

Add '%E [summary line]' to '%Cc' messages for Barbarian and Caveman.
Archeologist was done several years ago; the other roles still need
them.  Creating them is fairly tedious, but DEBUGFILES=questpgr.c
allows them all to be checked on turn 1 via ^P, a great improvement
since that first set.

9 years agomsghistory bandage
PatR [Sat, 23 May 2015 07:59:18 +0000 (00:59 -0700)]
msghistory bandage

Have genl_putmsghistory() pass the message to pline() for the !restoring
case, so that quest summary lines are delivered as ordinary messages.
No effect on tty or win32, which have their own putmsghistory routines.
But for X11, which has a multi-line message window but no save/restore
implementation for its contents, this makes the quest summary lines
actually show up somewhere.  (I looked at maybe implementing
X11_getmsghistory() and X11_putmsghistory() but don't have the energy to
tackle it.)

Other interfaces which lack their own history save/restore will see the
quest summary messages too.  Presumeably they'll all have multi-line
history windows so the extra line won't be displacing the most recent
message.  If not, they'll essentially get the long quest messages twice,
once in full via popup window, then the one-line summary via pline.

9 years agoqtdump() overhaul
PatR [Sat, 23 May 2015 07:50:34 +0000 (00:50 -0700)]
qtdump() overhaul

When dumping quest messages at startup via DEBUGFILES=questpgr.c,
give a single message for each one, instead of a pline showing the
message number and delivery protocol followed by a popup message
window containing the text.  This puts the number and protocol info
at the start/top of the popup window, bypassing the pline (and the
extra --More-- given for tty).

9 years agobeta info
nhmall [Sat, 23 May 2015 00:08:33 +0000 (20:08 -0400)]
beta info
 Changes to be committed:
modified:   src/version.c

9 years agoGuidebook accuracy
nhmall [Fri, 22 May 2015 00:59:04 +0000 (20:59 -0400)]
Guidebook accuracy
 Changes to be committed:
modified:   doc/Guidebook.mn
modified:   doc/Guidebook.tex

9 years agoMerge branch 'master' of https://rodney.nethack.org:20040/git/NHsource
nhmall [Fri, 22 May 2015 00:46:58 +0000 (20:46 -0400)]
Merge branch 'master' of https://rodney.nethack.org:20040/git/NHsource

9 years agocomment out experimentals
nhmall [Fri, 22 May 2015 00:44:32 +0000 (20:44 -0400)]
comment out experimentals

9 years ago#terrain update
PatR [Thu, 21 May 2015 23:53:46 +0000 (16:53 -0700)]
#terrain update

Make the post-3.4.3 '#terrain' command be more versatile by allowing the
player to choose between floor-only, floor+traps, and floor+traps+objects
so that it is possible to view known traps covered by objects or monsters
and remembered objects covered by monsters.  The extra explore mode and
wizard mode choices aren't affected.

9 years agoyou feel {a,an unexpected} draft
PatR [Tue, 19 May 2015 01:25:44 +0000 (18:25 -0700)]
you feel {a,an unexpected} draft

Move the message given when a monster digs through a closed door
or a secret corridor into a separate routine.  In theory, nethack
should determine whether there is a path between the new opening
and the hero's location in order to decide whether a draft can
be felt.  (I don't think anyone is likely to implement that--I'm
certainly not.  Checking whether the hero is in a room with no
breaches in its walls could at least catch being inside a vault.)

While at it, add some USA-centric puns about feeling the prospect
of imminent military conscription instead of air current if it
happens while hallucinating.

9 years agoremove accidentally added util/lev_main.i
PatR [Sat, 16 May 2015 06:08:15 +0000 (23:08 -0700)]
remove accidentally added util/lev_main.i

9 years agoVA_DECL/VA_END usage
PatR [Sat, 16 May 2015 00:45:21 +0000 (17:45 -0700)]
VA_DECL/VA_END usage

Make the variadic functions look more like ordinary code rather than
have the function opening brace be hidden inside the VA_DECL() macro.
That brace is still there, but VA_DECL() now needs to be followed by
a visible brace (which introduces a nested block rather than the
start of the funciton).  VA_END() now provides a hidden closing brace
to end the nested block, and the existing closing brace still matches
the one in VA_DECL().

Sample usage:
void foo VA_DECL(int, arg)  --macro expansion has a hidden opening brace
{  --new, explicit opening brace (actually introduces a nested block)
  VA_START(bar);
  ...code for foo...
  VA_END();  --expansion now provides a closing brace for the nested block
}  --existing closing brace, still pairs with the hidden one in VA_DECL()

This should help if/when another round of reformatting ever takes place,
and also with editors or other tools that do brace/bracket/parenthesis
matching.

I had forgotten that there were variadic functions in sys/* and ended
up modifying a lot more files than intended.  The majority of changes
to those just inserted a new '{' line so that revised VA_END()'s '}'
won't introduce a syntax error.  A couple of them needed VA_END() moved
so that local variables wouldn't go out of scope too soon.  Only the
Unix ones have been tested.

9 years agofix mdig_tunnel impossibility
PatR [Thu, 14 May 2015 00:54:26 +0000 (17:54 -0700)]
fix mdig_tunnel impossibility

Reported by the keymasher:  "stone at (48,8) is undiggable".  Bigroom 4
has a tree at that spot and the whole level is flagged as undiggable.
Undiggable trees were supported on arboreal levels (where their terrain
type is STONE rather than TREE), but not elsewhere.  Monster movement
uses IS_ROCK(), which is true for TREEs, but may_dig() uses IS_STWALL(),
which is false for TREEs so doesn't consider the location as being of
interest and fails to disallow digging.  But mdig_tunnel() bypasses
may_dig() and tests the NONDIGGABLE bit directly, disallowing digging.
(If this sounds confusing, it's a stroll in the park compared to the
code itself.  Apologies for the mixed metaphore.)

Digging away a secret corridor could leave rocks, which doesn't make
a whole lot of sense.  Now a monster's dig attempt will reveal the
location as a corridor instead.

This also moves an assignment out of a macro invocation where it was
inviting trouble if that macro gets modified.  And reorganizes an 'if'
to put cheaper tests sooner.

9 years agoMake the #terrain command work as intended if used while the map is
PatR [Tue, 12 May 2015 23:07:18 +0000 (16:07 -0700)]
Make the #terrain command work as intended if used while the map is
suppressed when the hero is engulfed.  No fixes entry.

9 years agosome pre-Beta updates
nhmall [Sun, 10 May 2015 10:27:07 +0000 (06:27 -0400)]
some pre-Beta updates
 Changes to be committed:
modified:   README
modified:   doc/fixes35.0

9 years ago...don't forget to include the prebuilt headers
Derek S. Ray [Sun, 10 May 2015 00:48:59 +0000 (20:48 -0400)]
...don't forget to include the prebuilt headers

derp.

9 years agocode_style for emacs
PatR [Sun, 10 May 2015 00:05:36 +0000 (17:05 -0700)]
code_style for emacs

9 years agodisplay.h cleanup
PatR [Sat, 9 May 2015 23:54:05 +0000 (16:54 -0700)]
display.h cleanup

I started out just to replace the weird partial expression in the
maybe_display_usteed macro but ended up cleaning up some other stuff
such as line wrapping.

There are still tabs present.