In order to get level file locking correctly again post 3.4.3
with the newer compilers for windows, I had to funnel close()
calls to an intercepting routine.
I had two choices:
1. Surround every close() in at least 9 source files with messy:
#ifdef WIN32
nhclose(fd);
#else
close(fd);
#endif
OR
2. Replace every close() with nhclose() and
deal with the special code in the nhclose()
version for windows, while just calling
close() for other platforms (in files.c).
It is also possible, although not done in this commit,
to
#define nhclose(fd) close(fd)
in a header file for non-windows, rather than funnel
though a real nhclose() function in files.c.
Pasi Kallinen [Sun, 5 Apr 2015 09:17:57 +0000 (12:17 +0300)]
Add poison cloud glyph, fumaroles to fire plane.
When a gas cloud that deals damage is created, it uses
a poison cloud glyph instead of the cloud glyph.
(A bright green '#', or a bright-green recolor of the
cloud tile)
The plane of fire has random "stinking clouds", or
fumaroles, centered on lava pools.
Also make poison cloud glyph override lava, pool and
moat glyphs.
Changes to be committed:
modified: src/shknam.c
modified: src/trap.c
modified: src/zap.c
While polymorph was clearing the name because poly_obj
actually creates a brand new obj and copies field values
over, water_damage does not so the name persisted on
the blank spellbook. In this case, that isn't really
appropriate. Clear the name.
Ensure that cancellation has no effect on these
ordinary books.
Make the second-hand bookstore an option for holding
the book tribute item too.
update book tribute
Changes to be committed:
modified: doc/fixes35.0
modified: include/extern.h
modified: src/do_name.c
modified: src/objnam.c
This pretty much completes the code portion of the book tribute.
- The book will appear in the rare books shop.
- When you read the book, a random passage is drawn for a
tribute file (suggested by Mike).
- The book cannot be renamed because it already has a
name (observed/suggested by Sean).
The data file (dat/tribute) has a few test passages, but needs to be
filled out. Sean and Mike Stephenson have indicated that
possibly they may be able to help contribute to that. Ideally,
there should be at least one passage from each of the books.
Same functionality as was recently implemented for tty. If a
character like ':' is an explicit menu selector and the player
types it, select that menu entry rather than treating it as a
search request. (Same for other menu commands like '>', but
offhand I can't think of anything besides container looting's
': - look inside' that uses any non-letter selectors other
than '$', which isn't used as a menu meta command.)
keni [Tue, 31 Mar 2015 13:50:02 +0000 (09:50 -0400)]
NHDT substitution version 2.
Re-run nhgitset.pl to install.
"perldoc DEVEL/hooksdir/nhsub" for details. General docs still to come.
Quick notes:
- "git nhsub" lets you apply substitutions to a file without involving any
version control.
- When doing nhadd/nhcommit, the working directory WILL reflect the results
of the substitutions.
Let's see what this breaks.
Pasi Kallinen [Tue, 31 Mar 2015 09:59:27 +0000 (12:59 +0300)]
Use a menu when user wants to query a glyph
When user presses '/', pop up a meny asking what the user wants to
look at:
What do you want to look at:
a - something on the map
b - something you're carrying
c - something else
This replaces the "Specify unknown object by cursor?" -prompt,
while keepng backwards compatibility, and also allows querying
about items in the inventory.
PatR [Tue, 31 Mar 2015 07:18:00 +0000 (00:18 -0700)]
add .gitignore entries: tile.h, NetHack.ad
Add a couple of missing .gitignore entries for files put into
place when building. include/tile.h is genearated for tiles
and dat/NetHack.ad is copied for X11 resource definitions.
PatR [Tue, 31 Mar 2015 06:20:45 +0000 (23:20 -0700)]
bhitpile lint bit
The 'zdir' function parameter has the same name as 'zdir' global
variable, triggering a 'shadowing' warning. I had to read the 'if'
statement multiple times to convince myself it was doing what was
intended. It was, but I think this rewrite is easier to understand
(at least for my feeble reptilian brain).
I don't know who Tim Wright is, but his 15 mintues of fame has
lasted for at least a decade so I cut his comment out. (The 28.5
year old GAN one a dozen lines lower was a tempting target for
removal, but I managed to stop myself; otherwise it never ends.)
PatR [Mon, 30 Mar 2015 23:10:14 +0000 (16:10 -0700)]
lint cleanup for tty 'gray'
gcc complained about assigning string literals to variables that aren't
const. String literals don't have const type but modifying them results
in undefined behavior, so the warning is justified. Except in this case
the strings were never being modified so if wasn't justified after all.
Switch to a static buffer anyway.
Pasi Kallinen [Mon, 30 Mar 2015 19:09:20 +0000 (22:09 +0300)]
Options to create the character blind or nudist
For those pro players who really want to try their hand
at that zen samurai, without needing to reroll thousands
of times to start with blindfold. Nudist starts without
any armor, and keeps tabs whether you wore any during
the game, for even more bragging rights.
Also makes the Book of the Dead readable even while
blind, for obvious reasons.
Pasi Kallinen [Sun, 29 Mar 2015 19:08:46 +0000 (22:08 +0300)]
Add more explicit helpless reasons
Instead of just "while helpless", the death reason will tell
more explicitly why the player was helpless. For example:
"while frozen by a monster's gaze"
nhmall [Sun, 29 Mar 2015 14:50:39 +0000 (10:50 -0400)]
add data.base suggestion for whistle
On 1/24/2014 6:48 AM, a bug reporter wrote:
> The whistle in Nethack has no encyclopedia entry. I suggest for the next
> release something from the M. R. James ghost story 'Oh, Whistle, and I'll Come
> to You My Lad'.
>
nhmall [Sat, 28 Mar 2015 15:20:44 +0000 (11:20 -0400)]
flavor enhance zap downwards/upwards when hiding
Changes to be committed:
modified: doc/fixes35.0
modified: include/extern.h
modified: src/apply.c
modified: src/zap.c
On 3/23/2015 6:41 PM, a bug reporter wrote:
> When you're hiding under an item (e.g. via garter snake polyform), and
> that item gets polyshuddered into nonexistence, you continue hiding
> (under nothing).
This was addressed previously.
> (Incidentally, it's a bit weird that you use > to aim at items that are
> flavorwise above you at the time.)
PatR [Sat, 28 Mar 2015 01:24:53 +0000 (18:24 -0700)]
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.