The previous USE_OLDARGS worked with gcc on Intel, but was inherently
unsafe. This method is completely safe, just obnoxiously intrusive.
It you disliked debugpline*(), you're bound to hate this....
Sean Hunt [Thu, 9 Apr 2015 17:26:43 +0000 (13:26 -0400)]
Make WALLIFIED_MAZE into a level flag.
It should now be randomly disabled for a 3rd of Gehennom, to make things
a tad more interesting there. It's also disabled in Baalzebub's lair,
to make things a little more interesting.
Pasi Kallinen [Thu, 9 Apr 2015 14:53:40 +0000 (17:53 +0300)]
Add sortloot -patch
Adds the "sortloot" compound option, with possible values
of "none", "loot", or "full". It controls the sorting of
item pickup lists for inventory and looting.
Remove the requirement for <stdarg.h> that was introduced to lev_comp.
USE_STDARG still works. USE_OLDARGS required hackery but has been
tested and actually works, although I wouldn't trust it on platforms
where 'long' and 'char *' aren't the same size. USE_VARARGS didn't
require any hackery--aside from the conversion to core's pline code--
but has not been tested: <varargs.h> supplied with OSX won't compile,
with an #error directive that basically says "switch to <stdarg.h>".
I changed several printf formats of %i and %li to %d and %ld because
I'm not sure how widespread the 'i' variant was back in days of yore.
[TODO: avoid use of snprintf since pre-ANSI systems won't have it.]
DEBUGFILES set to "wintty.c" reported a bad cursor positioning attempt
at the end of the RIP tombstone, and when set to "questpgr.c wintty.c"
reported a whole bunch right at the start of the game when enumerating
all the quest messages for the chosen role. Both were triggered by
this x==0 call to tty_curs() near the end of process_text_window().
if (i == cw->maxrow) {
if(cw->type == NHW_TEXT){
tty_curs(BASE_WINDOW, 0, (int)ttyDisplay->cury+1);
cl_eos();
}
...
The x value is always decremented in tty_curs, so passing in 0 yields
a bad value of -1. The bad call returns without doing anything, and
when DEBUG is disabled, it does so silently.
No fixes entry; it was caused by a post-3.4.3 fix for something else.
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.
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.)