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
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.
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.
This change has two parts.
First, the Book of the Dead now has a special message in lava. This was
originally added by Steve Melenchuk (aka Grunt) as a precaution against the Book
burning up. While I'm pretty sure that the Book can't burn up in the current
codepath, the message is a nice touch and it doesn't help to add a safety check.
Second, always print the inventory destruction messages. The reason for this is
fairly subtle, but relates to the timing. By not printing the messages when
dying, the visible effect to the player is that if they have lifesaving, the
items burn up before they die, but if they do not, they burn up after they
die---the fact that they do burn up is visible in the dump or bonesfile.
This avoids a player being left standing on lava if their boots are burned up and
they survive the damage.
This change is originally due to Steve Melenchuk, fixed up by Derrick Sund.
Simplify retouch_equipment (post-3.4.3.code, called when hero
changes alignment or turns into a silver-hating critter; inventory
traversal must cope with the possibility of losing object->nobj when
processing object) by switching to recently added object->bypass code.
From a bug report, dropping a lit
(burning) potion of oil while levitating can produce an explosion which can
destroy inventory. If in the process of dropping multiple items, the ones
after the oil might be gone, resulting in use of stale pointers and possibly
triggering an "extract_nobj: object lost" panic or even a crash. While
testing my fix, I discovered that being killed by an exploding potion of oil
could produce an "object_is_local" panic if bones are saved (and reproduced
with unmodified 3.4.3).
From a bug report, being teleported onto
a sink while busy putting on levitation boots triggered a crash when
Boots_on() was called (as '(*aftermv)()' on the next turn) because
'uarmf' would be null by then. Not mentioned, but the same problem was
encountered by Boots_off() if the teleport happened while you were busy
taking boots off. It could be fixed by having having dosinkfall() call
cancel_don() if donning(uarmf) yields true, but this patch does a little
more than that: cancel donning/doffing of any multi-turn armor if you
fall onto a sink. It also prevents you from falling if you end up
flying (which will have been blocked while levitating).
The situation when putting on levitation boots has a sequencing
issue: setworn() causes you to be flagged as levitating immediately,
but the float_up() feedback doesn't occur until Boots_on() gets called
a turn later. Teleporting to the sink will tell you that you crash
onto the sink and and that you stop putting on boots, without having
been told that you've floated up into the air. It's suboptimal but it
doesn't seem to actually be incorrect.
After newsgroup discussion of C343-162, I noticed that it had fixed
the verb usage in the message for confused and/or stunned, but not in the
one for resisting. (If a monster name ends in 's', or it has been named
"you", 3.4.3 used the wrong verb because vtense() was fooled about plural
or second person.) No new fixes entry needed....