Commit Graph

807 Commits

Author SHA1 Message Date
Derek S. Ray
4dddb97301 remove and transfer INVISIBLE_OBJECTS to branch 2015-02-27 19:34:32 -05:00
Sean Hunt
a3faa93403 Remove experimental Unicode support.
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
2015-02-27 19:34:29 -05:00
Sean Hunt
7c09285a8c Make EXP_ON_BOTL unconditional. 2015-02-27 19:34:26 -05:00
Sean Hunt
0001534d04 Make REDO unconditional. 2015-02-27 19:33:52 -05:00
Sean Hunt
d218bedbf7 Make LOADSYMSETS unconditional.
There are some bugs here, but this functionality should make it into the release
in some form.
2015-02-27 19:33:51 -05:00
Sean Hunt
74e741bbbc Make AUTOPICKUP_EXCEPTIONS unconditional. 2015-02-27 19:33:50 -05:00
Sean Hunt
b138d380ea Make BARGETHROUGH unconditional. 2015-02-27 19:33:48 -05:00
Sean Hunt
6e9fa71b05 Make SEDUCE unconditional. 2015-02-27 19:33:48 -05:00
Pasi Kallinen
612852f7de Apply paxed's DEBUG patch to remove DEBUG/D_DEBUG.
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.
2015-02-27 19:33:45 -05:00
Sean Hunt
ac108cd365 Make GOLDOBJ unconditional. 2015-02-27 19:33:40 -05:00
Sean Hunt
4f59f5c6fd Make WIZARD unconditional. 2015-02-27 19:33:22 -05:00
Sean Hunt
ad82ca80f3 Make DUNGEON_OVERVIEW unconditional. 2015-02-27 19:33:20 -05:00
Sean Hunt
1edadd1d48 Make REINCARNATION unconditional.
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.
2015-02-27 19:33:16 -05:00
Sean Hunt
260f7ea860 Make TOURIST unconditional. 2015-02-27 19:33:12 -05:00
Sean Hunt
5ee71d2757 Make SINKS unconditional. 2015-02-27 19:33:06 -05:00
Sean Hunt
b066b7c170 Make KOPS unconditional. 2015-02-27 19:33:04 -05:00
Sean Hunt
9e65758947 Make STEED unconditional. 2015-02-27 19:33:01 -05:00
Sean Hunt
264dc66129 Make ELBERETH unconditional. 2015-02-27 19:32:53 -05:00
keni
03140969ee Bulk recovery of file CVS headers and addition of NHDT- headers. 2015-02-26 09:19:03 -05:00
Sean Hunt
a3b1cb8432 Remove the 'nul' variable. 2015-02-18 23:51:31 -05:00
Sean Hunt
862d32c2ec Fix a few compiler (clang) warnings. 2015-02-16 00:23:48 -05:00
Derek
bae3c6088f Exclude all the Win32 build artifacts (Studio and otherwise)
Squashed commit of the following:

commit e37c7626f035a29321c9ac12cca83a0af2132abb
commit 86ebb3e66aedb6b5a31d61d57c39cf84c12d2276
commit 6cd677c8fca4102f223fb1708d00a65c2ded6658
Author: Derek <derekray@gmail.com>
Date:   Fri Feb 13 13:24:29 2015 -0500
2015-02-13 13:26:05 -05:00
nethack.rankin
e8e291b018 fix #H3039 - panic() when trying to drop destroyed items
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).
2013-11-05 00:57:56 +00:00
nethack.rankin
fec8981102 poly'd hero hiding feedback
When hiding as a monster, say so during the #monster command and
also list being hidden in the status section of enlightenment/^X.

     Also, prevent hiding on the floor or ceiling on the planes of air
and water.  (Didn't apply to monsters, who only hide on ROOM spots.)

     Half the change to dohide() is just revised indentation.
2013-03-16 01:44:28 +00:00
nethack.rankin
0add521787 fix #H2645 - invulnerability during prayer is vulernable to stinking cloud
From a bug report, stinking cloud
harms hero even when u.uninvulnerable is set during successful prayer.
This makes the cloud harmless during prayer as he suggested.

     It also makes being inside a stinking cloud become a major trouble
that prayer can fix.  (With magical breathing such a cloud is harmless and
with poison resistance it is just a nuisance; it won't be considered to be
trouble in such cases.)  The fix is to clear away the cloud, or to teleport
the hero if he's inside multiple overlapping clouds or in one that is
marked as permanent (which I think isn't currently possible).
2012-05-07 01:44:38 +00:00
nethack.rankin
669c2ab560 container_impact_dmg
A post-3.4.3 change made the contents of thrown (or dropped while
levitating) containers subject to breakage, but it had sequence issues.
When something was thrown from outside a shop (or from its doorway or
entry spot) and arrived inside, the shopkeeper was taking possession too
soon, charging the hero for any broken contents, and then going ballistic
(summoning kops and attacking) because the hero was outside the shop while
owing money.  We need to break contents before shk claims ownership, which
turned out to be trickier than it sounds since it has to occur after any
item-hits-floor message if such feedback is given.

    Also, clear the container's contents-known flag when contents break.
Conceivably it should stay set when there is only one item, since hearing
something break could only be that item, but this resets container->cknown
unconditionally if anything inside breaks.
2012-05-05 23:26:26 +00:00
nethack.rankin
9f2ca00138 fix [part of] #H2554 - hunger when declining to attack peaceful monst
Reported last December by <email deleted>, attempting to move
into a peaceful monster's position and then declining to attack at the
confirmation prompt uses no time, as expected, but does burn nutrition
the same as if you carried out the attack.  A player could abuse that to
make room to eat an intrinisic-conferring corpse before it rots away.
This fixes that, and also makes attacking a monster via applying a polearm
and via kicking burn the same extra nutrition as ordinary attack.  I didn't
add it for attacking via throwing.

     He/she also reported that kicking at a peaceful monster and declining
to attack at the prompt wakes up nearby monsters even though no actual kick
ultimately takes place.  I can confirm that, but this does not fix it.
2012-05-01 02:22:33 +00:00
nethack.rankin
ebf42e6746 fix #H2642 - escaping from drowning by moving diagonally
From a bug report, you could crawl
out of water to avoid drowning by moving diagonally into an intact doorway
even though regular movement won't allow that.  (Second version of Medusa's
level has a door adjacent to water.)  You could also escape diagonally when
polymorphed into a grid bug.
2012-04-30 21:25:05 +00:00
nethack.rankin
4c3939bb76 more #overview changes
Change how overview data is handled if/when you get expelled from
the quest:  mark quest levels as unreachable rather than discarding their
overview data, so that it can be included in end of game disclosure (and
can be revived if you manage to return to your quest branch by invoking
the W quest artifact).

     Order of endgame levels was odd:  earth followed by astral, water,
fire, and air, because the code didn't know how to insert in front of the
first one visited.  Now it does.  Placement of endgame levels was sub-
optimal:  since that has the highest internal dungeon branch number, it
came out last.  Now it is forced to come out first, so that it appears
above the dungeon.  And use "Plane of Earth" for level name rather than
"Plane 1", and so on for the others, when in the endgame.

     Since I'm bumping EDITLEVEL due to adding mapseen.flags.unreachable,
I am also inserting u.uevent.uvibrated now so that it won't trigger another
EDITLEVEL increment.  At the moment it doesn't do anything except get set
when you receive the "you feel strange vibrations <under you>" message.
The level where that occurs will eventually have an automatic annotation
of some sort.
2012-04-14 08:31:05 +00:00
nethack.rankin
6218a0eee2 overview disclosure (trunk only)
Add 'o' to "i a v g c" disclosure set, to display final dungeon
overview at end of game.  It lists all levels visited rather than just
those that #overview considers to be interesting, but it doesn't reveal
any undiscovered aspects of those levels except for the presence of bones.
(I think revealing shops and altars and such would be worthwhile, but the
data for that isn't handy at the time.)  If the game ends due to death,
the bones section of the current level will have "you, <reason you died>"
(before any real bones entries for that level).  That occurs before bones
file creation so it doesn't give away whether bones are being saved.

     end.c includes some unrelated lint cleanup.

     Guidebook.{mn,tex} updates the section for autopickup_exceptions as
well as for disclose.  It had some odd looking indentation due to various
explicit paragraph breaks.  I took "experimental" out of its description
since it was moved out of the experimental section of config.h long ago.
The revised Guidebook.tex is untested.
2012-04-09 02:56:37 +00:00
nethack.rankin
ec966362a6 #overview enhancements too (trunk only)
I accidentally left his out of yesterday's commit.
2012-02-16 23:06:00 +00:00
nethack.rankin
337e158009 #overview enhancements (trunk only)
1) add graves to the dungeon features being tracked;
2) report on known bones (determined by seeing map spot(s) where previous
   hero(es) died since there's no guarantee of graves or ghosts);
3) add automatic annotations for oracle, sokoban, bigroom, rogue level,
   Ft.Ludios, castle, valley, and Moloch's sanctum.  For bigroom and rogue
   level you just need to visit that level, for the others you need to get
   far enough along to learn something specific (oracle: her room, sokoban:
   annotation is either "solved" or "unsolved" depending upon whether all
   the holes and pits have been filled, fort and castle: see the drawbridge,
   valley and sanctum: see inside the tended temple).  Discovering the
   relevant locations via magic mapping counts as "far enough along".

     There should probably also be automatic annotations for Medusa and the
vibrating square but I'm not sure what criteria should be used for the
former or what phrasing to use for the latter.  Demon lord/prince lairs fall
into similar category as Medusa.

     TODO: add final #overview as an end of game disclosure option.  (I was
planning this even before I saw that nitrohack has implemented it....)
2012-02-16 02:40:24 +00:00
nethack.rankin
6540843cbf oracle bones (trunk only)
Noticed while working on #overview/#annotate revisions, one of which
will key off the oracle's welcome message.  On a bones level, the oracle
could be outside her room, or the room's one time welcome message could be
used up, or both.  During bones creation, discard her if she's on the wrong
level (probably not possible, aside from wizard mode ^G), try to put her
back into her room if she's outside it on the right level, and restore the
room's type (if she's still in it, or has been successfully moved back into
it) so that next hero who loads the bones will get her welcome message the
first time that room is entered.

     Other special rooms could be fixed up too, provided that they're
sufficiently intact (stealthy hero might enter and get the one-time message
then run away and die elsewhere on the level; at present, next hero won't
get the room's entry message) but this doesn't attempt to deal with that.
2012-02-15 01:55:34 +00:00
nethack.rankin
a2f15cfd61 theft vs donning, round 2 (trunk only)
The message "you stop taking off <that armor>" when interrupted by a
nymph's or monkey's theft attack would only be given if you were using 'A'
to take off the armor.  If you used 'T', you'd get "you stop putting on
<that armor>" instead.  The fix for that also makes it easy to vary the
nymph message "<the nymph persuades> you to start taking off" to be "<the
nymph persuades you to continue taking off" when taking that same piece
of armor off was interrupted by the theft.
2012-02-05 04:26:48 +00:00
nethack.rankin
ef888e065a fix #H2589 - theft vs donning/doffing (trunk only)
From a bug report, having some
armor stolen while in the midst of putting on armor--when both items have
a multiple turn completion delay--could result in side-effects for the
latter item being reversed even though they hadn't been applied yet.  So
you'd lose points of Int and Wis when attempting to put on a positively
enchanted helm of brilliance, or gain such with a negatively enchanted one.

     steal() was assigning to afternmv before it had been used to finish the
action of putting on or taking off armor.  Fix by interrupting the attempt
to put on or take off armor when being victimized by theft (or being hit by
succubus or incubus seduction).  The existing stop_occupation() call wasn't
sufficient because afternmv is different from occupation.
2012-02-04 08:13:26 +00:00
nethack.allison
e701a68175 rolling boulder trap's boulder can be generated in lava
> On 01/30/2012 08:20 PM, <Someone> wrote:
> The boulder from a rolling boulder trap can be generated on a
> lava pool. mkroll_launch() in trap.c, line 1584 checks only for pools
> of water.
2012-02-01 00:49:16 +00:00
nethack.rankin
061d8ec947 strdup/dupstr (trunk only)
Add dupstr() as a substitute for strdup() so that out-of-memory
handling will be consistent with the rest of nethack, and make it aware
of nethack's heap logging.  It's treated like alloc() so that its caller
can be logged for NH_HEAPLOG.

     I put it into use in a few places, but there are lots more candidates
besides the existing calls to strdup() that should be replaced.
2012-01-29 03:00:17 +00:00
keni
1d219b4e1b SYSCF bits
(This covers some thing that Pat found and some things I found while working
on those.)
Unscramble duplicate use of GREPPATH and GDBPATH symbols.
Add some more info to config.h.
Make missing SYSCF_FILE a fatal error.
Make a parse error in SYSCF_FILE a fatal error.
Rename PANICTRACE_GLIBC (et al) to PANICTRACE_LIBC (et al) since FreeBSD
 and Mac OS X (at least) also implement the needed API.
Allow SYSCF_FILE to be unreadable by the user (for setgid installs).
If SYSCF, do NOT fall back to the compiled in WIZARD account.
Put WIZARD into sysopt and remove special cases in authorize_wizard_mode().
2012-01-27 20:15:31 +00:00
nethack.rankin
a871ad06e9 outrip() updating (trunk only)
Part II of the bones tracking patch.  Change umpteen different outrip()
routines to handle its new time_t argument, and use formatkiller() instead
of directly accessing killer.{format,name} and killed_by_prefix[].  The
latter is now static within formatkiller().

     The many sys/* and win/* changes are untested....
2012-01-24 04:26:33 +00:00
nethack.rankin
9721470635 bones tracking (trunk only)
[See cvs log for include/rm.h or doc/window.doc for more complete description.]

Attach hero info, death reason, and date+time to a level that's being saved
as bones.  Read such data back when loading a bones file, then treat it as
part of that level for the rest of the game.  Dying on a loaded bones file
will chain the new hero+death+date to previous one(s) if new bones get saved.

outrip() now takes an extra argument of type time_t, and interface-specific
implementations of this routine need to be updated to handle that.
2012-01-23 10:45:31 +00:00
nethack.rankin
b88c51deae bones tracking (trunk only)
Quite a long time ago, the developer/administrator of the 'hearse'
bones respository asked to have bones files augmented so that they could
be correlated with logfile entries.  He was forced to approximate it by
comparing file date+time with logfile date, which won't work well if there
are multiple deaths at roughly the same time, or perhaps even on the same
day.  This adds character name plus role, race, gender, alignment, the
cause of death, and date plus time of death to the bones file when it is
saved, and reads that data in when a bones file is loaded, then retains
it as part of that level for the remainder of the game.  Dying on a level
that was loaded from bones will chain the new dead hero info to whatever
was there from the previous one(s).  It's written as fixed length strings
padded with spaces before writing the map and its messy details, making
it easy to spot with a simple file browsing tool rather than requiring
something which can interpret nethack level files.  This may need to be
tweaked if players start shelling out of nethack to see whether the
checkpoint file for a newly entered level contains bones info, but at the
moment I'm not going to worry about that.

     TODO:  I wanted the bones and topten date to match, so am obtaining
the current date+time in done() and passing it to both of those and also
to outrip().  Hence the latter now has an additional argument.  So far only
genl_outrip() and hup_outrip() in src and the three outrips in win/chain
have been taught about that; interfaces that supply their own outrip()
need to be updated and probably won't compile right now.  Also, code for
formatting the cause of death has been moved from topten() into a separate
routine so that the new bones code can share it.  genl_outrip() now calls
it too; the various other outrip() routines should be changed to call it
instead of continuing to duplicate that core code.  (I probably should
have made topten.c's killed_by_prefix[] be static in order to force that,
but haven't done so.)

     TODO too:  there ought to be some way of viewing the data for a loaded
bones file from within nethack.  I'll probably add something to the dungeon
overview code to treat it as an implicit annotation, as least in wizard mode.
Showing it in normal play once a level is sufficiently discovered would be
useful, but I'm not sure what criteria should control that.  Neither ghost
nor grave is guaranteed to be present, particularly for levels that were
saved as bones, loaded into a subsequent game, then became new bones when
the second hero died there, which can occur an arbitrary number of times.
2012-01-23 10:41:57 +00:00
nethack.allison
bf106e38f2 Identify type of executable in Windows
For Windows, this just uses the RUNTIME_PORT_ID hook that was already in the code
to identify which executable you are running

Mike
2012-01-15 19:11:41 +00:00
keni
7f6ee2f759 WINCHAIN - a framework allowing multiple processors between core and winport
This is the code I built trying to figure out the large window size issue.
It completely compiles out if not needed (see -DWINCHAIN in hints/macos10.7)
and except for one call during setup has zero overhead if compiled in and
not used.  See window.doc for more info.

Defs for UNUSED parms.  I know this has been controversial, so use is isolated
to the chain code and windows.c (where it shouldn't be intrusive and saves about
50 warnings).

Hints file for 10.7, but the build process still needs to be migrated from
the branch.
2012-01-11 18:23:35 +00:00
keni
b97d53fb30 cleanup: outdated SCCS lines
Pat noted that I neglected to drop the SCCS lines on the files I've been
committing, so clean up those and any others I could find where the SCCS
line date is out of date.
2012-01-10 17:47:45 +00:00
keni
c119e8c3d9 add param to ini winsys routines
Provide a mechanism for cleanly moving between tentative window system
selections during startup.  Now, before a second (or later) system is selected,
the first will be notified that it is losing control.  See window.doc.
2012-01-10 01:39:31 +00:00
nethack.allison
c7bdc50a2a New Year - 2012 2012-01-02 14:40:08 +00:00
keni
3afd0f87fd at(1) test#1 / defs for suppressing compiler warnings from pline (etc)
First at(1) in postcommit.pl test.  Patch: defs for suppressing compiler
warnings.
2011-12-29 20:06:27 +00:00
arromdee
2a2e2b299e I haven't been active in the past decade, but here's a small patch. Main
branch only.  This adds a check when setting a new fruit so that if no fruits
have been created since the last time the option has been set, the current
fruit is overwritten.  Result: the user cannot repeatedly set the fruit
option and overflow the maximum fruit number.
2011-12-11 18:11:29 +00:00
nethack.rankin
eaf3819bc2 expanded #terrain command (trunk only; 2nd try...)
Change the post-3.4.3 extended command "#terrain" so that it can be
used in normal play rather than just in wizard mode.  It's inspired by
a command in 'crawl' that lets you view the bare map without monsters,
objects, and traps so that you can see the floor at locations which have
been covered up by those things.

normal play
      redraw map to show the known portion of it without displaying
   monsters, objects, or traps; after player responds to --More--, the
   map returns to normal.

explore mode
      put up a menu so player can choose between the known portion of
   the map as above or the full map.  If the level isn't fully explored
   then the latter provides information to the player that he hasn't
   earned yet, but the _hero_ doesn't learn anything and after --More--
   the map reverts to what it showed before.  (In other words, unlike
   with magic mapping, the unknown portion doesn't become known.)

wizard mode
      put up a menu so player can choose among four alternatives:  the
   two above, the text representation of the map's internal levl[][].typ
   codes, or a legend explaining those codes.  (Originally, I wanted to
   be able to toggle back and forth between these last two, but looking
   at one and dismissing it, then reissuing #terrain to look at the
   other is much simpler to implement and is good enough.)
2011-12-05 09:39:19 +00:00
nethack.rankin
7c68beae81 patch cleanup (trunk only)
My #terrain patch had a typo on the command line and was going
to include doc/fixes35.0 as the log text for a half-dozen files.  I
aborted the commit but most of them had already made it into the cvs
repository.  This reverts those changes so that the entire patch can
be re-comitted with the right log text.  Ugh...
2011-12-05 09:36:21 +00:00