From 967364b6ed4c31456d418a8771e95b58cb041cfa Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Fri, 13 Feb 2015 11:37:49 -0500 Subject: [PATCH 001/132] +x .sh files in unix dir; ignore Makefiles --- .gitignore | 2 ++ sys/unix/mkmkfile.sh | 0 sys/unix/nethack.sh | 0 sys/unix/setup.sh | 0 4 files changed, 2 insertions(+) mode change 100644 => 100755 sys/unix/mkmkfile.sh mode change 100644 => 100755 sys/unix/nethack.sh mode change 100644 => 100755 sys/unix/setup.sh diff --git a/.gitignore b/.gitignore index 21b5cfc05..6a161df64 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,5 @@ _$* core # CVS default ignores end .*.swp +# We generate makefiles by shell script +Makefile diff --git a/sys/unix/mkmkfile.sh b/sys/unix/mkmkfile.sh old mode 100644 new mode 100755 diff --git a/sys/unix/nethack.sh b/sys/unix/nethack.sh old mode 100644 new mode 100755 diff --git a/sys/unix/setup.sh b/sys/unix/setup.sh old mode 100644 new mode 100755 From bae3c6088f755f5c776710dfa443e7ad8ef7493d Mon Sep 17 00:00:00 2001 From: Derek Date: Fri, 13 Feb 2015 13:26:05 -0500 Subject: [PATCH 002/132] Exclude all the Win32 build artifacts (Studio and otherwise) Squashed commit of the following: commit e37c7626f035a29321c9ac12cca83a0af2132abb commit 86ebb3e66aedb6b5a31d61d57c39cf84c12d2276 commit 6cd677c8fca4102f223fb1708d00a65c2ded6658 Author: Derek Date: Fri Feb 13 13:24:29 2015 -0500 --- .gitignore | 14 ++++++++++++++ dat/.gitignore | 3 +++ include/.gitignore | 8 ++++++-- src/.gitignore | 1 + win/share/.gitignore | 1 + win/win32/.gitignore | 4 ++++ 6 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 win/share/.gitignore create mode 100644 win/win32/.gitignore diff --git a/.gitignore b/.gitignore index 6a161df64..db3e64482 100644 --- a/.gitignore +++ b/.gitignore @@ -27,5 +27,19 @@ _$* core # CVS default ignores end .*.swp + # We generate makefiles by shell script Makefile + +# Win32-specific ignores +binary/ +build/ +Nethack.sln +Nethack.sdf +Nethack.opensdf +Makefile.bcc +Makefile.gcc +*.pdb +*.ilk +# Win32-specific ignores end + diff --git a/dat/.gitignore b/dat/.gitignore index e5bd4aba6..88e516283 100644 --- a/dat/.gitignore +++ b/dat/.gitignore @@ -14,3 +14,6 @@ dungeon nethack.png nhsplash.xpm nhdat +dlb.lst +guioptions +porthelp diff --git a/include/.gitignore b/include/.gitignore index 5bae20a5f..b9bd5d8ab 100644 --- a/include/.gitignore +++ b/include/.gitignore @@ -1,3 +1,7 @@ .cvsignore -date.h onames.h pm.h vis_tab.h -dgn_comp.h lev_comp.h +date.h +onames.h +pm.h +vis_tab.h +dgn_comp.h +lev_comp.h diff --git a/src/.gitignore b/src/.gitignore index 602f782b0..04325af79 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -6,3 +6,4 @@ tile.c Sysunix nethack *.o +tiles.bmp diff --git a/win/share/.gitignore b/win/share/.gitignore new file mode 100644 index 000000000..10969bb60 --- /dev/null +++ b/win/share/.gitignore @@ -0,0 +1 @@ +tiletxt.c diff --git a/win/win32/.gitignore b/win/win32/.gitignore new file mode 100644 index 000000000..c40993f47 --- /dev/null +++ b/win/win32/.gitignore @@ -0,0 +1,4 @@ +# Build-generated stuff that we don't want +*.bmp +*.ico + From a55bef240c098dfab6cdad7d7b609493de6292f1 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Fri, 13 Feb 2015 22:32:33 +0200 Subject: [PATCH 003/132] Typofix. --- src/cmd.c | 2 +- sys/unix/sysconf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmd.c b/src/cmd.c index 064d85a88..74d5a5db7 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -1276,7 +1276,7 @@ int final; /* ENL_GAMEINPROGRESS:0, ENL_GAVEOVERALIVE, ENL_GAMEOVERDEAD */ *tmpbuf = highc(*tmpbuf); /* same adjustment as bottom line */ /* as in background_enlighenment, when poly'd we need to use the saved gender in u.mfemale rather than the current you-as-monster gender */ - Sprintf(buf, "%s the %s's atttributes:", tmpbuf, + Sprintf(buf, "%s the %s's attributes:", tmpbuf, ((Upolyd ? u.mfemale : flags.female) && urole.name.f) ? urole.name.f : urole.name.m); diff --git a/sys/unix/sysconf b/sys/unix/sysconf index 34efdcb8a..99bcab3d8 100644 --- a/sys/unix/sysconf +++ b/sys/unix/sysconf @@ -29,7 +29,7 @@ MAXPLAYERS=10 # Record (high score) file options. # CAUTION: changing these after people have started playing games can # lead to lost high scores! -# Maximum entries for one persion. +# Maximum entries for one person. #PERSMAX=10 # Maximum entries in the record file. #ENTRYMAX=100 From b87b568f729dd60fa6cd5ed98d9f47088203931d Mon Sep 17 00:00:00 2001 From: keni Date: Fri, 13 Feb 2015 17:37:06 -0500 Subject: [PATCH 004/132] Typo --- dat/data.base | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dat/data.base b/dat/data.base index 3b5651174..c832a4780 100644 --- a/dat/data.base +++ b/dat/data.base @@ -3931,7 +3931,7 @@ poseido*n Jack: This does what again, exactly? Egg: Huge buzz! [drinks] Oh good! See things no one else can see, do things no one else can do. - [ Big in Trouble in Little China, directed by + [ Big Trouble in Little China, directed by John Carpenter, written by Gary Goldman & David Z. Weinstein, adaptation by W. D. Richter ] pray* From b7ea921ea0405a57d19bceb6e353f54659c9b7b1 Mon Sep 17 00:00:00 2001 From: keni Date: Fri, 13 Feb 2015 17:54:15 -0500 Subject: [PATCH 005/132] Set up mdgrep for git instead of cvs. --- util/.gitattributes | 2 ++ util/mdgrep.pl | 12 ++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 util/.gitattributes diff --git a/util/.gitattributes b/util/.gitattributes new file mode 100644 index 000000000..15e23d268 --- /dev/null +++ b/util/.gitattributes @@ -0,0 +1,2 @@ +*.pl filter=NHtext merge=NHsubst +*.[ly] filter=NHtext merge=NHsubst diff --git a/util/mdgrep.pl b/util/mdgrep.pl index ba6bbb92a..c75cc3591 100644 --- a/util/mdgrep.pl +++ b/util/mdgrep.pl @@ -1,5 +1,5 @@ #!perl -# NetHack 3.5 mdgrep.pl $Date$ $Revision$ +# NetHack 3.5 mdgrep.pl $NHDT-Date$ $NHDT-Revision$ # Copyright (c) Kenneth Lorber, Kensington, Maryland # NetHack may be freely redistributed. See license for details. @@ -54,13 +54,13 @@ $outfile = "mdgrep.h"; sub start_file { - ($rev) = ('$Revision$') =~ m/: (.*) .$/; - my $date = '$Date$'; - my $revision = '$Revision$'; + ($rev) = ('$NHDT-Revision$') =~ m/: (.*) .$/; + my $date = '$NHDT-Date$'; + my $revision = '$NHDT-Revision$'; open(OUT, ">$outfile") || die "open $outfile: $!"; # NB: Date and Revision below will be modified when mdgrep.h is written to -# cvs - this is correct (but it means you must commit changes to mdgrep.pl -# before generating mdgrep.h and committing that file. +# git - this is correct (but it means you must commit changes to mdgrep.pl +# before generating mdgrep.h and committing that file). print OUT < Date: Fri, 13 Feb 2015 20:32:09 -0500 Subject: [PATCH 006/132] Convert mdgrep from cvs to git. --- util/mdgrep.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/util/mdgrep.pl b/util/mdgrep.pl index c75cc3591..d291b1464 100644 --- a/util/mdgrep.pl +++ b/util/mdgrep.pl @@ -1,5 +1,5 @@ #!perl -# NetHack 3.5 mdgrep.pl $NHDT-Date$ $NHDT-Revision$ +# NetHack 3.5 mdgrep.pl $NHDT-Date: 1423877528 2015/02/14 01:32:08 $ $NHDT-Revision: 1.7 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland # NetHack may be freely redistributed. See license for details. @@ -54,9 +54,9 @@ $outfile = "mdgrep.h"; sub start_file { - ($rev) = ('$NHDT-Revision$') =~ m/: (.*) .$/; - my $date = '$NHDT-Date$'; - my $revision = '$NHDT-Revision$'; + ($rev) = ('$NHDT-Revision: 1.7 $') =~ m/: (.*) .$/; + my $date = '$NHDT-Date: 1423877529 2015/02/14 01:32:09 $'; + my $revision = '$NHDT-Revision: 1.7 $'; open(OUT, ">$outfile") || die "open $outfile: $!"; # NB: Date and Revision below will be modified when mdgrep.h is written to # git - this is correct (but it means you must commit changes to mdgrep.pl From d34bab1509d344fbcb9ec7d7d7c86c2228ce7507 Mon Sep 17 00:00:00 2001 From: "Derek S. Ray" Date: Sun, 15 Feb 2015 14:45:36 -0500 Subject: [PATCH 007/132] more win32-specific pieces --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index db3e64482..302497de0 100644 --- a/.gitignore +++ b/.gitignore @@ -39,6 +39,10 @@ Nethack.sdf Nethack.opensdf Makefile.bcc Makefile.gcc +Makefile-orig +Makefile.bcc-orig +Makefile.gcc-orig +*.suo *.pdb *.ilk # Win32-specific ignores end From 862d32c2ec08b137610d595329e0f74f618f973e Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Mon, 16 Feb 2015 00:23:48 -0500 Subject: [PATCH 008/132] Fix a few compiler (clang) warnings. --- include/decl.h | 2 +- src/botl.c | 2 +- sys/share/unixtty.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/decl.h b/include/decl.h index 2e58cc8b2..e31d76bdb 100644 --- a/include/decl.h +++ b/include/decl.h @@ -341,7 +341,7 @@ E nhwchar toplines[]; #define verbalize1(cstr) verbalize("%s", cstr) #define You_hear1(cstr) You_hear("%s", cstr) #define Sprintf1(buf, cstr) Sprintf(buf, "%s", cstr) -#define panic1(cstr) panic(cstr) +#define panic1(cstr) panic("%s", cstr) #ifndef TCAP_H E struct tc_gbl_data { /* also declared in tcap.h */ diff --git a/src/botl.c b/src/botl.c index d67a8a98b..7ad7224b1 100644 --- a/src/botl.c +++ b/src/botl.c @@ -1353,7 +1353,7 @@ genl_status_init() vals[i] = (char *)alloc(MAXCO); *vals[i] = '\0'; activefields[i] = FALSE; - fieldfmt[i] = FALSE; + fieldfmt[i] = (const char *)0; } /* Use a window for the genl version; backward port compatibility */ WIN_STATUS = create_nhwindow(NHW_STATUS); diff --git a/sys/share/unixtty.c b/sys/share/unixtty.c index c277890ee..f691d5a6f 100644 --- a/sys/share/unixtty.c +++ b/sys/share/unixtty.c @@ -380,6 +380,7 @@ init_sco_cons() #ifdef __linux__ /* via Jesse Thilo and Ben Gertzfield */ # include +# include int linux_flag_console = 0; From 7e93cadc1c962923859d888f6f8be3d13cb0e00e Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Mon, 16 Feb 2015 00:24:05 -0500 Subject: [PATCH 009/132] Replace && with & in blindness timeout check. Caught by clang. --- src/region.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/region.c b/src/region.c index 6c779098b..914b79e62 100644 --- a/src/region.c +++ b/src/region.c @@ -1052,7 +1052,7 @@ region_safety() pline_The("gas cloud has dissipated."); } /* maybe cure blindness too */ - if ((Blinded && TIMEOUT) == 1L) make_blinded(0L, TRUE); + if ((Blinded & TIMEOUT) == 1L) make_blinded(0L, TRUE); } /*region.c*/ From 5dda2afd329a9a2f9404fb028274b6c3f9308ab5 Mon Sep 17 00:00:00 2001 From: keni Date: Mon, 16 Feb 2015 08:53:52 -0500 Subject: [PATCH 010/132] Fix bug: NHtext adds a space to a substitution value. Add support for debugging from the command line. --- DEVEL/hooksdir/NHtext | 43 ++++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/DEVEL/hooksdir/NHtext b/DEVEL/hooksdir/NHtext index 487a6f669..e9ee8c28c 100755 --- a/DEVEL/hooksdir/NHtext +++ b/DEVEL/hooksdir/NHtext @@ -5,7 +5,8 @@ # clean/smudge filter for handling substitutions use strict; -my $debug = 0; +my $debug = 0; # save trace to file +my $debug2 = 0; # annotate output when running from command line my $sink = ($^O eq "MSWin32")? "NUL" :"/dev/null"; my $dbgfile = ($^O eq "MSWin32") ? "$ENV{TEMP}.$$" : "/tmp/trace.$$"; @@ -54,21 +55,28 @@ if($ARGV[0] eq "--clean"){ while(){ print TRACE "IN: $_"; - # $1 - var and value (not including trailing $) + # $1 - var and value (including trailing space but not $) # $2 - var # $4 - value or undef -# s/\$$PREFIX-(([A-Za-z][A-Za-z0-9_]*)(: ([^\N{DOLLAR SIGN}]+))?)\s*\$/&handlevar($2,$4)/eg; - s/\$$PREFIX-(([A-Za-z][A-Za-z0-9_]*)(: ([^\x24]+))?)\s*\$/&handlevar($2,$4)/eg; - print; - print TRACE "OT: $_"; +# s/\$$PREFIX-(([A-Za-z][A-Za-z0-9_]*)(: ([^\N{DOLLAR SIGN}]+))?)\$/&handlevar($2,$4)/eg; + s/\$$PREFIX-(([A-Za-z][A-Za-z0-9_]*)(: ([^\x24]+))?)\$/&handlevar($2,$4)/eg; + if($debug2){ + chomp; + print "XX: |$_|\n"; + } else { + print; + } + print TRACE "OT: X${_}X\n"; } sub handlevar { my($var, $val) = @_; + print "HIT '$var' '$val'\n" if($debug2); my $subname = "PREFIX::$var"; if(defined &$subname){ no strict; + $val =~ s/\s+$//; $val = &$subname($val,$mode,$submode); } else { warn "No handler for \$$PREFIX-$var\n"; @@ -96,9 +104,8 @@ sub Date { $val = "$now " . strftime("%Y/%m/%d %H:%M:%S", gmtime($now)); } } - if($mode eq "s"){ - $val =~ s/\s*$//; # XXX why do I need this? - } +# if($mode eq "s"){ +# } return $val; } @@ -115,14 +122,12 @@ sub Branch { if($mode eq "c"){ if($submode==0){ $val = `git branch --no-color --contains`; - chomp($val); #XXX + $val =~ s/[\n\r]*$//; $val =~ s/^\*\s*//; } } - if($mode eq "s"){ -#XXX do we need this now? - $val =~ s/\s*$//; # XXX why do I need this? - } +# if($mode eq "s"){ +# } return $val; } @@ -132,13 +137,13 @@ sub Revision { if($submode==0){ my $file = $ARGV[1]; my @val = `git log --follow --oneline $file`; - $val = sprintf("1.%d",0+$#val); + my $ver = 0+$#val; + $ver = 0 if($ver < 0); + $val = "1.$ver"; } } - if($mode eq "s"){ -#XXX do we need this here? - $val =~ s/\s*$//; # XXX why do I need this? - } +# if($mode eq "s"){ +# } return $val; } From 2bf54fd893996d52ef797a01097cc61783b44f5c Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Tue, 17 Feb 2015 16:54:38 +0200 Subject: [PATCH 011/132] Fix the X11 hints file. --- sys/unix/hints/linux-x11 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/unix/hints/linux-x11 b/sys/unix/hints/linux-x11 index 5bd20c9a4..48d46f940 100644 --- a/sys/unix/hints/linux-x11 +++ b/sys/unix/hints/linux-x11 @@ -9,10 +9,10 @@ # for Ubuntu dapper. -HACKDIR=$(PREFIX)/games/lib/$(GAME)dir -SHELLDIR = $(PREFIX)/games #PREFIX=/usr PREFIX=$(wildcard ~)/nh/install +HACKDIR=$(PREFIX)/games/lib/$(GAME)dir +SHELLDIR = $(PREFIX)/games CFLAGS=-O -I../include -DNOTPARMDECL $(CFLAGS1) $(CFLAGS3) CFLAGS1=-DCOMPRESS=\"/bin/gzip\" -DCOMPRESS_EXTENSION=\".gz\" @@ -31,6 +31,8 @@ VARDATND = x11tiles NetHack.ad pet_mark.xbm CHOWN=true CHGRP=true VARDIRPERM = 0755 +VARFILEPERM = 0600 +GAMEPERM = 0755 POSTINSTALL= bdftopcf win/X11/nh10.bdf > $(HACKDIR)/nh10.pcf; (cd $(HACKDIR); mkfontdir) From ca6bbf8bc3c8efdf993adb9dd25f9694ee9cd369 Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Wed, 18 Feb 2015 21:48:34 -0500 Subject: [PATCH 012/132] Fix warning with verbalize1 --- src/mail.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mail.c b/src/mail.c index 3b76078fa..7221d3864 100644 --- a/src/mail.c +++ b/src/mail.c @@ -310,7 +310,7 @@ md_rush(md,tx,ty) if (fx == tx && fy == ty) break; if ((mon = m_at(fx,fy)) != 0) /* save monster at this position */ - verbalize(md_exclamations()); + verbalize1(md_exclamations()); else if (fx == u.ux && fy == u.uy) verbalize("Excuse me."); From d34bc6fd735da531c71a62aca09495a2a6122d80 Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Wed, 18 Feb 2015 23:05:37 -0500 Subject: [PATCH 013/132] Destroy water walking boots on lava first. 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. --- src/trap.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/trap.c b/src/trap.c index e0e4b38af..9522fe0fd 100644 --- a/src/trap.c +++ b/src/trap.c @@ -4708,14 +4708,24 @@ lava_effects() !obj_resists(obj, 0, 0)) /* for invocation items */ obj->in_use = TRUE; + /* Check whether we should burn away boots *first* so we know whether to + * make the player sink into the lava. Assumption: water walking only comes + * from boots. */ + if (Wwalking && uarmf && is_organic(uarmf) && !uarmf->oerodeproof) { + obj = uarmf; + pline("Your %s into flame!", aobjnam(obj, "burst")); + setequip(os_armf, NULL, em_silent); + useupall(obj); + } + if (!Fire_resistance) { - if(Wwalking) { + if(Wwalking) { pline_The("lava here burns you!"); if (usurvive) { losehp(dmg, lava_killer, KILLED_BY); /* lava damage */ goto burn_stuff; } - } else + } else You("fall into the lava!"); usurvive = Lifesaved || discover; From ad4f3fc0fe4c03ba0e093ad87e371c84eb12ee11 Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Wed, 18 Feb 2015 23:19:23 -0500 Subject: [PATCH 014/132] Clean up the lava code a little. --- src/trap.c | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/src/trap.c b/src/trap.c index 9522fe0fd..184f04304 100644 --- a/src/trap.c +++ b/src/trap.c @@ -4713,9 +4713,11 @@ lava_effects() * from boots. */ if (Wwalking && uarmf && is_organic(uarmf) && !uarmf->oerodeproof) { obj = uarmf; - pline("Your %s into flame!", aobjnam(obj, "burst")); - setequip(os_armf, NULL, em_silent); - useupall(obj); + pline("%s into flame!", Yobjnam2(obj, "burst")); + iflags.in_lava_effects++; /* (see above) */ + (void) Boots_off(); + useup(obj); + iflags.in_lava_effects--; } if (!Fire_resistance) { @@ -4773,22 +4775,7 @@ lava_effects() } You("find yourself back on solid %s.", surface(u.ux, u.uy)); return(TRUE); - } /* !Fire_resistance */ - - /* just want to burn boots, not all armor; destroy_item doesn't work on - armor anyway */ -burn_stuff: - if (uarmf && !uarmf->oerodeproof && is_organic(uarmf) && - objects[uarmf->otyp].oc_oprop != FIRE_RES) { - /* save uarmf value because Boots_off() sets uarmf to null */ - obj = uarmf; - pline("%s into flame!", Yobjnam2(obj, "burst")); - iflags.in_lava_effects++; /* (see above) */ - (void) Boots_off(); - useup(obj); - iflags.in_lava_effects--; - } - if (!Wwalking) { + } else if (!Wwalking && (!u.utrap || u.utraptype != TT_LAVA)) { boil_away = !Fire_resistance; /* if not fire resistant, sink_into_lava() will quickly be fatal; hero needs to escape immediately */ @@ -4801,6 +4788,8 @@ burn_stuff: losehp(!boil_away ? 1 : (u.uhp / 2), lava_killer, KILLED_BY); /* lava damage */ } + +burn_stuff: destroy_item(SCROLL_CLASS, AD_FIRE); destroy_item(SPBOOK_CLASS, AD_FIRE); destroy_item(POTION_CLASS, AD_FIRE); From 72c2ae233d35076adece2e8d02a7f8839e4a5aa8 Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Wed, 18 Feb 2015 23:24:41 -0500 Subject: [PATCH 015/132] Clean up lava messages a little. 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. --- src/trap.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/trap.c b/src/trap.c index 184f04304..e33b57730 100644 --- a/src/trap.c +++ b/src/trap.c @@ -4730,11 +4730,6 @@ lava_effects() } else You("fall into the lava!"); - usurvive = Lifesaved || discover; -#ifdef WIZARD - if (wizard) usurvive = TRUE; -#endif - /* prevent remove_worn_item() -> Boots_off(WATER_WALKING_BOOTS) -> spoteffects() -> lava_effects() recursion which would successfully delete (via useupall) the no-longer-worn boots; @@ -4745,15 +4740,17 @@ lava_effects() for(obj = invent; obj; obj = obj2) { obj2 = obj->nobj; /* above, we set in_use for objects which are to be destroyed */ - if (obj->in_use) { + if (obj->otyp == SPE_BOOK_OF_THE_DEAD && !Blind) { + pline("%s glows a strange %s, but remains intact.", + The(xname(obj)), hcolor("dark red")); + } else if (obj->in_use) { if (obj->owornmask) { - if (usurvive) - pline("%s into flame!", Yobjnam2(obj, "burst")); + pline("%s into flame!", Yobjnam2(obj, "burst")); remove_worn_item(obj, TRUE); } useupall(obj); } - } + } iflags.in_lava_effects--; From a3b1cb84326fdcbd24419b027ec245ab6cd514b1 Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Wed, 18 Feb 2015 23:51:08 -0500 Subject: [PATCH 016/132] Remove the 'nul' variable. --- include/decl.h | 1 - src/decl.c | 1 - src/dig.c | 2 +- src/eat.c | 2 +- src/hack.c | 2 +- src/mthrowu.c | 2 +- src/read.c | 16 ++++++++-------- src/save.c | 6 +----- 8 files changed, 13 insertions(+), 19 deletions(-) diff --git a/include/decl.h b/include/decl.h index e31d76bdb..e371c977f 100644 --- a/include/decl.h +++ b/include/decl.h @@ -196,7 +196,6 @@ E NEARDATA char horsename[]; E char preferred_pet; E const char *occtxt; /* defined when occupation != NULL */ E const char *nomovemsg; -E const char nul[]; E char lock[]; E const schar xdir[], ydir[], zdir[]; diff --git a/src/decl.c b/src/decl.c index 775a06f4c..93036da34 100644 --- a/src/decl.c +++ b/src/decl.c @@ -52,7 +52,6 @@ NEARDATA struct kinfo killer = DUMMY; NEARDATA long done_money = 0; #endif const char *nomovemsg = 0; -const char nul[40] = DUMMY; /* contains zeros */ NEARDATA char plname[PL_NSIZ] = DUMMY; /* player name */ NEARDATA char pl_character[PL_CSIZ] = DUMMY; NEARDATA char pl_race = '\0'; diff --git a/src/dig.c b/src/dig.c index 94ee98a18..5e0b40aca 100644 --- a/src/dig.c +++ b/src/dig.c @@ -1855,7 +1855,7 @@ long timeout; /* unused */ char *cname = corpse_xname(obj, (const char *)0, CXN_NO_PFX); Your("%s%s %s away%c", - obj == uwep ? "wielded " : nul, cname, + obj == uwep ? "wielded " : "", cname, otense(obj, "rot"), obj == uwep ? '!' : '.'); } if (obj == uwep) { diff --git a/src/eat.c b/src/eat.c index 00173e583..8aa7f5da1 100644 --- a/src/eat.c +++ b/src/eat.c @@ -691,7 +691,7 @@ register int pm; if (!Slimed && !Unchanging && !slimeproof(youmonst.data)) { You("don't feel very well."); make_slimed(10L, (char*) 0); - delayed_killer(SLIMED, KILLED_BY_AN, nul); + delayed_killer(SLIMED, KILLED_BY_AN, ""); } /* Fall through */ default: diff --git a/src/hack.c b/src/hack.c index 728e75774..792671075 100644 --- a/src/hack.c +++ b/src/hack.c @@ -207,7 +207,7 @@ moverock() pline("%s%s and %s a %s in the %s!", Tobjnam(otmp, (ttmp->ttyp == TRAPDOOR) ? "trigger" : "fall"), - (ttmp->ttyp == TRAPDOOR) ? nul : " into", + (ttmp->ttyp == TRAPDOOR) ? "" : " into", otense(otmp, "plug"), (ttmp->ttyp == TRAPDOOR) ? "trap door" : "hole", surface(rx, ry)); diff --git a/src/mthrowu.c b/src/mthrowu.c index 258dd4755..ea955d6a6 100644 --- a/src/mthrowu.c +++ b/src/mthrowu.c @@ -412,7 +412,7 @@ struct obj *obj; /* missile (or stack providing it) */ if (!Stoned && !Stone_resistance && !(poly_when_stoned(youmonst.data) && polymon(PM_STONE_GOLEM))) { - make_stoned(5L, (char *)0, KILLED_BY, nul); + make_stoned(5L, (char *)0, KILLED_BY, ""); } } stop_occupation(); diff --git a/src/read.c b/src/read.c index 686a837b1..755d09969 100644 --- a/src/read.c +++ b/src/read.c @@ -228,7 +228,7 @@ register const char *color; pline("%s%s%s for a moment.", Yobjnam2(otmp, Blind ? "vibrate" : "glow"), Blind ? "" : " ", - Blind ? nul : hcolor(color)); + Blind ? "" : hcolor(color)); } /* Is the object chargeable? For purposes of inventory display; it is */ @@ -806,8 +806,8 @@ struct obj *sobj; /* scroll, or fake spellbook object for scroll-like spell */ pline("%s violently %s%s%s for a while, then %s.", Yname2(otmp), otense(otmp, Blind ? "vibrate" : "glow"), - (!Blind && !same_color) ? " " : nul, - (Blind || same_color) ? nul : + (!Blind && !same_color) ? " " : "", + (Blind || same_color) ? "" : hcolor(scursed ? NH_BLACK : NH_SILVER), otense(otmp, "evaporate")); remove_worn_item(otmp, FALSE); @@ -836,10 +836,10 @@ struct obj *sobj; /* scroll, or fake spellbook object for scroll-like spell */ } pline("%s %s%s%s%s for a %s.", Yname2(otmp), - s == 0 ? "violently " : nul, + s == 0 ? "violently " : "", otense(otmp, Blind ? "vibrate" : "glow"), - (!Blind && !same_color) ? " " : nul, - (Blind || same_color) ? nul : + (!Blind && !same_color) ? " " : "", + (Blind || same_color) ? "" : hcolor(scursed ? NH_BLACK : NH_SILVER), (s * s > 1) ? "while" : "moment"); /* [this cost handling will need updating if shop pricing is @@ -914,11 +914,11 @@ struct obj *sobj; /* scroll, or fake spellbook object for scroll-like spell */ Your("%s begin to %s%s.", makeplural(body_part(HAND)), Blind ? "tingle" : "glow ", - Blind ? nul : hcolor(NH_PURPLE)); + Blind ? "" : hcolor(NH_PURPLE)); make_confused(HConfusion + rnd(100),FALSE); } else { pline("A %s%s surrounds your %s.", - Blind ? nul : hcolor(NH_RED), + Blind ? "" : hcolor(NH_RED), Blind ? "faint buzz" : " glow", body_part(HEAD)); make_confused(0L,TRUE); diff --git a/src/save.c b/src/save.c index 51ab3fc36..ce1073973 100644 --- a/src/save.c +++ b/src/save.c @@ -73,11 +73,7 @@ static struct save_procs { #endif }; -#ifdef GCC_WARN -static long nulls[10]; -#else -#define nulls nul -#endif +static long nulls[sizeof(struct trap) + sizeof(struct fruit)]; #if defined(UNIX) || defined(VMS) || defined(__EMX__) || defined(WIN32) #define HUP if (!program_state.done_hup) From 0d9ae1d293012ae48cbb0a44c4cb987fa99b368d Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Fri, 20 Feb 2015 12:59:06 -0500 Subject: [PATCH 017/132] Add fixes notes for the recent lava changes. --- doc/fixes35.0 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/fixes35.0 b/doc/fixes35.0 index f3e1636c7..5c98db414 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -854,6 +854,8 @@ fix "object lost" panic (or even crash) when dropping multiple items while levitating and a lit potion of oil explodes and destroys some inventory fix "object_is_local" panic when saving bones after hero is killed by explosion produced by dropped or thrown lit potion of oil +if lava burns up the player's water walking boots, the player falls in +the messages for lava burning items up are always printed Platform- and/or Interface-Specific Fixes From ce0665cd159953d873a064a047cf77b0564618b8 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Fri, 20 Feb 2015 20:26:46 +0200 Subject: [PATCH 018/132] Add a missing break Stepping on a magic trap while riding could delete the trap and make the deleted trap hit the steed. --- doc/fixes35.0 | 1 + src/trap.c | 1 + 2 files changed, 2 insertions(+) diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 5c98db414..5aaa60013 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -856,6 +856,7 @@ fix "object_is_local" panic when saving bones after hero is killed by explosion produced by dropped or thrown lit potion of oil if lava burns up the player's water walking boots, the player falls in the messages for lava burning items up are always printed +fix used-up magic trap trying to hit steed. Platform- and/or Interface-Specific Fixes diff --git a/src/trap.c b/src/trap.c index e33b57730..232e4832e 100644 --- a/src/trap.c +++ b/src/trap.c @@ -1213,6 +1213,7 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst); losehp(rnd(10), "magical explosion", KILLED_BY_AN); Your("body absorbs some of the magical energy!"); u.uen = (u.uenmax += 2); + break; } else domagictrap(); #ifdef STEED (void) steedintrap(trap, (struct obj *)0); From 9480f880c46435e9f813dc8fb018ffb3bfe7e767 Mon Sep 17 00:00:00 2001 From: keni Date: Thu, 26 Feb 2015 08:54:12 -0500 Subject: [PATCH 019/132] Add .gitattribute files. --- .gitattributes | 1 + dat/.gitattributes | 3 +++ doc/.gitattributes | 5 +++++ sys/amiga/.gitattributes | 1 + sys/mac/.gitattributes | 1 + sys/msdos/.gitattributes | 4 ++++ sys/os2/.gitattributes | 1 + sys/share/.gitattributes | 1 + sys/unix/.gitattributes | 1 + sys/unix/hints/.gitattributes | 1 + sys/vms/.gitattributes | 1 + sys/wince/.gitattributes | 3 +++ sys/winnt/.gitattributes | 4 ++++ 13 files changed, 27 insertions(+) create mode 100644 dat/.gitattributes create mode 100644 doc/.gitattributes create mode 100644 sys/amiga/.gitattributes create mode 100644 sys/mac/.gitattributes create mode 100644 sys/msdos/.gitattributes create mode 100644 sys/os2/.gitattributes create mode 100644 sys/share/.gitattributes create mode 100644 sys/unix/.gitattributes create mode 100644 sys/unix/hints/.gitattributes create mode 100644 sys/vms/.gitattributes create mode 100644 sys/wince/.gitattributes create mode 100644 sys/winnt/.gitattributes diff --git a/.gitattributes b/.gitattributes index 72533dbce..894a91c8e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,5 @@ *.[ch] filter=NHtext merge=NHsubst +*.sh filter=NHtext merge=NHsubst * text=auto *.hqx -text *.sln -text diff --git a/dat/.gitattributes b/dat/.gitattributes new file mode 100644 index 000000000..72aa05edd --- /dev/null +++ b/dat/.gitattributes @@ -0,0 +1,3 @@ +*.def filter=NHtext merge=NHsubst +*.des filter=NHtext merge=NHsubst +*.txt filter=NHtext merge=NHsubst diff --git a/doc/.gitattributes b/doc/.gitattributes new file mode 100644 index 000000000..9ca881076 --- /dev/null +++ b/doc/.gitattributes @@ -0,0 +1,5 @@ +*.mn filter=NHtext merge=NHsubst +*.6 filter=NHtext merge=NHsubst +fixes.* filter=NHtext merge=NHsubst +window.doc filter=NHtext merge=NHsubst + diff --git a/sys/amiga/.gitattributes b/sys/amiga/.gitattributes new file mode 100644 index 000000000..7a28030a9 --- /dev/null +++ b/sys/amiga/.gitattributes @@ -0,0 +1 @@ +*.p filter=NHtext merge=NHsubst diff --git a/sys/mac/.gitattributes b/sys/mac/.gitattributes new file mode 100644 index 000000000..62b9832d7 --- /dev/null +++ b/sys/mac/.gitattributes @@ -0,0 +1 @@ +NHDeflts filter=NHtext merge=NHsubst diff --git a/sys/msdos/.gitattributes b/sys/msdos/.gitattributes new file mode 100644 index 000000000..baef52e46 --- /dev/null +++ b/sys/msdos/.gitattributes @@ -0,0 +1,4 @@ +*.BC filter=NHtext merge=NHsubst +*.bat filter=NHtext merge=NHsubst +Makefile.* filter=NHtext merge=NHsubst +Install.* filter=NHtext merge=NHsubst diff --git a/sys/os2/.gitattributes b/sys/os2/.gitattributes new file mode 100644 index 000000000..8cffb77ae --- /dev/null +++ b/sys/os2/.gitattributes @@ -0,0 +1 @@ +Makefile.* filter=NHtext merge=NHsubst diff --git a/sys/share/.gitattributes b/sys/share/.gitattributes new file mode 100644 index 000000000..8cffb77ae --- /dev/null +++ b/sys/share/.gitattributes @@ -0,0 +1 @@ +Makefile.* filter=NHtext merge=NHsubst diff --git a/sys/unix/.gitattributes b/sys/unix/.gitattributes new file mode 100644 index 000000000..8cffb77ae --- /dev/null +++ b/sys/unix/.gitattributes @@ -0,0 +1 @@ +Makefile.* filter=NHtext merge=NHsubst diff --git a/sys/unix/hints/.gitattributes b/sys/unix/hints/.gitattributes new file mode 100644 index 000000000..a079959f1 --- /dev/null +++ b/sys/unix/hints/.gitattributes @@ -0,0 +1 @@ +* filter=NHtext merge=NHsubst diff --git a/sys/vms/.gitattributes b/sys/vms/.gitattributes new file mode 100644 index 000000000..8cffb77ae --- /dev/null +++ b/sys/vms/.gitattributes @@ -0,0 +1 @@ +Makefile.* filter=NHtext merge=NHsubst diff --git a/sys/wince/.gitattributes b/sys/wince/.gitattributes new file mode 100644 index 000000000..e034edc5e --- /dev/null +++ b/sys/wince/.gitattributes @@ -0,0 +1,3 @@ +*.ce filter=NHtext merge=NHsubst +*.mak filter=NHtext merge=NHsubst +*.bat filter=NHtext merge=NHsubst diff --git a/sys/winnt/.gitattributes b/sys/winnt/.gitattributes new file mode 100644 index 000000000..2a38b029c --- /dev/null +++ b/sys/winnt/.gitattributes @@ -0,0 +1,4 @@ +Install.nt filter=NHtext merge=NHsubst +Makefile.* filter=NHtext merge=NHsubst +*.rc filter=NHtext merge=NHsubst +*.bat filter=NHtext merge=NHsubst From 03140969ee1b066842c59e08921749ac04d28f68 Mon Sep 17 00:00:00 2001 From: keni Date: Thu, 26 Feb 2015 09:19:03 -0500 Subject: [PATCH 020/132] Bulk recovery of file CVS headers and addition of NHDT- headers. --- dat/Arch.des | 3 ++- dat/Barb.des | 3 ++- dat/Caveman.des | 3 ++- dat/Healer.des | 3 ++- dat/Knight.des | 3 ++- dat/Monk.des | 3 ++- dat/Priest.des | 3 ++- dat/Ranger.des | 3 ++- dat/Rogue.des | 3 ++- dat/Samurai.des | 3 ++- dat/Tourist.des | 3 ++- dat/Valkyrie.des | 3 ++- dat/Wizard.des | 3 ++- dat/bigroom.des | 3 ++- dat/castle.des | 3 ++- dat/data.base | 3 ++- dat/dungeon.def | 3 ++- dat/endgame.des | 3 ++- dat/gehennom.des | 3 ++- dat/knox.des | 3 ++- dat/medusa.des | 3 ++- dat/mines.des | 3 ++- dat/oracle.des | 3 ++- dat/quest.txt | 3 ++- dat/sokoban.des | 3 ++- dat/tower.des | 3 ++- dat/yendor.des | 3 ++- doc/Guidebook.mn | 3 ++- doc/dgn_comp.6 | 3 ++- doc/dlb.6 | 3 ++- doc/fixes30.0 | 3 ++- doc/fixes34.1 | 3 ++- doc/fixes34.2 | 3 ++- doc/fixes34.3 | 3 ++- doc/fixes35.0 | 3 ++- doc/lev_comp.6 | 3 ++- doc/makedefs.6 | 3 ++- doc/nethack.6 | 3 ++- doc/recover.6 | 3 ++- doc/window.doc | 3 ++- include/align.h | 3 ++- include/amiconf.h | 3 ++- include/artifact.h | 3 ++- include/artilist.h | 3 ++- include/attrib.h | 3 ++- include/beconf.h | 3 ++- include/botl.h | 3 ++- include/color.h | 3 ++- include/config.h | 3 ++- include/config1.h | 3 ++- include/context.h | 3 ++- include/coord.h | 3 ++- include/decl.h | 3 ++- include/def_os2.h | 3 ++- include/dgn_file.h | 3 ++- include/display.h | 3 ++- include/dlb.h | 3 ++- include/dungeon.h | 3 ++- include/engrave.h | 3 ++- include/extern.h | 3 ++- include/flag.h | 3 ++- include/func_tab.h | 3 ++- include/global.h | 3 ++- include/hack.h | 3 ++- include/lev.h | 3 ++- include/mac-carbon.h | 3 ++- include/mac-qt.h | 3 ++- include/mac-term.h | 3 ++- include/macconf.h | 3 ++- include/macpopup.h | 3 ++- include/mactty.h | 3 ++- include/macwin.h | 3 ++- include/mail.h | 3 ++- include/mextra.h | 3 ++- include/mfndpos.h | 3 ++- include/micro.h | 3 ++- include/mkroom.h | 3 ++- include/monattk.h | 3 ++- include/mondata.h | 3 ++- include/monflag.h | 3 ++- include/monst.h | 3 ++- include/monsym.h | 3 ++- include/mttypriv.h | 3 ++- include/ntconf.h | 3 ++- include/obj.h | 3 ++- include/objclass.h | 3 ++- include/os2conf.h | 3 ++- include/patchlevel.h | 3 ++- include/pcconf.h | 3 ++- include/permonst.h | 3 ++- include/prop.h | 3 ++- include/qt_clust.h | 3 ++- include/qt_kde0.h | 3 ++- include/qt_win.h | 3 ++- include/qtext.h | 3 ++- include/qttableview.h | 3 ++- include/quest.h | 3 ++- include/rect.h | 3 ++- include/region.h | 3 ++- include/rm.h | 3 ++- include/skills.h | 3 ++- include/sp_lev.h | 3 ++- include/spell.h | 3 ++- include/sys.h | 3 ++- include/system.h | 3 ++- include/tcap.h | 3 ++- include/tile2x11.h | 3 ++- include/timeout.h | 3 ++- include/tosconf.h | 3 ++- include/tradstdc.h | 3 ++- include/trampoli.h | 3 ++- include/trap.h | 3 ++- include/unixconf.h | 3 ++- include/vision.h | 3 ++- include/vmsconf.h | 3 ++- include/wceconf.h | 3 ++- include/winGnome.h | 3 ++- include/winX.h | 3 ++- include/winami.h | 3 ++- include/wingem.h | 3 ++- include/winprocs.h | 3 ++- include/wintty.h | 3 ++- include/wintype.h | 3 ++- include/xwindow.h | 3 ++- include/xwindowp.h | 3 ++- include/you.h | 3 ++- include/youprop.h | 3 ++- src/allmain.c | 3 ++- src/alloc.c | 3 ++- src/apply.c | 3 ++- src/artifact.c | 3 ++- src/attrib.c | 3 ++- src/ball.c | 3 ++- src/bones.c | 3 ++- src/botl.c | 3 ++- src/cmd.c | 3 ++- src/dbridge.c | 3 ++- src/decl.c | 3 ++- src/detect.c | 3 ++- src/dig.c | 3 ++- src/display.c | 3 ++- src/dlb.c | 3 ++- src/do.c | 3 ++- src/do_name.c | 3 ++- src/do_wear.c | 3 ++- src/dog.c | 3 ++- src/dogmove.c | 3 ++- src/dokick.c | 3 ++- src/dothrow.c | 3 ++- src/drawing.c | 3 ++- src/dungeon.c | 3 ++- src/eat.c | 3 ++- src/end.c | 3 ++- src/engrave.c | 3 ++- src/exper.c | 3 ++- src/explode.c | 3 ++- src/extralev.c | 3 ++- src/files.c | 3 ++- src/fountain.c | 3 ++- src/hack.c | 3 ++- src/hacklib.c | 3 ++- src/invent.c | 3 ++- src/light.c | 3 ++- src/lock.c | 3 ++- src/mail.c | 3 ++- src/makemon.c | 3 ++- src/mapglyph.c | 3 ++- src/mcastu.c | 3 ++- src/mhitm.c | 3 ++- src/mhitu.c | 3 ++- src/minion.c | 3 ++- src/mklev.c | 3 ++- src/mkmap.c | 3 ++- src/mkmaze.c | 3 ++- src/mkobj.c | 3 ++- src/mkroom.c | 3 ++- src/mon.c | 3 ++- src/mondata.c | 3 ++- src/monmove.c | 3 ++- src/monst.c | 3 ++- src/mplayer.c | 3 ++- src/mthrowu.c | 3 ++- src/muse.c | 3 ++- src/music.c | 3 ++- src/o_init.c | 3 ++- src/objects.c | 3 ++- src/objnam.c | 3 ++- src/options.c | 3 ++- src/pager.c | 3 ++- src/pickup.c | 3 ++- src/pline.c | 3 ++- src/polyself.c | 3 ++- src/potion.c | 3 ++- src/pray.c | 3 ++- src/priest.c | 3 ++- src/quest.c | 3 ++- src/questpgr.c | 3 ++- src/read.c | 3 ++- src/rect.c | 3 ++- src/region.c | 3 ++- src/restore.c | 3 ++- src/rip.c | 3 ++- src/rnd.c | 3 ++- src/role.c | 3 ++- src/rumors.c | 3 ++- src/save.c | 3 ++- src/shk.c | 3 ++- src/shknam.c | 3 ++- src/sit.c | 3 ++- src/sounds.c | 3 ++- src/sp_lev.c | 3 ++- src/spell.c | 3 ++- src/steal.c | 3 ++- src/steed.c | 3 ++- src/sys.c | 3 ++- src/teleport.c | 3 ++- src/timeout.c | 3 ++- src/topten.c | 3 ++- src/track.c | 3 ++- src/trap.c | 3 ++- src/u_init.c | 3 ++- src/uhitm.c | 3 ++- src/vault.c | 3 ++- src/version.c | 3 ++- src/vision.c | 3 ++- src/weapon.c | 3 ++- src/were.c | 3 ++- src/wield.c | 3 ++- src/windows.c | 3 ++- src/wizard.c | 3 ++- src/worm.c | 3 ++- src/worn.c | 3 ++- src/write.c | 3 ++- src/zap.c | 3 ++- sys/amiga/amidos.c | 3 ++- sys/amiga/amidos.p | 3 ++- sys/amiga/amigst.c | 3 ++- sys/amiga/amimenu.c | 3 ++- sys/amiga/amirip.c | 3 ++- sys/amiga/amisnd.c | 3 ++- sys/amiga/amistack.c | 3 ++- sys/amiga/amitty.c | 3 ++- sys/amiga/amiwind.c | 3 ++- sys/amiga/amiwind.p | 3 ++- sys/amiga/cvtsnd.c | 3 ++- sys/amiga/txt2iff.c | 3 ++- sys/amiga/winami.c | 3 ++- sys/amiga/winami.p | 3 ++- sys/amiga/winchar.c | 3 ++- sys/amiga/windefs.h | 3 ++- sys/amiga/winext.h | 3 ++- sys/amiga/winfuncs.c | 3 ++- sys/amiga/winkey.c | 3 ++- sys/amiga/winmenu.c | 3 ++- sys/amiga/winproto.h | 3 ++- sys/amiga/winreq.c | 3 ++- sys/amiga/winstr.c | 3 ++- sys/amiga/xpm2iff.c | 3 ++- sys/atari/tos.c | 3 ++- sys/be/bemain.c | 3 ++- sys/mac/NHDeflts | 3 ++- sys/mac/dprintf.c | 3 ++- sys/mac/maccurs.c | 3 ++- sys/mac/macerrs.c | 3 ++- sys/mac/macfile.c | 3 ++- sys/mac/macmain.c | 3 ++- sys/mac/macmenu.c | 3 ++- sys/mac/macsnd.c | 3 ++- sys/mac/mactopl.c | 3 ++- sys/mac/mactty.c | 3 ++- sys/mac/macunix.c | 3 ++- sys/mac/macwin.c | 3 ++- sys/mac/mgetline.c | 3 ++- sys/mac/mmodal.c | 3 ++- sys/mac/mrecover.c | 3 ++- sys/mac/mttymain.c | 3 ++- sys/msdos/Install.dos | 3 ++- sys/msdos/Makefile.BC | 3 ++- sys/msdos/Makefile.GCC | 3 ++- sys/msdos/Makefile.MSC | 3 ++- sys/msdos/msdos.c | 3 ++- sys/msdos/ovlinit.c | 3 ++- sys/msdos/pckeys.c | 3 ++- sys/msdos/pctiles.c | 3 ++- sys/msdos/pctiles.h | 3 ++- sys/msdos/pcvideo.h | 3 ++- sys/msdos/portio.h | 3 ++- sys/msdos/schema1.BC | 3 ++- sys/msdos/schema2.BC | 3 ++- sys/msdos/setup.bat | 3 ++- sys/msdos/sound.c | 3 ++- sys/msdos/tile2bin.c | 3 ++- sys/msdos/video.c | 3 ++- sys/msdos/vidtxt.c | 3 ++- sys/msdos/vidvga.c | 3 ++- sys/os2/Makefile.os2 | 3 ++- sys/os2/os2.c | 3 ++- sys/share/Makefile.lib | 3 ++- sys/share/ioctl.c | 3 ++- sys/share/nhlan.c | 3 ++- sys/share/pcmain.c | 3 ++- sys/share/pcsys.c | 3 ++- sys/share/pctty.c | 3 ++- sys/share/pcunix.c | 3 ++- sys/share/tclib.c | 3 ++- sys/share/unixtty.c | 3 ++- sys/unix/Makefile.dat | 3 ++- sys/unix/Makefile.doc | 3 ++- sys/unix/Makefile.src | 3 ++- sys/unix/Makefile.top | 3 ++- sys/unix/Makefile.utl | 3 ++- sys/unix/hints/linux | 3 ++- sys/unix/hints/linux-x11 | 3 ++- sys/unix/hints/macosx | 3 ++- sys/unix/hints/macosx.sh | 3 ++- sys/unix/hints/macosx10.5 | 3 ++- sys/unix/hints/macosx10.7 | 3 ++- sys/unix/hints/unix | 3 ++- sys/unix/mkmkfile.sh | 3 ++- sys/unix/nethack.sh | 3 ++- sys/unix/setup.sh | 3 ++- sys/unix/sysconf | 3 ++- sys/unix/unixmain.c | 3 ++- sys/unix/unixres.c | 3 ++- sys/unix/unixunix.c | 3 ++- sys/vms/Makefile.dat | 3 ++- sys/vms/Makefile.doc | 3 ++- sys/vms/Makefile.src | 3 ++- sys/vms/Makefile.top | 3 ++- sys/vms/Makefile.utl | 3 ++- sys/vms/lev_lex.h | 3 ++- sys/vms/oldcrtl.c | 3 ++- sys/vms/vmsfiles.c | 3 ++- sys/vms/vmsmail.c | 3 ++- sys/vms/vmsmain.c | 3 ++- sys/vms/vmsmisc.c | 3 ++- sys/vms/vmstty.c | 3 ++- sys/vms/vmsunix.c | 3 ++- sys/wince/Install.ce | 3 ++- sys/wince/bootstrp.mak | 3 ++- sys/wince/celib.c | 3 ++- sys/wince/cesetup.bat | 3 ++- sys/wince/cesound.c | 6 ++++-- sys/wince/mhaskyn.c | 3 ++- sys/wince/mhaskyn.h | 3 ++- sys/wince/mhcmd.c | 3 ++- sys/wince/mhcolor.c | 3 ++- sys/wince/mhcolor.h | 3 ++- sys/wince/mhdlg.c | 3 ++- sys/wince/mhdlg.h | 3 ++- sys/wince/mhfont.c | 3 ++- sys/wince/mhfont.h | 3 ++- sys/wince/mhinput.c | 3 ++- sys/wince/mhinput.h | 3 ++- sys/wince/mhmain.c | 3 ++- sys/wince/mhmain.h | 3 ++- sys/wince/mhmap.c | 3 ++- sys/wince/mhmap.h | 3 ++- sys/wince/mhmsg.h | 3 ++- sys/wince/mhmsgwnd.c | 3 ++- sys/wince/mhmsgwnd.h | 3 ++- sys/wince/mhrip.c | 3 ++- sys/wince/mhrip.h | 3 ++- sys/wince/mhstatus.c | 3 ++- sys/wince/mhstatus.h | 3 ++- sys/wince/mhtext.c | 3 ++- sys/wince/mhtext.h | 3 ++- sys/wince/mhtxtbuf.c | 3 ++- sys/wince/mhtxtbuf.h | 3 ++- sys/wince/mswproc.c | 3 ++- sys/wince/winMS.h | 3 ++- sys/wince/winhack.c | 3 ++- sys/winnt/Install.nt | 3 ++- sys/winnt/Makefile.bcc | 3 ++- sys/winnt/Makefile.gcc | 3 ++- sys/winnt/Makefile.msc | 3 ++- sys/winnt/console.rc | 6 ++++-- sys/winnt/nh340key.c | 6 ++++-- sys/winnt/nhdefkey.c | 6 ++++-- sys/winnt/nhraykey.c | 6 ++++-- sys/winnt/nhsetup.bat | 3 ++- sys/winnt/ntsound.c | 6 ++++-- sys/winnt/nttty.c | 6 ++++-- sys/winnt/win32api.h | 6 ++++-- sys/winnt/winnt.c | 6 ++++-- util/dgn_comp.l | 3 ++- util/dgn_comp.y | 3 ++- util/dgn_main.c | 3 ++- util/dlb_main.c | 3 ++- util/lev_comp.l | 3 ++- util/lev_comp.y | 3 ++- util/lev_main.c | 3 ++- util/makedefs.c | 3 ++- util/mdgrep.h | 3 ++- util/mdgrep.pl | 5 +++-- util/panic.c | 3 ++- util/recover.c | 3 ++- win/Qt/qt_clust.cpp | 3 ++- win/Qt/qt_win.cpp | 3 ++- win/Qt/qttableview.cpp | 3 ++- win/Qt/tileedit.cpp | 3 ++- win/Qt/tileedit.h | 3 ++- win/X11/Window.c | 3 ++- win/X11/nh32icon | 3 ++- win/X11/nh56icon | 3 ++- win/X11/nh72icon | 3 ++- win/X11/winX.c | 3 ++- win/X11/winmap.c | 3 ++- win/X11/winmenu.c | 3 ++- win/X11/winmesg.c | 3 ++- win/X11/winmisc.c | 3 ++- win/X11/winstat.c | 3 ++- win/X11/wintext.c | 3 ++- win/X11/winval.c | 3 ++- win/chain/wc_chainin.c | 3 ++- win/chain/wc_chainout.c | 3 ++- win/chain/wc_trace.c | 3 ++- win/gem/gr_rect.c | 3 ++- win/gem/tile2img.c | 3 ++- win/gem/wingem.c | 3 ++- win/gem/wingem1.c | 3 ++- win/gem/xpm2img.c | 3 ++- win/gnome/gn_xpms.h | 3 ++- win/gnome/gnaskstr.c | 3 ++- win/gnome/gnaskstr.h | 3 ++- win/gnome/gnbind.c | 3 ++- win/gnome/gnbind.h | 3 ++- win/gnome/gnglyph.c | 3 ++- win/gnome/gnglyph.h | 3 ++- win/gnome/gnmain.c | 3 ++- win/gnome/gnmain.h | 3 ++- win/gnome/gnmap.c | 3 ++- win/gnome/gnmap.h | 3 ++- win/gnome/gnmenu.c | 3 ++- win/gnome/gnmenu.h | 3 ++- win/gnome/gnmesg.c | 3 ++- win/gnome/gnmesg.h | 3 ++- win/gnome/gnomeprv.h | 3 ++- win/gnome/gnopts.c | 3 ++- win/gnome/gnopts.h | 3 ++- win/gnome/gnplayer.c | 3 ++- win/gnome/gnplayer.h | 3 ++- win/gnome/gnsignal.c | 3 ++- win/gnome/gnsignal.h | 3 ++- win/gnome/gnstatus.c | 3 ++- win/gnome/gnstatus.h | 3 ++- win/gnome/gntext.c | 3 ++- win/gnome/gntext.h | 3 ++- win/gnome/gnyesno.c | 3 ++- win/gnome/gnyesno.h | 3 ++- win/macosx/NetHackGuidebook.applescript | 3 ++- win/macosx/NetHackRecover.applescript | 3 ++- win/macosx/NetHackTerm.applescript | 3 ++- win/macosx/recover.pl | 3 ++- win/share/ppmwrite.c | 3 ++- win/share/thintile.c | 3 ++- win/share/tile.doc | 3 ++- win/share/tile.h | 3 ++- win/share/tile2bmp.c | 3 ++- win/share/tilemap.c | 3 ++- win/share/tiletext.c | 3 ++- win/tty/getline.c | 3 ++- win/tty/termcap.c | 3 ++- win/tty/topl.c | 3 ++- win/tty/wintty.c | 3 ++- win/win32/mhaskyn.c | 3 ++- win/win32/mhaskyn.h | 3 ++- win/win32/mhdlg.c | 3 ++- win/win32/mhdlg.h | 3 ++- win/win32/mhfont.c | 3 ++- win/win32/mhfont.h | 3 ++- win/win32/mhinput.c | 3 ++- win/win32/mhinput.h | 3 ++- win/win32/mhmain.c | 3 ++- win/win32/mhmain.h | 3 ++- win/win32/mhmap.c | 3 ++- win/win32/mhmap.h | 3 ++- win/win32/mhmenu.c | 3 ++- win/win32/mhmenu.h | 3 ++- win/win32/mhmsg.h | 3 ++- win/win32/mhmsgwnd.c | 3 ++- win/win32/mhmsgwnd.h | 3 ++- win/win32/mhrip.c | 3 ++- win/win32/mhrip.h | 3 ++- win/win32/mhsplash.c | 3 ++- win/win32/mhstatus.c | 3 ++- win/win32/mhstatus.h | 3 ++- win/win32/mhtext.c | 3 ++- win/win32/mhtext.h | 3 ++- win/win32/mswproc.c | 3 ++- win/win32/winMS.h | 3 ++- win/win32/winhack.c | 3 ++- 492 files changed, 1003 insertions(+), 502 deletions(-) mode change 100755 => 100644 sys/msdos/setup.bat mode change 100755 => 100644 sys/unix/hints/macosx.sh mode change 100755 => 100644 sys/unix/mkmkfile.sh mode change 100755 => 100644 sys/unix/nethack.sh mode change 100755 => 100644 sys/unix/setup.sh mode change 100755 => 100644 sys/wince/cesetup.bat mode change 100755 => 100644 sys/winnt/nhsetup.bat mode change 100755 => 100644 win/macosx/recover.pl diff --git a/dat/Arch.des b/dat/Arch.des index ef9f551d5..3c1ccfaf0 100644 --- a/dat/Arch.des +++ b/dat/Arch.des @@ -1,4 +1,5 @@ -# NetHack 3.5 Arch.des $Date$ $Revision$ +# NetHack 3.5 Arch.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Arch.des $Date: 2009/05/06 10:44:15 $ $Revision: 1.6 $ # SCCS Id: @(#)Arch.des 3.5 1997/01/31 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1991 by M. Stephenson diff --git a/dat/Barb.des b/dat/Barb.des index 8f65d8986..29a612015 100644 --- a/dat/Barb.des +++ b/dat/Barb.des @@ -1,4 +1,5 @@ -# NetHack 3.5 Barb.des $Date$ $Revision$ +# NetHack 3.5 Barb.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Barb.des $Date: 2009/05/06 10:44:15 $ $Revision: 1.4 $ # SCCS Id: @(#)Barb.des 3.5 1991/12/22 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1991 by M. Stephenson diff --git a/dat/Caveman.des b/dat/Caveman.des index 1dcdbe537..f9617c86f 100644 --- a/dat/Caveman.des +++ b/dat/Caveman.des @@ -1,4 +1,5 @@ -# NetHack 3.5 Caveman.des $Date$ $Revision$ +# NetHack 3.5 Caveman.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Caveman.des $Date: 2009/05/06 10:44:15 $ $Revision: 1.4 $ # SCCS Id: @(#)Caveman.des 3.5 1995/10/07 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1991 by M. Stephenson diff --git a/dat/Healer.des b/dat/Healer.des index b394c39c9..3a93adc4f 100644 --- a/dat/Healer.des +++ b/dat/Healer.des @@ -1,4 +1,5 @@ -# NetHack 3.5 Healer.des $Date$ $Revision$ +# NetHack 3.5 Healer.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Healer.des $Date: 2009/05/06 10:44:16 $ $Revision: 1.5 $ # SCCS Id: @(#)Healer.des 3.5 1995/04/16 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1991, 1993 by M. Stephenson, P. Winner diff --git a/dat/Knight.des b/dat/Knight.des index 9b166652c..2be72af7d 100644 --- a/dat/Knight.des +++ b/dat/Knight.des @@ -1,4 +1,5 @@ -# NetHack 3.5 Knight.des $Date$ $Revision$ +# NetHack 3.5 Knight.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Knight.des $Date: 2009/05/06 10:44:16 $ $Revision: 1.4 $ # SCCS Id: @(#)Knight.des 3.5 1995/04/16 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1991,92 by M. Stephenson diff --git a/dat/Monk.des b/dat/Monk.des index 6c70125bd..fe75301d9 100644 --- a/dat/Monk.des +++ b/dat/Monk.des @@ -1,4 +1,5 @@ -# NetHack 3.5 Monk.des $Date$ $Revision$ +# NetHack 3.5 Monk.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Monk.des $Date: 2009/05/06 10:44:16 $ $Revision: 1.6 $ # SCCS Id: @(#)Monk.des 3.5 2002/04/08 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1991-2 by M. Stephenson diff --git a/dat/Priest.des b/dat/Priest.des index 92f7074fe..ea4aef3c5 100644 --- a/dat/Priest.des +++ b/dat/Priest.des @@ -1,4 +1,5 @@ -# NetHack 3.5 Priest.des $Date$ $Revision$ +# NetHack 3.5 Priest.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Priest.des $Date: 2009/05/06 10:44:17 $ $Revision: 1.5 $ # SCCS Id: @(#)Priest.des 3.5 2002/04/08 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1991-2 by M. Stephenson diff --git a/dat/Ranger.des b/dat/Ranger.des index 10c88cde2..d36559cb6 100644 --- a/dat/Ranger.des +++ b/dat/Ranger.des @@ -1,4 +1,5 @@ -# NetHack 3.5 Ranger.des $Date$ $Revision$ +# NetHack 3.5 Ranger.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Ranger.des $Date: 2009/05/06 10:44:17 $ $Revision: 1.4 $ # SCCS Id: @(#)Ranger.des 3.5 2001/02/01 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1991 by M. Stephenson diff --git a/dat/Rogue.des b/dat/Rogue.des index d6f35cd16..2d2c6a202 100644 --- a/dat/Rogue.des +++ b/dat/Rogue.des @@ -1,4 +1,5 @@ -# NetHack 3.5 Rogue.des $Date$ $Revision$ +# NetHack 3.5 Rogue.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Rogue.des $Date: 2009/05/06 10:44:17 $ $Revision: 1.6 $ # SCCS Id: @(#)Rogue.des 3.5 2002/02/15 # Copyright (c) 1992 by Dean Luick # NetHack may be freely redistributed. See license for details. diff --git a/dat/Samurai.des b/dat/Samurai.des index 73f150566..565a2ed67 100644 --- a/dat/Samurai.des +++ b/dat/Samurai.des @@ -1,4 +1,5 @@ -# NetHack 3.5 Samurai.des $Date$ $Revision$ +# NetHack 3.5 Samurai.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Samurai.des $Date: 2009/05/06 10:44:17 $ $Revision: 1.6 $ # SCCS Id: @(#)Samurai.des 3.5 2002/04/08 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1991-92 by M. Stephenson, P. Winner diff --git a/dat/Tourist.des b/dat/Tourist.des index e446fb47c..e9b1658e9 100644 --- a/dat/Tourist.des +++ b/dat/Tourist.des @@ -1,4 +1,5 @@ -# NetHack 3.5 Tourist.des $Date$ $Revision$ +# NetHack 3.5 Tourist.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Tourist.des $Date: 2009/05/06 10:44:17 $ $Revision: 1.4 $ # SCCS Id: @(#)Tourist.des 3.5 1992/09/26 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1991,92 by M. Stephenson, P. Winner diff --git a/dat/Valkyrie.des b/dat/Valkyrie.des index 4361ea155..04c401bde 100644 --- a/dat/Valkyrie.des +++ b/dat/Valkyrie.des @@ -1,4 +1,5 @@ -# NetHack 3.5 Valkyrie.des $Date$ $Revision$ +# NetHack 3.5 Valkyrie.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Valkyrie.des $Date: 2009/05/06 10:44:17 $ $Revision: 1.6 $ # SCCS Id: @(#)Valkyrie.des 3.5 2007/08/01 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1991-2 by M. Stephenson diff --git a/dat/Wizard.des b/dat/Wizard.des index cdcf9184a..dae831ed4 100644 --- a/dat/Wizard.des +++ b/dat/Wizard.des @@ -1,4 +1,5 @@ -# NetHack 3.5 Wizard.des $Date$ $Revision$ +# NetHack 3.5 Wizard.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Wizard.des $Date: 2009/05/06 10:44:17 $ $Revision: 1.5 $ # SCCS Id: @(#)Wizard.des 3.5 1992/07/11 # Copyright (c) 1992 by David Cohrs # NetHack may be freely redistributed. See license for details. diff --git a/dat/bigroom.des b/dat/bigroom.des index aeaed8bb7..00ea47f32 100644 --- a/dat/bigroom.des +++ b/dat/bigroom.des @@ -1,4 +1,5 @@ -# NetHack 3.5 bigroom.des $Date$ $Revision$ +# NetHack 3.5 bigroom.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 bigroom.des $Date: 2009/05/06 10:44:18 $ $Revision: 1.4 $ # SCCS Id: @(#)bigroom.des 3.5 1990/04/15 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1990 by M. Stephenson diff --git a/dat/castle.des b/dat/castle.des index 95653fa4e..1dd4fda78 100644 --- a/dat/castle.des +++ b/dat/castle.des @@ -1,4 +1,5 @@ -# NetHack 3.5 castle.des $Date$ $Revision$ +# NetHack 3.5 castle.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 castle.des $Date: 2009/05/06 10:44:18 $ $Revision: 1.5 $ # SCCS Id: @(#)castle.des 3.5 2002/05/02 # Copyright (c) 1989 by Jean-Christophe Collet # NetHack may be freely redistributed. See license for details. diff --git a/dat/data.base b/dat/data.base index c832a4780..67fca7aba 100644 --- a/dat/data.base +++ b/dat/data.base @@ -1,4 +1,5 @@ -# NetHack 3.5 data.base $Date$ $Revision$ +# NetHack 3.5 data.base $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 data.base $Date: 2014/10/09 02:04:43 $ $Revision: 1.50 $ # Copyright (c) 1994, 1995, 1996 by the NetHack Development Team # Copyright (c) 1994 by Boudewijn Wayers # NetHack may be freely redistributed. See license for details. diff --git a/dat/dungeon.def b/dat/dungeon.def index 203ece10a..b881884f5 100644 --- a/dat/dungeon.def +++ b/dat/dungeon.def @@ -1,4 +1,5 @@ -# NetHack 3.5 dungeon.def $Date$ $Revision$ +# NetHack 3.5 dungeon.def $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 dungeon.def $Date: 2009/05/06 10:44:21 $ $Revision: 1.6 $ # SCCS Id: @(#)dungeon.def 3.5 2006/03/18 # Copyright (c) 1990-95 by M. Stephenson # NetHack may be freely redistributed. See license for details. diff --git a/dat/endgame.des b/dat/endgame.des index d037a650d..4758ff518 100644 --- a/dat/endgame.des +++ b/dat/endgame.des @@ -1,4 +1,5 @@ -# NetHack 3.5 endgame.des $Date$ $Revision$ +# NetHack 3.5 endgame.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 endgame.des $Date: 2009/05/06 10:44:22 $ $Revision: 1.6 $ # SCCS Id: @(#)endgame.des 3.5 2007/03/02 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1992,1993 by Izchak Miller, David Cohrs, diff --git a/dat/gehennom.des b/dat/gehennom.des index c85fc0931..daba7f532 100644 --- a/dat/gehennom.des +++ b/dat/gehennom.des @@ -1,4 +1,5 @@ -# NetHack 3.5 gehennom.des $Date$ $Revision$ +# NetHack 3.5 gehennom.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 gehennom.des $Date: 2009/05/06 10:44:23 $ $Revision: 1.5 $ # SCCS Id: @(#)gehennom.des 3.5 2005/02/02 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1992 by M. Stephenson and Izchak Miller diff --git a/dat/knox.des b/dat/knox.des index e398fd443..d9d1a2d4d 100644 --- a/dat/knox.des +++ b/dat/knox.des @@ -1,4 +1,5 @@ -# NetHack 3.5 knox.des $Date$ $Revision$ +# NetHack 3.5 knox.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 knox.des $Date: 2009/05/06 10:44:23 $ $Revision: 1.5 $ # SCCS Id: @(#)knox.des 3.5 2006/03/20 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1992 by Izchak Miller diff --git a/dat/medusa.des b/dat/medusa.des index 2e9ec44a2..ae65ff6d5 100644 --- a/dat/medusa.des +++ b/dat/medusa.des @@ -1,4 +1,5 @@ -# NetHack 3.5 medusa.des $Date$ $Revision$ +# NetHack 3.5 medusa.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 medusa.des $Date: 2009/05/06 10:44:23 $ $Revision: 1.5 $ # SCCS Id: @(#)medusa.des 3.5 1996/05/11 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1990, 1991 by M. Stephenson diff --git a/dat/mines.des b/dat/mines.des index a23c80850..8408bbd9d 100644 --- a/dat/mines.des +++ b/dat/mines.des @@ -1,4 +1,5 @@ -# NetHack 3.5 mines.des $Date$ $Revision$ +# NetHack 3.5 mines.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 mines.des $Date: 2009/05/06 10:44:23 $ $Revision: 1.17 $ # SCCS Id: @(#)mines.des 3.5 2002/05/02 # Copyright (c) 1989-95 by Jean-Christophe Collet # Copyright (c) 1991-95 by M. Stephenson diff --git a/dat/oracle.des b/dat/oracle.des index 970117ec2..72da0401f 100644 --- a/dat/oracle.des +++ b/dat/oracle.des @@ -1,4 +1,5 @@ -# NetHack 3.5 oracle.des $Date$ $Revision$ +# NetHack 3.5 oracle.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 oracle.des $Date: 2009/05/06 10:44:23 $ $Revision: 1.4 $ # SCCS Id: @(#)oracle.des 3.5 1995/10/07 # NetHack may be freely redistributed. See license for details. # diff --git a/dat/quest.txt b/dat/quest.txt index c74be18fa..98e8de382 100644 --- a/dat/quest.txt +++ b/dat/quest.txt @@ -1,4 +1,5 @@ -# NetHack 3.5 quest.txt $Date$ $Revision$ +# NetHack 3.5 quest.txt $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 quest.txt $Date: 2009/05/06 10:44:23 $ $Revision: 1.23 $ # SCCS Id: @(#)quest.txt 3.5 2005/12/03 # Copyright (c) 1991 by M. Stephenson # NetHack may be freely redistributed. See license for details. diff --git a/dat/sokoban.des b/dat/sokoban.des index d0e5a1507..21eb63de5 100644 --- a/dat/sokoban.des +++ b/dat/sokoban.des @@ -1,4 +1,5 @@ -# NetHack 3.5 sokoban.des $Date$ $Revision$ +# NetHack 3.5 sokoban.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 sokoban.des $Date: 2009/05/06 10:44:24 $ $Revision: 1.5 $ # SCCS Id: @(#)sokoban.des 3.5 1999/03/15 # Copyright (c) 1998-1999 by Kevin Hugo # NetHack may be freely redistributed. See license for details. diff --git a/dat/tower.des b/dat/tower.des index 6b3894ddb..eb017247d 100644 --- a/dat/tower.des +++ b/dat/tower.des @@ -1,4 +1,5 @@ -# NetHack 3.5 tower.des $Date$ $Revision$ +# NetHack 3.5 tower.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 tower.des $Date: 2009/05/06 10:44:25 $ $Revision: 1.4 $ # SCCS Id: @(#)tower.des 3.5 1990/02/26 # Copyright (c) 1989 by Jean-Christophe Collet # NetHack may be freely redistributed. See license for details. diff --git a/dat/yendor.des b/dat/yendor.des index f29f99513..6bef30231 100644 --- a/dat/yendor.des +++ b/dat/yendor.des @@ -1,4 +1,5 @@ -# NetHack 3.5 yendor.des $Date$ $Revision$ +# NetHack 3.5 yendor.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 yendor.des $Date: 2009/05/06 10:44:25 $ $Revision: 1.5 $ # SCCS Id: @(#)yendor.des 3.5 1996/10/20 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1992 by M. Stephenson and Izchak Miller diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 432c00999..cf8196b3a 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -1,4 +1,5 @@ -.\" $Revision$ $Date$ +.\" $NHDT-Branch$:$NHDT-Revision$ $NHDT-Date$ +.\" $Revision: 1.130 $ $Date: 2012/05/02 00:38:30 $ .ds h0 "NetHack Guidebook .ds h1 .ds h2 % diff --git a/doc/dgn_comp.6 b/doc/dgn_comp.6 index 3db65ac06..7f30da6b4 100644 --- a/doc/dgn_comp.6 +++ b/doc/dgn_comp.6 @@ -1,5 +1,6 @@ .TH DGN_COMP 6 "12 Dec 1995" -.\" NetHack 3.5 dgn_comp.6 $Date$ $Revision$ +.\" NetHack 3.5 dgn_comp.6 $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +.\" NetHack 3.5 dgn_comp.6 $Date: 2009/05/06 10:44:28 $ $Revision: 1.2 $ .UC 4 .SH NAME dgn_comp \- NetHack dungeon compiler diff --git a/doc/dlb.6 b/doc/dlb.6 index e3b762f89..6a41e5458 100644 --- a/doc/dlb.6 +++ b/doc/dlb.6 @@ -1,5 +1,6 @@ .TH DLB 6 "28 Oct 1993" -.\" NetHack 3.5 dlb.6 $Date$ $Revision$ +.\" NetHack 3.5 dlb.6 $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +.\" NetHack 3.5 dlb.6 $Date: 2009/05/06 10:44:28 $ $Revision: 1.3 $ .UC 4 .SH NAME dlb \- NetHack data librarian diff --git a/doc/fixes30.0 b/doc/fixes30.0 index 5a2088ae8..26b289b44 100644 --- a/doc/fixes30.0 +++ b/doc/fixes30.0 @@ -1,4 +1,5 @@ -$RCSfile$ $Revision$ $Date$ +$NHDT-Branch$:$NHDT-Revision$ $NHDT-Date$ +$RCSfile: fixes30.0,v $ $Revision: 1.2 $ $Date: 2003/05/11 15:09:24 $ [This is a partial list supplied by Ken Arromdee long after the fact] diff --git a/doc/fixes34.1 b/doc/fixes34.1 index d69aeae53..f44271c48 100644 --- a/doc/fixes34.1 +++ b/doc/fixes34.1 @@ -1,4 +1,5 @@ -$RCSfile$ $Revision$ $Date$ +$NHDT-Branch$:$NHDT-Revision$ $NHDT-Date$ +$RCSfile: fixes34.1,v $ $Revision: 1.331 $ $Date: 2003/02/20 00:19:46 $ General Fixes and Modified Features ----------------------------------- diff --git a/doc/fixes34.2 b/doc/fixes34.2 index 1b9b3ecbb..59214ac25 100644 --- a/doc/fixes34.2 +++ b/doc/fixes34.2 @@ -1,4 +1,5 @@ -$RCSfile$ $Revision$ $Date$ +$NHDT-Branch$:$NHDT-Revision$ $NHDT-Date$ +$RCSfile: fixes34.2,v $ $Revision: 1.132 $ $Date: 2003/08/26 15:11:58 $ General Fixes and Modified Features ----------------------------------- diff --git a/doc/fixes34.3 b/doc/fixes34.3 index 9f3487e93..591b2eb75 100644 --- a/doc/fixes34.3 +++ b/doc/fixes34.3 @@ -1,4 +1,5 @@ -$RCSfile$ $Revision$ $Date$ +$NHDT-Branch$:$NHDT-Revision$ $NHDT-Date$ +$RCSfile: fixes34.3,v $ $Revision: 1.103 $ $Date: 2003/12/06 14:08:46 $ General Fixes and Modified Features ----------------------------------- diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 5aaa60013..6721eb0bb 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -1,4 +1,5 @@ -$rcsfile: fixes35.0,v $ $Revision$ $Date$ +$NHDT-Branch$:$NHDT-Revision$ $NHDT-Date$ +$rcsfile: fixes35.0,v $ $Revision: 1.445 $ $Date: 2014/11/18 03:10:36 $ General Fixes and Modified Features ----------------------------------- diff --git a/doc/lev_comp.6 b/doc/lev_comp.6 index e5db11c84..2420fa22e 100644 --- a/doc/lev_comp.6 +++ b/doc/lev_comp.6 @@ -1,5 +1,6 @@ .TH LEV_COMP 6 "16 May 1996" -.\" NetHack 3.5 lev_comp.6 $Date$ $Revision$ +.\" NetHack 3.5 lev_comp.6 $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +.\" NetHack 3.5 lev_comp.6 $Date: 2009/05/06 10:44:28 $ $Revision: 1.2 $ .UC 4 .SH NAME lev_comp \- NetHack special levels compiler diff --git a/doc/makedefs.6 b/doc/makedefs.6 index 3c42ca26b..9a81780ec 100644 --- a/doc/makedefs.6 +++ b/doc/makedefs.6 @@ -1,5 +1,6 @@ .TH MAKEDEFS 6 "29 Apr 2010" -.\" NetHack 3.5 makedefs.6 $Date$ $Revision$ +.\" NetHack 3.5 makedefs.6 $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +.\" NetHack 3.5 makedefs.6 $Date: 2010/05/01 20:57:12 $ $Revision: 1.1 $ .UC 4 .SH NAME makedefs \- NetHack miscellaneous build-time functions diff --git a/doc/nethack.6 b/doc/nethack.6 index a3a1f862c..548e885d0 100644 --- a/doc/nethack.6 +++ b/doc/nethack.6 @@ -1,5 +1,6 @@ .TH NETHACK 6 "6 March 2004" -.\" NetHack 3.5 nethack.6 $Date$ $Revision$ +.\" NetHack 3.5 nethack.6 $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +.\" NetHack 3.5 nethack.6 $Date: 2009/05/06 10:44:28 $ $Revision: 1.7 $ .SH NAME nethack \- Exploring The Mazes of Menace .SH SYNOPSIS diff --git a/doc/recover.6 b/doc/recover.6 index d54299c36..b5a2708cc 100644 --- a/doc/recover.6 +++ b/doc/recover.6 @@ -1,5 +1,6 @@ .TH RECOVER 6 "9 January 1993" -.\" NetHack 3.5 recover.6 $Date$ $Revision$ +.\" NetHack 3.5 recover.6 $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +.\" NetHack 3.5 recover.6 $Date: 2009/05/06 10:44:29 $ $Revision: 1.3 $ .UC 4 .SH NAME recover \- recover a NetHack game interrupted by disaster diff --git a/doc/window.doc b/doc/window.doc index 5e4842f08..411d73de9 100644 --- a/doc/window.doc +++ b/doc/window.doc @@ -1,4 +1,5 @@ -NetHack 3.5 window.doc $Date$ $Revision$ +NetHack 3.5 window.doc $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +NetHack 3.5 window.doc $Date: 2012/01/23 10:41:55 $ $Revision: 1.36 $ Introduction diff --git a/include/align.h b/include/align.h index 7495fe718..7af1eb433 100644 --- a/include/align.h +++ b/include/align.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 align.h $Date$ $Revision$ */ +/* NetHack 3.5 align.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 align.h $Date: 2009/05/06 10:44:33 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)align.h 3.5 1991/12/29 */ /* Copyright (c) Mike Stephenson, Izchak Miller 1991. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/amiconf.h b/include/amiconf.h index b6503add9..9c326653c 100644 --- a/include/amiconf.h +++ b/include/amiconf.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 amiconf.h $Date$ $Revision$ */ +/* NetHack 3.5 amiconf.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 amiconf.h $Date: 2012/01/10 17:47:16 $ $Revision: 1.8 $ */ /* Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1990, 1991, 1992, 1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/artifact.h b/include/artifact.h index 0fbdc9a42..1cee87887 100644 --- a/include/artifact.h +++ b/include/artifact.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 artifact.h $Date$ $Revision$ */ +/* NetHack 3.5 artifact.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 artifact.h $Date: 2011/04/07 18:10:44 $ $Revision: 1.6 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/artilist.h b/include/artilist.h index 0996b1fe0..2f21d6839 100644 --- a/include/artilist.h +++ b/include/artilist.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 artilist.h $Date$ $Revision$ */ +/* NetHack 3.5 artilist.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 artilist.h $Date: 2011/04/07 18:10:44 $ $Revision: 1.8 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/attrib.h b/include/attrib.h index 7eae006ff..1c93e9cff 100644 --- a/include/attrib.h +++ b/include/attrib.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 attrib.h $Date$ $Revision$ */ +/* NetHack 3.5 attrib.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 attrib.h $Date: 2009/05/06 10:44:34 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)attrib.h 3.5 1990/22/02 */ /* Copyright 1988, Mike Stephenson */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/beconf.h b/include/beconf.h index e1b930e5b..ee3605564 100644 --- a/include/beconf.h +++ b/include/beconf.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 beconf.h $Date$ $Revision$ */ +/* NetHack 3.5 beconf.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 beconf.h $Date: 2009/05/06 10:44:34 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)beconf.h 3.5 1998/07/08 */ /* Copyright (c) Dean Luick 1996. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/botl.h b/include/botl.h index 4f0a93616..7a9d8aaa6 100644 --- a/include/botl.h +++ b/include/botl.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 botl.h $Date$ $Revision$ */ +/* NetHack 3.5 botl.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 botl.h $Date: 2012/01/10 17:47:16 $ $Revision: 1.6 $ */ /* Copyright (c) Michael Allison, 2003 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/color.h b/include/color.h index 2a983341f..ab6fe0462 100644 --- a/include/color.h +++ b/include/color.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 color.h $Date$ $Revision$ */ +/* NetHack 3.5 color.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 color.h $Date: 2009/05/06 10:44:34 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)color.h 3.5 1992/02/02 */ /* Copyright (c) Steve Linhart, Eric Raymond, 1989. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/config.h b/include/config.h index 13adba0d4..6db03c2c0 100644 --- a/include/config.h +++ b/include/config.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 config.h $Date$ $Revision$ */ +/* NetHack 3.5 config.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 config.h $Date: 2012/01/27 20:15:26 $ $Revision: 1.37 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/config1.h b/include/config1.h index f0a75ae9f..dee60ce95 100644 --- a/include/config1.h +++ b/include/config1.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 config1.h $Date$ $Revision$ */ +/* NetHack 3.5 config1.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 config1.h $Date: 2011/05/23 03:27:07 $ $Revision: 1.13 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/context.h b/include/context.h index 7e2e7007f..ebfe1ada7 100644 --- a/include/context.h +++ b/include/context.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 context.h $Date$ $Revision$ */ +/* NetHack 3.5 context.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 context.h $Date: 2012/01/10 17:47:16 $ $Revision: 1.15 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/coord.h b/include/coord.h index 3b2e2179d..973ec1d89 100644 --- a/include/coord.h +++ b/include/coord.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 coord.h $Date$ $Revision$ */ +/* NetHack 3.5 coord.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 coord.h $Date: 2012/01/10 17:47:16 $ $Revision: 1.5 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/decl.h b/include/decl.h index e371c977f..3e7e94ac3 100644 --- a/include/decl.h +++ b/include/decl.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 decl.h $Date$ $Revision$ */ +/* NetHack 3.5 decl.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 decl.h $Date: 2011/12/29 20:06:27 $ $Revision: 1.44 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/def_os2.h b/include/def_os2.h index c66425337..2a5b6fa6c 100644 --- a/include/def_os2.h +++ b/include/def_os2.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 def_os2.h $Date$ $Revision$ */ +/* NetHack 3.5 def_os2.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 def_os2.h $Date: 2009/05/06 10:44:37 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)def_os2.h 3.5 1993/01/19 */ /* Copyright (c) Timo Hakulinen, 1990, 1991, 1992, 1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/dgn_file.h b/include/dgn_file.h index 9ea79526c..b10972394 100644 --- a/include/dgn_file.h +++ b/include/dgn_file.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 dgn_file.h $Date$ $Revision$ */ +/* NetHack 3.5 dgn_file.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 dgn_file.h $Date: 2009/05/06 10:44:38 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)dgn_file.h 3.5 1993/01/17 */ /* Copyright (c) 1989 by M. Stephenson */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/display.h b/include/display.h index a18a878cc..59135b014 100644 --- a/include/display.h +++ b/include/display.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 display.h $Date$ $Revision$ */ +/* NetHack 3.5 display.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 display.h $Date: 2009/05/06 10:44:38 $ $Revision: 1.14 $ */ /* SCCS Id: @(#)display.h 3.5 2005/06/21 */ /* Copyright (c) Dean Luick, with acknowledgements to Kevin Darcy */ /* and Dave Cohrs, 1990. */ diff --git a/include/dlb.h b/include/dlb.h index 3c16c97c8..5ab7b10e2 100644 --- a/include/dlb.h +++ b/include/dlb.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 dlb.h $Date$ $Revision$ */ +/* NetHack 3.5 dlb.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 dlb.h $Date: 2009/05/06 10:44:38 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)dlb.h 3.5 1997/07/29 */ /* Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/dungeon.h b/include/dungeon.h index 707ac6cf7..2aac7f39e 100644 --- a/include/dungeon.h +++ b/include/dungeon.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 dungeon.h $Date$ $Revision$ */ +/* NetHack 3.5 dungeon.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 dungeon.h $Date: 2012/04/14 08:31:03 $ $Revision: 1.11 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/engrave.h b/include/engrave.h index 336065b7f..429a5881a 100644 --- a/include/engrave.h +++ b/include/engrave.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 engrave.h $Date$ $Revision$ */ +/* NetHack 3.5 engrave.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 engrave.h $Date: 2009/05/06 10:44:39 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)engrave.h 3.5 1991/07/31 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/extern.h b/include/extern.h index 13600247d..ac5fdb1ec 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 extern.h $Date$ $Revision$ */ +/* NetHack 3.5 extern.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 extern.h $Date: 2013/11/05 00:57:53 $ $Revision: 1.380 $ */ /* Copyright (c) Steve Creps, 1988. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/flag.h b/include/flag.h index 07febf306..f6cc67aa2 100644 --- a/include/flag.h +++ b/include/flag.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 flag.h $Date$ $Revision$ */ +/* NetHack 3.5 flag.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 flag.h $Date: 2012/04/09 02:56:32 $ $Revision: 1.59 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/func_tab.h b/include/func_tab.h index 56e463526..607a0ba99 100644 --- a/include/func_tab.h +++ b/include/func_tab.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 func_tab.h $Date$ $Revision$ */ +/* NetHack 3.5 func_tab.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 func_tab.h $Date: 2009/05/06 10:44:44 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)func_tab.h 3.5 1992/04/03 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/global.h b/include/global.h index 3eb12b86c..7e8acda38 100644 --- a/include/global.h +++ b/include/global.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 global.h $Date$ $Revision$ */ +/* NetHack 3.5 global.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 global.h $Date: 2012/01/29 03:00:14 $ $Revision: 1.31 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/hack.h b/include/hack.h index 2ade6d60d..dc24bf8f9 100644 --- a/include/hack.h +++ b/include/hack.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 hack.h $Date$ $Revision$ */ +/* NetHack 3.5 hack.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 hack.h $Date: 2009/05/06 10:44:46 $ $Revision: 1.49 $ */ /* SCCS Id: @(#)hack.h 3.5 2008/03/19 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/lev.h b/include/lev.h index b0d69de34..e3e05ec9a 100644 --- a/include/lev.h +++ b/include/lev.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 lev.h $Date$ $Revision$ */ +/* NetHack 3.5 lev.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 lev.h $Date: 2009/05/06 10:44:48 $ $Revision: 1.7 $ */ /* SCCS Id: @(#)lev.h 3.5 2006/07/08 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/mac-carbon.h b/include/mac-carbon.h index 99750c9dd..576068a25 100644 --- a/include/mac-carbon.h +++ b/include/mac-carbon.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mac-carbon.h $Date$ $Revision$ */ +/* NetHack 3.5 mac-carbon.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mac-carbon.h $Date: 2009/05/06 10:44:49 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)mac-carbon.h 3.5 2003/06/01 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 2003. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/mac-qt.h b/include/mac-qt.h index 457dd86b6..eb7f9554e 100644 --- a/include/mac-qt.h +++ b/include/mac-qt.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mac-qt.h $Date$ $Revision$ */ +/* NetHack 3.5 mac-qt.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mac-qt.h $Date: 2009/05/06 10:44:50 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)mac-qt.h 3.5 2003/06/01 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 2003. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/mac-term.h b/include/mac-term.h index efef9dfec..7bb1257e0 100644 --- a/include/mac-term.h +++ b/include/mac-term.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mac-term.h $Date$ $Revision$ */ +/* NetHack 3.5 mac-term.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mac-term.h $Date: 2009/05/06 10:44:50 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)mac-term.h 3.5 2003/06/01 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 2003. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/macconf.h b/include/macconf.h index 817baca1e..c3ad1290c 100644 --- a/include/macconf.h +++ b/include/macconf.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 macconf.h $Date$ $Revision$ */ +/* NetHack 3.5 macconf.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 macconf.h $Date: 2009/05/06 10:44:51 $ $Revision: 1.8 $ */ /* SCCS Id: @(#)macconf.h 3.5 1999/10/25 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/macpopup.h b/include/macpopup.h index b8a736657..b10f554b0 100644 --- a/include/macpopup.h +++ b/include/macpopup.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 macpopup.h $Date$ $Revision$ */ +/* NetHack 3.5 macpopup.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 macpopup.h $Date: 2009/05/06 10:44:51 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)macpopup.h 3.5 1999/10/25 */ /* Copyright (c) Nethack Develpment Team, 1999. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/mactty.h b/include/mactty.h index 9c7f1336d..fc90e44f2 100644 --- a/include/mactty.h +++ b/include/mactty.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mactty.h $Date$ $Revision$ */ +/* NetHack 3.5 mactty.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mactty.h $Date: 2009/05/06 10:44:51 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)mactty.h 3.5 1993/03/01 */ /* Copyright (c) Jon W{tte 1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/macwin.h b/include/macwin.h index 0c4146c86..9f89eee54 100644 --- a/include/macwin.h +++ b/include/macwin.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 macwin.h $Date$ $Revision$ */ +/* NetHack 3.5 macwin.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 macwin.h $Date: 2009/05/06 10:44:52 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)macwin.h 3.5 1996/01/15 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/mail.h b/include/mail.h index d663c13b9..8a971477d 100644 --- a/include/mail.h +++ b/include/mail.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mail.h $Date$ $Revision$ */ +/* NetHack 3.5 mail.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mail.h $Date: 2009/05/06 10:44:52 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)mail.h 3.5 1991/10/11 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/mextra.h b/include/mextra.h index 3caa6ff61..9f857270c 100644 --- a/include/mextra.h +++ b/include/mextra.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mextra.h $Date$ $Revision$ */ +/* NetHack 3.5 mextra.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mextra.h $Date: 2011/04/15 01:55:40 $ $Revision: 1.12 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/mfndpos.h b/include/mfndpos.h index 5be92231d..ffbb50d74 100644 --- a/include/mfndpos.h +++ b/include/mfndpos.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mfndpos.h $Date$ $Revision$ */ +/* NetHack 3.5 mfndpos.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mfndpos.h $Date: 2009/05/06 10:44:53 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)mfndpos.h 3.5 2002/04/06 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/micro.h b/include/micro.h index 044bd8e31..2af114cb7 100644 --- a/include/micro.h +++ b/include/micro.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 micro.h $Date$ $Revision$ */ +/* NetHack 3.5 micro.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 micro.h $Date: 2009/05/06 10:44:53 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)micro.h 3.5 1990/02/22 */ /* micro.h - function declarations for various microcomputers */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/mkroom.h b/include/mkroom.h index 993f7028f..e9952ddfa 100644 --- a/include/mkroom.h +++ b/include/mkroom.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mkroom.h $Date$ $Revision$ */ +/* NetHack 3.5 mkroom.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mkroom.h $Date: 2012/02/15 01:55:31 $ $Revision: 1.8 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/monattk.h b/include/monattk.h index 609d4e23d..7c228c87d 100644 --- a/include/monattk.h +++ b/include/monattk.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 monattk.h $Date$ $Revision$ */ +/* NetHack 3.5 monattk.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 monattk.h $Date: 2009/05/06 10:44:54 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)monattk.h 3.5 2002/03/24 */ /* NetHack may be freely redistributed. See license for details. */ /* Copyright 1988, M. Stephenson */ diff --git a/include/mondata.h b/include/mondata.h index 423ac655e..3996e439e 100644 --- a/include/mondata.h +++ b/include/mondata.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mondata.h $Date$ $Revision$ */ +/* NetHack 3.5 mondata.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mondata.h $Date: 2009/05/06 10:44:54 $ $Revision: 1.18 $ */ /* SCCS Id: @(#)mondata.h 3.5 2007/04/27 */ /* Copyright (c) 1989 Mike Threepoint */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/monflag.h b/include/monflag.h index c080e2f5c..103060a41 100644 --- a/include/monflag.h +++ b/include/monflag.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 monflag.h $Date$ $Revision$ */ +/* NetHack 3.5 monflag.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 monflag.h $Date: 2009/05/06 10:44:54 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)monflag.h 3.5 1996/05/04 */ /* Copyright (c) 1989 Mike Threepoint */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/monst.h b/include/monst.h index 708643dba..c451d374f 100644 --- a/include/monst.h +++ b/include/monst.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 monst.h $Date$ $Revision$ */ +/* NetHack 3.5 monst.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 monst.h $Date: 2009/05/06 10:44:55 $ $Revision: 1.14 $ */ /* SCCS Id: @(#)monst.h 3.5 2006/09/06 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/monsym.h b/include/monsym.h index 792568701..8081d5959 100644 --- a/include/monsym.h +++ b/include/monsym.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 monsym.h $Date$ $Revision$ */ +/* NetHack 3.5 monsym.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 monsym.h $Date: 2009/05/06 10:44:55 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)monsym.h 3.5 2007/04/07 */ /* Monster symbols and creation information rev 1.0 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/mttypriv.h b/include/mttypriv.h index 32ed11be7..6e50eccf3 100644 --- a/include/mttypriv.h +++ b/include/mttypriv.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mttypriv.h $Date$ $Revision$ */ +/* NetHack 3.5 mttypriv.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mttypriv.h $Date: 2009/05/06 10:44:55 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)mttypriv.h 3.5 1993/03/01 */ /* Copyright (c) Jon W{tte 1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/ntconf.h b/include/ntconf.h index c4813d2d1..539833aed 100644 --- a/include/ntconf.h +++ b/include/ntconf.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 ntconf.h $Date$ $Revision$ */ +/* NetHack 3.5 ntconf.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 ntconf.h $Date: 2012/01/15 19:11:38 $ $Revision: 1.35 $ */ /* SCCS Id: @(#)ntconf.h 3.5 2002/03/10 */ /* Copyright (c) NetHack PC Development Team 1993, 1994. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/obj.h b/include/obj.h index 94e2a82d5..8d302c0ae 100644 --- a/include/obj.h +++ b/include/obj.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 obj.h $Date$ $Revision$ */ +/* NetHack 3.5 obj.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 obj.h $Date: 2012/01/10 17:47:16 $ $Revision: 1.31 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/objclass.h b/include/objclass.h index b6aada93b..46009e4d0 100644 --- a/include/objclass.h +++ b/include/objclass.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 objclass.h $Date$ $Revision$ */ +/* NetHack 3.5 objclass.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 objclass.h $Date: 2009/05/06 10:44:58 $ $Revision: 1.9 $ */ /* SCCS Id: @(#)objclass.h 3.5 1996/06/16 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/os2conf.h b/include/os2conf.h index 0bb959262..eeb4e53aa 100644 --- a/include/os2conf.h +++ b/include/os2conf.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 os2conf.h $Date$ $Revision$ */ +/* NetHack 3.5 os2conf.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 os2conf.h $Date: 2009/05/06 10:44:58 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)os2conf.h 3.5 2007/01/08 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Timo Hakulinen, 1990, 1991, 1992, 1993, 1996. */ diff --git a/include/patchlevel.h b/include/patchlevel.h index bb398bd4f..2399ca5b0 100644 --- a/include/patchlevel.h +++ b/include/patchlevel.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 patchlevel.h $Date$ $Revision$ */ +/* NetHack 3.5 patchlevel.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 patchlevel.h $Date: 2012/04/14 08:31:03 $ $Revision: 1.93 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/pcconf.h b/include/pcconf.h index cb8846bda..70a519c00 100644 --- a/include/pcconf.h +++ b/include/pcconf.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 pcconf.h $Date$ $Revision$ */ +/* NetHack 3.5 pcconf.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 pcconf.h $Date: 2009/05/06 10:45:00 $ $Revision: 1.11 $ */ /* SCCS Id: @(#)pcconf.h 3.5 1995/10/11 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/permonst.h b/include/permonst.h index 12e9f254c..7f48955fb 100644 --- a/include/permonst.h +++ b/include/permonst.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 permonst.h $Date$ $Revision$ */ +/* NetHack 3.5 permonst.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 permonst.h $Date: 2009/05/06 10:45:00 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)permonst.h 3.5 2006/01/04 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/prop.h b/include/prop.h index d0a8a8772..810a730bc 100644 --- a/include/prop.h +++ b/include/prop.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 prop.h $Date$ $Revision$ */ +/* NetHack 3.5 prop.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 prop.h $Date: 2011/10/01 00:25:52 $ $Revision: 1.7 $ */ /* Copyright (c) 1989 Mike Threepoint */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/qt_clust.h b/include/qt_clust.h index f186c78cc..466e6da8b 100644 --- a/include/qt_clust.h +++ b/include/qt_clust.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 qt_clust.h $Date$ $Revision$ */ +/* NetHack 3.5 qt_clust.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 qt_clust.h $Date: 2009/05/06 10:45:01 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)qt_clust.h 3.5 1999/11/19 */ /* Copyright (c) Warwick Allison, 1999. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/qt_kde0.h b/include/qt_kde0.h index 335c8a8be..6bd8b4452 100644 --- a/include/qt_kde0.h +++ b/include/qt_kde0.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 qt_kde0.h $Date$ $Revision$ */ +/* NetHack 3.5 qt_kde0.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 qt_kde0.h $Date: 2009/05/06 10:45:01 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)qt_kde0.h 3.5 1999/11/19 */ /* Copyright (c) Warwick Allison, 1999. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/qt_win.h b/include/qt_win.h index f430ff25b..98de67688 100644 --- a/include/qt_win.h +++ b/include/qt_win.h @@ -1,4 +1,5 @@ -// NetHack 3.5 qt_win.h $Date$ $Revision$ +// NetHack 3.5 qt_win.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +// NetHack 3.5 qt_win.h $Date: 2012/01/24 04:26:17 $ $Revision: 1.11 $ // Copyright (c) Warwick Allison, 1999. // NetHack may be freely redistributed. See license for details. // diff --git a/include/qtext.h b/include/qtext.h index 8e2486fe0..18eaeaa53 100644 --- a/include/qtext.h +++ b/include/qtext.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 qtext.h $Date$ $Revision$ */ +/* NetHack 3.5 qtext.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 qtext.h $Date: 2009/05/06 10:45:02 $ $Revision: 1.7 $ */ /* SCCS Id: @(#)qtext.h 3.5 1997/02/02 */ /* Copyright (c) Mike Stephenson 1991. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/qttableview.h b/include/qttableview.h index 7aca4271c..07ecea7f6 100644 --- a/include/qttableview.h +++ b/include/qttableview.h @@ -1,5 +1,6 @@ /********************************************************************** -** $Id$ +** $NHDT-Branch$:$NHDT-Revision$ $NHDT-Date$ +** $Id: qttableview.h,v 1.2 2002/03/09 03:13:13 jwalz Exp $ ** ** Definition of QtTableView class ** diff --git a/include/quest.h b/include/quest.h index 10cc49ed7..4c2cd4087 100644 --- a/include/quest.h +++ b/include/quest.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 quest.h $Date$ $Revision$ */ +/* NetHack 3.5 quest.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 quest.h $Date: 2009/05/06 10:45:03 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)quest.h 3.5 1992/11/15 */ /* Copyright (c) Mike Stephenson 1991. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/rect.h b/include/rect.h index 4e29fd345..7fa6c2c8f 100644 --- a/include/rect.h +++ b/include/rect.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 rect.h $Date$ $Revision$ */ +/* NetHack 3.5 rect.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 rect.h $Date: 2009/05/06 10:45:03 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)rect.h 3.5 1990/02/22 */ /* Copyright (c) 1990 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/region.h b/include/region.h index a3eab5b2e..9af1176ec 100644 --- a/include/region.h +++ b/include/region.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 region.h $Date$ $Revision$ */ +/* NetHack 3.5 region.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 region.h $Date: 2009/05/06 10:45:04 $ $Revision: 1.9 $ */ /* SCCS Id: @(#)region.h 3.5 2006/06/27 */ /* Copyright (c) 1996 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/rm.h b/include/rm.h index 01a4f418f..589ba619e 100644 --- a/include/rm.h +++ b/include/rm.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 rm.h $Date$ $Revision$ */ +/* NetHack 3.5 rm.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 rm.h $Date: 2012/02/16 23:06:00 $ $Revision: 1.23 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/skills.h b/include/skills.h index c82e06290..d2221e7fb 100644 --- a/include/skills.h +++ b/include/skills.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 skills.h $Date$ $Revision$ */ +/* NetHack 3.5 skills.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 skills.h $Date: 2009/05/06 10:45:05 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)skills.h 3.5 2006/12/14 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985-1999. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/sp_lev.h b/include/sp_lev.h index f58ac6d87..0a1d22173 100644 --- a/include/sp_lev.h +++ b/include/sp_lev.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 sp_lev.h $Date$ $Revision$ */ +/* NetHack 3.5 sp_lev.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 sp_lev.h $Date: 2009/05/06 10:45:06 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)sp_lev.h 3.5 2007/08/01 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/spell.h b/include/spell.h index 59a43bd22..6fd12aa8e 100644 --- a/include/spell.h +++ b/include/spell.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 spell.h $Date$ $Revision$ */ +/* NetHack 3.5 spell.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 spell.h $Date: 2009/05/06 10:45:09 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)spell.h 3.5 2006/02/11 */ /* Copyright 1986, M. Stephenson */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/sys.h b/include/sys.h index 24d27daa7..227e68781 100644 --- a/include/sys.h +++ b/include/sys.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 sys.h $Date$ $Revision$ */ +/* NetHack 3.5 sys.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 sys.h $Date: 2012/01/27 20:15:26 $ $Revision: 1.9 $ */ /* Copyright (c) Kenneth Lorber, Kensington, Maryland, 2008. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/system.h b/include/system.h index 5e23feda5..9b7592a67 100644 --- a/include/system.h +++ b/include/system.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 system.h $Date$ $Revision$ */ +/* NetHack 3.5 system.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 system.h $Date: 2009/05/06 10:45:10 $ $Revision: 1.7 $ */ /* SCCS Id: @(#)system.h 3.5 2003/11/30 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/tcap.h b/include/tcap.h index c66e5ab38..35c2da314 100644 --- a/include/tcap.h +++ b/include/tcap.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 tcap.h $Date$ $Revision$ */ +/* NetHack 3.5 tcap.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 tcap.h $Date: 2009/05/06 10:45:11 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)tcap.h 3.5 1992/10/21 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1989. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/tile2x11.h b/include/tile2x11.h index 7e8ed23f6..4aa64f48e 100644 --- a/include/tile2x11.h +++ b/include/tile2x11.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 tile2x11.h $Date$ $Revision$ */ +/* NetHack 3.5 tile2x11.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 tile2x11.h $Date: 2009/05/06 10:45:11 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)tile2x11.h 3.5 1995/01/25 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/timeout.h b/include/timeout.h index 1d4171ea7..26d47c17d 100644 --- a/include/timeout.h +++ b/include/timeout.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 timeout.h $Date$ $Revision$ */ +/* NetHack 3.5 timeout.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 timeout.h $Date: 2009/05/06 10:45:12 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)timeout.h 3.5 1999/02/13 */ /* Copyright 1994, Dean Luick */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/tosconf.h b/include/tosconf.h index 3213e28c4..6571945a7 100644 --- a/include/tosconf.h +++ b/include/tosconf.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 tosconf.h $Date$ $Revision$ */ +/* NetHack 3.5 tosconf.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 tosconf.h $Date: 2009/05/06 10:45:12 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)tosconf.h 3.5 1990/02/22 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/tradstdc.h b/include/tradstdc.h index 1cd0adb82..480ea7878 100644 --- a/include/tradstdc.h +++ b/include/tradstdc.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 tradstdc.h $Date$ $Revision$ */ +/* NetHack 3.5 tradstdc.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 tradstdc.h $Date: 2012/01/11 18:23:26 $ $Revision: 1.15 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/trampoli.h b/include/trampoli.h index 8cc04dfea..fa040a330 100644 --- a/include/trampoli.h +++ b/include/trampoli.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 trampoli.h $Date$ $Revision$ */ +/* NetHack 3.5 trampoli.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 trampoli.h $Date: 2009/05/06 10:45:13 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)trampoli.h 3.5 1995/06/01 */ /* Copyright (c) 1989, by Norm Meluch and Stephen Spackman */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/trap.h b/include/trap.h index 2f13bb351..310e118b8 100644 --- a/include/trap.h +++ b/include/trap.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 trap.h $Date$ $Revision$ */ +/* NetHack 3.5 trap.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 trap.h $Date: 2009/05/06 10:45:14 $ $Revision: 1.7 $ */ /* SCCS Id: @(#)trap.h 3.5 2000/08/30 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/unixconf.h b/include/unixconf.h index 6d0642ef7..0ffa2e119 100644 --- a/include/unixconf.h +++ b/include/unixconf.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 unixconf.h $Date$ $Revision$ */ +/* NetHack 3.5 unixconf.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 unixconf.h $Date: 2011/04/19 02:02:06 $ $Revision: 1.15 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/vision.h b/include/vision.h index 2e8fc9032..7b731e34a 100644 --- a/include/vision.h +++ b/include/vision.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 vision.h $Date$ $Revision$ */ +/* NetHack 3.5 vision.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 vision.h $Date: 2009/05/06 10:45:15 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)vision.h 3.5 2007/05/11 */ /* Copyright (c) Dean Luick, with acknowledgements to Dave Cohrs, 1990. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/vmsconf.h b/include/vmsconf.h index 713cebdba..5aaf9e1fc 100644 --- a/include/vmsconf.h +++ b/include/vmsconf.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 vmsconf.h $Date$ $Revision$ */ +/* NetHack 3.5 vmsconf.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 vmsconf.h $Date: 2011/09/01 01:46:55 $ $Revision: 1.14 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/wceconf.h b/include/wceconf.h index 1df61faf8..c5fef1547 100644 --- a/include/wceconf.h +++ b/include/wceconf.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 wceconf.h $Date$ $Revision$ */ +/* NetHack 3.5 wceconf.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 wceconf.h $Date: 2009/10/22 02:59:14 $ $Revision: 1.12 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/winGnome.h b/include/winGnome.h index 7fb166fd3..38d32040e 100644 --- a/include/winGnome.h +++ b/include/winGnome.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 winGnome.h $Date$ $Revision$ */ +/* NetHack 3.5 winGnome.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winGnome.h $Date: 2009/05/06 10:45:16 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)winGnome.h 3.4. 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* Copyright (C) 1998 by Anthony Taylor */ diff --git a/include/winX.h b/include/winX.h index 9ceea5fee..b80c6e245 100644 --- a/include/winX.h +++ b/include/winX.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 winX.h $Date$ $Revision$ */ +/* NetHack 3.5 winX.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winX.h $Date: 2012/01/24 04:26:18 $ $Revision: 1.9 $ */ /* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/winami.h b/include/winami.h index 73df178ba..dc9a98394 100644 --- a/include/winami.h +++ b/include/winami.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 winami.h $Date$ $Revision$ */ +/* NetHack 3.5 winami.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winami.h $Date: 2009/05/06 10:45:17 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)winami.h 3.5 1993/01/17 */ /* Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1991. */ /* Copyright (c) Gregg Wonderly, Naperville, Illinois, 1992, 1993. */ diff --git a/include/wingem.h b/include/wingem.h index 7eb57b6ff..d395aea66 100644 --- a/include/wingem.h +++ b/include/wingem.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 wingem.h $Date$ $Revision$ */ +/* NetHack 3.5 wingem.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 wingem.h $Date: 2012/01/24 04:26:18 $ $Revision: 1.7 $ */ /* Copyright (c) Christian Bressler, 1999 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/winprocs.h b/include/winprocs.h index d7c5c5f89..72dad2315 100644 --- a/include/winprocs.h +++ b/include/winprocs.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 winprocs.h $Date$ $Revision$ */ +/* NetHack 3.5 winprocs.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winprocs.h $Date: 2012/01/23 10:45:26 $ $Revision: 1.29 $ */ /* Copyright (c) David Cohrs, 1992 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/wintty.h b/include/wintty.h index baff7c2ff..a2ed1e009 100644 --- a/include/wintty.h +++ b/include/wintty.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 wintty.h $Date$ $Revision$ */ +/* NetHack 3.5 wintty.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 wintty.h $Date: 2012/01/23 10:45:26 $ $Revision: 1.12 $ */ /* Copyright (c) David Cohrs, 1991,1992 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/wintype.h b/include/wintype.h index 5d31dbfda..960a0d656 100644 --- a/include/wintype.h +++ b/include/wintype.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 wintype.h $Date$ $Revision$ */ +/* NetHack 3.5 wintype.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 wintype.h $Date: 2009/05/06 10:45:19 $ $Revision: 1.10 $ */ /* SCCS Id: @(#)wintype.h 3.5 2006/07/08 */ /* Copyright (c) David Cohrs, 1991 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/xwindow.h b/include/xwindow.h index 7a9b134b6..033ea9213 100644 --- a/include/xwindow.h +++ b/include/xwindow.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 xwindow.h $Date$ $Revision$ */ +/* NetHack 3.5 xwindow.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 xwindow.h $Date: 2009/05/06 10:45:19 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)xwindow.h 3.5 1992/03/07 */ /* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/xwindowp.h b/include/xwindowp.h index 0010038b4..0ee10fb49 100644 --- a/include/xwindowp.h +++ b/include/xwindowp.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 xwindowp.h $Date$ $Revision$ */ +/* NetHack 3.5 xwindowp.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 xwindowp.h $Date: 2009/05/06 10:45:19 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)xwindowp.h 3.5 1992/03/07 */ /* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/you.h b/include/you.h index 4b79f7fc5..50798acdb 100644 --- a/include/you.h +++ b/include/you.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 you.h $Date$ $Revision$ */ +/* NetHack 3.5 you.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 you.h $Date: 2012/04/14 08:31:03 $ $Revision: 1.13 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/youprop.h b/include/youprop.h index be82f0af9..04c3349a3 100644 --- a/include/youprop.h +++ b/include/youprop.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 youprop.h $Date$ $Revision$ */ +/* NetHack 3.5 youprop.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 youprop.h $Date: 2011/10/15 03:00:42 $ $Revision: 1.13 $ */ /* Copyright (c) 1989 Mike Threepoint */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/allmain.c b/src/allmain.c index 1742a302c..51afc75f6 100644 --- a/src/allmain.c +++ b/src/allmain.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 allmain.c $Date$ $Revision$ */ +/* NetHack 3.5 allmain.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 allmain.c $Date: 2012/05/16 01:47:18 $ $Revision: 1.43 $ */ /* SCCS Id: @(#)allmain.c 3.5 2007/03/12 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/alloc.c b/src/alloc.c index 08066565b..dc866063f 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 alloc.c $Date$ $Revision$ */ +/* NetHack 3.5 alloc.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 alloc.c $Date: 2012/01/29 03:00:17 $ $Revision: 1.8 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/apply.c b/src/apply.c index 77608b38e..fb97cc8fa 100644 --- a/src/apply.c +++ b/src/apply.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 apply.c $Date$ $Revision$ */ +/* NetHack 3.5 apply.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 apply.c $Date: 2012/05/01 02:22:32 $ $Revision: 1.168 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/artifact.c b/src/artifact.c index 52ebef02d..088bc9c66 100644 --- a/src/artifact.c +++ b/src/artifact.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 artifact.c $Date$ $Revision$ */ +/* NetHack 3.5 artifact.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 artifact.c $Date: 2013/11/07 01:03:16 $ $Revision: 1.77 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/attrib.c b/src/attrib.c index 02c8babcb..0c8ae76a8 100644 --- a/src/attrib.c +++ b/src/attrib.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 attrib.c $Date$ $Revision$ */ +/* NetHack 3.5 attrib.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 attrib.c $Date: 2011/10/01 00:25:55 $ $Revision: 1.30 $ */ /* Copyright 1988, 1989, 1990, 1992, M. Stephenson */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/ball.c b/src/ball.c index 84972fd4b..78aee97a0 100644 --- a/src/ball.c +++ b/src/ball.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 ball.c $Date$ $Revision$ */ +/* NetHack 3.5 ball.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 ball.c $Date: 2011/08/30 22:13:26 $ $Revision: 1.17 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/bones.c b/src/bones.c index 4b9738d3a..1d3b54eec 100644 --- a/src/bones.c +++ b/src/bones.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 bones.c $Date$ $Revision$ */ +/* NetHack 3.5 bones.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 bones.c $Date: 2012/02/16 02:40:24 $ $Revision: 1.39 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985,1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/botl.c b/src/botl.c index 7ad7224b1..59c6078ac 100644 --- a/src/botl.c +++ b/src/botl.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 botl.c $Date$ $Revision$ */ +/* NetHack 3.5 botl.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 botl.c $Date: 2012/01/10 17:47:19 $ $Revision: 1.36 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/cmd.c b/src/cmd.c index 74d5a5db7..eae24508c 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 cmd.c $Date$ $Revision$ */ +/* NetHack 3.5 cmd.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 cmd.c $Date: 2013/03/16 01:44:28 $ $Revision: 1.162 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/dbridge.c b/src/dbridge.c index c900be04e..b63d2714c 100644 --- a/src/dbridge.c +++ b/src/dbridge.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 dbridge.c $Date$ $Revision$ */ +/* NetHack 3.5 dbridge.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 dbridge.c $Date: 2012/02/01 00:49:16 $ $Revision: 1.21 $ */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/decl.c b/src/decl.c index 93036da34..963e55324 100644 --- a/src/decl.c +++ b/src/decl.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 decl.c $Date$ $Revision$ */ +/* NetHack 3.5 decl.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 decl.c $Date: 2012/04/09 02:56:30 $ $Revision: 1.37 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/detect.c b/src/detect.c index 6cd342eb7..db280b819 100644 --- a/src/detect.c +++ b/src/detect.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 detect.c $Date$ $Revision$ */ +/* NetHack 3.5 detect.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 detect.c $Date: 2012/04/16 02:05:40 $ $Revision: 1.47 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/dig.c b/src/dig.c index 5e0b40aca..382676865 100644 --- a/src/dig.c +++ b/src/dig.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 dig.c $Date$ $Revision$ */ +/* NetHack 3.5 dig.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 dig.c $Date: 2012/02/16 03:01:37 $ $Revision: 1.67 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/display.c b/src/display.c index b48d06833..8da9af9fe 100644 --- a/src/display.c +++ b/src/display.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 display.c $Date$ $Revision$ */ +/* NetHack 3.5 display.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 display.c $Date: 2011/12/05 03:17:36 $ $Revision: 1.34 $ */ /* Copyright (c) Dean Luick, with acknowledgements to Kevin Darcy */ /* and Dave Cohrs, 1990. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/dlb.c b/src/dlb.c index 394678ca2..32af6eedc 100644 --- a/src/dlb.c +++ b/src/dlb.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 dlb.c $Date$ $Revision$ */ +/* NetHack 3.5 dlb.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 dlb.c $Date: 2012/02/16 03:01:37 $ $Revision: 1.10 $ */ /* Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/do.c b/src/do.c index fa09f7d53..6ad4985da 100644 --- a/src/do.c +++ b/src/do.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 do.c $Date$ $Revision$ */ +/* NetHack 3.5 do.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 do.c $Date: 2014/11/18 03:10:39 $ $Revision: 1.101 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/do_name.c b/src/do_name.c index 9d19a1997..0c459bd50 100644 --- a/src/do_name.c +++ b/src/do_name.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 do_name.c $Date$ $Revision$ */ +/* NetHack 3.5 do_name.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 do_name.c $Date: 2012/01/29 03:00:17 $ $Revision: 1.49 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/do_wear.c b/src/do_wear.c index 42f23491a..efd9a51ff 100644 --- a/src/do_wear.c +++ b/src/do_wear.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 do_wear.c $Date$ $Revision$ */ +/* NetHack 3.5 do_wear.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 do_wear.c $Date: 2012/02/05 04:26:48 $ $Revision: 1.69 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/dog.c b/src/dog.c index 035e5cef7..0a0162e61 100644 --- a/src/dog.c +++ b/src/dog.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 dog.c $Date$ $Revision$ */ +/* NetHack 3.5 dog.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 dog.c $Date: 2011/04/15 01:55:42 $ $Revision: 1.37 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/dogmove.c b/src/dogmove.c index 58c5a52c7..a56ad1066 100644 --- a/src/dogmove.c +++ b/src/dogmove.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 dogmove.c $Date$ $Revision$ */ +/* NetHack 3.5 dogmove.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 dogmove.c $Date: 2012/02/10 09:29:28 $ $Revision: 1.35 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/dokick.c b/src/dokick.c index 9e76828e3..424aa6fa1 100644 --- a/src/dokick.c +++ b/src/dokick.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 dokick.c $Date$ $Revision$ */ +/* NetHack 3.5 dokick.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 dokick.c $Date: 2012/05/06 02:29:33 $ $Revision: 1.78 $ */ /* Copyright (c) Izchak Miller, Mike Stephenson, Steve Linhart, 1989. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/dothrow.c b/src/dothrow.c index 9ebd06c9a..ebd7c97e8 100644 --- a/src/dothrow.c +++ b/src/dothrow.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 dothrow.c $Date$ $Revision$ */ +/* NetHack 3.5 dothrow.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 dothrow.c $Date: 2013/11/05 00:57:55 $ $Revision: 1.89 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/drawing.c b/src/drawing.c index eecd9fe07..2d104be20 100644 --- a/src/drawing.c +++ b/src/drawing.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 drawing.c $Date$ $Revision$ */ +/* NetHack 3.5 drawing.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 drawing.c $Date: 2009/05/06 10:46:09 $ $Revision: 1.28 $ */ /* SCCS Id: @(#)drawing.c 3.5 2007/07/30 */ /* Copyright (c) NetHack Development Team 1992. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/dungeon.c b/src/dungeon.c index e9b66e194..d9348183c 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 dungeon.c $Date$ $Revision$ */ +/* NetHack 3.5 dungeon.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 dungeon.c $Date: 2012/04/14 08:31:05 $ $Revision: 1.34 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/eat.c b/src/eat.c index 8aa7f5da1..5b5d1f38e 100644 --- a/src/eat.c +++ b/src/eat.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 eat.c $Date$ $Revision$ */ +/* NetHack 3.5 eat.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 eat.c $Date: 2012/02/01 00:49:16 $ $Revision: 1.116 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/end.c b/src/end.c index 23d6ecd50..66d164143 100644 --- a/src/end.c +++ b/src/end.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 end.c $Date$ $Revision$ */ +/* NetHack 3.5 end.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 end.c $Date: 2012/04/09 02:56:30 $ $Revision: 1.79 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/engrave.c b/src/engrave.c index 51b6f7b89..c4bdd4496 100644 --- a/src/engrave.c +++ b/src/engrave.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 engrave.c $Date$ $Revision$ */ +/* NetHack 3.5 engrave.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 engrave.c $Date: 2012/12/20 01:48:36 $ $Revision: 1.39 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/exper.c b/src/exper.c index e0b3b8992..568b19e88 100644 --- a/src/exper.c +++ b/src/exper.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 exper.c $Date$ $Revision$ */ +/* NetHack 3.5 exper.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 exper.c $Date: 2009/05/06 10:46:24 $ $Revision: 1.19 $ */ /* SCCS Id: @(#)exper.c 3.5 2005/09/19 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/explode.c b/src/explode.c index a2416dd75..54855f70a 100644 --- a/src/explode.c +++ b/src/explode.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 explode.c $Date$ $Revision$ */ +/* NetHack 3.5 explode.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 explode.c $Date: 2013/11/05 00:57:55 $ $Revision: 1.34 $ */ /* Copyright (C) 1990 by Ken Arromdee */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/extralev.c b/src/extralev.c index 5e2e96bf6..597b23e72 100644 --- a/src/extralev.c +++ b/src/extralev.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 extralev.c $Date$ $Revision$ */ +/* NetHack 3.5 extralev.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 extralev.c $Date: 2010/01/10 02:35:19 $ $Revision: 1.5 $ */ /* Copyright 1988, 1989 by Ken Arromdee */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/files.c b/src/files.c index c899f259e..4b72c754d 100644 --- a/src/files.c +++ b/src/files.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 files.c $Date$ $Revision$ */ +/* NetHack 3.5 files.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 files.c $Date: 2012/03/10 02:49:08 $ $Revision: 1.124 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/fountain.c b/src/fountain.c index bb0745002..14fb6707e 100644 --- a/src/fountain.c +++ b/src/fountain.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 fountain.c $Date$ $Revision$ */ +/* NetHack 3.5 fountain.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 fountain.c $Date: 2011/08/20 00:22:20 $ $Revision: 1.32 $ */ /* Copyright Scott R. Turner, srt@ucla, 10/27/86 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/hack.c b/src/hack.c index 792671075..bcb3da1ad 100644 --- a/src/hack.c +++ b/src/hack.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 hack.c $Date$ $Revision$ */ +/* NetHack 3.5 hack.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 hack.c $Date: 2013/10/26 21:33:47 $ $Revision: 1.120 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/hacklib.c b/src/hacklib.c index d2985af6f..398b96dd4 100644 --- a/src/hacklib.c +++ b/src/hacklib.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 hacklib.c $Date$ $Revision$ */ +/* NetHack 3.5 hacklib.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 hacklib.c $Date: 2009/05/06 10:46:32 $ $Revision: 1.23 $ */ /* SCCS Id: @(#)hacklib.c 3.5 2007/04/30 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Robert Patrick Rankin, 1991 */ diff --git a/src/invent.c b/src/invent.c index b51151a38..12847bc7f 100644 --- a/src/invent.c +++ b/src/invent.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 invent.c $Date$ $Revision$ */ +/* NetHack 3.5 invent.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 invent.c $Date: 2013/11/05 00:57:55 $ $Revision: 1.125 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/light.c b/src/light.c index 4f39849ca..8d2b38ad4 100644 --- a/src/light.c +++ b/src/light.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 light.c $Date$ $Revision$ */ +/* NetHack 3.5 light.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 light.c $Date: 2009/05/06 10:46:38 $ $Revision: 1.15 $ */ /* SCCS Id: @(#)light.c 3.5 2009/01/20 */ /* Copyright (c) Dean Luick, 1994 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/lock.c b/src/lock.c index 87b54cca3..45be156f6 100644 --- a/src/lock.c +++ b/src/lock.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 lock.c $Date$ $Revision$ */ +/* NetHack 3.5 lock.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 lock.c $Date: 2014/09/20 00:32:01 $ $Revision: 1.39 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/mail.c b/src/mail.c index 7221d3864..cc01b97d3 100644 --- a/src/mail.c +++ b/src/mail.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mail.c $Date$ $Revision$ */ +/* NetHack 3.5 mail.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mail.c $Date: 2009/05/06 10:46:41 $ $Revision: 1.12 $ */ /* SCCS Id: @(#)mail.c 3.5 2008/01/30 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/makemon.c b/src/makemon.c index 98cfedb3d..11051eab5 100644 --- a/src/makemon.c +++ b/src/makemon.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 makemon.c $Date$ $Revision$ */ +/* NetHack 3.5 makemon.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 makemon.c $Date: 2012/01/29 00:34:33 $ $Revision: 1.69 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/mapglyph.c b/src/mapglyph.c index fe8ade7f4..b0dfa2a66 100644 --- a/src/mapglyph.c +++ b/src/mapglyph.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mapglyph.c $Date$ $Revision$ */ +/* NetHack 3.5 mapglyph.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mapglyph.c $Date: 2009/05/06 10:46:45 $ $Revision: 1.24 $ */ /* SCCS Id: @(#)mapglyph.c 3.5 2006/10/01 */ /* Copyright (c) David Cohrs, 1991 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/mcastu.c b/src/mcastu.c index a8bc604b2..a677db12e 100644 --- a/src/mcastu.c +++ b/src/mcastu.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mcastu.c $Date$ $Revision$ */ +/* NetHack 3.5 mcastu.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mcastu.c $Date: 2011/12/30 23:14:58 $ $Revision: 1.37 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/mhitm.c b/src/mhitm.c index ade47bf26..969a50458 100644 --- a/src/mhitm.c +++ b/src/mhitm.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhitm.c $Date$ $Revision$ */ +/* NetHack 3.5 mhitm.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhitm.c $Date: 2011/04/07 20:59:40 $ $Revision: 1.57 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/mhitu.c b/src/mhitu.c index 1d650f23d..0a85b86a7 100644 --- a/src/mhitu.c +++ b/src/mhitu.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhitu.c $Date$ $Revision$ */ +/* NetHack 3.5 mhitu.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhitu.c $Date: 2012/02/05 04:26:48 $ $Revision: 1.104 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/minion.c b/src/minion.c index 935719588..f70b426b7 100644 --- a/src/minion.c +++ b/src/minion.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 minion.c $Date$ $Revision$ */ +/* NetHack 3.5 minion.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 minion.c $Date: 2009/05/06 10:46:52 $ $Revision: 1.26 $ */ /* SCCS Id: @(#)minion.c 3.5 2008/11/14 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/mklev.c b/src/mklev.c index e75216ef6..8e3b267d1 100644 --- a/src/mklev.c +++ b/src/mklev.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mklev.c $Date$ $Revision$ */ +/* NetHack 3.5 mklev.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mklev.c $Date: 2012/02/15 01:55:33 $ $Revision: 1.20 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/mkmap.c b/src/mkmap.c index 408cea4a7..c014f7194 100644 --- a/src/mkmap.c +++ b/src/mkmap.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mkmap.c $Date$ $Revision$ */ +/* NetHack 3.5 mkmap.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mkmap.c $Date: 2009/05/06 10:46:55 $ $Revision: 1.12 $ */ /* SCCS Id: @(#)mkmap.c 3.5 2008/02/29 */ /* Copyright (c) J. C. Collet, M. Stephenson and D. Cohrs, 1992 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/mkmaze.c b/src/mkmaze.c index 2ff7c7413..ccd865db2 100644 --- a/src/mkmaze.c +++ b/src/mkmaze.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mkmaze.c $Date$ $Revision$ */ +/* NetHack 3.5 mkmaze.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mkmaze.c $Date: 2009/05/06 10:46:56 $ $Revision: 1.18 $ */ /* SCCS Id: @(#)mkmaze.c 3.5 2007/06/18 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/mkobj.c b/src/mkobj.c index 01a67f8f7..19e3658df 100644 --- a/src/mkobj.c +++ b/src/mkobj.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mkobj.c $Date$ $Revision$ */ +/* NetHack 3.5 mkobj.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mkobj.c $Date: 2012/03/10 02:49:08 $ $Revision: 1.70 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/mkroom.c b/src/mkroom.c index 59b2ddf54..c8bcb2ed0 100644 --- a/src/mkroom.c +++ b/src/mkroom.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mkroom.c $Date$ $Revision$ */ +/* NetHack 3.5 mkroom.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mkroom.c $Date: 2012/01/10 17:47:19 $ $Revision: 1.15 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/mon.c b/src/mon.c index ae6394d13..e3880eafe 100644 --- a/src/mon.c +++ b/src/mon.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mon.c $Date$ $Revision$ */ +/* NetHack 3.5 mon.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mon.c $Date: 2012/05/16 02:15:10 $ $Revision: 1.126 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/mondata.c b/src/mondata.c index 029c00d9c..3016b7adf 100644 --- a/src/mondata.c +++ b/src/mondata.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mondata.c $Date$ $Revision$ */ +/* NetHack 3.5 mondata.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mondata.c $Date: 2011/10/02 02:18:54 $ $Revision: 1.44 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/monmove.c b/src/monmove.c index 531d8a789..4b6ffc26f 100644 --- a/src/monmove.c +++ b/src/monmove.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 monmove.c $Date$ $Revision$ */ +/* NetHack 3.5 monmove.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 monmove.c $Date: 2011/08/30 22:13:27 $ $Revision: 1.46 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/monst.c b/src/monst.c index fb2d3e8db..d774d1f2a 100644 --- a/src/monst.c +++ b/src/monst.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 monst.c $Date$ $Revision$ */ +/* NetHack 3.5 monst.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 monst.c $Date: 2011/09/02 21:44:09 $ $Revision: 1.38 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/mplayer.c b/src/mplayer.c index 26cd4f62f..58546c931 100644 --- a/src/mplayer.c +++ b/src/mplayer.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mplayer.c $Date$ $Revision$ */ +/* NetHack 3.5 mplayer.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mplayer.c $Date: 2009/05/06 10:47:09 $ $Revision: 1.11 $ */ /* SCCS Id: @(#)mplayer.c 3.5 2006/12/15 */ /* Copyright (c) Izchak Miller, 1992. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/mthrowu.c b/src/mthrowu.c index ea955d6a6..02339c0ad 100644 --- a/src/mthrowu.c +++ b/src/mthrowu.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mthrowu.c $Date$ $Revision$ */ +/* NetHack 3.5 mthrowu.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mthrowu.c $Date: 2011/12/30 23:47:06 $ $Revision: 1.43 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/muse.c b/src/muse.c index a289cf6e8..cc540ebb0 100644 --- a/src/muse.c +++ b/src/muse.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 muse.c $Date$ $Revision$ */ +/* NetHack 3.5 muse.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 muse.c $Date: 2012/04/12 23:26:47 $ $Revision: 1.49 $ */ /* Copyright (C) 1990 by Ken Arromdee */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/music.c b/src/music.c index c3f4bf056..4491b8909 100644 --- a/src/music.c +++ b/src/music.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 music.c $Date$ $Revision$ */ +/* NetHack 3.5 music.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 music.c $Date: 2011/12/30 23:47:06 $ $Revision: 1.27 $ */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/o_init.c b/src/o_init.c index 3b65bf9c7..102160635 100644 --- a/src/o_init.c +++ b/src/o_init.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 o_init.c $Date$ $Revision$ */ +/* NetHack 3.5 o_init.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 o_init.c $Date: 2011/10/02 21:27:24 $ $Revision: 1.11 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/objects.c b/src/objects.c index c59c2ec59..ec4483a51 100644 --- a/src/objects.c +++ b/src/objects.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 objects.c $Date$ $Revision$ */ +/* NetHack 3.5 objects.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 objects.c $Date: 2011/07/28 04:00:20 $ $Revision: 1.23 $ */ /* Copyright (c) Mike Threepoint, 1989. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/objnam.c b/src/objnam.c index ed3bab967..d29ad6091 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 objnam.c $Date$ $Revision$ */ +/* NetHack 3.5 objnam.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 objnam.c $Date: 2011/10/27 02:24:54 $ $Revision: 1.101 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/options.c b/src/options.c index e7f39283f..18966efb5 100644 --- a/src/options.c +++ b/src/options.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 options.c $Date$ $Revision$ */ +/* NetHack 3.5 options.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 options.c $Date: 2012/04/09 02:56:30 $ $Revision: 1.153 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/pager.c b/src/pager.c index 62e744fd6..b3647c7dd 100644 --- a/src/pager.c +++ b/src/pager.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 pager.c $Date$ $Revision$ */ +/* NetHack 3.5 pager.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 pager.c $Date: 2012/01/15 09:27:06 $ $Revision: 1.41 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/pickup.c b/src/pickup.c index e73a5576c..0fd429bc3 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 pickup.c $Date$ $Revision$ */ +/* NetHack 3.5 pickup.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 pickup.c $Date: 2012/02/16 03:01:38 $ $Revision: 1.123 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/pline.c b/src/pline.c index d4cdb9c43..2c1612e49 100644 --- a/src/pline.c +++ b/src/pline.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 pline.c $Date$ $Revision$ */ +/* NetHack 3.5 pline.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 pline.c $Date: 2013/02/09 01:33:37 $ $Revision: 1.30 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/polyself.c b/src/polyself.c index 7bafe84dd..0e348035a 100644 --- a/src/polyself.c +++ b/src/polyself.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 polyself.c $Date$ $Revision$ */ +/* NetHack 3.5 polyself.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 polyself.c $Date: 2013/03/16 01:44:28 $ $Revision: 1.88 $ */ /* Copyright (C) 1987, 1988, 1989 by Ken Arromdee */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/potion.c b/src/potion.c index ede26f139..582409711 100644 --- a/src/potion.c +++ b/src/potion.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 potion.c $Date$ $Revision$ */ +/* NetHack 3.5 potion.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 potion.c $Date: 2013/11/05 00:57:55 $ $Revision: 1.91 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/pray.c b/src/pray.c index da8825dd3..a6bd75ba4 100644 --- a/src/pray.c +++ b/src/pray.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 pray.c $Date$ $Revision$ */ +/* NetHack 3.5 pray.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 pray.c $Date: 2012/05/07 01:44:38 $ $Revision: 1.62 $ */ /* Copyright (c) Benson I. Margulies, Mike Stephenson, Steve Linhart, 1989. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/priest.c b/src/priest.c index e5a112d2c..915813af0 100644 --- a/src/priest.c +++ b/src/priest.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 priest.c $Date$ $Revision$ */ +/* NetHack 3.5 priest.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 priest.c $Date: 2012/02/16 02:40:24 $ $Revision: 1.27 $ */ /* Copyright (c) Izchak Miller, Steve Linhart, 1989. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/quest.c b/src/quest.c index 3dfaaf532..c5ef6c819 100644 --- a/src/quest.c +++ b/src/quest.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 quest.c $Date$ $Revision$ */ +/* NetHack 3.5 quest.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 quest.c $Date: 2009/05/06 10:47:33 $ $Revision: 1.10 $ */ /* SCCS Id: @(#)quest.c 3.5 2006/08/05 */ /* Copyright 1991, M. Stephenson */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/questpgr.c b/src/questpgr.c index af7489b90..d06270c88 100644 --- a/src/questpgr.c +++ b/src/questpgr.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 questpgr.c $Date$ $Revision$ */ +/* NetHack 3.5 questpgr.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 questpgr.c $Date: 2012/02/02 09:18:14 $ $Revision: 1.14 $ */ /* Copyright 1991, M. Stephenson */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/read.c b/src/read.c index 755d09969..3564d6cec 100644 --- a/src/read.c +++ b/src/read.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 read.c $Date$ $Revision$ */ +/* NetHack 3.5 read.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 read.c $Date: 2012/04/06 08:35:00 $ $Revision: 1.78 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/rect.c b/src/rect.c index 5eb5896e8..be120c369 100644 --- a/src/rect.c +++ b/src/rect.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 rect.c $Date$ $Revision$ */ +/* NetHack 3.5 rect.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 rect.c $Date: 2009/05/06 10:47:37 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)rect.c 3.5 1990/02/22 */ /* Copyright (c) 1990 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/region.c b/src/region.c index 914b79e62..562747948 100644 --- a/src/region.c +++ b/src/region.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 region.c $Date$ $Revision$ */ +/* NetHack 3.5 region.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 region.c $Date: 2012/05/07 01:44:38 $ $Revision: 1.26 $ */ /* Copyright (c) 1996 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/restore.c b/src/restore.c index cd2bc4006..2297127c0 100644 --- a/src/restore.c +++ b/src/restore.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 restore.c $Date$ $Revision$ */ +/* NetHack 3.5 restore.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 restore.c $Date: 2012/02/16 02:40:24 $ $Revision: 1.71 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/rip.c b/src/rip.c index 85d0c4016..526c56388 100644 --- a/src/rip.c +++ b/src/rip.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 rip.c $Date$ $Revision$ */ +/* NetHack 3.5 rip.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 rip.c $Date: 2012/03/10 02:49:08 $ $Revision: 1.11 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/rnd.c b/src/rnd.c index 5f50ecbd0..a2ce45685 100644 --- a/src/rnd.c +++ b/src/rnd.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 rnd.c $Date$ $Revision$ */ +/* NetHack 3.5 rnd.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 rnd.c $Date: 2009/05/06 10:47:41 $ $Revision: 1.7 $ */ /* SCCS Id: @(#)rnd.c 3.5 2004/08/27 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/role.c b/src/role.c index 570acf772..8cb7f3f7e 100644 --- a/src/role.c +++ b/src/role.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 role.c $Date$ $Revision$ */ +/* NetHack 3.5 role.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 role.c $Date: 2012/02/16 03:01:38 $ $Revision: 1.18 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985-1999. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/rumors.c b/src/rumors.c index 5993a8ead..e84418e2d 100644 --- a/src/rumors.c +++ b/src/rumors.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 rumors.c $Date$ $Revision$ */ +/* NetHack 3.5 rumors.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 rumors.c $Date: 2012/05/11 22:36:33 $ $Revision: 1.17 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/save.c b/src/save.c index ce1073973..a4055c915 100644 --- a/src/save.c +++ b/src/save.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 save.c $Date$ $Revision$ */ +/* NetHack 3.5 save.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 save.c $Date: 2012/02/16 02:40:24 $ $Revision: 1.53 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/shk.c b/src/shk.c index ef8fed952..944098c3a 100644 --- a/src/shk.c +++ b/src/shk.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 shk.c $Date$ $Revision$ */ +/* NetHack 3.5 shk.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 shk.c $Date: 2012/07/03 22:54:49 $ $Revision: 1.91 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/shknam.c b/src/shknam.c index 83eb902d3..ab2262bb4 100644 --- a/src/shknam.c +++ b/src/shknam.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 shknam.c $Date$ $Revision$ */ +/* NetHack 3.5 shknam.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 shknam.c $Date: 2011/04/15 01:55:42 $ $Revision: 1.24 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/sit.c b/src/sit.c index 5f9ac52aa..154248392 100644 --- a/src/sit.c +++ b/src/sit.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 sit.c $Date$ $Revision$ */ +/* NetHack 3.5 sit.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 sit.c $Date: 2012/02/06 04:17:25 $ $Revision: 1.31 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/sounds.c b/src/sounds.c index eaac43337..b599f814e 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 sounds.c $Date$ $Revision$ */ +/* NetHack 3.5 sounds.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 sounds.c $Date: 2012/03/10 02:49:08 $ $Revision: 1.39 $ */ /* Copyright (c) 1989 Janet Walz, Mike Threepoint */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/sp_lev.c b/src/sp_lev.c index 0d89bfc31..5ecf91aa1 100644 --- a/src/sp_lev.c +++ b/src/sp_lev.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 sp_lev.c $Date$ $Revision$ */ +/* NetHack 3.5 sp_lev.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 sp_lev.c $Date: 2011/01/05 01:28:36 $ $Revision: 1.23 $ */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/spell.c b/src/spell.c index 23f136077..e1f6fc55b 100644 --- a/src/spell.c +++ b/src/spell.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 spell.c $Date$ $Revision$ */ +/* NetHack 3.5 spell.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 spell.c $Date: 2011/12/29 22:01:25 $ $Revision: 1.44 $ */ /* Copyright (c) M. Stephenson 1988 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/steal.c b/src/steal.c index 21712a3f2..f762ec18f 100644 --- a/src/steal.c +++ b/src/steal.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 steal.c $Date$ $Revision$ */ +/* NetHack 3.5 steal.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 steal.c $Date: 2012/02/05 04:26:48 $ $Revision: 1.41 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/steed.c b/src/steed.c index afa110b1f..d42c2957d 100644 --- a/src/steed.c +++ b/src/steed.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 steed.c $Date$ $Revision$ */ +/* NetHack 3.5 steed.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 steed.c $Date: 2012/01/04 18:52:36 $ $Revision: 1.36 $ */ /* Copyright (c) Kevin Hugo, 1998-1999. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/sys.c b/src/sys.c index 19aecaade..4550f4ff5 100644 --- a/src/sys.c +++ b/src/sys.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 sys.c $Date$ $Revision$ */ +/* NetHack 3.5 sys.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 sys.c $Date: 2012/03/10 02:22:07 $ $Revision: 1.12 $ */ /* Copyright (c) Kenneth Lorber, Kensington, Maryland, 2008. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/teleport.c b/src/teleport.c index 000784094..608e38374 100644 --- a/src/teleport.c +++ b/src/teleport.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 teleport.c $Date$ $Revision$ */ +/* NetHack 3.5 teleport.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 teleport.c $Date: 2012/01/04 18:52:36 $ $Revision: 1.45 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/timeout.c b/src/timeout.c index d5d177673..80d9a4da6 100644 --- a/src/timeout.c +++ b/src/timeout.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 timeout.c $Date$ $Revision$ */ +/* NetHack 3.5 timeout.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 timeout.c $Date: 2012/04/16 00:57:37 $ $Revision: 1.48 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/topten.c b/src/topten.c index a2d205803..58079a6de 100644 --- a/src/topten.c +++ b/src/topten.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 topten.c $Date$ $Revision$ */ +/* NetHack 3.5 topten.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 topten.c $Date: 2012/01/24 04:26:15 $ $Revision: 1.23 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/track.c b/src/track.c index d7a7db4df..db1f38edb 100644 --- a/src/track.c +++ b/src/track.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 track.c $Date$ $Revision$ */ +/* NetHack 3.5 track.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 track.c $Date: 2009/05/06 10:48:00 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)track.c 3.5 87/08/08 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/trap.c b/src/trap.c index 232e4832e..275776926 100644 --- a/src/trap.c +++ b/src/trap.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 trap.c $Date$ $Revision$ */ +/* NetHack 3.5 trap.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 trap.c $Date: 2013/03/14 01:58:21 $ $Revision: 1.179 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/u_init.c b/src/u_init.c index 77cd0c080..4e5927397 100644 --- a/src/u_init.c +++ b/src/u_init.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 u_init.c $Date$ $Revision$ */ +/* NetHack 3.5 u_init.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 u_init.c $Date: 2011/10/01 00:25:56 $ $Revision: 1.18 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/uhitm.c b/src/uhitm.c index cbd0cdbec..43fb2c0a1 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 uhitm.c $Date$ $Revision$ */ +/* NetHack 3.5 uhitm.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 uhitm.c $Date: 2012/05/01 02:22:33 $ $Revision: 1.116 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/vault.c b/src/vault.c index af37a0625..5205f6aca 100644 --- a/src/vault.c +++ b/src/vault.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 vault.c $Date$ $Revision$ */ +/* NetHack 3.5 vault.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 vault.c $Date: 2011/10/13 00:31:10 $ $Revision: 1.28 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/version.c b/src/version.c index 6dbc4e38a..1f58cff1f 100644 --- a/src/version.c +++ b/src/version.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 version.c $Date$ $Revision$ */ +/* NetHack 3.5 version.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 version.c $Date: 2012/01/04 18:52:36 $ $Revision: 1.26 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/vision.c b/src/vision.c index 2f1a62b0c..d835fb554 100644 --- a/src/vision.c +++ b/src/vision.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 vision.c $Date$ $Revision$ */ +/* NetHack 3.5 vision.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 vision.c $Date: 2009/05/06 10:48:10 $ $Revision: 1.12 $ */ /* SCCS Id: @(#)vision.c 3.5 2007/11/05 */ /* Copyright (c) Dean Luick, with acknowledgements to Dave Cohrs, 1990. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/weapon.c b/src/weapon.c index fa902d6e0..568c2d669 100644 --- a/src/weapon.c +++ b/src/weapon.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 weapon.c $Date$ $Revision$ */ +/* NetHack 3.5 weapon.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 weapon.c $Date: 2011/12/18 05:16:28 $ $Revision: 1.38 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/were.c b/src/were.c index 864ee5fed..c2df2e20c 100644 --- a/src/were.c +++ b/src/were.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 were.c $Date$ $Revision$ */ +/* NetHack 3.5 were.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 were.c $Date: 2011/02/28 11:29:27 $ $Revision: 1.14 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/wield.c b/src/wield.c index a34d27c6e..7d7c2d6af 100644 --- a/src/wield.c +++ b/src/wield.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 wield.c $Date$ $Revision$ */ +/* NetHack 3.5 wield.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 wield.c $Date: 2009/05/06 10:48:14 $ $Revision: 1.31 $ */ /* SCCS Id: @(#)wield.c 3.5 2009/01/20 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/windows.c b/src/windows.c index fc13631c0..070658bd1 100644 --- a/src/windows.c +++ b/src/windows.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 windows.c $Date$ $Revision$ */ +/* NetHack 3.5 windows.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 windows.c $Date: 2012/01/23 10:45:28 $ $Revision: 1.23 $ */ /* Copyright (c) D. Cohrs, 1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/wizard.c b/src/wizard.c index 9d7abacdc..4f184fa97 100644 --- a/src/wizard.c +++ b/src/wizard.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 wizard.c $Date$ $Revision$ */ +/* NetHack 3.5 wizard.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 wizard.c $Date: 2009/05/06 10:48:16 $ $Revision: 1.32 $ */ /* SCCS Id: @(#)wizard.c 3.5 2008/11/14 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/worm.c b/src/worm.c index b8be560a5..36af566fc 100644 --- a/src/worm.c +++ b/src/worm.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 worm.c $Date$ $Revision$ */ +/* NetHack 3.5 worm.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 worm.c $Date: 2009/05/06 10:48:17 $ $Revision: 1.12 $ */ /* SCCS Id: @(#)worm.c 3.5 2009/03/05 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/worn.c b/src/worn.c index f750bf410..4371d789a 100644 --- a/src/worn.c +++ b/src/worn.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 worn.c $Date$ $Revision$ */ +/* NetHack 3.5 worn.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 worn.c $Date: 2013/11/05 00:57:56 $ $Revision: 1.32 $ */ /* SCCS Id: @(#)worn.c 3.5 2009/02/28 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/write.c b/src/write.c index d5f61c67f..6b03ce205 100644 --- a/src/write.c +++ b/src/write.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 write.c $Date$ $Revision$ */ +/* NetHack 3.5 write.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 write.c $Date: 2010/12/28 19:54:41 $ $Revision: 1.9 $ */ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" diff --git a/src/zap.c b/src/zap.c index e265b898d..5c95dde0d 100644 --- a/src/zap.c +++ b/src/zap.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 zap.c $Date$ $Revision$ */ +/* NetHack 3.5 zap.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 zap.c $Date: 2013/11/05 00:57:56 $ $Revision: 1.183 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/amiga/amidos.c b/sys/amiga/amidos.c index 9444c2b95..fd6d329ad 100644 --- a/sys/amiga/amidos.c +++ b/sys/amiga/amidos.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 amidos.c $Date$ $Revision$ */ +/* NetHack 3.5 amidos.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 amidos.c $Date: 2009/05/06 10:48:29 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)amidos.c 3.5 2000/01/12 /* Copyright (c) Olaf Seibert, Nijmegen, The Netherlands, 1988,1990. */ /* Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1991,1992,1993,1996. */ diff --git a/sys/amiga/amidos.p b/sys/amiga/amidos.p index 87e436221..238e7412c 100644 --- a/sys/amiga/amidos.p +++ b/sys/amiga/amidos.p @@ -1,4 +1,5 @@ -/* NetHack 3.5 amidos.p $Date$ $Revision$ */ +/* NetHack 3.5 amidos.p $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 amidos.p $Date: 2009/05/06 10:48:29 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)amidos.p 3.5 1993/01/08 /* Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1992, 1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/amiga/amigst.c b/sys/amiga/amigst.c index b12230720..0a74acd9e 100644 --- a/sys/amiga/amigst.c +++ b/sys/amiga/amigst.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 amigst.c $Date$ $Revision$ */ +/* NetHack 3.5 amigst.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 amigst.c $Date: 2009/05/06 10:48:29 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)amigst.c 3.5 1993/01/08 /* Copyright (c) Gregg Wonderly, Naperville, IL, 1992, 1993 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/amiga/amimenu.c b/sys/amiga/amimenu.c index 4314798e7..083ca292f 100644 --- a/sys/amiga/amimenu.c +++ b/sys/amiga/amimenu.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 amimenu.c $Date$ $Revision$ */ +/* NetHack 3.5 amimenu.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 amimenu.c $Date: 2009/05/06 10:48:29 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)amimenu.c 3.5 1996/02/04 */ /* Copyright (c) Olaf 'Rhialto' Seibert, 1989 */ /* Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1992, 1993, 1996 */ diff --git a/sys/amiga/amirip.c b/sys/amiga/amirip.c index a7460258d..00e98b12d 100644 --- a/sys/amiga/amirip.c +++ b/sys/amiga/amirip.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 amirip.c $Date$ $Revision$ */ +/* NetHack 3.5 amirip.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 amirip.c $Date: 2012/01/24 04:26:20 $ $Revision: 1.7 $ */ /* Copyright (c) Kenneth Lorber, Bethesda, Maryland 1991,1992,1993,1995,1996. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/amiga/amisnd.c b/sys/amiga/amisnd.c index ed33e0331..0868332b2 100644 --- a/sys/amiga/amisnd.c +++ b/sys/amiga/amisnd.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 amisnd.c $Date$ $Revision$ */ +/* NetHack 3.5 amisnd.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 amisnd.c $Date: 2009/05/06 10:48:30 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)amisnd.c 3.5 2000/01/12*/ /* Copyright (c) 1992, 1993, 1995 by Gregg Wonderly */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/amiga/amistack.c b/sys/amiga/amistack.c index 16a8a4b64..c83afd1e2 100644 --- a/sys/amiga/amistack.c +++ b/sys/amiga/amistack.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 amistack.c $Date$ $Revision$ */ +/* NetHack 3.5 amistack.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 amistack.c $Date: 2009/05/06 10:48:30 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)amistack.c 3.5 2000/05/03 */ /* Copyright (c) Janne Salmijärvi, Tampere, Finland, 2000 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/amiga/amitty.c b/sys/amiga/amitty.c index 74ab9a1c0..7e960aeff 100644 --- a/sys/amiga/amitty.c +++ b/sys/amiga/amitty.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 amitty.c $Date$ $Revision$ */ +/* NetHack 3.5 amitty.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 amitty.c $Date: 2009/05/06 10:48:30 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)amitty.c 3.5 2000/01/12 /* Copyright (c) Kenneth Lorber, Bethesda, Maryland 1993,1996 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/amiga/amiwind.c b/sys/amiga/amiwind.c index 798afc9d6..0d45f5685 100644 --- a/sys/amiga/amiwind.c +++ b/sys/amiga/amiwind.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 amiwind.c $Date$ $Revision$ */ +/* NetHack 3.5 amiwind.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 amiwind.c $Date: 2009/05/06 10:48:30 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)amiwind.c 3.5 2000/01/12 /* Copyright (c) Olaf Seibert (KosmoSoft), 1989, 1992 */ /* Copyright (c) Kenneth Lorber, Bethesda, Maryland 1993,1996 */ diff --git a/sys/amiga/amiwind.p b/sys/amiga/amiwind.p index dd3127284..0eab48f94 100644 --- a/sys/amiga/amiwind.p +++ b/sys/amiga/amiwind.p @@ -1,4 +1,5 @@ -/* NetHack 3.5 amiwind.p $Date$ $Revision$ */ +/* NetHack 3.5 amiwind.p $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 amiwind.p $Date: 2009/05/06 10:48:31 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)amiwind.p 3.5 1993/01/08 */ /* Copyright (c) Gregg Wonderly, Naperville, IL, 1992, 1993 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/amiga/cvtsnd.c b/sys/amiga/cvtsnd.c index 7a9f8cda6..ee82c974a 100644 --- a/sys/amiga/cvtsnd.c +++ b/sys/amiga/cvtsnd.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 cvtsnd.c $Date$ $Revision$ */ +/* NetHack 3.5 cvtsnd.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 cvtsnd.c $Date: 2009/05/06 10:48:31 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)cvtsnd.c 3.5 1995/09/10 */ /* Copyright (c) 1995, Andrew Church, Olney, Maryland */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/amiga/txt2iff.c b/sys/amiga/txt2iff.c index 3ebbd225b..bd20f3583 100644 --- a/sys/amiga/txt2iff.c +++ b/sys/amiga/txt2iff.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 txt2iff.c $Date$ $Revision$ */ +/* NetHack 3.5 txt2iff.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 txt2iff.c $Date: 2009/05/06 10:48:31 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)txt2iff.c 3.5 1995/07/28 */ /* Copyright (c) 1995 by Gregg Wonderly, Naperville, Illinois */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/amiga/winami.c b/sys/amiga/winami.c index 10e439e49..4762f0697 100644 --- a/sys/amiga/winami.c +++ b/sys/amiga/winami.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 winami.c $Date$ $Revision$ */ +/* NetHack 3.5 winami.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winami.c $Date: 2012/01/10 17:47:21 $ $Revision: 1.13 $ */ /* Copyright (c) Gregg Wonderly, Naperville, Illinois, 1991,1992,1993,1996. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/amiga/winami.p b/sys/amiga/winami.p index 27f3eb8bb..c694628ab 100644 --- a/sys/amiga/winami.p +++ b/sys/amiga/winami.p @@ -1,4 +1,5 @@ -/* NetHack 3.5 winami.p $Date$ $Revision$ */ +/* NetHack 3.5 winami.p $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winami.p $Date: 2009/05/06 10:48:33 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)winami.p 3.5 1993/01/08 */ /* Copyright (c) Gregg Wonderly, Naperville, IL, 1992, 1993 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/amiga/winchar.c b/sys/amiga/winchar.c index 66ca41275..9c7e573b8 100644 --- a/sys/amiga/winchar.c +++ b/sys/amiga/winchar.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 winchar.c $Date$ $Revision$ */ +/* NetHack 3.5 winchar.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winchar.c $Date: 2009/05/06 10:48:33 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)winchar.c 3.5 1993/07/22 */ /* Copyright (c) Olaf Seibert (KosmoSoft), 1989, 1992 */ /* Copyright (c) Kenneth Lorber, Bethesda, Maryland 1993 */ diff --git a/sys/amiga/windefs.h b/sys/amiga/windefs.h index 14f46b561..67fb11564 100644 --- a/sys/amiga/windefs.h +++ b/sys/amiga/windefs.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 windefs.h $Date$ $Revision$ */ +/* NetHack 3.5 windefs.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 windefs.h $Date: 2009/05/06 10:48:34 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)windefs.h 3.5 1993/04/02 */ /* Copyright (c) Gregg Wonderly, Naperville, Illinois, 1991,1992,1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/amiga/winext.h b/sys/amiga/winext.h index 109c11703..52ebe22d9 100644 --- a/sys/amiga/winext.h +++ b/sys/amiga/winext.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 winext.h $Date$ $Revision$ */ +/* NetHack 3.5 winext.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winext.h $Date: 2009/05/06 10:48:35 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)winext.h 3.5 2000/01/12 */ /* Copyright (c) Gregg Wonderly, Naperville, Illinois, 1991,1992,1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/amiga/winfuncs.c b/sys/amiga/winfuncs.c index d518fea22..21f1937e4 100644 --- a/sys/amiga/winfuncs.c +++ b/sys/amiga/winfuncs.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 winfuncs.c $Date$ $Revision$ */ +/* NetHack 3.5 winfuncs.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winfuncs.c $Date: 2012/01/10 17:47:21 $ $Revision: 1.8 $ */ /* Copyright (c) Gregg Wonderly, Naperville, Illinois, 1991,1992,1993,1996. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/amiga/winkey.c b/sys/amiga/winkey.c index 400aee7a7..b14b5ac06 100644 --- a/sys/amiga/winkey.c +++ b/sys/amiga/winkey.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 winkey.c $Date$ $Revision$ */ +/* NetHack 3.5 winkey.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winkey.c $Date: 2009/05/06 10:48:37 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)winkey.c 3.5 1993/04/02 */ /* Copyright (c) Gregg Wonderly, Naperville, Illinois, 1991,1992,1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/amiga/winmenu.c b/sys/amiga/winmenu.c index da5067f5f..6aba0c290 100644 --- a/sys/amiga/winmenu.c +++ b/sys/amiga/winmenu.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 winmenu.c $Date$ $Revision$ */ +/* NetHack 3.5 winmenu.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winmenu.c $Date: 2009/05/06 10:48:38 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)winmenu.c 3.5 1996/02/17 */ /* Copyright (c) Gregg Wonderly, Naperville, Illinois, 1991,1992,1993,1996. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/amiga/winproto.h b/sys/amiga/winproto.h index b3abb712c..06dd621c0 100644 --- a/sys/amiga/winproto.h +++ b/sys/amiga/winproto.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 winproto.h $Date$ $Revision$ */ +/* NetHack 3.5 winproto.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winproto.h $Date: 2012/01/24 04:26:20 $ $Revision: 1.4 $ */ /* Copyright (c) Gregg Wonderly, Naperville, Illinois, 1991,1992,1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/amiga/winreq.c b/sys/amiga/winreq.c index 6e196657d..e87764434 100644 --- a/sys/amiga/winreq.c +++ b/sys/amiga/winreq.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 winreq.c $Date$ $Revision$ */ +/* NetHack 3.5 winreq.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winreq.c $Date: 2009/05/06 10:48:41 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)winreq.c 3.5 1993/04/02 */ /* Copyright (c) Gregg Wonderly, Naperville, Illinois, 1991,1992,1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/amiga/winstr.c b/sys/amiga/winstr.c index 9182f932b..f82c39aed 100644 --- a/sys/amiga/winstr.c +++ b/sys/amiga/winstr.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 winstr.c $Date$ $Revision$ */ +/* NetHack 3.5 winstr.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winstr.c $Date: 2009/05/06 10:48:42 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)winstr.c 3.5 1993/04/02 */ /* Copyright (c) Gregg Wonderly, Naperville, Illinois, 1991,1992,1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/amiga/xpm2iff.c b/sys/amiga/xpm2iff.c index a5fc976b0..aebe6dcb0 100644 --- a/sys/amiga/xpm2iff.c +++ b/sys/amiga/xpm2iff.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 xpm2iff.c $Date$ $Revision$ */ +/* NetHack 3.5 xpm2iff.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 xpm2iff.c $Date: 2009/05/06 10:48:44 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)xpm2iff.c 3.5 1995/08/04 */ /* Copyright (c) 1995 by Gregg Wonderly, Naperville, Illinois */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/atari/tos.c b/sys/atari/tos.c index 7da8b63b0..9cfc98a39 100644 --- a/sys/atari/tos.c +++ b/sys/atari/tos.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 tos.c $Date$ $Revision$ */ +/* NetHack 3.5 tos.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 tos.c $Date: 2009/05/06 10:48:51 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)tos.c 3.5 1990/14/08 /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/be/bemain.c b/sys/be/bemain.c index 1feaa4954..6a3715a9a 100644 --- a/sys/be/bemain.c +++ b/sys/be/bemain.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 bemain.c $Date$ $Revision$ */ +/* NetHack 3.5 bemain.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 bemain.c $Date: 2009/05/06 10:48:59 $ $Revision: 1.11 $ */ /* SCCS Id: @(#)bemain.c 3.5 2008/01/30 */ /* Copyright (c) Dean Luick, 1996. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/mac/NHDeflts b/sys/mac/NHDeflts index f87b746fd..256105813 100644 --- a/sys/mac/NHDeflts +++ b/sys/mac/NHDeflts @@ -1,4 +1,5 @@ -# NetHack 3.5 NHDeflts $Date$ $Revision$ +# NetHack 3.5 NHDeflts $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 NHDeflts $Date: 2009/05/06 10:49:09 $ $Revision: 1.4 $ # SCCS Id: @(#)NetHack Defaults 3.5 2002/03/15 # Copyright (c) 2002 by Dean Luick, Mark Modrall, and Kevin Hugo # NetHack may be freely redistributed. See license for details. diff --git a/sys/mac/dprintf.c b/sys/mac/dprintf.c index 6a51857d3..c334fd00c 100644 --- a/sys/mac/dprintf.c +++ b/sys/mac/dprintf.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 dprintf.c $Date$ $Revision$ */ +/* NetHack 3.5 dprintf.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 dprintf.c $Date: 2009/05/06 10:49:10 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)dprintf.c 3.5 1994/01/29 */ /* Copyright (c) Jon W{tte, 1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/mac/maccurs.c b/sys/mac/maccurs.c index 108718c2e..8e9b9ed46 100644 --- a/sys/mac/maccurs.c +++ b/sys/mac/maccurs.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 maccurs.c $Date$ $Revision$ */ +/* NetHack 3.5 maccurs.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 maccurs.c $Date: 2009/05/06 10:49:10 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)maccurs.c 3.5 1993/01/24 */ /* Copyright (c) Jon W{tte, 1992. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/mac/macerrs.c b/sys/mac/macerrs.c index 7b82733ba..d585f3b5e 100644 --- a/sys/mac/macerrs.c +++ b/sys/mac/macerrs.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 macerrs.c $Date$ $Revision$ */ +/* NetHack 3.5 macerrs.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 macerrs.c $Date: 2009/05/06 10:49:10 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)macerrs.c 3.5 1993/01/24 */ /* Copyright (c) Michael Hamel, 1991 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/mac/macfile.c b/sys/mac/macfile.c index 347baa06f..e268ba810 100644 --- a/sys/mac/macfile.c +++ b/sys/mac/macfile.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 macfile.c $Date$ $Revision$ */ +/* NetHack 3.5 macfile.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 macfile.c $Date: 2009/05/06 10:49:10 $ $Revision: 1.7 $ */ /* SCCS Id: @(#)macfile.c 3.5 1993/01/24 */ /* Copyright (c) Jon W{tte, Hao-Yang Wang, Jonathan Handler 1992. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/mac/macmain.c b/sys/mac/macmain.c index fbd36eebe..644e8e58f 100644 --- a/sys/mac/macmain.c +++ b/sys/mac/macmain.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 macmain.c $Date$ $Revision$ */ +/* NetHack 3.5 macmain.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 macmain.c $Date: 2009/05/06 10:49:11 $ $Revision: 1.15 $ */ /* SCCS Id: @(#)macmain.c 3.5 2008/01/30 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/mac/macmenu.c b/sys/mac/macmenu.c index 0b146aa1a..651ab2242 100644 --- a/sys/mac/macmenu.c +++ b/sys/mac/macmenu.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 macmenu.c $Date$ $Revision$ */ +/* NetHack 3.5 macmenu.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 macmenu.c $Date: 2009/05/06 10:49:13 $ $Revision: 1.7 $ */ /* SCCS Id: @(#)macmenu.c 3.5 1999/11/24 */ /* Copyright (c) Macintosh NetHack Port Team, 1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/mac/macsnd.c b/sys/mac/macsnd.c index 319048fda..bb3dfc65e 100644 --- a/sys/mac/macsnd.c +++ b/sys/mac/macsnd.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 macsnd.c $Date$ $Revision$ */ +/* NetHack 3.5 macsnd.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 macsnd.c $Date: 2009/05/06 10:49:14 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)macsnd.c 3.5 1992/11/28 */ /* Copyright (c) 1992 by Jon Watte */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/mac/mactopl.c b/sys/mac/mactopl.c index a4a92c5f6..938f4cfd4 100644 --- a/sys/mac/mactopl.c +++ b/sys/mac/mactopl.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mactopl.c $Date$ $Revision$ */ +/* NetHack 3.5 mactopl.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mactopl.c $Date: 2009/05/06 10:49:14 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)mactopl.c 3.5 1991/07/23 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/mac/mactty.c b/sys/mac/mactty.c index 8efda1b03..e6006983c 100644 --- a/sys/mac/mactty.c +++ b/sys/mac/mactty.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mactty.c $Date$ $Revision$ */ +/* NetHack 3.5 mactty.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mactty.c $Date: 2009/05/06 10:49:14 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)mactty.c 3.5 1993/03/01 */ /* Copyright (c) Jon W{tte 1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/mac/macunix.c b/sys/mac/macunix.c index fe5735629..18aae8b9a 100644 --- a/sys/mac/macunix.c +++ b/sys/mac/macunix.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 macunix.c $Date$ $Revision$ */ +/* NetHack 3.5 macunix.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 macunix.c $Date: 2009/05/06 10:49:16 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)macunix.c 3.5 1994/11/07 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/mac/macwin.c b/sys/mac/macwin.c index aeed4356f..3c5e92fd9 100644 --- a/sys/mac/macwin.c +++ b/sys/mac/macwin.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 macwin.c $Date$ $Revision$ */ +/* NetHack 3.5 macwin.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 macwin.c $Date: 2012/01/10 17:47:23 $ $Revision: 1.22 $ */ /* Copyright (c) Jon W{tte, Hao-Yang Wang, Jonathan Handler 1992. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/mac/mgetline.c b/sys/mac/mgetline.c index e5d396a46..1094bcaab 100644 --- a/sys/mac/mgetline.c +++ b/sys/mac/mgetline.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mgetline.c $Date$ $Revision$ */ +/* NetHack 3.5 mgetline.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mgetline.c $Date: 2009/05/06 10:49:18 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)getline.c 3.5 1990/22/02 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/mac/mmodal.c b/sys/mac/mmodal.c index 5faabd337..c11a79ff8 100644 --- a/sys/mac/mmodal.c +++ b/sys/mac/mmodal.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mmodal.c $Date$ $Revision$ */ +/* NetHack 3.5 mmodal.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mmodal.c $Date: 2009/05/06 10:49:18 $ $Revision: 1.7 $ */ /* SCCS Id: @(#)mmodal.c 3.5 1993/01/24 */ /* Copyright (c) Jon W{tte, Hao-Yang Wang, Jonathan Handler 1992. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/mac/mrecover.c b/sys/mac/mrecover.c index 03ef8b763..e8f8793a9 100644 --- a/sys/mac/mrecover.c +++ b/sys/mac/mrecover.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mrecover.c $Date$ $Revision$ */ +/* NetHack 3.5 mrecover.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mrecover.c $Date: 2009/05/06 10:49:19 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)mrecover.c 3.5 1996/07/24 */ /* Copyright (c) David Hairston, 1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/mac/mttymain.c b/sys/mac/mttymain.c index d4b1f2d37..258d93b7c 100644 --- a/sys/mac/mttymain.c +++ b/sys/mac/mttymain.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mttymain.c $Date$ $Revision$ */ +/* NetHack 3.5 mttymain.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mttymain.c $Date: 2009/05/06 10:49:20 $ $Revision: 1.8 $ */ /* SCCS Id: @(#)mttymain.c 3.5 1993/02/26 */ /* Copyright (c) Jon W{tte, 1993 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/msdos/Install.dos b/sys/msdos/Install.dos index cea810ac0..018884bb7 100644 --- a/sys/msdos/Install.dos +++ b/sys/msdos/Install.dos @@ -7,7 +7,8 @@ NetHack 3.5 on a DOS system ====================================================== (or, How to make PC NetHack 3.5) - Last revision: $Date$ + Last revision: $NHDT-Date$ + Last revision: $Date: 2005/01/02 17:16:53 $ Credit for a runnable full PC NetHack 3.5 goes to the PC Development team of Paul Winner, Kevin Smolkowski, Michael Allison, Yitzhak Sapir, Bill Dyer, diff --git a/sys/msdos/Makefile.BC b/sys/msdos/Makefile.BC index 48b412ae4..f64b99305 100644 --- a/sys/msdos/Makefile.BC +++ b/sys/msdos/Makefile.BC @@ -1,4 +1,5 @@ -# NetHack 3.5 Makefile.BC $Date$ $Revision$ +# NetHack 3.5 Makefile.BC $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.BC $Date: 2012/01/10 17:47:26 $ $Revision: 1.14 $ # Copyright (c) Yitzhak Sapir, 1999-2006. # NetHack may be freely distributed. See license for details. # diff --git a/sys/msdos/Makefile.GCC b/sys/msdos/Makefile.GCC index 3f4039d8e..d2e64da95 100644 --- a/sys/msdos/Makefile.GCC +++ b/sys/msdos/Makefile.GCC @@ -1,4 +1,5 @@ -# NetHack 3.5 Makefile.GCC $Date$ $Revision$ +# NetHack 3.5 Makefile.GCC $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.GCC $Date: 2012/01/10 17:47:26 $ $Revision: 1.25 $ # Copyright (c) NetHack PC Development Team 1996-2006. # PC NetHack 3.5 Makefile for djgpp V2 # diff --git a/sys/msdos/Makefile.MSC b/sys/msdos/Makefile.MSC index c5c4926c4..47e474ee2 100644 --- a/sys/msdos/Makefile.MSC +++ b/sys/msdos/Makefile.MSC @@ -1,4 +1,5 @@ -# NetHack 3.5 Makefile.MSC $Date$ $Revision$ +# NetHack 3.5 Makefile.MSC $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.MSC $Date: 2012/01/22 06:27:07 $ $Revision: 1.18 $ # Copyright (c) NetHack PC Development Team 1997 - 2012. # PC NetHack 3.4x Makefile for MSC V1.52c (16 bit compiler) # diff --git a/sys/msdos/msdos.c b/sys/msdos/msdos.c index 3b194617c..ce713bb9d 100644 --- a/sys/msdos/msdos.c +++ b/sys/msdos/msdos.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 msdos.c $Date$ $Revision$ */ +/* NetHack 3.5 msdos.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 msdos.c $Date: 2012/01/22 06:27:07 $ $Revision: 1.7 $ */ /* Copyright (c) NetHack PC Development Team 1990 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/msdos/ovlinit.c b/sys/msdos/ovlinit.c index e3a149fbb..869b7e325 100644 --- a/sys/msdos/ovlinit.c +++ b/sys/msdos/ovlinit.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 ovlinit.c $Date$ $Revision$ */ +/* NetHack 3.5 ovlinit.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 ovlinit.c $Date: 2009/05/06 10:49:38 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)ovlinit.c 3.5 1994/03/20 */ /* Copyright (c) NetHack PC Development Team 1995 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/msdos/pckeys.c b/sys/msdos/pckeys.c index 6bd95712d..142618ee7 100644 --- a/sys/msdos/pckeys.c +++ b/sys/msdos/pckeys.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 pckeys.c $Date$ $Revision$ */ +/* NetHack 3.5 pckeys.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 pckeys.c $Date: 2009/05/06 10:49:39 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)pckeys.c 3.5 1996/05/11 */ /* Copyright (c) NetHack PC Development Team 1996 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/msdos/pctiles.c b/sys/msdos/pctiles.c index f79ca4a81..e60c26f7a 100644 --- a/sys/msdos/pctiles.c +++ b/sys/msdos/pctiles.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 pctiles.c $Date$ $Revision$ */ +/* NetHack 3.5 pctiles.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 pctiles.c $Date: 2009/05/06 10:49:39 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)pctiles.c 3.5 1995/07/31 */ /* Copyright (c) NetHack PC Development Team 1993, 1994 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/msdos/pctiles.h b/sys/msdos/pctiles.h index 9c442a8e8..1f88edd4f 100644 --- a/sys/msdos/pctiles.h +++ b/sys/msdos/pctiles.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 pctiles.h $Date$ $Revision$ */ +/* NetHack 3.5 pctiles.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 pctiles.h $Date: 2009/05/06 10:49:40 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)pctiles.h 3.5 1994/04/04 */ /* Copyright (c) NetHack PC Development Team 1993, 1994 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/msdos/pcvideo.h b/sys/msdos/pcvideo.h index e08d04fdd..5c24bd7c5 100644 --- a/sys/msdos/pcvideo.h +++ b/sys/msdos/pcvideo.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 pcvideo.h $Date$ $Revision$ */ +/* NetHack 3.5 pcvideo.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 pcvideo.h $Date: 2009/05/06 10:49:40 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)pcvideo.h 3.5 1994/06/07 */ /* Copyright (c) NetHack PC Development Team 1993, 1994 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/msdos/portio.h b/sys/msdos/portio.h index 280e45885..33e5a20b5 100644 --- a/sys/msdos/portio.h +++ b/sys/msdos/portio.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 portio.h $Date$ $Revision$ */ +/* NetHack 3.5 portio.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 portio.h $Date: 2009/05/06 10:49:41 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)portio.h 3.5 1995/08/05 */ /* Copyright (c) NetHack PC Development Team 1995 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/msdos/schema1.BC b/sys/msdos/schema1.BC index e7aebf1d7..db07b0783 100644 --- a/sys/msdos/schema1.BC +++ b/sys/msdos/schema1.BC @@ -1,4 +1,5 @@ -/* NetHack 3.5 schema1.BC $Date$ $Revision$ */ +/* NetHack 3.5 schema1.BC $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 schema1.BC $Date: 2009/05/06 10:49:41 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)schema1.BC 3.5 2008/01/30 */ /* Copyright (c) Yitzhak Sapir, 1999 */ /* */ diff --git a/sys/msdos/schema2.BC b/sys/msdos/schema2.BC index 8a1246369..38a7546ea 100644 --- a/sys/msdos/schema2.BC +++ b/sys/msdos/schema2.BC @@ -1,4 +1,5 @@ -/* NetHack 3.5 schema2.BC $Date$ $Revision$ */ +/* NetHack 3.5 schema2.BC $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 schema2.BC $Date: 2009/05/06 10:49:42 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)schema2.BC 3.5 2008/01/30 */ /* Copyright (c) Yitzhak Sapir, 1999 */ /* */ diff --git a/sys/msdos/setup.bat b/sys/msdos/setup.bat old mode 100755 new mode 100644 index 3f53c20cf..03fd94d12 --- a/sys/msdos/setup.bat +++ b/sys/msdos/setup.bat @@ -1,5 +1,6 @@ @echo off -REM NetHack 3.5 setup.bat $Date$ $Revision$ +REM NetHack 3.5 setup.bat $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +REM NetHack 3.5 setup.bat $Date: 2012/01/22 06:27:07 $ $Revision: 1.3 $ REM Copyright (c) NetHack PC Development Team 1990 - 2012 REM NetHack may be freely redistributed. See license for details. diff --git a/sys/msdos/sound.c b/sys/msdos/sound.c index 1f13e551e..ef8914869 100644 --- a/sys/msdos/sound.c +++ b/sys/msdos/sound.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 sound.c $Date$ $Revision$ */ +/* NetHack 3.5 sound.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 sound.c $Date: 2009/05/06 10:49:43 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)sound.c 3.5 1996/02/19 */ /* Copyright (c) NetHack PC Development Team 1993,1995 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/msdos/tile2bin.c b/sys/msdos/tile2bin.c index 44323c1ee..e54b83908 100644 --- a/sys/msdos/tile2bin.c +++ b/sys/msdos/tile2bin.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 tile2bin.c $Date$ $Revision$ */ +/* NetHack 3.5 tile2bin.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 tile2bin.c $Date: 2009/05/06 10:49:47 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)tile2bin.c 3.5 1995/01/26 */ /* Copyright (c) NetHack PC Development Team 1993, 1994, 1995 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/msdos/video.c b/sys/msdos/video.c index a9dd7416e..9b4bc1241 100644 --- a/sys/msdos/video.c +++ b/sys/msdos/video.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 video.c $Date$ $Revision$ */ +/* NetHack 3.5 video.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 video.c $Date: 2009/05/06 10:49:49 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)video.c 3.5 2001/04/07 */ /* Copyright (c) NetHack PC Development Team 1993, 1994, 2001 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/msdos/vidtxt.c b/sys/msdos/vidtxt.c index 49962257c..2710dc397 100644 --- a/sys/msdos/vidtxt.c +++ b/sys/msdos/vidtxt.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 vidtxt.c $Date$ $Revision$ */ +/* NetHack 3.5 vidtxt.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 vidtxt.c $Date: 2009/05/06 10:49:49 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)vidtxt.c 3.5 1994/04/04 */ /* Copyright (c) NetHack PC Development Team 1993 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/msdos/vidvga.c b/sys/msdos/vidvga.c index 057e6a2a2..e128821f9 100644 --- a/sys/msdos/vidvga.c +++ b/sys/msdos/vidvga.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 vidvga.c $Date$ $Revision$ */ +/* NetHack 3.5 vidvga.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 vidvga.c $Date: 2009/05/06 10:49:50 $ $Revision: 1.9 $ */ /* SCCS Id: @(#)vidvga.c 3.5 2006/07/08 */ /* Copyright (c) NetHack PC Development Team 1995 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/os2/Makefile.os2 b/sys/os2/Makefile.os2 index 0f60e2307..09ee9ca80 100644 --- a/sys/os2/Makefile.os2 +++ b/sys/os2/Makefile.os2 @@ -1,4 +1,5 @@ -# NetHack 3.5 Makefile.os2 $Date$ $Revision$ +# NetHack 3.5 Makefile.os2 $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.os2 $Date: 2012/01/10 17:47:28 $ $Revision: 1.16 $ # OS/2 NetHack 3.5 Makefile for OS/2 versions 1.x and 2.x # Copyright (C) 1990, 1991, 1992, 1993, 1996 Timo Hakulinen # diff --git a/sys/os2/os2.c b/sys/os2/os2.c index 45d6f6924..625b7168c 100644 --- a/sys/os2/os2.c +++ b/sys/os2/os2.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 os2.c $Date$ $Revision$ */ +/* NetHack 3.5 os2.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 os2.c $Date: 2009/05/06 10:50:12 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)os2.c 3.5 1996/02/29 */ /* Copyright (c) Timo Hakulinen, 1990, 1991, 1992, 1993, 1996. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/share/Makefile.lib b/sys/share/Makefile.lib index a94b37c88..86d72186b 100644 --- a/sys/share/Makefile.lib +++ b/sys/share/Makefile.lib @@ -1,4 +1,5 @@ -# NetHack 3.5 Makefile.lib $Date$ $Revision$ +# NetHack 3.5 Makefile.lib $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.lib $Date: 2009/05/06 10:50:26 $ $Revision: 1.4 $ # SCCS Id: @(#)Makefile.lib 3.5 1990/22/02 # Nethack makefile for Fred fish termlib -- Norman Meluch # diff --git a/sys/share/ioctl.c b/sys/share/ioctl.c index 09c181be0..ee86074ac 100644 --- a/sys/share/ioctl.c +++ b/sys/share/ioctl.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 ioctl.c $Date$ $Revision$ */ +/* NetHack 3.5 ioctl.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 ioctl.c $Date: 2011/06/16 15:10:14 $ $Revision: 1.8 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/share/nhlan.c b/sys/share/nhlan.c index d0e18c7e9..506a41455 100644 --- a/sys/share/nhlan.c +++ b/sys/share/nhlan.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 nhlan.c $Date$ $Revision$ */ +/* NetHack 3.5 nhlan.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 nhlan.c $Date: 2009/05/06 10:50:26 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)nhlan.c 3.5 1999/11/21 */ /* Copyright (c) Michael Allison, 1997 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/share/pcmain.c b/sys/share/pcmain.c index 6e9fc68ac..f6c2b6b12 100644 --- a/sys/share/pcmain.c +++ b/sys/share/pcmain.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 pcmain.c $Date$ $Revision$ */ +/* NetHack 3.5 pcmain.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 pcmain.c $Date: 2012/01/20 03:41:31 $ $Revision: 1.48 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/share/pcsys.c b/sys/share/pcsys.c index 8ebcd4319..0fc5ee8ed 100644 --- a/sys/share/pcsys.c +++ b/sys/share/pcsys.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 pcsys.c $Date$ $Revision$ */ +/* NetHack 3.5 pcsys.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 pcsys.c $Date: 2012/01/22 06:33:47 $ $Revision: 1.18 $ */ /* SCCS Id: @(#)pcsys.c 3.5 2002/01/22 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/share/pctty.c b/sys/share/pctty.c index d5364b5fe..85c364669 100644 --- a/sys/share/pctty.c +++ b/sys/share/pctty.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 pctty.c $Date$ $Revision$ */ +/* NetHack 3.5 pctty.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 pctty.c $Date: 2009/05/06 10:50:30 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)pctty.c 3.5 1990/22/02 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/share/pcunix.c b/sys/share/pcunix.c index 824149733..24316aac2 100644 --- a/sys/share/pcunix.c +++ b/sys/share/pcunix.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 pcunix.c $Date$ $Revision$ */ +/* NetHack 3.5 pcunix.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 pcunix.c $Date: 2009/05/06 10:50:30 $ $Revision: 1.27 $ */ /* SCCS Id: @(#)pcunix.c 3.5 1994/11/07 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/share/tclib.c b/sys/share/tclib.c index a22578367..b6aa91665 100644 --- a/sys/share/tclib.c +++ b/sys/share/tclib.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 tclib.c $Date$ $Revision$ */ +/* NetHack 3.5 tclib.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 tclib.c $Date: 2009/05/06 10:50:31 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)tclib.c 3.5 1996/02/25 */ /* Copyright (c) Robert Patrick Rankin, 1995 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/share/unixtty.c b/sys/share/unixtty.c index f691d5a6f..68c6f104c 100644 --- a/sys/share/unixtty.c +++ b/sys/share/unixtty.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 unixtty.c $Date$ $Revision$ */ +/* NetHack 3.5 unixtty.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 unixtty.c $Date: 2012/01/23 07:11:09 $ $Revision: 1.10 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/unix/Makefile.dat b/sys/unix/Makefile.dat index 609672540..ad9cb6e2d 100644 --- a/sys/unix/Makefile.dat +++ b/sys/unix/Makefile.dat @@ -1,5 +1,6 @@ # NetHack Makefile. -# NetHack 3.5 Makefile.dat $Date$ $Revision$ +# NetHack 3.5 Makefile.dat $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.dat $Date: 2012/01/10 17:47:30 $ $Revision: 1.11 $ # Root of source tree: NHSROOT=.. diff --git a/sys/unix/Makefile.doc b/sys/unix/Makefile.doc index 83f493004..606867b75 100644 --- a/sys/unix/Makefile.doc +++ b/sys/unix/Makefile.doc @@ -1,5 +1,6 @@ # NetHack Makefile. -# NetHack 3.5 Makefile.doc $Date$ $Revision$ +# NetHack 3.5 Makefile.doc $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.doc $Date: 2010/05/01 23:10:22 $ $Revision: 1.11 $ # Root of source tree: NHSROOT=.. diff --git a/sys/unix/Makefile.src b/sys/unix/Makefile.src index 11d9f86f0..b64a838c9 100644 --- a/sys/unix/Makefile.src +++ b/sys/unix/Makefile.src @@ -1,5 +1,6 @@ # NetHack Makefile. -# NetHack 3.5 Makefile.src $Date$ $Revision$ +# NetHack 3.5 Makefile.src $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.src $Date: 2012/01/20 03:41:33 $ $Revision: 1.37 $ # Root of source tree: NHSROOT=.. diff --git a/sys/unix/Makefile.top b/sys/unix/Makefile.top index ca32f08c3..6d94d6908 100644 --- a/sys/unix/Makefile.top +++ b/sys/unix/Makefile.top @@ -1,5 +1,6 @@ # NetHack Makefile. -# NetHack 3.5 Makefile.top $Date$ $Revision$ +# NetHack 3.5 Makefile.top $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.top $Date: 2012/01/10 17:47:30 $ $Revision: 1.19 $ # Root of source tree: NHSROOT=. diff --git a/sys/unix/Makefile.utl b/sys/unix/Makefile.utl index def3b67f4..e1c677c2f 100644 --- a/sys/unix/Makefile.utl +++ b/sys/unix/Makefile.utl @@ -1,5 +1,6 @@ # Makefile for NetHack's utility programs. -# NetHack 3.5 Makefile.utl $Date$ $Revision$ +# NetHack 3.5 Makefile.utl $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.utl $Date: 2012/01/10 17:47:30 $ $Revision: 1.18 $ # Root of source tree: NHSROOT=.. diff --git a/sys/unix/hints/linux b/sys/unix/hints/linux index 9ff45ff00..3ae677d00 100644 --- a/sys/unix/hints/linux +++ b/sys/unix/hints/linux @@ -1,5 +1,6 @@ # -# NetHack 3.5 linux $Date$ $Revision$ +# NetHack 3.5 linux $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 linux $Date: 2010/01/15 19:54:37 $ $Revision: 1.8 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007. # NetHack may be freely redistributed. See license for details. # diff --git a/sys/unix/hints/linux-x11 b/sys/unix/hints/linux-x11 index 48d46f940..e0d98badd 100644 --- a/sys/unix/hints/linux-x11 +++ b/sys/unix/hints/linux-x11 @@ -1,5 +1,6 @@ # -# NetHack 3.5 linux-x11 $Date$ $Revision$ +# NetHack 3.5 linux-x11 $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 linux-x11 $Date: 2009/12/23 20:02:29 $ $Revision: 1.5 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007. # NetHack may be freely redistributed. See license for details. # diff --git a/sys/unix/hints/macosx b/sys/unix/hints/macosx index 0ef9c342c..8d1f9d327 100644 --- a/sys/unix/hints/macosx +++ b/sys/unix/hints/macosx @@ -1,5 +1,6 @@ # -# NetHack 3.5 macosx $Date$ $Revision$ +# NetHack 3.5 macosx $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 macosx $Date: 2009/12/23 20:02:29 $ $Revision: 1.9 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007. # NetHack may be freely redistributed. See license for details. # diff --git a/sys/unix/hints/macosx.sh b/sys/unix/hints/macosx.sh old mode 100755 new mode 100644 index 3296963b2..a4091204a --- a/sys/unix/hints/macosx.sh +++ b/sys/unix/hints/macosx.sh @@ -1,5 +1,6 @@ #!/bin/sh -# NetHack 3.5 macosx.sh $Date$ $Revision$ +# NetHack 3.5 macosx.sh $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 macosx.sh $Date: 2011/10/17 01:29:17 $ $Revision: 1.5 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007. # NetHack may be freely redistributed. See license for details. # diff --git a/sys/unix/hints/macosx10.5 b/sys/unix/hints/macosx10.5 index c426629db..7ab5c760d 100644 --- a/sys/unix/hints/macosx10.5 +++ b/sys/unix/hints/macosx10.5 @@ -1,5 +1,6 @@ # -# NetHack 3.5 macosx10.5 $Date$ $Revision$ +# NetHack 3.5 macosx10.5 $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 macosx10.5 $Date: 2011/10/17 01:29:17 $ $Revision: 1.11 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2009. # NetHack may be freely redistributed. See license for details. # diff --git a/sys/unix/hints/macosx10.7 b/sys/unix/hints/macosx10.7 index 76f7b6862..fa3cc1e9c 100644 --- a/sys/unix/hints/macosx10.7 +++ b/sys/unix/hints/macosx10.7 @@ -1,5 +1,6 @@ # -# NetHack 3.5 macosx10.7 $Date$ $Revision$ +# NetHack 3.5 macosx10.7 $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 macosx10.7 $Date: 2012/01/18 22:32:24 $ $Revision: 1.4 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2009. # NetHack may be freely redistributed. See license for details. # diff --git a/sys/unix/hints/unix b/sys/unix/hints/unix index d6f230e44..bea73b58b 100644 --- a/sys/unix/hints/unix +++ b/sys/unix/hints/unix @@ -1,5 +1,6 @@ # -# NetHack 3.5 unix $Date$ $Revision$ +# NetHack 3.5 unix $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 unix $Date: 2009/12/23 20:02:29 $ $Revision: 1.5 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007. # NetHack may be freely redistributed. See license for details. # diff --git a/sys/unix/mkmkfile.sh b/sys/unix/mkmkfile.sh old mode 100755 new mode 100644 index 9055cd465..179e0bc90 --- a/sys/unix/mkmkfile.sh +++ b/sys/unix/mkmkfile.sh @@ -1,5 +1,6 @@ #!/bin/sh -# NetHack 3.5 mkmkfile.sh $Date$ $Revision$ +# NetHack 3.5 mkmkfile.sh $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 mkmkfile.sh $Date: 2011/12/27 00:34:52 $ $Revision: 1.5 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007. # NetHack may be freely redistributed. See license for details. diff --git a/sys/unix/nethack.sh b/sys/unix/nethack.sh old mode 100755 new mode 100644 index 00d2c409a..27278079b --- a/sys/unix/nethack.sh +++ b/sys/unix/nethack.sh @@ -1,5 +1,6 @@ #!/bin/sh -# NetHack 3.5 nethack.sh $Date$ $Revision$ +# NetHack 3.5 nethack.sh $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 nethack.sh $Date: 2009/05/06 10:50:54 $ $Revision: 1.9 $ # SCCS Id: @(#)nethack.sh 3.5 2007/12/12 HACKDIR=/usr/games/lib/nethackdir diff --git a/sys/unix/setup.sh b/sys/unix/setup.sh old mode 100755 new mode 100644 index 38f3e9d8d..2c1cbedca --- a/sys/unix/setup.sh +++ b/sys/unix/setup.sh @@ -1,5 +1,6 @@ #!/bin/sh -# NetHack 3.5 setup.sh $Date$ $Revision$ +# NetHack 3.5 setup.sh $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 setup.sh $Date: 2011/12/27 00:34:52 $ $Revision: 1.6 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007. # NetHack may be freely redistributed. See license for details. # diff --git a/sys/unix/sysconf b/sys/unix/sysconf index 99bcab3d8..3eb07ecaa 100644 --- a/sys/unix/sysconf +++ b/sys/unix/sysconf @@ -1,5 +1,6 @@ # -# NetHack 3.5 sysconf $Date$ $Revision$ +# NetHack 3.5 sysconf $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 sysconf $Date: 2012/01/27 20:15:31 $ $Revision: 1.6 $ # # Sample sysconf file. # The sysconf file is only used if NetHack is compiled with SYSCF defined. diff --git a/sys/unix/unixmain.c b/sys/unix/unixmain.c index be3617170..8f743e2ad 100644 --- a/sys/unix/unixmain.c +++ b/sys/unix/unixmain.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 unixmain.c $Date$ $Revision$ */ +/* NetHack 3.5 unixmain.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 unixmain.c $Date: 2012/01/27 20:15:31 $ $Revision: 1.42 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/unix/unixres.c b/sys/unix/unixres.c index 645e313ad..6d647103a 100644 --- a/sys/unix/unixres.c +++ b/sys/unix/unixres.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 unixres.c $Date$ $Revision$ */ +/* NetHack 3.5 unixres.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 unixres.c $Date: 2009/05/06 10:50:57 $ $Revision: 1.8 $ */ /* SCCS Id: @(#)unixres.c 3.5 2001/07/08 */ /* Copyright (c) Slash'EM development team, 2001. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/unix/unixunix.c b/sys/unix/unixunix.c index 978dd477a..a6d6d378b 100644 --- a/sys/unix/unixunix.c +++ b/sys/unix/unixunix.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 unixunix.c $Date$ $Revision$ */ +/* NetHack 3.5 unixunix.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 unixunix.c $Date: 2012/01/27 20:15:31 $ $Revision: 1.16 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/vms/Makefile.dat b/sys/vms/Makefile.dat index ec3af0aea..0a6bcf896 100644 --- a/sys/vms/Makefile.dat +++ b/sys/vms/Makefile.dat @@ -1,5 +1,6 @@ # NetHack Makefile (VMS) - data files: special levels and other data. -# NetHack 3.5 Makefile.dat $Date$ $Revision$ +# NetHack 3.5 Makefile.dat $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.dat $Date: 2011/05/23 03:27:10 $ $Revision: 1.5 $ # Copy this file to [.dat]Makefile.; no editing needed. diff --git a/sys/vms/Makefile.doc b/sys/vms/Makefile.doc index 7c7587a82..01e8158e4 100644 --- a/sys/vms/Makefile.doc +++ b/sys/vms/Makefile.doc @@ -1,5 +1,6 @@ # NetHack Makefile (VMS) - for the [Unix] documentation. -# NetHack 3.5 Makefile.doc $Date$ $Revision$ +# NetHack 3.5 Makefile.doc $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.doc $Date: 2011/05/23 03:27:10 $ $Revision: 1.5 $ # Copy this file to [.doc]Makefile. and edit it if needed. diff --git a/sys/vms/Makefile.src b/sys/vms/Makefile.src index a50ee357b..38f3ec266 100644 --- a/sys/vms/Makefile.src +++ b/sys/vms/Makefile.src @@ -1,5 +1,6 @@ # NetHack Makefile (VMS) - for building nethack itself. -# NetHack 3.5 Makefile.src $Date$ $Revision$ +# NetHack 3.5 Makefile.src $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.src $Date: 2011/10/11 02:37:18 $ $Revision: 1.23 $ # Copy this file to [.src]Makefile. and then edit it as needed. # The default configuration is for building with DEC C (aka Compaq C). diff --git a/sys/vms/Makefile.top b/sys/vms/Makefile.top index 01e9de1d6..04451124c 100644 --- a/sys/vms/Makefile.top +++ b/sys/vms/Makefile.top @@ -1,5 +1,6 @@ # NetHack Makefile (VMS) - top level for making & installing everything. -# NetHack 3.5 Makefile.top $Date$ $Revision$ +# NetHack 3.5 Makefile.top $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.top $Date: 2011/05/23 03:27:10 $ $Revision: 1.6 $ # Copy this file to Makefile.; edit the appropriate values for # GAMEDIR ("playground" location) and GAMEOWNER (UIC or identifier diff --git a/sys/vms/Makefile.utl b/sys/vms/Makefile.utl index 82eae9f8c..b132dcf9a 100644 --- a/sys/vms/Makefile.utl +++ b/sys/vms/Makefile.utl @@ -1,5 +1,6 @@ # NetHack Makefile (VMS) - for utility programs. -# NetHack 3.5 Makefile.utl $Date$ $Revision$ +# NetHack 3.5 Makefile.utl $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.utl $Date: 2011/05/23 03:27:10 $ $Revision: 1.10 $ # Copy this file to [.util]Makefile. and then edit it as needed. # The default configuration is for building with DEC C (aka Compaq C). diff --git a/sys/vms/lev_lex.h b/sys/vms/lev_lex.h index 0d26fed53..5dbde3521 100644 --- a/sys/vms/lev_lex.h +++ b/sys/vms/lev_lex.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 lev_lex.h $Date$ $Revision$ */ +/* NetHack 3.5 lev_lex.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 lev_lex.h $Date: 2009/05/06 10:51:24 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)lev_lex.h 3.5 1999/08/08 */ /* "vms/lev_lex.h" copied into "util/stdio.h" for use in *_lex.c only! * This is an awful kludge to allow util/*_lex.c made by SunOS's `lex' diff --git a/sys/vms/oldcrtl.c b/sys/vms/oldcrtl.c index e7bad5663..bb167cde5 100644 --- a/sys/vms/oldcrtl.c +++ b/sys/vms/oldcrtl.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 oldcrtl.c $Date$ $Revision$ */ +/* NetHack 3.5 oldcrtl.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 oldcrtl.c $Date: 2009/05/06 10:51:24 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)oldcrtl.c 3.5 1995/06/01 */ /* Pat Rankin May'90 */ /* VMS NetHack support, not needed for vms 4.6,4.7,5.x,or later */ diff --git a/sys/vms/vmsfiles.c b/sys/vms/vmsfiles.c index a714cce84..5eac49b5e 100644 --- a/sys/vms/vmsfiles.c +++ b/sys/vms/vmsfiles.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 vmsfiles.c $Date$ $Revision$ */ +/* NetHack 3.5 vmsfiles.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 vmsfiles.c $Date: 2009/05/06 10:51:25 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)vmsfiles.c 3.5 2007/10/27 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/vms/vmsmail.c b/sys/vms/vmsmail.c index 2b00ff511..d5358eb7f 100644 --- a/sys/vms/vmsmail.c +++ b/sys/vms/vmsmail.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 vmsmail.c $Date$ $Revision$ */ +/* NetHack 3.5 vmsmail.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 vmsmail.c $Date: 2009/05/06 10:51:25 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)vmsmail.c 3.5 2006/04/14 */ /* Copyright (c) Robert Patrick Rankin, 1991. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/vms/vmsmain.c b/sys/vms/vmsmain.c index 7992c806c..52c181ade 100644 --- a/sys/vms/vmsmain.c +++ b/sys/vms/vmsmain.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 vmsmain.c $Date$ $Revision$ */ +/* NetHack 3.5 vmsmain.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 vmsmain.c $Date: 2011/04/23 01:51:01 $ $Revision: 1.22 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ /* main.c - VMS NetHack */ diff --git a/sys/vms/vmsmisc.c b/sys/vms/vmsmisc.c index b5446a0fb..b5b2cf4cd 100644 --- a/sys/vms/vmsmisc.c +++ b/sys/vms/vmsmisc.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 vmsmisc.c $Date$ $Revision$ */ +/* NetHack 3.5 vmsmisc.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 vmsmisc.c $Date: 2011/09/01 01:47:00 $ $Revision: 1.6 $ */ /* NetHack may be freely redistributed. See license for details. */ #include "config.h" diff --git a/sys/vms/vmstty.c b/sys/vms/vmstty.c index 29d72bae5..548e476b2 100644 --- a/sys/vms/vmstty.c +++ b/sys/vms/vmstty.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 vmstty.c $Date$ $Revision$ */ +/* NetHack 3.5 vmstty.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 vmstty.c $Date: 2011/04/13 01:48:13 $ $Revision: 1.10 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ /* tty.c - (VMS) version */ diff --git a/sys/vms/vmsunix.c b/sys/vms/vmsunix.c index 364c96d66..baa4f75a3 100644 --- a/sys/vms/vmsunix.c +++ b/sys/vms/vmsunix.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 vmsunix.c $Date$ $Revision$ */ +/* NetHack 3.5 vmsunix.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 vmsunix.c $Date: 2011/09/01 01:47:00 $ $Revision: 1.8 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/Install.ce b/sys/wince/Install.ce index 50fd50477..60c7ee081 100644 --- a/sys/wince/Install.ce +++ b/sys/wince/Install.ce @@ -4,7 +4,8 @@ NetHack may be freely redistributed. See license for details. Instructions for compiling and installing NetHack 3.5 on a Windows CE or PocketPC system ======================================================================== - Last revision: $Date$ + Last revision: $NHDT-Date$ + Last revision: $Date: 2005/01/02 20:55:41 $ Credit for the porting of NetHack to Windows CE goes to Alex Kompel who initially developed and contributed the port. diff --git a/sys/wince/bootstrp.mak b/sys/wince/bootstrp.mak index 9a04417df..4066b63d1 100644 --- a/sys/wince/bootstrp.mak +++ b/sys/wince/bootstrp.mak @@ -1,4 +1,5 @@ -# NetHack 3.5 bootstrp.mak $Date$ $Revision$ +# NetHack 3.5 bootstrp.mak $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 bootstrp.mak $Date: 2012/01/10 17:47:33 $ $Revision: 1.10 $ # Copyright (c) Michael Allison # # NetHack Windows CE bootstrap file for MS Visual C++ V6.x and diff --git a/sys/wince/celib.c b/sys/wince/celib.c index 4c0d0b487..a8e38ccc7 100644 --- a/sys/wince/celib.c +++ b/sys/wince/celib.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 celib.c $Date$ $Revision$ */ +/* NetHack 3.5 celib.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 celib.c $Date: 2009/10/22 02:59:30 $ $Revision: 1.6 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/cesetup.bat b/sys/wince/cesetup.bat old mode 100755 new mode 100644 index 9f7215434..28d3bf6ce --- a/sys/wince/cesetup.bat +++ b/sys/wince/cesetup.bat @@ -1,4 +1,5 @@ -@REM NetHack 3.5 cesetup.bat $Date$ $Revision$ */ +@REM NetHack 3.5 cesetup.bat $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +@REM NetHack 3.5 cesetup.bat $Date: 2009/10/22 02:59:30 $ $Revision: 1.9 $ */ @REM Copyright (c) Alex Kompel, 2002 @REM NetHack may be freely redistributed. See license for details. @REM Win32 nhsetup batch file, see Install.ce for details diff --git a/sys/wince/cesound.c b/sys/wince/cesound.c index 8071abc42..6df289f3d 100644 --- a/sys/wince/cesound.c +++ b/sys/wince/cesound.c @@ -1,5 +1,7 @@ -/* NetHack 3.5 cesound.c $Date$ $Revision$ */ -/* SCCS Id: @(#)cesound.c 3.5 $Date$ */ +/* NetHack 3.5 cesound.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 cesound.c $Date: 2009/05/06 10:52:00 $ $Revision: 1.4 $ */ +/* SCCS Id: @(#)cesound.c 3.5 $NHDT-Date$ */ +/* SCCS Id: @(#)cesound.c 3.5 $Date: 2009/05/06 10:52:00 $ */ /* Copyright (c) NetHack PC Development Team 1993 */ /* NetHack may be freely redistributed. See license for details. */ /* */ diff --git a/sys/wince/mhaskyn.c b/sys/wince/mhaskyn.c index a46e0f0ad..fa4dd8629 100644 --- a/sys/wince/mhaskyn.c +++ b/sys/wince/mhaskyn.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhaskyn.c $Date$ $Revision$ */ +/* NetHack 3.5 mhaskyn.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhaskyn.c $Date: 2009/05/06 10:52:00 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)mhaskyn.c 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhaskyn.h b/sys/wince/mhaskyn.h index 0754723fb..e034486a8 100644 --- a/sys/wince/mhaskyn.h +++ b/sys/wince/mhaskyn.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhaskyn.h $Date$ $Revision$ */ +/* NetHack 3.5 mhaskyn.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhaskyn.h $Date: 2009/05/06 10:52:03 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)mhaskyn.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhcmd.c b/sys/wince/mhcmd.c index 8000db9ad..1e8b1c7f2 100644 --- a/sys/wince/mhcmd.c +++ b/sys/wince/mhcmd.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhcmd.c $Date$ $Revision$ */ +/* NetHack 3.5 mhcmd.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhcmd.c $Date: 2009/10/22 02:59:30 $ $Revision: 1.8 $ */ /* NetHack may be freely redistributed. See license for details. */ #include "winMS.h" diff --git a/sys/wince/mhcolor.c b/sys/wince/mhcolor.c index a68056fb5..285861da5 100644 --- a/sys/wince/mhcolor.c +++ b/sys/wince/mhcolor.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhcolor.c $Date$ $Revision$ */ +/* NetHack 3.5 mhcolor.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhcolor.c $Date: 2009/05/06 10:52:03 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)mhcolor.c 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhcolor.h b/sys/wince/mhcolor.h index 392da954b..8ebb7dc50 100644 --- a/sys/wince/mhcolor.h +++ b/sys/wince/mhcolor.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhcolor.h $Date$ $Revision$ */ +/* NetHack 3.5 mhcolor.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhcolor.h $Date: 2009/05/06 10:52:04 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)mhcolor.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhdlg.c b/sys/wince/mhdlg.c index 81017832f..edaca4cc4 100644 --- a/sys/wince/mhdlg.c +++ b/sys/wince/mhdlg.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhdlg.c $Date$ $Revision$ */ +/* NetHack 3.5 mhdlg.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhdlg.c $Date: 2009/10/13 01:55:10 $ $Revision: 1.8 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhdlg.h b/sys/wince/mhdlg.h index 78540b1a5..40ed9154a 100644 --- a/sys/wince/mhdlg.h +++ b/sys/wince/mhdlg.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhdlg.h $Date$ $Revision$ */ +/* NetHack 3.5 mhdlg.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhdlg.h $Date: 2009/05/06 10:52:06 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)mhdlg.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhfont.c b/sys/wince/mhfont.c index 9d30c87da..4b8ec12f6 100644 --- a/sys/wince/mhfont.c +++ b/sys/wince/mhfont.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhfont.c $Date$ $Revision$ */ +/* NetHack 3.5 mhfont.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhfont.c $Date: 2009/05/06 10:52:08 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)mhfont.c 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhfont.h b/sys/wince/mhfont.h index 7b6aeb1cf..00928b5de 100644 --- a/sys/wince/mhfont.h +++ b/sys/wince/mhfont.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhfont.h $Date$ $Revision$ */ +/* NetHack 3.5 mhfont.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhfont.h $Date: 2009/05/06 10:52:08 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)mhfont.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhinput.c b/sys/wince/mhinput.c index 129d790df..29b765470 100644 --- a/sys/wince/mhinput.c +++ b/sys/wince/mhinput.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhinput.c $Date$ $Revision$ */ +/* NetHack 3.5 mhinput.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhinput.c $Date: 2009/05/06 10:52:10 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)mhinput.c 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhinput.h b/sys/wince/mhinput.h index c2d73aa5c..dce815301 100644 --- a/sys/wince/mhinput.h +++ b/sys/wince/mhinput.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhinput.h $Date$ $Revision$ */ +/* NetHack 3.5 mhinput.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhinput.h $Date: 2009/05/06 10:52:10 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)mhinput.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhmain.c b/sys/wince/mhmain.c index 28a29c137..ff4e628b3 100644 --- a/sys/wince/mhmain.c +++ b/sys/wince/mhmain.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhmain.c $Date$ $Revision$ */ +/* NetHack 3.5 mhmain.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhmain.c $Date: 2011/10/11 02:37:20 $ $Revision: 1.14 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhmain.h b/sys/wince/mhmain.h index c8d79dbee..6bca6d674 100644 --- a/sys/wince/mhmain.h +++ b/sys/wince/mhmain.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhmain.h $Date$ $Revision$ */ +/* NetHack 3.5 mhmain.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhmain.h $Date: 2009/05/06 10:52:13 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)mhmain.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhmap.c b/sys/wince/mhmap.c index 156a8f8b0..1fe386490 100644 --- a/sys/wince/mhmap.c +++ b/sys/wince/mhmap.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhmap.c $Date$ $Revision$ */ +/* NetHack 3.5 mhmap.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhmap.c $Date: 2009/10/13 01:55:11 $ $Revision: 1.10 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhmap.h b/sys/wince/mhmap.h index e29aca51f..a418d0f64 100644 --- a/sys/wince/mhmap.h +++ b/sys/wince/mhmap.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhmap.h $Date$ $Revision$ */ +/* NetHack 3.5 mhmap.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhmap.h $Date: 2009/10/13 01:55:12 $ $Revision: 1.6 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhmsg.h b/sys/wince/mhmsg.h index 6e2629ab4..56f8841d8 100644 --- a/sys/wince/mhmsg.h +++ b/sys/wince/mhmsg.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhmsg.h $Date$ $Revision$ */ +/* NetHack 3.5 mhmsg.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhmsg.h $Date: 2009/05/06 10:52:21 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)mhmsg.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhmsgwnd.c b/sys/wince/mhmsgwnd.c index ffe3fc10a..6d2804f61 100644 --- a/sys/wince/mhmsgwnd.c +++ b/sys/wince/mhmsgwnd.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhmsgwnd.c $Date$ $Revision$ */ +/* NetHack 3.5 mhmsgwnd.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhmsgwnd.c $Date: 2009/10/13 01:55:12 $ $Revision: 1.7 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhmsgwnd.h b/sys/wince/mhmsgwnd.h index 7638eaa2c..a0e4ee13c 100644 --- a/sys/wince/mhmsgwnd.h +++ b/sys/wince/mhmsgwnd.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhmsgwnd.h $Date$ $Revision$ */ +/* NetHack 3.5 mhmsgwnd.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhmsgwnd.h $Date: 2009/05/06 10:52:26 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)mhmsgwnd.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhrip.c b/sys/wince/mhrip.c index 5de8f0957..8b6957569 100644 --- a/sys/wince/mhrip.c +++ b/sys/wince/mhrip.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhrip.c $Date$ $Revision$ */ +/* NetHack 3.5 mhrip.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhrip.c $Date: 2009/05/06 10:52:26 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)mhrip.c 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhrip.h b/sys/wince/mhrip.h index bd4b74eee..f5a4d7d44 100644 --- a/sys/wince/mhrip.h +++ b/sys/wince/mhrip.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhrip.h $Date$ $Revision$ */ +/* NetHack 3.5 mhrip.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhrip.h $Date: 2009/05/06 10:52:28 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)mhrip.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhstatus.c b/sys/wince/mhstatus.c index 786d2a8c2..6e18ed12a 100644 --- a/sys/wince/mhstatus.c +++ b/sys/wince/mhstatus.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhstatus.c $Date$ $Revision$ */ +/* NetHack 3.5 mhstatus.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhstatus.c $Date: 2009/05/06 10:52:28 $ $Revision: 1.7 $ */ /* SCCS Id: @(#)mhstatus.c 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhstatus.h b/sys/wince/mhstatus.h index 18df7a9f2..fcd186162 100644 --- a/sys/wince/mhstatus.h +++ b/sys/wince/mhstatus.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhstatus.h $Date$ $Revision$ */ +/* NetHack 3.5 mhstatus.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhstatus.h $Date: 2009/05/06 10:52:29 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)mhstatus.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhtext.c b/sys/wince/mhtext.c index 01581df62..3b61dab66 100644 --- a/sys/wince/mhtext.c +++ b/sys/wince/mhtext.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhtext.c $Date$ $Revision$ */ +/* NetHack 3.5 mhtext.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhtext.c $Date: 2009/10/22 02:59:34 $ $Revision: 1.8 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhtext.h b/sys/wince/mhtext.h index ed12ec815..fdbae63f1 100644 --- a/sys/wince/mhtext.h +++ b/sys/wince/mhtext.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhtext.h $Date$ $Revision$ */ +/* NetHack 3.5 mhtext.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhtext.h $Date: 2009/05/06 10:52:32 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)mhtext.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhtxtbuf.c b/sys/wince/mhtxtbuf.c index 5523d0f02..1be9af440 100644 --- a/sys/wince/mhtxtbuf.c +++ b/sys/wince/mhtxtbuf.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhtxtbuf.c $Date$ $Revision$ */ +/* NetHack 3.5 mhtxtbuf.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhtxtbuf.c $Date: 2009/10/13 01:55:12 $ $Revision: 1.6 $ */ /* Copyright (C) 2003 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhtxtbuf.h b/sys/wince/mhtxtbuf.h index fb38affb8..a61265796 100644 --- a/sys/wince/mhtxtbuf.h +++ b/sys/wince/mhtxtbuf.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhtxtbuf.h $Date$ $Revision$ */ +/* NetHack 3.5 mhtxtbuf.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhtxtbuf.h $Date: 2009/10/13 01:55:12 $ $Revision: 1.5 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mswproc.c b/sys/wince/mswproc.c index b069d1284..a4e5ede90 100644 --- a/sys/wince/mswproc.c +++ b/sys/wince/mswproc.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mswproc.c $Date$ $Revision$ */ +/* NetHack 3.5 mswproc.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mswproc.c $Date: 2012/01/24 04:26:22 $ $Revision: 1.19 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/winMS.h b/sys/wince/winMS.h index c8df31219..31856e71f 100644 --- a/sys/wince/winMS.h +++ b/sys/wince/winMS.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 winMS.h $Date$ $Revision$ */ +/* NetHack 3.5 winMS.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winMS.h $Date: 2012/01/24 04:26:22 $ $Revision: 1.9 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/winhack.c b/sys/wince/winhack.c index 17ecf17eb..2e25082a0 100644 --- a/sys/wince/winhack.c +++ b/sys/wince/winhack.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 winhack.c $Date$ $Revision$ */ +/* NetHack 3.5 winhack.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winhack.c $Date: 2009/10/22 02:59:35 $ $Revision: 1.11 $ */ /* Copyright (C) 2001 by Alex Kompel */ // winhack.cpp : Defines the entry point for the application. // diff --git a/sys/winnt/Install.nt b/sys/winnt/Install.nt index cc7af7962..b4beb8f87 100644 --- a/sys/winnt/Install.nt +++ b/sys/winnt/Install.nt @@ -5,7 +5,8 @@ NetHack 3.5 on a Windows system (Windows XP and Windows 2003 or later only) ============================================================== - Last revision: $Date$ + Last revision: $NHDT-Date$ + Last revision: $Date: 2012/01/15 17:43:54 $ Credit for the porting of NetHack to the Win32 Console Subsystem goes to the NT Porting Team started by Michael Allison. diff --git a/sys/winnt/Makefile.bcc b/sys/winnt/Makefile.bcc index 358feb966..018baecb8 100644 --- a/sys/winnt/Makefile.bcc +++ b/sys/winnt/Makefile.bcc @@ -1,4 +1,5 @@ -# NetHack 3.5 Makefile.bcc $Date$ $Revision$ +# NetHack 3.5 Makefile.bcc $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.bcc $Date: 2011/10/11 02:37:22 $ $Revision: 1.46 $ # Copyright (c) NetHack PC Development Team 1993-2010 # # diff --git a/sys/winnt/Makefile.gcc b/sys/winnt/Makefile.gcc index a6e618386..eb436fbf2 100644 --- a/sys/winnt/Makefile.gcc +++ b/sys/winnt/Makefile.gcc @@ -1,4 +1,5 @@ -# NetHack 3.5 Makefile.gcc $Date$ $Revision$ +# NetHack 3.5 Makefile.gcc $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.gcc $Date: 2011/10/11 02:37:22 $ $Revision: 1.38 $ # Copyright (c) NetHack PC Development Team 1993-2010 # # NetHack 3.5.x Makefile for MinGW diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index c4d013c0a..4d2b4c066 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -1,4 +1,5 @@ -# NetHack 3.5 Makefile.msc $Date$ $Revision$ +# NetHack 3.5 Makefile.msc $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.msc $Date: 2012/04/14 00:38:09 $ $Revision: 1.54 $ # Copyright (c) NetHack PC Development Team 1993-2012 # # NetHack 3.5.x Makefile for MS Visual Studio Visual C++ compiler diff --git a/sys/winnt/console.rc b/sys/winnt/console.rc index 1f3824561..e76d9cdd3 100644 --- a/sys/winnt/console.rc +++ b/sys/winnt/console.rc @@ -1,5 +1,7 @@ -/* NetHack 3.5 console.rc $Date$ $Revision$ */ -/* SCCS Id: @(#)console.rc 3.5 $Date$ */ +/* NetHack 3.5 console.rc $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 console.rc $Date: 2009/05/06 10:53:27 $ $Revision: 1.7 $ */ +/* SCCS Id: @(#)console.rc 3.5 $NHDT-Date$ */ +/* SCCS Id: @(#)console.rc 3.5 $Date: 2009/05/06 10:53:27 $ */ /* Copyright (c) Yitzhak Sapir, 2002. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/winnt/nh340key.c b/sys/winnt/nh340key.c index e42b9b8ae..1506bbfd7 100644 --- a/sys/winnt/nh340key.c +++ b/sys/winnt/nh340key.c @@ -1,5 +1,7 @@ -/* NetHack 3.5 nh340key.c $Date$ $Revision$ */ -/* SCCS Id: @(#)nh340key.c 3.5 $Date$ */ +/* NetHack 3.5 nh340key.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 nh340key.c $Date: 2009/05/06 10:53:29 $ $Revision: 1.7 $ */ +/* SCCS Id: @(#)nh340key.c 3.5 $NHDT-Date$ */ +/* SCCS Id: @(#)nh340key.c 3.5 $Date: 2009/05/06 10:53:29 $ */ /* Copyright (c) NetHack PC Development Team 2003 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/winnt/nhdefkey.c b/sys/winnt/nhdefkey.c index caae7b09c..3f40c0c38 100644 --- a/sys/winnt/nhdefkey.c +++ b/sys/winnt/nhdefkey.c @@ -1,5 +1,7 @@ -/* NetHack 3.5 nhdefkey.c $Date$ $Revision$ */ -/* SCCS Id: @(#)nhdefkey.c 3.5 $Date$ */ +/* NetHack 3.5 nhdefkey.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 nhdefkey.c $Date: 2009/05/06 10:53:29 $ $Revision: 1.10 $ */ +/* SCCS Id: @(#)nhdefkey.c 3.5 $NHDT-Date$ */ +/* SCCS Id: @(#)nhdefkey.c 3.5 $Date: 2009/05/06 10:53:29 $ */ /* Copyright (c) NetHack PC Development Team 2003 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/winnt/nhraykey.c b/sys/winnt/nhraykey.c index 73a4ed0ec..9c5d2b7a3 100644 --- a/sys/winnt/nhraykey.c +++ b/sys/winnt/nhraykey.c @@ -1,5 +1,7 @@ -/* NetHack 3.5 nhraykey.c $Date$ $Revision$ */ -/* SCCS Id: @(#)nhraykey.c 3.5 $Date$ */ +/* NetHack 3.5 nhraykey.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 nhraykey.c $Date: 2009/05/06 10:53:31 $ $Revision: 1.8 $ */ +/* SCCS Id: @(#)nhraykey.c 3.5 $NHDT-Date$ */ +/* SCCS Id: @(#)nhraykey.c 3.5 $Date: 2009/05/06 10:53:31 $ */ /* Copyright (c) NetHack PC Development Team 2003 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/winnt/nhsetup.bat b/sys/winnt/nhsetup.bat old mode 100755 new mode 100644 index c1324c35d..b4b4757a1 --- a/sys/winnt/nhsetup.bat +++ b/sys/winnt/nhsetup.bat @@ -1,4 +1,5 @@ -@REM NetHack 3.5 nhsetup.bat $Date$ $Revision$ */ +@REM NetHack 3.5 nhsetup.bat $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +@REM NetHack 3.5 nhsetup.bat $Date: 2010/09/05 14:22:16 $ $Revision: 1.21 $ */ @REM Copyright (c) NetHack PC Development Team 1993-2010 @REM NetHack may be freely redistributed. See license for details. @REM Win32 setup batch file, see Install.nt for details diff --git a/sys/winnt/ntsound.c b/sys/winnt/ntsound.c index c3008eb2e..0c2f1763d 100644 --- a/sys/winnt/ntsound.c +++ b/sys/winnt/ntsound.c @@ -1,5 +1,7 @@ -/* NetHack 3.5 ntsound.c $Date$ $Revision$ */ -/* SCCS Id: @(#)ntsound.c 3.5 $Date$ */ +/* NetHack 3.5 ntsound.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 ntsound.c $Date: 2009/05/06 10:53:33 $ $Revision: 1.7 $ */ +/* SCCS Id: @(#)ntsound.c 3.5 $NHDT-Date$ */ +/* SCCS Id: @(#)ntsound.c 3.5 $Date: 2009/05/06 10:53:33 $ */ /* Copyright (c) NetHack PC Development Team 1993 */ /* NetHack may be freely redistributed. See license for details. */ /* */ diff --git a/sys/winnt/nttty.c b/sys/winnt/nttty.c index 39144e4ae..765d95142 100644 --- a/sys/winnt/nttty.c +++ b/sys/winnt/nttty.c @@ -1,5 +1,7 @@ -/* NetHack 3.5 nttty.c $Date$ $Revision$ */ -/* SCCS Id: @(#)nttty.c 3.5 $Date$ */ +/* NetHack 3.5 nttty.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 nttty.c $Date: 2009/05/06 10:53:34 $ $Revision: 1.54 $ */ +/* SCCS Id: @(#)nttty.c 3.5 $NHDT-Date$ */ +/* SCCS Id: @(#)nttty.c 3.5 $Date: 2009/05/06 10:53:34 $ */ /* Copyright (c) NetHack PC Development Team 1993 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/winnt/win32api.h b/sys/winnt/win32api.h index 84d040560..3ea9f0598 100644 --- a/sys/winnt/win32api.h +++ b/sys/winnt/win32api.h @@ -1,5 +1,7 @@ -/* NetHack 3.5 win32api.h $Date$ $Revision$ */ -/* SCCS Id: @(#)win32api.h 3.5 $Date$ */ +/* NetHack 3.5 win32api.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 win32api.h $Date: 2009/05/06 10:53:39 $ $Revision: 1.6 $ */ +/* SCCS Id: @(#)win32api.h 3.5 $NHDT-Date$ */ +/* SCCS Id: @(#)win32api.h 3.5 $Date: 2009/05/06 10:53:39 $ */ /* Copyright (c) NetHack PC Development Team 1996 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/winnt/winnt.c b/sys/winnt/winnt.c index 0817e4858..e63db103b 100644 --- a/sys/winnt/winnt.c +++ b/sys/winnt/winnt.c @@ -1,5 +1,7 @@ -/* NetHack 3.5 winnt.c $Date$ $Revision$ */ -/* SCCS Id: @(#)winnt.c 3.5 $Date$ */ +/* NetHack 3.5 winnt.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winnt.c $Date: 2012/01/15 19:11:41 $ $Revision: 1.18 $ */ +/* SCCS Id: @(#)winnt.c 3.5 $NHDT-Date$ */ +/* SCCS Id: @(#)winnt.c 3.5 $Date: 2012/01/15 19:11:41 $ */ /* Copyright (c) NetHack PC Development Team 1993, 1994 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/util/dgn_comp.l b/util/dgn_comp.l index 19e1546da..5841d0e7c 100644 --- a/util/dgn_comp.l +++ b/util/dgn_comp.l @@ -1,5 +1,6 @@ %{ -/* NetHack 3.5 dgn_comp.l $Date$ $Revision$ */ +/* NetHack 3.5 dgn_comp.l $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 dgn_comp.l $Date: 2009/05/06 10:54:26 $ $Revision: 1.7 $ */ /* SCCS Id: @(#)dgn_lex.c 3.5 2002/03/27 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* Copyright (c) 1990 by M. Stephenson */ diff --git a/util/dgn_comp.y b/util/dgn_comp.y index 83dbf78a5..eec4fa496 100644 --- a/util/dgn_comp.y +++ b/util/dgn_comp.y @@ -1,5 +1,6 @@ %{ -/* NetHack 3.5 dgn_comp.y $Date$ $Revision$ */ +/* NetHack 3.5 dgn_comp.y $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 dgn_comp.y $Date: 2009/05/06 10:54:26 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)dgn_comp.c 3.5 1996/06/22 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* Copyright (c) 1990 by M. Stephenson */ diff --git a/util/dgn_main.c b/util/dgn_main.c index 5d1cccb32..2544755c3 100644 --- a/util/dgn_main.c +++ b/util/dgn_main.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 dgn_main.c $Date$ $Revision$ */ +/* NetHack 3.5 dgn_main.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 dgn_main.c $Date: 2009/05/06 10:54:27 $ $Revision: 1.7 $ */ /* SCCS Id: @(#)dgn_main.c 3.5 1994/09/23 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* Copyright (c) 1990 by M. Stephenson */ diff --git a/util/dlb_main.c b/util/dlb_main.c index 8821139b3..17025570b 100644 --- a/util/dlb_main.c +++ b/util/dlb_main.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 dlb_main.c $Date$ $Revision$ */ +/* NetHack 3.5 dlb_main.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 dlb_main.c $Date: 2012/01/16 03:56:08 $ $Revision: 1.6 $ */ /* Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/util/lev_comp.l b/util/lev_comp.l index e3bd584d7..2b0ad5188 100644 --- a/util/lev_comp.l +++ b/util/lev_comp.l @@ -1,5 +1,6 @@ %{ -/* NetHack 3.5 lev_comp.l $Date$ $Revision$ */ +/* NetHack 3.5 lev_comp.l $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 lev_comp.l $Date: 2009/05/06 10:54:31 $ $Revision: 1.9 $ */ /* SCCS Id: @(#)lev_lex.c 3.5 2002/03/27 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/util/lev_comp.y b/util/lev_comp.y index 7cb7df25d..c2fe15fb6 100644 --- a/util/lev_comp.y +++ b/util/lev_comp.y @@ -1,5 +1,6 @@ %{ -/* NetHack 3.5 lev_comp.y $Date$ $Revision$ */ +/* NetHack 3.5 lev_comp.y $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 lev_comp.y $Date: 2009/05/06 10:54:31 $ $Revision: 1.8 $ */ /* SCCS Id: @(#)lev_yacc.c 3.5 2007/08/01 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/util/lev_main.c b/util/lev_main.c index 6cc9d4f35..d192e1e3e 100644 --- a/util/lev_main.c +++ b/util/lev_main.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 lev_main.c $Date$ $Revision$ */ +/* NetHack 3.5 lev_main.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 lev_main.c $Date: 2012/01/12 04:48:12 $ $Revision: 1.20 $ */ /* SCCS Id: @(#)lev_main.c 3.5 2007/01/17 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/util/makedefs.c b/util/makedefs.c index 1f8752893..d84e1c7ea 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 makedefs.c $Date$ $Revision$ */ +/* NetHack 3.5 makedefs.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 makedefs.c $Date: 2012/01/15 09:27:03 $ $Revision: 1.50 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) M. Stephenson, 1990, 1991. */ /* Copyright (c) Dean Luick, 1990. */ diff --git a/util/mdgrep.h b/util/mdgrep.h index a70e1d645..b2515aa86 100644 --- a/util/mdgrep.h +++ b/util/mdgrep.h @@ -1,5 +1,6 @@ /* - * NetHack 3.5 mdgrep.h $Date$ $Revision$ + * NetHack 3.5 mdgrep.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ + * NetHack 3.5 mdgrep.h $Date: 2010/05/01 20:57:17 $ $Revision: 1.5 $ * Copyright (c) Kenneth Lorber, Kensington, Maryland, 2008 * NetHack may be freely redistributed. See license for details. * diff --git a/util/mdgrep.pl b/util/mdgrep.pl index d291b1464..10038fdc7 100644 --- a/util/mdgrep.pl +++ b/util/mdgrep.pl @@ -1,5 +1,5 @@ #!perl -# NetHack 3.5 mdgrep.pl $NHDT-Date: 1423877528 2015/02/14 01:32:08 $ $NHDT-Revision: 1.7 $ +# NetHack 3.5 mdgrep.pl $NHDT-Date: 1423877528 2015/02/14 01:32:08 $ $NHDT-Branch$:$NHDT-Revision: 1.7 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland # NetHack may be freely redistributed. See license for details. @@ -56,6 +56,7 @@ $outfile = "mdgrep.h"; sub start_file { ($rev) = ('$NHDT-Revision: 1.7 $') =~ m/: (.*) .$/; my $date = '$NHDT-Date: 1423877529 2015/02/14 01:32:09 $'; + my $branch = '$NHDT-Branch$'; my $revision = '$NHDT-Revision: 1.7 $'; open(OUT, ">$outfile") || die "open $outfile: $!"; # NB: Date and Revision below will be modified when mdgrep.h is written to @@ -63,7 +64,7 @@ sub start_file { # before generating mdgrep.h and committing that file). print OUT < */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnaskstr.c b/win/gnome/gnaskstr.c index 652f1ddb6..eeeba31a2 100644 --- a/win/gnome/gnaskstr.c +++ b/win/gnome/gnaskstr.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnaskstr.c $Date$ $Revision$ */ +/* NetHack 3.5 gnaskstr.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnaskstr.c $Date: 2009/05/06 10:57:24 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)gnaskstr.c 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnaskstr.h b/win/gnome/gnaskstr.h index 16aeb7da8..056434adb 100644 --- a/win/gnome/gnaskstr.h +++ b/win/gnome/gnaskstr.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnaskstr.h $Date$ $Revision$ */ +/* NetHack 3.5 gnaskstr.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnaskstr.h $Date: 2009/05/06 10:57:24 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)gnaskstr.h 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnbind.c b/win/gnome/gnbind.c index 14b315392..c48535a26 100644 --- a/win/gnome/gnbind.c +++ b/win/gnome/gnbind.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnbind.c $Date$ $Revision$ */ +/* NetHack 3.5 gnbind.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnbind.c $Date: 2012/01/24 04:26:31 $ $Revision: 1.25 $ */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnbind.h b/win/gnome/gnbind.h index dc1bd5986..e7d9ad3c7 100644 --- a/win/gnome/gnbind.h +++ b/win/gnome/gnbind.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnbind.h $Date$ $Revision$ */ +/* NetHack 3.5 gnbind.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnbind.h $Date: 2012/01/24 04:26:31 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)gnbind.h 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnglyph.c b/win/gnome/gnglyph.c index c22a2f15b..b4c9547ec 100644 --- a/win/gnome/gnglyph.c +++ b/win/gnome/gnglyph.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnglyph.c $Date$ $Revision$ */ +/* NetHack 3.5 gnglyph.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnglyph.c $Date: 2009/05/06 10:57:29 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)gnglyph.c 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnglyph.h b/win/gnome/gnglyph.h index 9b49eff92..2f7ea032c 100644 --- a/win/gnome/gnglyph.h +++ b/win/gnome/gnglyph.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnglyph.h $Date$ $Revision$ */ +/* NetHack 3.5 gnglyph.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnglyph.h $Date: 2009/05/06 10:57:30 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)gnglyph.h 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnmain.c b/win/gnome/gnmain.c index 7f9a24a6b..45c55ef2f 100644 --- a/win/gnome/gnmain.c +++ b/win/gnome/gnmain.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnmain.c $Date$ $Revision$ */ +/* NetHack 3.5 gnmain.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnmain.c $Date: 2009/05/06 10:57:32 $ $Revision: 1.9 $ */ /* SCCS Id: @(#)gnmain.c 3.5 2008/01/30 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnmain.h b/win/gnome/gnmain.h index 8fd78fe3b..92d7f4bd6 100644 --- a/win/gnome/gnmain.h +++ b/win/gnome/gnmain.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnmain.h $Date$ $Revision$ */ +/* NetHack 3.5 gnmain.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnmain.h $Date: 2009/05/06 10:57:32 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)gnmain.h 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnmap.c b/win/gnome/gnmap.c index f5ea9d107..6f40505a3 100644 --- a/win/gnome/gnmap.c +++ b/win/gnome/gnmap.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnmap.c $Date$ $Revision$ */ +/* NetHack 3.5 gnmap.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnmap.c $Date: 2009/05/06 10:57:34 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)gnmap.c 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* Copyright (C) 1998 by Anthony Taylor */ diff --git a/win/gnome/gnmap.h b/win/gnome/gnmap.h index 31ed17c48..7a1fcd9fc 100644 --- a/win/gnome/gnmap.h +++ b/win/gnome/gnmap.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnmap.h $Date$ $Revision$ */ +/* NetHack 3.5 gnmap.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnmap.h $Date: 2009/05/06 10:57:35 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)gnmap.h 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnmenu.c b/win/gnome/gnmenu.c index 2b2ecb587..abe5ed6c1 100644 --- a/win/gnome/gnmenu.c +++ b/win/gnome/gnmenu.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnmenu.c $Date$ $Revision$ */ +/* NetHack 3.5 gnmenu.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnmenu.c $Date: 2009/05/06 10:57:36 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)gnmenu.c 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnmenu.h b/win/gnome/gnmenu.h index 88ed6bca9..6d243ad40 100644 --- a/win/gnome/gnmenu.h +++ b/win/gnome/gnmenu.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnmenu.h $Date$ $Revision$ */ +/* NetHack 3.5 gnmenu.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnmenu.h $Date: 2009/05/06 10:57:39 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)gnmenu.h 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnmesg.c b/win/gnome/gnmesg.c index b213fc819..ab75c0cd1 100644 --- a/win/gnome/gnmesg.c +++ b/win/gnome/gnmesg.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnmesg.c $Date$ $Revision$ */ +/* NetHack 3.5 gnmesg.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnmesg.c $Date: 2009/05/06 10:57:39 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)gnmesg.c 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnmesg.h b/win/gnome/gnmesg.h index 1c35d96cf..7ea0110e0 100644 --- a/win/gnome/gnmesg.h +++ b/win/gnome/gnmesg.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnmesg.h $Date$ $Revision$ */ +/* NetHack 3.5 gnmesg.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnmesg.h $Date: 2009/05/06 10:57:39 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)gnmesg.h 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnomeprv.h b/win/gnome/gnomeprv.h index ff3415b58..4062e87d0 100644 --- a/win/gnome/gnomeprv.h +++ b/win/gnome/gnomeprv.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnomeprv.h $Date$ $Revision$ */ +/* NetHack 3.5 gnomeprv.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnomeprv.h $Date: 2009/05/06 10:57:40 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)gnomeprv.h 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnopts.c b/win/gnome/gnopts.c index bbfe63ab6..9c68be769 100644 --- a/win/gnome/gnopts.c +++ b/win/gnome/gnopts.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnopts.c $Date$ $Revision$ */ +/* NetHack 3.5 gnopts.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnopts.c $Date: 2009/05/06 10:57:40 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)gnopts.c 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnopts.h b/win/gnome/gnopts.h index aad71618b..888ded2ba 100644 --- a/win/gnome/gnopts.h +++ b/win/gnome/gnopts.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnopts.h $Date$ $Revision$ */ +/* NetHack 3.5 gnopts.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnopts.h $Date: 2009/05/06 10:57:42 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)gnopts.h 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnplayer.c b/win/gnome/gnplayer.c index c0edf69de..cb0ba24e7 100644 --- a/win/gnome/gnplayer.c +++ b/win/gnome/gnplayer.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnplayer.c $Date$ $Revision$ */ +/* NetHack 3.5 gnplayer.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnplayer.c $Date: 2009/05/06 10:57:42 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)gnplayer.c 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnplayer.h b/win/gnome/gnplayer.h index 88b25e445..d30f44d28 100644 --- a/win/gnome/gnplayer.h +++ b/win/gnome/gnplayer.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnplayer.h $Date$ $Revision$ */ +/* NetHack 3.5 gnplayer.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnplayer.h $Date: 2009/05/06 10:57:44 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)gnplayer.h 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnsignal.c b/win/gnome/gnsignal.c index 8a8586b71..fc3b2b713 100644 --- a/win/gnome/gnsignal.c +++ b/win/gnome/gnsignal.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnsignal.c $Date$ $Revision$ */ +/* NetHack 3.5 gnsignal.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnsignal.c $Date: 2009/05/06 10:57:45 $ $Revision: 1.7 $ */ /* SCCS Id: @(#)gnsignal.c 3.5 2005/11/19 */ /* Copyright (C) 1998 by Anthony Taylor */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnsignal.h b/win/gnome/gnsignal.h index c1f7b08db..b35f4d0af 100644 --- a/win/gnome/gnsignal.h +++ b/win/gnome/gnsignal.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnsignal.h $Date$ $Revision$ */ +/* NetHack 3.5 gnsignal.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnsignal.h $Date: 2009/05/06 10:57:51 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)gnsignal.h 3.5 2000/07/16 */ /* Copyright (C) 1998 by Anthony Taylor */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnstatus.c b/win/gnome/gnstatus.c index 085d6b150..6e3841cc3 100644 --- a/win/gnome/gnstatus.c +++ b/win/gnome/gnstatus.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnstatus.c $Date$ $Revision$ */ +/* NetHack 3.5 gnstatus.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnstatus.c $Date: 2009/05/06 10:57:54 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)gnstatus.c 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnstatus.h b/win/gnome/gnstatus.h index 7746445f3..f6be02de0 100644 --- a/win/gnome/gnstatus.h +++ b/win/gnome/gnstatus.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnstatus.h $Date$ $Revision$ */ +/* NetHack 3.5 gnstatus.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnstatus.h $Date: 2009/05/06 10:57:57 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)gnstatus.h 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gntext.c b/win/gnome/gntext.c index 8bc6b6386..8f5734627 100644 --- a/win/gnome/gntext.c +++ b/win/gnome/gntext.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 gntext.c $Date$ $Revision$ */ +/* NetHack 3.5 gntext.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gntext.c $Date: 2009/05/06 10:58:00 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)gntext.c 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gntext.h b/win/gnome/gntext.h index 101c32bb4..934b4d05c 100644 --- a/win/gnome/gntext.h +++ b/win/gnome/gntext.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 gntext.h $Date$ $Revision$ */ +/* NetHack 3.5 gntext.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gntext.h $Date: 2009/05/06 10:58:03 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)gntext.h 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnyesno.c b/win/gnome/gnyesno.c index b53db8b9d..793663e44 100644 --- a/win/gnome/gnyesno.c +++ b/win/gnome/gnyesno.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnyesno.c $Date$ $Revision$ */ +/* NetHack 3.5 gnyesno.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnyesno.c $Date: 2009/05/06 10:58:06 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)gnyesno.c 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnyesno.h b/win/gnome/gnyesno.h index 2c2deb832..93979bf3c 100644 --- a/win/gnome/gnyesno.h +++ b/win/gnome/gnyesno.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnyesno.h $Date$ $Revision$ */ +/* NetHack 3.5 gnyesno.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnyesno.h $Date: 2009/05/06 10:58:08 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)gnyesno.h 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/macosx/NetHackGuidebook.applescript b/win/macosx/NetHackGuidebook.applescript index 0060b6d80..4310b1e43 100644 --- a/win/macosx/NetHackGuidebook.applescript +++ b/win/macosx/NetHackGuidebook.applescript @@ -1,5 +1,6 @@ #!/usr/bin/osascript -# NetHack 3.5.0 NetHackGuidebook.applescript $Date$ $Revision$ +# NetHack 3.5.0 NetHackGuidebook.applescript $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5.0 NetHackGuidebook.applescript $Date: 2011/10/17 01:29:20 $ $Revision: 1.2 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2011 # NetHack may be freely redistributed. See license for details. diff --git a/win/macosx/NetHackRecover.applescript b/win/macosx/NetHackRecover.applescript index 93d792208..50569656e 100644 --- a/win/macosx/NetHackRecover.applescript +++ b/win/macosx/NetHackRecover.applescript @@ -1,5 +1,6 @@ #!/usr/bin/osascript -# NetHack 3.5 NetHackRecover.applescript $Date$ $Revision$ +# NetHack 3.5 NetHackRecover.applescript $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 NetHackRecover.applescript $Date: 2011/10/17 01:29:20 $ $Revision: 1.3 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2009 # NetHack may be freely redistributed. See license for details. diff --git a/win/macosx/NetHackTerm.applescript b/win/macosx/NetHackTerm.applescript index 648128096..c8274ebc5 100644 --- a/win/macosx/NetHackTerm.applescript +++ b/win/macosx/NetHackTerm.applescript @@ -1,5 +1,6 @@ #!/usr/bin/osascript -# NetHack 3.5.0 NetHackTerm.applescript $Date$ $Revision$ +# NetHack 3.5.0 NetHackTerm.applescript $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5.0 NetHackTerm.applescript $Date: 2011/10/17 01:29:20 $ $Revision: 1.2 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2011 # NetHack may be freely redistributed. See license for details. diff --git a/win/macosx/recover.pl b/win/macosx/recover.pl old mode 100755 new mode 100644 index 65aa68dfc..95b299cf9 --- a/win/macosx/recover.pl +++ b/win/macosx/recover.pl @@ -1,6 +1,7 @@ #!/usr/bin/perl -# NetHack 3.5 recover.pl $Date$ $Revision$ +# NetHack 3.5 recover.pl $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 recover.pl $Date: 2011/10/17 01:29:20 $ $Revision: 1.3 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2009 # NetHack may be freely redistributed. See license for details. diff --git a/win/share/ppmwrite.c b/win/share/ppmwrite.c index c20e02c1e..32b98373f 100644 --- a/win/share/ppmwrite.c +++ b/win/share/ppmwrite.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 ppmwrite.c $Date$ $Revision$ */ +/* NetHack 3.5 ppmwrite.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 ppmwrite.c $Date: 2009/05/06 10:59:00 $ $Revision: 1.2 $ */ /* this produces a raw ppm file, with a 15-character header of * "P6 3-digit-width 3-digit-height 255\n" */ diff --git a/win/share/thintile.c b/win/share/thintile.c index 10ac899ed..def85c5af 100644 --- a/win/share/thintile.c +++ b/win/share/thintile.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 thintile.c $Date$ $Revision$ */ +/* NetHack 3.5 thintile.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 thintile.c $Date: 2012/01/10 17:47:40 $ $Revision: 1.5 $ */ /* Copyright (c) NetHack Development Team 1995 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/share/tile.doc b/win/share/tile.doc index c3b24e68f..7b776813c 100644 --- a/win/share/tile.doc +++ b/win/share/tile.doc @@ -1,4 +1,5 @@ -NetHack 3.5 tile.doc $Date$ $Revision$ +NetHack 3.5 tile.doc $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +NetHack 3.5 tile.doc $Date: 2009/05/06 10:59:00 $ $Revision: 1.2 $ Window ports can optionally make use of the tiles (pictures for NetHack symbols) found in this directory. They are distributed in a text format diff --git a/win/share/tile.h b/win/share/tile.h index e2249414f..037f7f95f 100644 --- a/win/share/tile.h +++ b/win/share/tile.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 tile.h $Date$ $Revision$ */ +/* NetHack 3.5 tile.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 tile.h $Date: 2009/05/06 21:59:39 $ $Revision: 1.6 $ */ typedef unsigned char pixval; typedef struct pixel_s { diff --git a/win/share/tile2bmp.c b/win/share/tile2bmp.c index 775c2ff68..fde808967 100644 --- a/win/share/tile2bmp.c +++ b/win/share/tile2bmp.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 tile2bmp.c $Date$ $Revision$ */ +/* NetHack 3.5 tile2bmp.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 tile2bmp.c $Date: 2009/05/06 10:59:00 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)tile2bmp.c 3.5 2002/03/14 */ /* Copyright (c) NetHack PC Development Team 1995 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/share/tilemap.c b/win/share/tilemap.c index ab118cad1..87423f49c 100644 --- a/win/share/tilemap.c +++ b/win/share/tilemap.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 tilemap.c $Date$ $Revision$ */ +/* NetHack 3.5 tilemap.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 tilemap.c $Date: 2009/05/06 10:59:02 $ $Revision: 1.7 $ */ /* SCCS Id: @(#)tilemap.c 3.5 2000/06/04 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/share/tiletext.c b/win/share/tiletext.c index f17716251..d8a9c41db 100644 --- a/win/share/tiletext.c +++ b/win/share/tiletext.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 tiletext.c $Date$ $Revision$ */ +/* NetHack 3.5 tiletext.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 tiletext.c $Date: 2009/05/06 10:59:03 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)tiletext.c 3.5 1999/10/24 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/tty/getline.c b/win/tty/getline.c index 60d97e7fe..6dfa10a6e 100644 --- a/win/tty/getline.c +++ b/win/tty/getline.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 getline.c $Date$ $Revision$ */ +/* NetHack 3.5 getline.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 getline.c $Date: 2011/12/11 01:54:56 $ $Revision: 1.18 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/tty/termcap.c b/win/tty/termcap.c index d3bd5d661..563491c48 100644 --- a/win/tty/termcap.c +++ b/win/tty/termcap.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 termcap.c $Date$ $Revision$ */ +/* NetHack 3.5 termcap.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 termcap.c $Date: 2009/05/06 10:59:19 $ $Revision: 1.13 $ */ /* SCCS Id: @(#)termcap.c 3.5 2007/12/12 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/tty/topl.c b/win/tty/topl.c index ed735f375..3efb52696 100644 --- a/win/tty/topl.c +++ b/win/tty/topl.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 topl.c $Date$ $Revision$ */ +/* NetHack 3.5 topl.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 topl.c $Date: 2012/01/23 06:29:37 $ $Revision: 1.24 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/tty/wintty.c b/win/tty/wintty.c index 1d56f49ad..12ec044b3 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 wintty.c $Date$ $Revision$ */ +/* NetHack 3.5 wintty.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 wintty.c $Date: 2012/01/22 06:27:09 $ $Revision: 1.66 $ */ /* Copyright (c) David Cohrs, 1991 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhaskyn.c b/win/win32/mhaskyn.c index a46e0f0ad..db682be28 100644 --- a/win/win32/mhaskyn.c +++ b/win/win32/mhaskyn.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhaskyn.c $Date$ $Revision$ */ +/* NetHack 3.5 mhaskyn.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhaskyn.c $Date: 2009/05/06 10:59:46 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)mhaskyn.c 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhaskyn.h b/win/win32/mhaskyn.h index cc91a02ec..5b0863b6e 100644 --- a/win/win32/mhaskyn.h +++ b/win/win32/mhaskyn.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhaskyn.h $Date$ $Revision$ */ +/* NetHack 3.5 mhaskyn.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhaskyn.h $Date: 2009/05/06 10:59:46 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)mhaskyn.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhdlg.c b/win/win32/mhdlg.c index e2c68833e..dbac91bc5 100644 --- a/win/win32/mhdlg.c +++ b/win/win32/mhdlg.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhdlg.c $Date$ $Revision$ */ +/* NetHack 3.5 mhdlg.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhdlg.c $Date: 2012/01/11 01:45:02 $ $Revision: 1.18 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhdlg.h b/win/win32/mhdlg.h index 608810bc0..2c726ce9a 100644 --- a/win/win32/mhdlg.h +++ b/win/win32/mhdlg.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhdlg.h $Date$ $Revision$ */ +/* NetHack 3.5 mhdlg.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhdlg.h $Date: 2012/01/11 01:15:36 $ $Revision: 1.5 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhfont.c b/win/win32/mhfont.c index 23ae7770e..cfbec944e 100644 --- a/win/win32/mhfont.c +++ b/win/win32/mhfont.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhfont.c $Date$ $Revision$ */ +/* NetHack 3.5 mhfont.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhfont.c $Date: 2009/05/06 10:59:46 $ $Revision: 1.17 $ */ /* SCCS Id: @(#)mhfont.c 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhfont.h b/win/win32/mhfont.h index 9017da9d7..f097b9e38 100644 --- a/win/win32/mhfont.h +++ b/win/win32/mhfont.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhfont.h $Date$ $Revision$ */ +/* NetHack 3.5 mhfont.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhfont.h $Date: 2009/05/06 10:59:46 $ $Revision: 1.8 $ */ /* SCCS Id: @(#)mhfont.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhinput.c b/win/win32/mhinput.c index 99789fb14..92ea84364 100644 --- a/win/win32/mhinput.c +++ b/win/win32/mhinput.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhinput.c $Date$ $Revision$ */ +/* NetHack 3.5 mhinput.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhinput.c $Date: 2009/05/06 10:59:48 $ $Revision: 1.7 $ */ /* SCCS Id: @(#)mhinput.c 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhinput.h b/win/win32/mhinput.h index 75ce3639d..d06c7b8f9 100644 --- a/win/win32/mhinput.h +++ b/win/win32/mhinput.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhinput.h $Date$ $Revision$ */ +/* NetHack 3.5 mhinput.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhinput.h $Date: 2009/05/06 10:59:49 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)mhinput.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhmain.c b/win/win32/mhmain.c index 8473f498b..b8a2dac10 100644 --- a/win/win32/mhmain.c +++ b/win/win32/mhmain.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhmain.c $Date$ $Revision$ */ +/* NetHack 3.5 mhmain.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhmain.c $Date: 2012/01/11 01:53:44 $ $Revision: 1.49 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhmain.h b/win/win32/mhmain.h index bd5cebd76..7a6593d5e 100644 --- a/win/win32/mhmain.h +++ b/win/win32/mhmain.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhmain.h $Date$ $Revision$ */ +/* NetHack 3.5 mhmain.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhmain.h $Date: 2009/05/06 10:59:52 $ $Revision: 1.10 $ */ /* SCCS Id: @(#)mhmain.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhmap.c b/win/win32/mhmap.c index c4ac00b03..ff1a43fb1 100644 --- a/win/win32/mhmap.c +++ b/win/win32/mhmap.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhmap.c $Date$ $Revision$ */ +/* NetHack 3.5 mhmap.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhmap.c $Date: 2012/01/11 01:45:02 $ $Revision: 1.37 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhmap.h b/win/win32/mhmap.h index 23be87fa6..54a614730 100644 --- a/win/win32/mhmap.h +++ b/win/win32/mhmap.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhmap.h $Date$ $Revision$ */ +/* NetHack 3.5 mhmap.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhmap.h $Date: 2009/05/06 10:59:56 $ $Revision: 1.10 $ */ /* SCCS Id: @(#)mhmap.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhmenu.c b/win/win32/mhmenu.c index 181caa446..e39470dc1 100644 --- a/win/win32/mhmenu.c +++ b/win/win32/mhmenu.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhmenu.c $Date$ $Revision$ */ +/* NetHack 3.5 mhmenu.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhmenu.c $Date: 2012/01/11 01:53:44 $ $Revision: 1.36 $ */ /* Copyright (c) Alex Kompel, 2002 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhmenu.h b/win/win32/mhmenu.h index 258c457eb..658a94a5b 100644 --- a/win/win32/mhmenu.h +++ b/win/win32/mhmenu.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhmenu.h $Date$ $Revision$ */ +/* NetHack 3.5 mhmenu.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhmenu.h $Date: 2009/05/06 11:00:00 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)mhmenu.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhmsg.h b/win/win32/mhmsg.h index 42a012ed2..8030b4391 100644 --- a/win/win32/mhmsg.h +++ b/win/win32/mhmsg.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhmsg.h $Date$ $Revision$ */ +/* NetHack 3.5 mhmsg.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhmsg.h $Date: 2009/05/06 11:00:00 $ $Revision: 1.9 $ */ /* SCCS Id: @(#)mhmsg.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhmsgwnd.c b/win/win32/mhmsgwnd.c index 3266ae071..a1ca24ba3 100644 --- a/win/win32/mhmsgwnd.c +++ b/win/win32/mhmsgwnd.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhmsgwnd.c $Date$ $Revision$ */ +/* NetHack 3.5 mhmsgwnd.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhmsgwnd.c $Date: 2012/01/11 01:45:02 $ $Revision: 1.25 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhmsgwnd.h b/win/win32/mhmsgwnd.h index d3513c97c..68ca53baf 100644 --- a/win/win32/mhmsgwnd.h +++ b/win/win32/mhmsgwnd.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhmsgwnd.h $Date$ $Revision$ */ +/* NetHack 3.5 mhmsgwnd.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhmsgwnd.h $Date: 2009/05/06 11:00:10 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)mhmsgwnd.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhrip.c b/win/win32/mhrip.c index bdae4c45f..87ac9d9b8 100644 --- a/win/win32/mhrip.c +++ b/win/win32/mhrip.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhrip.c $Date$ $Revision$ */ +/* NetHack 3.5 mhrip.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhrip.c $Date: 2012/01/11 01:45:02 $ $Revision: 1.13 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhrip.h b/win/win32/mhrip.h index c05542dfd..4c2927c2c 100644 --- a/win/win32/mhrip.h +++ b/win/win32/mhrip.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhrip.h $Date$ $Revision$ */ +/* NetHack 3.5 mhrip.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhrip.h $Date: 2009/05/06 11:00:15 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)mhrip.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhsplash.c b/win/win32/mhsplash.c index 63ec10d88..fe14ff256 100644 --- a/win/win32/mhsplash.c +++ b/win/win32/mhsplash.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhsplash.c $Date$ $Revision$ */ +/* NetHack 3.5 mhsplash.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhsplash.c $Date: 2012/01/11 01:15:37 $ $Revision: 1.17 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhstatus.c b/win/win32/mhstatus.c index 2900e52f9..1ce6043ef 100644 --- a/win/win32/mhstatus.c +++ b/win/win32/mhstatus.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhstatus.c $Date$ $Revision$ */ +/* NetHack 3.5 mhstatus.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhstatus.c $Date: 2012/01/11 01:45:02 $ $Revision: 1.14 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhstatus.h b/win/win32/mhstatus.h index 5455a9505..273db526f 100644 --- a/win/win32/mhstatus.h +++ b/win/win32/mhstatus.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhstatus.h $Date$ $Revision$ */ +/* NetHack 3.5 mhstatus.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhstatus.h $Date: 2009/05/06 11:00:19 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)mhstatus.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhtext.c b/win/win32/mhtext.c index 2c16f0c2d..4925b8b72 100644 --- a/win/win32/mhtext.c +++ b/win/win32/mhtext.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhtext.c $Date$ $Revision$ */ +/* NetHack 3.5 mhtext.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhtext.c $Date: 2012/01/11 01:53:44 $ $Revision: 1.17 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhtext.h b/win/win32/mhtext.h index 21439f052..3cda167db 100644 --- a/win/win32/mhtext.h +++ b/win/win32/mhtext.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhtext.h $Date$ $Revision$ */ +/* NetHack 3.5 mhtext.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhtext.h $Date: 2009/05/06 11:00:26 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)mhtext.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mswproc.c b/win/win32/mswproc.c index 3dd2a5528..11b109067 100644 --- a/win/win32/mswproc.c +++ b/win/win32/mswproc.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mswproc.c $Date$ $Revision$ */ +/* NetHack 3.5 mswproc.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mswproc.c $Date: 2012/01/24 04:26:33 $ $Revision: 1.71 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/winMS.h b/win/win32/winMS.h index 1e1352670..5b08c8a34 100644 --- a/win/win32/winMS.h +++ b/win/win32/winMS.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 winMS.h $Date$ $Revision$ */ +/* NetHack 3.5 winMS.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winMS.h $Date: 2012/01/24 04:26:33 $ $Revision: 1.28 $ */ /* SCCS Id: @(#)winMS.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/winhack.c b/win/win32/winhack.c index 7134ef902..dd0f6c14a 100644 --- a/win/win32/winhack.c +++ b/win/win32/winhack.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 winhack.c $Date$ $Revision$ */ +/* NetHack 3.5 winhack.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winhack.c $Date: 2009/05/06 11:00:43 $ $Revision: 1.32 $ */ /* SCCS Id: @(#)winhack.c 3.5 2006/04/01 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ From 971ff1d4f3cc768bf9af430b35f1f5491719707d Mon Sep 17 00:00:00 2001 From: keni Date: Thu, 26 Feb 2015 09:22:52 -0500 Subject: [PATCH 021/132] Fix lost mode bits. --- sys/msdos/setup.bat | 0 sys/unix/hints/macosx.sh | 0 sys/unix/mkmkfile.sh | 0 sys/unix/nethack.sh | 0 sys/unix/setup.sh | 0 sys/wince/cesetup.bat | 0 sys/winnt/nhsetup.bat | 0 win/macosx/recover.pl | 0 8 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 sys/msdos/setup.bat mode change 100644 => 100755 sys/unix/hints/macosx.sh mode change 100644 => 100755 sys/unix/mkmkfile.sh mode change 100644 => 100755 sys/unix/nethack.sh mode change 100644 => 100755 sys/unix/setup.sh mode change 100644 => 100755 sys/wince/cesetup.bat mode change 100644 => 100755 sys/winnt/nhsetup.bat mode change 100644 => 100755 win/macosx/recover.pl diff --git a/sys/msdos/setup.bat b/sys/msdos/setup.bat old mode 100644 new mode 100755 diff --git a/sys/unix/hints/macosx.sh b/sys/unix/hints/macosx.sh old mode 100644 new mode 100755 diff --git a/sys/unix/mkmkfile.sh b/sys/unix/mkmkfile.sh old mode 100644 new mode 100755 diff --git a/sys/unix/nethack.sh b/sys/unix/nethack.sh old mode 100644 new mode 100755 diff --git a/sys/unix/setup.sh b/sys/unix/setup.sh old mode 100644 new mode 100755 diff --git a/sys/wince/cesetup.bat b/sys/wince/cesetup.bat old mode 100644 new mode 100755 diff --git a/sys/winnt/nhsetup.bat b/sys/winnt/nhsetup.bat old mode 100644 new mode 100755 diff --git a/win/macosx/recover.pl b/win/macosx/recover.pl old mode 100644 new mode 100755 From b598c83767743bd92986059907f10b8c0d7185a9 Mon Sep 17 00:00:00 2001 From: keni Date: Thu, 26 Feb 2015 16:35:55 -0500 Subject: [PATCH 022/132] Update .gitignore files. --- doc/.gitignore | 1 + util/.gitignore | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 doc/.gitignore diff --git a/doc/.gitignore b/doc/.gitignore new file mode 100644 index 000000000..7bdb35836 --- /dev/null +++ b/doc/.gitignore @@ -0,0 +1 @@ +Guidebook diff --git a/util/.gitignore b/util/.gitignore index 43e9f40df..98b003527 100644 --- a/util/.gitignore +++ b/util/.gitignore @@ -8,3 +8,5 @@ lev_yacc.c tile2x11 lev_comp tileedit +dlb +recover From 0109f9715b2e56377a1d52e3a7212d2f613ca458 Mon Sep 17 00:00:00 2001 From: keni Date: Thu, 26 Feb 2015 17:10:11 -0500 Subject: [PATCH 023/132] A batch of manual header var additions. --- win/Qt/Install.Qt | 2 ++ win/X11/Install.X11 | 2 ++ win/X11/NetHack.ad | 3 +++ win/X11/dialogs.c | 3 +++ win/X11/nethack.rc | 2 ++ win/X11/tile2x11.c | 3 +++ win/share/gifread.c | 4 ++++ win/win32/dgnstuff.mak | 3 +++ win/win32/levstuff.mak | 2 ++ win/win32/mhsplash.h | 4 ++++ win/win32/tiles.mak | 3 +++ 11 files changed, 31 insertions(+) diff --git a/win/Qt/Install.Qt b/win/Qt/Install.Qt index bb204568d..28de2c431 100644 --- a/win/Qt/Install.Qt +++ b/win/Qt/Install.Qt @@ -1,5 +1,7 @@ Installing NetHack with a Qt or KDE interface --------------------------------------------- +$NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +$Date: 2004/07/01 18:21:51 $ $Revision: 1.7 $ This document describes the installation of NetHack with a Qt interface on UNIX/X11 or Mac OS X. This code should also work with Qt/Windows, but diff --git a/win/X11/Install.X11 b/win/X11/Install.X11 index f26cbb72f..4473616bc 100644 --- a/win/X11/Install.X11 +++ b/win/X11/Install.X11 @@ -1,3 +1,5 @@ +$NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +$Date: 2007/12/13 20:17:11 $ $Revision: 1.6 $ This document describes the installation of NetHack with an X11 interface. diff --git a/win/X11/NetHack.ad b/win/X11/NetHack.ad index f6f43be27..e6bff9721 100644 --- a/win/X11/NetHack.ad +++ b/win/X11/NetHack.ad @@ -1,3 +1,6 @@ +! $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +! $Date: 2003/10/03 02:09:25 $ $Revision: 1.5 $ + ! The display_file, tombstone, and menu windows are all formatted assuming ! a fixed width font. Text windows may or may not be formatted as above. ! The rip window applies if the GRAPHIC_TOMBSTONE option is turned on, and diff --git a/win/X11/dialogs.c b/win/X11/dialogs.c index a887ef0c7..21552921d 100644 --- a/win/X11/dialogs.c +++ b/win/X11/dialogs.c @@ -39,6 +39,9 @@ * + Added workaround for SYSV include problem. * + Changed the default width response text widget to be as wide as the * window itself. Suggestion from David E. Wexelblat, dwex@goblin.org. + * + * $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ + * $Date: 2002/03/31 17:11:23 $ $Revision: 1.2 $ */ #ifndef SYSV diff --git a/win/X11/nethack.rc b/win/X11/nethack.rc index e0124f325..18fa2ac8d 100644 --- a/win/X11/nethack.rc +++ b/win/X11/nethack.rc @@ -1,5 +1,7 @@ # # Nethack configuration file. +# $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# $Date: 2007/12/13 20:17:11 $ $Revision: 1.2 $ # # Naming this file $(HOME)/.nethackrc (for UNIX) or setting the environment # variable NETHACKOPTIONS to point to its full path name elsewhere tells diff --git a/win/X11/tile2x11.c b/win/X11/tile2x11.c index a2542135d..ebfd3bd9b 100644 --- a/win/X11/tile2x11.c +++ b/win/X11/tile2x11.c @@ -1,6 +1,9 @@ /* * Convert the given input files into an output file that is expected * by nethack. + * + * $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ + * $Date: 2002/03/17 20:02:47 $ $Revision: 1.2 $ * * Assumptions: * + Two dimensional byte arrays are in row order and are not padded diff --git a/win/share/gifread.c b/win/share/gifread.c index 9757227ea..824393af9 100644 --- a/win/share/gifread.c +++ b/win/share/gifread.c @@ -12,6 +12,10 @@ /* | provided "as is" without express or implied warranty. | */ /* +-------------------------------------------------------------------+ */ +/* + * $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ + * $Date: 2002/01/05 21:06:02 $ $Revision: 1.1 $ + */ #include "config.h" #include "tile.h" diff --git a/win/win32/dgnstuff.mak b/win/win32/dgnstuff.mak index 8e5aa81fa..a23aadfd8 100644 --- a/win/win32/dgnstuff.mak +++ b/win/win32/dgnstuff.mak @@ -1,3 +1,6 @@ +# $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# $Date: 2002/01/22 22:54:54 $ $Revision: 1.3 $ + #Set all of these or none of them #YACC = byacc.exe #LEX = flex.exe diff --git a/win/win32/levstuff.mak b/win/win32/levstuff.mak index c7540c4bd..cf749c6ce 100644 --- a/win/win32/levstuff.mak +++ b/win/win32/levstuff.mak @@ -1,3 +1,5 @@ +# $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# $Date:2002/01/22 22:54:54 $ $Revision: 1.2 $ #YACC = byacc.exe #LEX = flex.exe #YTABC = y_tab.c diff --git a/win/win32/mhsplash.h b/win/win32/mhsplash.h index da6143c54..7d8ab4eb4 100644 --- a/win/win32/mhsplash.h +++ b/win/win32/mhsplash.h @@ -1,5 +1,9 @@ /* Copyright (C) 2002 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ +/* +$NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +$Date: 2003/03/03 23:31:36 $ $Revision: 1.3 $ +*/ #ifndef MSWINSplashWindow_h #define MSWINSplashWindow_h diff --git a/win/win32/tiles.mak b/win/win32/tiles.mak index 26af1eada..0e76e1c53 100644 --- a/win/win32/tiles.mak +++ b/win/win32/tiles.mak @@ -1,3 +1,6 @@ +#$NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +#$Date: 2002/01/18 12:55:00 $ $Revision: 1.1 $ + default: all all: ..\win\win32\tiles.bmp From 7d9ea49e929da5966c62d7724d6673b1355c687a Mon Sep 17 00:00:00 2001 From: keni Date: Thu, 26 Feb 2015 17:43:47 -0500 Subject: [PATCH 024/132] Another batch of manual header var additions --- sys/share/NetHack.cnf | 3 +++ sys/share/random.c | 3 +++ sys/share/uudecode.c | 2 ++ sys/unix/README.linux | 3 +++ sys/unix/depend.awk | 2 ++ sys/vms/install.com | 3 +++ sys/vms/nethack.com | 3 +++ sys/vms/spec_lev.com | 3 +++ sys/vms/vmsbuild.com | 2 ++ sys/wince/mhmenu.h | 4 ++++ sys/wince/winmain.c | 3 +++ sys/winnt/defaults.nh | 3 +++ win/gem/Install.gem | 3 +++ win/gem/bitmfile.c | 4 ++++ win/gem/gr_rect.h | 4 ++++ win/gem/load_img.c | 4 ++++ win/gnome/gnworn.c | 4 ++++ win/gnome/gnworn.h | 4 ++++ 18 files changed, 57 insertions(+) diff --git a/sys/share/NetHack.cnf b/sys/share/NetHack.cnf index 9b30b0b4d..29d8ce910 100644 --- a/sys/share/NetHack.cnf +++ b/sys/share/NetHack.cnf @@ -1,6 +1,9 @@ # NetHack Copyright (c) NetHack PC Development Team 1993 - 2006 # NetHack may be freely redistributed. See license for details. # +# $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# $Date: 2006/09/23 04:40:09 $ $Revision: 1.7 $ +# # A '#' at the beginning of a line means the rest of the line is a comment. # # Some options MUST be set in this file, other options can be toggled while diff --git a/sys/share/random.c b/sys/share/random.c index 6905f48aa..ba1937bb4 100644 --- a/sys/share/random.c +++ b/sys/share/random.c @@ -32,6 +32,9 @@ * - remove useless variable `j' from srandom() * - cast result of pointer subtraction to long since ptrdiff_t could * be bigger than that and trigger warnings when assigning to long + * + * $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ + * $Date: 2007/12/23 00:59:25 $ $Revision: 1.2 $ */ #include "hack.h" diff --git a/sys/share/uudecode.c b/sys/share/uudecode.c index 8da6e714f..440bcaf14 100644 --- a/sys/share/uudecode.c +++ b/sys/share/uudecode.c @@ -41,6 +41,8 @@ * Modified 08 July 2006 to cast strlen() result to int to suppress a * warning on platforms where size_t > sizeof(int). * + * $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ + * $Date: 2006/07/09 16:42:21 $ $Revision: 1.4 $ */ #ifndef lint diff --git a/sys/unix/README.linux b/sys/unix/README.linux index e214f423d..e79359392 100644 --- a/sys/unix/README.linux +++ b/sys/unix/README.linux @@ -1,5 +1,8 @@ NetHack 3.5.0 Linux Elf +$NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +$Date: 2005/01/02 17:17:28 $ $Revision: 1.16 $ + This README provides the instructions for using the official Linux binary, system platform requirements, as well as steps used to create that binary. The same steps can be used from the source distribution to create a similar diff --git a/sys/unix/depend.awk b/sys/unix/depend.awk index 47d107325..f78e24484 100644 --- a/sys/unix/depend.awk +++ b/sys/unix/depend.awk @@ -1,5 +1,7 @@ # depend.awk -- awk script used to construct makefile dependencies # for nethack's source files (`make depend' support for Makefile.src). +# $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# $Date: 2005/12/15 03:42:52 $ $Revision: 1.3 $ # # usage: # cd src ; nawk -f depend.awk ../include/*.h list-of-.c/.cpp-files diff --git a/sys/vms/install.com b/sys/vms/install.com index aec87fe05..3cf0fc590 100755 --- a/sys/vms/install.com +++ b/sys/vms/install.com @@ -1,5 +1,8 @@ $ ! vms/install.com -- set up nethack 'playground' $ ! +$ ! $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +$ ! $Date: 2006/09/23 04:45:56 $ $Revision: 1.4 $ +$ ! $ ! Use vmsbuild.com to create nethack.exe, makedefs, and lev_comp *first*. $ ! $ ! Edit this file to define gamedir & gameuic, or else invoke it with two diff --git a/sys/vms/nethack.com b/sys/vms/nethack.com index 164852f6c..93c76be11 100755 --- a/sys/vms/nethack.com +++ b/sys/vms/nethack.com @@ -1,6 +1,9 @@ $! NetHack.Com -- sample command procedure for invoking NetHack 9-JAN-1993 $ v = 'f$verify(0)' $! +$! $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +$! $Date: 2002/01/05 21:06:00 $ $Revision: 1.1 $ +$! $! Possible command line arguments include $! "-uConan-B" !play a barbarian named Conan $! "-u" "Merlin-W" !play a wizard named Merlin (slight variant of above) diff --git a/sys/vms/spec_lev.com b/sys/vms/spec_lev.com index 9076933c2..fc680b572 100755 --- a/sys/vms/spec_lev.com +++ b/sys/vms/spec_lev.com @@ -1,5 +1,8 @@ $ ! sys/vms/spec_lev.com -- preprocess nethack's special level compiler code $ ! +$ ! $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +$ ! $Date: 2002/01/05 21:06:00 $ $Revision: 1.1 $ +$ ! $ ! This operation needs to be performed prior to executing vmsbuild.com. $ ! Process the scanning and parsing code for NetHack's special level $ ! and dungeon compilers. *.l and *.y are converted into *'.c and *.h. diff --git a/sys/vms/vmsbuild.com b/sys/vms/vmsbuild.com index 20b4f01f4..b754601a5 100755 --- a/sys/vms/vmsbuild.com +++ b/sys/vms/vmsbuild.com @@ -1,5 +1,7 @@ $ ! vms/vmsbuild.com -- compile and link NetHack 3.5.* [pr] $ version_number = "3.5.0" +$ ! $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +$ ! $Date: 2011/05/23 03:27:10 $ $Revision: 1.8 $ $ ! $ ! usage: $ ! $ set default [.src] !or [-.-.src] if starting from [.sys.vms] diff --git a/sys/wince/mhmenu.h b/sys/wince/mhmenu.h index 15c4759ac..e1ec643f5 100644 --- a/sys/wince/mhmenu.h +++ b/sys/wince/mhmenu.h @@ -1,4 +1,8 @@ /* NetHack may be freely redistributed. See license for details. */ +/* + * $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ + * $Date: 2002/07/22 03:19:13 $ $Revision: 1.1 $ + */ #ifndef MSWINMenuWindow_h #define MSWINMenuWindow_h diff --git a/sys/wince/winmain.c b/sys/wince/winmain.c index 0bb3d67b9..1d1a29a4b 100644 --- a/sys/wince/winmain.c +++ b/sys/wince/winmain.c @@ -1,4 +1,7 @@ // winmain.cpp : Defines the entry point for the application. +// +// $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +// $Date: 2002/12/18 03:51:34 $ $Revision: 1.2 $ #include "winMS.h" #include diff --git a/sys/winnt/defaults.nh b/sys/winnt/defaults.nh index 425edbf69..9de67ee85 100644 --- a/sys/winnt/defaults.nh +++ b/sys/winnt/defaults.nh @@ -6,6 +6,9 @@ # # To change the configuration, comment out the unwanted lines, and # uncomment the configuration you want. +# +# $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# $Date: 2006/09/23 04:40:15 $ $Revision: 1.16 $ # *** OPTIONS *** # diff --git a/win/gem/Install.gem b/win/gem/Install.gem index 3880fe0dc..38c5740dd 100644 --- a/win/gem/Install.gem +++ b/win/gem/Install.gem @@ -1,3 +1,6 @@ +$NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +$Date: 2005/01/02 17:20:12 $ $Revision: 1.4 $ + Hi, This is nethack3.5.0 for Atari Gem and tty diff --git a/win/gem/bitmfile.c b/win/gem/bitmfile.c index 13e0073a9..fe6ccf5f4 100644 --- a/win/gem/bitmfile.c +++ b/win/gem/bitmfile.c @@ -7,6 +7,10 @@ * Bieber, Dez. 1994 * * -> Programmcode * \****************************/ +/* + * $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ + * $Date: 2002/01/05 21:06:00 $ $Revision: 1.1 $ + */ #include #include diff --git a/win/gem/gr_rect.h b/win/gem/gr_rect.h index 0e4a0bdc8..3927340f6 100644 --- a/win/gem/gr_rect.h +++ b/win/gem/gr_rect.h @@ -1,4 +1,8 @@ /* gr_rect.h */ +/* + * $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ + * $Date: 2002/03/20 03:50:49 $ $Revision: 1.1 $ + */ #include /********** structs **********/ typedef struct { diff --git a/win/gem/load_img.c b/win/gem/load_img.c index 16d8fe82c..fe995d6f5 100644 --- a/win/gem/load_img.c +++ b/win/gem/load_img.c @@ -1,3 +1,7 @@ +/* + * $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ + * $Date: 2002/03/20 03:45:03 $ $Revision: 1.2 $ + */ #define __TCC_COMPAT__ #include #include diff --git a/win/gnome/gnworn.c b/win/gnome/gnworn.c index dce035a94..20a8aa641 100644 --- a/win/gnome/gnworn.c +++ b/win/gnome/gnworn.c @@ -1,4 +1,8 @@ /* NetHack 3.5 gnworn.c 2009/05/06 10:58:06 1.3 */ +/* + * $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ + * $Date: 2012/01/10 17:47:38 $ $Revision: 1.4 $ + */ /* Copyright (C) 2002, Dylan Alex Simon */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnworn.h b/win/gnome/gnworn.h index db5169508..14e1a4fc9 100644 --- a/win/gnome/gnworn.h +++ b/win/gnome/gnworn.h @@ -1,4 +1,8 @@ /* NetHack 3.5 gnworn.h 2009/05/06 10:58:06 1.3 */ +/* + * $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ + * $Date: 2012/01/10 17:47:38 $ $Revision: 1.4 $ + */ /* Copyright (C) 2002 by Dylan Alex Simon */ /* NetHack may be freely redistributed. See license for details. */ From 264dc66129eba8a2759884f9f264ccc5cda98f87 Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Fri, 13 Feb 2015 16:58:59 -0500 Subject: [PATCH 025/132] Make ELBERETH unconditional. --- dat/oracles.txt | 2 +- include/config.h | 2 -- include/extern.h | 2 -- include/you.h | 2 -- src/cmd.c | 2 -- src/engrave.c | 2 -- src/monmove.c | 2 -- src/pray.c | 8 -------- src/u_init.c | 4 ---- util/makedefs.c | 17 ++++------------- 10 files changed, 5 insertions(+), 38 deletions(-) diff --git a/dat/oracles.txt b/dat/oracles.txt index bee2b4b30..d307c7a9f 100644 --- a/dat/oracles.txt +++ b/dat/oracles.txt @@ -96,7 +96,7 @@ The gods are said to be pleased when offerings are given to the priests who attend their temples, and they may grant various favors to those who do so. But beware! To be young and frugal is better than to be old and miserly. ------ ELBERETH +----- The name of Elbereth may strike fear into the hearts of thine enemies, if thou dost write it upon the ground at thy feet. If thou maintainest the utmost calm, thy safety will be aided greatly, but beware lest thy clumsy diff --git a/include/config.h b/include/config.h index 6db03c2c0..b1e69992c 100644 --- a/include/config.h +++ b/include/config.h @@ -427,8 +427,6 @@ typedef unsigned char uchar; #define SEDUCE /* Succubi/incubi seduction, by KAA, suggested by IM */ #define STEED /* Riding steeds */ #define TOURIST /* Tourist players with cameras and Hawaiian shirts */ -/* difficulty */ -#define ELBERETH /* Engraving the E-word repels monsters */ /* I/O */ #define REDO /* support for redoing last command - DGK */ #if !defined(MAC) diff --git a/include/extern.h b/include/extern.h index ac5fdb1ec..216b94e6f 100644 --- a/include/extern.h +++ b/include/extern.h @@ -670,9 +670,7 @@ E void FDECL(cant_reach_floor, (int,int,BOOLEAN_P,BOOLEAN_P)); E const char *FDECL(surface, (int,int)); E const char *FDECL(ceiling, (int,int)); E struct engr *FDECL(engr_at, (XCHAR_P,XCHAR_P)); -#ifdef ELBERETH E int FDECL(sengr_at, (const char *,XCHAR_P,XCHAR_P)); -#endif E void FDECL(u_wipe_engr, (int)); E void FDECL(wipe_engr_at, (XCHAR_P,XCHAR_P,XCHAR_P)); E void FDECL(read_engr_at, (int,int)); diff --git a/include/you.h b/include/you.h index 50798acdb..b316abcf7 100644 --- a/include/you.h +++ b/include/you.h @@ -47,9 +47,7 @@ struct u_event { Bitfield(invoked,1); /* invoked Gate to the Sanctum level */ Bitfield(gehennom_entered,1); /* entered Gehennom via Valley */ -#ifdef ELBERETH Bitfield(uhand_of_elbereth,2); /* became Hand of Elbereth */ -#endif Bitfield(udemigod,1); /* killed the wiz */ Bitfield(uvibrated,1); /* stepped on "vibrating square" */ Bitfield(ascended,1); /* has offered the Amulet */ diff --git a/src/cmd.c b/src/cmd.c index eae24508c..3c8eff341 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -1785,7 +1785,6 @@ int final; putstr(en_win, 0, ""); putstr(en_win, 0, final ? "Final Attributes:" : "Current Attributes:"); -#ifdef ELBERETH if (u.uevent.uhand_of_elbereth) { static const char * const hofe_titles[3] = { "the Hand of Elbereth", @@ -1794,7 +1793,6 @@ int final; }; you_are(hofe_titles[u.uevent.uhand_of_elbereth - 1],""); } -#endif /* note: piousness 20 matches MIN_QUEST_ALIGN (quest.h) */ if (u.ualign.record >= 20) you_are("piously aligned",""); diff --git a/src/engrave.c b/src/engrave.c index c4bdd4496..4af701654 100644 --- a/src/engrave.c +++ b/src/engrave.c @@ -244,7 +244,6 @@ xchar x, y; return((struct engr *) 0); } -#ifdef ELBERETH /* Decide whether a particular string is engraved at a specified * location; a case-insensitive substring match used. * Ignore headstones, in case the player names herself "Elbereth". @@ -259,7 +258,6 @@ sengr_at(s, x, y) return (ep && ep->engr_type != HEADSTONE && ep->engr_time <= moves && strstri(ep->engr_txt, s) != 0); } -#endif /* ELBERETH */ void u_wipe_engr(cnt) diff --git a/src/monmove.c b/src/monmove.c index 4b6ffc26f..a7e0da3d2 100644 --- a/src/monmove.c +++ b/src/monmove.c @@ -122,9 +122,7 @@ struct monst *mtmp; return(FALSE); return (boolean)(sobj_at(SCR_SCARE_MONSTER, x, y) || -#ifdef ELBERETH sengr_at("Elbereth", x, y) || -#endif (IS_ALTAR(levl[x][y].typ) && (mtmp->data->mlet == S_VAMPIRE || is_vampshifter(mtmp)))); diff --git a/src/pray.c b/src/pray.c index a6bd75ba4..602abee59 100644 --- a/src/pray.c +++ b/src/pray.c @@ -11,9 +11,7 @@ STATIC_DCL int NDECL(in_trouble); STATIC_DCL void FDECL(fix_worst_trouble,(int)); STATIC_DCL void FDECL(angrygods,(ALIGNTYP_P)); STATIC_DCL void FDECL(at_your_feet, (const char *)); -#ifdef ELBERETH STATIC_DCL void NDECL(gcrownu); -#endif /*ELBERETH*/ STATIC_DCL void FDECL(pleased,(ALIGNTYP_P)); STATIC_DCL void FDECL(godvoice,(ALIGNTYP_P,const char*)); STATIC_DCL void FDECL(god_zaps_you,(ALIGNTYP_P)); @@ -678,7 +676,6 @@ at_your_feet(str) } } -#ifdef ELBERETH STATIC_OVL void gcrownu() { @@ -830,7 +827,6 @@ gcrownu() add_weapon_skill(1); return; } -#endif /*ELBERETH*/ STATIC_OVL void pleased(g_align) @@ -1052,12 +1048,10 @@ pleased(g_align) } case 7: case 8: -#ifdef ELBERETH if (u.ualign.record >= PIOUS && !u.uevent.uhand_of_elbereth) { gcrownu(); break; } /* else FALLTHRU */ -#endif /*ELBERETH*/ case 6: { struct obj *otmp; int sp_no, trycnt = u.ulevel + 1; @@ -1090,9 +1084,7 @@ pleased(g_align) u.ublesscnt = rnz(350); kick_on_butt = u.uevent.udemigod ? 1 : 0; -#ifdef ELBERETH if (u.uevent.uhand_of_elbereth) kick_on_butt++; -#endif if (kick_on_butt) u.ublesscnt += kick_on_butt * rnz(1000); return; diff --git a/src/u_init.c b/src/u_init.c index 4e5927397..59ba3c23a 100644 --- a/src/u_init.c +++ b/src/u_init.c @@ -540,9 +540,7 @@ u_init() u.ublessed = 0; /* not worthy yet */ u.ugangr = 0; /* gods not angry */ u.ugifts = 0; /* no divine gifts bestowed */ -# ifdef ELBERETH u.uevent.uhand_of_elbereth = 0; -# endif u.uevent.uheard_tune = 0; u.uevent.uopened_dbridge = 0; u.uevent.udemigod = 0; /* not a demi-god yet... */ @@ -917,9 +915,7 @@ register struct trobj *trop; || otyp == nocreate2 || otyp == nocreate3 || otyp == nocreate4 -#ifdef ELBERETH || otyp == RIN_LEVITATION -#endif /* 'useless' items */ || otyp == POT_HALLUCINATION || otyp == POT_ACID diff --git a/util/makedefs.c b/util/makedefs.c index d84e1c7ea..dbedfe45b 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -961,8 +961,8 @@ do_rumors() */ #define IGNORED_FEATURES ( 0L \ | (1L << 12) /* GOLDOBJ */ \ - | (1L << 20) /* EXP_ON_BOTL */ \ - | (1L << 21) /* SCORE_ON_BOTL */ \ + | (1L << 19) /* EXP_ON_BOTL */ \ + | (1L << 20) /* SCORE_ON_BOTL */ \ | (1L << 27) /* ZEROCOMP */ \ | (1L << 28) /* RLECOMP */ \ ) @@ -1018,14 +1018,11 @@ make_version() #ifdef INSURANCE | (1L << 18) #endif -#ifdef ELBERETH +#ifdef EXP_ON_BOTL | (1L << 19) #endif -#ifdef EXP_ON_BOTL - | (1L << 20) -#endif #ifdef SCORE_ON_BOTL - | (1L << 21) + | (1L << 20) #endif /* data format (27..31) * External compression methods such as COMPRESS and ZLIB_COMP @@ -1257,9 +1254,6 @@ static const char *build_opts[] = { #ifdef DUNGEON_OVERVIEW "dungeon map overview patch", #endif -#ifdef ELBERETH - "Elbereth", -#endif #ifdef EXP_ON_BOTL "experience points on status line", #endif @@ -1684,9 +1678,6 @@ h_filter(line) skip = FALSE; #ifndef SINKS if (!strcmp(tag, "SINKS")) skip = TRUE; -#endif -#ifndef ELBERETH - if (!strcmp(tag, "ELBERETH")) skip = TRUE; #endif } else if (skip && !strncmp(line, "-----", 5)) skip = FALSE; From 9e657589478f00625b00600079171ce518420858 Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Fri, 13 Feb 2015 21:23:56 -0500 Subject: [PATCH 026/132] Make STEED unconditional. --- include/config.h | 1 - include/display.h | 4 -- include/extern.h | 2 - include/hack.h | 2 - include/prop.h | 2 - include/rm.h | 4 -- include/skills.h | 4 -- include/you.h | 2 - include/youprop.h | 8 ---- src/allmain.c | 2 - src/apply.c | 42 +++--------------- src/artifact.c | 7 +-- src/attrib.c | 7 +-- src/ball.c | 5 +-- src/cmd.c | 17 +------- src/dig.c | 2 - src/display.c | 4 +- src/do.c | 22 ++-------- src/do_name.c | 10 ----- src/dog.c | 14 ------ src/dogmove.c | 16 ++----- src/dokick.c | 2 - src/dothrow.c | 2 - src/dungeon.c | 2 - src/eat.c | 12 +----- src/engrave.c | 2 - src/explode.c | 4 -- src/hack.c | 78 ++++++---------------------------- src/invent.c | 11 +---- src/lock.c | 12 +----- src/mhitm.c | 10 +---- src/mhitu.c | 12 +----- src/mon.c | 23 ++-------- src/mondata.c | 2 - src/objects.c | 4 -- src/objnam.c | 6 +-- src/pager.c | 2 - src/pickup.c | 4 -- src/pline.c | 7 +-- src/polyself.c | 2 - src/potion.c | 36 +++------------- src/pray.c | 10 +---- src/read.c | 5 +-- src/restore.c | 10 +---- src/save.c | 8 ---- src/shk.c | 18 +++----- src/sit.c | 2 - src/sounds.c | 12 +++--- src/steal.c | 40 ++++++++---------- src/steed.c | 5 --- src/teleport.c | 11 +---- src/timeout.c | 8 ---- src/trap.c | 101 +++----------------------------------------- src/u_init.c | 18 -------- src/uhitm.c | 20 ++------- src/weapon.c | 8 ---- src/wield.c | 16 ++----- src/worn.c | 6 --- src/zap.c | 18 +------- util/makedefs.c | 8 +--- win/gnome/gnmain.c | 2 - win/share/tilemap.c | 3 -- 62 files changed, 98 insertions(+), 641 deletions(-) diff --git a/include/config.h b/include/config.h index b1e69992c..715fc746a 100644 --- a/include/config.h +++ b/include/config.h @@ -425,7 +425,6 @@ typedef unsigned char uchar; /* monsters & objects */ #define KOPS /* Keystone Kops by Scott R. Turner */ #define SEDUCE /* Succubi/incubi seduction, by KAA, suggested by IM */ -#define STEED /* Riding steeds */ #define TOURIST /* Tourist players with cameras and Hawaiian shirts */ /* I/O */ #define REDO /* support for redoing last command - DGK */ diff --git a/include/display.h b/include/display.h index 59135b014..94ee1a15c 100644 --- a/include/display.h +++ b/include/display.h @@ -198,12 +198,8 @@ * Display the hero. It is assumed that all checks necessary to determine * _if_ the hero can be seen have already been done. */ -#ifdef STEED #define maybe_display_usteed (u.usteed && mon_visible(u.usteed)) ? \ ridden_mon_to_glyph(u.usteed) : -#else -#define maybe_display_usteed /* empty */ -#endif #define display_self() \ show_glyph(u.ux, u.uy, \ diff --git a/include/extern.h b/include/extern.h index 216b94e6f..866da61ec 100644 --- a/include/extern.h +++ b/include/extern.h @@ -2205,7 +2205,6 @@ E struct obj *FDECL(findgold, (struct obj *)); /* ### steed.c ### */ -#ifdef STEED E void NDECL(rider_cant_reach); E boolean FDECL(can_saddle, (struct monst *)); E int FDECL(use_saddle, (struct obj *)); @@ -2217,7 +2216,6 @@ E void NDECL(kick_steed); E void FDECL(dismount_steed, (int)); E void FDECL(place_monster, (struct monst *,int,int)); E boolean FDECL(stucksteed, (BOOLEAN_P)); -#endif /* ### teleport.c ### */ diff --git a/include/hack.h b/include/hack.h index dc24bf8f9..c88d8dd56 100644 --- a/include/hack.h +++ b/include/hack.h @@ -38,7 +38,6 @@ #define BY_PAPER 2 #define BY_OTHER 9 -#ifdef STEED /* Macros for why you are no longer riding */ #define DISMOUNT_GENERIC 0 #define DISMOUNT_FELL 1 @@ -47,7 +46,6 @@ #define DISMOUNT_ENGULFED 4 #define DISMOUNT_BONES 5 #define DISMOUNT_BYCHOICE 6 -#endif /* Special returns from mapglyph() */ #define MG_CORPSE 0x01 diff --git a/include/prop.h b/include/prop.h index 810a730bc..2ca7b871d 100644 --- a/include/prop.h +++ b/include/prop.h @@ -114,9 +114,7 @@ struct prop { # define W_RINGR 0x00040000L /* Right ring */ # define W_RING (W_RINGL | W_RINGR) # define W_TOOL 0x00080000L /* Eyewear */ -#ifdef STEED # define W_SADDLE 0x00100000L /* KMH -- For riding monsters */ -#endif # define W_BALL 0x00200000L /* Punishment ball */ # define W_CHAIN 0x00400000L /* Punishment chain */ diff --git a/include/rm.h b/include/rm.h index 589ba619e..fbd7470cf 100644 --- a/include/rm.h +++ b/include/rm.h @@ -593,10 +593,6 @@ extern dlevel_t level; /* structure describing the current level */ !(level.monsters[x][y])->mburied) #define MON_BURIED_AT(x,y) (level.monsters[x][y] != (struct monst *)0 && \ (level.monsters[x][y])->mburied) -#ifndef STEED -#define place_monster(m,x,y) ((m)->mx=(x),(m)->my=(y),\ - level.monsters[(m)->mx][(m)->my]=(m)) -#endif #define place_worm_seg(m,x,y) level.monsters[x][y] = m #define remove_monster(x,y) level.monsters[x][y] = (struct monst *)0 #define m_at(x,y) (MON_AT(x,y) ? level.monsters[x][y] : \ diff --git a/include/skills.h b/include/skills.h index d2221e7fb..df5105e1b 100644 --- a/include/skills.h +++ b/include/skills.h @@ -68,12 +68,8 @@ #define P_BARE_HANDED_COMBAT 36 /* actually weaponless; gloves are ok */ #define P_MARTIAL_ARTS P_BARE_HANDED_COMBAT /* Role distinguishes */ #define P_TWO_WEAPON_COMBAT 37 /* Finally implemented */ -#ifdef STEED #define P_RIDING 38 /* How well you control your steed */ #define P_LAST_H_TO_H P_RIDING -#else -#define P_LAST_H_TO_H P_TWO_WEAPON_COMBAT -#endif #define P_FIRST_H_TO_H P_BARE_HANDED_COMBAT #define P_NUM_SKILLS (P_LAST_H_TO_H+1) diff --git a/include/you.h b/include/you.h index b316abcf7..c010abcb0 100644 --- a/include/you.h +++ b/include/you.h @@ -348,11 +348,9 @@ struct you { long usleep; /* sleeping; monstermove you last started */ int uinvault; struct monst *ustuck; -#ifdef STEED struct monst *usteed; long ugallop; int urideturns; -#endif int umortality; /* how many times you died */ int ugrave_arise; /* you die and become something aside from a ghost */ int weapon_slots; /* unused skill slots */ diff --git a/include/youprop.h b/include/youprop.h index 04c3349a3..a29e20bf8 100644 --- a/include/youprop.h +++ b/include/youprop.h @@ -229,13 +229,9 @@ #define HFlying u.uprops[FLYING].intrinsic #define EFlying u.uprops[FLYING].extrinsic #define BFlying u.uprops[FLYING].blocked -#ifdef STEED # define Flying ((HFlying || EFlying || \ (u.usteed && is_flyer(u.usteed->data))) && \ !BFlying) -#else -# define Flying ((HFlying || EFlying) && !BFlying) -#endif /* May touch surface; does not override any others */ #define Wwalking (u.uprops[WWALKING].extrinsic && \ @@ -245,12 +241,8 @@ #define HSwimming u.uprops[SWIMMING].intrinsic #define ESwimming u.uprops[SWIMMING].extrinsic /* [Tom] */ -#ifdef STEED # define Swimming (HSwimming || ESwimming || \ (u.usteed && is_swimmer(u.usteed->data))) -#else -# define Swimming (HSwimming || ESwimming) -#endif /* Get wet, don't go under water unless if amphibious */ #define HMagical_breathing u.uprops[MAGICAL_BREATHING].intrinsic diff --git a/src/allmain.c b/src/allmain.c index 51afc75f6..447aff1d8 100644 --- a/src/allmain.c +++ b/src/allmain.c @@ -118,12 +118,10 @@ boolean resuming; (void) makemon((struct permonst *)0, 0, 0, NO_MM_FLAGS); /* calculate how much time passed. */ -#ifdef STEED if (u.usteed && u.umoved) { /* your speed doesn't augment steed's speed */ moveamt = mcalcmove(u.usteed); } else -#endif { moveamt = youmonst.data->mmove; diff --git a/src/apply.c b/src/apply.c index fb97cc8fa..a5a38dd8a 100644 --- a/src/apply.c +++ b/src/apply.c @@ -302,7 +302,6 @@ use_stethoscope(obj) context.stethoscope_move = moves; context.stethoscope_movement = youmonst.movement; -#ifdef STEED if (u.usteed && u.dz > 0) { if (interference) { pline("%s interferes.", Monnam(u.ustuck)); @@ -311,7 +310,6 @@ use_stethoscope(obj) mstatusline(u.usteed); return res; } else -#endif if (u.uswallow && (u.dx || u.dy || u.dz)) { mstatusline(u.ustuck); return res; @@ -442,11 +440,9 @@ struct obj *obj; for(mtmp = fmon; mtmp; mtmp = nextmon) { nextmon = mtmp->nmon; /* trap might kill mon */ if (DEADMONSTER(mtmp)) continue; -#ifdef STEED /* steed is already at your location, so not affected; this avoids trap issues if you're on a trap location */ if (mtmp == u.usteed) continue; -#endif if (mtmp->mtame) { if (mtmp->mtrapped) { /* no longer in previous trap (affects mintrap) */ @@ -550,13 +546,11 @@ struct obj *obj; if(!get_adjacent_loc((char *)0, (char *)0, u.ux, u.uy, &cc)) return; if((cc.x == u.ux) && (cc.y == u.uy)) { -#ifdef STEED if (u.usteed && u.dz > 0) { mtmp = u.usteed; spotmon = 1; goto got_target; } -#endif pline("Leash yourself? Very funny..."); return; } @@ -567,9 +561,7 @@ struct obj *obj; } spotmon = canspotmon(mtmp); -#ifdef STEED got_target: -#endif if(!mtmp->mtame) { if(!spotmon) @@ -648,10 +640,8 @@ next_to_u() } } } -#ifdef STEED /* no pack mules for the Amulet */ if (u.usteed && mon_has_amulet(u.usteed)) return FALSE; -#endif return(TRUE); } @@ -1388,12 +1378,10 @@ int magic; /* 0=Physical, otherwise skill level */ } else if (!magic && !Jumping) { You_cant("jump very far."); return 0; -#ifdef STEED /* if steed is immobile, can't do physical jump but can do spell one */ } else if (!magic && u.usteed && stucksteed(FALSE)) { /* stucksteed gave " won't move" message */ return 0; -#endif } else if (u.uswallow) { if (magic) { You("bounce around a little."); @@ -1438,23 +1426,19 @@ int magic; /* 0=Physical, otherwise skill level */ const char *bp = body_part(LEG); if (wl == BOTH_SIDES) bp = makeplural(bp); -#ifdef STEED if (u.usteed) pline("%s is in no shape for jumping.", Monnam(u.usteed)); else -#endif - Your("%s%s %s in no shape for jumping.", - (wl == LEFT_SIDE) ? "left " : - (wl == RIGHT_SIDE) ? "right " : "", - bp, (wl == BOTH_SIDES) ? "are" : "is"); + Your("%s%s %s in no shape for jumping.", + (wl == LEFT_SIDE) ? "left " : + (wl == RIGHT_SIDE) ? "right " : "", + bp, (wl == BOTH_SIDES) ? "are" : "is"); return 0; } -#ifdef STEED else if (u.usteed && u.utrap) { pline("%s is stuck in a trap.", Monnam(u.usteed)); return (0); } -#endif pline("Where do you want to jump?"); cc.x = u.ux; @@ -2237,7 +2221,6 @@ struct obj *otmp; trapinfo.time_needed += (tmp > 12) ? 1 : (tmp > 7) ? 2 : 4; /*[fumbling and/or confusion and/or cursed object check(s) should be incorporated here instead of in set_trap]*/ -#ifdef STEED if (u.usteed && P_SKILL(P_RIDING) < P_BASIC) { boolean chance; @@ -2267,7 +2250,6 @@ struct obj *otmp; return; } } -#endif You("begin setting %s%s.", shk_your(buf, otmp), defsyms[trap_to_defsym(what_trap(ttyp))].explanation); @@ -2369,19 +2351,13 @@ struct obj *obj; } else if ((!u.dx && !u.dy) || (u.dz > 0)) { int dam; -#ifdef STEED /* Sometimes you hit your steed by mistake */ if (u.usteed && !rn2(proficient + 2)) { You("whip %s!", mon_nam(u.usteed)); kick_steed(); return 1; } -#endif - if (Levitation -#ifdef STEED - || u.usteed -#endif - ) { + if (Levitation || u.usteed) { /* Have a shot at snaring something on the floor */ otmp = level.objects[u.ux][u.uy]; if (otmp && otmp->otyp == CORPSE && otmp->corpsenm == PM_HORSE) { @@ -3194,11 +3170,9 @@ doapply() case LEASH: use_leash(obj); break; -#ifdef STEED case SADDLE: res = use_saddle(obj); break; -#endif case MAGIC_WHISTLE: use_magic_whistle(obj); break; @@ -3336,11 +3310,7 @@ unfixable_trouble_count(is_horn) if (Stoned) unfixable_trbl++; if (Strangled) unfixable_trbl++; - if (Wounded_legs -#ifdef STEED - && !u.usteed -#endif - ) unfixable_trbl++; + if (Wounded_legs && !u.usteed) unfixable_trbl++; if (Slimed) unfixable_trbl++; /* lycanthropy is not desirable, but it doesn't actually make you feel bad */ diff --git a/src/artifact.c b/src/artifact.c index 088bc9c66..e9351ba92 100644 --- a/src/artifact.c +++ b/src/artifact.c @@ -1687,10 +1687,7 @@ long *abil; long wornbits; long wornmask = (W_ARM | W_ARMC | W_ARMH | W_ARMS | W_ARMG | W_ARMF | W_WEP | W_QUIVER | W_SWAPWEP | W_ART | W_ARTI | W_AMUL | - W_RINGL | W_RINGR | W_TOOL | W_BALL | W_CHAIN -#ifdef STEED - | W_SADDLE -#endif + W_RINGL | W_RINGR | W_TOOL | W_BALL | W_CHAIN | W_SADDLE #ifdef TOURIST | W_ARMU #endif @@ -1868,7 +1865,6 @@ int dropflag; /* 0==don't drop, 1==drop all, 2==drop weapon */ /* check primary weapon next so that they're handled together */ if (uwep) (void)untouchable(uwep, dropit); -#ifdef STEED /* in case someone is daft enough to add artifact or silver saddle */ if (u.usteed && (obj = which_armor(u.usteed, W_SADDLE)) != 0) { /* untouchable() calls retouch_object() which expects an object in @@ -1876,7 +1872,6 @@ int dropflag; /* 0==don't drop, 1==drop all, 2==drop weapon */ saddle and we're suppressing drop, so this works as intended */ if (untouchable(obj, FALSE)) dismount_steed(DISMOUNT_THROWN); } -#endif /* * TODO? Force off gloves if either or both rings are going to * become unworn; force off cloak [suit] before suit [shirt]. diff --git a/src/attrib.c b/src/attrib.c index 0c8ae76a8..15377c76c 100644 --- a/src/attrib.c +++ b/src/attrib.c @@ -440,11 +440,8 @@ exerper() if(Sick || Vomiting) exercise(A_CON, FALSE); if(Confusion || Hallucination) exercise(A_WIS, FALSE); - if((Wounded_legs -#ifdef STEED - && !u.usteed -#endif - ) || Fumbling || HStun) exercise(A_DEX, FALSE); + if((Wounded_legs && !u.usteed) || Fumbling || HStun) + exercise(A_DEX, FALSE); } } diff --git a/src/ball.c b/src/ball.c index 78aee97a0..b3513f7b5 100644 --- a/src/ball.c +++ b/src/ball.c @@ -692,10 +692,7 @@ xchar x, y; register long side = rn2(3) ? LEFT_SIDE : RIGHT_SIDE; pline(pullmsg, "bear trap"); set_wounded_legs(side, rn1(1000, 500)); -#ifdef STEED - if (!u.usteed) -#endif - { + if (!u.usteed) { Your("%s %s is severely damaged.", (side == LEFT_SIDE) ? "left" : "right", body_part(LEG)); diff --git a/src/cmd.c b/src/cmd.c index 3c8eff341..78981c274 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -1528,7 +1528,6 @@ int final; boolean magic = (mode & MAGICENLIGHTENMENT) ? TRUE : FALSE; int cap; char buf[BUFSZ], youtoo[BUFSZ]; -#ifdef STEED boolean Riding = (u.usteed && /* if hero dies while dismounting, u.usteed will still be set; we want to ignore steed in that situation */ @@ -1540,7 +1539,6 @@ int final; (char *)0, (SUPPRESS_SADDLE | SUPPRESS_HALLUCINATION), FALSE); -#endif /*\ * Status (many are abbreviated on bottom line; others are or @@ -1553,7 +1551,6 @@ int final; /* not a traditional status but inherently obvious to player; more detail given below (attributes section) for magic enlightenment */ if (Upolyd) you_are("transformed", ""); -#ifdef STEED /* not a trouble, but we want to display riding status before maybe reporting steed as trapped or hero stuck to cursed saddle */ if (Riding) { @@ -1561,7 +1558,6 @@ int final; you_are(buf, ""); Sprintf(eos(youtoo), "and %s ", steedname); } -#endif /*STEED*/ /* other movement situations that hero should always know */ if (Levitation) { if (Lev_at_will && magic) @@ -1639,14 +1635,12 @@ int final; Sprintf(eos(predicament), " in %s", an(defsyms[trap_to_defsym(t->ttyp)].explanation)); } -#ifdef STEED if (u.usteed) { /* not `Riding' here */ Sprintf(buf, "%s%s ", anchored ? "you and " : "", steedname); *buf = highc(*buf); enl_msg(buf, (anchored ? "are " : "is "), (anchored ? "were " : "was "), predicament, ""); } else -#endif /*STEED*/ you_are(predicament, ""); } /* (u.utrap) */ if (u.uswallow) { @@ -1661,7 +1655,6 @@ int final; a_monnam(u.ustuck)); you_are(buf, ""); } -#ifdef STEED if (Riding) { struct obj *saddle = which_armor(u.usteed, W_SADDLE); @@ -1671,9 +1664,7 @@ int final; you_are(buf, ""); } } -#endif /*STEED*/ if (Wounded_legs) { -#ifdef STEED /* when mounted, Wounded_legs applies to steed rather than to hero; we only report steed's wounded legs in wizard mode */ if (u.usteed) { /* not `Riding' here */ @@ -1684,9 +1675,7 @@ int final; enl_msg(buf, " has", " had", " wounded legs", ""); } # endif - } else -#endif /*STEED*/ - { + } else { Sprintf(buf, "wounded %s", makeplural(body_part(LEG))); you_have(buf, ""); } @@ -2474,9 +2463,7 @@ static const struct func_tab cmdlist[] = { {'r', FALSE, doread}, {'R', FALSE, doremring}, {M('r'), FALSE, dorub}, -#ifdef STEED {M('R'), FALSE, doride}, /* #ride */ -#endif {'s', TRUE, dosearch, "searching"}, {'S', TRUE, dosave}, {M('s'), FALSE, dosit}, @@ -2553,9 +2540,7 @@ struct ext_func_tab extcmdlist[] = { #endif /* DUNGEON_OVERVIEW */ {"pray", "pray to the gods for help", dopray, TRUE}, {"quit", "exit without saving current game", done2, TRUE}, -#ifdef STEED {"ride", "ride (or stop riding) a monster", doride, FALSE}, -#endif {"rub", "rub a lamp or a stone", dorub, FALSE}, {"sit", "sit down", dosit, FALSE}, {"terrain", "show map without obstructions", doterrain, TRUE}, diff --git a/src/dig.c b/src/dig.c index 382676865..ae4571218 100644 --- a/src/dig.c +++ b/src/dig.c @@ -250,13 +250,11 @@ dig(VOID_ARGS) You("fumble and drop %s.", yname(uwep)); dropx(uwep); } else { -#ifdef STEED if (u.usteed) pline("%s and %s %s!", Yobjnam2(uwep, "bounce"), otense(uwep, "hit"), mon_nam(u.usteed)); else -#endif pline("Ouch! %s and %s you!", Yobjnam2(uwep, "bounce"), otense(uwep, "hit")); set_wounded_legs(RIGHT_SIDE, 5 + rnd(5)); diff --git a/src/display.c b/src/display.c index 8da9af9fe..263dd853a 100644 --- a/src/display.c +++ b/src/display.c @@ -1126,11 +1126,9 @@ see_monsters() warn_obj_cnt = new_warn_obj_cnt; } -#ifdef STEED /* when mounted, hero's location gets caught by monster loop */ if (!u.usteed) -#endif - newsym(u.ux, u.uy); + newsym(u.ux, u.uy); } /* diff --git a/src/do.c b/src/do.c index 6ad4985da..1f51c14cc 100644 --- a/src/do.c +++ b/src/do.c @@ -80,11 +80,9 @@ boolean pushing; char whobuf[BUFSZ]; Strcpy(whobuf, "you"); -#ifdef STEED if (u.usteed) Strcpy(whobuf, y_monnam(u.usteed)); -#endif - pline("%s %s %s into the %s.", upstart(whobuf), - vtense(whobuf, "push"), the(xname(otmp)), what); + pline("%s %s %s into the %s.", upstart(whobuf), + vtense(whobuf, "push"), the(xname(otmp)), what); if (flags.verbose && !Blind) pline("Now you can cross it!"); /* no splashing in this case */ @@ -434,14 +432,12 @@ register const char *word; body_part(HAND)); return(FALSE); } -#ifdef STEED if (obj->owornmask & W_SADDLE) { if (*word) You("cannot %s %s you are sitting on.", word, something); return (FALSE); } -#endif return(TRUE); } @@ -801,11 +797,9 @@ dodown() return 1; } -#ifdef STEED if (stucksteed(TRUE)) { return 0; } -#endif /* Levitation might be blocked, but player can still use '>' to turn off controlled levitaiton */ if (HLevitation || ELevitation) { @@ -924,11 +918,9 @@ doup() You_cant("go up here."); return(0); } -#ifdef STEED if (stucksteed(TRUE)) { return(0); } -#endif if(u.ustuck) { You("are %s, and cannot go up.", !u.uswallow ? "being held" : is_animal(u.ustuck->data) ? @@ -1267,12 +1259,10 @@ boolean at_stairs, falling, portal; freeinv(uball); } } -#ifdef STEED /* falling off steed has its own losehp() call */ if (u.usteed) dismount_steed(DISMOUNT_FELL); else -#endif losehp(Maybe_Half_Phys(rnd(3)), at_ladder ? "falling off a ladder" : "tumbling down a flight of stairs", @@ -1305,11 +1295,7 @@ boolean at_stairs, falling, portal; initrack(); - if ((mtmp = m_at(u.ux, u.uy)) != 0 -#ifdef STEED - && mtmp != u.usteed -#endif - ) { + if ((mtmp = m_at(u.ux, u.uy)) != 0 && mtmp != u.usteed) { /* There's a monster at your target destination; it might be one which accompanied you--see mon_arrive(dogmove.c)--or perhaps it was already here. Randomly move you to an adjacent spot @@ -1746,9 +1732,7 @@ heal_legs() context.botl = 1; } -#ifdef STEED if (!u.usteed) -#endif { const char *legs = body_part(LEG); diff --git a/src/do_name.c b/src/do_name.c index 0c459bd50..ea5b64b8b 100644 --- a/src/do_name.c +++ b/src/do_name.c @@ -329,20 +329,16 @@ do_mname() cy = cc.y; if (cx == u.ux && cy == u.uy) { -#ifdef STEED if (u.usteed && canspotmon(u.usteed)) mtmp = u.usteed; else { -#endif pline("This %s creature is called %s and cannot be renamed.", ACURR(A_CHA) > 14 ? (flags.female ? "beautiful" : "handsome") : "ugly", plname); return; -#ifdef STEED } -#endif } else mtmp = m_at(cx, cy); @@ -678,9 +674,7 @@ boolean called; do_it = !canspotmon(mtmp) && article != ARTICLE_YOUR && !program_state.gameover && -#ifdef STEED mtmp != u.usteed && -#endif !(u.uswallow && mtmp == u.ustuck) && !(suppress & SUPPRESS_IT); do_saddle = !(suppress & SUPPRESS_SADDLE); @@ -746,11 +740,9 @@ boolean called; Strcat(strcat(buf, adjective), " "); if (do_invis) Strcat(buf, "invisible "); -#ifdef STEED if (do_saddle && (mtmp->misc_worn_check & W_SADDLE) && !Blind && !Hallucination) Strcat(buf, "saddled "); -#endif if (buf[0] != 0) has_adjectives = TRUE; else @@ -898,10 +890,8 @@ struct monst *mtmp; prefix = mtmp->mtame ? ARTICLE_YOUR : ARTICLE_THE; suppression_flag = (has_mname(mtmp) -#ifdef STEED /* "saddled" is redundant when mounted */ || mtmp == u.usteed -#endif ) ? SUPPRESS_SADDLE : 0; return x_monnam(mtmp, prefix, (char *)0, suppression_flag, FALSE); diff --git a/src/dog.c b/src/dog.c index 0a0162e61..fa9d1f99a 100644 --- a/src/dog.c +++ b/src/dog.c @@ -148,9 +148,7 @@ struct monst * makedog() { register struct monst *mtmp; -#ifdef STEED register struct obj *otmp; -#endif const char *petname; int pettype; static int petname_used = 0; @@ -179,7 +177,6 @@ makedog() if(!mtmp) return((struct monst *) 0); /* pets were genocided */ context.startingpet_mid = mtmp->m_id; -#ifdef STEED /* Horses already wear a saddle */ if (pettype == PM_PONY && !!(otmp = mksobj(SADDLE, TRUE, FALSE))) { if (mpickobj(mtmp, otmp)) @@ -190,7 +187,6 @@ makedog() otmp->leashmon = mtmp->m_id; update_mon_intrinsics(mtmp, otmp, TRUE, TRUE); } -#endif if (!petname_used++ && *petname) mtmp = christen_monst(mtmp, petname); @@ -323,10 +319,8 @@ boolean with_you; mtmp->mtrack[0].x = mtmp->mtrack[0].y = 0; mtmp->mtrack[1].x = mtmp->mtrack[1].y = 0; -#ifdef STEED if (mtmp == u.usteed) return; /* don't place steed on the map */ -#endif if (with_you) { /* When a monster accompanies you, sometimes it will arrive at your intended destination and you'll end up next to @@ -575,24 +569,20 @@ boolean pets_only; /* true for ascension or final escape */ only if in range. -3. */ (u.uhave.amulet && mtmp->iswiz)) && ((!mtmp->msleeping && mtmp->mcanmove) -#ifdef STEED /* eg if level teleport or new trap, steed has no control to avoid following */ || (mtmp == u.usteed) -#endif ) /* monster won't follow if it hasn't noticed you yet */ && !(mtmp->mstrategy & STRAT_WAITFORU)) { stay_behind = FALSE; if (mtmp->mtrapped) (void)mintrap(mtmp); /* try to escape */ -#ifdef STEED if (mtmp == u.usteed) { /* make sure steed is eligible to accompany hero */ mtmp->mtrapped = 0; /* escape trap */ mtmp->meating = 0; /* terminate eating */ mdrop_special_objs(mtmp); /* drop Amulet */ } else -#endif if (mtmp->meating || mtmp->mtrapped) { if (canseemon(mtmp)) pline("%s is still %s.", Monnam(mtmp), @@ -612,14 +602,12 @@ boolean pets_only; /* true for ascension or final escape */ : "Its"); m_unleash(mtmp, FALSE); } -#ifdef STEED if (mtmp == u.usteed) { /* can't happen unless someone makes a change which scrambles the stay_behind logic above */ impossible("steed left behind?"); dismount_steed(DISMOUNT_GENERIC); } -#endif continue; } if (mtmp->isshk) @@ -980,9 +968,7 @@ boolean was_dead; /* a life-saved monster might be leashed; don't leave it that way if it's no longer tame */ if (mtmp->mleashed) m_unleash(mtmp, TRUE); -#ifdef STEED if (mtmp == u.usteed) dismount_steed(DISMOUNT_THROWN); -#endif } else if (edog) { /* it's still a pet; start a clean pet-slate now */ edog->revivals++; diff --git a/src/dogmove.c b/src/dogmove.c index a56ad1066..6baa47651 100644 --- a/src/dogmove.c +++ b/src/dogmove.c @@ -354,11 +354,7 @@ register struct edog *edog; stop_occupation(); } else if (monstermoves > edog->hungrytime + 750 || mtmp->mhp < 1) { dog_died: - if (mtmp->mleashed -#ifdef STEED - && mtmp != u.usteed -#endif - ) + if (mtmp->mleashed && mtmp != u.usteed) Your("leash goes slack."); else if (cansee(mtmp->mx, mtmp->my)) pline("%s starves.", Monnam(mtmp)); @@ -453,11 +449,9 @@ int after, udist, whappr; xchar otyp; int appr; -#ifdef STEED /* Steeds don't move on their own will */ if (mtmp == u.usteed) return (-2); -#endif omx = mtmp->mx; omy = mtmp->my; @@ -626,7 +620,6 @@ register int after; /* this is extra fast monster movement */ if (has_edog && dog_hunger(mtmp, edog)) return(2); /* starved */ udist = distu(omx,omy); -#ifdef STEED /* Let steeds eat and maybe throw rider during Conflict */ if (mtmp == u.usteed) { if (Conflict && !resist(mtmp, RING_CLASS, 0, 0)) { @@ -634,10 +627,9 @@ register int after; /* this is extra fast monster movement */ return (1); } udist = 1; - } else -#endif - /* maybe we tamed him while being swallowed --jgm */ - if (!udist) return(0); + } else if (!udist) + /* maybe we tamed him while being swallowed --jgm */ + return(0); nix = omx; /* set before newdogpos */ niy = omy; diff --git a/src/dokick.c b/src/dokick.c index 424aa6fa1..1b122e799 100644 --- a/src/dokick.c +++ b/src/dokick.c @@ -716,7 +716,6 @@ dokick() } else if (verysmall(youmonst.data)) { You("are too small to do any kicking."); no_kick = TRUE; -#ifdef STEED } else if (u.usteed) { if (yn_function("Kick your steed?", ynchars, 'y') == 'y') { You("kick %s.", mon_nam(u.usteed)); @@ -725,7 +724,6 @@ dokick() } else { return 0; } -#endif } else if (Wounded_legs) { /* note: jump() has similar code */ long wl = (EWounded_legs & BOTH_SIDES); diff --git a/src/dothrow.c b/src/dothrow.c index ebd7c97e8..953ff1e35 100644 --- a/src/dothrow.c +++ b/src/dothrow.c @@ -1002,13 +1002,11 @@ boolean twoweap; /* used to restore twoweapon mode if wielded weapon returns */ u.twoweap = twoweap; } else if (u.dz < 0) { (void) toss_up(obj, rn2(5) && !Underwater); -#ifdef STEED } else if (u.dz > 0 && u.usteed && obj->oclass == POTION_CLASS && rn2(6)) { /* alternative to prayer or wand of opening/spell of knock for dealing with cursed saddle: throw holy water > */ potionhit(u.usteed, obj, TRUE); -#endif } else { hitfloor(obj); } diff --git a/src/dungeon.c b/src/dungeon.c index d9348183c..d87faa15e 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -1148,10 +1148,8 @@ int x, y; #ifdef CLIPPING cliparound(u.ux, u.uy); #endif -#ifdef STEED /* ridden steed always shares hero's location */ if (u.usteed) u.usteed->mx = u.ux, u.usteed->my = u.uy; -#endif /* when changing levels, don't leave old position set with stale values from previous level */ if (!on_level(&u.uz, &u.uz0)) u.ux0 = u.ux, u.uy0 = u.uy; diff --git a/src/eat.c b/src/eat.c index 5b5d1f38e..37561967b 100644 --- a/src/eat.c +++ b/src/eat.c @@ -1017,10 +1017,8 @@ register int pm; u.uconduct.polyselfs++; /* you're changing form */ You_cant("resist the temptation to mimic %s.", Hallucination ? "an orange" : "a pile of gold"); -#ifdef STEED /* A pile of gold can't ride. */ if (u.usteed) dismount_steed(DISMOUNT_FELL); -#endif nomul(-tmp); Sprintf(buf, Hallucination ? "You suddenly dread being peeled and mimic %s again!" : @@ -1540,9 +1538,7 @@ struct obj *obj; what = "you lose control of", where = "yourself"; else what = "you slap against the", where = -#ifdef STEED (u.usteed) ? "saddle" : -#endif surface(u.ux,u.uy); pline_The("world spins and %s %s.", what, where); incr_itimeout(&HDeaf, duration); @@ -2337,11 +2333,7 @@ doeat() /* generic "eat" command funtion (see cmd.c) */ } else if (!is_edible(otmp)) { You("cannot eat that!"); return 0; - } else if ((otmp->owornmask & (W_ARMOR|W_TOOL|W_AMUL -#ifdef STEED - |W_SADDLE -#endif - )) != 0) { + } else if ((otmp->owornmask & (W_ARMOR|W_TOOL|W_AMUL|W_SADDLE)) != 0) { /* let them eat rings */ You_cant("eat %s you're wearing.", something); return 0; @@ -2844,9 +2836,7 @@ floorfood(verb,corpsecheck) /* get food from floor or pack */ /* if we can't touch floor objects then use invent food only */ if (!can_reach_floor(TRUE) || -#ifdef STEED (feeding && u.usteed) || /* can't eat off floor while riding */ -#endif (is_pool_or_lava(u.ux, u.uy) && (Wwalking || is_clinger(youmonst.data) || (Flying && !Breathless)))) diff --git a/src/engrave.c b/src/engrave.c index 4af701654..8ba7217ba 100644 --- a/src/engrave.c +++ b/src/engrave.c @@ -140,10 +140,8 @@ boolean check_pit; struct trap *t; if (u.uswallow) return FALSE; -#ifdef STEED /* Restricted/unskilled riders can't reach the floor */ if (u.usteed && P_SKILL(P_RIDING) < P_BASIC) return FALSE; -#endif if (check_pit && (t = t_at(u.ux, u.uy)) != 0 && uteetering_at_seen_pit(t) && !Flying) return FALSE; diff --git a/src/explode.c b/src/explode.c index 54855f70a..65dbe82a5 100644 --- a/src/explode.c +++ b/src/explode.c @@ -167,10 +167,8 @@ int expltype; } /* can be both you and mtmp if you're swallowed */ mtmp = m_at(i+x-1, j+y-1); -#ifdef STEED if (!mtmp && i+x-1 == u.ux && j+y-1 == u.uy) mtmp = u.usteed; -#endif if (mtmp) { if (mtmp->mhp < 1) explmask[i][j] = 2; else switch(adtyp) { @@ -275,10 +273,8 @@ int expltype; type, &shopdamage, exploding_wand_typ); mtmp = m_at(i+x-1, j+y-1); -#ifdef STEED if (!mtmp && i+x-1 == u.ux && j+y-1 == u.uy) mtmp = u.usteed; -#endif if (!mtmp) continue; if (do_hallu) { /* replace "gas spore" with a different description diff --git a/src/hack.c b/src/hack.c index bcb3da1ad..fc62e71a4 100644 --- a/src/hack.c +++ b/src/hack.c @@ -118,11 +118,7 @@ moverock() /* Give them a chance to climb over it? */ return -1; } - if (verysmall(youmonst.data) -#ifdef STEED - && !u.usteed -#endif - ) { + if (verysmall(youmonst.data) && !u.usteed) { if (Blind) feel_location(sx, sy); pline("You're too small to push that %s.", xname(otmp)); goto cannot_push; @@ -159,10 +155,7 @@ moverock() } if (flags.verbose) pline("Perhaps that's why %s cannot move it.", -#ifdef STEED - u.usteed ? y_monnam(u.usteed) : -#endif - "you"); + u.usteed ? y_monnam(u.usteed) : "you"); goto cannot_push; } @@ -231,13 +224,11 @@ moverock() /* trap didn't work; skip "disappears" message */ goto dopush; } -#ifdef STEED if (u.usteed) - pline("%s pushes %s and suddenly it disappears!", - upstart(y_monnam(u.usteed)), the(xname(otmp))); + pline("%s pushes %s and suddenly it disappears!", + upstart(y_monnam(u.usteed)), the(xname(otmp))); else -#endif - You("push %s and suddenly it disappears!", + You("push %s and suddenly it disappears!", the(xname(otmp))); if (ttmp->ttyp == TELEP_TRAP) { (void)rloco(otmp); @@ -279,19 +270,15 @@ moverock() static NEARDATA long lastmovetime; #endif dopush: -#ifdef STEED if (!u.usteed) { -#endif if (moves > lastmovetime+2 || moves < lastmovetime) pline("With %s effort you move %s.", throws_rocks(youmonst.data) ? "little" : "great", the(xname(otmp))); exercise(A_STR, TRUE); -#ifdef STEED } else pline("%s moves %s.", upstart(y_monnam(u.usteed)), the(xname(otmp))); -#endif lastmovetime = moves; } @@ -307,24 +294,19 @@ moverock() } } else { nopushmsg: -#ifdef STEED if (u.usteed) pline("%s tries to move %s, but cannot.", upstart(y_monnam(u.usteed)), the(xname(otmp))); else -#endif You("try to move %s, but in vain.", the(xname(otmp))); if (Blind) feel_location(sx, sy); cannot_push: if (throws_rocks(youmonst.data)) { -#ifdef STEED if (u.usteed && P_SKILL(P_RIDING) < P_BASIC) { You("aren't skilled enough to %s %s from %s.", (flags.pickup && !Sokoban) ? "pick up" : "push aside", the(xname(otmp)), y_monnam(u.usteed)); - } else -#endif - { + } else { pline("However, you can easily %s.", (flags.pickup && !Sokoban) ? "pick it up" : "push it aside"); @@ -334,11 +316,7 @@ moverock() break; } - if ( -#ifdef STEED - !u.usteed && -#endif - (((!invent || inv_weight() <= -850) && + if (!u.usteed && (((!invent || inv_weight() <= -850) && (!u.dx || !u.dy || (IS_ROCK(levl[u.ux][sy].typ) && IS_ROCK(levl[sx][u.uy].typ)))) || verysmall(youmonst.data))) { @@ -693,13 +671,10 @@ int mode; You("try to ooze under the door, but can't squeeze your possessions through."); else if (x == ux || y == uy) { if (Blind || Stunned || ACURR(A_DEX) < 10 || Fumbling) { -#ifdef STEED if (u.usteed) { You_cant("lead %s through that closed door.", y_monnam(u.usteed)); - } else -#endif - { + } else { pline("Ouch! You bump into a door."); exercise(A_DEX, FALSE); } @@ -1001,9 +976,7 @@ struct trap *desttrap; /* nonnull if another trap at */ { boolean anchored; const char *predicament, *culprit; -#ifdef STEED char *steedname = !u.usteed ? (char *)0 : y_monnam(u.usteed); -#endif if (!u.utrap) return TRUE; /* sanity check */ @@ -1011,11 +984,9 @@ struct trap *desttrap; /* nonnull if another trap at */ case TT_BEARTRAP: if (flags.verbose) { predicament = "caught in a bear trap"; -#ifdef STEED if (u.usteed) Norep("%s is %s.", upstart(steedname), predicament); else -#endif Norep("You are %s.", predicament); } /* [why does diagonal movement give quickest escape?] */ @@ -1037,41 +1008,33 @@ struct trap *desttrap; /* nonnull if another trap at */ if (--u.utrap) { if (flags.verbose) { predicament = "stuck to the web"; -#ifdef STEED if (u.usteed) - Norep("%s is %s.", upstart(steedname), predicament); + Norep("%s is %s.", upstart(steedname), predicament); else -#endif - Norep("You are %s.", predicament); + Norep("You are %s.", predicament); } } else { -#ifdef STEED if (u.usteed) pline("%s breaks out of the web.", upstart(steedname)); else -#endif You("disentangle yourself."); } break; case TT_LAVA: if (flags.verbose) { predicament = "stuck in the lava"; -#ifdef STEED if (u.usteed) Norep("%s is %s.", upstart(steedname), predicament); else -#endif Norep("You are %s.", predicament); } if (!is_lava(x, y)) { u.utrap--; if ((u.utrap & 0xff) == 0) { u.utrap = 0; -#ifdef STEED if (u.usteed) You("lead %s to the edge of the lava.", steedname); else -#endif You("pull yourself to the edge of the lava."); } } @@ -1106,7 +1069,6 @@ struct trap *desttrap; /* nonnull if another trap at */ predicament = "stuck in the"; culprit = surface(u.ux, u.uy); } -#ifdef STEED if (u.usteed) { if (anchored) Norep("You and %s are %s %s.", steedname, @@ -1115,16 +1077,13 @@ struct trap *desttrap; /* nonnull if another trap at */ Norep("%s is %s %s.", upstart(steedname), predicament, culprit); } else -#endif - Norep("You are %s %s.", predicament, culprit); + Norep("You are %s %s.", predicament, culprit); } } else { -#ifdef STEED if (u.usteed) pline("%s finally %s free.", upstart(steedname), !anchored ? "lurches" : "wrenches the ball"); else -#endif You("finally %s free.", !anchored ? "wriggle" : "wrench the ball"); if (anchored) @@ -1419,12 +1378,10 @@ domove() newsym(x, y); } /* not attacking an animal, so we try to move */ -#ifdef STEED if ((u.dx || u.dy) && u.usteed && stucksteed(FALSE)) { nomul(0); return; } -#endif if(!youmonst.data->mmove) { You("are rooted %s.", Levitation || Is_airlevel(&u.uz) || Is_waterlevel(&u.uz) ? @@ -1456,14 +1413,12 @@ domove() mtmp = m_at(x, y); u.ux += u.dx; u.uy += u.dy; -#ifdef STEED /* Move your steed, too */ if (u.usteed) { u.usteed->mx = u.ux; u.usteed->my = u.uy; exercise_steed(); } -#endif /* * If safepet at destination then move the pet to the hero's @@ -1662,11 +1617,8 @@ invocation_message() struct obj *otmp = carrying(CANDELABRUM_OF_INVOCATION); nomul(0); /* stop running or travelling */ -#ifdef STEED if (u.usteed) Sprintf(buf, "beneath %s", y_monnam(u.usteed)); - else -#endif - if (Levitation || Flying) Strcpy(buf, "beneath you"); + else if (Levitation || Flying) Strcpy(buf, "beneath you"); else Sprintf(buf, "under your %s", makeplural(body_part(FOOT))); You_feel("a strange vibration %s.", buf); @@ -1752,7 +1704,6 @@ boolean newspot; /* true if called by spoteffects */ /* check for entering water or lava */ if (!u.ustuck && !Levitation && !Flying && is_pool_or_lava(u.ux, u.uy)) { -#ifdef STEED if (u.usteed && (is_flyer(u.usteed->data) || is_floater(u.usteed->data) || is_clinger(u.usteed->data))) { /* floating or clinging steed keeps hero safe (is_flyer() test @@ -1770,7 +1721,6 @@ boolean newspot; /* true if called by spoteffects */ return TRUE; } /* not mounted */ -#endif /* STEED */ /* drown(),lava_effects() return true if hero changes location while surviving the problem */ @@ -2266,10 +2216,8 @@ dopickup() if (!can_reach_floor(TRUE)) { if (traphere && uteetering_at_seen_pit(traphere)) You("cannot reach the bottom of the pit."); -#ifdef STEED else if (u.usteed && P_SKILL(P_RIDING) < P_BASIC) rider_cant_reach(); -#endif else if (Blind && !can_reach_floor(TRUE)) You("cannot reach anything here."); else @@ -2578,9 +2526,7 @@ weight_cap() } if (Levitation || Is_airlevel(&u.uz) /* pugh@cornell */ -#ifdef STEED || (u.usteed && strongmonst(u.usteed->data)) -#endif ) carrcap = MAX_CARR_CAP; else { diff --git a/src/invent.c b/src/invent.c index 12847bc7f..c6eea5989 100644 --- a/src/invent.c +++ b/src/invent.c @@ -1252,10 +1252,7 @@ is_worn(otmp) register struct obj *otmp; { return((boolean)(!!(otmp->owornmask & (W_ARMOR | W_RING | W_AMUL | W_TOOL | -#ifdef STEED - W_SADDLE | -#endif - W_WEP | W_SWAPWEP | W_QUIVER)))); + W_SADDLE | W_WEP | W_SWAPWEP | W_QUIVER)))); } /* extra xprname() input that askchain() can't pass through safe_qbuf() */ @@ -2803,11 +2800,7 @@ STATIC_OVL boolean tool_in_use(obj) struct obj *obj; { - if ((obj->owornmask & (W_TOOL -#ifdef STEED - | W_SADDLE -#endif - )) != 0L) return TRUE; + if ((obj->owornmask & (W_TOOL | W_SADDLE)) != 0L) return TRUE; if (obj->oclass != TOOL_CLASS) return FALSE; return (boolean)(obj == uwep || obj->lamplit || (obj->otyp == LEASH && obj->leashmon)); diff --git a/src/lock.c b/src/lock.c index 45be156f6..6e20e20e6 100644 --- a/src/lock.c +++ b/src/lock.c @@ -749,19 +749,11 @@ doclose() /* try to close a door */ } if(door->doormask == D_ISOPEN) { - if(verysmall(youmonst.data) -#ifdef STEED - && !u.usteed -#endif - ) { + if(verysmall(youmonst.data) && !u.usteed) { pline("You're too small to push the door closed."); return res; } - if ( -#ifdef STEED - u.usteed || -#endif - rn2(25) < (ACURRSTR+ACURR(A_DEX)+ACURR(A_CON))/3) { + if ( u.usteed || rn2(25) < (ACURRSTR+ACURR(A_DEX)+ACURR(A_CON))/3) { pline_The("door closes."); door->doormask = D_CLOSED; if (Blind) diff --git a/src/mhitm.c b/src/mhitm.c index 969a50458..a749cfd4d 100644 --- a/src/mhitm.c +++ b/src/mhitm.c @@ -405,12 +405,10 @@ mattackm(magr, mdef) break; case AT_ENGL: -#ifdef STEED if (u.usteed && (mdef == u.usteed)) { strike = 0; break; } -#endif /* Engulfing attacks are directed at the hero if * possible. -dlc */ @@ -956,11 +954,7 @@ mdamagem(magr, mdef, mattk) if (vis) Strcpy(mdef_Monnam, Monnam(mdef)); mdef->mstrategy &= ~STRAT_WAITFORU; (void) rloc(mdef, FALSE); - if (vis && !canspotmon(mdef) -#ifdef STEED - && mdef != u.usteed -#endif - ) + if (vis && !canspotmon(mdef) && mdef != u.usteed) pline("%s suddenly disappears!", mdef_Monnam); } break; @@ -1117,12 +1111,10 @@ mdamagem(magr, mdef, mattk) Strcpy(mdefnambuf, x_monnam(mdef, ARTICLE_THE, (char *)0, 0, FALSE)); otmp = obj; -#ifdef STEED if (u.usteed == mdef && otmp == which_armor(mdef, W_SADDLE)) /* "You can no longer ride ." */ dismount_steed(DISMOUNT_POLY); -#endif obj_extract_self(otmp); if (otmp->owornmask) { mdef->misc_worn_check &= ~otmp->owornmask; diff --git a/src/mhitu.c b/src/mhitu.c index 0a85b86a7..cf5f68bcd 100644 --- a/src/mhitu.c +++ b/src/mhitu.c @@ -323,7 +323,6 @@ mattacku(mtmp) if(u.uinvulnerable) return (0); /* stomachs can't hurt you! */ } -#ifdef STEED else if (u.usteed) { if (mtmp == u.usteed) /* Your steed won't attack you */ @@ -343,7 +342,6 @@ mattacku(mtmp) return (!!(mattackm(u.usteed, mtmp) & MM_DEF_DIED)); } } -#endif if (u.uundetected && !range2 && foundyou && !u.uswallow) { if (!canspotmon(mtmp)) map_invisible(mtmp->mx, mtmp->my); @@ -1145,11 +1143,7 @@ dopois: * still _can_ attack you when you're flying or mounted. * [FIXME: why can't a flying attacker overcome this?] */ - if ( -#ifdef STEED - u.usteed || -#endif - Levitation || Flying) { + if (u.usteed || Levitation || Flying) { pline("%s tries to reach your %s %s!", Monnam(mtmp), sidestr, body_part(LEG)); dmg = 0; @@ -1664,7 +1658,6 @@ gulpmu(mtmp, mattk) /* monster swallows you, or damage if u.uswallow */ place_monster(mtmp, u.ux, u.uy); u.ustuck = mtmp; newsym(mtmp->mx,mtmp->my); -#ifdef STEED if (is_animal(mtmp->data) && u.usteed) { char buf[BUFSZ]; /* Too many quirks presently if hero and steed @@ -1676,8 +1669,7 @@ gulpmu(mtmp, mattk) /* monster swallows you, or damage if u.uswallow */ Monnam(mtmp), buf); dismount_steed(DISMOUNT_ENGULFED); } else -#endif - pline("%s engulfs you!", Monnam(mtmp)); + pline("%s engulfs you!", Monnam(mtmp)); stop_occupation(); reset_occupations(); /* behave as if you had moved */ diff --git a/src/mon.c b/src/mon.c index e3880eafe..917e919c9 100644 --- a/src/mon.c +++ b/src/mon.c @@ -337,12 +337,10 @@ register struct monst *mtmp; !is_flyer(mtmp->data) && !is_floater(mtmp->data); infountain = IS_FOUNTAIN(levl[mtmp->mx][mtmp->my].typ); -#ifdef STEED /* Flying and levitation keeps our steed out of the liquid */ /* (but not water-walking or swimming) */ if (mtmp == u.usteed && (Flying || Levitation)) return (0); -#endif /* Gremlin multiplying won't go on forever since the hit points * keep going down, and when it gets to 1 hit point the clone @@ -449,15 +447,12 @@ struct monst *mon; else if (mon->mspeed == MFAST) mmove = (4 * mmove + 2) / 3; -#ifdef STEED if (mon == u.usteed) { if (u.ugallop && context.mv) { /* average movement is 1.50 times normal */ mmove = ((rn2(2) ? 4 : 5) * mmove) / 3; } - } else -#endif - if (mmove) { + } else if (mmove) { /* vary movement points allocated to slightly reduce predictability; random increment (avg +2) exceeds random decrement (avg +1) by a small amount; normal speed monsters will occasionally get an @@ -958,10 +953,8 @@ struct obj *otmp; (otyp != BELL_OF_OPENING || !is_covetous(mdat))) return FALSE; -#ifdef STEED /* Steeds don't pick up stuff (to avoid shop abuse) */ if (mtmp == u.usteed) return (FALSE); -#endif if (mtmp->isshk) return(TRUE); /* no limit */ if (mtmp->mpeaceful && !mtmp->mtame) return(FALSE); /* otherwise players might find themselves obligated to violate @@ -1313,10 +1306,8 @@ register struct monst *mtmp, *mtmp2; relmon(mtmp, (struct monst **)0); /* finish adding its replacement */ -#ifdef STEED - if (mtmp == u.usteed) ; else /* don't place steed onto the map */ -#endif - place_monster(mtmp2, mtmp2->mx, mtmp2->my); + if (mtmp != u.usteed) /* don't place steed onto the map */ + place_monster(mtmp2, mtmp2->mx, mtmp2->my); if (mtmp2->wormno) /* update level.monsters[wseg->wx][wseg->wy] */ place_wsegs(mtmp2); /* locations to mtmp2 not mtmp. */ if (emits_light(mtmp2->data)) { @@ -1330,9 +1321,7 @@ register struct monst *mtmp, *mtmp2; mtmp2->nmon = fmon; fmon = mtmp2; if (u.ustuck == mtmp) u.ustuck = mtmp2; -#ifdef STEED if (u.usteed == mtmp) u.usteed = mtmp2; -#endif if (mtmp2->isshk) replshk(mtmp,mtmp2); /* discard the old monster */ @@ -1597,11 +1586,9 @@ register struct monst *mtmp; need to do this after life-saving and before m_detach() */ if (mtmp->isgd && !grddead(mtmp)) return; -#ifdef STEED /* Player is thrown from his steed when it dies */ if (mtmp == u.usteed) dismount_steed(DISMOUNT_GENERIC); -#endif mptr = mtmp->data; /* save this for m_detach() */ /* restore chameleon, lycanthropes to true form at death */ @@ -1748,11 +1735,9 @@ mongone(mdef) register struct monst *mdef; { mdef->mhp = 0; /* can skip some inventory bookkeeping */ -#ifdef STEED /* Player is thrown from his steed when it disappears */ if (mdef == u.usteed) dismount_steed(DISMOUNT_GENERIC); -#endif /* drop special items like the Amulet so that a dismissed Kop or nurse can't remove them from the game */ @@ -2121,14 +2106,12 @@ mnexto(mtmp) /* Make monster mtmp next to you (if possible) */ coord mm; boolean couldspot = canspotmon(mtmp); -#ifdef STEED if (mtmp == u.usteed) { /* Keep your steed in sync with you instead */ mtmp->mx = u.ux; mtmp->my = u.uy; return; } -#endif if(!enexto(&mm, u.ux, u.uy, mtmp->data)) return; rloc_to(mtmp, mm.x, mm.y); diff --git a/src/mondata.c b/src/mondata.c index 3016b7adf..2cdf41cef 100644 --- a/src/mondata.c +++ b/src/mondata.c @@ -791,9 +791,7 @@ boolean levl_follower(mtmp) struct monst *mtmp; { -#ifdef STEED if (mtmp == u.usteed) return TRUE; -#endif /* Wizard with Amulet won't bother trying to follow across levels */ if (mtmp->iswiz && mon_has_amulet(mtmp)) return FALSE; diff --git a/src/objects.c b/src/objects.c index ec4483a51..86d65a214 100644 --- a/src/objects.c +++ b/src/objects.c @@ -618,12 +618,8 @@ TOOL("crystal ball", "glass orb", TOOL("lenses", (char *)0, 1, 0, 0, 0, 5, 3, 80, GLASS, HI_GLASS), TOOL("blindfold", (char *)0, 1, 0, 0, 0, 50, 2, 20, CLOTH, CLR_BLACK), TOOL("towel", (char *)0, 1, 0, 0, 0, 50, 2, 50, CLOTH, CLR_MAGENTA), -#ifdef STEED TOOL("saddle", (char *)0, 1, 0, 0, 0, 5,200, 150, LEATHER, HI_LEATHER), TOOL("leash", (char *)0, 1, 0, 0, 0, 65, 12, 20, LEATHER, HI_LEATHER), -#else -TOOL("leash", (char *)0, 1, 0, 0, 0, 70, 12, 20, LEATHER, HI_LEATHER), -#endif TOOL("stethoscope", (char *)0, 1, 0, 0, 0, 25, 4, 75, IRON, HI_METAL), TOOL("tinning kit", (char *)0, 1, 0, 0, 1, 15,100, 30, IRON, HI_METAL), TOOL("tin opener", (char *)0, 1, 0, 0, 0, 35, 4, 30, IRON, HI_METAL), diff --git a/src/objnam.c b/src/objnam.c index d29ad6091..94c2f4fb6 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -772,11 +772,7 @@ plus: /* weptools already get this done when we go to the +n code */ if (!is_weptool(obj)) add_erosion_words(obj, prefix); - if(obj->owornmask & (W_TOOL /* blindfold */ -#ifdef STEED - | W_SADDLE -#endif - )) { + if(obj->owornmask & (W_TOOL /* blindfold */ | W_SADDLE)) { Strcat(bp, " (being worn)"); break; } diff --git a/src/pager.c b/src/pager.c index b3647c7dd..69590754d 100644 --- a/src/pager.c +++ b/src/pager.c @@ -65,10 +65,8 @@ char *outbuf; /* being blinded may hide invisibility from self */ (Invis && (senseself() || !Blind)) ? "invisible " : "", race, mons[u.umonnum].mname, plname); -#ifdef STEED if (u.usteed) Sprintf(eos(outbuf), ", mounted on %s", y_monnam(u.usteed)); -#endif return outbuf; } diff --git a/src/pickup.c b/src/pickup.c index 0fd429bc3..bbc9a925d 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -1516,11 +1516,9 @@ boolean looting; /* loot vs tip */ const char *verb = looting ? "loot" : "tip"; if (!can_reach_floor(TRUE)) { -#ifdef STEED if (u.usteed && P_SKILL(P_RIDING) < P_BASIC) rider_cant_reach(); /* not skilled enough to reach */ else -#endif cant_reach_floor(x, y, FALSE, TRUE); return FALSE; } else if ((is_pool(x, y) && (looting || !Underwater)) || @@ -1777,7 +1775,6 @@ boolean *prev_loot; { int c = -1; int timepassed = 0; -#ifdef STEED struct obj *otmp; char qbuf[QBUFSZ]; @@ -1816,7 +1813,6 @@ boolean *prev_loot; return (0); } } -#endif /* STEED */ /* 3.4.0 introduced the ability to pick things up from within swallower's stomach */ if (u.uswallow) { int count = passed_info ? *passed_info : 0; diff --git a/src/pline.c b/src/pline.c index 2c1612e49..96b14d049 100644 --- a/src/pline.c +++ b/src/pline.c @@ -401,9 +401,7 @@ register struct monst *mtmp; ", digesting you" : is_animal(u.ustuck->data) ? ", swallowing you" : ", engulfing you"); -#ifdef STEED if (mtmp == u.usteed) Strcat(info, ", carrying you"); -#endif /* avoid "Status of the invisible newt ..., invisible" */ /* and unlike a normal mon_nam, use "saddled" even if it has a name */ @@ -451,10 +449,7 @@ ustatusline() } /* note: "goop" == "glop"; variation is intentional */ } if (Stunned) Strcat(info, ", stunned"); -#ifdef STEED - if (!u.usteed) -#endif - if (Wounded_legs) { + if (!u.usteed && Wounded_legs) { const char *what = body_part(LEG); if ((Wounded_legs & BOTH_SIDES) == BOTH_SIDES) what = makeplural(what); diff --git a/src/polyself.c b/src/polyself.c index 0e348035a..c1b2c99c4 100644 --- a/src/polyself.c +++ b/src/polyself.c @@ -691,7 +691,6 @@ int mntmp; if (!sticky && !u.uswallow && u.ustuck && sticks(youmonst.data)) u.ustuck = 0; else if (sticky && !sticks(youmonst.data)) uunstick(); -#ifdef STEED if (u.usteed) { if (touch_petrifies(u.usteed->data) && !Stone_resistance && rnl(3)) { @@ -704,7 +703,6 @@ int mntmp; } if (!can_ride(u.usteed)) dismount_steed(DISMOUNT_POLY); } -#endif if (flags.verbose) { static const char use_thec[] = "Use the command #%s to %s."; diff --git a/src/potion.c b/src/potion.c index 582409711..396dbfa53 100644 --- a/src/potion.c +++ b/src/potion.c @@ -90,11 +90,9 @@ boolean talk; } if (xtime && !old) { if (talk) { -#ifdef STEED if (u.usteed) You("wobble in the saddle."); else -#endif You("%s...", stagger(youmonst.data, "stagger")); } } @@ -676,10 +674,8 @@ peffects(otmp) else { if (Levitation || Is_airlevel(&u.uz)||Is_waterlevel(&u.uz)) You("are motionlessly suspended."); -#ifdef STEED else if (u.usteed) You("are frozen in place!"); -#endif else Your("%s are frozen to the %s!", makeplural(body_part(FOOT)), surface(u.ux, u.uy)); @@ -814,11 +810,8 @@ peffects(otmp) } break; case POT_SPEED: - if(Wounded_legs && !otmp->cursed -#ifdef STEED - && !u.usteed /* heal_legs() would heal steeds legs */ -#endif - ) { + if(Wounded_legs && !otmp->cursed && !u.usteed) { + /* heal_legs() would heal steeds legs */ heal_legs(); unkn++; break; @@ -1143,10 +1136,8 @@ boolean your_fault; register const char *botlnam = bottlename(); boolean isyou = (mon == &youmonst); int distance; -#ifdef STEED struct obj *saddle = (struct obj *)0; boolean hit_saddle = FALSE; -#endif if(isyou) { distance = 0; @@ -1154,7 +1145,6 @@ boolean your_fault; botlnam, body_part(HEAD)); losehp(Maybe_Half_Phys(rnd(2)), "thrown potion", KILLED_BY_AN); } else { -#ifdef STEED /* sometimes it hits the saddle */ if(((mon->misc_worn_check & W_SADDLE) && (saddle = which_armor(mon, W_SADDLE))) && @@ -1163,21 +1153,17 @@ boolean your_fault; ((rnl(10) > 7 && obj->cursed) || (rnl(10) < 4 && obj->blessed) || !rn2(3))))) hit_saddle = TRUE; -#endif distance = distu(mon->mx,mon->my); if (!cansee(mon->mx,mon->my)) pline("Crash!"); else { char *mnam = mon_nam(mon); char buf[BUFSZ]; -#ifdef STEED if(hit_saddle && saddle) { Sprintf(buf, "%s saddle", s_suffix(x_monnam(mon, ARTICLE_THE, (char *)0, (SUPPRESS_IT|SUPPRESS_SADDLE), FALSE))); - } else -#endif - if(has_head(mon->data)) { + } else if(has_head(mon->data)) { Sprintf(buf, "%s %s", s_suffix(mnam), (notonhead ? "body" : "head")); @@ -1187,20 +1173,12 @@ boolean your_fault; pline_The("%s crashes on %s and breaks into shards.", botlnam, buf); } - if(rn2(5) && mon->mhp > 1 -#ifdef STEED - && !hit_saddle -#endif - ) + if(rn2(5) && mon->mhp > 1 && !hit_saddle) mon->mhp--; } /* oil doesn't instantly evaporate; Neither does a saddle hit */ - if (obj->otyp != POT_OIL && -#ifdef STEED - !hit_saddle && -#endif - cansee(mon->mx,mon->my)) + if (obj->otyp != POT_OIL && !hit_saddle && cansee(mon->mx,mon->my)) pline("%s.", Tobjnam(obj, "evaporate")); if (isyou) { @@ -1224,7 +1202,6 @@ boolean your_fault; } break; } -#ifdef STEED } else if (hit_saddle && saddle) { char *mnam, buf[BUFSZ], saddle_glows[BUFSZ]; boolean affected = FALSE; @@ -1245,7 +1222,6 @@ boolean your_fault; } if (useeit && !affected) pline("%s %s wet.", buf, aobjnam(saddle, "get")); -#endif } else { boolean angermon = TRUE; @@ -1777,11 +1753,9 @@ dodip() if (yn(upstart(qtoo)) == 'y') { if (Levitation) { floating_above(pooltype); -#ifdef STEED } else if (u.usteed && !is_swimmer(u.usteed->data) && P_SKILL(P_RIDING) < P_BASIC) { rider_cant_reach(); /* not skilled enough to reach */ -#endif } else { if (obj->otyp == POT_ACID) obj->in_use = 1; (void) get_wet(obj); diff --git a/src/pray.c b/src/pray.c index 602abee59..b5312c25a 100644 --- a/src/pray.c +++ b/src/pray.c @@ -207,12 +207,10 @@ in_trouble() Cursed_obj(uarmf, FUMBLE_BOOTS)) return TROUBLE_FUMBLING; if (worst_cursed_item()) return TROUBLE_CURSED_ITEMS; -#ifdef STEED if (u.usteed) { /* can't voluntarily dismount from a cursed saddle */ otmp = which_armor(u.usteed, W_SADDLE); if (Cursed_obj(otmp, SADDLE)) return TROUBLE_SADDLE; } -#endif if (Blinded > 1 && haseyes(youmonst.data) && (!u.uswallow || @@ -220,11 +218,7 @@ in_trouble() return(TROUBLE_BLIND); for(i=0; i= HUNGRY) return TROUBLE_HUNGRY; if (HStun & TIMEOUT) return TROUBLE_STUNNED; if (HConfusion & TIMEOUT) return TROUBLE_CONFUSED; @@ -483,7 +477,6 @@ decurse: pline ("Looks like you are back in Kansas."); (void) make_hallucinated(0L,FALSE,0L); break; -#ifdef STEED case TROUBLE_SADDLE: otmp = which_armor(u.usteed, W_SADDLE); if (!Blind) { @@ -493,7 +486,6 @@ decurse: } uncurse(otmp); break; -#endif } } diff --git a/src/read.c b/src/read.c index 3564d6cec..40b40f2d9 100644 --- a/src/read.c +++ b/src/read.c @@ -1126,10 +1126,7 @@ struct obj *sobj; /* scroll, or fake spellbook object for scroll-like spell */ for (i = -bd; i <= bd; i++) for(j = -bd; j <= bd; j++) { if (!isok(u.ux + i, u.uy + j)) continue; if ((mtmp = m_at(u.ux + i, u.uy + j)) != 0 -#ifdef STEED - || (!i && !j && (mtmp = u.usteed) != 0) -#endif - ) { + || (!i && !j && (mtmp = u.usteed) != 0)) { ++candidates; res = maybe_tame(mtmp, sobj); results += res; diff --git a/src/restore.c b/src/restore.c index 2297127c0..dc883c6da 100644 --- a/src/restore.c +++ b/src/restore.c @@ -516,7 +516,7 @@ STATIC_OVL boolean restgamestate(fd, stuckid, steedid) register int fd; -unsigned int *stuckid, *steedid; /* STEED */ +unsigned int *stuckid, *steedid; { struct flag newgameflags; #ifdef SYSFLAGS @@ -652,10 +652,8 @@ unsigned int *stuckid, *steedid; /* STEED */ restore_oracles(fd); if (u.ustuck) mread(fd, (genericptr_t) stuckid, sizeof (*stuckid)); -#ifdef STEED if (u.usteed) mread(fd, (genericptr_t) steedid, sizeof (*steedid)); -#endif mread(fd, (genericptr_t) pl_character, sizeof pl_character); mread(fd, (genericptr_t) pl_fruit, sizeof pl_fruit); @@ -676,7 +674,7 @@ unsigned int *stuckid, *steedid; /* STEED */ */ STATIC_OVL void restlevelstate(stuckid, steedid) -unsigned int stuckid, steedid; /* STEED */ +unsigned int stuckid, steedid; { register struct monst *mtmp; @@ -686,7 +684,6 @@ unsigned int stuckid, steedid; /* STEED */ if (!mtmp) panic("Cannot find the monster ustuck."); u.ustuck = mtmp; } -#ifdef STEED if (steedid) { for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) if (mtmp->m_id == steedid) break; @@ -694,7 +691,6 @@ unsigned int stuckid, steedid; /* STEED */ u.usteed = mtmp; remove_monster(mtmp->mx, mtmp->my); } -#endif } /*ARGSUSED*/ /* fd used in MFLOPPY only */ @@ -793,9 +789,7 @@ register int fd; * place_monster() on other levels */ u.ustuck = (struct monst *)0; -#ifdef STEED u.usteed = (struct monst *)0; -#endif #ifdef MICRO # ifdef AMII_GRAPHICS diff --git a/src/save.c b/src/save.c index a4055c915..f8f5d40b0 100644 --- a/src/save.c +++ b/src/save.c @@ -231,9 +231,7 @@ dosave0() store_savefileinfo(fd); store_plname_in_file(fd); ustuck_id = (u.ustuck ? u.ustuck->m_id : 0); -#ifdef STEED usteed_id = (u.usteed ? u.usteed->m_id : 0); -#endif savelev(fd, ledger_no(&u.uz), WRITE_SAVE | FREE_SAVE); savegamestate(fd, WRITE_SAVE | FREE_SAVE); @@ -248,9 +246,7 @@ dosave0() * may mislead place_monster() on other levels */ u.ustuck = (struct monst *)0; -#ifdef STEED u.usteed = (struct monst *)0; -#endif for(ltmp = (xchar)1; ltmp <= maxledgerno(); ltmp++) { if (ltmp == ledger_no(&uz_save)) continue; @@ -356,10 +352,8 @@ register int fd, mode; save_oracles(fd, mode); if(ustuck_id) bwrite(fd, (genericptr_t) &ustuck_id, sizeof ustuck_id); -#ifdef STEED if(usteed_id) bwrite(fd, (genericptr_t) &usteed_id, sizeof usteed_id); -#endif bwrite(fd, (genericptr_t) pl_character, sizeof pl_character); bwrite(fd, (genericptr_t) pl_fruit, sizeof pl_fruit); savefruitchn(fd, mode); @@ -433,9 +427,7 @@ savestateinlock() store_plname_in_file(fd); ustuck_id = (u.ustuck ? u.ustuck->m_id : 0); -#ifdef STEED usteed_id = (u.usteed ? u.usteed->m_id : 0); -#endif savegamestate(fd, WRITE_SAVE); } bclose(fd); diff --git a/src/shk.c b/src/shk.c index 944098c3a..7a4edcbdc 100644 --- a/src/shk.c +++ b/src/shk.c @@ -619,13 +619,11 @@ char *enterstring; "Leave the %s%s outside.", tool, plur(cnt)); should_block = TRUE; -#ifdef STEED } else if (u.usteed) { - verbalize(NOTANGRY(shkp) ? - "Will you please leave %s outside?" : - "Leave %s outside.", y_monnam(u.usteed)); - should_block = TRUE; -#endif + verbalize(NOTANGRY(shkp) ? + "Will you please leave %s outside?" : + "Leave %s outside.", y_monnam(u.usteed)); + should_block = TRUE; } else { should_block = (Fast && (sobj_at(PICK_AXE, u.ux, u.uy) || sobj_at(DWARVISH_MATTOCK, u.ux, u.uy))); @@ -3512,11 +3510,7 @@ register struct monst *shkp; avoid = FALSE; } else { #define GDIST(x,y) (dist2(x,y,gx,gy)) - if (Invis -#ifdef STEED - || u.usteed -#endif - ) { + if (Invis || u.usteed) { avoid = FALSE; } else { uondoor = (u.ux == eshkp->shd.x && u.uy == eshkp->shd.y); @@ -4285,9 +4279,7 @@ register xchar x, y; && shkp->mcanmove && !shkp->msleeping && (x == sx-1 || x == sx+1 || y == sy-1 || y == sy+1) && (Invis || carrying(PICK_AXE) || carrying(DWARVISH_MATTOCK) -#ifdef STEED || u.usteed -#endif )) { pline("%s%s blocks your way!", shkname(shkp), Invis ? " senses your motion and" : ""); diff --git a/src/sit.c b/src/sit.c index 154248392..4b8e2e7d1 100644 --- a/src/sit.c +++ b/src/sit.c @@ -363,7 +363,6 @@ rndcurse() /* curse a few inventory items at random! */ update_inventory(); } -#ifdef STEED /* treat steed's saddle as extended part of hero's inventory */ if (u.usteed && !rn2(4) && (otmp = which_armor(u.usteed, W_SADDLE)) != 0 && @@ -379,7 +378,6 @@ rndcurse() /* curse a few inventory items at random! */ otmp->bknown = TRUE; } } -#endif /*STEED*/ } void diff --git a/src/sounds.c b/src/sounds.c index b599f814e..27749d8b0 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -974,15 +974,13 @@ dochat() return(0); } -#ifdef STEED if (u.usteed && u.dz > 0) { - if (!u.usteed->mcanmove || u.usteed->msleeping) { - pline("%s seems not to notice you.", Monnam(u.usteed)); - return(1); - } else - return (domonnoise(u.usteed)); + if (!u.usteed->mcanmove || u.usteed->msleeping) { + pline("%s seems not to notice you.", Monnam(u.usteed)); + return(1); + } else + return (domonnoise(u.usteed)); } -#endif if (u.dz) { pline("They won't hear you %s there.", u.dz < 0 ? "up" : "down"); diff --git a/src/steal.c b/src/steal.c index f762ec18f..884b4135c 100644 --- a/src/steal.c +++ b/src/steal.c @@ -50,16 +50,15 @@ register struct monst *mtmp; mtmp->mgold += gold->quan; delobj(gold); newsym(u.ux, u.uy); -#ifdef STEED - if (u.usteed) - who = u.usteed, - whose = s_suffix(y_monnam(who)), - what = makeplural(mbodypart(who, FOOT)); - else -#endif - who = &youmonst, - whose = "your", - what = makeplural(body_part(FOOT)); + if (u.usteed) { + who = u.usteed; + whose = s_suffix(y_monnam(who)); + what = makeplural(mbodypart(who, FOOT)); + } else { + who = &youmonst; + whose = "your"; + what = makeplural(body_part(FOOT)); + } /* [ avoid "between your rear regions" :-] */ if (slithy(who->data)) what = "coils"; /* reduce "rear hooves/claws" to "hooves/claws" */ @@ -137,16 +136,15 @@ register struct monst *mtmp; obj_extract_self(fgold); add_to_minv(mtmp, fgold); newsym(u.ux, u.uy); -#ifdef STEED - if (u.usteed) - who = u.usteed, - whose = s_suffix(y_monnam(who)), - what = makeplural(mbodypart(who, FOOT)); - else -#endif - who = &youmonst, - whose = "your", - what = makeplural(body_part(FOOT)); + if (u.usteed) { + who = u.usteed; + whose = s_suffix(y_monnam(who)); + what = makeplural(mbodypart(who, FOOT)); + } else { + who = &youmonst; + whose = "your"; + what = makeplural(body_part(FOOT)); + } /* [ avoid "between your rear regions" :-] */ if (slithy(who->data)) what = "coils"; /* reduce "rear hooves/claws" to "hooves/claws" */ @@ -639,7 +637,6 @@ boolean verbosely; if (mon->mhp > 0) { mon->misc_worn_check &= ~obj->owornmask; update_mon = TRUE; -#ifdef STEED /* don't charge for an owned saddle on dead steed (provided that the hero is within the same shop at the time) */ } else if (mon->mtame && (obj->owornmask & W_SADDLE) && @@ -647,7 +644,6 @@ boolean verbosely; /* being at a costly_spot guarantees lev->roomno is not 0 */ index(in_rooms(u.ux, u.uy, SHOPBASE), levl[omx][omy].roomno)) { obj->no_charge = 1; -#endif } /* this should be done even if the monster has died */ if (obj->owornmask & W_WEP) setmnotwielded(mon, obj); diff --git a/src/steed.c b/src/steed.c index d42c2957d..afd4579dc 100644 --- a/src/steed.c +++ b/src/steed.c @@ -5,9 +5,6 @@ #include "hack.h" - -#ifdef STEED - /* Monsters that might be ridden */ static NEARDATA const char steeds[] = { S_QUADRUPED, S_UNICORN, S_ANGEL, S_CENTAUR, S_DRAGON, S_JABBERWOCK, '\0' @@ -698,6 +695,4 @@ int x, y; level.monsters[x][y] = mon; } -#endif /* STEED */ - /*steed.c*/ diff --git a/src/teleport.c b/src/teleport.c index 608e38374..158bd752c 100644 --- a/src/teleport.c +++ b/src/teleport.c @@ -39,10 +39,7 @@ unsigned gpflags; * oh well. */ if (mtmp != &youmonst && x == u.ux && y == u.uy -#ifdef STEED - && (!u.usteed || mtmp != u.usteed) -#endif - ) + && (!u.usteed || mtmp != u.usteed)) return FALSE; if (mtmp) { @@ -379,10 +376,8 @@ boolean force_it; { register struct obj *otmp; -#ifdef STEED if (mtmp == u.usteed) return (FALSE); -#endif if (mtmp->mleashed) { otmp = get_mleash(mtmp); @@ -454,10 +449,8 @@ struct obj *scroll; char whobuf[BUFSZ]; Strcpy(whobuf, "you"); -#ifdef STEED if (u.usteed) Sprintf(eos(whobuf), " and %s", mon_nam(u.usteed)); -#endif pline("To what position do %s want to be teleported?", whobuf); cc.x = u.ux; @@ -1032,12 +1025,10 @@ boolean suppress_impossible; { register int x, y, trycount; -#ifdef STEED if (mtmp == u.usteed) { tele(); return TRUE; } -#endif if (mtmp->iswiz && mtmp->mx) { /* Wizard, not just arriving */ if (!In_W_tower(u.ux, u.uy, &u.uz)) diff --git a/src/timeout.c b/src/timeout.c index 80d9a4da6..6e2b0f95e 100644 --- a/src/timeout.c +++ b/src/timeout.c @@ -236,12 +236,10 @@ nh_timeout() } } -#ifdef STEED if (u.ugallop) { if (--u.ugallop == 0L && u.usteed) pline("%s stops galloping.", Monnam(u.usteed)); } -#endif for(upp = u.uprops; upp < u.uprops+SIZE(u.uprops); upp++) if((upp->intrinsic & TIMEOUT) && !(--upp->intrinsic & TIMEOUT)) { @@ -671,9 +669,7 @@ slip_or_trip() const char *what; char buf[BUFSZ]; boolean on_foot = TRUE; -#ifdef STEED if (u.usteed) on_foot = FALSE; -#endif if (otmp && on_foot && !u.uinwater && is_pool(u.ux, u.uy)) otmp = 0; @@ -707,11 +703,9 @@ slip_or_trip() } } else if (rn2(3) && is_ice(u.ux, u.uy)) { pline("%s %s%s on the ice.", -#ifdef STEED u.usteed ? upstart(x_monnam(u.usteed, (has_mname(u.usteed)) ? ARTICLE_NONE : ARTICLE_THE, (char *)0, SUPPRESS_SADDLE, FALSE)) : -#endif "You", rn2(2) ? "slip" : "slide", on_foot ? "" : "s"); } else { if (on_foot) { @@ -732,7 +726,6 @@ slip_or_trip() break; } } -#ifdef STEED else { switch (rn2(4)) { case 1: @@ -750,7 +743,6 @@ slip_or_trip() } dismount_steed(DISMOUNT_FELL); } -#endif } } diff --git a/src/trap.c b/src/trap.c index 275776926..e14ffec6f 100644 --- a/src/trap.c +++ b/src/trap.c @@ -30,11 +30,9 @@ STATIC_DCL char *FDECL(trapnote, (struct trap *,BOOLEAN_P)); STATIC_DCL void FDECL(join_adjacent_pits, (struct trap *)); #endif STATIC_DCL void FDECL(clear_conjoined_pits, (struct trap *)); -#ifdef STEED STATIC_DCL int FDECL(steedintrap, (struct trap *, struct obj *)); STATIC_DCL boolean FDECL(keep_saddle_with_steedcorpse, (unsigned, struct obj *, struct obj *)); -#endif STATIC_DCL void NDECL(maybe_finish_sokoban); /* mintrap() should take a flags argument, but for time being we use this */ @@ -651,7 +649,6 @@ boolean shatter; return mtmp; } -#ifdef STEED STATIC_OVL boolean keep_saddle_with_steedcorpse(steed_mid, objchn, saddle) unsigned steed_mid; @@ -679,7 +676,6 @@ struct obj *objchn, *saddle; } return FALSE; } -#endif /*STEED*/ void dotrap(trap, trflags) @@ -695,9 +691,7 @@ unsigned trflags; plunged = (trflags & TOOKPLUNGE) != 0, adj_pit = conjoined_pits(trap, t_at(u.ux0,u.uy0), TRUE); int oldumort; -#ifdef STEED int steed_article = ARTICLE_THE; -#endif nomul(0); @@ -736,7 +730,6 @@ unsigned trflags; } } -#ifdef STEED if (u.usteed) { u.usteed->mtrapseen |= (1 << (ttype - 1)); /* suppress article in various steed messages when using its @@ -744,7 +737,6 @@ unsigned trflags; if (has_mname(u.usteed) && !Hallucination) steed_article = ARTICLE_NONE; } -#endif switch(ttype) { case ARROW_TRAP: @@ -761,11 +753,8 @@ unsigned trflags; otmp->quan = 1L; otmp->owt = weight(otmp); otmp->opoisoned = 0; -#ifdef STEED if (u.usteed && !rn2(2) && steedintrap(trap, otmp)) /* nothing */; - else -#endif - if (thitu(8, dmgval(otmp, &youmonst), otmp, "arrow")) { + else if (thitu(8, dmgval(otmp, &youmonst), otmp, "arrow")) { obfree(otmp, (struct obj *)0); } else { place_object(otmp, u.ux, u.uy); @@ -789,11 +778,8 @@ unsigned trflags; otmp->owt = weight(otmp); if (!rn2(6)) otmp->opoisoned = 1; oldumort = u.umortality; -#ifdef STEED if (u.usteed && !rn2(2) && steedintrap(trap, otmp)) /* nothing */; - else -#endif - if (thitu(7, dmgval(otmp, &youmonst), otmp, "little dart")) { + else if (thitu(7, dmgval(otmp, &youmonst), otmp, "little dart")) { if (otmp->opoisoned) poisoned("dart", A_CON, "little dart", /* if damage triggered life-saving, @@ -876,27 +862,20 @@ unsigned trflags; A_Your[trap->madeby_u]); break; } - if( -#ifdef STEED - !u.usteed && -#endif - youmonst.data->msize <= MZ_SMALL) { + if( !u.usteed && youmonst.data->msize <= MZ_SMALL) { pline("%s bear trap closes harmlessly over you.", A_Your[trap->madeby_u]); break; } u.utrap = rn1(4, 4); u.utraptype = TT_BEARTRAP; -#ifdef STEED if (u.usteed) { pline("%s bear trap closes on %s %s!", A_Your[trap->madeby_u], s_suffix(mon_nam(u.usteed)), mbodypart(u.usteed, FOOT)); if (thitm(0, u.usteed, (struct obj *)0, dmg, FALSE)) u.utrap = 0; /* steed died, hero not trapped */ - } else -#endif - { + } else { pline("%s bear trap closes on your %s!", A_Your[trap->madeby_u], body_part(FOOT)); if(u.umonnum == PM_OWLBEAR || u.umonnum == PM_BUGBEAR) @@ -915,9 +894,7 @@ unsigned trflags; pline("A cloud of gas puts you to sleep!"); fall_asleep(-rnd(25), TRUE); } -#ifdef STEED (void) steedintrap(trap, (struct obj *)0); -#endif break; case RUST_TRAP: @@ -1008,7 +985,6 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst); } if (!Sokoban) { char verbbuf[BUFSZ]; -#ifdef STEED if (u.usteed) { if ((trflags & RECURSIVETRAP) != 0) Sprintf(verbbuf, "and %s fall", @@ -1018,9 +994,7 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst); Sprintf(verbbuf, "lead %s", x_monnam(u.usteed, steed_article, "poor", SUPPRESS_SADDLE, FALSE)); - } else -#endif - if (adj_pit) { + } else if (adj_pit) { You("move into an adjacent pit."); } else { Strcpy(verbbuf, !plunged ? "fall" : @@ -1038,7 +1012,6 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst); pline("How pitiful. Isn't that the pits?"); if (ttype == SPIKED_PIT) { const char *predicament = "on a set of sharp iron spikes"; -#ifdef STEED if (u.usteed) { pline("%s %s %s!", upstart(x_monnam(u.usteed, steed_article, @@ -1046,14 +1019,11 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst); adj_pit ? "steps" : "lands", predicament); } else -#endif - You("%s %s!", adj_pit ? "step" : "land", predicament); + You("%s %s!", adj_pit ? "step" : "land", predicament); } u.utrap = rn1(6,2); u.utraptype = TT_PIT; -#ifdef STEED if (!steedintrap(trap, (struct obj *)0)) { -#endif if (ttype == SPIKED_PIT) { oldumort = u.umortality; losehp(Maybe_Half_Phys(rnd(adj_pit ? 6 : 10)), @@ -1086,9 +1056,7 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst); vision_full_recalc = 1; /* vision limits change */ exercise(A_STR, FALSE); exercise(A_DEX, FALSE); -#ifdef STEED } -#endif break; case HOLE: case TRAPDOOR: @@ -1139,12 +1107,10 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst); if (forcetrap) { Strcpy(verbbuf, "are caught by"); -#ifdef STEED } else if (u.usteed) { Sprintf(verbbuf, "lead %s into", x_monnam(u.usteed, steed_article, "poor", SUPPRESS_SADDLE, FALSE)); -#endif } else { Sprintf(verbbuf, "%s into", Levitation ? (const char *)"float" : @@ -1158,7 +1124,6 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst); { register int str = ACURR(A_STR); -#ifdef STEED /* If mounted, the steed gets trapped. Use mintrap * to do all the work. If mtrapped is set as a result, * unset it and set utrap instead. In the case of a @@ -1183,7 +1148,6 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst); webmsgok = FALSE; /* mintrap printed the messages */ } -#endif if (str <= 3) u.utrap = rn1(6,6); else if (str < 6) u.utrap = rn1(6,4); else if (str < 9) u.utrap = rn1(4,4); @@ -1216,9 +1180,7 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst); u.uen = (u.uenmax += 2); break; } else domagictrap(); -#ifdef STEED (void) steedintrap(trap, (struct obj *)0); -#endif break; case ANTI_MAGIC: @@ -1258,13 +1220,11 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst); case POLY_TRAP: { char verbbuf[BUFSZ]; seetrap(trap); -#ifdef STEED if (u.usteed) Sprintf(verbbuf, "lead %s", x_monnam(u.usteed, steed_article, (char *)0, SUPPRESS_SADDLE, FALSE)); else -#endif Sprintf(verbbuf,"%s", Levitation ? (const char *)"float" : locomotion(youmonst.data, "step")); @@ -1274,9 +1234,7 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst); You_feel("momentarily different."); /* Trap did nothing; don't remove it --KAA */ } else { -#ifdef STEED (void) steedintrap(trap, (struct obj *)0); -#endif deltrap(trap); /* delete trap before polymorph */ newsym(u.ux,u.uy); /* get rid of trap symbol */ You_feel("a change coming over you."); @@ -1285,10 +1243,8 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst); break; } case LANDMINE: { -#ifdef STEED unsigned steed_mid = 0; struct obj *saddle = 0; -#endif if ((Levitation || Flying) && !forcetrap) { if (!already_seen && rn2(3)) break; feeltrap(trap); @@ -1303,7 +1259,6 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst); already_seen ? a_your[trap->madeby_u] : "", already_seen ? " land mine" : "it"); } else { -#ifdef STEED /* prevent landmine from killing steed, throwing you to * the ground, and you being affected again by the same * mine because it hasn't been deleted yet @@ -1311,26 +1266,21 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst); static boolean recursive_mine = FALSE; if (recursive_mine) break; -#endif feeltrap(trap); pline("KAABLAMM!!! You triggered %s land mine!", a_your[trap->madeby_u]); -#ifdef STEED if (u.usteed) steed_mid = u.usteed->m_id; recursive_mine = TRUE; (void) steedintrap(trap, (struct obj *)0); recursive_mine = FALSE; saddle = sobj_at(SADDLE,u.ux, u.uy); -#endif set_wounded_legs(LEFT_SIDE, rn1(35, 41)); set_wounded_legs(RIGHT_SIDE, rn1(35, 41)); exercise(A_DEX, FALSE); } blow_up_landmine(trap); -#ifdef STEED if (steed_mid && saddle && !u.usteed) (void)keep_saddle_with_steedcorpse(steed_mid, fobj, saddle); -#endif newsym(u.ux,u.uy); /* update trap symbol */ losehp(Maybe_Half_Phys(rnd(16)), "land mine", KILLED_BY_AN); /* fall recursively into the pit... */ @@ -1383,7 +1333,6 @@ boolean noprefix; return tnbuf; } -#ifdef STEED STATIC_OVL int steedintrap(trap, otmp) struct trap *trap; @@ -1460,7 +1409,6 @@ struct obj *otmp; } return steedhit ? 1 : 0; } -#endif /*STEED*/ /* some actions common to both player and monsters for triggered landmine */ void @@ -1964,10 +1912,8 @@ register struct monst *mtmp; Sokoban && !trap->madeby_u); const char *fallverb; -#ifdef STEED /* true when called from dotrap, inescapable is not an option */ if (mtmp == u.usteed) inescapable = TRUE; -#endif if (!inescapable && ((mtmp->mtrapseen & (1 << (tt-1))) != 0 || (tt == HOLE && !mindless(mptr)))) { @@ -1983,10 +1929,8 @@ register struct monst *mtmp; in_sight = canseemon(mtmp); see_it = cansee(mtmp->mx, mtmp->my); -#ifdef STEED /* assume hero can tell what's going on for the steed */ if (mtmp == u.usteed) in_sight = TRUE; -#endif switch (tt) { case ARROW_TRAP: if (trap->once && trap->tseen && !rn2(15)) { @@ -2633,7 +2577,6 @@ float_up() You("gain control over your movements."); else You("start to float in the air!"); -#ifdef STEED if (u.usteed && !is_floater(u.usteed->data) && !is_flyer(u.usteed->data)) { if (Lev_at_will) @@ -2643,7 +2586,6 @@ float_up() dismount_steed(DISMOUNT_GENERIC); } } -#endif if (Flying) You("are no longer able to control your flight."); BFlying |= I_SPECIAL; return; @@ -2744,10 +2686,7 @@ long hmask, emask; /* might cancel timeout */ You_feel("heavier."); /* u.uinwater msgs already in spoteffects()/drown() */ else if (!u.uinwater && !no_msg) { -#ifdef STEED - if (!(emask & W_SADDLE)) -#endif - { + if (!(emask & W_SADDLE)) { if (Sokoban && trap) { /* Justification elsewhere for Sokoban traps * is based on air currents. This is @@ -2761,15 +2700,11 @@ long hmask, emask; /* might cancel timeout */ else You("fall over."); losehp(rnd(2), "dangerous winds", KILLED_BY); -#ifdef STEED if (u.usteed) dismount_steed(DISMOUNT_FELL); -#endif selftouch("As you fall, you"); -#ifdef STEED } else if (u.usteed && (is_floater(u.usteed->data) || is_flyer(u.usteed->data))) { You("settle more firmly in the saddle."); -#endif } else if (Hallucination) pline("Bummer! You've %s.", is_pool(u.ux,u.uy) ? "splashed down" : @@ -2834,19 +2769,15 @@ climb_pit() You("%s to the edge of the pit.", (Sokoban && Levitation) ? "struggle against the air currents and float" : -#ifdef STEED u.usteed ? "ride" : -#endif "crawl"); fill_pit(u.ux, u.uy); vision_full_recalc = 1; /* vision limits change */ } else if (u.dz || flags.verbose) { -#ifdef STEED if (u.usteed) Norep("%s is still in a pit.", upstart(y_monnam(u.usteed))); else -#endif Norep((Hallucination && !rn2(5)) ? "You've fallen, and you can't get up." : "You are still in a pit."); @@ -3361,13 +3292,11 @@ drown() return(TRUE); } else pline_The("attempted teleport spell fails."); } -#ifdef STEED if (u.usteed) { dismount_steed(DISMOUNT_GENERIC); if(!is_pool(u.ux,u.uy)) return(TRUE); } -#endif crawl_ok = FALSE; x = y = 0; /* lint suppression */ /* if sleeping, wake up now so that we don't crawl out of water @@ -3603,11 +3532,9 @@ boolean force_failure; } /* untrappable traps are located on the ground. */ if (!can_reach_floor(TRUE)) { -#ifdef STEED if (u.usteed && P_SKILL(P_RIDING) < P_BASIC) rider_cant_reach(); else -#endif You("are unable to reach the %s!", defsyms[trap_to_defsym(ttype)].explanation); return 0; @@ -3627,12 +3554,10 @@ boolean force_failure; if (ttmp2) { pline_The("webbing sticks to you. You're caught too!"); dotrap(ttmp2, NOWEBMSG); -#ifdef STEED if (u.usteed && u.utrap) { /* you, not steed, are trapped */ dismount_steed(DISMOUNT_FELL); } -#endif } } else pline("%s remains entangled.", Monnam(mtmp)); @@ -3937,9 +3862,7 @@ boolean force; useplural ? "are" : "is", the_trap, here ? "here" : "there", useplural ? "them" : "it", -#ifdef STEED u.usteed ? " while mounted" : -#endif ""); trap_skipped = (ttmp != 0); } else { /* deal_with_floor_trap */ @@ -4131,9 +4054,7 @@ boolean *noticed; /* set to true iff hero notices the effect; */ const char *trapdescr, *which; boolean ishero = (mon == &youmonst); -#ifdef STEED if (mon == u.usteed) ishero = TRUE; -#endif t = t_at(ishero ? u.ux : mon->mx, ishero ? u.uy : mon->my); /* if no trap here or it's not a holding trap, we're done */ if (!t || (t->ttyp != BEAR_TRAP && t->ttyp != WEB)) return FALSE; @@ -4148,11 +4069,9 @@ boolean *noticed; /* set to true iff hero notices the effect; */ *noticed = TRUE; /* give message only if trap was the expected type */ if (u.utraptype == TT_BEARTRAP || u.utraptype == TT_WEB) { -#ifdef STEED if (u.usteed) Sprintf(buf, "%s is", noit_Monnam(u.usteed)); else -#endif Strcpy(buf, "You are"); pline("%s released from %s %s.", buf, which, trapdescr); } @@ -4188,9 +4107,7 @@ boolean *noticed; /* set to true iff hero notices the effect; */ unsigned dotrapflags; boolean ishero = (mon == &youmonst), result; -#ifdef STEED if (mon == u.usteed) ishero = TRUE; -#endif t = t_at(ishero ? u.ux : mon->mx, ishero ? u.uy : mon->my); /* if no trap here or it's not a holding trap, we're done */ if (!t || (t->ttyp != BEAR_TRAP && t->ttyp != WEB)) return FALSE; @@ -4199,10 +4116,8 @@ boolean *noticed; /* set to true iff hero notices the effect; */ if (u.utrap) return FALSE; /* already trapped */ *noticed = TRUE; dotrapflags = FORCETRAP; -#ifdef STEED /* dotrap calls mintrap when mounted hero encounters a web */ if (u.usteed) dotrapflags |= NOWEBMSG; -#endif ++force_mintrap; dotrap(t, dotrapflags); --force_mintrap; @@ -4230,9 +4145,7 @@ boolean *noticed; /* set to true iff hero notices the effect; */ struct trap *t; boolean ishero = (mon == &youmonst), result; -#ifdef STEED if (mon == u.usteed) ishero = TRUE; -#endif t = t_at(ishero ? u.ux : mon->mx, ishero ? u.uy : mon->my); /* if no trap here or it's not a falling trap, we're done (note: falling rock traps have a trapdoor in the ceiling) */ diff --git a/src/u_init.c b/src/u_init.c index 59ba3c23a..621f0d44d 100644 --- a/src/u_init.c +++ b/src/u_init.c @@ -262,9 +262,7 @@ static const struct def_skill Skill_A[] = { { P_UNICORN_HORN, P_SKILLED }, { P_ATTACK_SPELL, P_BASIC }, { P_HEALING_SPELL, P_BASIC }, { P_DIVINATION_SPELL, P_EXPERT}, { P_MATTER_SPELL, P_BASIC}, -#ifdef STEED { P_RIDING, P_BASIC }, -#endif { P_TWO_WEAPON_COMBAT, P_BASIC }, { P_BARE_HANDED_COMBAT, P_EXPERT }, { P_NONE, 0 } @@ -281,9 +279,7 @@ static const struct def_skill Skill_B[] = { { P_QUARTERSTAFF, P_BASIC }, { P_SPEAR, P_SKILLED }, { P_TRIDENT, P_SKILLED }, { P_BOW, P_BASIC }, { P_ATTACK_SPELL, P_SKILLED }, -#ifdef STEED { P_RIDING, P_BASIC }, -#endif { P_TWO_WEAPON_COMBAT, P_BASIC }, { P_BARE_HANDED_COMBAT, P_MASTER }, { P_NONE, 0 } @@ -332,9 +328,7 @@ static const struct def_skill Skill_K[] = { { P_BOW, P_BASIC }, { P_CROSSBOW, P_SKILLED }, { P_ATTACK_SPELL, P_SKILLED }, { P_HEALING_SPELL, P_SKILLED }, { P_CLERIC_SPELL, P_SKILLED }, -#ifdef STEED { P_RIDING, P_EXPERT }, -#endif { P_TWO_WEAPON_COMBAT, P_SKILLED }, { P_BARE_HANDED_COMBAT, P_EXPERT }, { P_NONE, 0 } @@ -379,9 +373,7 @@ static const struct def_skill Skill_R[] = { { P_DART, P_EXPERT }, { P_SHURIKEN, P_SKILLED }, { P_DIVINATION_SPELL, P_SKILLED }, { P_ESCAPE_SPELL, P_SKILLED }, { P_MATTER_SPELL, P_SKILLED }, -#ifdef STEED { P_RIDING, P_BASIC }, -#endif { P_TWO_WEAPON_COMBAT, P_EXPERT }, { P_BARE_HANDED_COMBAT, P_EXPERT }, { P_NONE, 0 } @@ -401,9 +393,7 @@ static const struct def_skill Skill_Ran[] = { { P_HEALING_SPELL, P_BASIC }, { P_DIVINATION_SPELL, P_EXPERT }, { P_ESCAPE_SPELL, P_BASIC }, -#ifdef STEED { P_RIDING, P_BASIC }, -#endif { P_BARE_HANDED_COMBAT, P_BASIC }, { P_NONE, 0 } }; @@ -418,9 +408,7 @@ static const struct def_skill Skill_S[] = { { P_LANCE, P_SKILLED }, { P_BOW, P_EXPERT }, { P_SHURIKEN, P_EXPERT }, { P_ATTACK_SPELL, P_SKILLED }, { P_CLERIC_SPELL, P_SKILLED }, -#ifdef STEED { P_RIDING, P_SKILLED }, -#endif { P_TWO_WEAPON_COMBAT, P_EXPERT }, { P_MARTIAL_ARTS, P_MASTER }, { P_NONE, 0 } @@ -444,9 +432,7 @@ static const struct def_skill Skill_T[] = { { P_WHIP, P_BASIC }, { P_UNICORN_HORN, P_SKILLED }, { P_DIVINATION_SPELL, P_BASIC }, { P_ENCHANTMENT_SPELL, P_BASIC }, { P_ESCAPE_SPELL, P_SKILLED }, -#ifdef STEED { P_RIDING, P_BASIC }, -#endif { P_TWO_WEAPON_COMBAT, P_SKILLED }, { P_BARE_HANDED_COMBAT, P_SKILLED }, { P_NONE, 0 } @@ -464,9 +450,7 @@ static const struct def_skill Skill_V[] = { { P_TRIDENT, P_BASIC }, { P_LANCE, P_SKILLED }, { P_SLING, P_BASIC }, { P_ATTACK_SPELL, P_BASIC }, { P_ESCAPE_SPELL, P_BASIC }, -#ifdef STEED { P_RIDING, P_SKILLED }, -#endif { P_TWO_WEAPON_COMBAT, P_SKILLED }, { P_BARE_HANDED_COMBAT, P_EXPERT }, { P_NONE, 0 } @@ -484,9 +468,7 @@ static const struct def_skill Skill_W[] = { { P_DIVINATION_SPELL, P_EXPERT }, { P_ENCHANTMENT_SPELL, P_SKILLED }, { P_CLERIC_SPELL, P_SKILLED }, { P_ESCAPE_SPELL, P_EXPERT }, { P_MATTER_SPELL, P_EXPERT }, -#ifdef STEED { P_RIDING, P_BASIC }, -#endif { P_BARE_HANDED_COMBAT, P_BASIC }, { P_NONE, 0 } }; diff --git a/src/uhitm.c b/src/uhitm.c index 43fb2c0a1..16b05fe9c 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -11,9 +11,7 @@ STATIC_DCL boolean FDECL(theft_petrifies, (struct obj *)); STATIC_DCL void FDECL(steal_it, (struct monst *, struct attack *)); STATIC_DCL boolean FDECL(hitum, (struct monst *,struct attack *)); STATIC_DCL boolean FDECL(hmon_hitmon, (struct monst *,struct obj *,int)); -#ifdef STEED STATIC_DCL int FDECL(joust, (struct monst *,struct obj *)); -#endif STATIC_DCL void NDECL(demonpet); STATIC_DCL boolean FDECL(m_slips_free, (struct monst *mtmp,struct attack *mattk)); STATIC_DCL int FDECL(explum, (struct monst *,struct attack *)); @@ -559,9 +557,7 @@ int thrown; /* HMON_xxx (0 => hand-to-hand, other => ranged) */ boolean hand_to_hand = (thrown == HMON_MELEE || /* not grapnels; applied implies uwep */ (thrown == HMON_APPLIED && is_pole(uwep))); -#ifdef STEED int jousting = 0; -#endif int wtype; struct obj *monwep; char unconventional[BUFSZ]; /* substituted for word "attack" in msg */ @@ -607,11 +603,7 @@ int thrown; /* HMON_xxx (0 => hand-to-hand, other => ranged) */ /* or strike with a missile in your hand... */ (!thrown && (is_missile(obj) || is_ammo(obj))) || /* or use a pole at short range and not mounted... */ - (!thrown && -#ifdef STEED - !u.usteed && -#endif - is_pole(obj)) || + (!thrown && !u.usteed && is_pole(obj)) || /* or throw a missile without the proper bow... */ (is_ammo(obj) && (thrown != HMON_THROWN || !ammo_and_launcher(obj, uwep)))) { @@ -693,14 +685,12 @@ int thrown; /* HMON_xxx (0 => hand-to-hand, other => ranged) */ && mon_hates_silver(mon)) { silvermsg = TRUE; silverobj = TRUE; } -#ifdef STEED if (u.usteed && !thrown && tmp > 0 && weapon_type(obj) == P_LANCE && mon != u.ustuck) { jousting = joust(mon, obj); /* exercise skill even for minimal damage hits */ if (jousting) valid_weapon_attack = TRUE; } -#endif if (thrown == HMON_THROWN && (is_ammo(obj) || is_missile(obj))) { if (ammo_and_launcher(obj, uwep)) { @@ -991,7 +981,6 @@ int thrown; /* HMON_xxx (0 => hand-to-hand, other => ranged) */ } } -#ifdef STEED if (jousting) { tmp += d(2, (obj == uwep) ? 10 : 2); /* [was in dmgval()] */ You("joust %s%s", @@ -1012,11 +1001,8 @@ int thrown; /* HMON_xxx (0 => hand-to-hand, other => ranged) */ if (DEADMONSTER(mon)) already_killed = TRUE; } hittxt = TRUE; - } else -#endif - - /* VERY small chance of stunning opponent if unarmed. */ - if (unarmed && tmp > 1 && !thrown && !obj && !Upolyd) { + } else if (unarmed && tmp > 1 && !thrown && !obj && !Upolyd) { + /* VERY small chance of stunning opponent if unarmed. */ if (rnd(100) < P_SKILL(P_BARE_HANDED_COMBAT) && !bigmonst(mdat) && !thick_skinned(mdat)) { if (canspotmon(mon)) diff --git a/src/weapon.c b/src/weapon.c index 568c2d669..fc3258c6b 100644 --- a/src/weapon.c +++ b/src/weapon.c @@ -43,9 +43,7 @@ STATIC_VAR NEARDATA const short skill_names_indices[P_NUM_SKILLS] = { PN_CLERIC_SPELL, PN_ESCAPE_SPELL, PN_MATTER_SPELL, PN_BARE_HANDED, PN_TWO_WEAPONS, -#ifdef STEED PN_RIDING -#endif }; /* note: entry [0] isn't used */ @@ -1184,7 +1182,6 @@ struct obj *weapon; bonus = ((bonus + 2) * (martial_bonus() ? 2 : 1)) / 2; } -#ifdef STEED /* KMH -- It's harder to hit while you are riding */ if (u.usteed) { switch (P_SKILL(P_RIDING)) { @@ -1196,7 +1193,6 @@ struct obj *weapon; } if (u.twoweap) bonus -= 2; } -#endif return bonus; } @@ -1253,7 +1249,6 @@ struct obj *weapon; bonus = ((bonus + 1) * (martial_bonus() ? 3 : 1)) / 2; } -#ifdef STEED /* KMH -- Riding gives some thrusting damage */ if (u.usteed && type != P_TWO_WEAPON_COMBAT) { switch (P_SKILL(P_RIDING)) { @@ -1264,7 +1259,6 @@ struct obj *weapon; case P_EXPERT: bonus += 2; break; } } -#endif return bonus; } @@ -1326,10 +1320,8 @@ const struct def_skill *class_skill; P_SKILL(P_BARE_HANDED_COMBAT) = P_BASIC; /* Roles that start with a horse know how to ride it */ -#ifdef STEED if (urole.petnum == PM_PONY) P_SKILL(P_RIDING) = P_BASIC; -#endif /* * Make sure we haven't missed setting the max on a skill diff --git a/src/wield.c b/src/wield.c index 7d7c2d6af..32a3e1eb4 100644 --- a/src/wield.c +++ b/src/wield.c @@ -106,10 +106,7 @@ register struct obj *obj; unweapon = (obj->oclass == WEAPON_CLASS) ? is_launcher(obj) || is_ammo(obj) || is_missile(obj) || (is_pole(obj) -#ifdef STEED - && !u.usteed -#endif - ) : !is_weptool(obj); + && !u.usteed) : !is_weptool(obj); } else unweapon = TRUE; /* for "bare hands" message */ update_inventory(); @@ -288,11 +285,7 @@ dowield() return (doswapweapon()); else if (wep == uquiver) setuqwep((struct obj *) 0); - else if (wep->owornmask & (W_ARMOR | W_RING | W_AMUL | W_TOOL -#ifdef STEED - | W_SADDLE -#endif - )) { + else if (wep->owornmask & (W_ARMOR | W_RING | W_AMUL | W_TOOL | W_SADDLE)) { You("cannot wield that!"); return (0); } @@ -392,10 +385,7 @@ dowieldquiver() !is_plural(uwep) ? "That is" : "They are"); return(0); } else if (newquiver->owornmask & (W_ARMOR | W_RING | W_AMUL | W_TOOL -#ifdef STEED - | W_SADDLE -#endif - )) { + | W_SADDLE)) { You("cannot ready that!"); return (0); } else { diff --git a/src/worn.c b/src/worn.c index 4371d789a..bea315bdc 100644 --- a/src/worn.c +++ b/src/worn.c @@ -169,10 +169,8 @@ struct obj *obj; res = W_TOOL; /* WORN_BLINDF */ else if (is_weptool(obj) || otyp == TIN_OPENER) res = W_WEP|W_SWAPWEP; -#ifdef STEED else if (otyp == SADDLE) res = W_SADDLE; -#endif break; case FOOD_CLASS: if (obj->otyp == MEAT_RING) res = W_RINGL|W_RINGR; @@ -382,10 +380,8 @@ boolean on, silently; break; } -#ifdef STEED if (!on && mon == u.usteed && obj->otyp == SADDLE) dismount_steed(DISMOUNT_FELL); -#endif /* if couldn't see it but now can, or vice versa, update display */ if (!silently && (unseen ^ !canseemon(mon))) @@ -837,7 +833,6 @@ boolean polyspot; m_lose_armor(mon, otmp); } } -#ifdef STEED if (!can_saddle(mon)) { if ((otmp = which_armor(mon, W_SADDLE)) != 0) { if (polyspot) bypass_obj(otmp); @@ -861,7 +856,6 @@ boolean polyspot; } dismount_steed(DISMOUNT_FELL); } -#endif return; } diff --git a/src/zap.c b/src/zap.c index 5c95dde0d..41723a566 100644 --- a/src/zap.c +++ b/src/zap.c @@ -26,9 +26,7 @@ STATIC_DCL int FDECL(stone_to_flesh_obj, (struct obj *)); STATIC_DCL boolean FDECL(zap_updown, (struct obj *)); STATIC_DCL void FDECL(zhitu, (int,int,const char *,XCHAR_P,XCHAR_P)); STATIC_DCL void FDECL(revive_egg, (struct obj *)); -#ifdef STEED STATIC_DCL boolean FDECL(zap_steed, (struct obj *)); -#endif STATIC_DCL void FDECL(skiprange, (int,int *,int *)); STATIC_DCL int FDECL(zap_hit, (int,int)); @@ -300,7 +298,6 @@ struct obj *otmp; } else if (openfallingtrap(mtmp, TRUE, &learn_it)) { /* mtmp might now be on the migrating monsters list */ break; -#ifdef STEED } else if ((obj = which_armor(mtmp, W_SADDLE)) != 0) { char buf[BUFSZ]; @@ -316,7 +313,6 @@ struct obj *otmp; } obj_extract_self(obj); mdrop_obj(mtmp, obj, FALSE); -#endif /* STEED */ } break; case SPE_HEALING: @@ -2433,7 +2429,6 @@ long duration; return FALSE; } -#ifdef STEED /* you've zapped a wand downwards while riding * Return TRUE if the steed was hit by the wand. * Return FALSE if the steed was not hit by the wand. @@ -2495,7 +2490,6 @@ struct obj *obj; /* wand or spell */ } return steedhit; } -#endif /* * cancel a monster (possibly the hero). inventory is cancelled only @@ -2772,13 +2766,10 @@ struct obj *obj; boolean disclose = FALSE, was_unkn = !objects[otyp].oc_name_known; exercise(A_WIS, TRUE); -#ifdef STEED if (u.usteed && (objects[otyp].oc_dir != NODIR) && !u.dx && !u.dy && (u.dz > 0) && zap_steed(obj)) { disclose = TRUE; - } else -#endif - if (objects[otyp].oc_dir == IMMEDIATE) { + } else if (objects[otyp].oc_dir == IMMEDIATE) { zapsetup(); /* reset obj_zapped */ if (u.uswallow) { (void) bhitm(u.ustuck, obj); @@ -3769,9 +3760,7 @@ register int dx,dy; if (mon) { if (type == ZT_SPELL(ZT_FIRE)) break; if (type >= 0) mon->mstrategy &= ~STRAT_WAITMASK; -#ifdef STEED buzzmonst: -#endif if (zap_hit(find_mac(mon), spell_type)) { if (mon_reflects(mon, (char *)0)) { if(cansee(mon->mx,mon->my)) { @@ -3838,13 +3827,10 @@ register int dx,dy; } } else if (sx == u.ux && sy == u.uy && range >= 0) { nomul(0); -#ifdef STEED if (u.usteed && !rn2(3) && !mon_reflects(u.usteed, (char *)0)) { mon = u.usteed; goto buzzmonst; - } else -#endif - if (zap_hit((int) u.uac, 0)) { + } else if (zap_hit((int) u.uac, 0)) { range -= 2; pline("%s hits you!", The(fltxt)); if (Reflecting) { diff --git a/util/makedefs.c b/util/makedefs.c index dbedfe45b..c4ac5f3b5 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -1005,11 +1005,8 @@ make_version() #ifdef TOURIST | (1L << 10) #endif -#ifdef STEED - | (1L << 11) -#endif #ifdef GOLDOBJ - | (1L << 12) + | (1L << 11) #endif /* flag bits and/or other global variables (15..26) */ #ifdef TEXTCOLOR @@ -1307,9 +1304,6 @@ static const char *build_opts[] = { #ifdef REINCARNATION "rogue level", #endif -#ifdef STEED - "saddles and riding", -#endif #ifdef SCORE_ON_BOTL "score on status line", #endif diff --git a/win/gnome/gnmain.c b/win/gnome/gnmain.c index 45c55ef2f..53273c407 100644 --- a/win/gnome/gnmain.c +++ b/win/gnome/gnmain.c @@ -366,14 +366,12 @@ GnomeUIInfo action_menu[] = { ghack_accelerator_selected, GINT_TO_POINTER(M('j')), NULL, GNOME_APP_PIXMAP_NONE, NULL, 'j',GDK_MOD1_MASK }, -#ifdef STEED { GNOME_APP_UI_ITEM, N_("Ride"), N_("Ride (or stop riding) a monster"), doride, GINT_TO_POINTER(M('r')), NULL, GNOME_APP_PIXMAP_NONE, NULL, 'R',GDK_MOD1_MASK }, -#endif { GNOME_APP_UI_ITEM, N_("Wipe face"), N_("wipe off your face"), diff --git a/win/share/tilemap.c b/win/share/tilemap.c index 87423f49c..9672b6568 100644 --- a/win/share/tilemap.c +++ b/win/share/tilemap.c @@ -81,9 +81,6 @@ struct conditionals { { OBJ_GLYPH, LEATHER_JACKET, "T-shirt" }, { OBJ_GLYPH, LOCK_PICK, "credit card" }, { OBJ_GLYPH, MAGIC_LAMP, "expensive camera" }, -#endif -#ifndef STEED - { OBJ_GLYPH, TOWEL, "saddle" }, #endif /* allow slime mold to look like slice of pizza, since we * don't know what a slime mold should look like when renamed anyway From b066b7c170a3d71fd7fe2d292a7f3e19f2103285 Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Fri, 13 Feb 2015 22:01:44 -0500 Subject: [PATCH 027/132] Make KOPS unconditional. --- include/config.h | 1 - include/monflag.h | 2 -- include/obj.h | 4 ---- src/bones.c | 2 -- src/makemon.c | 2 -- src/mon.c | 4 ---- src/mondata.c | 2 -- src/monst.c | 2 -- src/muse.c | 21 ++++++--------------- src/objects.c | 2 -- src/shk.c | 22 ---------------------- src/sit.c | 2 -- src/sounds.c | 2 -- src/weapon.c | 13 ++----------- util/makedefs.c | 8 +------- win/share/tilemap.c | 9 --------- 16 files changed, 9 insertions(+), 89 deletions(-) diff --git a/include/config.h b/include/config.h index 715fc746a..3e06382b8 100644 --- a/include/config.h +++ b/include/config.h @@ -423,7 +423,6 @@ typedef unsigned char uchar; #define WALLIFIED_MAZE /* Fancy mazes - Jean-Christophe Collet */ #define REINCARNATION /* Special Rogue-like levels */ /* monsters & objects */ -#define KOPS /* Keystone Kops by Scott R. Turner */ #define SEDUCE /* Succubi/incubi seduction, by KAA, suggested by IM */ #define TOURIST /* Tourist players with cameras and Hawaiian shirts */ /* I/O */ diff --git a/include/monflag.h b/include/monflag.h index 103060a41..bf6875581 100644 --- a/include/monflag.h +++ b/include/monflag.h @@ -29,9 +29,7 @@ #define MS_IMITATE 19 /* imitates others (leocrotta) */ #define MS_ORC MS_GRUNT /* intelligent brutes */ #define MS_HUMANOID 20 /* generic traveling companion */ -#ifdef KOPS #define MS_ARREST 21 /* "Stop in the name of the law!" (Kops) */ -#endif #define MS_SOLDIER 22 /* army and watchmen expressions */ #define MS_GUARD 23 /* "Please drop that gold and follow me." */ #define MS_DJINNI 24 /* "Thank you for freeing me!" */ diff --git a/include/obj.h b/include/obj.h index 8d302c0ae..3d0e5d88d 100644 --- a/include/obj.h +++ b/include/obj.h @@ -312,12 +312,8 @@ struct obj { (obj)->otyp == TOUCHSTONE) /* misc */ -#ifdef KOPS #define is_flimsy(otmp) (objects[(otmp)->otyp].oc_material <= LEATHER || \ (otmp)->otyp == RUBBER_HOSE) -#else -#define is_flimsy(otmp) (objects[(otmp)->otyp].oc_material <= LEATHER) -#endif /* helpers, simple enough to be macros */ #define is_plural(o) ((o)->quan > 1 || \ diff --git a/src/bones.c b/src/bones.c index 1d3b54eec..e6c33a262 100644 --- a/src/bones.c +++ b/src/bones.c @@ -372,9 +372,7 @@ struct obj *corpse; (mptr == &mons[PM_ORACLE] && !fixuporacle(mtmp))) mongone(mtmp); } -#ifdef STEED if (u.usteed) dismount_steed(DISMOUNT_BONES); -#endif dmonsfree(); /* discard dead or gone monsters */ /* mark all fruits as nonexistent; when we come to them we'll mark diff --git a/src/makemon.c b/src/makemon.c index 11051eab5..72f3ae6b9 100644 --- a/src/makemon.c +++ b/src/makemon.c @@ -313,14 +313,12 @@ register struct monst *mtmp; } } break; -# ifdef KOPS case S_KOP: /* create Keystone Kops with cream pies to * throw. As suggested by KAA. [MRS] */ if (!rn2(4)) m_initthrow(mtmp, CREAM_PIE, 2); if (!rn2(3)) (void)mongets(mtmp,(rn2(2)) ? CLUB : RUBBER_HOSE); break; -# endif case S_ORC: if(rn2(2)) (void)mongets(mtmp, ORCISH_HELM); switch (mm != PM_ORC_CAPTAIN ? mm : diff --git a/src/mon.c b/src/mon.c index 917e919c9..5be8c8e8a 100644 --- a/src/mon.c +++ b/src/mon.c @@ -1626,7 +1626,6 @@ register struct monst *mtmp; if (tmp == PM_MAIL_DAEMON) mvitals[tmp].mvflags |= G_GENOD; #endif -#ifdef KOPS if (mtmp->data->mlet == S_KOP) { /* Dead Kops may come back. */ switch(rnd(5)) { @@ -1640,7 +1639,6 @@ register struct monst *mtmp; break; } } -#endif if(mtmp->iswiz) wizdead(); if(mtmp->data->msound == MS_NEMESIS) nemdead(); if(glyph_is_invisible(levl[mtmp->mx][mtmp->my].glyph)) @@ -1992,10 +1990,8 @@ int dest; if (!rn2(6) && !(mvitals[mndx].mvflags & G_NOCORPSE) && /* no extra item from swallower or steed */ (x != u.ux || y != u.uy) && -#ifdef KOPS /* no extra item from kops--too easy to abuse */ mdat->mlet != S_KOP && -#endif /* reduced chance of item from cloned monster */ (!mtmp->mcloned || !rn2(mvitals[mndx].died / 5 + 1))) { otmp = mkobj(RANDOM_CLASS, TRUE); diff --git a/src/mondata.c b/src/mondata.c index 2cdf41cef..98c3244f5 100644 --- a/src/mondata.c +++ b/src/mondata.c @@ -858,11 +858,9 @@ static const short grownups[][2] = { {PM_ACOLYTE, PM_PRIEST}, {PM_APPRENTICE, PM_WIZARD}, {PM_MANES,PM_LEMURE}, -#ifdef KOPS {PM_KEYSTONE_KOP, PM_KOP_SERGEANT}, {PM_KOP_SERGEANT, PM_KOP_LIEUTENANT}, {PM_KOP_LIEUTENANT, PM_KOP_KAPTAIN}, -#endif {NON_PM,NON_PM} }; diff --git a/src/monst.c b/src/monst.c index d774d1f2a..b85449ca2 100644 --- a/src/monst.c +++ b/src/monst.c @@ -1595,7 +1595,6 @@ struct permonst _mons2[] = { M1_ANIMAL|M1_FLY|M1_CARNIVORE, M2_HOSTILE|M2_STRONG|M2_NASTY|M2_COLLECT, M3_INFRAVISIBLE, HI_LORD), #endif -#ifdef KOPS /* * Kops */ @@ -1627,7 +1626,6 @@ struct permonst _mons2[] = { SIZ(WT_HUMAN, 200, MS_ARREST, MZ_HUMAN), 0, 0, M1_HUMANOID, M2_HUMAN|M2_WANDER|M2_HOSTILE|M2_STRONG|M2_MALE|M2_COLLECT, M3_INFRAVISIBLE, HI_LORD), -#endif /* * Liches */ diff --git a/src/muse.c b/src/muse.c index cc540ebb0..a404071c7 100644 --- a/src/muse.c +++ b/src/muse.c @@ -920,11 +920,8 @@ struct monst *mtmp; int trycnt = 0; if(is_animal(pm) || attacktype(pm, AT_EXPL) || mindless(mtmp->data) - || pm->mlet == S_GHOST -# ifdef KOPS - || pm->mlet == S_KOP -# endif - ) return 0; + || pm->mlet == S_GHOST || pm->mlet == S_KOP) + return 0; try_again: switch (rn2(8 + (difficulty > 3) + (difficulty > 6) + (difficulty > 8))) { @@ -1535,11 +1532,8 @@ struct monst *mtmp; int difficulty = monstr[(monsndx(pm))]; if(is_animal(pm) || attacktype(pm, AT_EXPL) || mindless(mtmp->data) - || pm->mlet == S_GHOST -# ifdef KOPS - || pm->mlet == S_KOP -# endif - ) return 0; + || pm->mlet == S_GHOST || pm->mlet == S_KOP) + return 0; if (difficulty > 7 && !rn2(35)) return WAN_DEATH; switch (rn2(9 - (difficulty < 4) + 4 * (difficulty > 6))) { case 0: { @@ -1943,11 +1937,8 @@ struct monst *mtmp; int difficulty = monstr[(monsndx(pm))]; if(is_animal(pm) || attacktype(pm, AT_EXPL) || mindless(mtmp->data) - || pm->mlet == S_GHOST -# ifdef KOPS - || pm->mlet == S_KOP -# endif - ) return 0; + || pm->mlet == S_GHOST || pm->mlet == S_KOP) + return 0; /* Unlike other rnd_item functions, we only allow _weak_ monsters * to have this item; after all, the item will be used to strengthen * the monster and strong monsters won't use it at all... diff --git a/src/objects.c b/src/objects.c index 86d65a214..1de8dfffe 100644 --- a/src/objects.c +++ b/src/objects.c @@ -242,10 +242,8 @@ WEAPON("war hammer", (char *)0, /* +1 small */ WEAPON("club", (char *)0, 1, 0, 0, 12, 30, 3, 6, 3, 0, B, P_CLUB, WOOD, HI_WOOD), -#ifdef KOPS WEAPON("rubber hose", (char *)0, 1, 0, 0, 0, 20, 3, 4, 3, 0, B, P_WHIP, PLASTIC, CLR_BROWN), -#endif WEAPON("quarterstaff", "staff", 0, 0, 1, 11, 40, 5, 6, 6, 0, B, P_QUARTERSTAFF, WOOD, HI_WOOD), /* two-piece */ diff --git a/src/shk.c b/src/shk.c index 7a4edcbdc..63596950f 100644 --- a/src/shk.c +++ b/src/shk.c @@ -13,11 +13,9 @@ #define PAY_SKIP (-1) #define PAY_BROKE (-2) -#ifdef KOPS STATIC_DCL void FDECL(makekops, (coord *)); STATIC_DCL void FDECL(call_kops, (struct monst *,BOOLEAN_P)); STATIC_DCL void FDECL(kops_gone, (BOOLEAN_P)); -#endif /* KOPS */ #define NOTANGRY(mon) ((mon)->mpeaceful) #define ANGRY(mon) (!NOTANGRY(mon)) @@ -313,7 +311,6 @@ register struct monst *shkp; return(total); } -#ifdef KOPS STATIC_OVL void call_kops(shkp, nearshop) register struct monst *shkp; @@ -364,7 +361,6 @@ register boolean nearshop; makekops(&mm); } } -#endif /* KOPS */ /* x,y is strictly inside shop */ char @@ -420,11 +416,7 @@ boolean newlev; } if (rob_shop(shkp)) { -#ifdef KOPS call_kops(shkp, (!newlev && levl[u.ux0][u.uy0].edge)); -#else - (void) angry_guards(FALSE); -#endif } } @@ -445,12 +437,8 @@ xchar x, y; return; if (rob_shop(shkp)) { -#ifdef KOPS /*[might want to set 2nd arg based on distance from shop doorway]*/ call_kops(shkp, FALSE); -#else - (void) angry_guards(FALSE); -#endif } } @@ -941,11 +929,7 @@ register boolean killkops; (void) mnearto(shkp, x, y, TRUE); level.flags.has_shop = 1; if (killkops) { -#ifdef KOPS kops_gone(TRUE); -#else - You_feel("vaguely apprehensive."); -#endif pacify_guards(); } after_shk_move(shkp); @@ -1065,9 +1049,7 @@ make_happy_shoppers(silentkops) boolean silentkops; { if (!angry_shk_exists()) { -#ifdef KOPS kops_gone(silentkops); -#endif pacify_guards(); } } @@ -3655,7 +3637,6 @@ register int fall; } } -#ifdef KOPS STATIC_OVL void makekops(mm) coord *mm; @@ -3680,7 +3661,6 @@ coord *mm; (void) makemon(&mons[mndx], mm->x, mm->y, NO_MM_FLAGS); } } -#endif /* KOPS */ void pay_for_damage(dmgstr, cant_mollify) @@ -4052,7 +4032,6 @@ struct monst *shkp; pline("%s talks about the problem of shoplifters.",shkname(shkp)); } -#ifdef KOPS STATIC_OVL void kops_gone(silent) register boolean silent; @@ -4071,7 +4050,6 @@ register boolean silent; pline_The("Kop%s (disappointed) vanish%s into thin air.", plur(cnt), cnt == 1 ? "es" : ""); } -#endif /* KOPS */ STATIC_OVL long cost_per_charge(shkp, otmp, altusage) diff --git a/src/sit.c b/src/sit.c index 4b8e2e7d1..c91a96a24 100644 --- a/src/sit.c +++ b/src/sit.c @@ -43,12 +43,10 @@ dosit() register struct trap *trap = t_at(u.ux,u.uy); register int typ = levl[u.ux][u.uy].typ; -#ifdef STEED if (u.usteed) { You("are already sitting on %s.", mon_nam(u.usteed)); return (0); } -#endif if (u.uundetected && is_hider(youmonst.data) && u.umonnum != PM_TRAPPER) u.uundetected = 0; /* no longer on the ceiling */ diff --git a/src/sounds.c b/src/sounds.c index 27749d8b0..bd20178c0 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -834,7 +834,6 @@ register struct monst *mtmp; } } break; -#ifdef KOPS case MS_ARREST: if (mtmp->mpeaceful) verbalize("Just the facts, %s.", @@ -848,7 +847,6 @@ register struct monst *mtmp; verbl_msg = arrest_msg[rn2(3)]; } break; -#endif case MS_BRIBE: if (mtmp->mpeaceful && !mtmp->mtame) { (void) demon_talk(mtmp); diff --git a/src/weapon.c b/src/weapon.c index fc3258c6b..796fba66a 100644 --- a/src/weapon.c +++ b/src/weapon.c @@ -370,7 +370,6 @@ static NEARDATA const int rwep[] = ORCISH_ARROW, CROSSBOW_BOLT, SILVER_DAGGER, ELVEN_DAGGER, DAGGER, ORCISH_DAGGER, KNIFE, FLINT, ROCK, LOADSTONE, LUCKSTONE, DART, /* BOOMERANG, */ CREAM_PIE - /* note: CREAM_PIE should NOT be #ifdef KOPS */ }; static NEARDATA const int pwep[] = @@ -389,16 +388,12 @@ register struct monst *mtmp; boolean mweponly; int i; -#ifdef KOPS char mlet = mtmp->data->mlet; -#endif propellor = &zeroobj; Oselect(EGG); /* cockatrice egg */ -#ifdef KOPS if(mlet == S_KOP) /* pies are first choice for Kops */ Oselect(CREAM_PIE); -#endif if(throws_rocks(mtmp->data)) /* ...boulders for giants */ Oselect(BOULDER); @@ -508,12 +503,8 @@ static const NEARDATA short hwep[] = { MORNING_STAR, ELVEN_SHORT_SWORD, DWARVISH_SHORT_SWORD, SHORT_SWORD, ORCISH_SHORT_SWORD, MACE, AXE, DWARVISH_SPEAR, SILVER_SPEAR, ELVEN_SPEAR, SPEAR, ORCISH_SPEAR, FLAIL, BULLWHIP, QUARTERSTAFF, - JAVELIN, AKLYS, CLUB, PICK_AXE, -#ifdef KOPS - RUBBER_HOSE, -#endif /* KOPS */ - WAR_HAMMER, SILVER_DAGGER, ELVEN_DAGGER, DAGGER, ORCISH_DAGGER, - ATHAME, SCALPEL, KNIFE, WORM_TOOTH + JAVELIN, AKLYS, CLUB, PICK_AXE, RUBBER_HOSE, WAR_HAMMER, SILVER_DAGGER, + ELVEN_DAGGER, DAGGER, ORCISH_DAGGER, ATHAME, SCALPEL, KNIFE, WORM_TOOTH }; struct obj * diff --git a/util/makedefs.c b/util/makedefs.c index c4ac5f3b5..57493448b 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -995,11 +995,8 @@ make_version() | (1L << 2) #endif /* monsters (5..9) */ -#ifdef KOPS - | (1L << 6) -#endif #ifdef MAIL - | (1L << 7) + | (1L << 6) #endif /* objects (10..14) */ #ifdef TOURIST @@ -1263,9 +1260,6 @@ static const char *build_opts[] = { #ifdef INSURANCE "insurance files for recovering from crashes", #endif -#ifdef KOPS - "Keystone Kops", -#endif #ifdef HOLD_LOCKFILE_OPEN "exclusive lock on level 0 file", #endif diff --git a/win/share/tilemap.c b/win/share/tilemap.c index 9672b6568..97fc7acc4 100644 --- a/win/share/tilemap.c +++ b/win/share/tilemap.c @@ -42,12 +42,6 @@ struct conditionals { { MON_GLYPH, PM_BABY_SILVER_DRAGON, "baby shimmering dragon" }, { MON_GLYPH, PM_SILVER_DRAGON, "shimmering dragon" }, { MON_GLYPH, PM_JABBERWOCK, "vorpal jabberwock" }, -#ifndef KOPS - { MON_GLYPH, PM_JABBERWOCK, "Keystone Kop" }, - { MON_GLYPH, PM_JABBERWOCK, "Kop Sergeant" }, - { MON_GLYPH, PM_JABBERWOCK, "Kop Lieutenant" }, - { MON_GLYPH, PM_JABBERWOCK, "Kop Kaptain" }, -#endif { MON_GLYPH, PM_VAMPIRE_LORD, "vampire mage" }, #ifndef CHARON /* not supported yet */ { MON_GLYPH, PM_CROESUS, "Charon" }, @@ -69,9 +63,6 @@ struct conditionals { { MON_GLYPH, PM_NEANDERTHAL, "High-elf" }, #ifndef TOURIST { MON_GLYPH, PM_ROSHI, "guide" }, -#endif -#ifndef KOPS - { OBJ_GLYPH, CLUB, "rubber hose" }, #endif /* objects commented out in objects.c at present */ { OBJ_GLYPH, SILVER_DRAGON_SCALE_MAIL, "shimmering dragon scale mail" }, From 5ee71d2757b70b18ceaedfb3ce8b2e4747cc006c Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Fri, 13 Feb 2015 23:30:38 -0500 Subject: [PATCH 028/132] Make SINKS unconditional. --- dat/oracles.txt | 2 +- include/config.h | 1 - include/extern.h | 2 -- src/cmd.c | 2 -- src/dig.c | 4 ---- src/do.c | 6 ------ src/dogmove.c | 2 -- src/dokick.c | 4 ---- src/drawing.c | 4 ---- src/fountain.c | 2 -- src/hack.c | 6 ------ src/invent.c | 2 -- src/mklev.c | 7 ------- src/mthrowu.c | 5 +---- src/music.c | 2 -- src/objnam.c | 2 -- src/potion.c | 2 -- src/sit.c | 2 -- src/sounds.c | 2 -- src/zap.c | 4 ---- util/lev_main.c | 5 ----- util/makedefs.c | 9 --------- win/share/tilemap.c | 21 ++++----------------- 23 files changed, 6 insertions(+), 92 deletions(-) diff --git a/dat/oracles.txt b/dat/oracles.txt index d307c7a9f..d4d5ae250 100644 --- a/dat/oracles.txt +++ b/dat/oracles.txt @@ -48,7 +48,7 @@ It is well known that wily shopkeepers raise their prices whene'er they espy the garish apparel of the approaching tourist or the countenance of a disfavored patron. They favor the gentle of manner and the fair of face. The boor may expect unprofitable transactions. ------ SINKS +----- The cliche of the kitchen sink swallowing any unfortunate rings that contact its pernicious surface reflecteth greater truth than many homilies, yet even so, few have developed the skill to identify enchanted rings by the diff --git a/include/config.h b/include/config.h index 3e06382b8..5fb8bd9a8 100644 --- a/include/config.h +++ b/include/config.h @@ -418,7 +418,6 @@ typedef unsigned char uchar; /* display features */ #define LOADSYMSETS /* loadable symbol sets; only default symbols w/o this */ /* dungeon features */ -#define SINKS /* Kitchen sinks - Janet Walz */ /* dungeon levels */ #define WALLIFIED_MAZE /* Fancy mazes - Jean-Christophe Collet */ #define REINCARNATION /* Special Rogue-like levels */ diff --git a/include/extern.h b/include/extern.h index 866da61ec..8ffac991d 100644 --- a/include/extern.h +++ b/include/extern.h @@ -784,10 +784,8 @@ E void FDECL(gush, (int,int,genericptr_t)); E void FDECL(dryup, (XCHAR_P,XCHAR_P, BOOLEAN_P)); E void NDECL(drinkfountain); E void FDECL(dipfountain, (struct obj *)); -#ifdef SINKS E void FDECL(breaksink, (int,int)); E void NDECL(drinksink); -#endif /* ### hack.c ### */ diff --git a/src/cmd.c b/src/cmd.c index 78981c274..2abb73a07 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -876,11 +876,9 @@ wiz_map_levltyp(VOID_ARGS) if (level.flags.nfountains) Sprintf(eos(dsc), " %c:%d", defsyms[S_fountain].sym, (int)level.flags.nfountains); -#ifdef SINKS if (level.flags.nsinks) Sprintf(eos(dsc), " %c:%d", defsyms[S_sink].sym, (int)level.flags.nsinks); -#endif if (level.flags.has_vault) Strcat(dsc, " vault"); if (level.flags.has_shop) Strcat(dsc, " shop"); if (level.flags.has_temple) Strcat(dsc, " temple"); diff --git a/src/dig.c b/src/dig.c index ae4571218..dee64940c 100644 --- a/src/dig.c +++ b/src/dig.c @@ -542,11 +542,9 @@ int ttyp; SET_FOUNTAIN_WARNED(x,y); /* force dryup */ dryup(x, y, madeby_u); return; -#ifdef SINKS } else if (IS_SINK(lev->typ)) { breaksink(x, y); return; -#endif } else if (lev->typ == DRAWBRIDGE_DOWN || (is_drawbridge_wall(x, y) >= 0)) { int bx = x, by = y; @@ -1533,11 +1531,9 @@ char *msg; } else if (is_pool(cc->x,cc->y)) { } else if (IS_GRAVE(ltyp)) { #endif -#ifdef SINKS } else if (IS_SINK(ltyp)) { Strcpy(msg, "A tangled mass of plumbing remains below the sink."); return FALSE; -#endif } else if ((cc->x == xupladder && cc->y == yupladder) || /* "ladder up" */ (cc->x == xdnladder && cc->y == ydnladder)) { /* "ladder down" */ Strcpy(msg, "The ladder is unaffected."); diff --git a/src/do.c b/src/do.c index 1f51c14cc..35b0b9c40 100644 --- a/src/do.c +++ b/src/do.c @@ -8,10 +8,8 @@ #include "hack.h" #include "lev.h" -#ifdef SINKS STATIC_DCL void FDECL(trycall, (struct obj *)); STATIC_DCL void FDECL(dosinkring, (struct obj *)); -#endif /* SINKS */ STATIC_PTR int FDECL(drop, (struct obj *)); STATIC_PTR int NDECL(wipeoff); @@ -244,7 +242,6 @@ doaltarobj(obj) /* obj is an object dropped on an altar */ } } -#ifdef SINKS STATIC_OVL void trycall(obj) @@ -396,7 +393,6 @@ giveback: } else useup(obj); } -#endif /* some common tests when trying to drop or throw items */ boolean @@ -475,13 +471,11 @@ register struct obj *obj; mbodypart(u.ustuck, STOMACH)); } } else { -#ifdef SINKS if((obj->oclass == RING_CLASS || obj->otyp == MEAT_RING) && IS_SINK(levl[u.ux][u.uy].typ)) { dosinkring(obj); return(1); } -#endif if (!can_reach_floor(TRUE)) { /* we might be levitating due to #invoke Heart of Ahriman; if so, levitation would end during call to freeinv() diff --git a/src/dogmove.c b/src/dogmove.c index 6baa47651..795905393 100644 --- a/src/dogmove.c +++ b/src/dogmove.c @@ -1001,9 +1001,7 @@ static struct qmchoices { {PM_HOUSECAT, 0, PM_DOG, M_AP_MONSTER}, {PM_LARGE_CAT, 0, PM_LARGE_DOG, M_AP_MONSTER}, {PM_HOUSECAT, 0, PM_GIANT_RAT, M_AP_MONSTER}, -#ifdef SINKS {0, S_DOG, SINK, M_AP_FURNITURE}, /* sorry, no fire hydrants in NetHack */ -#endif {0, 0, TRIPE_RATION, M_AP_OBJECT}, /* leave this at end */ }; diff --git a/src/dokick.c b/src/dokick.c index 1b122e799..d0b20a604 100644 --- a/src/dokick.c +++ b/src/dokick.c @@ -688,9 +688,7 @@ char *buf; else if (IS_THRONE(maploc->typ)) what = "a throne"; else if (IS_FOUNTAIN(maploc->typ)) what = "a fountain"; else if (IS_GRAVE(maploc->typ)) what = "a headstone"; -#ifdef SINKS else if (IS_SINK(maploc->typ)) what = "a sink"; -#endif else if (IS_ALTAR(maploc->typ)) what = "an altar"; else if (IS_DRAWBRIDGE(maploc->typ)) what = "a drawbridge"; else if (maploc->typ == STAIRS) what = "the stairs"; @@ -1054,7 +1052,6 @@ dokick() } goto ouch; } -#ifdef SINKS if(IS_SINK(maploc->typ)) { int gend = poly_gender(); short washerndx = (gend == 1 || (gend == 2 && rn2(2))) ? @@ -1107,7 +1104,6 @@ dokick() } goto ouch; } -#endif if (maploc->typ == STAIRS || maploc->typ == LADDER || IS_STWALL(maploc->typ)) { if(!IS_STWALL(maploc->typ) && maploc->ladder == LA_DOWN) diff --git a/src/drawing.c b/src/drawing.c index 2d104be20..80e82133f 100644 --- a/src/drawing.c +++ b/src/drawing.c @@ -169,11 +169,7 @@ const struct symdef defsyms[MAXPCHARS] = { {'_', "altar", C(CLR_GRAY)}, /* altar */ {'|', "grave", C(CLR_GRAY)}, /* grave */ {'\\', "opulent throne",C(HI_GOLD)}, /* throne */ -#ifdef SINKS {'#', "sink", C(CLR_GRAY)}, /* sink */ -#else - {'#', "", C(CLR_GRAY)}, /* sink */ -#endif /*30*/ {'{', "fountain", C(CLR_BLUE)}, /* fountain */ {'}', "water", C(CLR_BLUE)}, /* pool */ {'.', "ice", C(CLR_CYAN)}, /* ice */ diff --git a/src/fountain.c b/src/fountain.c index 14fb6707e..c49efac69 100644 --- a/src/fountain.c +++ b/src/fountain.c @@ -504,7 +504,6 @@ register struct obj *obj; dryup(u.ux, u.uy, TRUE); } -#ifdef SINKS void breaksink(x,y) int x, y; @@ -610,6 +609,5 @@ drinksink() rn2(3) ? (rn2(2) ? "cold" : "warm") : "hot"); } } -#endif /* SINKS */ /*fountain.c*/ diff --git a/src/hack.c b/src/hack.c index fc62e71a4..1bbfa1977 100644 --- a/src/hack.c +++ b/src/hack.c @@ -10,9 +10,7 @@ STATIC_DCL void NDECL(maybe_wail); STATIC_DCL int NDECL(moverock); STATIC_DCL int FDECL(still_chewing,(XCHAR_P,XCHAR_P)); -#ifdef SINKS STATIC_DCL void NDECL(dosinkfall); -#endif STATIC_DCL boolean FDECL(findtravelpath, (BOOLEAN_P)); STATIC_DCL boolean FDECL(trapmove, (int,int,struct trap *)); STATIC_DCL void NDECL(switch_terrain); @@ -468,7 +466,6 @@ register xchar ox, oy; newsym(ox, oy); } -#ifdef SINKS static NEARDATA const char fell_on_sink[] = "fell onto a sink"; STATIC_OVL void @@ -549,7 +546,6 @@ dosinkfall() through float_down(), but make sure BFlying is up to date */ float_vs_flight(); } -#endif boolean may_dig(x,y) @@ -1767,10 +1763,8 @@ boolean pick; if (pooleffects(TRUE)) goto spotdone; check_special_room(FALSE); -#ifdef SINKS if(IS_SINK(levl[u.ux][u.uy].typ) && Levitation) dosinkfall(); -#endif if (!in_steed_dismounting) { /* if dismounting, we'll check again later */ boolean pit; diff --git a/src/invent.c b/src/invent.c index c6eea5989..90cb9ff1c 100644 --- a/src/invent.c +++ b/src/invent.c @@ -2364,10 +2364,8 @@ char *buf; cmap = S_ice; /* "ice" */ else if (is_pool(x,y)) dfeature = "pool of water"; -#ifdef SINKS else if (IS_SINK(ltyp)) cmap = S_sink; /* "sink" */ -#endif else if (IS_ALTAR(ltyp)) { Sprintf(altbuf, "%saltar to %s (%s)", ((lev->altarmask & AM_SHRINE) && diff --git a/src/mklev.c b/src/mklev.c index 8e3b267d1..1d895dc2c 100644 --- a/src/mklev.c +++ b/src/mklev.c @@ -20,9 +20,7 @@ STATIC_DCL void FDECL(mkfount,(int,struct mkroom *)); -#ifdef SINKS STATIC_DCL void FDECL(mksink,(struct mkroom *)); -#endif STATIC_DCL void FDECL(mkaltar,(struct mkroom *)); STATIC_DCL void FDECL(mkgrave,(struct mkroom *)); STATIC_DCL void NDECL(makevtele); @@ -790,9 +788,7 @@ skip0: if(Is_rogue_level(&u.uz)) goto skip_nonrogue; #endif if(!rn2(10)) mkfount(0,croom); -#ifdef SINKS if(!rn2(60)) mksink(croom); -#endif if(!rn2(60)) mkaltar(croom); x = 80 - (depth(&u.uz) * 2); if (x < 2) x = 2; @@ -1347,7 +1343,6 @@ register struct mkroom *croom; level.flags.nfountains++; } -#ifdef SINKS STATIC_OVL void mksink(croom) register struct mkroom *croom; @@ -1366,8 +1361,6 @@ register struct mkroom *croom; level.flags.nsinks++; } -#endif /* SINKS */ - STATIC_OVL void mkaltar(croom) diff --git a/src/mthrowu.c b/src/mthrowu.c index 02339c0ad..8a9ed6736 100644 --- a/src/mthrowu.c +++ b/src/mthrowu.c @@ -431,11 +431,8 @@ struct obj *obj; /* missile (or stack providing it) */ /* missile might hit iron bars */ || (levl[bhitpos.x+dx][bhitpos.y+dy].typ == IRONBARS && hits_bars(&singleobj, bhitpos.x, bhitpos.y, !rn2(5), 0)) -#ifdef SINKS /* Thrown objects "sink" */ - || IS_SINK(levl[bhitpos.x][bhitpos.y].typ) -#endif - ) { + || IS_SINK(levl[bhitpos.x][bhitpos.y].typ)) { if (singleobj) /* hits_bars might have destroyed it */ (void) drop_throw(singleobj, 0, bhitpos.x, bhitpos.y); break; diff --git a/src/music.c b/src/music.c index 4491b8909..94f6282d1 100644 --- a/src/music.c +++ b/src/music.c @@ -275,12 +275,10 @@ int force; if (cansee(x,y)) pline_The("fountain falls into a chasm."); goto do_pit; -#ifdef SINKS case SINK : if (cansee(x,y)) pline_The("kitchen sink falls into a chasm."); goto do_pit; -#endif case ALTAR : if (Is_astralevel(&u.uz) || Is_sanctum(&u.uz)) break; diff --git a/src/objnam.c b/src/objnam.c index 94c2f4fb6..e1b00a777 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -2913,7 +2913,6 @@ wiztrap: newsym(x, y); return(&zeroobj); } -# ifdef SINKS if (!BSTRCMPI(bp, p-4, "sink")) { lev->typ = SINK; level.flags.nsinks++; @@ -2921,7 +2920,6 @@ wiztrap: newsym(x, y); return &zeroobj; } -# endif /* ("water" matches "potion of water" rather than terrain) */ if (!BSTRCMPI(bp, p-4, "pool") || !BSTRCMPI(bp, p-4, "moat")) { lev->typ = !BSTRCMPI(bp, p-4, "pool") ? POOL : MOAT; diff --git a/src/potion.c b/src/potion.c index 396dbfa53..7a4014635 100644 --- a/src/potion.c +++ b/src/potion.c @@ -399,7 +399,6 @@ dodrink() return 1; } } -#ifdef SINKS /* Or a kitchen sink? */ if (IS_SINK(levl[u.ux][u.uy].typ) && /* not as low as floor level but similar restrictions apply */ @@ -409,7 +408,6 @@ dodrink() return 1; } } -#endif /* Or are you surrounded by water? */ if (Underwater && !u.uswallow) { diff --git a/src/sit.c b/src/sit.c index c91a96a24..72c94c56b 100644 --- a/src/sit.c +++ b/src/sit.c @@ -126,11 +126,9 @@ dosit() (void) rust_dmg(uarm, "armor", 1, TRUE, &youmonst); if (!rn2(10) && uarmf && uarmf->otyp != WATER_WALKING_BOOTS) (void) rust_dmg(uarm, "armor", 1, TRUE, &youmonst); -#ifdef SINKS } else if(IS_SINK(typ)) { You(sit_message, defsyms[S_sink].explanation); Your("%s gets wet.", humanoid(youmonst.data) ? "rump" : "underside"); -#endif } else if(IS_ALTAR(typ)) { You(sit_message, defsyms[S_altar].explanation); altar_wrath(u.ux, u.uy); diff --git a/src/sounds.c b/src/sounds.c index bd20178c0..efb496372 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -51,7 +51,6 @@ dosounds() }; You_hear1(fountain_msg[rn2(3)+hallu]); } -#ifdef SINK if (level.flags.nsinks && !rn2(300)) { static const char * const sink_msg[3] = { "a slow drip.", @@ -60,7 +59,6 @@ dosounds() }; You_hear1(sink_msg[rn2(2)+hallu]); } -#endif if (level.flags.has_court && !rn2(200)) { static const char * const throne_msg[4] = { "the tones of courtly conversation.", diff --git a/src/zap.c b/src/zap.c index 41723a566..c19557fd0 100644 --- a/src/zap.c +++ b/src/zap.c @@ -3160,10 +3160,8 @@ struct obj **pobj; /* object tossed/used, set to NULL (is_pool(bhitpos.x, bhitpos.y) || is_lava(bhitpos.x, bhitpos.y))) break; -#ifdef SINKS if(IS_SINK(typ) && weapon != FLASHED_LIGHT) break; /* physical objects fall onto sink */ -#endif } /* limit range of ball so hero won't make an invalid move */ if (weapon == THROWN_WEAPON && range > 0 && @@ -3273,10 +3271,8 @@ int dx, dy; } tmp_at(bhitpos.x, bhitpos.y); delay_output(); -#ifdef SINKS if(IS_SINK(levl[bhitpos.x][bhitpos.y].typ)) break; /* boomerang falls on sink */ -#endif /* ct==0, initial position, we want next delta to be same; ct==5, opposite position, repeat delta undoes first one */ if (ct % 5 != 0) i += (counterclockwise ? -1 : 1); diff --git a/util/lev_main.c b/util/lev_main.c index d192e1e3e..fa539f5e2 100644 --- a/util/lev_main.c +++ b/util/lev_main.c @@ -494,12 +494,7 @@ char c; case '{' : return(FOUNTAIN); case '\\' : return(THRONE); case 'K' : -#ifdef SINKS return(SINK); -#else - yywarning("Sinks are not allowed in this version! Ignoring..."); - return(ROOM); -#endif case '}' : return(MOAT); case 'P' : return(POOL); case 'L' : return(LAVAPOOL); diff --git a/util/makedefs.c b/util/makedefs.c index 57493448b..6ddff76c0 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -990,9 +990,6 @@ make_version() /* levels and/or topology (0..4) */ #ifdef REINCARNATION | (1L << 1) -#endif -#ifdef SINKS - | (1L << 2) #endif /* monsters (5..9) */ #ifdef MAIL @@ -1329,9 +1326,6 @@ static const char *build_opts[] = { #ifdef SHELL "shell command", #endif -#ifdef SINKS - "sinks", -#endif #ifdef SUSPEND "suspend command", #endif @@ -1664,9 +1658,6 @@ h_filter(line) if (*line == '#') return TRUE; /* ignore comment lines */ if (sscanf(line, "----- %s", tag) == 1) { skip = FALSE; -#ifndef SINKS - if (!strcmp(tag, "SINKS")) skip = TRUE; -#endif } else if (skip && !strncmp(line, "-----", 5)) skip = FALSE; return skip; diff --git a/win/share/tilemap.c b/win/share/tilemap.c index 97fc7acc4..19872f96a 100644 --- a/win/share/tilemap.c +++ b/win/share/tilemap.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 tilemap.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 tilemap.c $NHDT-Date: 1425082379 2015/02/28 00:12:59 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.12 $ */ /* NetHack 3.5 tilemap.c $Date: 2009/05/06 10:59:02 $ $Revision: 1.7 $ */ /* SCCS Id: @(#)tilemap.c 3.5 2000/06/04 */ /* NetHack may be freely redistributed. See license for details. */ @@ -172,23 +172,10 @@ int set, entry; tilenum = 0; /* set-relative number */ for (i = 0; i < (MAXPCHARS - MAXEXPCHARS); i++) { if (set == OTH_GLYPH && tilenum == entry) { - if (*defsyms[i].explanation) + if (*defsyms[i].explanation) { return defsyms[i].explanation; - else { - /* if SINKS are turned off, this - * string won't be there (and can't be there - * to prevent symbol-identification and - * special-level mimic appearances from - * thinking the items exist) - */ - switch (i) { - case S_sink: - Sprintf(buf, "sink"); - break; - default: - Sprintf(buf, "cmap %d", tilenum); - break; - } + } else { + Sprintf(buf, "cmap %d", tilenum); return buf; } } From 260f7ea8607a2658df6d6182ff95687b5b731d9c Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Fri, 13 Feb 2015 23:31:41 -0500 Subject: [PATCH 029/132] Make TOURIST unconditional. --- include/artilist.h | 2 -- include/config.h | 1 - include/decl.h | 2 -- include/extern.h | 2 -- include/prop.h | 6 ---- src/apply.c | 8 ----- src/artifact.c | 6 +--- src/attrib.c | 4 --- src/decl.c | 2 -- src/do_wear.c | 73 ++++++--------------------------------------- src/dogmove.c | 8 ----- src/dokick.c | 5 +--- src/dothrow.c | 4 --- src/invent.c | 19 ++---------- src/lock.c | 23 ++------------ src/mhitu.c | 20 ++----------- src/mkobj.c | 2 -- src/mon.c | 2 -- src/monmove.c | 4 --- src/monst.c | 8 ----- src/mplayer.c | 2 -- src/mthrowu.c | 2 -- src/muse.c | 7 ++--- src/objects.c | 15 ---------- src/objnam.c | 4 --- src/polyself.c | 4 --- src/pray.c | 4 --- src/read.c | 4 --- src/role.c | 6 ---- src/shk.c | 10 ++----- src/sounds.c | 4 --- src/steal.c | 9 +----- src/trap.c | 8 ----- src/u_init.c | 14 --------- src/uhitm.c | 6 ---- src/vault.c | 5 +--- src/worn.c | 18 +---------- src/zap.c | 6 ---- sys/amiga/winami.c | 8 ----- util/makedefs.c | 10 +------ win/Qt/qt_win.cpp | 5 ---- win/gnome/gnworn.c | 11 ------- win/share/tilemap.c | 15 ---------- 43 files changed, 27 insertions(+), 351 deletions(-) diff --git a/include/artilist.h b/include/artilist.h index 2f21d6839..b13a91abd 100644 --- a/include/artilist.h +++ b/include/artilist.h @@ -215,13 +215,11 @@ A("The Tsurugi of Muramasa", TSURUGI, PHYS(0,8), NO_DFNS, NO_CARY, 0, A_LAWFUL, PM_SAMURAI, NON_PM, 4500L ), -#ifdef TOURIST A("The Platinum Yendorian Express Card", CREDIT_CARD, (SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL|SPFX_DEFN), (SPFX_ESP|SPFX_HSPDAM), 0, NO_ATTK, NO_DFNS, CARY(AD_MAGM), CHARGE_OBJ, A_NEUTRAL, PM_TOURIST, NON_PM, 7000L ), -#endif A("The Orb of Fate", CRYSTAL_BALL, (SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL|SPFX_LUCK), diff --git a/include/config.h b/include/config.h index 5fb8bd9a8..c9b17524d 100644 --- a/include/config.h +++ b/include/config.h @@ -423,7 +423,6 @@ typedef unsigned char uchar; #define REINCARNATION /* Special Rogue-like levels */ /* monsters & objects */ #define SEDUCE /* Succubi/incubi seduction, by KAA, suggested by IM */ -#define TOURIST /* Tourist players with cameras and Hawaiian shirts */ /* I/O */ #define REDO /* support for redoing last command - DGK */ #if !defined(MAC) diff --git a/include/decl.h b/include/decl.h index 3e7e94ac3..bfe3052db 100644 --- a/include/decl.h +++ b/include/decl.h @@ -234,9 +234,7 @@ E uchar monsyms[MAXMCLASSES]; /* current class symbols */ #include "obj.h" E NEARDATA struct obj *invent, *uarm, *uarmc, *uarmh, *uarms, *uarmg, *uarmf, -#ifdef TOURIST *uarmu, /* under-wear, so to speak */ -#endif *uskin, *uamul, *uleft, *uright, *ublindf, *uwep, *uswapwep, *uquiver; diff --git a/include/extern.h b/include/extern.h index 8ffac991d..667d598d1 100644 --- a/include/extern.h +++ b/include/extern.h @@ -429,9 +429,7 @@ E int NDECL(Gloves_off); E int NDECL(Boots_off); E int NDECL(Cloak_off); E int NDECL(Shield_off); -#ifdef TOURIST E int NDECL(Shirt_off); -#endif E void NDECL(Amulet_off); E void FDECL(Ring_on, (struct obj *)); E void FDECL(Ring_off, (struct obj *)); diff --git a/include/prop.h b/include/prop.h index 2ca7b871d..89728fa9f 100644 --- a/include/prop.h +++ b/include/prop.h @@ -96,12 +96,8 @@ struct prop { # define W_ARMS 0x00000008L /* Shield */ # define W_ARMG 0x00000010L /* Gloves/gauntlets */ # define W_ARMF 0x00000020L /* Footwear */ -#ifdef TOURIST # define W_ARMU 0x00000040L /* Undershirt */ # define W_ARMOR (W_ARM | W_ARMC | W_ARMH | W_ARMS | W_ARMG | W_ARMF | W_ARMU) -#else -# define W_ARMOR (W_ARM | W_ARMC | W_ARMH | W_ARMS | W_ARMG | W_ARMF) -#endif /* Weapons and artifacts */ # define W_WEP 0x00000100L /* Wielded weapon */ # define W_QUIVER 0x00000200L /* Quiver for (f)iring ammo */ @@ -149,8 +145,6 @@ struct prop { #define WORN_BOOTS W_ARMF #define WORN_AMUL W_AMUL #define WORN_BLINDF W_TOOL -#ifdef TOURIST #define WORN_SHIRT W_ARMU -#endif #endif /* PROP_H */ diff --git a/src/apply.c b/src/apply.c index a5a38dd8a..1ab6153df 100644 --- a/src/apply.c +++ b/src/apply.c @@ -7,9 +7,7 @@ extern boolean notonhead; /* for long worms */ -#ifdef TOURIST STATIC_DCL int FDECL(use_camera, (struct obj *)); -#endif STATIC_DCL int FDECL(use_towel, (struct obj *)); STATIC_DCL boolean FDECL(its_dead, (int,int,int *)); STATIC_DCL int FDECL(use_stethoscope, (struct obj *)); @@ -44,7 +42,6 @@ void FDECL( amii_speaker, ( struct obj *, char *, int ) ); static const char no_elbow_room[] = "don't have enough elbow-room to maneuver."; -#ifdef TOURIST STATIC_OVL int use_camera(obj) struct obj *obj; @@ -82,7 +79,6 @@ use_camera(obj) } return 1; } -#endif STATIC_OVL int use_towel(obj) @@ -3154,9 +3150,7 @@ doapply() use_grease(obj); break; case LOCK_PICK: -#ifdef TOURIST case CREDIT_CARD: -#endif case SKELETON_KEY: res = (pick_lock(obj) != 0); break; @@ -3223,11 +3217,9 @@ doapply() case POT_OIL: light_cocktail(obj); break; -#ifdef TOURIST case EXPENSIVE_CAMERA: res = use_camera(obj); break; -#endif case TOWEL: res = use_towel(obj); break; diff --git a/src/artifact.c b/src/artifact.c index e9351ba92..c9baaf365 100644 --- a/src/artifact.c +++ b/src/artifact.c @@ -1687,11 +1687,7 @@ long *abil; long wornbits; long wornmask = (W_ARM | W_ARMC | W_ARMH | W_ARMS | W_ARMG | W_ARMF | W_WEP | W_QUIVER | W_SWAPWEP | W_ART | W_ARTI | W_AMUL | - W_RINGL | W_RINGR | W_TOOL | W_BALL | W_CHAIN | W_SADDLE -#ifdef TOURIST - | W_ARMU -#endif - ); + W_RINGL | W_RINGR | W_TOOL | W_BALL | W_CHAIN | W_SADDLE | W_ARMU); dtyp = abil_to_adtyp(abil); spfx = abil_to_spfx(abil); diff --git a/src/attrib.c b/src/attrib.c index 15377c76c..fbac9949a 100644 --- a/src/attrib.c +++ b/src/attrib.c @@ -639,9 +639,7 @@ long frommask; case PM_RANGER: abil = ran_abil; break; case PM_ROGUE: abil = rog_abil; break; case PM_SAMURAI: abil = sam_abil; break; -#ifdef TOURIST case PM_TOURIST: abil = tou_abil; break; -#endif case PM_VALKYRIE: abil = val_abil; break; case PM_WIZARD: abil = wiz_abil; break; default: break; @@ -769,9 +767,7 @@ int oldlevel, newlevel; case PM_RANGER: abil = ran_abil; break; case PM_ROGUE: abil = rog_abil; break; case PM_SAMURAI: abil = sam_abil; break; -#ifdef TOURIST case PM_TOURIST: abil = tou_abil; break; -#endif case PM_VALKYRIE: abil = val_abil; break; case PM_WIZARD: abil = wiz_abil; break; default: abil = 0; break; diff --git a/src/decl.c b/src/decl.c index 963e55324..c9105bee6 100644 --- a/src/decl.c +++ b/src/decl.c @@ -150,9 +150,7 @@ NEARDATA struct obj *invent = (struct obj *)0, *uwep = (struct obj *)0, *uarm = (struct obj *)0, *uswapwep = (struct obj *)0, *uquiver = (struct obj *)0, /* quiver */ -#ifdef TOURIST *uarmu = (struct obj *)0, /* under-wear, so to speak */ -#endif *uskin = (struct obj *)0, /* dragon armor, if a dragon */ *uarmc = (struct obj *)0, *uarmh = (struct obj *)0, *uarms = (struct obj *)0, *uarmg = (struct obj *)0, diff --git a/src/do_wear.c b/src/do_wear.c index efd9a51ff..6b622d7af 100644 --- a/src/do_wear.c +++ b/src/do_wear.c @@ -9,9 +9,7 @@ static NEARDATA const char see_yourself[] = "see yourself"; static NEARDATA const char unknown_type[] = "Unknown type of %s (%d)"; static NEARDATA const char c_armor[] = "armor", c_suit[] = "suit", -#ifdef TOURIST c_shirt[] = "shirt", -#endif c_cloak[] = "cloak", c_gloves[] = "gloves", c_boots[] = "boots", @@ -24,11 +22,8 @@ static NEARDATA const char c_armor[] = "armor", static NEARDATA const long takeoff_order[] = { WORN_BLINDF, W_WEP, WORN_SHIELD, WORN_GLOVES, LEFT_RING, RIGHT_RING, WORN_CLOAK, - WORN_HELMET, WORN_AMUL, WORN_ARMOR, -#ifdef TOURIST - WORN_SHIRT, -#endif - WORN_BOOTS, W_SWAPWEP, W_QUIVER, 0L }; + WORN_HELMET, WORN_AMUL, WORN_ARMOR, WORN_SHIRT, WORN_BOOTS, W_SWAPWEP, + W_QUIVER, 0L }; STATIC_DCL void FDECL(on_msg, (struct obj *)); STATIC_DCL void FDECL(toggle_stealth, (struct obj *,long,BOOLEAN_P)); @@ -40,9 +35,7 @@ STATIC_PTR int NDECL(Helmet_on); STATIC_PTR int NDECL(Gloves_on); STATIC_DCL void FDECL(wielding_corpse, (struct obj *,BOOLEAN_P)); STATIC_PTR int NDECL(Shield_on); -#ifdef TOURIST STATIC_PTR int NDECL(Shirt_on); -#endif STATIC_DCL void NDECL(Amulet_on); STATIC_DCL void FDECL(learnring, (struct obj *,BOOLEAN_P)); STATIC_DCL void FDECL(Ring_off_or_gone, (struct obj *, BOOLEAN_P)); @@ -601,7 +594,6 @@ Shield_off(VOID_ARGS) return 0; } -#ifdef TOURIST STATIC_PTR int Shirt_on(VOID_ARGS) { @@ -631,7 +623,6 @@ Shirt_off(VOID_ARGS) setworn((struct obj *)0, W_ARMU); return 0; } -#endif /*TOURIST*/ /* This must be done in worn.c, because one of the possible intrinsics conferred * is fire resistance, and we have to immediately set HFire_resistance in worn.c @@ -1137,9 +1128,7 @@ struct obj *obj; /* if null, do all worn items; otherwise just obj itself */ if (!obj ? uleft != 0 : (obj == uleft)) (void) Ring_on(uleft); if (!obj ? uamul != 0 : (obj == uamul)) (void) Amulet_on(); -#ifdef TOURIST if (!obj ? uarmu != 0 : (obj == uarmu)) (void) Shirt_on(); -#endif if (!obj ? uarm != 0 : (obj == uarm)) (void) Armor_on(); if (!obj ? uarmc != 0 : (obj == uarmc)) (void) Cloak_on(); if (!obj ? uarmf != 0 : (obj == uarmf)) (void) Boots_on(); @@ -1163,11 +1152,9 @@ register struct obj *otmp; if (otmp == uarm) result = (afternmv == Armor_on || afternmv == Armor_off || what == WORN_ARMOR); -#ifdef TOURIST else if (otmp == uarmu) result = (afternmv == Shirt_on || afternmv == Shirt_off || what == WORN_SHIRT); -#endif else if (otmp == uarmc) result = (afternmv == Cloak_on || afternmv == Cloak_off || what == WORN_CLOAK); @@ -1199,10 +1186,8 @@ struct obj *otmp; /* 'T' (also 'W') sets afternmv, 'A' sets context.takeoff.what */ if (otmp == uarm) result = (afternmv == Armor_off || what == WORN_ARMOR); -#ifdef TOURIST else if (otmp == uarmu) result = (afternmv == Shirt_off || what == WORN_SHIRT); -#endif else if (otmp == uarmc) result = (afternmv == Cloak_off || what == WORN_CLOAK); else if (otmp == uarmf) @@ -1297,11 +1282,9 @@ dotakeoff() } else if (uarm) { armorpieces++; otmp = uarm; -#ifdef TOURIST } else if (uarmu) { armorpieces++; otmp = uarmu; -#endif } if (!armorpieces) { /* assert( GRAY_DRAGON_SCALES > YELLOW_DRAGON_SCALE_MAIL ); */ @@ -1325,21 +1308,16 @@ dotakeoff() /* note: the `uskin' case shouldn't be able to happen here; dragons can't wear any armor so will end up with `armorpieces == 0' above */ if (otmp == uskin || ((otmp == uarm) && uarmc) -#ifdef TOURIST - || ((otmp == uarmu) && (uarmc || uarm)) -#endif - ) { + || ((otmp == uarmu) && (uarmc || uarm))) { char why[BUFSZ], what[BUFSZ]; why[0] = what[0] = '\0'; if (otmp != uskin) { if (uarmc) Strcat(what, cloak_simple_name(uarmc)); -#ifdef TOURIST if ((otmp == uarmu) && uarm) { if (uarmc) Strcat(what, " and "); Strcat(what, suit_simple_name(uarm)); } -#endif Sprintf(why, " without taking off your %s first", what); } You_cant("take that off%s.", why); @@ -1369,12 +1347,10 @@ doremring() MOREACC(ublindf); if(!Accessories) { - pline("Not wearing any accessories.%s", (iflags.cmdassist && - (uarm || uarmc || -#ifdef TOURIST - uarmu || -#endif - uarms || uarmh || uarmg || uarmf)) ? + pline("Not wearing any accessories.%s", + (iflags.cmdassist + && (uarm || uarmc || uarmu || uarms || uarmh || uarmg + || uarmf)) ? " Use 'T' command to take off armor." : ""); return(0); } @@ -1516,9 +1492,7 @@ boolean noisy; const char *which; which = is_cloak(otmp) ? c_cloak : -#ifdef TOURIST is_shirt(otmp) ? c_shirt : -#endif is_suit(otmp) ? c_suit : 0; if (which && cantweararm(youmonst.data) && /* same exception for cloaks as used in m_dowear() */ @@ -1531,12 +1505,7 @@ boolean noisy; return 0; } - if (welded(uwep) && bimanual(uwep) && - (is_suit(otmp) -#ifdef TOURIST - || is_shirt(otmp) -#endif - )) { + if (welded(uwep) && bimanual(uwep) && (is_suit(otmp) || is_shirt(otmp))) { if (noisy) You("cannot do that while holding your %s.", is_sword(uwep) ? c_sword : c_weapon); @@ -1613,7 +1582,6 @@ boolean noisy; err++; } else *mask = W_ARMG; -#ifdef TOURIST } else if (is_shirt(otmp)) { if (uarm || uarmc || uarmu) { if (uarmu) { @@ -1625,7 +1593,6 @@ boolean noisy; err++; } else *mask = W_ARMU; -#endif } else if (is_cloak(otmp)) { if (uarmc) { if (noisy) already_wearing(an(cloak_simple_name(uarmc))); @@ -1711,9 +1678,7 @@ dowear() } else { if(is_cloak(otmp)) (void) Cloak_on(); if (is_shield(otmp)) (void) Shield_on(); -#ifdef TOURIST if (is_shirt(otmp)) (void) Shirt_on(); -#endif on_msg(otmp); } context.takeoff.mask = context.takeoff.what = 0L; @@ -1858,9 +1823,7 @@ find_ac() if(uarmf) uac -= ARM_BONUS(uarmf); if(uarms) uac -= ARM_BONUS(uarms); if(uarmg) uac -= ARM_BONUS(uarmg); -#ifdef TOURIST if(uarmu) uac -= ARM_BONUS(uarmu); -#endif if(uleft && uleft->otyp == RIN_PROTECTION) uac -= uleft->spe; if(uright && uright->otyp == RIN_PROTECTION) uac -= uright->spe; if (HProtection & INTRINSIC) uac -= u.ublessed; @@ -1966,10 +1929,8 @@ struct monst *victim; otmph = (victim == &youmonst) ? uarmc : which_armor(victim, W_ARMC); if (!otmph) otmph = (victim == &youmonst) ? uarm : which_armor(victim, W_ARM); -#ifdef TOURIST if (!otmph) otmph = (victim == &youmonst) ? uarmu : which_armor(victim, W_ARMU); -#endif otmp = (victim == &youmonst) ? uarmh : which_armor(victim, W_ARMH); if(otmp && (!otmph || !rn2(4))) otmph = otmp; @@ -2086,20 +2047,14 @@ register struct obj *otmp; } } /* special suit and shirt checks */ - if (otmp == uarm -#ifdef TOURIST - || otmp == uarmu -#endif - ) { + if (otmp == uarm || otmp == uarmu) { why = 0; /* the item which prevents disrobing */ if (uarmc && uarmc->cursed) { Sprintf(buf, "remove your %s", cloak_simple_name(uarmc)); why = uarmc; -#ifdef TOURIST } else if (otmp == uarmu && uarm && uarm->cursed) { Sprintf(buf, "remove your %s", c_suit); why = uarm; -#endif } else if (welded(uwep) && bimanual(uwep)) { Sprintf(buf, "release your %s", is_sword(uwep) ? c_sword : @@ -2126,9 +2081,7 @@ register struct obj *otmp; else if(otmp == uarmg) context.takeoff.mask |= WORN_GLOVES; else if(otmp == uarmh) context.takeoff.mask |= WORN_HELMET; else if(otmp == uarms) context.takeoff.mask |= WORN_SHIELD; -#ifdef TOURIST else if(otmp == uarmu) context.takeoff.mask |= WORN_SHIRT; -#endif else if(otmp == uleft) context.takeoff.mask |= LEFT_RING; else if(otmp == uright) context.takeoff.mask |= RIGHT_RING; else if(otmp == uamul) context.takeoff.mask |= WORN_AMUL; @@ -2179,11 +2132,9 @@ do_takeoff() } else if (doff->what == WORN_SHIELD) { otmp = uarms; if (!cursed(otmp)) (void) Shield_off(); -#ifdef TOURIST } else if (doff->what == WORN_SHIRT) { otmp = uarmu; if (!cursed(otmp)) (void) Shirt_off(); -#endif } else if (doff->what == WORN_AMUL) { otmp = uamul; if (!cursed(otmp)) Amulet_off(); @@ -2257,13 +2208,11 @@ take_off(VOID_ARGS) otmp = uarmh; } else if (doff->what == WORN_SHIELD) { otmp = uarms; -#ifdef TOURIST } else if (doff->what == WORN_SHIRT) { otmp = uarmu; /* add the time to take off and put back on armor and/or cloak */ if (uarm) doff->delay += 2 * objects[uarm->otyp].oc_delay; if (uarmc) doff->delay += 2 * objects[uarmc->otyp].oc_delay + 1; -#endif } else if (doff->what == WORN_AMUL) { doff->delay = 1; } else if (doff->what == LEFT_RING) { @@ -2399,13 +2348,11 @@ register struct obj *atmp; surface(u.ux,u.uy)); (void) Armor_gone(); useup(otmp); -#ifdef TOURIST } else if (DESTROY_ARM(uarmu)) { if (donning(otmp)) cancel_don(); Your("shirt crumbles into tiny threads and falls apart!"); (void) Shirt_off(); useup(otmp); -#endif } else if (DESTROY_ARM(uarmh)) { if (donning(otmp)) cancel_don(); Your("%s turns to dust and is blown away!", @@ -2484,7 +2431,6 @@ boolean only_if_known_cursed; /* ignore covering unless known to be cursed */ } return TRUE; } -#ifdef TOURIST /* check for shirt covered by suit and/or cloak */ if (obj == uarmu && ((uarm && BLOCKSACCESS(uarm)) || (uarmc && BLOCKSACCESS(uarmc)))) { @@ -2505,7 +2451,6 @@ boolean only_if_known_cursed; /* ignore covering unless known to be cursed */ } return TRUE; } -#endif /* check for ring covered by gloves */ if ((obj == uleft || obj == uright) && uarmg && BLOCKSACCESS(uarmg)) { if (verb) { diff --git a/src/dogmove.c b/src/dogmove.c index 795905393..526f40454 100644 --- a/src/dogmove.c +++ b/src/dogmove.c @@ -26,10 +26,6 @@ struct monst *mon; struct obj *obj, *wep, dummy, *pickaxe, *unihorn, *key; -#ifndef TOURIST -#define CREDIT_CARD STRANGE_OBJECT /* avoids messy conditionalization */ -#endif - #ifndef GOLDOBJ if (mon->mgold) return &zeroobj; /* pet has something to drop */ #endif @@ -111,10 +107,6 @@ struct monst *mon; if (!obj->owornmask && obj != wep) return obj; } -#ifndef TOURIST -#undef CREDIT_CARD -#endif - return (struct obj *)0; /* don't drop anything */ } diff --git a/src/dokick.c b/src/dokick.c index d0b20a604..fb81ab5c4 100644 --- a/src/dokick.c +++ b/src/dokick.c @@ -1456,10 +1456,7 @@ boolean shop_floor_obj; const char *result; if (objects[otmp->otyp].oc_material == GLASS -#ifdef TOURIST - || otmp->otyp == EXPENSIVE_CAMERA -#endif - ) { + || otmp->otyp == EXPENSIVE_CAMERA) { if (otmp->otyp == MIRROR) change_luck(-2); result = "crash"; diff --git a/src/dothrow.c b/src/dothrow.c index 953ff1e35..08e21d4f5 100644 --- a/src/dothrow.c +++ b/src/dothrow.c @@ -1775,9 +1775,7 @@ struct obj *obj; obj->oclass != GEM_CLASS) return 1; switch (obj->oclass == POTION_CLASS ? POT_WATER : obj->otyp) { -#ifdef TOURIST case EXPENSIVE_CAMERA: -#endif case POT_WATER: /* really, all potions */ case EGG: case CREAM_PIE: @@ -1806,9 +1804,7 @@ boolean in_view; case LENSES: case MIRROR: case CRYSTAL_BALL: -#ifdef TOURIST case EXPENSIVE_CAMERA: -#endif to_pieces = " into a thousand pieces"; /*FALLTHRU*/ case POT_WATER: /* really, all potions */ diff --git a/src/invent.c b/src/invent.c index 90cb9ff1c..189b63ea9 100644 --- a/src/invent.c +++ b/src/invent.c @@ -1000,12 +1000,8 @@ register const char *let,*word; } else { /* "ugly check" for reading fortune cookies, part 2 */ - if ((!strcmp(word, "read") && - (otmp->otyp == FORTUNE_COOKIE -#ifdef TOURIST - || otmp->otyp == T_SHIRT -#endif - ))) + if ((!strcmp(word, "read") + && (otmp->otyp == FORTUNE_COOKIE || otmp->otyp == T_SHIRT))) allowall = TRUE; } } @@ -1241,10 +1237,7 @@ boolean wearing_armor() { return((boolean)(uarm || uarmc || uarmf || uarmg || uarmh || uarms -#ifdef TOURIST - || uarmu -#endif - )); + || uarmu)); } boolean @@ -2745,16 +2738,10 @@ doprarm() if (!wearing_armor()) { noarmor(TRUE); } else { -#ifdef TOURIST char lets[8]; -#else - char lets[7]; -#endif register int ct = 0; -#ifdef TOURIST if(uarmu) lets[ct++] = obj_to_let(uarmu); -#endif if(uarm) lets[ct++] = obj_to_let(uarm); if(uarmc) lets[ct++] = obj_to_let(uarmc); if(uarmh) lets[ct++] = obj_to_let(uarmh); diff --git a/src/lock.c b/src/lock.c index 6e20e20e6..2ba1d51b7 100644 --- a/src/lock.c +++ b/src/lock.c @@ -61,10 +61,8 @@ lock_action() /* otherwise we're trying to unlock it */ else if (xlock.picktyp == LOCK_PICK) return actions[3]; /* "picking the lock" */ -#ifdef TOURIST else if (xlock.picktyp == CREDIT_CARD) return actions[3]; /* same as lock_pick */ -#endif else if (xlock.door) return actions[0]; /* "unlocking the door" */ else @@ -253,9 +251,7 @@ pick_lock(pick) if (nohands(youmonst.data)) { const char *what = (picktyp == LOCK_PICK) ? "pick" : "key"; -#ifdef TOURIST if (picktyp == CREDIT_CARD) what = "card"; -#endif pline(no_longer, "hold the", what); reset_pick(); return PICKLOCK_LEARNED_SOMETHING; @@ -276,18 +272,13 @@ pick_lock(pick) return PICKLOCK_DID_NOTHING; } else if (u.uswallow) { You_cant("%sunlock %s.", -#ifdef TOURIST (picktyp == CREDIT_CARD) ? "" : -#endif "lock or ", mon_nam(u.ustuck)); return PICKLOCK_DID_NOTHING; } - if((picktyp != LOCK_PICK && -#ifdef TOURIST - picktyp != CREDIT_CARD && -#endif - picktyp != SKELETON_KEY)) { + if((picktyp != LOCK_PICK && picktyp != CREDIT_CARD + && picktyp != SKELETON_KEY)) { impossible("picking lock with object %d?", picktyp); return PICKLOCK_DID_NOTHING; } @@ -344,20 +335,16 @@ pick_lock(pick) You_cant("fix its broken lock with %s.", doname(pick)); return PICKLOCK_LEARNED_SOMETHING; } -#ifdef TOURIST else if (picktyp == CREDIT_CARD && !otmp->olocked) { /* credit cards are only good for unlocking */ You_cant("do that with %s.", an(simple_typename(picktyp))); return PICKLOCK_LEARNED_SOMETHING; } -#endif switch(picktyp) { -#ifdef TOURIST case CREDIT_CARD: ch = ACURR(A_DEX) + 20*Role_if(PM_ROGUE); break; -#endif case LOCK_PICK: ch = 4*ACURR(A_DEX) + 25*Role_if(PM_ROGUE); break; @@ -391,12 +378,10 @@ pick_lock(pick) if (mtmp && canseemon(mtmp) && mtmp->m_ap_type != M_AP_FURNITURE && mtmp->m_ap_type != M_AP_OBJECT) { -#ifdef TOURIST if (picktyp == CREDIT_CARD && (mtmp->isshk || mtmp->data == &mons[PM_ORACLE])) verbalize("No checks, no credit, no problem."); else -#endif pline("I don't think %s would appreciate that.", mon_nam(mtmp)); return PICKLOCK_LEARNED_SOMETHING; } else if (mtmp && mtmp->m_ap_type == M_AP_FURNITURE && @@ -430,13 +415,11 @@ pick_lock(pick) pline("This door is broken."); return PICKLOCK_LEARNED_SOMETHING; default: -#ifdef TOURIST /* credit cards are only good for unlocking */ if(picktyp == CREDIT_CARD && !(door->doormask & D_LOCKED)) { You_cant("lock a door with a credit card."); return PICKLOCK_LEARNED_SOMETHING; } -#endif Sprintf(qbuf,"%s it?", (door->doormask & D_LOCKED) ? "Unlock" : "Lock"); @@ -445,11 +428,9 @@ pick_lock(pick) if(c == 'n') return(0); switch(picktyp) { -#ifdef TOURIST case CREDIT_CARD: ch = 2*ACURR(A_DEX) + 20*Role_if(PM_ROGUE); break; -#endif case LOCK_PICK: ch = 3*ACURR(A_DEX) + 30*Role_if(PM_ROGUE); break; diff --git a/src/mhitu.c b/src/mhitu.c index cf5f68bcd..89cd68968 100644 --- a/src/mhitu.c +++ b/src/mhitu.c @@ -759,10 +759,8 @@ int attk; */ if (uarm) (void)rust_dmg(uarm, xname(uarm), hurt, TRUE, &youmonst); -#ifdef TOURIST else if (uarmu) (void)rust_dmg(uarmu, xname(uarmu), hurt, TRUE, &youmonst); -#endif break; case 2: if (!uarms || !rust_dmg(uarms, xname(uarms), hurt, FALSE, &youmonst)) @@ -803,9 +801,7 @@ struct attack *mattk; { struct obj *obj = (uarmc ? uarmc : uarm); -#ifdef TOURIST if (!obj) obj = uarmu; -#endif if (mattk->adtyp == AD_DRIN) obj = uarmh; /* if your cloak/armor is greased, monster slips off; this @@ -1375,11 +1371,8 @@ dopois: hitmsg(mtmp, mattk); break; } - if(!uwep -#ifdef TOURIST - && !uarmu -#endif - && !uarm && !uarmh && !uarms && !uarmg && !uarmc && !uarmf) { + if(!uwep && !uarmu && !uarm && !uarmh && !uarms && !uarmg && !uarmc + && !uarmf) { boolean goaway = FALSE; pline("%s hits! (I hope you don't mind.)", Monnam(mtmp)); if (Upolyd) { @@ -2331,10 +2324,7 @@ register struct monst *mon; } if (!uarmc && !uarmf && !uarmg && !uarms && !uarmh -#ifdef TOURIST - && !uarmu -#endif - ) + && !uarmu) pline("%s murmurs sweet nothings into your ear.", Blind ? (fem ? "She" : "He") : Monnam(mon)); else @@ -2348,10 +2338,8 @@ register struct monst *mon; mayberem(uarmg, "gloves"); mayberem(uarms, "shield"); mayberem(uarmh, helm_simple_name(uarmh)); -#ifdef TOURIST if(!uarmc && !uarm) mayberem(uarmu, "shirt"); -#endif if (uarm || uarmc) { verbalize("You're such a %s; I wish...", @@ -2515,9 +2503,7 @@ const char *str; (obj == uarmc || obj == uarms) ? "it's in the way" : (obj == uarmf) ? "let me rub your feet" : (obj == uarmg) ? "they're too clumsy" : -#ifdef TOURIST (obj == uarmu) ? "let me massage you" : -#endif /* obj == uarmh */ hairbuf); } diff --git a/src/mkobj.c b/src/mkobj.c index 19e3658df..1edb34977 100644 --- a/src/mkobj.c +++ b/src/mkobj.c @@ -726,9 +726,7 @@ boolean artif; break; case LEASH: otmp->leashmon = 0; break; -#ifdef TOURIST case EXPENSIVE_CAMERA: -#endif case TINNING_KIT: case MAGIC_MARKER: otmp->spe = rn1(70,30); break; diff --git a/src/mon.c b/src/mon.c index 5be8c8e8a..4ed4b168c 100644 --- a/src/mon.c +++ b/src/mon.c @@ -101,9 +101,7 @@ int mndx, mode; case PM_HUNTER: mndx = mode ? PM_RANGER : PM_HUMAN; break; case PM_THUG: mndx = mode ? PM_ROGUE : PM_HUMAN; break; case PM_ROSHI: mndx = mode ? PM_SAMURAI : PM_HUMAN; break; -#ifdef TOURIST case PM_GUIDE: mndx = mode ? PM_TOURIST : PM_HUMAN; break; -#endif case PM_APPRENTICE: mndx = mode ? PM_WIZARD : PM_HUMAN; break; case PM_WARRIOR: mndx = mode ? PM_VALKYRIE : PM_HUMAN; break; default: diff --git a/src/monmove.c b/src/monmove.c index a7e0da3d2..cc18bcd3c 100644 --- a/src/monmove.c +++ b/src/monmove.c @@ -46,9 +46,7 @@ monhaskey(mon, for_unlocking) struct monst *mon; boolean for_unlocking; /* true => credit card ok, false => not ok */ { -#ifdef TOURIST if (for_unlocking && m_carrying(mon, CREDIT_CARD)) return TRUE; -#endif return m_carrying(mon, SKELETON_KEY) || m_carrying(mon, LOCK_PICK); } @@ -1463,9 +1461,7 @@ struct monst *mtmp; typ != SLING && !is_cloak(obj) && typ != FEDORA && !is_gloves(obj) && typ != LEATHER_JACKET && -#ifdef TOURIST typ != CREDIT_CARD && !is_shirt(obj) && -#endif !(typ == CORPSE && verysmall(&mons[obj->corpsenm])) && typ != FORTUNE_COOKIE && typ != CANDY_BAR && typ != PANCAKE && typ != LEMBAS_WAFER && diff --git a/src/monst.c b/src/monst.c index b85449ca2..420118eda 100644 --- a/src/monst.c +++ b/src/monst.c @@ -3021,7 +3021,6 @@ struct permonst _mons2[] = { SIZ(WT_HUMAN, 400, MS_HUMANOID, MZ_HUMAN), 0, 0, M1_HUMANOID|M1_OMNIVORE, M2_NOPOLY|M2_HUMAN|M2_STRONG|M2_COLLECT, M3_INFRAVISIBLE, HI_DOMESTIC), -#ifdef TOURIST MON("tourist", S_HUMAN, LVL(10, 12, 10, 1, 0), G_NOGEN, A(ATTK(AT_WEAP, AD_PHYS, 1, 6), ATTK(AT_WEAP, AD_PHYS, 1, 6), @@ -3029,7 +3028,6 @@ struct permonst _mons2[] = { SIZ(WT_HUMAN, 400, MS_HUMANOID, MZ_HUMAN), 0, 0, M1_HUMANOID|M1_OMNIVORE, M2_NOPOLY|M2_HUMAN|M2_STRONG|M2_COLLECT, M3_INFRAVISIBLE, HI_DOMESTIC), -#endif MON("valkyrie", S_HUMAN, LVL(10, 12, 10, 1, -1), G_NOGEN, A(ATTK(AT_WEAP, AD_PHYS, 1, 8), ATTK(AT_WEAP, AD_PHYS, 1, 8), @@ -3165,7 +3163,6 @@ struct permonst _mons2[] = { M2_NOPOLY|M2_HUMAN|M2_PNAME|M2_PEACEFUL|M2_STRONG|M2_MALE| M2_COLLECT|M2_MAGIC, M3_CLOSE|M3_INFRAVISIBLE, HI_LORD), -#ifdef TOURIST MON("Twoflower", S_HUMAN, LVL(20, 12, 10, 20, 0), (G_NOGEN|G_UNIQ), A(ATTK(AT_WEAP, AD_PHYS, 1, 6), ATTK(AT_WEAP, AD_PHYS, 1, 6), @@ -3175,7 +3172,6 @@ struct permonst _mons2[] = { M2_NOPOLY|M2_HUMAN|M2_PNAME|M2_PEACEFUL|M2_STRONG|M2_MALE| M2_COLLECT|M2_MAGIC, M3_CLOSE|M3_INFRAVISIBLE, HI_DOMESTIC), -#endif MON("Norn", S_HUMAN, LVL(20, 12, 0, 80, 0), (G_NOGEN|G_UNIQ), A(ATTK(AT_WEAP, AD_PHYS, 1, 8), ATTK(AT_WEAP, AD_PHYS, 1, 6), @@ -3313,11 +3309,9 @@ struct permonst _mons2[] = { M2_NOPOLY|M2_HUMAN|M2_PNAME|M2_HOSTILE|M2_STRONG|M2_STALK| M2_NASTY|M2_MALE|M2_COLLECT|M2_MAGIC, M3_WANTSARTI|M3_WAITFORU|M3_INFRAVISIBLE, HI_LORD), -#ifdef TOURIST /* * Note: the Master of Thieves was defined above. */ -#endif MON("Lord Surtur", S_GIANT, LVL(15, 12, 2, 50, 12), (G_NOGEN|G_UNIQ), A(ATTK(AT_WEAP, AD_PHYS, 2,10), ATTK(AT_WEAP, AD_PHYS, 2,10), @@ -3438,7 +3432,6 @@ struct permonst _mons2[] = { M1_HUMANOID|M1_OMNIVORE, M2_NOPOLY|M2_HUMAN|M2_PEACEFUL|M2_STRONG|M2_COLLECT, M3_INFRAVISIBLE, HI_DOMESTIC), -#ifdef TOURIST MON("guide", S_HUMAN, LVL(5, 12, 10, 20, 0), G_NOGEN, A(ATTK(AT_WEAP, AD_PHYS, 1, 6), ATTK(AT_MAGC, AD_SPEL, 0, 0), @@ -3447,7 +3440,6 @@ struct permonst _mons2[] = { M1_HUMANOID|M1_OMNIVORE, M2_NOPOLY|M2_HUMAN|M2_PEACEFUL | M2_STRONG|M2_COLLECT|M2_MAGIC, M3_INFRAVISIBLE, HI_DOMESTIC), -#endif MON("warrior", S_HUMAN, LVL(5, 12, 10, 10, -1), G_NOGEN, A(ATTK(AT_WEAP, AD_PHYS, 1, 8), ATTK(AT_WEAP, AD_PHYS, 1, 8), diff --git a/src/mplayer.c b/src/mplayer.c index 58546c931..c2b7f23f8 100644 --- a/src/mplayer.c +++ b/src/mplayer.c @@ -203,11 +203,9 @@ register boolean special; case PM_SAMURAI: if (rn2(2)) weapon = KATANA; break; -#ifdef TOURIST case PM_TOURIST: /* Defaults are just fine */ break; -#endif case PM_VALKYRIE: if (rn2(2)) weapon = WAR_HAMMER; if (rn2(2)) armor = rnd_class(PLATE_MAIL, CHAIN_MAIL); diff --git a/src/mthrowu.c b/src/mthrowu.c index 8a9ed6736..e61814321 100644 --- a/src/mthrowu.c +++ b/src/mthrowu.c @@ -814,9 +814,7 @@ int whodidit; /* 1==hero, 0=other, -1==just check whether it'll pass thru */ case TOOL_CLASS: hits = (obj_type != SKELETON_KEY && obj_type != LOCK_PICK && -#ifdef TOURIST obj_type != CREDIT_CARD && -#endif obj_type != TALLOW_CANDLE && obj_type != WAX_CANDLE && obj_type != LENSES && diff --git a/src/muse.c b/src/muse.c index a404071c7..ec4bc55ab 100644 --- a/src/muse.c +++ b/src/muse.c @@ -988,11 +988,8 @@ struct monst *mtmp; return FALSE; if (u.uswallow) return FALSE; if (in_your_sanctuary(mtmp, 0, 0)) return FALSE; - if (dmgtype(mtmp->data, AD_HEAL) && !uwep -#ifdef TOURIST - && !uarmu -#endif - && !uarm && !uarmh && !uarms && !uarmg && !uarmc && !uarmf) + if (dmgtype(mtmp->data, AD_HEAL) && !uwep && !uarmu && !uarm && !uarmh + && !uarms && !uarmg && !uarmc && !uarmf) return FALSE; if (!ranged_stuff) return FALSE; diff --git a/src/objects.c b/src/objects.c index 1de8dfffe..4c015595d 100644 --- a/src/objects.c +++ b/src/objects.c @@ -367,13 +367,8 @@ ARMOR("plate mail", (char *)0, 1, 0, 1, 0, 44, 5, 450, 600, 3, 2, ARM_SUIT, IRON, HI_METAL), ARMOR("crystal plate mail", (char *)0, 1, 0, 1, 0, 10, 5, 450, 820, 3, 2, ARM_SUIT, GLASS, CLR_WHITE), -#ifdef TOURIST ARMOR("bronze plate mail", (char *)0, 1, 0, 1, 0, 25, 5, 450, 400, 4, 1, ARM_SUIT, COPPER, HI_COPPER), -#else -ARMOR("bronze plate mail", (char *)0, - 1, 0, 1, 0, 35, 5, 450, 400, 4, 1, ARM_SUIT, COPPER, HI_COPPER), -#endif ARMOR("splint mail", (char *)0, 1, 0, 1, 0, 62, 5, 400, 80, 4, 1, ARM_SUIT, IRON, HI_METAL), ARMOR("banded mail", (char *)0, @@ -399,13 +394,11 @@ ARMOR("leather armor", (char *)0, ARMOR("leather jacket", (char *)0, 1, 0, 0, 0, 12, 0, 30, 10, 9, 0, ARM_SUIT, LEATHER, CLR_BLACK), -#ifdef TOURIST /* shirts */ ARMOR("Hawaiian shirt", (char *)0, 1, 0, 0, 0, 8, 0, 5, 3, 10, 0, ARM_SHIRT, CLOTH, CLR_MAGENTA), ARMOR("T-shirt", (char *)0, 1, 0, 0, 0, 2, 0, 5, 2, 10, 0, ARM_SHIRT, CLOTH, CLR_WHITE), -#endif /* cloaks */ /* 'cope' is not a spelling mistake... leave it be */ @@ -591,12 +584,8 @@ CONTAINER("bag of tricks", "bag", 0, 1, 1, 20, 15, 100, CLOTH, HI_CLOTH), /* lock opening tools */ TOOL("skeleton key", "key", 0, 0, 0, 0, 80, 3, 10, IRON, HI_METAL), -#ifdef TOURIST TOOL("lock pick", (char *)0, 1, 0, 0, 0, 60, 4, 20, IRON, HI_METAL), TOOL("credit card", (char *)0, 1, 0, 0, 0, 15, 1, 10, PLASTIC, CLR_WHITE), -#else -TOOL("lock pick", (char *)0, 1, 0, 0, 0, 75, 4, 20, IRON, HI_METAL), -#endif /* light sources */ TOOL("tallow candle", "candle", 0, 1, 0, 0, 20, 2, 10, WAX, CLR_WHITE), TOOL("wax candle", "candle", 0, 1, 0, 0, 5, 2, 20, WAX, CLR_WHITE), @@ -604,13 +593,9 @@ TOOL("brass lantern", (char *)0,1, 0, 0, 0, 30, 30, 12, COPPER, CLR_YELLOW), TOOL("oil lamp", "lamp", 0, 0, 0, 0, 45, 20, 10, COPPER, CLR_YELLOW), TOOL("magic lamp", "lamp", 0, 0, 1, 0, 15, 20, 50, COPPER, CLR_YELLOW), /* other tools */ -#ifdef TOURIST TOOL("expensive camera", (char *)0, 1, 0, 0, 1, 15, 12, 200, PLASTIC, CLR_BLACK), TOOL("mirror", "looking glass", 0, 0, 0, 0, 45, 13, 10, GLASS, HI_SILVER), -#else -TOOL("mirror", "looking glass", 0, 0, 0, 0, 60, 13, 10, GLASS, HI_SILVER), -#endif TOOL("crystal ball", "glass orb", 0, 0, 1, 1, 15,150, 60, GLASS, HI_GLASS), TOOL("lenses", (char *)0, 1, 0, 0, 0, 5, 3, 80, GLASS, HI_GLASS), diff --git a/src/objnam.c b/src/objnam.c index e1b00a777..624ed92ff 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -2182,9 +2182,7 @@ STATIC_OVL NEARDATA const struct o_range o_ranges[] = { { "boots", ARMOR_CLASS, LOW_BOOTS, LEVITATION_BOOTS }, { "shoes", ARMOR_CLASS, LOW_BOOTS, IRON_SHOES }, { "cloak", ARMOR_CLASS, MUMMY_WRAPPING, CLOAK_OF_DISPLACEMENT }, -#ifdef TOURIST { "shirt", ARMOR_CLASS, HAWAIIAN_SHIRT, T_SHIRT }, -#endif { "dragon scales", ARMOR_CLASS, GRAY_DRAGON_SCALES, YELLOW_DRAGON_SCALES }, { "dragon scale mail", @@ -2218,10 +2216,8 @@ struct alt_spellings { { "amulet of poison resistance", AMULET_VERSUS_POISON }, { "potion of sleep", POT_SLEEPING }, { "stone", ROCK }, -#ifdef TOURIST { "camera", EXPENSIVE_CAMERA }, { "tee shirt", T_SHIRT }, -#endif { "can", TIN }, { "can opener", TIN_OPENER }, { "kelp", KELP_FROND }, diff --git a/src/polyself.c b/src/polyself.c index c1b2c99c4..3effba8b2 100644 --- a/src/polyself.c +++ b/src/polyself.c @@ -821,12 +821,10 @@ break_armor() useup(otmp); } } -#ifdef TOURIST if (uarmu) { Your("shirt rips to shreds!"); useup(uarmu); } -#endif } else if (sliparm(youmonst.data)) { if (((otmp = uarm) != 0) && (racial_exception(&youmonst, otmp) < 1)) { if (donning(otmp)) cancel_don(); @@ -841,7 +839,6 @@ break_armor() (void) Cloak_off(); dropx(otmp); } -#ifdef TOURIST if ((otmp = uarmu) != 0) { if (is_whirly(youmonst.data)) You("seep right through your shirt!"); @@ -849,7 +846,6 @@ break_armor() setworn((struct obj *)0, otmp->owornmask & W_ARMU); dropx(otmp); } -#endif } if (has_horns(youmonst.data)) { if ((otmp = uarmh) != 0) { diff --git a/src/pray.c b/src/pray.c index b5312c25a..0e3730e20 100644 --- a/src/pray.c +++ b/src/pray.c @@ -256,10 +256,8 @@ worst_cursed_item() otmp = uarmh; } else if (uarmf && uarmf->cursed) { /* boots */ otmp = uarmf; -#ifdef TOURIST } else if (uarmu && uarmu->cursed) { /* shirt */ otmp = uarmu; -#endif } else if (uamul && uamul->cursed) { /* amulet */ otmp = uamul; } else if (uleft && uleft->cursed) { /* left ring */ @@ -551,9 +549,7 @@ aligntyp resp_god; if (uarm && !(EReflecting & W_ARM) && !(EDisint_resistance & W_ARM) && !uarmc) (void) destroy_arm(uarm); -#ifdef TOURIST if (uarmu && !uarm && !uarmc) (void) destroy_arm(uarmu); -#endif if (!Disint_resistance) fry_by_god(resp_god, TRUE); else { diff --git a/src/read.c b/src/read.c index 40b40f2d9..6f4c7c478 100644 --- a/src/read.c +++ b/src/read.c @@ -72,7 +72,6 @@ doread() if (!Blind) u.uconduct.literate++; useup(scroll); return(1); -#ifdef TOURIST } else if (scroll->otyp == T_SHIRT) { static const char *shirt_msgs[] = { /* Scott Bigham */ "I explored the Dungeons of Doom and all I got was this lousy T-shirt!", @@ -117,7 +116,6 @@ doread() scroll->o_id ^ (unsigned)ubirthday); pline("\"%s\"", buf); return 1; -#endif /* TOURIST */ } else if (scroll->oclass != SCROLL_CLASS && scroll->oclass != SPBOOK_CLASS) { pline(silly_thing_to, "read"); @@ -364,9 +362,7 @@ int curse_bless; break; case MAGIC_MARKER: case TINNING_KIT: -#ifdef TOURIST case EXPENSIVE_CAMERA: -#endif if (is_cursed) stripspe(obj); else if (rechrg && obj->otyp == MAGIC_MARKER) { /* previously recharged */ obj->recharged = 1; /* override increment done above */ diff --git a/src/role.c b/src/role.c index 8cb7f3f7e..59624c528 100644 --- a/src/role.c +++ b/src/role.c @@ -299,7 +299,6 @@ const struct Role roles[] = { { 1, 0, 0, 1, 0, 1 },11, /* Energy */ 10, 10, 0, 0, 8, A_INT, SPE_CLAIRVOYANCE, -4 }, -#ifdef TOURIST { {"Tourist", 0}, { {"Rambler", 0}, {"Sightseer", 0}, @@ -325,7 +324,6 @@ const struct Role roles[] = { { 1, 0, 0, 1, 0, 1 },14, /* Energy */ 0, 5, 1, 2, 10, A_INT, SPE_CHARM_MONSTER, -4 }, -#endif { {"Valkyrie", 0}, { {"Stripling", 0}, {"Skirmisher", 0}, @@ -1705,10 +1703,8 @@ struct monst *mtmp; case PM_SAMURAI: return (mtmp && mtmp->data == &mons[PM_SHOPKEEPER] ? "Irasshaimase" : "Konnichi wa"); /* Japanese */ -#ifdef TOURIST case PM_TOURIST: return ("Aloha"); /* Hawaiian */ -#endif case PM_VALKYRIE: return ( #ifdef MAIL @@ -1728,10 +1724,8 @@ Goodbye() return ("Fare thee well"); /* Olde English */ case PM_SAMURAI: return ("Sayonara"); /* Japanese */ -#ifdef TOURIST case PM_TOURIST: return ("Aloha"); /* Hawaiian */ -#endif case PM_VALKYRIE: return ("Farvel"); /* Norse */ default: diff --git a/src/shk.c b/src/shk.c index 63596950f..5a397abf5 100644 --- a/src/shk.c +++ b/src/shk.c @@ -1951,11 +1951,9 @@ register struct monst *shkp; /* if angry, impose a surcharge */ } if (uarmh && uarmh->otyp == DUNCE_CAP) multiplier *= 4L, divisor *= 3L; -#ifdef TOURIST else if ((Role_if(PM_TOURIST) && u.ulevel < (MAXULEV/2)) || (uarmu && !uarm && !uarmc)) /* touristy shirt visible */ multiplier *= 4L, divisor *= 3L; -#endif if (ACURR(A_CHA) > 18) divisor *= 2L; else if (ACURR(A_CHA) == 18) multiplier *= 2L, divisor *= 3L; @@ -2116,11 +2114,9 @@ register struct monst *shkp; if (uarmh && uarmh->otyp == DUNCE_CAP) divisor *= 3L; -#ifdef TOURIST else if ((Role_if(PM_TOURIST) && u.ulevel < (MAXULEV/2)) || (uarmu && !uarm && !uarmc)) /* touristy shirt visible */ divisor *= 3L; -#endif else divisor *= 2L; @@ -4092,11 +4088,9 @@ boolean altusage; /* some items have an "alternate" use with different cost */ if (otmp->spe > 1) tmp /= 4L; } else if (otmp->oclass == SPBOOK_CLASS) { tmp -= tmp / 5L; - } else if (otmp->otyp == CAN_OF_GREASE || - otmp->otyp == TINNING_KIT -#ifdef TOURIST + } else if (otmp->otyp == CAN_OF_GREASE + || otmp->otyp == TINNING_KIT || otmp->otyp == EXPENSIVE_CAMERA -#endif ) { tmp /= 10L; } else if (otmp->otyp == POT_OIL) { diff --git a/src/sounds.c b/src/sounds.c index efb496372..2a7df5823 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -796,11 +796,9 @@ register struct monst *mtmp; case PM_ARCHEOLOGIST: pline_msg = "describes a recent article in \"Spelunker Today\" magazine."; break; -#ifdef TOURIST case PM_TOURIST: verbl_msg = "Aloha."; break; -#endif default: pline_msg = "discusses dungeon exploration."; break; @@ -871,10 +869,8 @@ register struct monst *mtmp; verbl_msg = Role_if(PM_HEALER) ? "Doc, I can't help you unless you cooperate." : "Please undress so I can examine you."; -#ifdef TOURIST else if (uarmu) verbl_msg = "Take off your shirt, please."; -#endif else verbl_msg = "Relax, this won't hurt a bit."; break; case MS_GUARD: diff --git a/src/steal.c b/src/steal.c index 884b4135c..f98cd693e 100644 --- a/src/steal.c +++ b/src/steal.c @@ -13,10 +13,7 @@ STATIC_OVL const char * equipname(otmp) register struct obj *otmp; { - return ( -#ifdef TOURIST - (otmp == uarmu) ? "shirt" : -#endif + return ((otmp == uarmu) ? "shirt" : (otmp == uarmf) ? "boots" : (otmp == uarms) ? "shield" : (otmp == uarmg) ? "gloves" : @@ -231,9 +228,7 @@ boolean unchain_ball; /* whether to unpunish or just unwield */ else if (obj == uarmg) (void) Gloves_off(); else if (obj == uarmh) (void) Helmet_off(); else if (obj == uarms) (void) Shield_off(); -#ifdef TOURIST else if (obj == uarmu) (void) Shirt_off(); -#endif /* catchall -- should never happen */ else setworn((struct obj *)0, obj->owornmask & W_ARMOR); } else if (obj->owornmask & W_AMUL) { @@ -342,11 +337,9 @@ nothing_to_steal: if (otmp == uarmg && uwep) otmp = uwep; /* can't steal armor while wearing cloak - so steal the cloak. */ else if(otmp == uarm && uarmc) otmp = uarmc; -#ifdef TOURIST /* can't steal shirt while wearing cloak or suit */ else if(otmp == uarmu && uarmc) otmp = uarmc; else if(otmp == uarmu && uarm) otmp = uarm; -#endif gotobj: if(otmp->o_id == stealoid) return(0); diff --git a/src/trap.c b/src/trap.c index e14ffec6f..cde767106 100644 --- a/src/trap.c +++ b/src/trap.c @@ -78,11 +78,9 @@ struct monst *victim; (void) burn_dmg(item, xname(item)); return TRUE; } -#ifdef TOURIST item = (victim == &youmonst) ? uarmu : which_armor(victim, W_ARMU); if (item) (void) burn_dmg(item, "shirt"); -#endif return TRUE; case 2: item = (victim == &youmonst) ? uarms : which_armor(victim, W_ARMS); @@ -953,10 +951,8 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst); 1, TRUE, &youmonst); else if (uarm) (void) rust_dmg(uarm, "armor", 1, TRUE, &youmonst); -#ifdef TOURIST else if (uarmu) (void) rust_dmg(uarmu, "shirt", 1, TRUE, &youmonst); -#endif } update_inventory(); break; @@ -2090,10 +2086,8 @@ glovecheck: target = which_armor(mtmp, W_ARMG); 1, TRUE, mtmp); else if ((target = which_armor(mtmp, W_ARM)) != 0) (void) rust_dmg(target, "armor", 1, TRUE, mtmp); -#ifdef TOURIST else if ((target = which_armor(mtmp, W_ARMU)) != 0) (void) rust_dmg(target, "shirt", 1, TRUE, mtmp); -#endif } if (mptr == &mons[PM_IRON_GOLEM]) { @@ -3172,9 +3166,7 @@ boolean *lostsome; obj == uamul || obj == uleft || obj == uright || obj == ublindf || obj == uarm || obj == uarmc || obj == uarmg || obj == uarmf || -#ifdef TOURIST obj == uarmu || -#endif (obj->cursed && (obj == uarmh || obj == uarms)) || welded(obj))) otmp = obj; diff --git a/src/u_init.c b/src/u_init.c index 621f0d44d..16956b976 100644 --- a/src/u_init.c +++ b/src/u_init.c @@ -138,7 +138,6 @@ static struct trobj Samurai[] = { { SPLINT_MAIL, 0, ARMOR_CLASS, 1, UNDEF_BLESS }, { 0, 0, 0, 0, 0 } }; -#ifdef TOURIST static struct trobj Tourist[] = { #define T_DARTS 0 { DART, 2, WEAPON_CLASS, 25, UNDEF_BLESS }, /* quan is variable */ @@ -150,7 +149,6 @@ static struct trobj Tourist[] = { { CREDIT_CARD, 0, TOOL_CLASS, 1, 0 }, { 0, 0, 0, 0, 0 } }; -#endif static struct trobj Valkyrie[] = { { LONG_SWORD, 1, WEAPON_CLASS, 1, UNDEF_BLESS }, { DAGGER, 0, WEAPON_CLASS, 1, UNDEF_BLESS }, @@ -200,7 +198,6 @@ static struct trobj Xtra_food[] = { { UNDEF_TYP, UNDEF_SPE, FOOD_CLASS, 2, 0 }, { 0, 0, 0, 0, 0 } }; -#ifdef TOURIST static struct trobj Leash[] = { { LEASH, 0, TOOL_CLASS, 1, 0 }, { 0, 0, 0, 0, 0 } @@ -209,7 +206,6 @@ static struct trobj Towel[] = { { TOWEL, 0, TOOL_CLASS, 1, 0 }, { 0, 0, 0, 0, 0 } }; -#endif /* TOURIST */ static struct trobj Wishing[] = { { WAN_WISHING, 3, WAND_CLASS, 1, 0 }, { 0, 0, 0, 0, 0 } @@ -414,7 +410,6 @@ static const struct def_skill Skill_S[] = { { P_NONE, 0 } }; -#ifdef TOURIST static const struct def_skill Skill_T[] = { { P_DAGGER, P_EXPERT }, { P_KNIFE, P_SKILLED }, { P_AXE, P_BASIC }, { P_PICK_AXE, P_BASIC }, @@ -437,7 +432,6 @@ static const struct def_skill Skill_T[] = { { P_BARE_HANDED_COMBAT, P_SKILLED }, { P_NONE, 0 } }; -#endif /* TOURIST */ static const struct def_skill Skill_V[] = { { P_DAGGER, P_EXPERT }, { P_AXE, P_EXPERT }, @@ -512,9 +506,7 @@ u_init() #if 0 /* documentation of more zero values as desirable */ u.usick_cause[0] = 0; u.uluck = u.moreluck = 0; -# ifdef TOURIST uarmu = 0; -# endif uarm = uarmc = uarmh = uarms = uarmg = uarmf = 0; uwep = uball = uchain = uleft = uright = 0; uswapwep = uquiver = 0; @@ -676,7 +668,6 @@ u_init() knows_class(ARMOR_CLASS); skill_init(Skill_S); break; -#ifdef TOURIST case PM_TOURIST: Tourist[T_DARTS].trquan = rn1(20, 21); #ifndef GOLDOBJ @@ -691,7 +682,6 @@ u_init() else if(!rn2(25)) ini_inv(Magicmarker); skill_init(Skill_T); break; -#endif case PM_VALKYRIE: ini_inv(Valkyrie); if(!rn2(6)) ini_inv(Lamp); @@ -840,9 +830,7 @@ int otyp; case PM_RANGER: skills = Skill_Ran; break; case PM_ROGUE: skills = Skill_R; break; case PM_SAMURAI: skills = Skill_S; break; -#ifdef TOURIST case PM_TOURIST: skills = Skill_T; break; -#endif case PM_VALKYRIE: skills = Skill_V; break; case PM_WIZARD: skills = Skill_W; break; default: skills = 0; break; /* lint suppression */ @@ -1001,10 +989,8 @@ register struct trobj *trop; setworn(obj, W_ARMH); else if (is_gloves(obj) && !uarmg) setworn(obj, W_ARMG); -#ifdef TOURIST else if (is_shirt(obj) && !uarmu) setworn(obj, W_ARMU); -#endif else if (is_cloak(obj) && !uarmc) setworn(obj, W_ARMC); else if (is_boots(obj) && !uarmf) diff --git a/src/uhitm.c b/src/uhitm.c index 16b05fe9c..0057e573d 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -67,10 +67,8 @@ int attk; } if ((target = which_armor(mdef, W_ARM)) != (struct obj *)0) { (void)rust_dmg(target, xname(target), hurt, TRUE, mdef); -#ifdef TOURIST } else if ((target = which_armor(mdef, W_ARMU)) != (struct obj *)0) { (void)rust_dmg(target, xname(target), hurt, TRUE, mdef); -#endif } break; case 2: @@ -745,7 +743,6 @@ int thrown; /* HMON_xxx (0 => hand-to-hand, other => ranged) */ } tmp = 1; break; -#ifdef TOURIST case EXPENSIVE_CAMERA: You("succeed in destroying %s. Congratulations!", ysimple_name(obj)); @@ -753,7 +750,6 @@ int thrown; /* HMON_xxx (0 => hand-to-hand, other => ranged) */ return(TRUE); /*NOTREACHED*/ break; -#endif case CORPSE: /* fixed by polder@cs.vu.nl */ if (touch_petrifies(&mons[obj->corpsenm])) { tmp = 1; @@ -1152,9 +1148,7 @@ struct attack *mattk; /* grabbing attacks the body */ obj = which_armor(mdef, W_ARMC); /* cloak */ if (!obj) obj = which_armor(mdef, W_ARM); /* suit */ -#ifdef TOURIST if (!obj) obj = which_armor(mdef, W_ARMU); /* shirt */ -#endif } /* if monster's cloak/armor is greased, your grab slips off; this diff --git a/src/vault.c b/src/vault.c index 5205f6aca..487cb8e7c 100644 --- a/src/vault.c +++ b/src/vault.c @@ -350,10 +350,7 @@ fnd: } if (!strcmpi(buf, "Croesus") || !strcmpi(buf, "Kroisos") -#ifdef TOURIST - || !strcmpi(buf, "Creosote") -#endif - ) { + || !strcmpi(buf, "Creosote")) { if (!mvitals[PM_CROESUS].died) { verbalize("Oh, yes, of course. Sorry to have disturbed you."); mongone(guard); diff --git a/src/worn.c b/src/worn.c index bea315bdc..32bfe1003 100644 --- a/src/worn.c +++ b/src/worn.c @@ -20,9 +20,7 @@ const struct worn { { W_ARMS, &uarms }, { W_ARMG, &uarmg }, { W_ARMF, &uarmf }, -#ifdef TOURIST { W_ARMU, &uarmu }, -#endif { W_RINGL, &uleft }, { W_RINGR, &uright }, { W_WEP, &uwep }, @@ -155,9 +153,7 @@ struct obj *obj; case ARM_GLOVES: res = W_ARMG; break; /* WORN_GLOVES */ case ARM_BOOTS: res = W_ARMF; break; /* WORN_BOOTS */ case ARM_CLOAK: res = W_ARMC; break; /* WORN_CLOAK */ -#ifdef TOURIST case ARM_SHIRT: res = W_ARMU; break; /* WORN_SHIRT */ -#endif } break; case WEAPON_CLASS: @@ -438,11 +434,9 @@ boolean creation; return; m_dowear_type(mon, W_AMUL, creation, FALSE); -#ifdef TOURIST /* can't put on shirt if already wearing suit */ if (!cantweararm(mon->data) && !(mon->misc_worn_check & W_ARM)) m_dowear_type(mon, W_ARMU, creation, FALSE); -#endif /* treating small as a special case allows hobbits, gnomes, and kobolds to wear cloaks */ if (!cantweararm(mon->data) || mon->data->msize == MZ_SMALL) @@ -491,11 +485,9 @@ boolean racialexception; continue; best = obj; goto outer_break; /* no such thing as better amulets */ -#ifdef TOURIST case W_ARMU: if (!is_shirt(obj)) continue; break; -#endif case W_ARMC: if (!is_cloak(obj)) continue; break; @@ -542,11 +534,7 @@ outer_break: best->otyp == DUNCE_CAP) && !best->cursed); /* if wearing a cloak, account for the time spent removing and re-wearing it when putting on a suit or shirt */ - if ((flag == W_ARM -#ifdef TOURIST - || flag == W_ARMU -#endif - ) && (mon->misc_worn_check & W_ARMC)) + if ((flag == W_ARM || flag == W_ARMU) && (mon->misc_worn_check & W_ARMC)) m_delay += 2; /* when upgrading a piece of armor, account for time spent taking off current one */ @@ -741,7 +729,6 @@ boolean polyspot; m_useup(mon, otmp); } } -#ifdef TOURIST if ((otmp = which_armor(mon, W_ARMU)) != 0) { if (vis) pline("%s shirt rips to shreds!", s_suffix(Monnam(mon))); @@ -749,7 +736,6 @@ boolean polyspot; You_hear("a ripping sound."); m_useup(mon, otmp); } -#endif } else if (sliparm(mdat)) { if ((otmp = which_armor(mon, W_ARM)) != 0) { if (vis) @@ -772,7 +758,6 @@ boolean polyspot; if (polyspot) bypass_obj(otmp); m_lose_armor(mon, otmp); } -#ifdef TOURIST if ((otmp = which_armor(mon, W_ARMU)) != 0) { if (vis) { if (sliparm(mon->data)) @@ -785,7 +770,6 @@ boolean polyspot; if (polyspot) bypass_obj(otmp); m_lose_armor(mon, otmp); } -#endif } if (handless_or_tiny) { /* [caller needs to handle weapon checks] */ diff --git a/src/zap.c b/src/zap.c index c19557fd0..752b03796 100644 --- a/src/zap.c +++ b/src/zap.c @@ -2282,10 +2282,8 @@ boolean ordinary; case WAN_LIGHT: /* (broken wand) */ /* assert( !ordinary ); */ damage = d(obj->spe, 25); -#ifdef TOURIST case EXPENSIVE_CAMERA: if (!damage) damage = 5; -#endif damage = lightdamage(obj, ordinary, damage); damage += rnd(25); if (flashburn((long)damage)) learn_it = TRUE; @@ -3371,10 +3369,8 @@ struct obj **ootmp; /* to return worn armor for caller to disintegrate */ tmp = MAGIC_COOKIE; if ((otmp2 = which_armor(mon, W_ARMC)) != 0) m_useup(mon, otmp2); -#ifdef TOURIST if ((otmp2 = which_armor(mon, W_ARMU)) != 0) m_useup(mon, otmp2); -#endif } type = -1; /* no saving throw wanted */ break; /* not ordinary damage */ @@ -3502,9 +3498,7 @@ xchar sx, sy; /* no shield or suit, you're dead; wipe out cloak and/or shirt in case of life-saving or bones */ if (uarmc) (void) destroy_arm(uarmc); -#ifdef TOURIST if (uarmu) (void) destroy_arm(uarmu); -#endif } else if (nonliving(youmonst.data) || is_demon(youmonst.data)) { shieldeff(sx, sy); You("seem unaffected."); diff --git a/sys/amiga/winami.c b/sys/amiga/winami.c index 4762f0697..c702af237 100644 --- a/sys/amiga/winami.c +++ b/sys/amiga/winami.c @@ -579,11 +579,7 @@ amii_player_selection() { flags.initrole = randrole(); #if 0 /* OBSOLETE */ -#ifdef TOURIST strcpy( pl_character, roles[ rnd( 11 ) ] ); -#else - strcpy( pl_character, roles[ rnd( 10 ) ] ); -#endif #endif aredone = 1; amii_clear_nhwindow( WIN_BASE ); @@ -608,11 +604,7 @@ amii_player_selection() case 1: /* Random Character */ flags.initrole = randrole(); #if 0 /* OBSOLETE */ -#ifdef TOURIST strcpy( pl_character, roles[ rnd( 11 ) ] ); -#else - strcpy( pl_character, roles[ rnd( 10 ) ] ); -#endif #endif amii_clear_nhwindow( WIN_BASE ); CloseShWindow( cwin ); diff --git a/util/makedefs.c b/util/makedefs.c index 6ddff76c0..1de90dc6c 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -996,11 +996,8 @@ make_version() | (1L << 6) #endif /* objects (10..14) */ -#ifdef TOURIST - | (1L << 10) -#endif #ifdef GOLDOBJ - | (1L << 11) + | (1L << 10) #endif /* flag bits and/or other global variables (15..26) */ #ifdef TEXTCOLOR @@ -1339,9 +1336,6 @@ static const char *build_opts[] = { #ifdef TIMED_DELAY "timed wait for display effects", #endif -#ifdef TOURIST - "tourists", -#endif #ifdef USER_SOUNDS # ifdef USER_SOUNDS_REGEX "user sounds via regular expressions", @@ -2515,11 +2509,9 @@ do_objs() if (!strncmp(objnam, "THE_", 4)) objnam += 4; -#ifdef TOURIST /* fudge _platinum_ YENDORIAN EXPRESS CARD */ if (!strncmp(objnam, "PLATINUM_", 9)) objnam += 9; -#endif Fprintf(ofp,"#define\tART_%s\t%d\n", limit(objnam, 1), i); } diff --git a/win/Qt/qt_win.cpp b/win/Qt/qt_win.cpp index 7d3341506..ac2141fcc 100644 --- a/win/Qt/qt_win.cpp +++ b/win/Qt/qt_win.cpp @@ -3498,13 +3498,8 @@ void NetHackQtInvUsageWindow::paintEvent(QPaintEvent*) drawWorn(painter,uarms,0,1); // Shield drawWorn(painter,uarmg,0,2); // Gloves - repeated drawWorn(painter,uarmg,2,2); // Gloves - repeated -#ifdef TOURIST drawWorn(painter,uarmf,1,5); // Shoes (feet) drawWorn(painter,uarmu,1,4); // Undershirt -#else - drawWorn(painter,0 ,1,5,FALSE); - drawWorn(painter,uarmf,1,4); // Shoes (feet) -#endif drawWorn(painter,uleft,0,3); // RingL drawWorn(painter,uright,2,3); // RingR diff --git a/win/gnome/gnworn.c b/win/gnome/gnworn.c index 20a8aa641..ee5e704b5 100644 --- a/win/gnome/gnworn.c +++ b/win/gnome/gnworn.c @@ -14,7 +14,6 @@ #define WORN_WIDTH 3 #define WORN_HEIGHT 6 -#ifdef TOURIST #define WORN_OBJECT_LIST /* struct obj *[WORN_HEIGHT][WORN_WIDTH] = */ { \ { uquiver, uarmh, u.twoweap ? NULL : uswapwep }, \ { u.twoweap ? uswapwep : NULL, ublindf, uwep }, \ @@ -23,16 +22,6 @@ { uarmu, uarm, uskin }, \ { uball, uarmf, uchain } \ } -#else -#define WORN_OBJECT_LIST /* struct obj *[WORN_HEIGHT][WORN_WIDTH] = */ { \ - { uquiver, uarmh, u.twoweap ? NULL : uswapwep }, \ - { u.twoweap ? uswapwep : NULL, ublindf, uwep }, \ - { uleft, uamul, uright }, \ - { uarms, uarmc, uarmg }, \ - { NULL, uarm, uskin }, \ - { uball, uarmf, uchain } \ -} -#endif static GtkWidget *worn_contents[WORN_HEIGHT][WORN_WIDTH]; static struct obj *last_worn_objects[WORN_HEIGHT][WORN_WIDTH]; diff --git a/win/share/tilemap.c b/win/share/tilemap.c index 19872f96a..06c966113 100644 --- a/win/share/tilemap.c +++ b/win/share/tilemap.c @@ -48,31 +48,16 @@ struct conditionals { #endif #ifndef MAIL { MON_GLYPH, PM_FAMINE, "mail daemon" }, -#endif -#ifndef TOURIST - { MON_GLYPH, PM_SAMURAI, "tourist" }, #endif /* commented out in monst.c at present */ { MON_GLYPH, PM_SHAMAN_KARNOV, "Earendil" }, { MON_GLYPH, PM_SHAMAN_KARNOV, "Elwing" }, -#ifndef TOURIST - { MON_GLYPH, PM_LORD_SATO, "Twoflower" }, -#endif /* commented out in monst.c at present */ { MON_GLYPH, PM_CHROMATIC_DRAGON, "Goblin King" }, { MON_GLYPH, PM_NEANDERTHAL, "High-elf" }, -#ifndef TOURIST - { MON_GLYPH, PM_ROSHI, "guide" }, -#endif /* objects commented out in objects.c at present */ { OBJ_GLYPH, SILVER_DRAGON_SCALE_MAIL, "shimmering dragon scale mail" }, { OBJ_GLYPH, SILVER_DRAGON_SCALES, "shimmering dragon scales" }, -#ifndef TOURIST - { OBJ_GLYPH, LEATHER_JACKET, "Hawaiian shirt" }, - { OBJ_GLYPH, LEATHER_JACKET, "T-shirt" }, - { OBJ_GLYPH, LOCK_PICK, "credit card" }, - { OBJ_GLYPH, MAGIC_LAMP, "expensive camera" }, -#endif /* allow slime mold to look like slice of pizza, since we * don't know what a slime mold should look like when renamed anyway */ From 1edadd1d482e73cd71ab783a9ed08f4a243e0094 Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Fri, 13 Feb 2015 23:46:47 -0500 Subject: [PATCH 030/132] 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. --- dat/dungeon.def | 4 ++-- include/config.h | 1 - include/decl.h | 4 ---- include/dungeon.h | 2 -- include/extern.h | 6 ------ src/detect.c | 2 -- src/do.c | 4 ---- src/do_name.c | 2 -- src/dogmove.c | 2 -- src/drawing.c | 20 ++++---------------- src/dungeon.c | 8 -------- src/extralev.c | 3 --- src/files.c | 15 +++------------ src/hack.c | 2 -- src/lock.c | 2 -- src/makemon.c | 18 ------------------ src/mapglyph.c | 14 +++++--------- src/mhitu.c | 2 -- src/mklev.c | 22 ---------------------- src/mkobj.c | 4 ---- src/mon.c | 7 ------- src/monmove.c | 8 +------- src/muse.c | 2 -- src/options.c | 33 ++++++--------------------------- src/read.c | 9 ++------- src/restore.c | 2 -- src/vision.c | 12 ++---------- src/zap.c | 2 -- sys/amiga/winfuncs.c | 10 +--------- sys/msdos/pckeys.c | 16 ++++------------ sys/msdos/vidvga.c | 10 ---------- sys/share/pcmain.c | 2 -- sys/wince/mhmain.c | 2 -- sys/wince/mhmap.c | 6 +----- sys/wince/mswproc.c | 2 -- util/makedefs.c | 13 ++----------- win/Qt/qt_win.cpp | 9 +-------- win/X11/winmap.c | 11 ++--------- win/gem/wingem.c | 8 +------- win/win32/mhmain.c | 2 -- win/win32/mhmap.c | 6 +----- win/win32/mswproc.c | 2 -- 42 files changed, 38 insertions(+), 273 deletions(-) diff --git a/dat/dungeon.def b/dat/dungeon.def index b881884f5..bccd31b85 100644 --- a/dat/dungeon.def +++ b/dat/dungeon.def @@ -19,8 +19,8 @@ DUNGEON: "The Dungeons of Doom" "D" (25, 5) ALIGNMENT: unaligned BRANCH: "The Gnomish Mines" @ (2, 3) -%REINCARNATION LEVEL: "rogue" "R" @ (15, 4) -%REINCARNATION LEVELDESC: roguelike +LEVEL: "rogue" "R" @ (15, 4) +LEVELDESC: roguelike LEVEL: "oracle" "O" @ (5, 5) LEVALIGN: neutral CHAINBRANCH: "Sokoban" "oracle" + (1, 0) up diff --git a/include/config.h b/include/config.h index c9b17524d..bcc8e9903 100644 --- a/include/config.h +++ b/include/config.h @@ -420,7 +420,6 @@ typedef unsigned char uchar; /* dungeon features */ /* dungeon levels */ #define WALLIFIED_MAZE /* Fancy mazes - Jean-Christophe Collet */ -#define REINCARNATION /* Special Rogue-like levels */ /* monsters & objects */ #define SEDUCE /* Succubi/incubi seduction, by KAA, suggested by IM */ /* I/O */ diff --git a/include/decl.h b/include/decl.h index bfe3052db..8276c6022 100644 --- a/include/decl.h +++ b/include/decl.h @@ -46,9 +46,7 @@ E NEARDATA int in_doagain; E struct dgn_topology { /* special dungeon levels for speed */ d_level d_oracle_level; d_level d_bigroom_level; /* unused */ -#ifdef REINCARNATION d_level d_rogue_level; -#endif d_level d_medusa_level; d_level d_stronghold_level; d_level d_valley_level; @@ -75,9 +73,7 @@ E struct dgn_topology { /* special dungeon levels for speed */ /* macros for accesing the dungeon levels by their old names */ #define oracle_level (dungeon_topology.d_oracle_level) #define bigroom_level (dungeon_topology.d_bigroom_level) -#ifdef REINCARNATION #define rogue_level (dungeon_topology.d_rogue_level) -#endif #define medusa_level (dungeon_topology.d_medusa_level) #define stronghold_level (dungeon_topology.d_stronghold_level) #define valley_level (dungeon_topology.d_valley_level) diff --git a/include/dungeon.h b/include/dungeon.h index 2aac7f39e..d80d22a7d 100644 --- a/include/dungeon.h +++ b/include/dungeon.h @@ -232,9 +232,7 @@ typedef struct mapseen { Bitfield(valley, 1); Bitfield(msanctum, 1); Bitfield(ludios, 1); -# ifdef REINCARNATION Bitfield(roguelevel, 1); -# endif } flags; /* custom naming */ char *custom; diff --git a/include/extern.h b/include/extern.h index 667d598d1..6f0ad015f 100644 --- a/include/extern.h +++ b/include/extern.h @@ -399,9 +399,7 @@ E char *FDECL(distant_monnam, (struct monst *,int,char *)); E const char *NDECL(rndmonnam); E const char *FDECL(hcolor, (const char *)); E const char *NDECL(rndcolor); -#ifdef REINCARNATION E const char *NDECL(roguename); -#endif E struct obj *FDECL(realloc_obj, (struct obj *, int, genericptr_t, int, const char *)); E char *FDECL(coyotename, (struct monst *,char *)); @@ -519,9 +517,7 @@ E int FDECL(def_char_to_monclass, (CHAR_P)); #if !defined(MAKEDEFS_C) && !defined(LEV_LEX_C) E void FDECL(switch_symbols, (int)); E void FDECL(assign_graphics, (int)); -#ifdef REINCARNATION E void NDECL(init_r_symbols); -#endif E void NDECL(init_symbols); E void NDECL(init_showsyms); E void NDECL(init_l_symbols); @@ -702,11 +698,9 @@ E void FDECL(explode_oil, (struct obj *,int,int)); /* ### extralev.c ### */ -#ifdef REINCARNATION E void NDECL(makeroguerooms); E void FDECL(corr, (int,int)); E void NDECL(makerogueghost); -#endif /* ### files.c ### */ diff --git a/src/detect.c b/src/detect.c index db280b819..93db6c77c 100644 --- a/src/detect.c +++ b/src/detect.c @@ -1059,12 +1059,10 @@ struct rm *lev; { int newmask = lev->doormask & ~WM_MASK; -#ifdef REINCARNATION if (Is_rogue_level(&u.uz)) /* rogue didn't have doors, only doorways */ newmask = D_NODOOR; else -#endif /* newly exposed door is closed */ if (!(newmask & D_LOCKED)) newmask |= D_CLOSED; diff --git a/src/do.c b/src/do.c index 35b0b9c40..e0fe5a5c3 100644 --- a/src/do.c +++ b/src/do.c @@ -1143,10 +1143,8 @@ boolean at_stairs, falling, portal; #endif } -#ifdef REINCARNATION if (Is_rogue_level(newlevel) || Is_rogue_level(&u.uz)) assign_graphics(Is_rogue_level(newlevel) ? ROGUESET : PRIMARY); -#endif #ifdef USE_TILES substitute_tiles(newlevel); #endif @@ -1411,10 +1409,8 @@ boolean at_stairs, falling, portal; } } } else { -#ifdef REINCARNATION if (new && Is_rogue_level(&u.uz)) You("enter what seems to be an older, more primitive world."); -#endif /* main dungeon message from your quest leader */ if (!In_quest(&u.uz0) && at_dgn_entrance("The Quest") && !(u.uevent.qcompleted || u.uevent.qexpelled || diff --git a/src/do_name.c b/src/do_name.c index ea5b64b8b..4face203e 100644 --- a/src/do_name.c +++ b/src/do_name.c @@ -1057,7 +1057,6 @@ const char *mname; return FALSE; } -#ifdef REINCARNATION const char * roguename() /* Name of a Rogue player */ { @@ -1075,7 +1074,6 @@ roguename() /* Name of a Rogue player */ return rn2(3) ? (rn2(2) ? "Michael Toy" : "Kenneth Arnold") : "Glenn Wichman"; } -#endif /* REINCARNATION */ static NEARDATA const char * const hcolors[] = { "ultraviolet", "infrared", "bluish-orange", diff --git a/src/dogmove.c b/src/dogmove.c index 526f40454..4300fb8de 100644 --- a/src/dogmove.c +++ b/src/dogmove.c @@ -673,9 +673,7 @@ register int after; /* this is extra fast monster movement */ } if (is_giant(mtmp->data)) allowflags |= BUSTDOOR; if (tunnels(mtmp->data) -#ifdef REINCARNATION && !Is_rogue_level(&u.uz) /* same restriction as m_move() */ -#endif ) allowflags |= ALLOW_DIG; cnt = mfndpos(mtmp, poss, info, allowflags); diff --git a/src/drawing.c b/src/drawing.c index 80e82133f..3d94d8803 100644 --- a/src/drawing.c +++ b/src/drawing.c @@ -27,9 +27,7 @@ int currentgraphics = 0; nhsym showsyms[SYM_MAX] = DUMMY; /* symbols to be displayed */ nhsym l_syms[SYM_MAX] = DUMMY; /* loaded symbols */ -#ifdef REINCARNATION nhsym r_syms[SYM_MAX] = DUMMY; /* rogue symbols */ -#endif nhsym warnsyms[WARNCOUNT] = DUMMY; /* the current warning display symbols */ const char invisexplain[] = "remembered, unseen, creature"; @@ -234,7 +232,6 @@ const struct symdef defsyms[MAXPCHARS] = { {'/', "", C(CLR_ORANGE)}, /* explosion bottom right */ }; -#ifdef REINCARNATION /* default rogue level symbols */ static const uchar def_r_oc_syms[MAXOCLASSES] = { /* 0*/ '\0', @@ -256,7 +253,6 @@ static const uchar def_r_oc_syms[MAXOCLASSES] = { CHAIN_SYM, VENOM_SYM }; -#endif #undef C @@ -306,10 +302,10 @@ def_char_to_monclass(ch) * Sets the current display symbols, the * loadable symbols to the default NetHack * symbols, including the r_syms rogue level - * symbols if REINCARNATION is defined. - * This would typically be done immediately - * after execution begins. Any previously - * loaded external symbol sets are discarded. + * symbols. This would typically be done + * immediately after execution begins. Any + * previously loaded external symbol sets are + * discarded. * * switch_symbols(arg) * Called to swap in new current display symbols @@ -350,9 +346,7 @@ init_symbols() { init_l_symbols(); init_showsyms(); -#ifdef REINCARNATION init_r_symbols(); -#endif } void @@ -410,7 +404,6 @@ init_l_symbols() #endif } -#ifdef REINCARNATION void init_r_symbols() { @@ -448,7 +441,6 @@ init_r_symbols() */ # endif } -#endif /*REINCARNATION*/ void assign_graphics(whichset) @@ -457,7 +449,6 @@ int whichset; register int i; switch(whichset) { -# ifdef REINCARNATION case ROGUESET: /* Adjust graphics display characters on Rogue levels */ @@ -469,7 +460,6 @@ int whichset; # endif currentgraphics = ROGUESET; break; -# endif case PRIMARY: default: @@ -518,7 +508,6 @@ int val; l_syms[symp->idx] = val; } -# ifdef REINCARNATION void update_r_symset(symp, val) struct symparse *symp; @@ -526,7 +515,6 @@ int val; { r_syms[symp->idx] = val; } -# endif /* REINCARNATION */ void clear_symsetentry(which_set, name_too) diff --git a/src/dungeon.c b/src/dungeon.c index d87faa15e..c08d195af 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -680,9 +680,7 @@ struct level_map { { "medusa", &medusa_level }, { "oracle", &oracle_level }, { "orcus", &orcus_level }, -#ifdef REINCARNATION { "rogue", &rogue_level }, -#endif { "sanctum", &sanctum_level }, { "valley", &valley_level }, { "water", &water_level }, @@ -2086,9 +2084,7 @@ mapseen *mptr; if (mptr->flags.unreachable || mptr->flags.forgot) return FALSE; /* level is of interest if it has an auto-generated annotation */ if (mptr->flags.oracle || mptr->flags.bigroom || -# ifdef REINCARNATION mptr->flags.roguelevel || -# endif mptr->flags.castle || mptr->flags.valley || mptr->flags.msanctum) return TRUE; /* when in Sokoban, list all sokoban levels visited; when not in it, @@ -2151,9 +2147,7 @@ recalc_mapseen() mptr->flags.bigroom = Is_bigroom(&u.uz); else if (mptr->flags.forgot) mptr->flags.bigroom = 0; -# ifdef REINCARNATION mptr->flags.roguelevel = Is_rogue_level(&u.uz); -# endif mptr->flags.oracle = 0; /* recalculated during room traversal below */ mptr->flags.castletune = 0; /* flags.castle, flags.valley, flags.msanctum retain previous value */ @@ -2650,10 +2644,8 @@ boolean printdun; mptr->flags.sokosolved ? "Solved" : "Unsolved"); } else if (mptr->flags.bigroom) { Sprintf(buf, "%sA very big room.", PREFIX); -# ifdef REINCARNATION } else if (mptr->flags.roguelevel) { Sprintf(buf, "%sA primitive area.", PREFIX); -# endif } else if (on_level(&mptr->lev, &qstart_level)) { Sprintf(buf, "%sHome%s.", PREFIX, mptr->flags.unreachable ? " (no way back...)" : ""); diff --git a/src/extralev.c b/src/extralev.c index 597b23e72..821e5794f 100644 --- a/src/extralev.c +++ b/src/extralev.c @@ -9,8 +9,6 @@ #include "hack.h" -#ifdef REINCARNATION - struct rogueroom { xchar rlx, rly; xchar dx, dy; @@ -336,6 +334,5 @@ makerogueghost() ghostobj->known = TRUE; } } -#endif /* REINCARNATION */ /*extralev.c*/ diff --git a/src/files.c b/src/files.c index 4b72c754d..f667b8093 100644 --- a/src/files.c +++ b/src/files.c @@ -2752,11 +2752,8 @@ int which_set; /* matches desired one */ chosen_symset_start = TRUE; /* these init_*() functions clear symset fields too */ -# ifdef REINCARNATION if (which_set == ROGUESET) init_r_symbols(); - else -# endif - if (which_set == PRIMARY) init_l_symbols(); + else if (which_set == PRIMARY) init_l_symbols(); } break; case 1: @@ -2808,11 +2805,8 @@ int which_set; if (chosen_symset_start) chosen_symset_end = FALSE; chosen_symset_start = FALSE; -# ifdef REINCARNATION if (which_set == ROGUESET) init_r_symbols(); - else -# endif - if (which_set == PRIMARY) init_l_symbols(); + else if (which_set == PRIMARY) init_l_symbols(); } } break; @@ -2822,12 +2816,9 @@ int which_set; if (chosen_symset_start) { if (which_set == PRIMARY) { update_l_symset(symp, val); - } -# ifdef REINCARNATION - else if (which_set == ROGUESET) { + } else if (which_set == ROGUESET) { update_r_symset(symp, val); } -# endif } } } diff --git a/src/hack.c b/src/hack.c index 1bbfa1977..545c4c4aa 100644 --- a/src/hack.c +++ b/src/hack.c @@ -2356,11 +2356,9 @@ int x, y; struct rm *lev_p = &levl[x][y]; if (!IS_DOOR(lev_p->typ)) return FALSE; -#ifdef REINCARNATION /* all rogue level doors are doorless but disallow diagonal access, so we treat them as if their non-existant doors were actually present */ if (Is_rogue_level(&u.uz)) return FALSE; -#endif return !(lev_p->doormask & ~(D_NODOOR|D_BROKEN)); } diff --git a/src/lock.c b/src/lock.c index 2ba1d51b7..73dc8c159 100644 --- a/src/lock.c +++ b/src/lock.c @@ -831,7 +831,6 @@ int x, y; switch(otmp->otyp) { case WAN_LOCKING: case SPE_WIZARD_LOCK: -#ifdef REINCARNATION if (Is_rogue_level(&u.uz)) { boolean vis = cansee(x,y); /* Can't have real locking in Rogue, so just hide doorway */ @@ -849,7 +848,6 @@ int x, y; newsym(x,y); return TRUE; } -#endif if (obstructed(x,y,mysterywand)) return FALSE; /* Don't allow doors to close over traps. This is for pits */ /* & trap doors, but is it ever OK for anything else? */ diff --git a/src/makemon.c b/src/makemon.c index 72f3ae6b9..44fcb79a0 100644 --- a/src/makemon.c +++ b/src/makemon.c @@ -5,9 +5,7 @@ #include "hack.h" -#ifdef REINCARNATION #include -#endif STATIC_VAR NEARDATA struct monst zeromonst; @@ -160,9 +158,7 @@ register struct monst *mtmp; register int mm = monsndx(ptr); struct obj *otmp; -#ifdef REINCARNATION if (Is_rogue_level(&u.uz)) return; -#endif /* * first a few special cases: * @@ -481,9 +477,7 @@ register struct monst *mtmp; register int cnt; register struct obj *otmp; register struct permonst *ptr = mtmp->data; -#ifdef REINCARNATION if (Is_rogue_level(&u.uz)) return; -#endif /* * Soldiers get armour & rations - armour approximates their ac. * Nymphs may get mirror or potion of object detection. @@ -1279,9 +1273,7 @@ rndmonst() if (rndmonst_state.choice_count < 0) { /* need to recalculate */ int zlevel, minmlev, maxmlev; boolean elemlevel; -#ifdef REINCARNATION boolean upper; -#endif rndmonst_state.choice_count = 0; /* look for first common monster */ @@ -1301,9 +1293,7 @@ rndmonst() minmlev = zlevel / 6; /* determine the level of the strongest monster to make. */ maxmlev = (zlevel + u.ulevel) / 2; -#ifdef REINCARNATION upper = Is_rogue_level(&u.uz); -#endif elemlevel = In_endgame(&u.uz) && !Is_astralevel(&u.uz); /* @@ -1315,9 +1305,7 @@ rndmonst() rndmonst_state.mchoices[mndx] = 0; if (tooweak(mndx, minmlev) || toostrong(mndx, maxmlev)) continue; -#ifdef REINCARNATION if (upper && !isupper(def_monsyms[(int)(ptr->mlet)].sym)) continue; -#endif if (elemlevel && wrong_elem_type(ptr)) continue; if (uncommon(mndx)) continue; if (Inhell && (ptr->geno & G_NOHELL)) continue; @@ -1825,15 +1813,9 @@ register struct monst *mtmp; levl[mx-1][my].typ == TDWALL || levl[mx-1][my].typ == CROSSWALL|| levl[mx-1][my].typ == TUWALL )) -#ifdef REINCARNATION appear = Is_rogue_level(&u.uz) ? S_hwall : S_hcdoor; else appear = Is_rogue_level(&u.uz) ? S_vwall : S_vcdoor; -#else - appear = S_hcdoor; - else - appear = S_vcdoor; -#endif if(!mtmp->minvis || See_invisible) block_point(mx,my); /* vision */ } else if (level.flags.is_maze_lev && !In_sokoban(&u.uz) && rn2(2)) { diff --git a/src/mapglyph.c b/src/mapglyph.c index b0dfa2a66..f1adae27a 100644 --- a/src/mapglyph.c +++ b/src/mapglyph.c @@ -34,9 +34,9 @@ int explcolors[] = { #define pet_color(n) color = iflags.use_color ? mons[n].mcolor : NO_COLOR #define warn_color(n) color = iflags.use_color ? def_warnsyms[n].color : NO_COLOR #define explode_color(n) color = iflags.use_color ? explcolors[n] : NO_COLOR -# if defined(REINCARNATION) && defined(LOADSYMSETS) -# define ROGUE_COLOR -# endif +#ifdef LOADSYMSETS +# define ROGUE_COLOR +#endif #else /* no text color */ @@ -236,14 +236,10 @@ unsigned *ospecial; ch = showsyms[idx]; #ifdef TEXTCOLOR /* Turn off color if no color defined, or rogue level w/o PC graphics. */ -# ifdef REINCARNATION -# ifdef ROGUE_COLOR +# ifdef ROGUE_COLOR if (!has_color(color) || (Is_rogue_level(&u.uz) && !has_rogue_color)) -# else - if (!has_color(color) || Is_rogue_level(&u.uz)) -# endif # else - if (!has_color(color)) + if (!has_color(color) || Is_rogue_level(&u.uz)) # endif color = NO_COLOR; #endif diff --git a/src/mhitu.c b/src/mhitu.c index 89cd68968..ad68b2d31 100644 --- a/src/mhitu.c +++ b/src/mhitu.c @@ -654,9 +654,7 @@ mattacku(mtmp) break; case AT_WEAP: if(range2) { -#ifdef REINCARNATION if (!Is_rogue_level(&u.uz)) -#endif thrwmu(mtmp); } else { int hittmp = 0; diff --git a/src/mklev.c b/src/mklev.c index 1d895dc2c..1bba98d61 100644 --- a/src/mklev.c +++ b/src/mklev.c @@ -400,11 +400,9 @@ register int type; levl[x][y].doormask = (shdoor ? D_ISOPEN : D_NODOOR); #endif -#ifdef REINCARNATION /* also done in roguecorr(); doing it here first prevents making mimics in place of trapped doors on rogue level */ if (Is_rogue_level(&u.uz)) levl[x][y].doormask = D_NODOOR; -#endif if(levl[x][y].doormask & D_TRAPPED) { struct monst *mtmp; @@ -627,11 +625,7 @@ makelevel() register s_level *slev = Is_special(&u.uz); /* check for special levels */ -#ifdef REINCARNATION if (slev && !Is_rogue_level(&u.uz)) -#else - if (slev) -#endif { makemaz(slev->proto); return; @@ -663,12 +657,10 @@ makelevel() /* otherwise, fall through - it's a "regular" level. */ -#ifdef REINCARNATION if (Is_rogue_level(&u.uz)) { makeroguerooms(); makerogueghost(); } else -#endif makerooms(); sort_rooms(); @@ -694,9 +686,7 @@ makelevel() branchp = Is_branchlev(&u.uz); /* possible dungeon branch */ room_threshold = branchp ? 4 : 3; /* minimum number of rooms needed to allow a random special room */ -#ifdef REINCARNATION if (Is_rogue_level(&u.uz)) goto skip0; -#endif makecorridors(); make_niches(); @@ -753,9 +743,7 @@ makelevel() !(mvitals[PM_COCKATRICE].mvflags & G_GONE)) mkroom(COCKNEST); } -#ifdef REINCARNATION skip0: -#endif /* Place multi-dungeon branch. */ place_branch(branchp, 0, 0); @@ -784,9 +772,7 @@ skip0: mktrap(0,0,croom,(coord*)0); if (!goldseen && !rn2(3)) (void) mkgold(0L, somex(croom), somey(croom)); -#ifdef REINCARNATION if(Is_rogue_level(&u.uz)) goto skip_nonrogue; -#endif if(!rn2(10)) mkfount(0,croom); if(!rn2(60)) mksink(croom); if(!rn2(60)) mkaltar(croom); @@ -822,9 +808,7 @@ skip0: } } -#ifdef REINCARNATION skip_nonrogue: -#endif if(!rn2(3)) { (void) mkobj_at(0, somex(croom), somey(croom), TRUE); tryct = 0; @@ -863,9 +847,7 @@ mineralize() /* determine if it is even allowed; almost all special levels are excluded */ if (In_hell(&u.uz) || In_V_tower(&u.uz) || -#ifdef REINCARNATION Is_rogue_level(&u.uz) || -#endif level.flags.arboreal || ((sp = Is_special(&u.uz)) != 0 && !Is_oracle_level(&u.uz) && (!In_mines(&u.uz) || sp->flags.town) @@ -983,10 +965,8 @@ register struct mkroom *croom; if ((int) levl[lowx][lowy].roomno == roomno || croom->irregular) return; #ifdef SPECIALIZATION -# ifdef REINCARNATION if (Is_rogue_level(&u.uz)) do_ordinary = TRUE; /* vision routine helper */ -# endif if ((rtype != OROOM) || do_ordinary) #endif { @@ -1207,7 +1187,6 @@ coord *tm; if (num > 0 && num < TRAPNUM) { kind = num; -#ifdef REINCARNATION } else if (Is_rogue_level(&u.uz)) { switch (rn2(7)) { default: kind = BEAR_TRAP; break; /* 0 */ @@ -1218,7 +1197,6 @@ coord *tm; case 5: kind = SLP_GAS_TRAP; break; case 6: kind = RUST_TRAP; break; } -#endif } else if (Inhell && !rn2(5)) { /* bias the frequency of fire traps in Gehennom */ kind = FIRE_TRAP; diff --git a/src/mkobj.c b/src/mkobj.c index 1edb34977..698018e9f 100644 --- a/src/mkobj.c +++ b/src/mkobj.c @@ -52,7 +52,6 @@ const struct icp boxiprobs[] = { { 1, AMULET_CLASS} }; -#ifdef REINCARNATION const struct icp rogueprobs[] = { {12, WEAPON_CLASS}, {12, ARMOR_CLASS}, @@ -62,7 +61,6 @@ const struct icp rogueprobs[] = { { 5, WAND_CLASS}, { 5, RING_CLASS} }; -#endif const struct icp hellprobs[] = { {20, WEAPON_CLASS}, @@ -222,10 +220,8 @@ boolean artif; if(oclass == RANDOM_CLASS) { const struct icp *iprobs = -#ifdef REINCARNATION (Is_rogue_level(&u.uz)) ? (const struct icp *)rogueprobs : -#endif Inhell ? (const struct icp *)hellprobs : (const struct icp *)mkobjprobs; diff --git a/src/mon.c b/src/mon.c index 4ed4b168c..2befc3e5b 100644 --- a/src/mon.c +++ b/src/mon.c @@ -28,14 +28,9 @@ STATIC_DCL boolean FDECL(validvamp, (struct monst *,int *,int)); #endif STATIC_DCL struct permonst *FDECL(accept_newcham_form, (int)); -#ifdef REINCARNATION #define LEVEL_SPECIFIC_NOCORPSE(mdat) \ (Is_rogue_level(&u.uz) || \ (level.flags.graveyard && is_undead(mdat) && rn2(3))) -#else -#define LEVEL_SPECIFIC_NOCORPSE(mdat) \ - (level.flags.graveyard && is_undead(mdat) && rn2(3)) -#endif #if 0 /* part of the original warning code which was replaced in 3.3.1 */ @@ -1048,9 +1043,7 @@ nexttry: /* eels prefer the water, but if there is no water nearby, if (nx != x && ny != y && (nodiag || (IS_DOOR(nowtyp) && (levl[x][y].doormask & ~D_BROKEN)) || (IS_DOOR(ntyp) && (levl[nx][ny].doormask & ~D_BROKEN)) || -#ifdef REINCARNATION ((IS_DOOR(nowtyp) || IS_DOOR(ntyp)) && Is_rogue_level(&u.uz)) || -#endif /* mustn't pass between adjacent long worm segments, but can attack that way */ (m_at(x, ny) && m_at(nx, y) && worm_cross(x, y, nx, ny) && diff --git a/src/monmove.c b/src/monmove.c index cc18bcd3c..dd7315346 100644 --- a/src/monmove.c +++ b/src/monmove.c @@ -680,9 +680,7 @@ register int after; /* Not necessary if m_move called from this file, but necessary in * other calls of m_move (ex. leprechauns dodging) */ -#ifdef REINCARNATION if (!Is_rogue_level(&u.uz)) -#endif can_tunnel = tunnels(ptr); can_open = !(nohands(ptr) || verysmall(ptr)); can_unlock = ((can_open && monhaskey(mtmp, TRUE)) || @@ -804,11 +802,7 @@ not_special: } } - if ((!mtmp->mpeaceful || !rn2(10)) -#ifdef REINCARNATION - && (!Is_rogue_level(&u.uz)) -#endif - ) { + if ((!mtmp->mpeaceful || !rn2(10)) && (!Is_rogue_level(&u.uz))) { boolean in_line = lined_up(mtmp) && (distmin(mtmp->mx, mtmp->my, mtmp->mux, mtmp->muy) <= (throws_rocks(youmonst.data) ? 20 : ACURRSTR/2+1) diff --git a/src/muse.c b/src/muse.c index ec4bc55ab..855a91887 100644 --- a/src/muse.c +++ b/src/muse.c @@ -1080,9 +1080,7 @@ struct monst *mtmp; unsolid(mtmp->data) || !rn2(10)) && dist2(mtmp->mx,mtmp->my,mtmp->mux,mtmp->muy) <= 2 && mtmp->mcansee && haseyes(mtmp->data) -#ifdef REINCARNATION && !Is_rogue_level(&u.uz) -#endif && (!In_endgame(&u.uz) || Is_earthlevel(&u.uz))) { m.offensive = obj; m.has_offense = MUSE_SCR_EARTH; diff --git a/src/options.c b/src/options.c index 18966efb5..8504a2c3e 100644 --- a/src/options.c +++ b/src/options.c @@ -369,14 +369,10 @@ static struct Comp_Opt DISP_IN_GAME}, #endif { "roguesymset", "load a set of rogue display symbols from the symbols file", 70, -#ifdef REINCARNATION -# ifdef LOADSYMSETS +#ifdef LOADSYMSETS SET_IN_GAME }, -# else - DISP_IN_GAME}, -# endif #else - SET_IN_FILE}, + DISP_IN_GAME}, #endif { "suppress_alert", "suppress alerts about version-specific features", 8, SET_IN_GAME }, @@ -1417,7 +1413,6 @@ boolean tinitial, tfrom_file; fullname = "roguesymset"; if (match_optname(opts, fullname, 7, TRUE)) { -#if defined(REINCARNATION) && defined(LOADSYMSETS) if (duplicate) complain_about_duplicate(opts,1); if (negated) bad_negation(fullname, FALSE); else if ((op = string_for_opt(opts, FALSE)) != 0) { @@ -1434,7 +1429,6 @@ boolean tinitial, tfrom_file; need_redraw = TRUE; } } -#endif return; } @@ -2594,10 +2588,8 @@ goodfruit: wait_synch(); } else { switch_symbols(TRUE); -# ifdef REINCARNATION if (!initial && Is_rogue_level(&u.uz)) assign_graphics(ROGUESET); -# endif } } # endif /*LOADSYMSETS*/ @@ -3449,16 +3441,10 @@ boolean setinitial,setfromfile; #endif int chosen = -2, which_set; -#ifdef REINCARNATION if (rogueflag) which_set = ROGUESET; else -#endif which_set = PRIMARY; -#ifndef REINCARNATION - if (rogueflag) return TRUE; -#endif - #ifdef LOADSYMSETS /* clear symset[].name as a flag to read_sym_file() to build list */ symset_name = symset[which_set].name; @@ -3587,12 +3573,10 @@ boolean setinitial,setfromfile; symset[which_set].name = symset_name; /* Set default symbols and clear the handling value */ -# ifdef REINCARNATION if(rogueflag) init_r_symbols(); else -# endif - init_l_symbols(); + init_l_symbols(); if (symset[which_set].name) { if (read_sym_file(which_set)) @@ -3605,13 +3589,10 @@ boolean setinitial,setfromfile; if (ready_to_switch) switch_symbols(TRUE); -# ifdef REINCARNATION if (Is_rogue_level(&u.uz)) { if (rogueflag) assign_graphics(ROGUESET); - } else -# endif - if (!rogueflag) assign_graphics(PRIMARY); + } else if (!rogueflag) assign_graphics(PRIMARY); need_redraw = TRUE; #endif /*LOADSYMSETS*/ return TRUE; @@ -3832,17 +3813,15 @@ char *buf; } else if (!strcmp(optname, "race")) Sprintf(buf, "%s", rolestring(flags.initrace, races, noun)); -#ifdef REINCARNATION else if (!strcmp(optname, "roguesymset")) { Sprintf(buf, "%s", -# ifdef LOADSYMSETS +#ifdef LOADSYMSETS symset[ROGUESET].name ? symset[ROGUESET].name : -# endif +#endif "default"); if (currentgraphics == ROGUESET && symset[ROGUESET].name) Strcat(buf, ", active"); -#endif } else if (!strcmp(optname, "role")) Sprintf(buf, "%s", rolestring(flags.initrole, roles, name.m)); diff --git a/src/read.c b/src/read.c index 6f4c7c478..bbdd11a09 100644 --- a/src/read.c +++ b/src/read.c @@ -1322,11 +1322,8 @@ struct obj *sobj; /* scroll, or fake spellbook object for scroll-like spell */ break; case SCR_EARTH: /* TODO: handle steeds */ - if ( -#ifdef REINCARNATION - !Is_rogue_level(&u.uz) && -#endif - (!In_endgame(&u.uz) || Is_earthlevel(&u.uz))) { + if (!Is_rogue_level(&u.uz) + && (!In_endgame(&u.uz) || Is_earthlevel(&u.uz))) { register int x, y; /* Identify the scroll */ @@ -1606,7 +1603,6 @@ do_it: if (Punished && !on && !Blind) move_bc(1, 0, uball->ox, uball->oy, uchain->ox, uchain->oy); -#ifdef REINCARNATION if (Is_rogue_level(&u.uz)) { /* Can't use do_clear_area because MAX_RADIUS is too small */ /* rogue lighting must light the entire room */ @@ -1621,7 +1617,6 @@ do_it: } /* hallways remain dark on the rogue level */ } else -#endif do_clear_area(u.ux,u.uy, (obj && obj->oclass==SCROLL_CLASS && obj->blessed) ? 9 : 5, set_lit, (genericptr_t)(on ? &is_lit : (char *)0)); diff --git a/src/restore.c b/src/restore.c index dc883c6da..64e8710d6 100644 --- a/src/restore.c +++ b/src/restore.c @@ -857,9 +857,7 @@ register int fd; if (!wizard && !discover) (void) delete_savefile(); -#ifdef REINCARNATION if (Is_rogue_level(&u.uz)) assign_graphics(ROGUESET); -#endif #ifdef USE_TILES substitute_tiles(&u.uz); #endif diff --git a/src/vision.c b/src/vision.c index d835fb554..f00306b8c 100644 --- a/src/vision.c +++ b/src/vision.c @@ -103,9 +103,7 @@ STATIC_DCL void NDECL(view_init); STATIC_DCL void FDECL(view_from,(int,int,char **,char *,char *,int, void (*)(int,int,genericptr_t),genericptr_t)); STATIC_DCL void FDECL(get_unused_cs, (char ***,char **,char **)); -#ifdef REINCARNATION STATIC_DCL void FDECL(rogue_vision, (char **,char *,char *)); -#endif /* Macro definitions that I can't find anywhere. */ #define sign(z) ((z) < 0 ? -1 : ((z) ? 1 : 0 )) @@ -285,7 +283,6 @@ get_unused_cs(rows, rmin, rmax) } -#ifdef REINCARNATION /* * rogue_vision() * @@ -349,7 +346,6 @@ rogue_vision(next, rmin, rmax) } } } -#endif /* REINCARNATION */ /*#define EXTEND_SPINE*/ /* possibly better looking wall-angle */ @@ -568,13 +564,9 @@ vision_recalc(control) /* skip the normal update loop */ goto skip; - } -#ifdef REINCARNATION - else if (Is_rogue_level(&u.uz)) { + } else if (Is_rogue_level(&u.uz)) { rogue_vision(next_array,next_rmin,next_rmax); - } -#endif - else { + } else { int has_night_vision = 1; /* hero has night vision */ if (Underwater && !Is_waterlevel(&u.uz)) { diff --git a/src/zap.c b/src/zap.c index 752b03796..173bee625 100644 --- a/src/zap.c +++ b/src/zap.c @@ -4162,10 +4162,8 @@ short exploding_wand_typ; if (see_it) pline("%s %s reveals a secret door.", yourzap ? "Your" : "The", zapverb); -#ifdef REINCARNATION else if (Is_rogue_level(&u.uz)) You_feel("a draft."); /* new open doorway */ -#endif } /* regular door absorbs remaining zap range, possibly gets destroyed */ diff --git a/sys/amiga/winfuncs.c b/sys/amiga/winfuncs.c index 21f1937e4..cb9e3a504 100644 --- a/sys/amiga/winfuncs.c +++ b/sys/amiga/winfuncs.c @@ -2081,12 +2081,7 @@ if(u.uz.dlevel != x){ } } #endif - if( - WINVERS_AMIV -#ifdef REINCARNATION - && !Is_rogue_level(&u.uz) -#endif - ) + if(WINVERS_AMIV && !Is_rogue_level(&u.uz)) { amii_curs(win,x,y); amiga_print_glyph(win,0,glyph); @@ -2095,7 +2090,6 @@ if(u.uz.dlevel != x){ { /* map glyph to character and color */ (void) mapglyph(glyph, &och, &color, &special, x, y); - /* XXX next if should be ifdef REINCARNATION */ ch = (uchar)och; if( WINVERS_AMIV ){ /* implies Rogue level here */ amii_curs(win,x,y); @@ -2106,10 +2100,8 @@ if(u.uz.dlevel != x){ #ifdef TEXTCOLOR /* Turn off color if rogue level. */ -# ifdef REINCARNATION if (Is_rogue_level(&u.uz)) color = NO_COLOR; -# endif amiga_print_glyph(win,color,ch); #else diff --git a/sys/msdos/pckeys.c b/sys/msdos/pckeys.c index 142618ee7..6551f7df5 100644 --- a/sys/msdos/pckeys.c +++ b/sys/msdos/pckeys.c @@ -56,24 +56,16 @@ unsigned char shift; vga_userpan(0); break; case 0x3E: /* F4 = toggle overview mode */ - if (iflags.tile_view && - !opening_dialog -#ifdef REINCARNATION - && !Is_rogue_level(&u.uz) -#endif - ) { + if (iflags.tile_view && !opening_dialog + && !Is_rogue_level(&u.uz)) { iflags.traditional_view = FALSE; vga_overview(iflags.over_view ? FALSE : TRUE); vga_refresh(); } break; case 0x3F: /* F5 = toggle traditional mode */ - if (iflags.tile_view && - !opening_dialog -#ifdef REINCARNATION - && !Is_rogue_level(&u.uz) -#endif - ) { + if (iflags.tile_view && !opening_dialog + && !Is_rogue_level(&u.uz)) { iflags.over_view = FALSE; vga_traditional(iflags.traditional_view ? FALSE : TRUE); vga_refresh(); diff --git a/sys/msdos/vidvga.c b/sys/msdos/vidvga.c index e128821f9..0784cf007 100644 --- a/sys/msdos/vidvga.c +++ b/sys/msdos/vidvga.c @@ -1171,14 +1171,9 @@ vga_DrawCursor() unsigned char first,second; /* char on[2] = {0xFF,0xFF}; */ /* char off[2] = {0x00,0x00}; */ -#ifdef REINCARNATION boolean isrogue = Is_rogue_level(&u.uz); boolean singlebyte = (isrogue || iflags.over_view || iflags.traditional_view || !inmap); -#else - boolean singlebyte = (iflags.over_view - || iflags.traditional_view || !inmap); -#endif int curtyp; if (!cursor_type && inmap) return; /* CURSOR_INVIS - nothing to do */ @@ -1376,14 +1371,9 @@ vga_HideCursor() int i,pixx,pixy,x,y; char __far *tmp1; char __far *tmp2; -#ifdef REINCARNATION boolean isrogue = Is_rogue_level(&u.uz); boolean singlebyte = (isrogue || iflags.over_view || iflags.traditional_view || !inmap); -#else - boolean singlebyte = (iflags.over_view - || iflags.traditional_view || !inmap); -#endif int curtyp; if (inmap && !cursor_type) return; /* CURSOR_INVIS - nothing to do */ diff --git a/sys/share/pcmain.c b/sys/share/pcmain.c index f6c2b6b12..0923f735f 100644 --- a/sys/share/pcmain.c +++ b/sys/share/pcmain.c @@ -309,11 +309,9 @@ char *argv[]; if (!symset[PRIMARY].name) { load_symset("IBMGraphics_2", PRIMARY); } -# ifdef REINCARNATION if (!symset[ROGUESET].name) { load_symset("RogueEpyx", ROGUESET); } -# endif # endif #endif /*LOADSYMSETS*/ diff --git a/sys/wince/mhmain.c b/sys/wince/mhmain.c index ff4e628b3..943ab111f 100644 --- a/sys/wince/mhmain.c +++ b/sys/wince/mhmain.c @@ -1053,9 +1053,7 @@ void mswin_select_map_mode(int mode) #endif /* override for Rogue level */ -#ifdef REINCARNATION if( Is_rogue_level(&u.uz) && !IS_MAP_ASCII(mode) ) return; -#endif /* set map mode menu mark */ if( IS_MAP_ASCII(mode) ) { diff --git a/sys/wince/mhmap.c b/sys/wince/mhmap.c index 1fe386490..f2b611f9c 100644 --- a/sys/wince/mhmap.c +++ b/sys/wince/mhmap.c @@ -569,12 +569,8 @@ void onPaint(HWND hWnd) paint_rt.right = min(data->xPos + (ps.rcPaint.right - data->map_orig.x)/data->xScrTile+1, COLNO); paint_rt.bottom = min(data->yPos + (ps.rcPaint.bottom - data->map_orig.y)/data->yScrTile+1, ROWNO); - if( data->bAsciiMode -#ifdef REINCARNATION - || Is_rogue_level(&u.uz) + if(data->bAsciiMode || Is_rogue_level(&u.uz)) { /* You enter a VERY primitive world! */ -#endif - ) { HGDIOBJ oldFont; oldFont = SelectObject(hDC, data->hMapFont); diff --git a/sys/wince/mswproc.c b/sys/wince/mswproc.c index a4e5ede90..84c2b092c 100644 --- a/sys/wince/mswproc.c +++ b/sys/wince/mswproc.c @@ -793,14 +793,12 @@ void mswin_clear_nhwindow(winid wid) (wid < MAXWINDOWS) && (GetNHApp()->windowlist[wid].win != NULL)) { -#ifdef REINCARNATION if( GetNHApp()->windowlist[wid].type == NHW_MAP ) { if( Is_rogue_level(&u.uz) ) mswin_map_mode(mswin_hwnd_from_winid(WIN_MAP), ROGUE_LEVEL_MAP_MODE); else mswin_map_mode(mswin_hwnd_from_winid(WIN_MAP), iflags.wc_map_mode); } -#endif SendMessage( GetNHApp()->windowlist[wid].win, diff --git a/util/makedefs.c b/util/makedefs.c index 1de90dc6c..5cf318416 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -988,9 +988,6 @@ make_version() */ version.feature_set = (unsigned long)(0L /* levels and/or topology (0..4) */ -#ifdef REINCARNATION - | (1L << 1) -#endif /* monsters (5..9) */ #ifdef MAIL | (1L << 6) @@ -1289,9 +1286,6 @@ static const char *build_opts[] = { #ifdef SELECTSAVED "restore saved games via menu", #endif -#ifdef REINCARNATION - "rogue level", -#endif #ifdef SCORE_ON_BOTL "score on status line", #endif @@ -1823,12 +1817,9 @@ static struct deflist { const char *defname; boolean true_or_false; } deflist[] = { -#ifdef REINCARNATION { "REINCARNATION", TRUE }, -#else - { "REINCARNATION", FALSE }, -#endif - { 0, 0 } }; + { 0, 0 } +}; static int check_control(s) diff --git a/win/Qt/qt_win.cpp b/win/Qt/qt_win.cpp index ac2141fcc..af412e25a 100644 --- a/win/Qt/qt_win.cpp +++ b/win/Qt/qt_win.cpp @@ -1644,12 +1644,7 @@ void NetHackQtMapWindow::paintEvent(QPaintEvent* event) painter.begin(this); - if ( -#ifdef REINCARNATION - Is_rogue_level(&u.uz) || -#endif - iflags.wc_ascii_map - ) + if (Is_rogue_level(&u.uz) || iflags.wc_ascii_map) { // You enter a VERY primitive world! @@ -1730,7 +1725,6 @@ void NetHackQtMapWindow::paintEvent(QPaintEvent* event) } if (garea.contains(cursor)) { -#ifdef REINCARNATION if (Is_rogue_level(&u.uz)) { #ifdef TEXTCOLOR painter.setPen( white ); @@ -1738,7 +1732,6 @@ void NetHackQtMapWindow::paintEvent(QPaintEvent* event) painter.setPen( green ); // REALLY primitive #endif } else -#endif { int hp100; if (u.mtimedone) { diff --git a/win/X11/winmap.c b/win/X11/winmap.c index cc48a5478..dd92ad680 100644 --- a/win/X11/winmap.c +++ b/win/X11/winmap.c @@ -839,10 +839,7 @@ display_map_window(wp) register int row; struct map_info_t *map_info = wp->map_information; - if (( -#ifdef REINCARNATION - Is_rogue_level(&u.uz) ? map_info->is_tile : -#endif + if ((Is_rogue_level(&u.uz) ? map_info->is_tile : (map_info->is_tile != iflags.wc_tiled_map)) && map_info->tile_map.image_width) { /* changed map display mode, re-display the full map */ @@ -850,11 +847,7 @@ display_map_window(wp) sizeof(map_info->t_start)); (void) memset((genericptr_t) map_info->t_stop, (char) COLNO-1, sizeof(map_info->t_stop)); - map_info->is_tile = iflags.wc_tiled_map -#ifdef REINCARNATION - && !Is_rogue_level(&u.uz) -#endif - ; + map_info->is_tile = iflags.wc_tiled_map && !Is_rogue_level(&u.uz); XClearWindow(XtDisplay(wp->w), XtWindow(wp->w)); set_map_size(wp, COLNO, ROWNO); check_cursor_visibility(wp); diff --git a/win/gem/wingem.c b/win/gem/wingem.c index 63fda6914..87d175231 100644 --- a/win/gem/wingem.c +++ b/win/gem/wingem.c @@ -911,9 +911,7 @@ int x, y; void mar_print_gl_char(winid,xchar,xchar,int); -#ifdef REINCARNATION extern int mar_set_rogue(int); -#endif extern void mar_add_pet_sign(winid,int,int); @@ -926,9 +924,7 @@ Gem_print_glyph(window, x, y, glyph) /* Move the cursor. */ Gem_curs(window, x,y); -# ifdef REINCARNATION - mar_set_rogue(Is_rogue_level(&u.uz) ? TRUE : FALSE); -# endif + mar_set_rogue(Is_rogue_level(&u.uz) ? TRUE : FALSE); x--; /* MAR -- because x ranges from 1 to COLNO */ if(mar_set_tile_mode(-1)){ @@ -960,9 +956,7 @@ void mar_print_gl_char(window, x, y, glyph) #ifdef TEXTCOLOR /* Turn off color if rogue level. */ -# ifdef REINCARNATION if (Is_rogue_level(&u.uz)) color = NO_COLOR; -# endif #endif /* TEXTCOLOR */ mar_print_char(window,x,y,ch,color); diff --git a/win/win32/mhmain.c b/win/win32/mhmain.c index b8a2dac10..6092f5cd5 100644 --- a/win/win32/mhmain.c +++ b/win/win32/mhmain.c @@ -1043,9 +1043,7 @@ void mswin_select_map_mode(int mode) data = (PNHMainWindow)GetWindowLongPtr(GetNHApp()->hMainWnd, GWLP_USERDATA); /* override for Rogue level */ -#ifdef REINCARNATION if( Is_rogue_level(&u.uz) && !IS_MAP_ASCII(mode) ) return; -#endif /* set map mode menu mark */ if( IS_MAP_ASCII(mode) ) { diff --git a/win/win32/mhmap.c b/win/win32/mhmap.c index ff1a43fb1..bd3c60a17 100644 --- a/win/win32/mhmap.c +++ b/win/win32/mhmap.c @@ -603,12 +603,8 @@ void onPaint(HWND hWnd) paint_rt.right = min(data->xPos + (ps.rcPaint.right - data->map_orig.x)/data->xScrTile+1, COLNO); paint_rt.bottom = min(data->yPos + (ps.rcPaint.bottom - data->map_orig.y)/data->yScrTile+1, ROWNO); - if( data->bAsciiMode -#ifdef REINCARNATION - || Is_rogue_level(&u.uz) + if( data->bAsciiMode || Is_rogue_level(&u.uz) ) { /* You enter a VERY primitive world! */ -#endif - ) { HGDIOBJ oldFont; oldFont = SelectObject(hDC, data->hMapFont); diff --git a/win/win32/mswproc.c b/win/win32/mswproc.c index 11b109067..39776d87b 100644 --- a/win/win32/mswproc.c +++ b/win/win32/mswproc.c @@ -802,14 +802,12 @@ void mswin_clear_nhwindow(winid wid) (wid < MAXWINDOWS) && (GetNHApp()->windowlist[wid].win != NULL)) { -#ifdef REINCARNATION if( GetNHApp()->windowlist[wid].type == NHW_MAP ) { if( Is_rogue_level(&u.uz) ) mswin_map_mode(mswin_hwnd_from_winid(WIN_MAP), ROGUE_LEVEL_MAP_MODE); else mswin_map_mode(mswin_hwnd_from_winid(WIN_MAP), iflags.wc_map_mode); } -#endif SendMessage( GetNHApp()->windowlist[wid].win, From ad82ca80f318ac88ccaf36efef7fd13ad81a0b31 Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Fri, 13 Feb 2015 23:58:46 -0500 Subject: [PATCH 031/132] Make DUNGEON_OVERVIEW unconditional. --- include/config.h | 1 - include/dungeon.h | 2 -- include/extern.h | 2 -- include/rm.h | 4 ---- src/bones.c | 4 ---- src/cmd.c | 18 ------------------ src/decl.c | 2 -- src/display.c | 8 +------- src/do.c | 6 ------ src/dungeon.c | 14 -------------- src/hack.c | 2 -- src/lock.c | 17 ++++------------- src/mklev.c | 2 -- src/priest.c | 2 -- src/quest.c | 2 -- src/read.c | 4 ---- src/restore.c | 2 -- src/save.c | 2 -- src/vision.c | 2 -- util/makedefs.c | 3 --- 20 files changed, 5 insertions(+), 94 deletions(-) diff --git a/include/config.h b/include/config.h index bcc8e9903..abdeb4187 100644 --- a/include/config.h +++ b/include/config.h @@ -450,7 +450,6 @@ typedef unsigned char uchar; /*#define GOLDOBJ */ /* Gold is kept on obj chains - Helge Hafting */ #define STATUS_VIA_WINDOWPORT /* re-work of the status line updating process */ #define STATUS_HILITES /* support hilites of status fields */ -#define DUNGEON_OVERVIEW /* dungeon overview by Hojita Discordia */ /* #define WINCHAIN*/ /* stacked window systems */ /* End of Section 5 */ diff --git a/include/dungeon.h b/include/dungeon.h index d80d22a7d..f2bf75ef6 100644 --- a/include/dungeon.h +++ b/include/dungeon.h @@ -169,7 +169,6 @@ struct linfo { #endif /* MFLOPPY */ }; -#ifdef DUNGEON_OVERVIEW /* types and structures for dungeon map recording * * It is designed to eliminate the need for an external notes file for some of @@ -245,5 +244,4 @@ typedef struct mapseen { struct cemetery *final_resting_place; /* same as level.bonesinfo */ } mapseen; -#endif /* DUNGEON_OVERVIEW */ #endif /* DUNGEON_H */ diff --git a/include/extern.h b/include/extern.h index 6f0ad015f..186d5c9ff 100644 --- a/include/extern.h +++ b/include/extern.h @@ -581,7 +581,6 @@ E schar FDECL(lev_by_name, (const char *)); #ifdef WIZARD E schar FDECL(print_dungeon, (BOOLEAN_P,schar *,xchar *)); #endif -#ifdef DUNGEON_OVERVIEW E int NDECL(donamelevel); E int NDECL(dooverview); E void FDECL(show_overview, (int,int)); @@ -592,7 +591,6 @@ E void FDECL(mapseen_temple, (struct monst *)); E void FDECL(room_discovered, (int)); E void FDECL(recbranch_mapseen, (d_level *, d_level *)); E void FDECL(remdun_mapseen, (int)); -#endif /* DUNGEON_OVERVIEW */ /* ### eat.c ### */ diff --git a/include/rm.h b/include/rm.h index fbd7470cf..8747407f9 100644 --- a/include/rm.h +++ b/include/rm.h @@ -506,11 +506,9 @@ struct cemetery { char how[100 + 1]; /* [DTHSZ+1] */ /* date+time in string of digits rather than binary */ char when[4+2+2 + 2+2+2 + 1]; /* "YYYYMMDDhhmmss\0" */ -#ifdef DUNGEON_OVERVIEW /* final resting place spot */ schar frpx, frpy; boolean bonesknown; -#endif }; struct levelflags { @@ -564,9 +562,7 @@ typedef struct } dlevel_t; -#ifdef DUNGEON_OVERVIEW extern schar lastseentyp[COLNO][ROWNO]; /* last seen/touched dungeon typ */ -#endif /* DUNGEON_OVERVIEW */ extern dlevel_t level; /* structure describing the current level */ diff --git a/src/bones.c b/src/bones.c index e6c33a262..8a36ea11d 100644 --- a/src/bones.c +++ b/src/bones.c @@ -457,9 +457,7 @@ struct obj *corpse; levl[x][y].seenv = 0; levl[x][y].waslit = 0; levl[x][y].glyph = cmap_to_glyph(S_stone); -#ifdef DUNGEON_OVERVIEW lastseentyp[x][y] = 0; -#endif } /* Attach bones info to the current level before saving. */ @@ -476,11 +474,9 @@ struct obj *corpse; aligns[1 - u.ualign.type].filecode); formatkiller(newbones->how, sizeof newbones->how, how); Strcpy(newbones->when, yyyymmddhhmmss(when)); -#ifdef DUNGEON_OVERVIEW /* final resting place, used to decide when bones are discovered */ newbones->frpx = u.ux, newbones->frpy = u.uy; newbones->bonesknown = FALSE; -#endif /* if current character died on a bones level, the cememtery list will have multiple entries, most recent (this dead hero) first */ newbones->next = level.bonesinfo; diff --git a/src/cmd.c b/src/cmd.c index 2abb73a07..00e139001 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -123,9 +123,7 @@ STATIC_PTR int NDECL(doprev_message); STATIC_PTR int NDECL(timed_occupation); STATIC_PTR int NDECL(doextcmd); STATIC_PTR int NDECL(domonability); -#ifdef DUNGEON_OVERVIEW STATIC_PTR int NDECL(dooverview_or_wiz_where); -#endif /* DUNGEON_OVERVIEW */ STATIC_PTR int NDECL(dotravel); STATIC_PTR int NDECL(doterrain); # ifdef WIZARD @@ -537,7 +535,6 @@ enter_explore_mode(VOID_ARGS) return 0; } -#ifdef DUNGEON_OVERVIEW STATIC_PTR int dooverview_or_wiz_where(VOID_ARGS) { @@ -549,7 +546,6 @@ dooverview_or_wiz_where(VOID_ARGS) return 0; } -#endif /* DUNGEON_OVERVIEW */ #ifdef WIZARD /* ^W command - wish for something */ @@ -2392,14 +2388,8 @@ static const struct func_tab cmdlist[] = { {C('i'), TRUE, wiz_identify}, #endif {C('l'), TRUE, doredraw}, /* if number_pad is set */ -#ifndef DUNGEON_OVERVIEW -#ifdef WIZARD - {C('o'), TRUE, wiz_where}, -#endif -#else {C('n'), TRUE, donamelevel}, /* if number_pad is set */ {C('o'), TRUE, dooverview_or_wiz_where}, /* depending on wizard status */ -#endif /* DUNGEON_OVERVIEW */ {C('p'), TRUE, doprev_message}, {C('r'), TRUE, doredraw}, {C('t'), TRUE, dotele}, @@ -2412,9 +2402,7 @@ static const struct func_tab cmdlist[] = { {'a', FALSE, doapply}, {'A', FALSE, doddoremarm}, {M('a'), TRUE, doorganize}, -#ifdef DUNGEON_OVERVIEW {M('A'), TRUE, donamelevel}, /* #annotate */ -#endif /* 'b', 'B' : go sw */ {'c', FALSE, doclose}, {'C', TRUE, docallcmd}, @@ -2449,9 +2437,7 @@ static const struct func_tab cmdlist[] = { {'o', FALSE, doopen}, {'O', TRUE, doset}, {M('o'), FALSE, dosacrifice}, -#ifdef DUNGEON_OVERVIEW {M('O'), TRUE, dooverview}, /* #overview */ -#endif {'p', FALSE, dopay}, {'P', FALSE, doputon}, {M('p'), TRUE, dopray}, @@ -2517,9 +2503,7 @@ static const struct func_tab cmdlist[] = { struct ext_func_tab extcmdlist[] = { {"adjust", "adjust inventory letters", doorganize, TRUE}, -#ifdef DUNGEON_OVERVIEW {"annotate", "name current level", donamelevel, TRUE}, -#endif /* DUNGEON_OVERVIEW */ {"chat", "talk to someone", dotalk, TRUE}, /* converse? */ {"conduct", "list voluntary challenges you have maintained", doconduct, TRUE}, @@ -2533,9 +2517,7 @@ struct ext_func_tab extcmdlist[] = { {"monster", "use a monster's special ability", domonability, TRUE}, {"name", "name a monster or an object", docallcmd, TRUE}, {"offer", "offer a sacrifice to the gods", dosacrifice, FALSE}, -#ifdef DUNGEON_OVERVIEW {"overview", "show an overview of the dungeon", dooverview, TRUE}, -#endif /* DUNGEON_OVERVIEW */ {"pray", "pray to the gods for help", dopray, TRUE}, {"quit", "exit without saving current game", done2, TRUE}, {"ride", "ride (or stop riding) a monster", doride, FALSE}, diff --git a/src/decl.c b/src/decl.c index c9105bee6..d4892f9d4 100644 --- a/src/decl.c +++ b/src/decl.c @@ -142,9 +142,7 @@ NEARDATA struct you u = DUMMY; NEARDATA time_t ubirthday = DUMMY; -#ifdef DUNGEON_OVERVIEW schar lastseentyp[COLNO][ROWNO] = {DUMMY}; /* last seen/touched dungeon typ */ -#endif /* DUNGEON_OVERVIEW */ NEARDATA struct obj *invent = (struct obj *)0, *uwep = (struct obj *)0, *uarm = (struct obj *)0, diff --git a/src/display.c b/src/display.c index 263dd853a..48b9f0b65 100644 --- a/src/display.c +++ b/src/display.c @@ -137,11 +137,7 @@ STATIC_DCL void FDECL(set_seenv, (struct rm *, int, int, int, int)); STATIC_DCL void FDECL(t_warn, (struct rm *)); STATIC_DCL int FDECL(wall_angle, (struct rm *)); -#ifdef DUNGEON_OVERVIEW -# define remember_topology(x,y) (lastseentyp[x][y] = levl[x][y].typ) -#else -# define remember_topology(x,y) /*empty*/ -#endif +#define remember_topology(x,y) (lastseentyp[x][y] = levl[x][y].typ) #ifdef INVISIBLE_OBJECTS /* @@ -420,10 +416,8 @@ display_monster(x, y, mon, sightflags, worm_tail) levl[x][y].glyph = glyph; if (!sensed) { show_glyph(x,y, glyph); -#ifdef DUNGEON_OVERVIEW /* override real topology with mimic's fake one */ lastseentyp[x][y] = cmap_to_type(sym); -#endif } break; } diff --git a/src/do.c b/src/do.c index e0fe5a5c3..4e5876e6b 100644 --- a/src/do.c +++ b/src/do.c @@ -1107,9 +1107,7 @@ boolean at_stairs, falling, portal; keepdogs(FALSE); if (u.uswallow) /* idem */ u.uswldtim = u.uswallow = 0; -#ifdef DUNGEON_OVERVIEW recalc_mapseen(); /* recalculate map overview before we leave the level */ -#endif /* DUNGEON_OVERVIEW */ /* * We no longer see anything on the level. Make sure that this * follows u.uswallow set to null since uswallow overrides all @@ -1136,11 +1134,9 @@ boolean at_stairs, falling, portal; /* discard unreachable levels; keep #0 */ for (l_idx = maxledgerno(); l_idx > 0; --l_idx) delete_levelfile(l_idx); -#ifdef DUNGEON_OVERVIEW /* mark #overview data for all dungeon branches as uninteresting */ for (l_idx = 0; l_idx < n_dgns; ++l_idx) remdun_mapseen(l_idx); -#endif } if (Is_rogue_level(newlevel) || Is_rogue_level(&u.uz)) @@ -1148,13 +1144,11 @@ boolean at_stairs, falling, portal; #ifdef USE_TILES substitute_tiles(newlevel); #endif -#ifdef DUNGEON_OVERVIEW /* record this level transition as a potential seen branch unless using * some non-standard means of transportation (level teleport). */ if ((at_stairs || falling || portal) && (u.uz.dnum != newlevel->dnum)) recbranch_mapseen(&u.uz, newlevel); -#endif /* DUNGEON_OVERVIEW */ assign_level(&u.uz0, &u.uz); assign_level(&u.uz, newlevel); assign_level(&u.utolev, newlevel); diff --git a/src/dungeon.c b/src/dungeon.c index c08d195af..ed186796b 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -59,7 +59,6 @@ STATIC_DCL const char *FDECL(br_string, (int)); STATIC_DCL void FDECL(print_branch, (winid, int, int, int, BOOLEAN_P, struct lchoice *)); #endif -#ifdef DUNGEON_OVERVIEW mapseen *mapseenchn = (struct mapseen *)0; STATIC_DCL mapseen *FDECL(load_mapseen, (int)); STATIC_DCL void FDECL(save_mapseen, (int, mapseen *)); @@ -72,7 +71,6 @@ STATIC_DCL const char *FDECL(br_string2, (branch *)); STATIC_DCL const char *FDECL(endgamelevelname, (char *,int)); STATIC_DCL const char *FDECL(shop_string, (int)); STATIC_DCL char *FDECL(tunesuffix, (mapseen *,char *)); -#endif /* DUNGEON_OVERVIEW */ #ifdef DEBUG #define DD dungeons[i] @@ -135,9 +133,7 @@ save_dungeon(fd, perform_write, free_data) boolean perform_write, free_data; { branch *curr, *next; -#ifdef DUNGEON_OVERVIEW mapseen *curr_ms, *next_ms; -#endif int count; if (perform_write) { @@ -159,14 +155,12 @@ save_dungeon(fd, perform_write, free_data) (unsigned)count * sizeof (struct linfo)); bwrite(fd, (genericptr_t) &inv_pos, sizeof inv_pos); -#ifdef DUNGEON_OVERVIEW for (count = 0, curr_ms = mapseenchn; curr_ms; curr_ms = curr_ms->next) count++; bwrite(fd, (genericptr_t) &count, sizeof(count)); for (curr_ms = mapseenchn; curr_ms; curr_ms = curr_ms->next) save_mapseen(fd, curr_ms); -#endif /* DUNGEON_OVERVIEW */ } if (free_data) { @@ -175,7 +169,6 @@ save_dungeon(fd, perform_write, free_data) free((genericptr_t) curr); } branches = 0; -#ifdef DUNGEON_OVERVIEW for (curr_ms = mapseenchn; curr_ms; curr_ms = next_ms) { next_ms = curr_ms->next; if (curr_ms->custom) @@ -183,7 +176,6 @@ save_dungeon(fd, perform_write, free_data) free((genericptr_t) curr_ms); } mapseenchn = 0; -#endif /* DUNGEON_OVERVIEW */ } } @@ -194,9 +186,7 @@ restore_dungeon(fd) { branch *curr, *last; int count, i; -#ifdef DUNGEON_OVERVIEW mapseen *curr_ms, *last_ms; -#endif mread(fd, (genericptr_t) &n_dgns, sizeof(n_dgns)); mread(fd, (genericptr_t) dungeons, sizeof(dungeon) * (unsigned)n_dgns); @@ -223,7 +213,6 @@ restore_dungeon(fd) mread(fd, (genericptr_t) level_info, (unsigned)count*sizeof(struct linfo)); mread(fd, (genericptr_t) &inv_pos, sizeof inv_pos); -#ifdef DUNGEON_OVERVIEW mread(fd, (genericptr_t) &count, sizeof(count)); last_ms = (mapseen *) 0; for (i = 0; i < count; i++) { @@ -235,7 +224,6 @@ restore_dungeon(fd) mapseenchn = curr_ms; last_ms = curr_ms; } -#endif /* DUNGEON_OVERVIEW */ } static void @@ -1835,7 +1823,6 @@ xchar *rdgn; } #endif /* WIZARD */ -#ifdef DUNGEON_OVERVIEW /* Record that the player knows about a branch from a level. This function * will determine whether or not it was a "real" branch that was taken. * This function should not be called for a transition done via level @@ -2711,6 +2698,5 @@ boolean printdun; } } } -#endif /* DUNGEON_OVERVIEW */ /*dungeon.c*/ diff --git a/src/hack.c b/src/hack.c index 545c4c4aa..66e0962e6 100644 --- a/src/hack.c +++ b/src/hack.c @@ -2115,9 +2115,7 @@ register boolean newlev; rt = 0; break; } -#ifdef DUNGEON_OVERVIEW if (msg_given) room_discovered(roomno); -#endif if (rt != 0) { rooms[roomno].rtype = OROOM; diff --git a/src/lock.c b/src/lock.c index 73dc8c159..67a11a545 100644 --- a/src/lock.c +++ b/src/lock.c @@ -561,16 +561,12 @@ doopen() /* try to open a door */ portcullis = (is_drawbridge_wall(cc.x, cc.y) >= 0); if (Blind) { int oldglyph = door->glyph; -#ifdef DUNGEON_OVERVIEW schar oldlastseentyp = lastseentyp[cc.x][cc.y]; -#endif feel_location(cc.x, cc.y); if (door->glyph != oldglyph -#ifdef DUNGEON_OVERVIEW - || lastseentyp[cc.x][cc.y] != oldlastseentyp -#endif - ) res = 1; /* learned something */ + || lastseentyp[cc.x][cc.y] != oldlastseentyp) + res = 1; /* learned something */ } if (portcullis || !IS_DOOR(door->typ)) { @@ -693,16 +689,11 @@ doclose() /* try to close a door */ portcullis = (is_drawbridge_wall(x, y) >= 0); if (Blind) { int oldglyph = door->glyph; -#ifdef DUNGEON_OVERVIEW schar oldlastseentyp = lastseentyp[x][y]; -#endif feel_location(x, y); - if (door->glyph != oldglyph -#ifdef DUNGEON_OVERVIEW - || lastseentyp[x][y] != oldlastseentyp -#endif - ) res = 1; /* learned something */ + if (door->glyph != oldglyph || lastseentyp[x][y] != oldlastseentyp) + res = 1; /* learned something */ } if (portcullis || !IS_DOOR(door->typ)) { diff --git a/src/mklev.c b/src/mklev.c index 1bba98d61..acb4daac4 100644 --- a/src/mklev.c +++ b/src/mklev.c @@ -912,9 +912,7 @@ mklev() struct mkroom *croom; int ridx; -#ifdef DUNGEON_OVERVIEW init_mapseen(&u.uz); -#endif if(getbones()) return; in_mklev = TRUE; diff --git a/src/priest.c b/src/priest.c index 915813af0..5e3b2ea10 100644 --- a/src/priest.c +++ b/src/priest.c @@ -445,11 +445,9 @@ int roomno; if (*this_time <= *other_time) *other_time = *this_time - 1L; } } -#ifdef DUNGEON_OVERVIEW /* recognize the Valley of the Dead and Moloch's Sanctum once hero has encountered the temple priest on those levels */ mapseen_temple(priest); -#endif } else { /* untended */ diff --git a/src/quest.c b/src/quest.c index c5ef6c819..566d7f029 100644 --- a/src/quest.c +++ b/src/quest.c @@ -174,9 +174,7 @@ boolean seal; if (seal) { /* remove the portal to the quest - sealing it off */ int reexpelled = u.uevent.qexpelled; u.uevent.qexpelled = 1; -#ifdef DUNGEON_OVERVIEW remdun_mapseen(quest_dnum); -#endif /* Delete the near portal now; the far (main dungeon side) portal will be deleted as part of arrival on that level. If monster movement is in progress, any who haven't moved diff --git a/src/read.c b/src/read.c index bbdd11a09..6e3147714 100644 --- a/src/read.c +++ b/src/read.c @@ -570,9 +570,7 @@ forget_map(howmuch) levl[zx][zy].seenv = 0; levl[zx][zy].waslit = 0; levl[zx][zy].glyph = cmap_to_glyph(S_stone); -#ifdef DUNGEON_OVERVIEW lastseentyp[zx][zy] = STONE; -#endif } } @@ -633,9 +631,7 @@ forget_levels(percent) count = ((count * percent) + 50) / 100; for (i = 0; i < count; i++) { level_info[indices[i]].flags |= FORGOTTEN; -#ifdef DUNGEON_OVERVIEW forget_mapseen(indices[i]); -#endif } } diff --git a/src/restore.c b/src/restore.c index 64e8710d6..30af7762c 100644 --- a/src/restore.c +++ b/src/restore.c @@ -1015,9 +1015,7 @@ boolean ghostly; } restcemetery(fd, &level.bonesinfo); rest_levl(fd, (boolean)((sfrestinfo.sfi1 & SFI1_RLECOMP) == SFI1_RLECOMP)); -#ifdef DUNGEON_OVERVIEW mread(fd, (genericptr_t)lastseentyp, sizeof(lastseentyp)); -#endif mread(fd, (genericptr_t)&omoves, sizeof(omoves)); elapsed = monstermoves - omoves; mread(fd, (genericptr_t)&upstair, sizeof(stairway)); diff --git a/src/save.c b/src/save.c index f8f5d40b0..e66a5c9eb 100644 --- a/src/save.c +++ b/src/save.c @@ -511,9 +511,7 @@ int mode; #endif savecemetery(fd, mode, &level.bonesinfo); savelevl(fd, (boolean)((sfsaveinfo.sfi1 & SFI1_RLECOMP) == SFI1_RLECOMP)); -#ifdef DUNGEON_OVERVIEW bwrite(fd,(genericptr_t) lastseentyp,sizeof(lastseentyp)); -#endif bwrite(fd,(genericptr_t) &monstermoves,sizeof(monstermoves)); bwrite(fd,(genericptr_t) &upstair,sizeof(stairway)); bwrite(fd,(genericptr_t) &dnstair,sizeof(stairway)); diff --git a/src/vision.c b/src/vision.c index f00306b8c..a6585de14 100644 --- a/src/vision.c +++ b/src/vision.c @@ -803,9 +803,7 @@ skip: viz_rmin = next_rmin; viz_rmax = next_rmax; -#ifdef DUNGEON_OVERVIEW recalc_mapseen(); -#endif } diff --git a/util/makedefs.c b/util/makedefs.c index 5cf318416..4ddb7f449 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -1236,9 +1236,6 @@ static const char *build_opts[] = { #ifdef WIZARD "debug mode", #endif -#ifdef DUNGEON_OVERVIEW - "dungeon map overview patch", -#endif #ifdef EXP_ON_BOTL "experience points on status line", #endif From 4f59f5c6fdb334d29abf0a4a02148024937b7f61 Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Sat, 14 Feb 2015 00:31:17 -0500 Subject: [PATCH 032/132] Make WIZARD unconditional. --- include/config.h | 12 +++------ include/decl.h | 2 -- include/extern.h | 22 +--------------- include/flag.h | 2 -- include/trampoli.h | 2 -- include/vmsconf.h | 11 +------- src/allmain.c | 6 ----- src/attrib.c | 2 -- src/bones.c | 25 ++---------------- src/cmd.c | 62 +++------------------------------------------ src/do.c | 4 --- src/dungeon.c | 22 +++------------- src/eat.c | 4 --- src/end.c | 20 +++------------ src/engrave.c | 2 -- src/exper.c | 2 -- src/files.c | 13 +--------- src/fountain.c | 2 -- src/invent.c | 6 ----- src/light.c | 4 --- src/makemon.c | 8 ++---- src/mklev.c | 12 +-------- src/mkmaze.c | 2 -- src/mkobj.c | 4 --- src/mkroom.c | 15 +++-------- src/mon.c | 6 ----- src/monmove.c | 2 -- src/objnam.c | 12 --------- src/options.c | 34 +------------------------ src/pager.c | 6 ----- src/pline.c | 4 --- src/pray.c | 2 -- src/quest.c | 2 -- src/questpgr.c | 2 -- src/read.c | 8 ------ src/rect.c | 2 -- src/restore.c | 4 --- src/rumors.c | 2 -- src/save.c | 4 --- src/shknam.c | 2 -- src/sp_lev.c | 4 --- src/steed.c | 4 --- src/sys.c | 4 --- src/teleport.c | 58 +++++------------------------------------- src/timeout.c | 8 ------ src/u_init.c | 2 -- src/weapon.c | 11 +------- sys/be/bemain.c | 6 ----- sys/mac/macmain.c | 4 --- sys/mac/macmenu.c | 15 ++--------- sys/share/pcmain.c | 10 -------- sys/unix/unixmain.c | 11 +------- sys/unix/unixunix.c | 2 -- sys/vms/vmsmain.c | 17 +++---------- sys/vms/vmsunix.c | 2 -- sys/wince/mhcmd.c | 4 --- sys/wince/winhack.c | 2 -- sys/winnt/nttty.c | 2 +- sys/winnt/winnt.c | 2 -- util/makedefs.c | 3 --- util/mdgrep.h | 4 --- util/mdgrep.pl | 2 +- 62 files changed, 42 insertions(+), 493 deletions(-) diff --git a/include/config.h b/include/config.h index abdeb4187..c89f778e3 100644 --- a/include/config.h +++ b/include/config.h @@ -172,16 +172,12 @@ * GDBPATH (the path to the system gdb(1) program) */ -#ifndef WIZARD /* allow for compile-time or Makefile changes */ -# ifndef KR1ED -# define WIZARD "wizard" /* the person allowed to use the -D option */ +#ifndef WIZARD_NAME /* allow for compile-time or Makefile changes */ +# define WIZARD_NAME "wizard" +#endif + /* #define SYSCF */ /* use a global configuration */ /* #define SYSCF_FILE "sysconf" */ /* global configuration is in a file */ -# else -# define WIZARD -# define WIZARD_NAME "wizard" -# endif -#endif #ifndef GDBPATH # define GDBPATH "/usr/bin/gdb" diff --git a/include/decl.h b/include/decl.h index 8276c6022..ddc814f4d 100644 --- a/include/decl.h +++ b/include/decl.h @@ -151,9 +151,7 @@ E NEARDATA struct sinfo { #ifdef PANICLOG int in_paniclog; #endif -#ifdef WIZARD int wizkit_wishing; -#endif } program_state; E boolean restoring; diff --git a/include/extern.h b/include/extern.h index 186d5c9ff..fd4bc6520 100644 --- a/include/extern.h +++ b/include/extern.h @@ -172,7 +172,6 @@ E int NDECL(domonability); E int NDECL(doprev_message); E int NDECL(timed_occupation); E int NDECL(doattributes); -# ifdef WIZARD E int NDECL(wiz_detect); E int NDECL(wiz_genesis); E int NDECL(wiz_identify); @@ -180,7 +179,6 @@ E int NDECL(wiz_level_tele); E int NDECL(wiz_map); E int NDECL(wiz_where); E int NDECL(wiz_wish); -# endif /* WIZARD */ #endif /* USE_TRAMPOLI */ E void NDECL(reset_occupations); E void FDECL(set_occupation, (int (*)(void),const char *,int)); @@ -189,9 +187,7 @@ E char NDECL(pgetchar); E void FDECL(pushch, (CHAR_P)); E void FDECL(savech, (CHAR_P)); #endif -#ifdef WIZARD E void NDECL(add_debug_extended_commands); -#endif /* WIZARD */ E void FDECL(reset_commands, (BOOLEAN_P)); E void FDECL(rhack, (char *)); E int NDECL(doextlist); @@ -215,9 +211,7 @@ E void FDECL(hangup, (int)); E void NDECL(end_of_input); #endif E char NDECL(readchar); -#ifdef WIZARD E void NDECL(sanity_check); -#endif E char FDECL(yn_function, (const char *, const char *, CHAR_P)); E boolean FDECL(paranoid_query, (BOOLEAN_P,const char *)); @@ -578,9 +572,7 @@ E int FDECL(induced_align, (int)); E boolean FDECL(Invocation_lev, (d_level *)); E xchar NDECL(level_difficulty); E schar FDECL(lev_by_name, (const char *)); -#ifdef WIZARD E schar FDECL(print_dungeon, (BOOLEAN_P,schar *,xchar *)); -#endif E int NDECL(donamelevel); E int NDECL(dooverview); E void FDECL(show_overview, (int,int)); @@ -726,7 +718,7 @@ E void FDECL(set_savefile_name, (BOOLEAN_P)); #ifdef INSURANCE E void FDECL(save_savefile_name, (int)); #endif -#if defined(WIZARD) && !defined(MICRO) +#ifndef MICRO E void NDECL(set_error_savefile); #endif E int NDECL(create_savefile); @@ -742,9 +734,7 @@ E boolean FDECL(can_read_file, (const char *)); #endif E boolean FDECL(read_config_file, (const char *, int)); E void FDECL(check_recordfile, (const char *)); -#if defined(WIZARD) E void NDECL(read_wizkit); -#endif #ifdef LOADSYMSETS E int FDECL(read_sym_file, (int)); E int FDECL(parse_sym_line, (char *,int)); @@ -987,9 +977,7 @@ E void FDECL(obj_adjust_light_radius, (struct obj *,int)); E int FDECL(candle_light_range, (struct obj *)); E int FDECL(arti_light_radius, (struct obj *)); E const char *FDECL(arti_light_description, (struct obj *)); -#ifdef WIZARD E int NDECL(wiz_light_sources); -#endif /* ### lock.c ### */ @@ -1260,9 +1248,7 @@ E void FDECL(dealloc_obj, (struct obj *)); E void FDECL(obj_ice_effects, (int, int, BOOLEAN_P)); E long FDECL(peek_at_iced_corpse_age, (struct obj *)); E int FDECL(hornoplenty, (struct obj *,BOOLEAN_P)); -#ifdef WIZARD E void NDECL(obj_sanity_check); -#endif /* ### mkroom.c ### */ @@ -1896,9 +1882,7 @@ E void FDECL(do_genocide, (int)); E void FDECL(punish, (struct obj *)); E void NDECL(unpunish); E boolean FDECL(cant_revive, (int *,BOOLEAN_P,struct obj *)); -#ifdef WIZARD E boolean NDECL(create_particular); -#endif /* ### rect.c ### */ @@ -2000,9 +1984,7 @@ E void FDECL(outoracle, (BOOLEAN_P, BOOLEAN_P)); E void FDECL(save_oracles, (int,int)); E void FDECL(restore_oracles, (int)); E int FDECL(doconsult, (struct monst *)); -#ifdef WIZARD E void NDECL(rumor_check); -#endif /* ### save.c ### */ @@ -2263,10 +2245,8 @@ E boolean FDECL(obj_is_local, (struct obj *)); E void FDECL(save_timers, (int,int,int)); E void FDECL(restore_timers, (int,int,BOOLEAN_P,long)); E void FDECL(relink_timers, (BOOLEAN_P)); -#ifdef WIZARD E int NDECL(wiz_timeout_queue); E void NDECL(timer_sanity_check); -#endif /* ### topten.c ### */ diff --git a/include/flag.h b/include/flag.h index f6cc67aa2..1f53bdec6 100644 --- a/include/flag.h +++ b/include/flag.h @@ -174,10 +174,8 @@ struct instance_flags { coord travelcc; /* coordinates for travel_cache */ boolean window_inited; /* true if init_nhwindows() completed */ boolean vision_inited; /* true if vision is ready */ -#ifdef WIZARD boolean sanity_check; /* run sanity checks */ boolean mon_polycontrol; /* debug: control monster polymorphs */ -#endif /* stuff that is related to options and/or user or platform preferences */ unsigned msg_history; /* hint: # of top lines to save */ int menu_headings; /* ATR for menu headings */ diff --git a/include/trampoli.h b/include/trampoli.h index fa040a330..076b16d2f 100644 --- a/include/trampoli.h +++ b/include/trampoli.h @@ -28,7 +28,6 @@ #define doprev_message() doprev_message_() #define timed_occupation() timed_occupation_() #define wiz_attributes() wiz_attributes_() -#ifdef WIZARD #define wiz_detect() wiz_detect_() #define wiz_genesis() wiz_genesis_() #define wiz_identify() wiz_identify_() @@ -36,7 +35,6 @@ #define wiz_map() wiz_map_() #define wiz_where() wiz_where_() #define wiz_wish() wiz_wish_() -#endif /* ### display.c ### */ #define doredraw() doredraw_() diff --git a/include/vmsconf.h b/include/vmsconf.h index 5aaf9e1fc..d675588e2 100644 --- a/include/vmsconf.h +++ b/include/vmsconf.h @@ -30,20 +30,11 @@ #ifdef HACKDIR # undef HACKDIR #endif -#ifdef WIZARD -# undef WIZARD -#endif #ifdef WIZARD_NAME # undef WIZARD_NAME #endif #define HACKDIR Local_HACKDIR -#ifndef KR1ED -# define WIZARD Local_WIZARD -# define WIZARD_NAME WIZARD -#else -# define WIZARD 1 -# define WIZARD_NAME Local_WIZARD -#endif +#define WIZARD_NAME Local_WIZARD #ifndef SYSCF # define SYSCF #endif diff --git a/src/allmain.c b/src/allmain.c index 447aff1d8..d56f11bda 100644 --- a/src/allmain.c +++ b/src/allmain.c @@ -35,9 +35,7 @@ boolean resuming; monstr_init(); /* monster strengths */ objects_init(); -#ifdef WIZARD if (wizard) add_debug_extended_commands(); -#endif /* if a save file created in normal mode is now being restored in explore mode, treat it as normal restore followed by 'X' command @@ -384,10 +382,8 @@ boolean resuming; continue; } -#ifdef WIZARD if (iflags.sanity_check) sanity_check(); -#endif #ifdef CLIPPING /* just before rhack */ @@ -525,9 +521,7 @@ newgame() mklev(); u_on_upstairs(); -#ifdef WIZARD if (wizard) obj_delivery(FALSE); /* finish wizkit */ -#endif vision_reset(); /* set up internals for level (after mklev) */ check_special_room(FALSE); diff --git a/src/attrib.c b/src/attrib.c index fbac9949a..b2d5738b8 100644 --- a/src/attrib.c +++ b/src/attrib.c @@ -698,7 +698,6 @@ int propidx; /* special cases can have negative values */ /* * Restrict the source of the attributes just to debug mode for now */ -#ifdef WIZARD if (wizard) { static NEARDATA const char because_of[] = " because of %s"; @@ -745,7 +744,6 @@ int propidx; /* special cases can have negative values */ } } /*wizard*/ -#endif return buf; } diff --git a/src/bones.c b/src/bones.c index 8a36ea11d..5607355ee 100644 --- a/src/bones.c +++ b/src/bones.c @@ -312,10 +312,7 @@ can_make_bones() if(depth(&u.uz) <= 0 || /* bulletproofing for endgame */ (!rn2(1 + (depth(&u.uz)>>2)) /* fewer ghosts on low levels */ -#ifdef WIZARD - && !wizard -#endif - )) return FALSE; + && !wizard)) return FALSE; /* don't let multiple restarts generate multiple copies of objects * in bones files */ if (discover) return FALSE; @@ -344,23 +341,19 @@ struct obj *corpse; fd = open_bonesfile(&u.uz, &bonesid); if (fd >= 0) { (void) close(fd); -#ifdef WIZARD if (wizard) { if (yn("Bones file already exists. Replace it?") == 'y') { if (delete_bonesfile(&u.uz)) goto make_bones; else pline("Cannot unlink old bones."); } } -#endif /* compression can change the file's name, so must wait until after any attempt to delete this file */ compress_bonesfile(); return; } -#ifdef WIZARD make_bones: -#endif unleash_all(); /* in case these characters are not in their home bases */ for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) { @@ -488,10 +481,8 @@ struct obj *corpse; fd = create_bonesfile(&u.uz, &bonesid, whynot); if(fd < 0) { -#ifdef WIZARD if(wizard) pline1(whynot); -#endif /* bones file creation problems are silent to the player. * Keep it that way, but place a clue into the paniclog. */ @@ -520,10 +511,8 @@ struct obj *corpse; savefruitchn(fd, COUNT_SAVE); bflush(fd); if (bytes_counted > freediskspace(bones)) { /* not enough room */ -# ifdef WIZARD if (wizard) pline("Insufficient space to create bones file."); -# endif (void) close(fd); cancel_bonesfile(); return; @@ -556,23 +545,18 @@ getbones() /* wizard check added by GAN 02/05/87 */ if(rn2(3) /* only once in three times do we find bones */ -#ifdef WIZARD && !wizard -#endif ) return(0); if(no_bones_level(&u.uz)) return(0); fd = open_bonesfile(&u.uz, &bonesid); if (fd < 0) return(0); if (validate(fd, bones) != 0) { -#ifdef WIZARD if (!wizard) -#endif pline("Discarding unuseable bones; no need to panic..."); ok = FALSE; } else { ok = TRUE; -#ifdef WIZARD if(wizard) { if(yn("Get bones?") == 'n') { (void) close(fd); @@ -580,7 +564,6 @@ getbones() return(0); } } -#endif mread(fd, (genericptr_t) &c, sizeof c); /* length incl. '\0' */ mread(fd, (genericptr_t) oldbonesid, (unsigned) c); /* DD.nnn */ if (strcmp(bonesid, oldbonesid) != 0) { @@ -588,12 +571,10 @@ getbones() Sprintf(errbuf, "This is bones level '%s', not '%s'!", oldbonesid, bonesid); -#ifdef WIZARD if (wizard) { pline1(errbuf); ok = FALSE; /* won't die of trickery */ } -#endif trickery(errbuf); } else { register struct monst *mtmp; @@ -610,7 +591,7 @@ getbones() for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) { if (has_mname(mtmp)) sanitize_name(MNAME(mtmp)); if (mtmp->mhpmax == DEFUNCT_MONSTER) { -#if defined(DEBUG) && defined(WIZARD) +#if defined(DEBUG) if (wizard) pline("Removing defunct monster %s from bones.", mtmp->data->mname); @@ -627,14 +608,12 @@ getbones() (void) close(fd); sanitize_engravings(); -#ifdef WIZARD if(wizard) { if(yn("Unlink bones?") == 'n') { compress_bonesfile(); return(ok); } } -#endif if (!delete_bonesfile(&u.uz)) { /* When N games try to simultaneously restore the same * bones file, N-1 of them will fail to delete it diff --git a/src/cmd.c b/src/cmd.c index 00e139001..f07abb78c 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -126,7 +126,6 @@ STATIC_PTR int NDECL(domonability); STATIC_PTR int NDECL(dooverview_or_wiz_where); STATIC_PTR int NDECL(dotravel); STATIC_PTR int NDECL(doterrain); -# ifdef WIZARD STATIC_PTR int NDECL(wiz_wish); STATIC_PTR int NDECL(wiz_identify); STATIC_PTR int NDECL(wiz_map); @@ -164,7 +163,6 @@ STATIC_DCL int NDECL(wiz_port_debug); # endif STATIC_PTR int NDECL(wiz_rumor_check); STATIC_DCL char FDECL(cmd_from_func, (int NDECL((*)))); -# endif /* WIZARD */ STATIC_PTR int NDECL(doattributes); STATIC_PTR int NDECL(doconduct); /**/ @@ -514,9 +512,7 @@ int enter_explore_mode(VOID_ARGS) { if (wizard) { -#ifdef WIZARD You("are in debug mode."); -#endif } else if (discover) { You("are already in explore mode."); } else { @@ -538,16 +534,11 @@ enter_explore_mode(VOID_ARGS) STATIC_PTR int dooverview_or_wiz_where(VOID_ARGS) { -#ifdef WIZARD if (wizard) return wiz_where(); - else -#endif - dooverview(); + else dooverview(); return 0; } -#ifdef WIZARD - /* ^W command - wish for something */ STATIC_PTR int wiz_wish(VOID_ARGS) /* Unlimited wishes for debug mode by Paul Polderman */ @@ -1063,7 +1054,6 @@ wiz_rumor_check(VOID_ARGS) rumor_check(); return 0; } -#endif /* WIZARD */ /* #terrain command */ STATIC_PTR int @@ -1091,7 +1081,6 @@ doterrain(VOID_ARGS) add_menu(men, NO_GLYPH, &any, 0, 0, ATR_NONE, "full map without monsters, objects, and traps", MENU_UNSELECTED); -#ifdef WIZARD if (wizard) { any.a_int = 3; add_menu(men, NO_GLYPH, &any, 0, 0, ATR_NONE, @@ -1102,7 +1091,6 @@ doterrain(VOID_ARGS) "legend of base-36 levl[][].typ codes", MENU_UNSELECTED); } -#endif end_menu(men, "View which?"); n = select_menu(men, PICK_ONE, &sel); @@ -1121,10 +1109,8 @@ doterrain(VOID_ARGS) switch (which) { case 1: reveal_terrain(FALSE); break; /* known map */ case 2: reveal_terrain(TRUE); break; /* full map */ -#ifdef WIZARD case 3: wiz_map_levltyp(); break; /* map internals */ case 4: wiz_levltyp_legend(); break; /* internal details */ -#endif default: break; } return 0; /* no time elapses */ @@ -1584,9 +1570,7 @@ int final; you_are("buried", ""); } else { Strcpy(buf, "being strangled"); -#ifdef WIZARD if (wizard) Sprintf(eos(buf), " (%ld)", (Strangled & TIMEOUT)); -#endif you_are(buf, from_what(STRANGLED)); } } @@ -1639,9 +1623,7 @@ int final; } /* (u.utrap) */ if (u.uswallow) { Sprintf(buf, "swallowed by %s", a_monnam(u.ustuck)); -#ifdef WIZARD if (wizard) Sprintf(eos(buf), " (%u)", u.uswldtim); -#endif you_are(buf, ""); } else if (u.ustuck) { Sprintf(buf, "%s %s", @@ -1662,13 +1644,11 @@ int final; /* when mounted, Wounded_legs applies to steed rather than to hero; we only report steed's wounded legs in wizard mode */ if (u.usteed) { /* not `Riding' here */ -# ifdef WIZARD if (wizard) { Strcpy(buf, steedname); *buf = highc(*buf); enl_msg(buf, " has", " had", " wounded legs", ""); } -# endif } else { Sprintf(buf, "wounded %s", makeplural(body_part(LEG))); you_have(buf, ""); @@ -1685,9 +1665,7 @@ int final; if (Sleepy) { if (magic || cause_known(SLEEPY)) { Strcpy(buf, from_what(SLEEPY)); -#ifdef WIZARD if (wizard) Sprintf(eos(buf), " (%ld)", (HSleepy & TIMEOUT)); -#endif enl_msg("You ", "fall", "fell", " asleep uncontrollably", buf); } } @@ -1788,12 +1766,10 @@ int final; else if (u.ualign.record >= -3) you_have("strayed",""); else if (u.ualign.record >= -8) you_have("sinned",""); else you_have("transgressed",""); -#ifdef WIZARD if (wizard) { Sprintf(buf, " %d", u.ualign.record); enl_msg("Your alignment ", "is", "was", buf, ""); } -#endif /*** Resistances to troubles ***/ if (Invulnerable) you_are("invulnerable",from_what(INVULNERABLE)); @@ -1977,9 +1953,7 @@ int final; if (Upolyd) { if (u.umonnum == u.ulycn) Strcpy(buf, "in beast form"); else Sprintf(buf, "polymorphed into %s", an(youmonst.data->mname)); -#ifdef WIZARD if (wizard) Sprintf(eos(buf), " (%d)", u.mtimedone); -#endif you_are(buf,""); if (lays_eggs(youmonst.data) && flags.female) you_can("lay eggs", ""); @@ -2000,14 +1974,9 @@ int final; Sprintf(buf, "%s%slucky", ltmp >= 10 ? "extremely " : ltmp >= 5 ? "very " : "", Luck < 0 ? "un" : ""); -#ifdef WIZARD if (wizard) Sprintf(eos(buf), " (%d)", Luck); -#endif you_are(buf,""); - } -#ifdef WIZARD - else if (wizard) enl_msg("Your luck ", "is", "was", " zero",""); -#endif + } else if (wizard) enl_msg("Your luck ", "is", "was", " zero",""); if (u.moreluck > 0) you_have("extra luck",""); else if (u.moreluck < 0) you_have("reduced luck",""); if (carrying(LUCKSTONE) || stone_luck(TRUE)) { @@ -2021,9 +1990,7 @@ int final; if (u.ugangr) { Sprintf(buf, " %sangry with you", u.ugangr > 6 ? "extremely " : u.ugangr > 3 ? "very " : ""); -#ifdef WIZARD if (wizard) Sprintf(eos(buf), " (%d)", u.ugangr); -#endif enl_msg(u_gname(), " is", " was", buf,""); } else /* @@ -2039,9 +2006,7 @@ int final; #else Sprintf(buf, "%ssafely pray", can_pray(FALSE) ? "" : "not "); #endif -#ifdef WIZARD if (wizard) Sprintf(eos(buf), " (%d)", u.ublesscnt); -#endif you_can(buf,""); } if (wizard) { @@ -2301,25 +2266,21 @@ int final; if (!u.uconduct.weaphit) you_have_never("hit with a wielded weapon"); -#ifdef WIZARD else if (wizard) { Sprintf(buf, "used a wielded weapon %ld time%s", u.uconduct.weaphit, plur(u.uconduct.weaphit)); you_have_X(buf); } -#endif if (!u.uconduct.killer) you_have_been("a pacifist"); if (!u.uconduct.literate) you_have_been("illiterate"); -#ifdef WIZARD else if (wizard) { Sprintf(buf, "read items or engraved %ld time%s", u.uconduct.literate, plur(u.uconduct.literate)); you_have_X(buf); } -#endif ngenocided = num_genocides(); if (ngenocided == 0) { @@ -2332,23 +2293,19 @@ int final; if (!u.uconduct.polypiles) you_have_never("polymorphed an object"); -#ifdef WIZARD else if (wizard) { Sprintf(buf, "polymorphed %ld item%s", u.uconduct.polypiles, plur(u.uconduct.polypiles)); you_have_X(buf); } -#endif if (!u.uconduct.polyselfs) you_have_never("changed form"); -#ifdef WIZARD else if (wizard) { Sprintf(buf, "changed form %ld time%s", u.uconduct.polyselfs, plur(u.uconduct.polyselfs)); you_have_X(buf); } -#endif if (!u.uconduct.wishes) you_have_X("used no wishes"); @@ -2381,22 +2338,18 @@ int final; static const struct func_tab cmdlist[] = { {C('d'), FALSE, dokick}, /* "D" is for door!...? Msg is in dokick.c */ -#ifdef WIZARD {C('e'), TRUE, wiz_detect}, {C('f'), TRUE, wiz_map}, {C('g'), TRUE, wiz_genesis}, {C('i'), TRUE, wiz_identify}, -#endif {C('l'), TRUE, doredraw}, /* if number_pad is set */ {C('n'), TRUE, donamelevel}, /* if number_pad is set */ {C('o'), TRUE, dooverview_or_wiz_where}, /* depending on wizard status */ {C('p'), TRUE, doprev_message}, {C('r'), TRUE, doredraw}, {C('t'), TRUE, dotele}, -#ifdef WIZARD {C('v'), TRUE, wiz_level_tele}, {C('w'), TRUE, wiz_wish}, -#endif {C('x'), TRUE, doattributes}, {C('z'), TRUE, dosuspend_core}, {'a', FALSE, doapply}, @@ -2532,7 +2485,6 @@ struct ext_func_tab extcmdlist[] = { doextversion, TRUE}, {"wipe", "wipe off your face", dowipe, FALSE}, {"?", "get this list of extended commands", doextlist, TRUE}, -#if defined(WIZARD) /* * There must be a blank entry here for every entry in the table * below. @@ -2559,11 +2511,9 @@ struct ext_func_tab extcmdlist[] = { #endif {(char *)0, (char *)0, donull, TRUE}, /* wizrumorcheck */ {(char *)0, (char *)0, donull, TRUE}, /* wmode */ -#endif {(char *)0, (char *)0, donull, TRUE} /* sentinel */ }; -#ifdef WIZARD /* there must be a placeholder in the table above for every entry here */ static const struct ext_func_tab debug_extcmdlist[] = { {"levelchange", "change experience level", wiz_level_change, TRUE}, @@ -2882,8 +2832,6 @@ wiz_migrate_mons() } #endif -#endif /* WIZARD */ - #define unctrl(c) ((c) <= C('z') ? (0x60 | (c)) : (c)) #define unmeta(c) (0x7f & (c)) @@ -3371,11 +3319,7 @@ const char *msg; sym = highc(sym); ctrl = (sym - 'A') + 1; if ((explain = dowhatdoes_core(ctrl, buf2)) - && (!index(wiz_only_list, sym) -#ifdef WIZARD - || wizard -#endif - )) { + && (!index(wiz_only_list, sym) || wizard)) { Sprintf(buf, "Are you trying to use ^%c%s?", sym, index(wiz_only_list, sym) ? "" : " as specified in the Guidebook"); diff --git a/src/do.c b/src/do.c index 4e5876e6b..c225000ef 100644 --- a/src/do.c +++ b/src/do.c @@ -1029,9 +1029,7 @@ boolean at_stairs, falling, portal; newlevel->dlevel = dunlevs_in_dungeon(newlevel); if (newdungeon && In_endgame(newlevel)) { /* 1st Endgame Level !!! */ if (!u.uhave.amulet) return; /* must have the Amulet */ -#ifdef WIZARD if (!wizard) /* wizard ^V can bypass Earth level */ -#endif assign_level(newlevel, &earth_level); /* (redundant) */ } new_ledger = ledger_no(newlevel); @@ -1297,12 +1295,10 @@ boolean at_stairs, falling, portal; mnexto(mtmp); if ((mtmp = m_at(u.ux, u.uy)) != 0) { -#ifdef WIZARD /* there was an unconditional impossible("mnearto failed") here, but it's not impossible and we're prepared to cope with the situation, so only say something when debugging */ if (wizard) pline("(monster in hero's way)"); -#endif if (!rloc(mtmp, TRUE)) /* no room to move it; send it away, to return later */ migrate_to_level(mtmp, ledger_no(&u.uz), diff --git a/src/dungeon.c b/src/dungeon.c index ed186796b..ed6b726de 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -50,14 +50,12 @@ STATIC_DCL void FDECL(init_level, (int,int,struct proto_dungeon *)); STATIC_DCL int FDECL(possible_places, (int, boolean *, struct proto_dungeon *)); STATIC_DCL xchar FDECL(pick_level, (boolean *, int)); STATIC_DCL boolean FDECL(place_level, (int, struct proto_dungeon *)); -#ifdef WIZARD STATIC_DCL boolean FDECL(unplaced_floater, (struct dungeon *)); STATIC_DCL boolean FDECL(unreachable_level, (d_level *,BOOLEAN_P)); STATIC_DCL void FDECL(tport_menu, (winid,char *,struct lchoice *, d_level *,BOOLEAN_P)); STATIC_DCL const char *FDECL(br_string, (int)); STATIC_DCL void FDECL(print_branch, (winid, int, int, int, BOOLEAN_P, struct lchoice *)); -#endif mapseen *mapseenchn = (struct mapseen *)0; STATIC_DCL mapseen *FDECL(load_mapseen, (int)); @@ -521,10 +519,7 @@ init_level(dgn, proto_index, pd) struct tmplevel *tlevel = &pd->tmplevel[proto_index]; pd->final_lev[proto_index] = (s_level *) 0; /* no "real" level */ -#ifdef WIZARD - if (!wizard) -#endif - if (tlevel->chance <= rn2(100)) return; + if (!wizard && tlevel->chance <= rn2(100)) return; pd->final_lev[proto_index] = new_level = (s_level *) alloc(sizeof(s_level)); @@ -742,10 +737,8 @@ init_dungeons() /* initialize the "dungeon" structs */ for (i = 0; i < n_dgns; i++) { Fread((genericptr_t)&pd.tmpdungeon[i], sizeof(struct tmpdungeon), 1, dgn_file); -#ifdef WIZARD - if(!wizard) -#endif - if(pd.tmpdungeon[i].chance && (pd.tmpdungeon[i].chance <= rn2(100))) { + if(!wizard && pd.tmpdungeon[i].chance + && (pd.tmpdungeon[i].chance <= rn2(100))) { int j; /* skip over any levels or branches */ @@ -1542,9 +1535,7 @@ const char *nam; (u.uz.dnum == medusa_level.dnum && dlev.dnum == valley_level.dnum)) && ( /* either wizard mode or else seen and not forgotten */ -#ifdef WIZARD wizard || -#endif (level_info[idx].flags & (FORGOTTEN|VISITED)) == VISITED)) { lev = depth(&slev->dlevel); } @@ -1558,9 +1549,7 @@ const char *nam; idxtoo = (idx >> 8) & 0x00FF; idx &= 0x00FF; if ( /* either wizard mode, or else _both_ sides of branch seen */ -#ifdef WIZARD wizard || -#endif ((level_info[idx].flags & (FORGOTTEN|VISITED)) == VISITED && (level_info[idxtoo].flags & (FORGOTTEN|VISITED)) == VISITED)) { if (ledger_to_dnum(idxtoo) == u.uz.dnum) idx = idxtoo; @@ -1573,8 +1562,6 @@ const char *nam; return lev; } -#ifdef WIZARD - STATIC_OVL boolean unplaced_floater(dptr) struct dungeon *dptr; @@ -1821,7 +1808,6 @@ xchar *rdgn; destroy_nhwindow(win); return 0; } -#endif /* WIZARD */ /* Record that the player knows about a branch from a level. This function * will determine whether or not it was a "real" branch that was taken. @@ -2560,7 +2546,6 @@ boolean printdun; */ Sprintf(buf, "%sLevel %d:", TAB, i); -#ifdef WIZARD /* wizmode prints out proto dungeon names for clarity */ if (wizard) { s_level *slev; @@ -2568,7 +2553,6 @@ boolean printdun; if ((slev = Is_special(&mptr->lev)) != 0) Sprintf(eos(buf), " [%s]", slev->proto); } -#endif /* [perhaps print custom annotation on its own line when it's long] */ if (mptr->custom) Sprintf(eos(buf), " (%s)", mptr->custom); diff --git a/src/eat.c b/src/eat.c index 37561967b..196fb9e49 100644 --- a/src/eat.c +++ b/src/eat.c @@ -8,11 +8,7 @@ /* #define DEBUG */ /* uncomment to enable new eat code debugging */ #ifdef DEBUG -# ifdef WIZARD #define debugpline if (wizard) pline -# else -#define debugpline pline -# endif #endif STATIC_PTR int NDECL(eatmdone); diff --git a/src/end.c b/src/end.c index 66d164143..c9fe47cb2 100644 --- a/src/end.c +++ b/src/end.c @@ -323,7 +323,7 @@ done2() } return 0; } -#if defined(WIZARD) && (defined(UNIX) || defined(VMS) || defined(LATTICE)) +#if (defined(UNIX) || defined(VMS) || defined(LATTICE)) if(wizard) { int c; # ifdef VMS @@ -510,7 +510,7 @@ panic VA_DECL(const char *, str) !program_state.something_worth_saving ? "Program initialization has failed." : "Suddenly, the dungeon collapses."); -#if defined(WIZARD) && !defined(MICRO) +#ifndef MICRO # if defined(NOTIFY_NETHACK_BUGS) if (!wizard) raw_printf("Report the following error to \"%s\" or at \"%s\".", @@ -531,11 +531,7 @@ panic VA_DECL(const char *, str) free(tmp); } else raw_printf("Report error to \"%s\"%s.", -# ifdef WIZARD_NAME /*(KR1ED)*/ WIZARD_NAME, -# else - WIZARD, -# endif !program_state.something_worth_saving ? "" : " and it may be possible to rebuild."); } @@ -560,7 +556,7 @@ panic VA_DECL(const char *, str) #ifdef WIN32 interject(INTERJECT_PANIC); #endif -#if defined(WIZARD) && (defined(UNIX) || defined(VMS) || defined(LATTICE) || defined(WIN32)) +#if defined(UNIX) || defined(VMS) || defined(LATTICE) || defined(WIN32) if (wizard) NH_abort(); /* generate core dump */ #endif @@ -846,12 +842,10 @@ int how; paniclog("trickery", killer.name); killer.name[0] = 0; } -#ifdef WIZARD if (wizard) { You("are a very tricky wizard, it seems."); return; } -#endif } /* pbuf: holds Sprintf'd output for raw_print and putstr @@ -885,11 +879,7 @@ int how; return; } } - if (( -#ifdef WIZARD - wizard || -#endif - discover) && (how <= GENOCIDED)) { + if ((wizard || discover) && (how <= GENOCIDED)) { if (paranoid_query(ParanoidDie, "Die?")) goto die; pline("OK, so you don't %s.", (how == CHOKING) ? "choke" : "die"); @@ -1047,9 +1037,7 @@ die: } if (bones_ok) { -#ifdef WIZARD if (!wizard || paranoid_query(ParanoidBones, "Save bones?")) -#endif savebones(how, endtime, corpse); /* corpse may be invalid pointer now so ensure that it isn't used again */ diff --git a/src/engrave.c b/src/engrave.c index 8ba7217ba..ebfcd0829 100644 --- a/src/engrave.c +++ b/src/engrave.c @@ -836,12 +836,10 @@ doengrave() break; case VENOM_CLASS: -#ifdef WIZARD if (wizard) { pline("Writing a poison pen letter??"); break; } -#endif case ILLOBJ_CLASS: impossible("You're engraving with an illegal object!"); break; diff --git a/src/exper.c b/src/exper.c index 568b19e88..5b1d73927 100644 --- a/src/exper.c +++ b/src/exper.c @@ -171,13 +171,11 @@ const char *drainer; /* cause of death, if drain should be fatal */ { register int num; -#ifdef WIZARD /* override life-drain resistance when handling an explicit wizard mode request to reduce level; never fatal though */ if (drainer && !strcmp(drainer, "#levelchange")) drainer = 0; else -#endif if (resists_drli(&youmonst)) return; if (u.ulevel > 1) { diff --git a/src/files.c b/src/files.c index f667b8093..03b4d5ea3 100644 --- a/src/files.c +++ b/src/files.c @@ -124,12 +124,10 @@ boolean nethack_thinks_it_is_open; /* Does NetHack think it's open? */ # endif #endif /*HOLD_LOCKFILE_OPEN*/ -#ifdef WIZARD #define WIZKIT_MAX 128 static char wizkit[WIZKIT_MAX]; STATIC_DCL FILE *NDECL(fopen_wizkit_file); STATIC_DCL void FDECL(wizkit_addinv, (struct obj *)); -#endif #ifdef AMIGA extern char PATH[]; /* see sys/amiga/amidos.c */ @@ -790,10 +788,8 @@ d_level *lev; #else ret = rename(tempname, fq_bones); #endif -#ifdef WIZARD if (wizard && ret != 0) pline("couldn't rename %s to %s.", tempname, fq_bones); -#endif } @@ -899,7 +895,7 @@ int fd; #endif -#if defined(WIZARD) && !defined(MICRO) +#ifndef MICRO /* change pre-existing savefile name to indicate an error savefile */ void set_error_savefile() @@ -1298,9 +1294,7 @@ boolean uncomp; (void) signal(SIGQUIT, SIG_IGN); (void) wait((int *)&i); (void) signal(SIGINT, (SIG_RET_TYPE) done1); -# ifdef WIZARD if (wizard) (void) signal(SIGQUIT, SIG_DFL); -# endif #else /* I don't think we can really cope with external compression * without signals, so we'll declare that compress failed and @@ -2246,10 +2240,8 @@ int src; #ifdef LOADSYMSETS switch_symbols(TRUE); #endif -#ifdef WIZARD } else if (match_varname(buf, "WIZKIT", 6)) { (void) strncpy(wizkit, bufp, WIZKIT_MAX-1); -#endif #ifdef AMIGA } else if (match_varname(buf, "FONT", 4)) { char *t; @@ -2435,7 +2427,6 @@ OR: Forbid multiline stuff for alternate config sources. return rv; } -#ifdef WIZARD STATIC_OVL FILE * fopen_wizkit_file() { @@ -2569,8 +2560,6 @@ read_wizkit() return; } -#endif /*WIZARD*/ - #ifdef LOADSYMSETS extern struct symsetentry *symset_list; /* options.c */ extern struct symparse loadsyms[]; /* drawing.c */ diff --git a/src/fountain.c b/src/fountain.c index c49efac69..764ffb5a3 100644 --- a/src/fountain.c +++ b/src/fountain.c @@ -182,12 +182,10 @@ boolean isyou; if(!mtmp) pline_The("flow reduces to a trickle."); return; } -#ifdef WIZARD if (isyou && wizard) { if (yn("Dry up fountain?") == 'n') return; } -#endif /* replace the fountain with ordinary floor */ levl[x][y].typ = ROOM; levl[x][y].looted = 0; diff --git a/src/invent.c b/src/invent.c index 189b63ea9..5778135d9 100644 --- a/src/invent.c +++ b/src/invent.c @@ -33,7 +33,6 @@ STATIC_DCL char FDECL(obj_to_let,(struct obj *)); static int lastinvnr = 51; /* 0 ... 51 (never saved&restored) */ -#ifdef WIZARD /* wizards can wish for venom, which will become an invisible inventory * item without this. putting it in inv_order would mean venom would * suddenly become a choice for all the inventory-class commands, which @@ -42,7 +41,6 @@ static int lastinvnr = 51; /* 0 ... 51 (never saved&restored) */ * around on a bones level for normal players to find. */ static char venom_inv[] = { VENOM_CLASS, 0 }; /* (constant) */ -#endif void assigninvlet(otmp) @@ -1916,7 +1914,6 @@ long* out_cnt; } start_menu(win); -#ifdef WIZARD if (wizard && iflags.override_ID) { char prompt[BUFSZ]; any.a_char = -1; @@ -1927,7 +1924,6 @@ long* out_cnt; add_menu(win, NO_GLYPH, &any,' ', iflags.override_ID, ATR_NONE, prompt, MENU_UNSELECTED); } -#endif nextclass: classcount = 0; any = zeroany; /* set all bits to zero */ @@ -1950,12 +1946,10 @@ nextclass: } if (flags.sortpack) { if (*++invlet) goto nextclass; -#ifdef WIZARD if (--invlet != venom_inv) { invlet = venom_inv; goto nextclass; } -#endif } end_menu(win, (char *) 0); diff --git a/src/light.c b/src/light.c index 8d2b38ad4..244126021 100644 --- a/src/light.c +++ b/src/light.c @@ -633,8 +633,6 @@ struct obj *obj; return "strangely"; } -#ifdef WIZARD - int wiz_light_sources() { @@ -674,6 +672,4 @@ wiz_light_sources() return 0; } -#endif /* WIZARD */ - /*light.c*/ diff --git a/src/makemon.c b/src/makemon.c index 44fcb79a0..0f2d0c41c 100644 --- a/src/makemon.c +++ b/src/makemon.c @@ -779,7 +779,7 @@ boolean ghostly; mvitals[mndx].born++; if ((int) mvitals[mndx].born >= lim && !(mons[mndx].geno & G_NOGEN) && !(mvitals[mndx].mvflags & G_EXTINCT)) { -#if defined(DEBUG) && defined(WIZARD) +#ifdef DEBUG if (wizard) pline("Automatically extinguished %s.", makeplural(mons[mndx].mname)); #endif @@ -925,7 +925,7 @@ register int mmflags; /* if you are to make a specific monster and it has already been genocided, return */ if (mvitals[mndx].mvflags & G_GENOD) return((struct monst *) 0); -#if defined(WIZARD) && defined(DEBUG) +#ifdef DEBUG if (wizard && (mvitals[mndx].mvflags & G_EXTINCT)) pline("Explicitly creating extinct monster %s.", mons[mndx].mname); @@ -1186,12 +1186,9 @@ boolean neverask; int x, y; struct monst *mon; boolean known = FALSE; -#ifdef WIZARD boolean ask = (wizard && !neverask); -#endif while (cnt--) { -#ifdef WIZARD if (ask) { if (create_particular()) { known = TRUE; @@ -1199,7 +1196,6 @@ boolean neverask; } else ask = FALSE; /* ESC will shut off prompting */ } -#endif x = u.ux, y = u.uy; /* if in water, try to encourage an aquatic monster by finding and then specifying another wet location */ diff --git a/src/mklev.c b/src/mklev.c index acb4daac4..43bccaf40 100644 --- a/src/mklev.c +++ b/src/mklev.c @@ -7,11 +7,7 @@ /* #define DEBUG */ /* uncomment to enable code debugging */ #ifdef DEBUG -# ifdef WIZARD #define debugpline if (wizard) pline -# else -#define debugpline pline -# endif #endif /* for UNIX, Rand #def'd to (long)lrand48() or (long)random() */ @@ -720,9 +716,7 @@ makelevel() { register int u_depth = depth(&u.uz); -#ifdef WIZARD if(wizard && nh_getenv("SHOPTYPE")) mkroom(SHOPBASE); else -#endif if (u_depth > 1 && u_depth < depth(&medusa_level) && nroom >= room_threshold && @@ -1561,11 +1555,7 @@ xchar x, y; } /* Already set or 2/3 chance of deferring until a later level. */ - if (source->dnum < n_dgns || (rn2(3) -#ifdef WIZARD - && !wizard -#endif - )) return; + if (source->dnum < n_dgns || (rn2(3) && !wizard)) return; if (! (u.uz.dnum == oracle_level.dnum /* in main dungeon */ && !at_dgn_entrance("The Quest") /* but not Quest's entry */ diff --git a/src/mkmaze.c b/src/mkmaze.c index ccd865db2..7f4536869 100644 --- a/src/mkmaze.c +++ b/src/mkmaze.c @@ -509,7 +509,6 @@ register const char *s; } else Strcpy(protofile, ""); -#ifdef WIZARD /* SPLEVTYPE format is "level-choice,level-choice"... */ if (wizard && *protofile && sp && sp->rndlevs) { char *ep = getenv("SPLEVTYPE"); /* not nh_getenv */ @@ -531,7 +530,6 @@ register const char *s; } } } -#endif if(*protofile) { Strcat(protofile, LEV_EXT); diff --git a/src/mkobj.c b/src/mkobj.c index 698018e9f..253fd1293 100644 --- a/src/mkobj.c +++ b/src/mkobj.c @@ -10,14 +10,12 @@ STATIC_DCL void FDECL(maybe_adjust_light, (struct obj *,int)); STATIC_DCL void FDECL(obj_timer_checks,(struct obj *, XCHAR_P, XCHAR_P, int)); STATIC_DCL void FDECL(container_weight, (struct obj *)); STATIC_DCL struct obj *FDECL(save_mtraits, (struct obj *, struct monst *)); -#ifdef WIZARD STATIC_DCL void FDECL(objlist_sanity, (struct obj *,int,const char *)); STATIC_DCL void FDECL(mon_obj_sanity, (struct monst *,const char *)); STATIC_DCL const char *FDECL(where_name, (struct obj *)); STATIC_DCL void FDECL(insane_object, (struct obj *,const char *,const char *,struct monst *)); STATIC_DCL void FDECL(check_contained, (struct obj *,const char *)); -#endif /*#define DEBUG_EFFECTS*/ /* show some messages for debugging */ @@ -1950,7 +1948,6 @@ boolean tipping; /* caller emptying entire contents; affects shop handling */ return objcount; } -#ifdef WIZARD /* support for wizard-mode's `sanity_check' option */ static const char NEARDATA /* pline formats for insane_object() */ @@ -2144,6 +2141,5 @@ check_contained(container, mesg) } } } -#endif /* WIZARD */ /*mkobj.c*/ diff --git a/src/mkroom.c b/src/mkroom.c index c8bcb2ed0..7f94076e7 100644 --- a/src/mkroom.c +++ b/src/mkroom.c @@ -67,7 +67,6 @@ mkshop() { register struct mkroom *sroom; int i = -1; -#ifdef WIZARD char *ep = (char *)0; /* (init == lint suppression) */ /* first determine shoptype */ @@ -129,7 +128,6 @@ mkshop() } #ifndef MAC gottype: -#endif #endif for(sroom = &rooms[0]; ; sroom++){ if(sroom->hx < 0) return; @@ -140,11 +138,8 @@ gottype: if(sroom->rtype != OROOM) continue; if(has_dnstairs(sroom) || has_upstairs(sroom)) continue; - if( -#ifdef WIZARD - (wizard && ep && sroom->doorct != 0) || -#endif - sroom->doorct == 1) break; + if( (wizard && ep && sroom->doorct != 0) || sroom->doorct == 1) + break; } if (!sroom->rlit) { int x, y; @@ -200,11 +195,7 @@ register boolean strict; continue; } else if(has_upstairs(sroom) || has_dnstairs(sroom)) continue; - if(sroom->doorct == 1 || !rn2(5) -#ifdef WIZARD - || wizard -#endif - ) + if(sroom->doorct == 1 || !rn2(5) || wizard) return sroom; } return (struct mkroom *)0; diff --git a/src/mon.c b/src/mon.c index 2befc3e5b..d65eb1cf9 100644 --- a/src/mon.c +++ b/src/mon.c @@ -23,9 +23,7 @@ STATIC_DCL void FDECL(dealloc_mextra, (struct mextra *)); STATIC_DCL int FDECL(pickvampshape, (struct monst *)); STATIC_DCL boolean FDECL(isspecmon, (struct monst *)); STATIC_DCL boolean FDECL(validspecmon, (struct monst *,int)); -#ifdef WIZARD STATIC_DCL boolean FDECL(validvamp, (struct monst *,int *,int)); -#endif STATIC_DCL struct permonst *FDECL(accept_newcham_form, (int)); #define LEVEL_SPECIFIC_NOCORPSE(mdat) \ @@ -2599,7 +2597,6 @@ int mndx; return TRUE; /* potential new form is ok */ } -#ifdef WIZARD /* prevent wizard mode user from specifying invalid vampshifter shape */ STATIC_OVL boolean validvamp(mon, mndx_p, monclass) @@ -2638,7 +2635,6 @@ int *mndx_p, monclass; } return (*mndx_p != NON_PM); } -#endif /*WIZARD*/ int select_newcham_form(mon) @@ -2689,7 +2685,6 @@ struct monst *mon; } break; } -#ifdef WIZARD /* for debugging: allow control of polymorphed monster */ if (wizard && iflags.mon_polycontrol) { char pprompt[BUFSZ], buf[BUFSZ]; @@ -2731,7 +2726,6 @@ struct monst *mon; if (is_vampshifter(mon) && !validvamp(mon, &mndx, monclass)) mndx = pickvampshape(mon); /* don't resort to arbitrary */ } -#endif /*WIZARD*/ /* if no form was specified above, pick one at random now */ if (mndx == NON_PM) { diff --git a/src/monmove.c b/src/monmove.c index dd7315346..490f7faa0 100644 --- a/src/monmove.c +++ b/src/monmove.c @@ -1462,9 +1462,7 @@ struct monst *mtmp; typ != LUMP_OF_ROYAL_JELLY && obj->oclass != AMULET_CLASS && obj->oclass != RING_CLASS && -#ifdef WIZARD obj->oclass != VENOM_CLASS && -#endif typ != SACK && typ != BAG_OF_HOLDING && typ != BAG_OF_TRICKS && !Is_candle(obj) && typ != OILSKIN_SACK && typ != LEASH && diff --git a/src/objnam.c b/src/objnam.c index 624ed92ff..824398123 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -1690,9 +1690,7 @@ static const char *const as_is[] = { "boots", "shoes", "gloves", "lenses", "scales", "gauntlets", -#ifdef WIZARD "iron bars", -#endif /* both singular and plural are spelled the same */ "deer", "fish", "tuna", "yaki", "-hai", "krill", "manes", "ninja", "sheep", "ronin", "roshi", "shito", "tengu", @@ -2188,9 +2186,7 @@ STATIC_OVL NEARDATA const struct o_range o_ranges[] = { { "dragon scale mail", ARMOR_CLASS, GRAY_DRAGON_SCALE_MAIL, YELLOW_DRAGON_SCALE_MAIL }, { "sword", WEAPON_CLASS, SHORT_SWORD, KATANA }, -#ifdef WIZARD { "venom", VENOM_CLASS, BLINDING_VENOM, ACID_VENOM }, -#endif { "gray stone", GEM_CLASS, LUCKSTONE, FLINT }, { "grey stone", GEM_CLASS, LUCKSTONE, FLINT }, }; @@ -2652,7 +2648,6 @@ struct obj *no_wish; } } -#ifdef WIZARD /* Wishing in wizard mode can create traps and furniture. * Part I: distinguish between trap and object for the two * types of traps which have corresponding objects: bear trap @@ -2692,7 +2687,6 @@ struct obj *no_wish; the object name and getting a disarmed trap object] */ } } -#endif retry: /* "grey stone" check must be before general "stone" */ @@ -2862,7 +2856,6 @@ srch: goto typfnd; } } -#ifdef WIZARD /* Let wizards wish for traps and furniture. * Must come after objects check so wizards can still wish for * trap objects like beartraps. @@ -2979,7 +2972,6 @@ wiztrap: return &zeroobj; } } -#endif /* WIZARD */ if(!oclass) return((struct obj *)0); any: @@ -3035,16 +3027,12 @@ typfnd: || typ == ROCK || is_missile(otmp))))) otmp->quan = (long) cnt; -#ifdef WIZARD if (oclass == VENOM_CLASS) otmp->spe = 1; -#endif if (spesgn == 0) { spe = otmp->spe; -#ifdef WIZARD } else if (wizard) { ; /* no alteration to spe */ -#endif } else if (oclass == ARMOR_CLASS || oclass == WEAPON_CLASS || is_weptool(otmp) || (oclass==RING_CLASS && objects[typ].oc_charged)) { diff --git a/src/options.c b/src/options.c index 8504a2c3e..9083ae63e 100644 --- a/src/options.c +++ b/src/options.c @@ -138,12 +138,8 @@ static struct Bool_Opt #else {"mail", (boolean *)0, TRUE, SET_IN_FILE}, #endif -#ifdef WIZARD /* for menu debugging only*/ {"menu_tab_sep", &iflags.menu_tab_sep, FALSE, SET_IN_GAME}, -#else - {"menu_tab_sep", (boolean *)0, FALSE, SET_IN_FILE}, -#endif {"mouse_support", &iflags.wc_mouse_support, TRUE, DISP_IN_GAME}, /*WC*/ #ifdef NEWS {"news", &iflags.news, TRUE, DISP_IN_GAME}, @@ -177,11 +173,7 @@ static struct Bool_Opt DISP_IN_GAME}, #endif {"safe_pet", &flags.safe_dog, TRUE, SET_IN_GAME}, -#ifdef WIZARD {"sanity_check", &iflags.sanity_check, FALSE, SET_IN_GAME}, -#else - {"sanity_check", (boolean *)0, FALSE, SET_IN_FILE}, -#endif {"selectsaved", &iflags.wc2_selectsaved, TRUE, DISP_IN_GAME}, /*WC*/ #ifdef EXP_ON_BOTL {"showexp", &flags.showexp, FALSE, SET_IN_GAME}, @@ -339,12 +331,7 @@ static struct Comp_Opt MAXOCLASSES, SET_IN_GAME }, { "pile_limit", "threshold for \"there are many objects here\"", 24, SET_IN_GAME }, - { "playmode", -#ifdef WIZARD - "normal play, non-scoring explore mode, or debug mode", -#else - "normal play or non-scoring explore mode", -#endif + { "playmode", "normal play, non-scoring explore mode, or debug mode", 8, DISP_IN_GAME }, { "player_selection", "choose character via dialog or prompts", 12, DISP_IN_GAME }, @@ -1112,17 +1099,9 @@ STATIC_VAR const struct paranoia_opts { { PARANOID_QUIT, "quit", 1, "explore", 1, "yes vs y to quit or to enter explore mode" }, { PARANOID_DIE, "die", 1, "death", 2, -#ifdef WIZARD "yes vs y to die (explore mode or debug mode)" }, -#else - "yes vs y to die (explore mode only)" }, -#endif { PARANOID_BONES, "bones", 1, 0, 0, -#ifdef WIZARD "yes vs y to save bones data when dying in debug mode" }, -#else - "(only applicable for debug mode)" }, -#endif { PARANOID_HIT, "attack", 1, "hit", 1, "yes vs y to attack a peaceful monster" }, { PARANOID_PRAY, "pray", 1, 0, 0, @@ -2045,12 +2024,7 @@ goodfruit: wizard = FALSE, discover = TRUE; } else if (!strncmpi(op, "debug", 5) || !strncmpi(op, "wizard", 6)) { -#ifdef WIZARD wizard = TRUE, discover = FALSE; -#else - raw_printf("\"%s\":%s -- debug mode not available.", - fullname, op); -#endif } else { raw_printf("Invalid value for \"%s\":%s.", fullname, op); } @@ -2868,10 +2842,8 @@ doset() ((boolopt[i].optflags == DISP_IN_GAME && pass == 0) || (boolopt[i].optflags == SET_IN_GAME && pass == 1))) { if (bool_p == &flags.female) continue; /* obsolete */ -#ifdef WIZARD if (bool_p == &iflags.sanity_check && !wizard) continue; if (bool_p == &iflags.menu_tab_sep && !wizard) continue; -#endif if (is_wc_option(boolopt[i].name) && !wc_supported(boolopt[i].name)) continue; if (is_wc2_option(boolopt[i].name) && @@ -4162,10 +4134,8 @@ option_help() /* Boolean options */ for (i = 0; boolopt[i].name; i++) { if (boolopt[i].addr) { -#ifdef WIZARD if (boolopt[i].addr == &iflags.sanity_check && !wizard) continue; if (boolopt[i].addr == &iflags.menu_tab_sep && !wizard) continue; -#endif next_opt(datawin, boolopt[i].name); } } @@ -4756,11 +4726,9 @@ void set_playmode() { if (wizard) { -#ifdef WIZARD if (authorize_wizard_mode()) Strcpy(plname, "wizard"); else -#endif wizard = FALSE; /* not allowed or not available */ /* force explore mode if we didn't make it into wizard mode */ discover = !wizard; diff --git a/src/pager.c b/src/pager.c index 69590754d..4d734e5ef 100644 --- a/src/pager.c +++ b/src/pager.c @@ -936,9 +936,7 @@ static const char *help_menu_items[] = { #else #define WIZHLP_SLOT 11 #endif -#ifdef WIZARD "List of wizard-mode commands.", -#endif "", (char *)0 }; @@ -957,10 +955,8 @@ help_menu(sel) any = zeroany; /* zero all bits */ start_menu(tmpwin); -#ifdef WIZARD if (!wizard) help_menu_items[WIZHLP_SLOT] = "", help_menu_items[WIZHLP_SLOT+1] = (char *)0; -#endif for (i = 0; help_menu_items[i]; i++) #ifdef PORT_HELP /* port-specific line has a %s in it for the PORT_ID */ @@ -1010,10 +1006,8 @@ dohelp() case PORT_HELP_ID: port_help(); break; #endif default: -#ifdef WIZARD /* handle slot 11 or 12 */ display_file(DEBUGHELP, TRUE); -#endif break; } } diff --git a/src/pline.c b/src/pline.c index 96b14d049..bd80a040f 100644 --- a/src/pline.c +++ b/src/pline.c @@ -50,9 +50,7 @@ pline VA_DECL(const char *, line) #ifdef HANGUPHANDLING if (program_state.done_hup) return; #endif -#ifdef WIZARD if (program_state.wizkit_wishing) return; -#endif if (index(line, '%')) { Vsprintf(pbuf,line,VA_ARGS); @@ -341,7 +339,6 @@ register struct monst *mtmp; info[0] = 0; if (mtmp->mtame) { Strcat(info, ", tame"); -#ifdef WIZARD if (wizard) { Sprintf(eos(info), " (%d", mtmp->mtame); if (!mtmp->isminion) @@ -349,7 +346,6 @@ register struct monst *mtmp; EDOG(mtmp)->hungrytime, EDOG(mtmp)->apport); Strcat(info, ")"); } -#endif } else if (mtmp->mpeaceful) Strcat(info, ", peaceful"); if (mtmp->cham >= LOW_PM && mtmp->data != &mons[mtmp->cham]) diff --git a/src/pray.c b/src/pray.c index 0e3730e20..a91782c72 100644 --- a/src/pray.c +++ b/src/pray.c @@ -1645,7 +1645,6 @@ dopray() /* set up p_type and p_alignment */ if (!can_pray(TRUE)) return 0; -#ifdef WIZARD if (wizard && p_type >= 0) { if (yn("Force the gods to be pleased?") == 'y') { u.ublesscnt = 0; @@ -1655,7 +1654,6 @@ dopray() if(p_type < 2) p_type = 3; } } -#endif nomul(-3); nomovemsg = "You finish your prayer."; afternmv = prayer_done; diff --git a/src/quest.c b/src/quest.c index 566d7f029..e6f8cbc83 100644 --- a/src/quest.c +++ b/src/quest.c @@ -129,7 +129,6 @@ boolean talk; int purity; aligntyp original_alignment = u.ualignbase[A_ORIGINAL]; -#ifdef WIZARD if (wizard && talk) { if (u.ualign.type != original_alignment) { You("are currently %s instead of %s.", @@ -143,7 +142,6 @@ boolean talk; u.ualign.record = MIN_QUEST_ALIGN; } } -#endif purity = (u.ualign.record >= MIN_QUEST_ALIGN && u.ualign.type == original_alignment && u.ualignbase[A_CURRENT] == original_alignment) ? 1 : diff --git a/src/questpgr.c b/src/questpgr.c index d06270c88..9f717754f 100644 --- a/src/questpgr.c +++ b/src/questpgr.c @@ -461,10 +461,8 @@ boolean skip_pager(common) boolean common; { -#ifdef WIZARD /* WIZKIT: suppress plot feedback if starting with quest artifact */ if (program_state.wizkit_wishing) return TRUE; -#endif if (!(common ? qt_list.common : qt_list.chrole)) { panic("%s: no %s quest text data available", common ? "com_pager" : "qt_pager", diff --git a/src/read.c b/src/read.c index 6e3147714..b60ffa66e 100644 --- a/src/read.c +++ b/src/read.c @@ -1687,7 +1687,6 @@ do_class_genocide() else if (immunecnt || class == S_invisible) You("aren't permitted to genocide such monsters."); else -#ifdef WIZARD /* to aid in topology testing; remove pesky monsters */ if (wizard && buf[0] == '*') { register struct monst *mtmp, *mtmp2; @@ -1701,7 +1700,6 @@ do_class_genocide() pline("Eliminated %d monster%s.", gonecnt, plur(gonecnt)); return; } else -#endif pline("That %s does not represent any monster.", strlen(buf) == 1 ? "symbol" : "response"); continue; @@ -2023,7 +2021,6 @@ struct obj *from_obj; return FALSE; } -#ifdef WIZARD /* * Make a new monster with the type controlled by the user. * @@ -2063,12 +2060,10 @@ create_particular() makehostile = TRUE; } /* decide whether a valid monster was chosen */ -#ifdef WIZARD if (wizard && (!strcmp(bufp, "*") || !strcmp(bufp, "random"))) { randmonst = TRUE; break; } -#endif which = name_to_mon(bufp); if (which >= LOW_PM) break; /* got one */ monclass = name_to_monclass(bufp, &which); @@ -2089,12 +2084,10 @@ create_particular() if (!randmonst) { firstchoice = which; if (cant_revive(&which, FALSE, (struct obj *)0)) { -#ifdef WIZARD /* intentionally redundant... */ /* wizard mode can override handling of special monsters */ Sprintf(buf, "Creating %s instead; force %s?", mons[which].mname, mons[firstchoice].mname); if (yn(buf) == 'y') which = firstchoice; -#endif } whichpm = &mons[which]; } @@ -2127,6 +2120,5 @@ create_particular() } return madeany; } -#endif /* WIZARD */ /*read.c*/ diff --git a/src/rect.c b/src/rect.c index be120c369..a3d6228c7 100644 --- a/src/rect.c +++ b/src/rect.c @@ -137,9 +137,7 @@ add_rect(r) NhRect *r; { if (rect_cnt >= MAXRECT) { -#ifdef WIZARD if (wizard) pline("MAXRECT may be too small."); -#endif return; } /* Check that this NhRect is not included in another one */ diff --git a/src/restore.c b/src/restore.c index 30af7762c..e888b4dcd 100644 --- a/src/restore.c +++ b/src/restore.c @@ -531,9 +531,7 @@ unsigned int *stuckid, *steedid; /* for wizard mode, issue a reminder; for others, treat it as an attempt to cheat and refuse to restore this file */ pline("Saved game was not yours."); -#ifdef WIZARD if (!wizard) -#endif return FALSE; } mread(fd, (genericptr_t) &context, sizeof(struct context_info)); @@ -1008,9 +1006,7 @@ boolean ghostly; hpid, pid); else Sprintf(trickbuf, "This is level %d, not %d!", dlvl, lev); -#ifdef WIZARD if (wizard) pline1(trickbuf); -#endif trickery(trickbuf); } restcemetery(fd, &level.bonesinfo); diff --git a/src/rumors.c b/src/rumors.c index e84418e2d..7df89e8f4 100644 --- a/src/rumors.c +++ b/src/rumors.c @@ -172,7 +172,6 @@ boolean exclude_cookie; return rumor_buf; } -#ifdef WIZARD /* * test that the true/false rumor boundaries are valid. */ @@ -266,7 +265,6 @@ rumor_check() true_rumor_size = -1; /* don't try to open it again */ } } -#endif void outrumor(truth, mechanism) diff --git a/src/save.c b/src/save.c index e66a5c9eb..dc0f94078 100644 --- a/src/save.c +++ b/src/save.c @@ -1391,12 +1391,10 @@ int lev; if (!swapout_oldest()) return FALSE; } -# ifdef WIZARD if (wizard) { pline("Swapping in `%s'.", from); wait_synch(); } -# endif copyfile(from, to); (void) unlink(from); level_info[lev].where = ACTIVE; @@ -1423,12 +1421,10 @@ swapout_oldest() { Sprintf(to, "%s%s", permbones, alllevels); set_levelfile_name(from, oldest); set_levelfile_name(to, oldest); -# ifdef WIZARD if (wizard) { pline("Swapping out `%s'.", from); wait_synch(); } -# endif copyfile(from, to); (void) unlink(from); level_info[oldest].where = SWAPPED; diff --git a/src/shknam.c b/src/shknam.c index ab2262bb4..77bdf2f3c 100644 --- a/src/shknam.c +++ b/src/shknam.c @@ -510,7 +510,6 @@ struct mkroom *sroom; else if(sy == sroom->hy+1) sy--; else { shk_failed: #ifdef DEBUG -# ifdef WIZARD /* Said to happen sometimes, but I have never seen it. */ /* Supposedly fixed by fdoor change in mklev.c */ if(wizard) { @@ -527,7 +526,6 @@ struct mkroom *sroom; } display_nhwindow(WIN_MESSAGE, FALSE); } -# endif #endif return(-1); } diff --git a/src/sp_lev.c b/src/sp_lev.c index 5ecf91aa1..f27637b9b 100644 --- a/src/sp_lev.c +++ b/src/sp_lev.c @@ -15,11 +15,7 @@ /* #define DEBUG */ /* uncomment to enable code debugging */ #ifdef DEBUG -# ifdef WIZARD #define debugpline if (wizard) pline -# else -#define debugpline pline -# endif #endif #include "sp_lev.h" diff --git a/src/steed.c b/src/steed.c index afd4579dc..a18b418b9 100644 --- a/src/steed.c +++ b/src/steed.c @@ -177,10 +177,8 @@ doride() if (u.usteed) { dismount_steed(DISMOUNT_BYCHOICE); } else if (getdir((char *)0) && isok(u.ux+u.dx, u.uy+u.dy)) { -#ifdef WIZARD if (wizard && yn("Force the mount to succeed?") == 'y') forcemount = TRUE; -#endif return (mount_steed(m_at(u.ux+u.dx, u.uy+u.dy), forcemount)); } else { return 0; @@ -225,11 +223,9 @@ mount_steed(mtmp, force) */ if (Wounded_legs) { Your("%s are in no shape for riding.", makeplural(body_part(LEG))); -#ifdef WIZARD if (force && wizard && yn("Heal your legs?") == 'y') HWounded_legs = EWounded_legs = 0; else -#endif return (FALSE); } diff --git a/src/sys.c b/src/sys.c index 4550f4ff5..2f6c5fd87 100644 --- a/src/sys.c +++ b/src/sys.c @@ -8,10 +8,6 @@ /* for KR1ED config, WIZARD is 0 or 1 and WIZARD_NAME is a string; for usual config, WIZARD is the string; forcing WIZARD_NAME to match it eliminates conditional testing for which one to use in string ops */ -#ifndef KR1ED -# undef WIZARD_NAME -# define WIZARD_NAME WIZARD -#endif struct sysopt sysopt; diff --git a/src/teleport.c b/src/teleport.c index 158bd752c..ab8bb063e 100644 --- a/src/teleport.c +++ b/src/teleport.c @@ -418,14 +418,10 @@ struct obj *scroll; /* Disable teleportation in stronghold && Vlad's Tower */ if (level.flags.noteleport) { -#ifdef WIZARD if (!wizard) { -#endif pline("A mysterious force prevents you from teleporting!"); return TRUE; -#ifdef WIZARD } -#endif } /* don't show trap if "Sorry..." */ @@ -433,15 +429,11 @@ struct obj *scroll; if ((u.uhave.amulet || On_W_tower_level(&u.uz)) && !rn2(3)) { You_feel("disoriented for a moment."); -#ifdef WIZARD if (wizard && yn("Override?") != 'y') -#endif return FALSE; } if ((Teleport_control && !Stunned) -#ifdef WIZARD || wizard -#endif ) { if (unconscious()) { pline("Being unconscious, you cannot control your teleport."); @@ -519,40 +511,29 @@ dotele() castit = TRUE; break; } -#ifdef WIZARD if (!wizard) { -#endif if (!castit) { if (!Teleportation) You("don't know that spell."); else You("are not able to teleport at will."); return(0); } -#ifdef WIZARD } -#endif } if (u.uhunger <= 100 || ACURR(A_STR) < 6) { -#ifdef WIZARD if (!wizard) { -#endif You("lack the strength %s.", castit ? "for a teleport spell" : "to teleport"); return 1; -#ifdef WIZARD } -#endif } energy = objects[SPE_TELEPORT_AWAY].oc_level * 7 / 2 - 2; if (u.uen <= energy) { -#ifdef WIZARD if (wizard) energy = u.uen; - else -#endif - { + else { You("lack the energy %s.", castit ? "for a teleport spell" : "to teleport"); return 1; @@ -567,10 +548,7 @@ dotele() exercise(A_WIS, TRUE); if (spelleffects(sp_no, TRUE)) return(1); - else -#ifdef WIZARD - if (!wizard) -#endif + else if (!wizard) return(0); } else { u.uen -= energy; @@ -601,29 +579,19 @@ level_tele() boolean force_dest = FALSE; if ((u.uhave.amulet || In_endgame(&u.uz) || In_sokoban(&u.uz)) -#ifdef WIZARD - && !wizard -#endif - ) { + && !wizard) { You_feel("very disoriented for a moment."); return; } - if ((Teleport_control && !Stunned) -#ifdef WIZARD - || wizard -#endif - ) { + if ((Teleport_control && !Stunned) || wizard) { char qbuf[BUFSZ]; int trycnt = 0; Strcpy(qbuf, "To what level do you want to teleport?"); do { if (++trycnt == 2) { -#ifdef WIZARD if (wizard) Strcat(qbuf, " [type a number or ? for a menu]"); - else -#endif - Strcat(qbuf, " [type a number]"); + else Strcat(qbuf, " [type a number]"); } getlin(qbuf, buf); if (!strcmp(buf,"\033")) { /* cancelled */ @@ -638,7 +606,6 @@ level_tele() pline("Oops..."); goto random_levtport; } -#ifdef WIZARD if (wizard && !strcmp(buf,"?")) { schar destlev = 0; xchar destdnum = 0; @@ -661,9 +628,7 @@ level_tele() } } force_dest = TRUE; - } else -#endif /*WIZARD*/ - if ((newlev = lev_by_name(buf)) == 0) newlev = atoi(buf); + } else if ((newlev = lev_by_name(buf)) == 0) newlev = atoi(buf); } while (!newlev && !digit(buf[0]) && (buf[0] != '-' || !digit(buf[1])) && trycnt < 10); @@ -721,7 +686,6 @@ level_tele() You1(shudder_for_moment); return; } -#ifdef WIZARD if (In_endgame(&u.uz)) { /* must already be wizard */ int llimit = dunlevs_in_dungeon(&u.uz); @@ -734,7 +698,6 @@ level_tele() schedule_goto(&newlevel, FALSE, FALSE, 0, (char *)0, (char *)0); return; } -#endif killer.name[0] = 0; /* still alive, so far... */ @@ -800,18 +763,13 @@ level_tele() } else if (u.uz.dnum == medusa_level.dnum && newlev >= dungeons[u.uz.dnum].depth_start + dunlevs_in_dungeon(&u.uz)) { -#ifdef WIZARD if (!(wizard && force_dest)) -#endif find_hell(&newlevel); } else { /* if invocation did not yet occur, teleporting into * the last level of Gehennom is forbidden. */ -#ifdef WIZARD - if (!wizard) -#endif - if (Inhell && !u.uevent.invoked && + if (!wizard && Inhell && !u.uevent.invoked && newlev >= (dungeons[u.uz.dnum].depth_start + dunlevs_in_dungeon(&u.uz) - 1)) { newlev = dungeons[u.uz.dnum].depth_start + @@ -825,9 +783,7 @@ level_tele() * we must translate newlev to a number relative to the * current dungeon. */ -#ifdef WIZARD if (!(wizard && force_dest)) -#endif get_level(&newlevel, newlev); } schedule_goto(&newlevel, FALSE, FALSE, 0, (char *)0, (char *)0); diff --git a/src/timeout.c b/src/timeout.c index 6e2b0f95e..481b16ae7 100644 --- a/src/timeout.c +++ b/src/timeout.c @@ -1336,10 +1336,8 @@ do_storms() * Check whether object has a timer of type timer_type. */ -#ifdef WIZARD STATIC_DCL const char *FDECL(kind_name, (SHORT_P)); STATIC_DCL void FDECL(print_queue, (winid, timer_element *)); -#endif STATIC_DCL void FDECL(insert_timer, (timer_element *)); STATIC_DCL timer_element *FDECL(remove_timer, (timer_element **, SHORT_P, ANY_P *)); @@ -1377,9 +1375,6 @@ static const ttable timeout_funcs[NUM_TIME_FUNCS] = { }; #undef TTAB - -#if defined(WIZARD) - STATIC_OVL const char * kind_name(kind) short kind; @@ -1460,9 +1455,6 @@ timer_sanity_check() } } -#endif /* WIZARD */ - - /* * Pick off timeout elements from the global queue and call their functions. * Do this until their time is less than or equal to the move count. diff --git a/src/u_init.c b/src/u_init.c index 16956b976..09930dd11 100644 --- a/src/u_init.c +++ b/src/u_init.c @@ -775,10 +775,8 @@ u_init() if (discover) ini_inv(Wishing); -#ifdef WIZARD if (wizard) read_wizkit(); -#endif #ifndef GOLDOBJ u.ugold0 += hidden_gold(); /* in case sack has gold in it */ diff --git a/src/weapon.c b/src/weapon.c index 796fba66a..746d1b5cd 100644 --- a/src/weapon.c +++ b/src/weapon.c @@ -821,9 +821,7 @@ boolean speedy; { return !P_RESTRICTED(skill) && P_SKILL(skill) < P_MAX_SKILL(skill) && ( -#ifdef WIZARD (wizard && speedy) || -#endif (P_ADVANCE(skill) >= (unsigned) practice_needed_to_advance(P_SKILL(skill)) && u.skills_advanced < P_SKILL_LIMIT @@ -896,10 +894,8 @@ enhance_weapon_skill() winid win; boolean speedy = FALSE; -#ifdef WIZARD if (wizard && yn("Advance skills without practice?") == 'y') speedy = TRUE; -#endif do { /* find longest available skill name, count those that can advance */ @@ -972,7 +968,6 @@ enhance_weapon_skill() prefix = (to_advance + eventually_advance + maxxed_cnt > 0) ? " " : ""; (void) skill_level_name(i, sklnambuf); -#ifdef WIZARD if (wizard) { if (!iflags.menu_tab_sep) Sprintf(buf, " %s%-*s %-12s %5d(%4d)", @@ -984,9 +979,7 @@ enhance_weapon_skill() prefix, P_NAME(i), sklnambuf, P_ADVANCE(i), practice_needed_to_advance(P_SKILL(i))); - } else -#endif - { + } else { if (!iflags.menu_tab_sep) Sprintf(buf, " %s %-*s [%s]", prefix, longest, P_NAME(i), sklnambuf); @@ -1001,11 +994,9 @@ enhance_weapon_skill() Strcpy(buf, (to_advance > 0) ? "Pick a skill to advance:" : "Current skills:"); -#ifdef WIZARD if (wizard && !speedy) Sprintf(eos(buf), " (%d slot%s available)", u.weapon_slots, plur(u.weapon_slots)); -#endif end_menu(win, buf); n = select_menu(win, to_advance ? PICK_ONE : PICK_NONE, &selected); destroy_nhwindow(win); diff --git a/sys/be/bemain.c b/sys/be/bemain.c index 6a3715a9a..e053718cf 100644 --- a/sys/be/bemain.c +++ b/sys/be/bemain.c @@ -161,10 +161,8 @@ static void process_options(int argc, char **argv) argc--; switch (argv[0][1]) { case 'D': -#ifdef WIZARD wizard = TRUE, discover = FALSE; break; -#endif /* otherwise fall thru to discover */ case 'X': discover = TRUE, wizard = FALSE; @@ -253,12 +251,8 @@ void getlock(void) boolean authorize_wizard_mode() { -#ifdef WIZARD /* other ports validate user name or character name here */ return TRUE; -#else - return FALSE; -#endif } #ifndef __begui__ diff --git a/sys/mac/macmain.c b/sys/mac/macmain.c index 644e8e58f..de48cd2f6 100644 --- a/sys/mac/macmain.c +++ b/sys/mac/macmain.c @@ -284,12 +284,8 @@ finder_file_request(void) boolean authorize_wizard_mode() { -#ifdef WIZARD /* other ports validate user name or character name here */ return TRUE; -#else - return FALSE; -#endif } /*macmain.c*/ diff --git a/sys/mac/macmenu.c b/sys/mac/macmenu.c index 651ab2242..b12bec9c9 100644 --- a/sys/mac/macmenu.c +++ b/sys/mac/macmenu.c @@ -619,9 +619,7 @@ void mac_askname () fatal("\pCannot create mode menu"); AppendMenu(askmenu[RSRC_ASK_MODE], "\pNormal"); AppendMenu(askmenu[RSRC_ASK_MODE], "\pExplore"); -#ifdef WIZARD AppendMenu(askmenu[RSRC_ASK_MODE], "\pDebug"); -#endif InsertMenu(askmenu[RSRC_ASK_MODE], hierMenu); currmode = 0; @@ -708,9 +706,7 @@ void mac_askname () /* Adjust the mode popup menu */ CheckMenuItem(askmenu[RSRC_ASK_MODE], 1, currmode == 0); CheckMenuItem(askmenu[RSRC_ASK_MODE], 2, currmode == 1); -#ifdef WIZARD CheckMenuItem(askmenu[RSRC_ASK_MODE], 3, currmode == 2); -#endif /* Wait for an action on an item */ ModalDialog(filter, &item); @@ -773,22 +769,17 @@ void mac_askname () DisposeUserItemUPP(redraw); /* Process the mode */ -#ifdef WIZARD - wizard = -#endif - discover = 0; + wizard = discover = 0; switch (currmode) { case 0: /* Normal */ break; case 1: /* Explore */ discover = 1; break; -#ifdef WIZARD case 2: /* Debug */ wizard = 1; - strcpy(plname, WIZARD); + strcpy(plname, WIZARD_NAME); break; -#endif default: /* Quit */ ExitToShell(); } @@ -935,7 +926,6 @@ AdjustMenus(short dimMenubar) if (newMenubar != mbarRegular) ; /* we've already found its state */ -#ifdef WIZARD else if (wizard) { newMenubar = mbarSpecial; @@ -947,7 +937,6 @@ AdjustMenus(short dimMenubar) SetMenuItemText(MHND_FILE, menuFilePlayMode, "\pDebug"); } } -#endif else if (discover) { diff --git a/sys/share/pcmain.c b/sys/share/pcmain.c index 0923f735f..55188619b 100644 --- a/sys/share/pcmain.c +++ b/sys/share/pcmain.c @@ -702,21 +702,11 @@ port_help() # endif /* MSDOS || WIN32 */ #endif /* PORT_HELP */ -/* for KR1ED config, WIZARD is 0 or 1 and WIZARD_NAME is a string; - for usual config, WIZARD is the string; forcing WIZARD_NAME to match it - eliminates conditional testing for which one to use in string ops */ -#ifndef KR1ED -# undef WIZARD_NAME -# define WIZARD_NAME WIZARD -#endif - /* validate wizard mode if player has requested access to it */ boolean authorize_wizard_mode() { -#ifdef WIZARD if (!strcmp(plname, WIZARD_NAME)) return TRUE; -#endif return FALSE; } diff --git a/sys/unix/unixmain.c b/sys/unix/unixmain.c index 8f743e2ad..f7cb9b26c 100644 --- a/sys/unix/unixmain.c +++ b/sys/unix/unixmain.c @@ -224,13 +224,10 @@ char *argv[]; or holds a generic user name like "player" or "games" */ plnamesuffix(); -#ifdef WIZARD if (wizard) { /* use character name rather than lock letter for file names */ locknum = 0; - } else -#endif - { + } else { /* suppress interrupts while processing lock file */ (void) signal(SIGQUIT,SIG_IGN); (void) signal(SIGINT,SIG_IGN); @@ -560,12 +557,10 @@ port_help() boolean authorize_wizard_mode() { -#ifdef WIZARD struct passwd *pw = get_unix_pw(); if (pw && sysopt.wizards && sysopt.wizards[0]) { if(check_user_string(sysopt.wizards)) return TRUE; } -#endif /* WIZARD */ wiz_error_flag = TRUE; /* not being allowed into wizard mode */ return FALSE; } @@ -574,16 +569,12 @@ static void wd_message() { if (wiz_error_flag) { -#ifdef WIZARD if (sysopt.wizards && sysopt.wizards[0]) { char *tmp = build_english_list(sysopt.wizards); pline("Only user%s %s may access debug (wizard) mode.", index(sysopt.wizards, ' ')?"s":"", tmp); free(tmp); } else -#else - pline("Debug mode is not available."); -#endif pline("Entering explore/discovery mode instead."); wizard = 0, discover = 1; /* (paranoia) */ } else if (discover) diff --git a/sys/unix/unixunix.c b/sys/unix/unixunix.c index a6d6d378b..202dd85de 100644 --- a/sys/unix/unixunix.c +++ b/sys/unix/unixunix.c @@ -311,9 +311,7 @@ int wt; #endif #ifndef NO_SIGNAL (void) signal(SIGINT, (SIG_RET_TYPE) done1); -# ifdef WIZARD if(wizard) (void) signal(SIGQUIT,SIG_DFL); -# endif #endif if(wt) { raw_print(""); diff --git a/sys/vms/vmsmain.c b/sys/vms/vmsmain.c index 52c181ade..a34224005 100644 --- a/sys/vms/vmsmain.c +++ b/sys/vms/vmsmain.c @@ -136,13 +136,10 @@ char *argv[]; or holds a generic user name like "player" or "games" */ plnamesuffix(); -#ifdef WIZARD if (wizard) { /* use character name rather than lock letter for file names */ locknum = 0; - } else -#endif - { + } else { /* suppress interrupts while processing lock file */ (void) signal(SIGQUIT, SIG_IGN); (void) signal(SIGINT, SIG_IGN); @@ -416,12 +413,10 @@ genericptr_t sigargs, mechargs; /* [0] is argc, [1..argc] are the real args */ || (condition >= SS$_ASTFLT && condition <= SS$_TBIT) || (condition >= SS$_ARTRES && condition <= SS$_INHCHME)) { program_state.done_hup = TRUE; /* pretend hangup has been attempted */ -# if defined(WIZARD) && !defined(BETA) +# ifndef BETA if (wizard) -# endif /*WIZARD && !BETA*/ -# if defined(WIZARD) || defined(BETA) +# endif /* !BETA */ abort(); /* enter the debugger */ -# endif /*WIZARD || BETA*/ } return SS$_RESIGNAL; } @@ -454,9 +449,7 @@ port_help() boolean authorize_wizard_mode() { -#ifdef WIZARD if (!strcmpi(nh_getenv("USER"), WIZARD_NAME)) return TRUE; -#endif wiz_error_flag = TRUE; /* not being allowed into wizard mode */ return FALSE; } @@ -465,12 +458,8 @@ static void wd_message() { if (wiz_error_flag) { -#ifdef WIZARD pline("Only user \"%s\" may access debug (wizard) mode.", WIZARD_NAME); -#else - pline("Debug mode is not available."); -#endif pline("Entering explore/discovery mode instead."); wizard = 0, discover = 1; /* (paranoia) */ } else if (discover) diff --git a/sys/vms/vmsunix.c b/sys/vms/vmsunix.c index baa4f75a3..90e2bd855 100644 --- a/sys/vms/vmsunix.c +++ b/sys/vms/vmsunix.c @@ -367,9 +367,7 @@ hack_resume(screen_manip) boolean screen_manip; { (void) signal(SIGINT, (SIG_RET_TYPE) done1); -# ifdef WIZARD if (wizard) (void) signal(SIGQUIT,SIG_DFL); -# endif if (screen_manip) resume_nhwindows(); /* setup terminal modes, redraw screen, &c */ } diff --git a/sys/wince/mhcmd.c b/sys/wince/mhcmd.c index 1e8b1c7f2..29d13be0b 100644 --- a/sys/wince/mhcmd.c +++ b/sys/wince/mhcmd.c @@ -296,7 +296,6 @@ NHCmdPadCell cells_layout_lookup[NH_CMDPAD_CELLNUM] = { -1, "X", "X", 13, NH_CELL_LAYOUT_MENU, 1 , 0 } }; -#ifdef WIZARD /* wizard mode layout */ NHCmdPadCell cells_layout_wizard[NH_CMDPAD_CELLNUM] = { @@ -313,7 +312,6 @@ NHCmdPadCell cells_layout_wizard[NH_CMDPAD_CELLNUM] = { -1, "", "", -NH_CMDPAD_FONT_NORMAL, NH_CELL_REG, 1, (void*)-1 }, { -1, "X", "X", 13, NH_CELL_LAYOUT_MENU, 1 , 0 } }; -#endif #else /* !WIN_CE_SMARTPHONE */ @@ -557,13 +555,11 @@ void register_command_window_class() nhcmdlayout_init(plt, cells_layout_lookup); nhcmdset_add(nhcmdset_current, plt); -#ifdef WIZARD if( wizard ) { plt = nhcmdlayout_create("Wizard Mode", NH_CMDPAD_ROWS, NH_CMDPAD_COLS); nhcmdlayout_init(plt, cells_layout_wizard); nhcmdset_add(nhcmdset_current, plt); } -#endif #else /* ! WIN_CE_SMARTPHONE */ plt = nhcmdlayout_create("lowercase", NH_CMDPAD_ROWS, NH_CMDPAD_COLS); diff --git a/sys/wince/winhack.c b/sys/wince/winhack.c index 2e25082a0..25a0a80cd 100644 --- a/sys/wince/winhack.c +++ b/sys/wince/winhack.c @@ -340,10 +340,8 @@ register char *s; void win32_abort() { -#ifdef WIZARD if (wizard) DebugBreak(); -#endif abort(); } diff --git a/sys/winnt/nttty.c b/sys/winnt/nttty.c index 765d95142..a0f9d95fe 100644 --- a/sys/winnt/nttty.c +++ b/sys/winnt/nttty.c @@ -417,7 +417,7 @@ int *x, *y, *mod; static void really_move_cursor() { -#if defined(PORT_DEBUG) && defined(WIZARD) +#ifdef PORT_DEBUG char oldtitle[BUFSZ], newtitle[BUFSZ]; if (display_cursor_info && wizard) { oldtitle[0] = '\0'; diff --git a/sys/winnt/winnt.c b/sys/winnt/winnt.c index e63db103b..c36175424 100644 --- a/sys/winnt/winnt.c +++ b/sys/winnt/winnt.c @@ -236,7 +236,6 @@ extern void NDECL(backsp); void win32_abort() { -#ifdef WIZARD if (wizard) { # ifdef WIN32CON int c, ci, ct; @@ -263,7 +262,6 @@ void win32_abort() DebugBreak(); # endif } -#endif abort(); } diff --git a/util/makedefs.c b/util/makedefs.c index 4ddb7f449..ad2186887 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -1233,9 +1233,6 @@ static const char *build_opts[] = { #ifdef DLB "data librarian", #endif -#ifdef WIZARD - "debug mode", -#endif #ifdef EXP_ON_BOTL "experience points on status line", #endif diff --git a/util/mdgrep.h b/util/mdgrep.h index b2515aa86..823c269d3 100644 --- a/util/mdgrep.h +++ b/util/mdgrep.h @@ -257,11 +257,7 @@ static struct grep_var grep_vars[]={ #else {"WIN_CE_SMARTPHONE", 0}, #endif -#if defined(WIZARD) {"WIZARD", 1}, -#else - {"WIZARD", 0}, -#endif #if defined(X11_GRAPHICS) {"X11_GRAPHICS", 1}, #else diff --git a/util/mdgrep.pl b/util/mdgrep.pl index 10038fdc7..27e78fe47 100644 --- a/util/mdgrep.pl +++ b/util/mdgrep.pl @@ -18,7 +18,7 @@ # Game Features: @feature = qw/ZEROCOMP USE_TILES ASCIIGRAPH CLIPPING TEXTCOLOR - COMPRESS ZLIB_COMP RANDOM SECURE USER_SOUNDS WIZARD + COMPRESS ZLIB_COMP RANDOM SECURE USER_SOUNDS SAFERHANGUP MFLOPPY NOCWD_ASSUMPTIONS VAR_PLAYGROUND DLB SHELL SUSPEND NOSAVEONHANGUP HANGUPHANDLING BSD_JOB_CONTROL MAIL POSIX_JOB_CONTROL INSURANCE From ac108cd365b2193f24b5c797aac3203ca83977cd Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Sat, 14 Feb 2015 01:31:22 -0500 Subject: [PATCH 033/132] Make GOLDOBJ unconditional. --- include/config.h | 1 - include/decl.h | 2 - include/extern.h | 25 ----- include/monst.h | 3 - include/you.h | 4 - src/apply.c | 17 ---- src/bones.c | 10 -- src/botl.c | 16 +--- src/decl.c | 2 - src/detect.c | 39 +------- src/do.c | 28 ------ src/dog.c | 9 -- src/dogmove.c | 3 - src/dokick.c | 8 -- src/dothrow.c | 29 ------ src/eat.c | 5 - src/end.c | 9 -- src/fountain.c | 9 -- src/hack.c | 16 +--- src/invent.c | 221 ------------------------------------------- src/makemon.c | 19 ---- src/mhitm.c | 9 -- src/mhitu.c | 22 ----- src/minion.c | 17 ---- src/mkobj.c | 8 -- src/mon.c | 18 ---- src/monmove.c | 29 +----- src/mplayer.c | 4 - src/objnam.c | 8 -- src/options.c | 5 - src/pickup.c | 128 ------------------------- src/priest.c | 27 ------ src/read.c | 2 - src/restore.c | 42 -------- src/rip.c | 4 - src/rumors.c | 9 -- src/save.c | 18 ---- src/shk.c | 91 ------------------ src/shknam.c | 4 - src/sit.c | 14 --- src/sounds.c | 4 - src/steal.c | 98 +------------------ src/trap.c | 23 ----- src/u_init.c | 22 ----- src/uhitm.c | 8 -- src/vault.c | 37 -------- src/wield.c | 7 -- src/zap.c | 7 -- sys/amiga/amirip.c | 7 +- sys/wince/mhstatus.c | 4 - util/makedefs.c | 7 -- win/Qt/qt_win.cpp | 8 -- win/X11/winstat.c | 4 - win/X11/wintext.c | 4 - win/gem/wingem.c | 4 - win/gnome/gnbind.c | 7 +- win/gnome/gnstatus.c | 15 --- win/win32/mswproc.c | 4 - 58 files changed, 8 insertions(+), 1196 deletions(-) diff --git a/include/config.h b/include/config.h index c89f778e3..1af4b0560 100644 --- a/include/config.h +++ b/include/config.h @@ -443,7 +443,6 @@ typedef unsigned char uchar; * bugs left here. */ -/*#define GOLDOBJ */ /* Gold is kept on obj chains - Helge Hafting */ #define STATUS_VIA_WINDOWPORT /* re-work of the status line updating process */ #define STATUS_HILITES /* support hilites of status fields */ /* #define WINCHAIN*/ /* stacked window systems */ diff --git a/include/decl.h b/include/decl.h index ddc814f4d..1e882705f 100644 --- a/include/decl.h +++ b/include/decl.h @@ -180,9 +180,7 @@ E NEARDATA struct kinfo { char name[BUFSZ]; /* actual killer name */ } killer; -#ifdef GOLDOBJ E long done_money; -#endif E const char *configfile; E NEARDATA char plname[PL_NSIZ]; E NEARDATA char dogname[]; diff --git a/include/extern.h b/include/extern.h index fd4bc6520..492718730 100644 --- a/include/extern.h +++ b/include/extern.h @@ -803,9 +803,7 @@ E int FDECL(calc_capacity, (int)); E int NDECL(max_capacity); E boolean FDECL(check_capacity, (const char *)); E int FDECL(inv_cnt, (BOOLEAN_P)); -#ifdef GOLDOBJ E long FDECL(money_cnt, (struct obj *)); -#endif /* ### hacklib.c ### */ @@ -900,11 +898,6 @@ E boolean FDECL(obj_here, (struct obj *,int,int)); E boolean NDECL(wearing_armor); E boolean FDECL(is_worn, (struct obj *)); E struct obj *FDECL(g_at, (int,int)); -#ifndef GOLDOBJ -E struct obj *FDECL(mkgoldobj, (long)); -E struct obj *FDECL(insert_gold_into_invent, (BOOLEAN_P)); -E void NDECL(remove_gold_from_invent); -#endif E struct obj *FDECL(getobj, (const char *,const char *)); E int FDECL(ggetobj, (const char *,int (*)(OBJ_P),int,BOOLEAN_P,unsigned *)); E int FDECL(askchain, (struct obj **,const char *,int,int (*)(OBJ_P), @@ -1076,9 +1069,7 @@ E void FDECL(freemcorpsenm, (struct monst *)); E void FDECL(set_mimic_sym, (struct monst *)); E int FDECL(mbirth_limit, (int)); E void FDECL(mimic_hit_msg, (struct monst *, SHORT_P)); -#ifdef GOLDOBJ E void FDECL(mkmonmoney, (struct monst *, long)); -#endif E int FDECL(bagotricks, (struct obj *,BOOLEAN_P,int *)); E boolean FDECL(propagate, (int, BOOLEAN_P,BOOLEAN_P)); E boolean FDECL(usmellmon, (struct permonst *)); @@ -1679,13 +1670,8 @@ E void NDECL(getlock); /* ### pickup.c ### */ -#ifdef GOLDOBJ E int FDECL(collect_obj_classes, (char *,struct obj *,BOOLEAN_P,boolean FDECL((*),(OBJ_P)), int *)); -#else -E int FDECL(collect_obj_classes, - (char *,struct obj *,BOOLEAN_P,BOOLEAN_P,boolean FDECL((*),(OBJ_P)), int *)); -#endif E boolean FDECL(rider_corpse_revival, (struct obj *,BOOLEAN_P)); E void FDECL(add_valid_menu_class, (int)); E boolean FDECL(allow_all, (struct obj *)); @@ -1926,9 +1912,6 @@ E int FDECL(validate, (int,const char *)); E void NDECL(reset_restpref); E void FDECL(set_restpref, (const char *)); E void FDECL(set_savepref, (const char *)); -#ifndef GOLDOBJ -E void FDECL(put_gold_back, (struct monst *)); -#endif /* ### rip.c ### */ @@ -2019,10 +2002,8 @@ E void FDECL(store_savefileinfo, (int)); /* ### shk.c ### */ -#ifdef GOLDOBJ E long FDECL(money2mon, (struct monst *, long)); E void FDECL(money2u, (struct monst *, long)); -#endif E void FDECL(shkgone, (struct monst *)); E void FDECL(set_residency, (struct monst *,BOOLEAN_P)); E void FDECL(replshk, (struct monst *,struct monst *)); @@ -2155,11 +2136,7 @@ E void FDECL(initialspell, (struct obj *)); #ifdef USE_TRAMPOLI E int NDECL(stealarm); #endif -#ifdef GOLDOBJ E long FDECL(somegold, (long)); -#else -E long NDECL(somegold); -#endif E void FDECL(stealgold, (struct monst *)); E void FDECL(remove_worn_item, (struct obj *,BOOLEAN_P)); E int FDECL(steal, (struct monst *, char *)); @@ -2169,9 +2146,7 @@ E void FDECL(maybe_absorb_item, (struct monst *,struct obj *,int,int)); E void FDECL(mdrop_obj, (struct monst *,struct obj *,BOOLEAN_P)); E void FDECL(mdrop_special_objs, (struct monst *)); E void FDECL(relobj, (struct monst *,int,BOOLEAN_P)); -#ifdef GOLDOBJ E struct obj *FDECL(findgold, (struct obj *)); -#endif /* ### steed.c ### */ diff --git a/include/monst.h b/include/monst.h index c451d374f..39e62f3e4 100644 --- a/include/monst.h +++ b/include/monst.h @@ -135,9 +135,6 @@ struct monst { long mtrapseen; /* bitmap of traps we've been trapped in */ long mlstmv; /* for catching up with lost time */ long mspare1; -#ifndef GOLDOBJ -#define mgold mspare1 -#endif struct obj *minvent; struct obj *mw; diff --git a/include/you.h b/include/you.h index c010abcb0..0c343b3c4 100644 --- a/include/you.h +++ b/include/you.h @@ -339,10 +339,6 @@ struct you { int ublessed, ublesscnt; /* blessing/duration from #pray */ long umoney0; long uspare1; -#ifndef GOLDOBJ -#define ugold uspare1 -#define ugold0 umoney0 -#endif long uexp, urexp; long ucleansed; /* to record moves when player was cleansed */ long usleep; /* sleeping; monstermove you last started */ diff --git a/src/apply.c b/src/apply.c index 1ab6153df..e92e6199f 100644 --- a/src/apply.c +++ b/src/apply.c @@ -2026,9 +2026,6 @@ struct obj *tstone; static const char scritch[] = "\"scritch, scritch\""; static const char allowall[3] = { COIN_CLASS, ALL_CLASSES, 0 }; static const char coins_gems[3] = { COIN_CLASS, GEM_CLASS, 0 }; -#ifndef GOLDOBJ - struct obj goldobj; -#endif /* in case it was acquired while blinded */ if (!Blind) tstone->dknown = 1; @@ -2039,17 +2036,6 @@ struct obj *tstone; Sprintf(stonebuf, "rub on the stone%s", plur(tstone->quan)); if ((obj = getobj(choices, stonebuf)) == 0) return; -#ifndef GOLDOBJ - if (obj->oclass == COIN_CLASS) { - u.ugold += obj->quan; /* keep botl up to date */ - goldobj = *obj; - goldobj.oextra = (struct oextra *)0; /* dealloc_obj(obj) will invalidate - the target of this copied ptr - here, so clear it out */ - dealloc_obj(obj); - obj = &goldobj; - } -#endif if (obj == tstone && obj->quan == 1L) { You_cant("rub %s on itself.", the(xname(obj))); @@ -2066,9 +2052,6 @@ struct obj *tstone; else pline("A sharp crack shatters %s%s.", (obj->quan > 1L) ? "one of " : "", the(xname(obj))); -#ifndef GOLDOBJ - /* assert(obj != &goldobj); */ -#endif useup(obj); return; } diff --git a/src/bones.c b/src/bones.c index 5607355ee..66a4d43f5 100644 --- a/src/bones.c +++ b/src/bones.c @@ -229,16 +229,6 @@ int x, y; else place_object(otmp, x, y); } -#ifndef GOLDOBJ - if(u.ugold) { - long ugold = u.ugold; - - if (mtmp) mtmp->mgold = ugold; - else if (cont) (void) add_to_container(cont, mkgoldobj(ugold)); - else (void)mkgold(ugold, x, y); - u.ugold = ugold; /* undo mkgoldobj()'s removal */ - } -#endif if (cont) cont->owt = weight(cont); } diff --git a/src/botl.c b/src/botl.c index 59c6078ac..ab02ae35b 100644 --- a/src/botl.c +++ b/src/botl.c @@ -159,13 +159,8 @@ botl_score() long deepest = deepest_lev_reached(FALSE); long utotal; -#ifndef GOLDOBJ - utotal = u.ugold + hidden_gold(); - if ((utotal -= u.ugold0) < 0L) utotal = 0L; -#else utotal = money_cnt(invent) + hidden_gold(); if ((utotal -= u.umoney0) < 0L) utotal = 0L; -#endif utotal += u.urexp + (50 * (deepest - 1)) + (deepest > 30 ? 10000 : deepest > 20 ? 1000*(deepest - 20) : 0); if (utotal < u.urexp) utotal = LONG_MAX; /* wrap around */ @@ -268,11 +263,7 @@ bot2() Sprintf(nb = eos(newbot2), "%s:%-2ld HP:%d(%d) Pw:%d(%d) AC:%-2d", encglyph(objnum_to_glyph(GOLD_PIECE)), -#ifndef GOLDOBJ - u.ugold, -#else money_cnt(invent), -#endif hp, hpmax, u.uen, u.uenmax, u.uac); if (Upolyd) @@ -709,12 +700,7 @@ bot() /* Gold */ - blstats[idx][BL_GOLD].a.a_long = -#ifndef GOLDOBJ - u.ugold; -#else - money_cnt(invent); -#endif + blstats[idx][BL_GOLD].a.a_long = money_cnt(invent); /* * The tty port needs to display the current symbol for gold * as a field header, so to accomodate that we pass gold with diff --git a/src/decl.c b/src/decl.c index d4892f9d4..47043d0cd 100644 --- a/src/decl.c +++ b/src/decl.c @@ -49,9 +49,7 @@ NEARDATA int doorindex = 0; NEARDATA char *save_cm = 0; NEARDATA struct kinfo killer = DUMMY; -#ifdef GOLDOBJ NEARDATA long done_money = 0; -#endif const char *nomovemsg = 0; NEARDATA char plname[PL_NSIZ] = DUMMY; /* player name */ NEARDATA char pl_character[PL_CSIZ] = DUMMY; diff --git a/src/detect.c b/src/detect.c index 93db6c77c..ecc4d3878 100644 --- a/src/detect.c +++ b/src/detect.c @@ -91,12 +91,7 @@ unsigned material; /* there's some object shown here */ if (oclass == ALL_CLASSES) { return((boolean)( !(level.objects[x][y] || /* stale if nothing here */ - ((mtmp = m_at(x,y)) != 0 && - ( -#ifndef GOLDOBJ - mtmp->mgold || -#endif - mtmp->minvent))))); + ((mtmp = m_at(x,y)) != 0 && ( mtmp->minvent))))); } else { if (material && objects[glyph_to_obj(glyph)].oc_material == material) { /* the object shown here is of interest because material matches */ @@ -115,19 +110,10 @@ unsigned material; for (otmp = level.objects[x][y]; otmp; otmp = otmp->nexthere) if (o_in(otmp, oclass)) return FALSE; /* didn't find it; perhaps a monster is carrying it */ -#ifndef GOLDOBJ - if ((mtmp = m_at(x,y)) != 0) { - if (oclass == COIN_CLASS && mtmp->mgold) - return FALSE; - else for (otmp = mtmp->minvent; otmp; otmp = otmp->nobj) - if (o_in(otmp, oclass)) return FALSE; - } -#else if ((mtmp = m_at(x,y)) != 0) { for (otmp = mtmp->minvent; otmp; otmp = otmp->nobj) if (o_in(otmp, oclass)) return FALSE; } -#endif /* detection indicates removal of this object from the map */ return TRUE; } @@ -176,11 +162,7 @@ register struct obj *sobj; /* look for gold carried by monsters (might be in a container) */ for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) { if (DEADMONSTER(mtmp)) continue; /* probably not needed in this case but... */ -#ifndef GOLDOBJ - if (mtmp->mgold || monsndx(mtmp->data) == PM_GOLD_GOLEM) { -#else if (findgold(mtmp->minvent) || monsndx(mtmp->data) == PM_GOLD_GOLEM) { -#endif known = TRUE; goto outgoldmap; /* skip further searching */ } else for (obj = mtmp->minvent; obj; obj = obj->nobj) @@ -212,12 +194,7 @@ register struct obj *sobj; if (youmonst.data == &mons[PM_GOLD_GOLEM]) { Sprintf(buf, "You feel like a million %s!", currency(2L)); - } else if (hidden_gold() || -#ifndef GOLDOBJ - u.ugold) -#else - money_cnt(invent)) -#endif + } else if (hidden_gold() || money_cnt(invent)) Strcpy(buf, "You feel worried about your future financial situation."); else @@ -254,11 +231,7 @@ outgoldmap: } for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) { if (DEADMONSTER(mtmp)) continue; /* probably overkill here */ -#ifndef GOLDOBJ - if (mtmp->mgold || monsndx(mtmp->data) == PM_GOLD_GOLEM) { -#else if (findgold(mtmp->minvent) || monsndx(mtmp->data) == PM_GOLD_GOLEM) { -#endif struct obj gold; gold = zeroobj; /* ensure oextra is cleared too */ gold.otyp = GOLD_PIECE; @@ -460,11 +433,7 @@ int class; /* an object class, 0 for all */ } if ((is_cursed && mtmp->m_ap_type == M_AP_OBJECT && (!class || class == objects[mtmp->mappearance].oc_class)) || -#ifndef GOLDOBJ - (mtmp->mgold && (!class || class == COIN_CLASS))) { -#else (findgold(mtmp->minvent) && (!class || class == COIN_CLASS))) { -#endif ct++; break; } @@ -546,11 +515,7 @@ int class; /* an object class, 0 for all */ temp.oy = mtmp->my; temp.corpsenm = PM_TENGU; /* if mimicing a corpse */ map_object(&temp, 1); -#ifndef GOLDOBJ - } else if (mtmp->mgold && (!class || class == COIN_CLASS)) { -#else } else if (findgold(mtmp->minvent) && (!class || class == COIN_CLASS)) { -#endif struct obj gold; gold = zeroobj; /* ensure oextra is cleared too */ gold.otyp = GOLD_PIECE; diff --git a/src/do.c b/src/do.c index c225000ef..981981293 100644 --- a/src/do.c +++ b/src/do.c @@ -28,11 +28,7 @@ static NEARDATA const char drop_types[] = int dodrop() { -#ifndef GOLDOBJ - int result, i = (invent || u.ugold) ? 0 : (SIZE(drop_types) - 1); -#else int result, i = (invent) ? 0 : (SIZE(drop_types) - 1); -#endif if (*u.ushops) sellobj_state(SELL_DELIBERATE); result = drop(getobj(&drop_types[i], "drop")); @@ -484,13 +480,9 @@ register struct obj *obj; if (levhack) ELevitation = W_ART; /* other than W_ARTI */ if(flags.verbose) You("drop %s.", doname(obj)); -#ifndef GOLDOBJ - if (obj->oclass != COIN_CLASS || obj == invent) freeinv(obj); -#else /* Ensure update when we drop gold objects */ if (obj->oclass == COIN_CLASS) context.botl = 1; freeinv(obj); -#endif hitfloor(obj); if (levhack) float_down(I_SPECIAL|TIMEOUT, W_ARTI|W_ART); return(1); @@ -509,13 +501,9 @@ void dropx(obj) register struct obj *obj; { -#ifndef GOLDOBJ - if (obj->oclass != COIN_CLASS || obj == invent) freeinv(obj); -#else /* Ensure update when we drop gold objects */ if (obj->oclass == COIN_CLASS) context.botl = 1; freeinv(obj); -#endif if (!u.uswallow) { if (ship_object(obj, u.ux, u.uy, FALSE)) return; if (IS_ALTAR(levl[u.ux][u.uy].typ)) @@ -653,17 +641,10 @@ int retry; int n, i, n_dropped = 0; long cnt; struct obj *otmp, *otmp2; -#ifndef GOLDOBJ - struct obj *u_gold = 0; -#endif menu_item *pick_list; boolean all_categories = TRUE; boolean drop_everything = FALSE; -#ifndef GOLDOBJ - /* put gold where inventory traversal will see it */ - if (u.ugold) u_gold = insert_gold_into_invent(TRUE); -#endif if (retry) { all_categories = (retry == -2); } else if (flags.menu_style == MENU_FULL) { @@ -749,11 +730,6 @@ int retry; /* same kludge as getobj(), for canletgo()'s use */ otmp->corpsenm = (int) cnt; /* don't split */ } else { -#ifndef GOLDOBJ - if (otmp->oclass == COIN_CLASS) - (void) splitobj(otmp, otmp->quan - cnt); - else -#endif otmp = splitobj(otmp, cnt); } } @@ -765,10 +741,6 @@ int retry; } drop_done: -#ifndef GOLDOBJ - /* if we put gold into inventory above, take it back out now */ - if (u_gold) remove_gold_from_invent(); -#endif return n_dropped; } diff --git a/src/dog.c b/src/dog.c index fa9d1f99a..ff7dd525d 100644 --- a/src/dog.c +++ b/src/dog.c @@ -443,15 +443,6 @@ boolean with_you; } corpse = mkcorpstat(CORPSE, (struct monst *)0, mtmp->data, xlocale, ylocale, CORPSTAT_NONE); -#ifndef GOLDOBJ - if (mtmp->mgold) { - if (xlocale == 0 && ylocale == 0 && corpse) { - (void) get_obj_location(corpse, &xlocale, &ylocale, 0); - (void) mkgold(mtmp->mgold, xlocale, ylocale); - } - mtmp->mgold = 0L; - } -#endif mongone(mtmp); } } diff --git a/src/dogmove.c b/src/dogmove.c index 4300fb8de..0b6e7a6f8 100644 --- a/src/dogmove.c +++ b/src/dogmove.c @@ -26,9 +26,6 @@ struct monst *mon; struct obj *obj, *wep, dummy, *pickaxe, *unihorn, *key; -#ifndef GOLDOBJ - if (mon->mgold) return &zeroobj; /* pet has something to drop */ -#endif dummy = zeroobj; dummy.otyp = GOLD_PIECE; /* not STRANGE_OBJECT or tools of interest */ dummy.oartifact = 1; /* so real artifact won't override "don't keep it" */ diff --git a/src/dokick.c b/src/dokick.c index fb81ab5c4..b17379e07 100644 --- a/src/dokick.c +++ b/src/dokick.c @@ -322,11 +322,7 @@ register struct obj *gold; verbalize("Thank you for your contribution."); else verbalize("Thanks, scum!"); } else if (mtmp->isgd) { -#ifndef GOLDOBJ - umoney = u.ugold; -#else umoney = money_cnt(invent); -#endif /* Some of these are iffy, because a hostile guard won't become peaceful and resume leading hero out of the vault. If he did do that, player @@ -352,11 +348,7 @@ register struct obj *gold; goldreqd = 750L; if (goldreqd) { -#ifndef GOLDOBJ - umoney = u.ugold; -#else umoney = money_cnt(invent); -#endif if (value > goldreqd + (umoney + u.ulevel * rn2(5)) / ACURR(A_CHA)) mtmp->mpeaceful = TRUE; diff --git a/src/dothrow.c b/src/dothrow.c index 08e21d4f5..aedb4fc40 100644 --- a/src/dothrow.c +++ b/src/dothrow.c @@ -45,18 +45,6 @@ int shotlimit; boolean twoweap, weakmultishot; /* ask "in what direction?" */ -#ifndef GOLDOBJ - if (!getdir((char *)0)) { - if (obj->oclass == COIN_CLASS) { - u.ugold += obj->quan; - context.botl = 1; - dealloc_obj(obj); - } - return(0); - } - - if(obj->oclass == COIN_CLASS) return(throw_gold(obj)); -#else if (!getdir((char *)0)) { /* obj might need to be merged back into the singular gold object */ freeinv(obj); @@ -73,7 +61,6 @@ int shotlimit; possibly using a sling. */ if(obj->oclass == COIN_CLASS && obj != uquiver) return(throw_gold(obj)); -#endif if(!canletgo(obj,"throw")) return(0); @@ -1833,34 +1820,18 @@ throw_gold(obj) struct obj *obj; { int range, odx, ody; -#ifndef GOLDOBJ - long zorks = obj->quan; -#endif register struct monst *mon; if(!u.dx && !u.dy && !u.dz) { -#ifndef GOLDOBJ - u.ugold += obj->quan; - context.botl = 1; - dealloc_obj(obj); -#endif You("cannot throw gold at yourself."); return(0); } -#ifdef GOLDOBJ freeinv(obj); -#endif if(u.uswallow) { pline(is_animal(u.ustuck->data) ? "%s in the %s's entrails." : "%s into %s.", -#ifndef GOLDOBJ - "The gold disappears", mon_nam(u.ustuck)); - u.ustuck->mgold += zorks; - dealloc_obj(obj); -#else "The money disappears", mon_nam(u.ustuck)); add_to_minv(u.ustuck, obj); -#endif return(1); } diff --git a/src/eat.c b/src/eat.c index 196fb9e49..7259e6424 100644 --- a/src/eat.c +++ b/src/eat.c @@ -1985,13 +1985,8 @@ eatspecial() /* called after eating non-food */ context.victual.o_id = 0; context.victual.eating = 0; if (otmp->oclass == COIN_CLASS) { -#ifdef GOLDOBJ if (carried(otmp)) useupall(otmp); -#else - if (otmp->where == OBJ_FREE) - dealloc_obj(otmp); -#endif else useupf(otmp, otmp->quan); vault_gd_watching(GD_EATGOLD); diff --git a/src/end.c b/src/end.c index c9fe47cb2..f7e7f5ec3 100644 --- a/src/end.c +++ b/src/end.c @@ -998,13 +998,8 @@ die: { int deepest = deepest_lev_reached(FALSE); -#ifndef GOLDOBJ - umoney = u.ugold; - tmp = u.ugold0; -#else umoney = money_cnt(invent); tmp = u.umoney0; -#endif umoney += hidden_gold(); /* accumulate gold from containers */ tmp = umoney - tmp; /* net gain */ @@ -1046,11 +1041,7 @@ die: /* update gold for the rip output, which can't use hidden_gold() (containers will be gone by then if bones just got saved...) */ -#ifndef GOLDOBJ - u.ugold = umoney; -#else done_money = umoney; -#endif /* clean up unneeded windows */ if (have_windows) { diff --git a/src/fountain.c b/src/fountain.c index 764ffb5a3..f167c09d4 100644 --- a/src/fountain.c +++ b/src/fountain.c @@ -452,14 +452,6 @@ register struct obj *obj; break; case 28: /* Strange feeling */ pline("An urge to take a bath overwhelms you."); -#ifndef GOLDOBJ - if (u.ugold > 10) { - u.ugold -= somegold() / 10; - You("lost some of your gold in the fountain!"); - CLEAR_FOUNTAIN_LOOTED(u.ux,u.uy); - exercise(A_WIS, FALSE); - } -#else { long money = money_cnt(invent); struct obj *otmp; @@ -479,7 +471,6 @@ register struct obj *obj; exercise(A_WIS, FALSE); } } -#endif break; case 29: /* You see coins */ diff --git a/src/hack.c b/src/hack.c index 66e0962e6..fafff35b6 100644 --- a/src/hack.c +++ b/src/hack.c @@ -2540,22 +2540,10 @@ inv_weight() register struct obj *otmp = invent; register int wt = 0; -#ifndef GOLDOBJ - /* when putting stuff into containers, gold is inserted at the head - of invent for easier manipulation by askchain & co, but it's also - retained in u.ugold in order to keep the status line accurate; we - mustn't add its weight in twice under that circumstance */ - wt = (otmp && otmp->oclass == COIN_CLASS) ? 0 : - (int)((u.ugold + 50L) / 100L); -#endif while (otmp) { -#ifndef GOLDOBJ - if (otmp->otyp != BOULDER || !throws_rocks(youmonst.data)) -#else if (otmp->oclass == COIN_CLASS) wt += (int)(((long)otmp->quan + 50L) / 100L); else if (otmp->otyp != BOULDER || !throws_rocks(youmonst.data)) -#endif wt += otmp->owt; otmp = otmp->nobj; } @@ -2609,7 +2597,7 @@ const char *str; int inv_cnt(incl_gold) -boolean incl_gold; /* only meaningful for GOLDOBJ config */ +boolean incl_gold; { register struct obj *otmp = invent; register int ct = 0; @@ -2621,7 +2609,6 @@ boolean incl_gold; /* only meaningful for GOLDOBJ config */ return(ct); } -#ifdef GOLDOBJ /* Counts the money in an object chain. */ /* Intended use is for your or some monsters inventory, */ /* now that u.gold/m.gold is gone.*/ @@ -2637,6 +2624,5 @@ struct obj *otmp; } return 0L; } -#endif /* GOLDOBJ */ /*hack.c*/ diff --git a/src/invent.c b/src/invent.c index 5778135d9..7a7a83734 100644 --- a/src/invent.c +++ b/src/invent.c @@ -168,9 +168,7 @@ struct obj **potmp, **pobj; / (otmp->quan + obj->quan); otmp->quan += obj->quan; -#ifdef GOLDOBJ /* temporary special case for gold objects!!!! */ -#endif if (otmp->oclass == COIN_CLASS) otmp->owt = weight(otmp); else otmp->owt += obj->owt; if(!has_oname(otmp) && has_oname(obj)) @@ -238,11 +236,7 @@ addinv_core1(obj) struct obj *obj; { if (obj->oclass == COIN_CLASS) { -#ifndef GOLDOBJ - u.ugold += obj->quan; -#else context.botl = 1; -#endif } else if (obj->otyp == AMULET_OF_YENDOR) { if (u.uhave.amulet) impossible("already have amulet?"); u.uhave.amulet = 1; @@ -305,11 +299,6 @@ struct obj *obj; obj->was_thrown = 0; /* not meaningful for invent */ addinv_core1(obj); -#ifndef GOLDOBJ - /* if handed gold, we're done */ - if (obj->oclass == COIN_CLASS) - return obj; -#endif /* merge with quiver in preference to any other inventory slot in case quiver and wielded weapon are both eligible; adding @@ -488,10 +477,6 @@ freeinv_core(obj) struct obj *obj; { if (obj->oclass == COIN_CLASS) { -#ifndef GOLDOBJ - u.ugold -= obj->quan; - obj->in_use = FALSE; -#endif context.botl = 1; return; } else if (obj->otyp == AMULET_OF_YENDOR) { @@ -679,60 +664,6 @@ register int x, y; return((struct obj *)0); } -#ifndef GOLDOBJ -/* Make a gold object from the hero's gold. */ -struct obj * -mkgoldobj(q) -register long q; -{ - register struct obj *otmp; - - otmp = mksobj(GOLD_PIECE, FALSE, FALSE); - u.ugold -= q; - otmp->quan = q; - otmp->owt = weight(otmp); - context.botl = 1; - return(otmp); -} - -/* used for container apply/#loot and multi-item Drop */ -struct obj * -insert_gold_into_invent(keep_on_status_line) -boolean keep_on_status_line; -{ - struct obj *u_gold = 0; - - if (u.ugold) { - u_gold = mkgoldobj(u.ugold); - if (keep_on_status_line) { - u_gold->in_use = 1; /* in case of panic/hangup save */ - u.ugold = u_gold->quan; /* put back on status line */ - } /* else mkgoldobj() left status $:0 */ - assigninvlet(u_gold); /* should yield '$' */ - u_gold->where = OBJ_INVENT; - u_gold->nobj = invent; - invent = u_gold; - } - return u_gold; -} - -/* undo insert_gold_into_invent; gold might have been used up though */ -void -remove_gold_from_invent() -{ - struct obj *u_gold = invent; /* we expect gold to be first */ - - if (u_gold && u_gold->otyp != GOLD_PIECE) - u_gold = carrying(GOLD_PIECE); - - if (u_gold) { - extract_nobj(u_gold, &invent); - if (!u_gold->in_use) u.ugold += u_gold->quan; - dealloc_obj(u_gold); - } -} -#endif /* !GOLDOBJ */ - STATIC_OVL void compactify(buf) register char *buf; @@ -802,10 +733,8 @@ const char *action; * struct obj *xxx: object to do something with. * (struct obj *) 0 error return: no object. * &zeroobj explicitly no object (as in w-). -#ifdef GOLDOBJ !!!! test if gold can be used in unusual ways (eaten etc.) !!!! may be able to remove "usegold" -#endif */ struct obj * getobj(let,word) @@ -819,10 +748,6 @@ register const char *let,*word; register char *bp = buf; xchar allowcnt = 0; /* 0, 1 or 2 */ struct obj *firstobj = invent; -#ifndef GOLDOBJ - struct obj *u_gold = 0; - boolean allowgold = FALSE; /* can't use gold because they don't have any */ -#endif boolean usegold = FALSE; /* can't use gold because its illegal */ boolean allowall = FALSE; boolean allownone = FALSE; @@ -833,22 +758,13 @@ register const char *let,*word; long dummymask; if(*let == ALLOW_COUNT) let++, allowcnt = 1; -#ifndef GOLDOBJ - if(*let == COIN_CLASS) let++, - usegold = TRUE, allowgold = (u.ugold ? TRUE : FALSE); -#else if(*let == COIN_CLASS) let++, usegold = TRUE; -#endif /* Equivalent of an "ugly check" for gold */ if (usegold && !strcmp(word, "eat") && (!metallivorous(youmonst.data) || youmonst.data == &mons[PM_RUST_MONSTER])) -#ifndef GOLDOBJ - usegold = allowgold = FALSE; -#else usegold = FALSE; -#endif if(*let == ALL_CLASSES) let++, allowall = TRUE; if(*let == ALLOW_NONE) let++, allownone = TRUE; @@ -866,17 +782,6 @@ register const char *let,*word; useboulder = TRUE; if(allownone) *bp++ = '-'; -#ifndef GOLDOBJ - if(allowgold) { - *bp++ = def_oc_syms[COIN_CLASS].sym; - if (firstobj && firstobj->otyp == GOLD_PIECE) { - /* gold has been inserted into inventory; skip it during - inventory letter collection */ - u_gold = firstobj; - firstobj = u_gold->nobj; - } - } -#endif if(bp > buf && bp[-1] == '-') *bp++ = ' '; ap = altlets; @@ -891,9 +796,7 @@ register const char *let,*word; } if (!*let || index(let, otmp->oclass) -#ifdef GOLDOBJ || (usegold && otmp->invlet == GOLD_SYM) -#endif || (useboulder && otmp->otyp == BOULDER) ) { register int otyp = otmp->otyp; @@ -1010,11 +913,7 @@ register const char *let,*word; compactify(bp); *ap = '\0'; -#ifndef GOLDOBJ - if(!foo && !allowall && !allowgold && !allownone) { -#else if(!foo && !allowall && !allownone) { -#endif You("don't have anything %sto %s.", foox ? "else " : "", word); return((struct obj *)0); @@ -1070,11 +969,6 @@ register const char *let,*word; if (!usegold) { You("cannot %s gold.", word); return(struct obj *)0; -#ifndef GOLDOBJ - } else if (!allowgold) { - You("are not carrying any gold."); - return(struct obj *)0; -#endif } /* Historic note: early Nethack had a bug which was * first reported for Larn, where trying to drop 2^32-n @@ -1089,15 +983,6 @@ register const char *let,*word; return (struct obj *)0; } -#ifndef GOLDOBJ - if(!(allowcnt == 2 && cnt < u.ugold)) - cnt = u.ugold; - if (!u_gold) - u_gold = mkgoldobj(cnt); - else if (cnt < u_gold->quan) - u_gold = splitobj(u_gold, cnt); - return u_gold; -#endif } if(ilet == '?' || ilet == '*') { char *allowed_choices = (ilet == '?') ? lets : (char *)0; @@ -1124,9 +1009,7 @@ register const char *let,*word; /* permit counts for throwing gold, but don't accept * counts for other things since the throw code will * split off a single item anyway */ -#ifdef GOLDOBJ if (ilet != def_oc_syms[COIN_CLASS].sym) -#endif allowcnt = 1; if(cnt == 0 && prezero) return((struct obj *)0); if(cnt > 1) { @@ -1134,9 +1017,7 @@ register const char *let,*word; continue; } } -#ifdef GOLDOBJ context.botl = 1; /* May have changed the amount of money */ -#endif #ifdef REDO savech(ilet); #endif @@ -1159,9 +1040,7 @@ register const char *let,*word; break; } if(!allowall && let && !index(let,otmp->oclass) -#ifdef GOLDOBJ && !(usegold && otmp->oclass == COIN_CLASS) -#endif ) { silly_thing(word, otmp); return((struct obj *)0); @@ -1289,25 +1168,14 @@ unsigned *resultflags; boolean FDECL((*filter),(OBJ_P)) = (boolean FDECL((*),(OBJ_P))) 0; boolean takeoff, ident, allflag, m_seen; int itemcount; -#ifndef GOLDOBJ - int oletct, iletct, allowgold, unpaid, oc_of_sym; -#else int oletct, iletct, unpaid, oc_of_sym; -#endif char sym, *ip, olets[MAXOCLASSES+5], ilets[MAXOCLASSES+5]; char extra_removeables[3+1]; /* uwep,uswapwep,uquiver */ char buf[BUFSZ], qbuf[QBUFSZ]; if (resultflags) *resultflags = 0; -#ifndef GOLDOBJ - allowgold = (u.ugold && !strcmp(word, "drop")) ? 1 : 0; -#endif takeoff = ident = allflag = m_seen = FALSE; -#ifndef GOLDOBJ - if(!invent && !allowgold){ -#else if(!invent){ -#endif You("have nothing to %s.", word); return(0); } @@ -1322,9 +1190,6 @@ unsigned *resultflags; iletct = collect_obj_classes(ilets, invent, FALSE, -#ifndef GOLDOBJ - (allowgold != 0), -#endif filter, &itemcount); unpaid = count_unpaid(invent); @@ -1397,15 +1262,7 @@ unsigned *resultflags; } if (oc_of_sym == COIN_CLASS && !combo) { -#ifndef GOLDOBJ - if (allowgold == 1) - (*fn)(mkgoldobj(u.ugold)); - else if (!u.ugold) - You("have no gold."); - allowgold = 2; -#else context.botl = 1; -#endif } else if (sym == 'a') { allflag = TRUE; } else if (sym == 'A') { @@ -1442,16 +1299,10 @@ unsigned *resultflags; return (allflag || (!oletct && ckfn != ckunpaid)) ? -2 : -3; else if (flags.menu_style != MENU_TRADITIONAL && combo && !allflag) return 0; -#ifndef GOLDOBJ - else if (allowgold == 2 && !oletct) - return 1; /* you dropped gold (or at least tried to) */ - else { -#else else /*!!!! if (allowgold == 2 && !oletct) !!!! return 1; you dropped gold (or at least tried to) !!!! test gold dropping else*/ { -#endif int cnt = askchain(&invent, olets, allflag, fn, ckfn, mx, word); /* * askchain() has already finished the job in this case @@ -1728,10 +1579,6 @@ STATIC_OVL char obj_to_let(obj) /* should of course only be called for things in invent */ register struct obj *obj; { -#ifndef GOLDOBJ - if (obj->oclass == COIN_CLASS) - return GOLD_SYM; -#endif if (!flags.invlet_constant) { obj->invlet = NOINVSYM; reassign(); @@ -1787,11 +1634,6 @@ long quan; /* if non-0, print this quantity, not obj->quan */ Sprintf(li, "%c - %-45s %6ld %s", (dot && use_invlet ? obj->invlet : let), (txt ? txt : doname(obj)), cost, currency(cost)); -#ifndef GOLDOBJ - } else if (obj && obj->oclass == COIN_CLASS) { - Sprintf(li, "%ld gold piece%s%s", obj->quan, plur(obj->quan), - (dot ? "." : "")); -#endif } else { /* ordinary inventory display or pickup message */ Sprintf(li, "%c - %s%s", @@ -1885,11 +1727,7 @@ long* out_cnt; to here is short circuited away. */ if (!invent && !(flags.perm_invent && !lets && !want_reply)) { -#ifndef GOLDOBJ - pline("Not carrying anything%s.", u.ugold ? " except gold" : ""); -#else pline("Not carrying anything."); -#endif return 0; } @@ -2219,11 +2057,7 @@ dotypeinv() boolean traditional = TRUE; const char *prompt = "What type of object do you want an inventory of?"; -#ifndef GOLDOBJ - if (!invent && !u.ugold && !billx) { -#else if (!invent && !billx) { -#endif You("aren't carrying anything."); return 0; } @@ -2245,9 +2079,6 @@ dotypeinv() types[0] = 0; class_count = collect_obj_classes(types, invent, FALSE, -#ifndef GOLDOBJ - (u.ugold != 0), -#endif (boolean FDECL((*),(OBJ_P))) 0, &itemcount); if (unpaid_count) { Strcat(types, "u"); @@ -2592,10 +2423,8 @@ mergable(otmp, obj) /* returns TRUE if obj & otmp can be merged */ { int objnamelth = 0, otmpnamelth = 0; if (obj->otyp != otmp->otyp) return FALSE; -#ifdef GOLDOBJ /* coins of the same kind will always merge */ if (obj->oclass == COIN_CLASS) return TRUE; -#endif if (obj->unpaid != otmp->unpaid || obj->spe != otmp->spe || obj->dknown != otmp->dknown || (obj->bknown != otmp->bknown && !Role_if(PM_PRIEST)) || @@ -2676,18 +2505,11 @@ doprgold() { /* the messages used to refer to "carrying gold", but that didn't take containers into account */ -#ifndef GOLDOBJ - if(!u.ugold) - Your("wallet is empty."); - else - Your("wallet contains %ld gold piece%s.", u.ugold, plur(u.ugold)); -#else long umoney = money_cnt(invent); if(!umoney) Your("wallet is empty."); else Your("wallet contains %ld %s.", umoney, currency(umoney)); -#endif shopper_financial_report(); return 0; } @@ -2915,17 +2737,13 @@ reassign() register struct obj *obj; for(obj = invent, i = 0; obj; obj = obj->nobj, i++) { -#ifdef GOLDOBJ if (obj->oclass == COIN_CLASS && obj->invlet == GOLD_SYM) --i; /* keep $ instead of using up i'th letter */ else -#endif if (i < 52) obj->invlet = (i < 26) ? ('a'+i) : ('A'+i-26); -#ifdef GOLDOBJ else if (obj->oclass == COIN_CLASS) obj->invlet = GOLD_SYM; -#endif else obj->invlet = NOINVSYM; } @@ -2969,7 +2787,6 @@ doorganize() /* inventory organizer by Del Lamb */ const char *adj_type; if (!invent) { - /* (we don't need any !GOLDOBJ check for "except gold" here) */ You("aren't carrying anything to adjust."); return 0; } @@ -3178,20 +2995,12 @@ int dflags; char *title; { struct obj *ret; -#ifndef GOLDOBJ - struct obj m_gold; -#endif char tmp[QBUFSZ]; int n; menu_item *selected = 0; int do_all = (dflags & MINV_ALL) != 0, incl_hero = (do_all && u.uswallow && mon == u.ustuck), -#ifndef GOLDOBJ - do_gold = (do_all && mon->mgold), - have_inv = (mon->minvent || do_gold), -#else have_inv = (mon->minvent != 0), -#endif have_any = (have_inv || incl_hero); Sprintf(tmp,"%s %s:", s_suffix(noit_Monnam(mon)), @@ -3203,34 +3012,12 @@ char *title; */ youmonst.data = mon->data; -#ifndef GOLDOBJ - if (do_gold) { - /* - * Make temporary gold object and insert at the head of - * the mon's inventory. We can get away with using a - * stack variable object because monsters don't carry - * gold in their inventory, so it won't merge. - */ - m_gold = zeroobj; - m_gold.otyp = GOLD_PIECE; m_gold.oclass = COIN_CLASS; - m_gold.quan = mon->mgold; m_gold.dknown = 1; - m_gold.where = OBJ_FREE; - /* we had better not merge and free this object... */ - if (add_to_minv(mon, &m_gold)) - panic("display_minventory: static object freed."); - } - -#endif n = query_objlist(title ? title : tmp, mon->minvent, INVORDER_SORT | (incl_hero ? INCLUDE_HERO : 0), &selected, (dflags & MINV_NOLET) ? PICK_NONE : PICK_ONE, do_all ? allow_all : worn_wield_only); -#ifndef GOLDOBJ - if (do_gold) obj_extract_self(&m_gold); -#endif - set_uasmon(); } else { invdisp_nothing(title ? title : tmp, "(none)"); @@ -3240,14 +3027,6 @@ char *title; if (n > 0) { ret = selected[0].item.a_obj; free((genericptr_t)selected); -#ifndef GOLDOBJ - /* - * Unfortunately, we can't return a pointer to our temporary - * gold object. We'll have to work out a scheme where this - * can happen. Maybe even put gold in the inventory list... - */ - if (ret == &m_gold) ret = (struct obj *) 0; -#endif } else ret = (struct obj *) 0; return ret; diff --git a/src/makemon.c b/src/makemon.c index 0f2d0c41c..9b63c72ec 100644 --- a/src/makemon.c +++ b/src/makemon.c @@ -454,7 +454,6 @@ register struct monst *mtmp; (void) mongets(mtmp, rnd_offensive_item(mtmp)); } -#ifdef GOLDOBJ /* * Makes up money for monster's inventory. * This will change with silver & copper coins @@ -468,7 +467,6 @@ long amount; gold->quan = amount; add_to_minv(mtmp, gold); } -#endif STATIC_OVL void m_initinv(mtmp) @@ -555,11 +553,7 @@ register struct monst *mtmp; rn2(3) ? CLOAK_OF_PROTECTION : CLOAK_OF_MAGIC_RESISTANCE); (void) mongets(mtmp, SMALL_SHIELD); -#ifndef GOLDOBJ - mtmp->mgold = (long)rn1(10,20); -#else mkmonmoney(mtmp,(long)rn1(10,20)); -#endif } else if (quest_mon_represents_role(ptr,PM_MONK)) { (void) mongets(mtmp, rn2(11) ? ROBE : CLOAK_OF_MAGIC_RESISTANCE); @@ -613,11 +607,7 @@ register struct monst *mtmp; } break; case S_LEPRECHAUN: -#ifndef GOLDOBJ - mtmp->mgold = (long) d(level_difficulty(), 30); -#else mkmonmoney(mtmp, (long) d(level_difficulty(), 30)); -#endif break; case S_DEMON: /* moved here from m_initweap() because these don't @@ -640,14 +630,8 @@ register struct monst *mtmp; (void) mongets(mtmp, rnd_defensive_item(mtmp)); if ((int) mtmp->m_lev > rn2(100)) (void) mongets(mtmp, rnd_misc_item(mtmp)); -#ifndef GOLDOBJ - if (likes_gold(ptr) && !mtmp->mgold && !rn2(5)) - mtmp->mgold = - (long) d(level_difficulty(), mtmp->minvent ? 5 : 10); -#else if (likes_gold(ptr) && !findgold(mtmp->minvent) && !rn2(5)) mkmonmoney(mtmp, (long) d(level_difficulty(), mtmp->minvent ? 5 : 10)); -#endif } /* Note: for long worms, always call cutworm (cutworm calls clone_mon) */ @@ -691,9 +675,6 @@ xchar x, y; /* clone's preferred location or 0 (near mon) */ m2->mcloned = 1; m2->minvent = (struct obj *) 0; /* objects don't clone */ m2->mleashed = FALSE; -#ifndef GOLDOBJ - m2->mgold = 0L; -#endif /* Max HP the same, but current HP halved for both. The caller * might want to override this by halving the max HP also. * When current HP is odd, the original keeps the extra point. diff --git a/src/mhitm.c b/src/mhitm.c index a749cfd4d..0e8bf7d1c 100644 --- a/src/mhitm.c +++ b/src/mhitm.c @@ -1050,14 +1050,6 @@ mdamagem(magr, mdef, mattk) break; case AD_SGLD: tmp = 0; -#ifndef GOLDOBJ - if (magr->mcan || !mdef->mgold) break; - /* technically incorrect; no check for stealing gold from - * between mdef's feet... - */ - magr->mgold += mdef->mgold; - mdef->mgold = 0; -#else if (magr->mcan) break; /* technically incorrect; no check for stealing gold from * between mdef's feet... @@ -1068,7 +1060,6 @@ mdamagem(magr, mdef, mattk) obj_extract_self(gold); add_to_minv(magr, gold); } -#endif mdef->mstrategy &= ~STRAT_WAITFORU; if (vis) { Strcpy(buf, Monnam(magr)); diff --git a/src/mhitu.c b/src/mhitu.c index ad68b2d31..511513f39 100644 --- a/src/mhitu.c +++ b/src/mhitu.c @@ -2430,27 +2430,6 @@ register struct monst *mon; pline("%s tries to take your money, but fails...", noit_Monnam(mon)); else { -#ifndef GOLDOBJ - long cost; - - if (u.ugold > (long)LARGEST_INT - 10L) - cost = (long) rnd(LARGEST_INT) + 500L; - else - cost = (long) rnd((int)u.ugold + 10) + 500L; - if (mon->mpeaceful) { - cost /= 5L; - if (!cost) cost = 1L; - } - if (cost > u.ugold) cost = u.ugold; - if (!cost) verbalize("It's on the house!"); - else { - pline("%s takes %ld %s for services rendered!", - noit_Monnam(mon), cost, currency(cost)); - u.ugold -= cost; - mon->mgold += cost; - context.botl = 1; - } -#else long cost; long umoney = money_cnt(invent); @@ -2470,7 +2449,6 @@ register struct monst *mon; money2mon(mon, cost); context.botl = 1; } -#endif } if (!rn2(25)) mon->mcan = 1; /* monster is worn out */ if (!tele_restrict(mon)) (void) rloc(mon, FALSE); diff --git a/src/minion.c b/src/minion.c index f70b426b7..814bb21b5 100644 --- a/src/minion.c +++ b/src/minion.c @@ -236,11 +236,7 @@ register struct monst *mtmp; if (!tele_restrict(mtmp)) (void) rloc(mtmp, FALSE); return(1); } -#ifndef GOLDOBJ - cash = u.ugold; -#else cash = money_cnt(invent); -#endif demand = (cash * (rnd(80) + 20 * Athome)) / (100 * (1 + (sgn(u.ualign.type) == sgn(mtmp->data->maligntyp)))); @@ -281,9 +277,7 @@ struct monst *mtmp; { char buf[BUFSZ]; long offer; -#ifdef GOLDOBJ long umoney = money_cnt(invent); -#endif getlin("How much will you offer?", buf); if (sscanf(buf, "%ld", &offer) != 1) offer = 0L; @@ -297,16 +291,6 @@ struct monst *mtmp; } else if (offer == 0L) { You("refuse."); return 0L; -#ifndef GOLDOBJ - } else if (offer >= u.ugold) { - You("give %s all your gold.", mon_nam(mtmp)); - offer = u.ugold; - } else { - You("give %s %ld %s.", mon_nam(mtmp), offer, currency(offer)); - } - u.ugold -= offer; - mtmp->mgold += offer; -#else } else if (offer >= umoney) { You("give %s all your gold.", mon_nam(mtmp)); offer = umoney; @@ -314,7 +298,6 @@ struct monst *mtmp; You("give %s %ld %s.", mon_nam(mtmp), offer, currency(offer)); } (void) money2mon(mtmp, offer); -#endif context.botl = 1; return(offer); } diff --git a/src/mkobj.c b/src/mkobj.c index 253fd1293..47b6668e7 100644 --- a/src/mkobj.c +++ b/src/mkobj.c @@ -1037,9 +1037,7 @@ register struct obj *otmp; { int old_light = 0; -#ifdef GOLDOBJ if (otmp->oclass == COIN_CLASS) return; -#endif if (otmp->lamplit) old_light = arti_light_radius(otmp); otmp->cursed = 0; otmp->blessed = 1; @@ -1074,9 +1072,7 @@ register struct obj *otmp; { int old_light = 0; -#ifdef GOLDOBJ if (otmp->oclass == COIN_CLASS) return; -#endif if (otmp->lamplit) old_light = arti_light_radius(otmp); otmp->blessed = 0; otmp->cursed = 1; @@ -1351,10 +1347,6 @@ struct monst *mtmp; mtmp2->data = (struct permonst *)0; mtmp2->minvent = (struct obj *)0; if (mtmp->mextra) copy_mextra(mtmp2, mtmp); -#ifndef GOLDOBJ - /* not a pointer but is discarded along with minvent */ - mtmp2->mgold = 0L; -#endif } return obj; } diff --git a/src/mon.c b/src/mon.c index d65eb1cf9..0de59cf8a 100644 --- a/src/mon.c +++ b/src/mon.c @@ -826,13 +826,8 @@ mpickgold(mtmp) if ((gold = g_at(mtmp->mx, mtmp->my)) != 0) { mat_idx = objects[gold->otyp].oc_material; -#ifndef GOLDOBJ - mtmp->mgold += gold->quan; - delobj(gold); -#else obj_extract_self(gold); add_to_minv(mtmp, gold); -#endif if (cansee(mtmp->mx, mtmp->my) ) { if (flags.verbose && !mtmp->isgd) pline("%s picks up some %s.", Monnam(mtmp), @@ -1731,9 +1726,6 @@ register struct monst *mdef; mdrop_special_objs(mdef); /* release rest of monster's inventory--it is removed from game */ discard_minvent(mdef); -#ifndef GOLDOBJ - mdef->mgold = 0L; -#endif m_detach(mdef, mdef->data); } @@ -1789,16 +1781,6 @@ register struct monst *mdef; oldminvent = obj->nobj; (void) add_to_container(otmp, obj); } -#ifndef GOLDOBJ - if (mdef->mgold) { - struct obj *au; - au = mksobj(GOLD_PIECE, FALSE, FALSE); - au->quan = mdef->mgold; - au->owt = weight(au); - (void) add_to_container(otmp, au); - mdef->mgold = 0; - } -#endif /* Archeologists should not break unique statues */ if (mdef->data->geno & G_UNIQ) otmp->spe = 1; diff --git a/src/monmove.c b/src/monmove.c index 490f7faa0..316018e52 100644 --- a/src/monmove.c +++ b/src/monmove.c @@ -477,13 +477,8 @@ toofar: if(!nearby || mtmp->mflee || scared || mtmp->mconf || mtmp->mstun || (mtmp->minvis && !rn2(3)) || -#ifndef GOLDOBJ - (mdat->mlet == S_LEPRECHAUN && - !u.ugold && (mtmp->mgold || rn2(2))) || -#else (mdat->mlet == S_LEPRECHAUN && !findgold(invent) && (findgold(mtmp->minvent) || rn2(2))) || -#endif (is_wanderer(mdat) && !rn2(4)) || (Conflict && !mtmp->iswiz) || (!mtmp->mcansee && !rn2(4)) || mtmp->mpeaceful) { /* Possibly cast an undirected spell if not attacking you */ @@ -765,9 +760,7 @@ not_special: if (mtmp->mconf || (u.uswallow && mtmp == u.ustuck)) appr = 0; else { -#ifdef GOLDOBJ struct obj *lepgold, *ygold; -#endif boolean should_see = (couldsee(omx, omy) && (levl[gx][gy].lit || !levl[omx][omy].lit) && @@ -783,12 +776,8 @@ not_special: appr = 0; if(monsndx(ptr) == PM_LEPRECHAUN && (appr == 1) && -#ifndef GOLDOBJ - (mtmp->mgold > u.ugold)) -#else ( (lepgold = findgold(mtmp->minvent)) && (lepgold->quan > ((ygold = findgold(invent)) ? ygold->quan : 0L)) )) -#endif appr = -1; if (!should_see && can_track(ptr)) { @@ -1320,9 +1309,7 @@ register struct monst *mtmp; { boolean notseen, gotu; register int disp, mx = mtmp->mux, my = mtmp->muy; -#ifdef GOLDOBJ long umoney = money_cnt(invent); -#endif /* * do cheapest and/or most likely tests first @@ -1340,13 +1327,7 @@ register struct monst *mtmp; if (notseen || Underwater) { /* Xorns can smell quantities of valuable metal like that in solid gold coins, treat as seen */ - if ((mtmp->data == &mons[PM_XORN]) && -#ifndef GOLDOBJ - u.ugold -#else - umoney -#endif - && !Underwater) + if ((mtmp->data == &mons[PM_XORN]) && umoney && !Underwater) disp = 0; else disp = 1; @@ -1433,22 +1414,14 @@ struct monst *mtmp; struct obj *chain, *obj; if (mtmp == &youmonst) { -#ifndef GOLDOBJ - if (u.ugold > 100L) return TRUE; -#endif chain = invent; } else { -#ifndef GOLDOBJ - if (mtmp->mgold > 100L) return TRUE; -#endif chain = mtmp->minvent; } for (obj = chain; obj; obj = obj->nobj) { int typ = obj->otyp; -#ifdef GOLDOBJ if (typ == COIN_CLASS && obj->quan > 100L) return TRUE; -#endif if (obj->oclass != GEM_CLASS && !(typ >= ARROW && typ <= BOOMERANG) && !(typ >= DAGGER && typ <= CRYSKNIFE) && diff --git a/src/mplayer.c b/src/mplayer.c index c2b7f23f8..e1cc0f812 100644 --- a/src/mplayer.c +++ b/src/mplayer.c @@ -260,11 +260,7 @@ register boolean special; (void)mongets(mtmp, rnd_class(DILITHIUM_CRYSTAL, JADE)); /* To get the gold "right" would mean a player can double his */ /* gold supply by killing one mplayer. Not good. */ -#ifndef GOLDOBJ - mtmp->mgold = rn2(1000); -#else mkmonmoney(mtmp, rn2(1000)); -#endif quan = rn2(10); while(quan--) (void) mpickobj(mtmp, mkobj(RANDOM_CLASS, FALSE)); diff --git a/src/objnam.c b/src/objnam.c index 824398123..321d7ff29 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -930,10 +930,8 @@ boolean not_fully_identified(otmp) register struct obj *otmp; { -#ifdef GOLDOBJ /* gold doesn't have any interesting attributes [yet?] */ if (otmp->oclass == COIN_CLASS) return FALSE; /* always fully ID'd */ -#endif /* check fundamental ID hallmarks first */ if (!otmp->known || !otmp->dknown || #ifdef MAIL @@ -2592,15 +2590,9 @@ struct obj *no_wish; !strcmpi(bp, "coin") || *bp == GOLD_SYM) { if (cnt > 5000 && !wizard) cnt = 5000; else if (cnt < 1) cnt = 1; -#ifndef GOLDOBJ - pline("%d gold piece%s.", cnt, plur(cnt)); - u.ugold += (long) cnt; - otmp = &zeroobj; /* readobjnam()'s return value for gold */ -#else otmp = mksobj(GOLD_PIECE, FALSE, FALSE); otmp->quan = (long) cnt; otmp->owt = weight(otmp); -#endif context.botl = 1; return otmp; } diff --git a/src/options.c b/src/options.c index 9083ae63e..dc8cbcfc2 100644 --- a/src/options.c +++ b/src/options.c @@ -909,12 +909,7 @@ char *op; char *sp, buf[BUFSZ]; num = 0; -#ifndef GOLDOBJ - if (!index(op, GOLD_SYM)) - buf[num++] = COIN_CLASS; -#else /* !!!! probably unnecessary with gold as normal inventory */ -#endif for (sp = op; *sp; sp++) { oc_sym = def_char_to_objclass(*sp); diff --git a/src/pickup.c b/src/pickup.c index bbc9a925d..30188e5f2 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -12,13 +12,8 @@ #define CONTAINED_SYM '>' /* from invent.c */ STATIC_DCL void FDECL(simple_look, (struct obj *,BOOLEAN_P)); -#ifndef GOLDOBJ -STATIC_DCL boolean FDECL(query_classes, (char *,boolean *,boolean *, - const char *,struct obj *,BOOLEAN_P,BOOLEAN_P,int *)); -#else STATIC_DCL boolean FDECL(query_classes, (char *,boolean *,boolean *, const char *,struct obj *,BOOLEAN_P,int *)); -#endif STATIC_DCL boolean FDECL(fatal_corpse_mistake, (struct obj *,BOOLEAN_P)); STATIC_DCL void FDECL(check_here, (BOOLEAN_P)); STATIC_DCL boolean FDECL(n_or_more, (struct obj *)); @@ -101,15 +96,6 @@ boolean here; /* flag for type of obj list linkage */ } } -#ifndef GOLDOBJ -int -collect_obj_classes(ilets, otmp, here, incl_gold, filter, itemcount) -char ilets[]; -register struct obj *otmp; -boolean here, incl_gold; -boolean FDECL((*filter),(OBJ_P)); -int *itemcount; -#else int collect_obj_classes(ilets, otmp, here, filter, itemcount) char ilets[]; @@ -117,16 +103,11 @@ register struct obj *otmp; boolean here; boolean FDECL((*filter),(OBJ_P)); int *itemcount; -#endif { register int iletct = 0; register char c; *itemcount = 0; -#ifndef GOLDOBJ - if (incl_gold) - ilets[iletct++] = def_oc_syms[COIN_CLASS].sym; -#endif ilets[iletct] = '\0'; /* terminate ilets so that index() will work */ while (otmp) { c = def_oc_syms[(int)otmp->oclass].sym; @@ -151,17 +132,6 @@ int *itemcount; * "?/a" or "a?/" or "/a?",&c picks all '?' even though no '/' * (ie, treated as if it had just been "?a"). */ -#ifndef GOLDOBJ -STATIC_OVL boolean -query_classes(oclasses, one_at_a_time, everything, action, objs, - here, incl_gold, menu_on_demand) -char oclasses[]; -boolean *one_at_a_time, *everything; -const char *action; -struct obj *objs; -boolean here, incl_gold; -int *menu_on_demand; -#else STATIC_OVL boolean query_classes(oclasses, one_at_a_time, everything, action, objs, here, menu_on_demand) @@ -171,7 +141,6 @@ const char *action; struct obj *objs; boolean here; int *menu_on_demand; -#endif { char ilets[20], inbuf[BUFSZ]; int iletct, oclassct; @@ -183,9 +152,6 @@ int *menu_on_demand; oclasses[oclassct = 0] = '\0'; *one_at_a_time = *everything = m_seen = FALSE; iletct = collect_obj_classes(ilets, objs, here, -#ifndef GOLDOBJ - incl_gold, -#endif (boolean FDECL((*),(OBJ_P))) 0, &itemcount); if (iletct == 0) { return FALSE; @@ -578,9 +544,6 @@ menu_pickup: if (!query_classes(oclasses, &selective, &all_of_a_type, "pick up", objchain, traverse_how == BY_NEXTHERE, -#ifndef GOLDOBJ - FALSE, -#endif &via_menu)) { if (!via_menu) return (0); n = query_objlist("Pick up what?", @@ -1096,11 +1059,7 @@ int *wt_before, *wt_after; savequan = obj->quan; saveowt = obj->owt; -#ifndef GOLDOBJ - umoney = u.ugold; -#else umoney = money_cnt(invent); -#endif iw = max_capacity(); if (count != savequan) { @@ -1324,53 +1283,6 @@ boolean telekinesis; /* not picking it up directly by hand */ return 0; } else if (obj->oartifact && !touch_artifact(obj,&youmonst)) { return 0; -#ifndef GOLDOBJ - } else if (obj->oclass == COIN_CLASS) { - /* Special consideration for gold pieces... */ - long iw = (long)max_capacity() - GOLD_WT(u.ugold); - long gold_capacity = GOLD_CAPACITY(iw, u.ugold); - const char *where = (obj->ox == u.ux && obj->oy == u.uy) ? - "here" : "there"; - - if (gold_capacity <= 0L) { - pline( - "There %s %ld gold piece%s %s, but you cannot carry any more.", - otense(obj, "are"), - obj->quan, plur(obj->quan), where); - return 0; - } else if (gold_capacity < count) { - You("can only %s %s of the %ld gold pieces lying %s.", - telekinesis ? "acquire" : "carry", - gold_capacity == 1L ? "one" : "some", obj->quan, where); - pline("%s %ld gold piece%s.", - nearloadmsg, gold_capacity, plur(gold_capacity)); - u.ugold += gold_capacity; - obj->quan -= gold_capacity; - costly_gold(obj->ox, obj->oy, gold_capacity); - } else { - u.ugold += count; - if (count == obj->quan) - /* costly_gold() can trigger --More-- prompt, so - take gold off map before messages in order to - prevent hangup save there from duplicating it */ - obj_extract_self(obj); /* remove from floor */ - else - obj->quan -= count; - if ((nearload = near_capacity()) != 0) - pline("%s %ld gold piece%s.", - nearload < MOD_ENCUMBER ? - moderateloadmsg : nearloadmsg, - count, plur(count)); - else - prinv((char *) 0, obj, count); - costly_gold(obj->ox, obj->oy, count); - if (obj->where == OBJ_FREE) - delobj(obj); - } - context.botl = 1; - if (context.run) nomul(0); - return 1; -#endif } else if (obj->otyp == CORPSE) { if (fatal_corpse_mistake(obj, telekinesis) || rider_corpse_revival(obj, telekinesis)) @@ -1395,10 +1307,8 @@ boolean telekinesis; /* not picking it up directly by hand */ if ((res = lift_object(obj, (struct obj *)0, &count, telekinesis)) <= 0) return res; -#ifdef GOLDOBJ /* Whats left of the special case for gold :-) */ if (obj->oclass == COIN_CLASS) context.botl = 1; -#endif if (obj->quan != count && obj->otyp != LOADSTONE) obj = splitobj(obj, count); @@ -1417,8 +1327,6 @@ boolean telekinesis; /* not picking it up directly by hand */ * and putting it in the hero's inventory. Take care of billing. Return a * pointer to the object where otmp ends up. This may be different * from otmp because of merging. - * - * Gold never reaches this routine unless GOLDOBJ is defined. */ struct obj * pick_obj(otmp) @@ -1703,12 +1611,6 @@ reverse_loot() return FALSE; } -#ifndef GOLDOBJ - if (u.ugold) { - contribution = ((long)rnd(5) * u.ugold + 4L) / 5L; - goldob = mkgoldobj(contribution); - } -#else /* find a money object to mess with */ for (goldob = invent; goldob; goldob = goldob->nobj) if (goldob->oclass == COIN_CLASS) { @@ -1717,7 +1619,6 @@ reverse_loot() goldob = splitobj(goldob, contribution); break; } -#endif if (!goldob) return FALSE; if (!IS_THRONE(levl[x][y].typ)) { @@ -1738,9 +1639,7 @@ reverse_loot() if (coffers) { verbalize("Thank you for your contribution to reduce the debt."); -#ifdef GOLDOBJ freeinv(goldob); -#endif (void)add_to_container(coffers, goldob); coffers->owt = weight(coffers); coffers->cknown = 0; @@ -1749,13 +1648,8 @@ reverse_loot() (void)boxlock(coffers, &boxdummy); } } else if ((mon = makemon(courtmon(), x, y, NO_MM_FLAGS)) != 0) { -#ifndef GOLDOBJ - mon->mgold += goldob->quan; - delobj(goldob); -#else freeinv(goldob); add_to_minv(mon, goldob); -#endif pline("The exchequer accepts your contribution."); } else { You("drop %s.", doname(goldob)); @@ -2048,9 +1942,6 @@ register struct obj *obj; otmp, count); if (is_gold) { -#ifndef GOLDOBJ - dealloc_obj(obj); -#endif bot(); /* update character's gold piece count immediately */ } return 1; @@ -2167,9 +2058,6 @@ struct obj **objp; int held; { struct obj *curr, *otmp, *obj = *objp; -#ifndef GOLDOBJ - struct obj *u_gold = (struct obj *)0; -#endif boolean quantum_cat, cursed_mbag, loot_out, loot_in, loot_in_first, stash_one, inokay, outokay, outmaybe; @@ -2233,9 +2121,6 @@ int held; } inokay = (invent != 0 && !(invent == current_container && !current_container->nobj)); -#ifndef GOLDOBJ - if (u.ugold) inokay = TRUE; -#endif outokay = Has_contents(current_container); if (!outokay) /* preformat the empty-container message */ Sprintf(emptymsg, "%s is %sempty.", @@ -2330,11 +2215,6 @@ int held; } } -#ifndef GOLDOBJ - /* if putting in, place gold where inventory traversal will see it */ - if ((loot_in || stash_one) && u.ugold) - u_gold = insert_gold_into_invent(TRUE); -#endif if ((loot_in || stash_one) && (!invent || (invent == current_container && !invent->nobj))) { You("don't have anything%s to %s.", @@ -2370,11 +2250,6 @@ int held; /* putting something in might have triggered magic bag explosion */ if (!current_container) loot_out = FALSE; -#ifndef GOLDOBJ - /* if we put gold into inventory above, take it back out now */ - if (u_gold) remove_gold_from_invent(); -#endif - /* out after in */ if (loot_out && loot_in_first) { if (!Has_contents(current_container)) { @@ -2432,9 +2307,6 @@ boolean put_in; if (query_classes(selection, &one_by_one, &allflag, action, *objlist, FALSE, -#ifndef GOLDOBJ - put_in ? (boolean)(u.ugold != 0L) : FALSE, -#endif &menu_on_request)) { if (askchain(objlist, (one_by_one ? (char *)0 : selection), allflag, actionfunc, checkfunc, 0, action)) diff --git a/src/priest.c b/src/priest.c index 5e3b2ea10..1ef7ea286 100644 --- a/src/priest.c +++ b/src/priest.c @@ -539,20 +539,6 @@ register struct monst *priest; priest->mpeaceful = 0; return; } -#ifndef GOLDOBJ - if(!u.ugold) { - if(coaligned && !strayed) { - if (priest->mgold > 0L) { - /* Note: two bits is actually 25 cents. Hmm. */ - pline("%s gives you %s for an ale.", Monnam(priest), - (priest->mgold == 1L) ? "one bit" : "two bits"); - if (priest->mgold > 1L) - u.ugold = 2L; - else - u.ugold = 1L; - priest->mgold -= u.ugold; - context.botl = 1; -#else if(!money_cnt(invent)) { if(coaligned && !strayed) { long pmoney = money_cnt(priest->minvent); @@ -561,7 +547,6 @@ register struct monst *priest; pline("%s gives you %s for an ale.", Monnam(priest), (pmoney == 1L) ? "one bit" : "two bits"); money2u(priest, pmoney > 1L ? 2 : 1); -#endif } else pline("%s preaches the virtues of poverty.", Monnam(priest)); exercise(A_WIS, TRUE); @@ -577,11 +562,7 @@ register struct monst *priest; verbalize("Thou shalt regret thine action!"); if(coaligned) adjalign(-1); } else if(offer < (u.ulevel * 200)) { -#ifndef GOLDOBJ - if(u.ugold > (offer * 2L)) verbalize("Cheapskate."); -#else if(money_cnt(invent) > (offer * 2L)) verbalize("Cheapskate."); -#endif else { verbalize("I thank thee for thy contribution."); /* give player some token */ @@ -589,11 +570,7 @@ register struct monst *priest; } } else if(offer < (u.ulevel * 400)) { verbalize("Thou art indeed a pious individual."); -#ifndef GOLDOBJ - if(u.ugold < (offer * 2L)) { -#else if(money_cnt(invent) < (offer * 2L)) { -#endif if (coaligned && u.ualign.record <= ALGN_SINNED) adjalign(1); verbalize("I bestow upon thee a blessing."); @@ -614,11 +591,7 @@ register struct monst *priest; } else u.ublessed++; } else { verbalize("Thy selfless generosity is deeply appreciated."); -#ifndef GOLDOBJ - if(u.ugold < (offer * 2L) && coaligned) { -#else if(money_cnt(invent) < (offer * 2L) && coaligned) { -#endif if(strayed && (moves - u.ucleansed) > 5000L) { u.ualign.record = 0; /* cleanse thee */ u.ucleansed = moves; diff --git a/src/read.c b/src/read.c index b60ffa66e..9be9f9390 100644 --- a/src/read.c +++ b/src/read.c @@ -992,10 +992,8 @@ struct obj *sobj; /* scroll, or fake spellbook object for scroll-like spell */ } else { for (obj = invent; obj; obj = obj->nobj) { long wornmask; -#ifdef GOLDOBJ /* gold isn't subject to cursing and blessing */ if (obj->oclass == COIN_CLASS) continue; -#endif wornmask = (obj->owornmask & ~(W_BALL|W_ART|W_ARTI)); if (wornmask && !sblessed) { /* handle a couple of special cases; we don't diff --git a/src/restore.c b/src/restore.c index e888b4dcd..b4d4bb7fb 100644 --- a/src/restore.c +++ b/src/restore.c @@ -146,17 +146,6 @@ boolean quietly; for (otmp = invent; otmp; otmp = otmp2) { otmp2 = otmp->nobj; -#ifndef GOLDOBJ - if (otmp->oclass == COIN_CLASS) { - /* in_use gold is created by some menu operations */ - if (!otmp->in_use) { - impossible("inven_inuse: !in_use gold in inventory"); - } - extract_nobj(otmp, &invent); - otmp->in_use = FALSE; - dealloc_obj(otmp); - } else -#endif /* GOLDOBJ */ if (otmp->in_use) { if (!quietly) pline("Finishing off %s...", xname(otmp)); useup(otmp); @@ -441,9 +430,6 @@ boolean ghostly; /* restore monster back pointer */ for (obj = mtmp->minvent; obj; obj = obj->nobj) obj->ocarry = mtmp; -#ifndef GOLDOBJ /* GOLDOBJ-compatibility */ - put_gold_back(mtmp); -#endif } if (mtmp->mw) { struct obj *obj; @@ -598,9 +584,6 @@ unsigned int *stuckid, *steedid; restore_timers(fd, RANGE_GLOBAL, FALSE, 0L); restore_light_sources(fd); invent = restobjchn(fd, FALSE, FALSE); -#ifndef GOLDOBJ /* GOLDOBJ-compatibility */ - put_gold_back(&youmonst); -#endif /* tmp_bc only gets set here if the ball & chain were orphaned because you were swallowed; otherwise they will be on the floor or in your inventory */ @@ -1571,29 +1554,4 @@ register unsigned int len; } } -#ifndef GOLDOBJ /* GOLDOBJ-compatibility */ -/* used to make save & bones files be compatible with GOLDOBJ config; - takes all of the gold objects out of the invent or mtmp->minvent - chain and puts it into either u.ugold or mtmp->mgold */ -void -put_gold_back(mon) -struct monst *mon; -{ - struct obj *goldobj; - boolean is_hero = (mon == &youmonst); - - /* there could be two gold objects in invent if a hangup save was - performed while gold was in invent for Drop or container access */ - while ((goldobj = (is_hero ? carrying(GOLD_PIECE) : - m_carrying(mon, GOLD_PIECE))) != 0) { - extract_nobj(goldobj, is_hero ? &invent : &mon->minvent); - if (!goldobj->in_use) { - if (is_hero) u.ugold += goldobj->quan; - else mon->mgold += goldobj->quan; - } - dealloc_obj(goldobj); - } -} -#endif /*GOLDOBJ*/ - /*restore.c*/ diff --git a/src/rip.c b/src/rip.c index 526c56388..8b3d849a3 100644 --- a/src/rip.c +++ b/src/rip.c @@ -107,11 +107,7 @@ time_t when; center(NAME_LINE, buf); /* Put $ on stone */ -#ifndef GOLDOBJ - Sprintf(buf, "%ld Au", u.ugold); -#else Sprintf(buf, "%ld Au", done_money); -#endif buf[STONE_LINE_LEN] = 0; /* It could be a *lot* of gold :-) */ center(GOLD_LINE, buf); diff --git a/src/rumors.c b/src/rumors.c index 7df89e8f4..081b81d8d 100644 --- a/src/rumors.c +++ b/src/rumors.c @@ -427,11 +427,7 @@ register struct monst *oracl; char qbuf[QBUFSZ]; multi = 0; -#ifndef GOLDOBJ - umoney = u.ugold; -#else umoney = money_cnt(invent); -#endif if (!oracl) { There("is no one here to consult."); @@ -468,12 +464,7 @@ register struct monst *oracl; u_pay = (umoney < (long)major_cost) ? (int)umoney : major_cost; break; } -#ifndef GOLDOBJ - u.ugold -= (long)u_pay; - oracl->mgold += (long)u_pay; -#else money2mon(oracl, (long)u_pay); -#endif context.botl = 1; add_xpts = 0; /* first oracle of each type gives experience points */ if (u_pay == minor_cost) { diff --git a/src/save.c b/src/save.c index dc0f94078..88db771e2 100644 --- a/src/save.c +++ b/src/save.c @@ -306,9 +306,6 @@ register int fd, mode; bwrite(fd, (genericptr_t) &flags, sizeof(struct flag)); #ifdef SYSFLAGS bwrite(fd, (genericptr_t) &sysflags, sizeof(struct sysflag)); -#endif -#ifndef GOLDOBJ /* GOLDOBJ-compatibility */ - if (u.ugold) (void)insert_gold_into_invent(FALSE); #endif bwrite(fd, (genericptr_t) &u, sizeof(struct you)); bwrite(fd, yyyymmddhhmmss(ubirthday), 14); @@ -319,9 +316,6 @@ register int fd, mode; save_light_sources(fd, mode, RANGE_GLOBAL); saveobjchn(fd, invent, mode); -#ifndef GOLDOBJ /* GOLDOBJ-compatibility */ - if (!release_data(mode)) remove_gold_from_invent(); -#endif if (BALL_IN_MON) { /* prevent loss of ball & chain when swallowed */ uball->nobj = uchain; @@ -1123,22 +1117,10 @@ register struct monst *mtmp; if (perform_bwrite(mode)) { mtmp->mnum = monsndx(mtmp->data); if (mtmp->ispriest) forget_temple_entry(mtmp); /* EPRI() */ -#ifndef GOLDOBJ /* GOLDOBJ-compatibility */ - if (mtmp->mgold) { - struct obj *goldobj = mksobj(GOLD_PIECE, FALSE, FALSE); - - goldobj->quan = mtmp->mgold; - mtmp->mgold = 0L; - add_to_minv(mtmp, goldobj); - } -#endif savemon(fd, mtmp); } if (mtmp->minvent) saveobjchn(fd,mtmp->minvent,mode); -#ifndef GOLDOBJ /* GOLDOBJ-compatibility */ - if (!release_data(mode)) put_gold_back(mtmp); -#endif if (release_data(mode)) dealloc_monst(mtmp); mtmp = mtmp2; diff --git a/src/shk.c b/src/shk.c index 5a397abf5..0fe0e94db 100644 --- a/src/shk.c +++ b/src/shk.c @@ -78,7 +78,6 @@ STATIC_DCL const char *FDECL(cad, (BOOLEAN_P)); */ -#ifdef GOLDOBJ /* Transfer money from inventory to monster when paying shopkeepers, priests, oracle, succubus, & other demons. @@ -153,8 +152,6 @@ long amount; } } -#endif /* GOLDOBJ */ - STATIC_OVL struct monst * next_shkp(shkp, withbill) register struct monst *shkp; @@ -903,13 +900,8 @@ register struct monst *shkp; long robbed = ESHK(shkp)->robbed; long balance = ((tmp <= 0L) ? tmp : check_credit(tmp, shkp)); -#ifndef GOLDOBJ - u.ugold -= balance; - shkp->mgold += balance; -#else if (balance > 0) money2mon(shkp, balance); else if (balance < 0) money2u(shkp, -balance); -#endif context.botl = 1; if(robbed) { robbed -= tmp; @@ -1235,11 +1227,7 @@ proceed: } if(shkp != resident && NOTANGRY(shkp)) { -#ifdef GOLDOBJ umoney = money_cnt(invent); -#else - umoney = u.ugold; -#endif if(!ltmp) You("do not owe %s anything.", mon_nam(shkp)); else if(!umoney) { @@ -1268,11 +1256,7 @@ proceed: /* ltmp is still eshkp->robbed here */ if (!eshkp->billct && !eshkp->debit) { -#ifdef GOLDOBJ umoney = money_cnt(invent); -#else - umoney = u.ugold; -#endif if(!ltmp && NOTANGRY(shkp)) { You("do not owe %s anything.", shkname(shkp)); if (!umoney) @@ -1325,9 +1309,7 @@ proceed: long dtmp = eshkp->debit; long loan = eshkp->loan; char sbuf[BUFSZ]; -#ifdef GOLDOBJ umoney = money_cnt(invent); -#endif Sprintf(sbuf, "You owe %s %ld %s ", shkname(shkp), dtmp, currency(dtmp)); if(loan) { @@ -1337,11 +1319,7 @@ proceed: "for gold picked up and the use of merchandise."); } else Strcat(sbuf, "for the use of merchandise."); pline1(sbuf); -#ifndef GOLDOBJ - if (u.ugold + eshkp->credit < dtmp) { -#else if (umoney + eshkp->credit < dtmp) { -#endif pline("But you don't%s have enough gold%s.", stashed_gold ? " seem to" : "", eshkp->credit ? " or credit" : ""); @@ -1353,12 +1331,7 @@ proceed: eshkp->loan = 0L; Your("debt is covered by your credit."); } else if (!eshkp->credit) { -#ifndef GOLDOBJ - u.ugold -= dtmp; - shkp->mgold += dtmp; -#else money2mon(shkp, dtmp); -#endif eshkp->debit = 0L; eshkp->loan = 0L; You("pay that debt."); @@ -1366,12 +1339,7 @@ proceed: } else { dtmp -= eshkp->credit; eshkp->credit = 0L; -#ifndef GOLDOBJ - u.ugold -= dtmp; - shkp->mgold += dtmp; -#else money2mon(shkp, dtmp); -#endif eshkp->debit = 0L; eshkp->loan = 0L; pline("That debt is partially offset by your credit."); @@ -1384,22 +1352,14 @@ proceed: /* now check items on bill */ if (eshkp->billct) { register boolean itemize; -#ifndef GOLDOBJ - if (!u.ugold && !eshkp->credit) { -#else umoney = money_cnt(invent); if (!umoney && !eshkp->credit) { -#endif You("%shave no money or credit%s.", stashed_gold ? "seem to " : "", paid ? " left" : ""); return(0); } -#ifndef GOLDOBJ - if ((u.ugold + eshkp->credit) < cheapest_item(shkp)) { -#else if ((umoney + eshkp->credit) < cheapest_item(shkp)) { -#endif You("don't have enough money to buy%s the item%s you picked.", eshkp->billct > 1 ? " any of" : "", plur(eshkp->billct)); if(stashed_gold) @@ -1483,11 +1443,7 @@ boolean itemize; { register struct obj *obj = *obj_p; long ltmp, quan, save_quan; -#ifdef GOLDOBJ long umoney = money_cnt(invent); -#else - long umoney = u.ugold; -#endif int buy; boolean stashed_gold = (hidden_gold() > 0L), consumed = (which == 0); @@ -1672,9 +1628,7 @@ int numsk; int croaked; { long loss = 0L; -#ifdef GOLDOBJ long umoney; -#endif struct eshk *eshkp = ESHK(shkp); boolean take = FALSE, taken = FALSE; unsigned save_minvis = shkp->minvis; @@ -1721,12 +1675,8 @@ int croaked; } if (eshkp->following || ANGRY(shkp) || take) { -#ifndef GOLDOBJ - if (!invent && !u.ugold) goto skip; -#else if (!invent) goto skip; umoney = money_cnt(invent); -#endif takes[0] = '\0'; if (!shkp->mcanmove || shkp->msleeping) Strcat(takes, "wakes up and "); @@ -1734,18 +1684,10 @@ int croaked; Strcat(takes, "comes and "); Strcat(takes, "takes"); -#ifndef GOLDOBJ - if (loss > u.ugold || !loss || roomno == eshkp->shoproom) { - eshkp->robbed -= u.ugold; - if (eshkp->robbed < 0L) eshkp->robbed = 0L; - shkp->mgold += u.ugold; - u.ugold = 0L; -#else if (loss > umoney || !loss || roomno == eshkp->shoproom) { eshkp->robbed -= umoney; if (eshkp->robbed < 0L) eshkp->robbed = 0L; if (umoney > 0) money2mon(shkp, umoney); -#endif context.botl = 1; pline("%s %s all your possessions.", shkname(shkp), takes); @@ -1753,12 +1695,7 @@ int croaked; /* where to put player's invent (after disclosure) */ set_repo_loc(shkp); } else { -#ifndef GOLDOBJ - shkp->mgold += loss; - u.ugold -= loss; -#else money2mon(shkp, loss); -#endif context.botl = 1; pline("%s %s the %ld %s %sowed %s.", Monnam(shkp), takes, @@ -1827,14 +1764,9 @@ finish_paybill() unleash_all(); /* if hero has any gold left, take it into shopkeeper's possession */ if (shkp) { -#ifdef GOLDOBJ long umoney = money_cnt(invent); if (umoney) money2mon(shkp, umoney); -#else - shkp->mgold += u.ugold; - u.ugold = 0L; -#endif } /* transfer rest of the character's inventory to the shop floor */ drop_upon_death((struct monst *)0, (struct obj *)0, ox, oy); @@ -2837,11 +2769,7 @@ xchar x, y; return; } -#ifndef GOLDOBJ - shkmoney = shkp->mgold; -#else shkmoney = money_cnt(shkp->minvent); -#endif if (!shkmoney) { char c, qbuf[BUFSZ]; long tmpcr = ((offer * 9L) / 10L) + (offer <= 1L); @@ -3779,11 +3707,7 @@ boolean cant_mollify; } if((um_dist(x, y, 1) && !uinshp) || cant_mollify || -#ifndef GOLDOBJ - (u.ugold + ESHK(shkp)->credit) < cost_of_damage -#else (money_cnt(invent) + ESHK(shkp)->credit) < cost_of_damage -#endif || !rn2(50)) { getcad: if (muteshk(shkp)) { @@ -3807,12 +3731,7 @@ boolean cant_mollify; currency(cost_of_damage), !animal ? "\"" : ""); if(yn(qbuf) != 'n') { cost_of_damage = check_credit(cost_of_damage, shkp); -#ifndef GOLDOBJ - u.ugold -= cost_of_damage; - shkp->mgold += cost_of_damage; -#else money2mon(shkp, cost_of_damage); -#endif context.botl = 1; pline("Mollified, %s accepts your restitution.", shkname(shkp)); @@ -3967,9 +3886,7 @@ shk_chat(shkp) struct monst *shkp; { struct eshk *eshk; -#ifdef GOLDOBJ long shkmoney; -#endif if (!shkp->isshk) { /* The monster type is shopkeeper, but this monster is not actually a shk, which could happen if someone @@ -4010,17 +3927,9 @@ struct monst *shkp; shkname(shkp), eshk->credit, currency(eshk->credit)); else if (eshk->robbed) pline("%s complains about a recent robbery.", shkname(shkp)); -#ifndef GOLDOBJ - else if (shkp->mgold < 50) -#else else if ((shkmoney = money_cnt(shkp->minvent)) < 50) -#endif pline("%s complains that business is bad.", shkname(shkp)); -#ifndef GOLDOBJ - else if (shkp->mgold > 4000) -#else else if (shkmoney > 4000) -#endif pline("%s says that business is good.", shkname(shkp)); else if (is_izchak(shkp, FALSE)) pline(Izchak_speaks[rn2(SIZE(Izchak_speaks))],shkname(shkp)); diff --git a/src/shknam.c b/src/shknam.c index 77bdf2f3c..645fc6b58 100644 --- a/src/shknam.c +++ b/src/shknam.c @@ -552,11 +552,7 @@ struct mkroom *sroom; eshkp->billct = eshkp->visitct = 0; eshkp->bill_p = (struct bill_x *)0; eshkp->customer[0] = '\0'; -#ifndef GOLDOBJ - shk->mgold = 1000L + 30L*(long)rnd(100); /* initial capital */ -#else mkmonmoney(shk, 1000L + 30L*(long)rnd(100)); /* initial capital */ -#endif if (shp->shknms == shkrings) (void) mongets(shk, TOUCHSTONE); nameshk(shk, shp->shknms); diff --git a/src/sit.c b/src/sit.c index 72c94c56b..aa3a16605 100644 --- a/src/sit.c +++ b/src/sit.c @@ -9,15 +9,6 @@ void take_gold() { -#ifndef GOLDOBJ - if (u.ugold <= 0) { - You_feel("a strange sensation."); - } else { - You("notice you have no gold!"); - u.ugold = 0; - context.botl = 1; - } -#else struct obj *otmp, *nobj; int lost_money = 0; for (otmp = invent; otmp; otmp = nobj) { @@ -33,7 +24,6 @@ take_gold() You("notice you have no money!"); context.botl = 1; } -#endif } int @@ -324,10 +314,8 @@ rndcurse() /* curse a few inventory items at random! */ } for (otmp = invent; otmp; otmp = otmp->nobj) { -#ifdef GOLDOBJ /* gold isn't subject to being cursed or blessed */ if (otmp->oclass == COIN_CLASS) continue; -#endif nobj++; } if (nobj) { @@ -335,10 +323,8 @@ rndcurse() /* curse a few inventory items at random! */ cnt > 0; cnt--) { onum = rnd(nobj); for (otmp = invent; otmp; otmp = otmp->nobj) { -#ifdef GOLDOBJ /* as above */ if (otmp->oclass == COIN_CLASS) continue; -#endif if (--onum == 0) break; /* found the target */ } /* the !otmp case should never happen; picking an already diff --git a/src/sounds.c b/src/sounds.c index 2a7df5823..593c3ecd6 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -874,11 +874,7 @@ register struct monst *mtmp; else verbl_msg = "Relax, this won't hurt a bit."; break; case MS_GUARD: -#ifndef GOLDOBJ - if (u.ugold) -#else if (money_cnt(invent)) -#endif verbl_msg = "Please drop that gold and follow me."; else verbl_msg = "Please follow me."; diff --git a/src/steal.c b/src/steal.c index f98cd693e..0812a79df 100644 --- a/src/steal.c +++ b/src/steal.c @@ -22,66 +22,6 @@ register struct obj *otmp; "armor"); } -#ifndef GOLDOBJ -long /* actually returns something that fits in an int */ -somegold() -{ -#ifdef LINT /* long conv. ok */ - return(0L); -#else - return (long)( (u.ugold < 100) ? u.ugold : - (u.ugold > 10000) ? rnd(10000) : rnd((int) u.ugold) ); -#endif -} - -void -stealgold(mtmp) -register struct monst *mtmp; -{ - register struct obj *gold = g_at(u.ux, u.uy); - register long tmp; - struct monst *who; - const char *whose, *what; - - if (gold && (!u.ugold || gold->quan > u.ugold || !rn2(5))) { - mtmp->mgold += gold->quan; - delobj(gold); - newsym(u.ux, u.uy); - if (u.usteed) { - who = u.usteed; - whose = s_suffix(y_monnam(who)); - what = makeplural(mbodypart(who, FOOT)); - } else { - who = &youmonst; - whose = "your"; - what = makeplural(body_part(FOOT)); - } - /* [ avoid "between your rear regions" :-] */ - if (slithy(who->data)) what = "coils"; - /* reduce "rear hooves/claws" to "hooves/claws" */ - if (!strncmp(what, "rear ", 5)) what += 5; - pline("%s quickly snatches some gold from %s %s %s!", - Monnam(mtmp), - (Levitation || Flying) ? "beneath" : "between", - whose, what); - if(!u.ugold || !rn2(5)) { - if (!tele_restrict(mtmp)) (void) rloc(mtmp, FALSE); - /* do not set mtmp->mavenge here; gold on the floor is fair game */ - monflee(mtmp, 0, FALSE, FALSE); - } - } else if(u.ugold) { - u.ugold -= (tmp = somegold()); - Your("purse feels lighter."); - mtmp->mgold += tmp; - if (!tele_restrict(mtmp)) (void) rloc(mtmp, FALSE); - mtmp->mavenge = 1; - monflee(mtmp, 0, FALSE, FALSE); - context.botl = 1; - } -} - -#else /* !GOLDOBJ */ - long /* actually returns something that fits in an int */ somegold(umoney) long umoney; @@ -167,7 +107,6 @@ register struct monst *mtmp; context.botl = 1; } } -#endif /* GOLDOBJ */ /* steal armor after you finish taking it off */ unsigned int stealoid; /* object to be stolen */ @@ -257,7 +196,7 @@ boolean unchain_ball; /* whether to unpunish or just unwield */ /* Returns 1 when something was stolen (or at least, when N should flee now) * Returns -1 if the monster died in the attempt * Avoid stealing the object stealoid - * GOLDOBJ: nymphs and monkeys won't steal coins + * Nymphs and monkeys won't steal coins */ int steal(mtmp, objnambuf) @@ -304,9 +243,7 @@ nothing_to_steal: tmp = 0; for(otmp = invent; otmp; otmp = otmp->nobj) if ((!uarm || otmp != uarmc) && otmp != uskin -#ifdef GOLDOBJ && otmp->oclass != COIN_CLASS -#endif #ifdef INVISIBLE_OBJECTS && (!otmp->oinvis || perceives(mtmp->data)) #endif @@ -317,9 +254,7 @@ nothing_to_steal: tmp = rn2(tmp); for(otmp = invent; otmp; otmp = otmp->nobj) if ((!uarm || otmp != uarmc) && otmp != uskin -#ifdef GOLDOBJ && otmp->oclass != COIN_CLASS -#endif #ifdef INVISIBLE_OBJECTS && (!otmp->oinvis || perceives(mtmp->data)) #endif @@ -494,13 +429,6 @@ register struct obj *otmp; or kicking code shouldn't continue to track and place it */ if (otmp == thrownobj) thrownobj = 0; else if (otmp == kickedobj) kickedobj = 0; -#ifndef GOLDOBJ - if (otmp->oclass == COIN_CLASS) { - mtmp->mgold += otmp->quan; - obfree(otmp, (struct obj *)0); - freed_otmp = 1; - } else { -#endif boolean snuff_otmp = FALSE; /* don't want hidden light source inside the monster; assumes that engulfers won't have external inventories; whirly monsters cause @@ -523,9 +451,6 @@ register struct obj *otmp; freed_otmp = add_to_minv(mtmp, otmp); /* and we had to defer this until object is in mtmp's inventory */ if (snuff_otmp) snuff_light_source(mtmp->mx, mtmp->my); -#ifndef GOLDOBJ - } -#endif return freed_otmp; } @@ -686,35 +611,14 @@ boolean is_pet; /* If true, pet should keep wielded/worn items */ /* vault guard's gold goes away rather than be dropped... */ if (mtmp->isgd && -#ifdef GOLDOBJ (otmp = findgold(mtmp->minvent)) != 0 -#else - mtmp->mgold != 0L -#endif ) { if (canspotmon(mtmp)) pline("%s gold %s.", s_suffix(Monnam(mtmp)), canseemon(mtmp) ? "vanishes" : "seems to vanish"); -#ifdef GOLDOBJ obfree(otmp, (struct obj *)0); -#else - mtmp->mgold = 0L; -#endif } /* isgd && has gold */ -#ifndef GOLDOBJ - /* handle gold first since droppables() would get stuck on it */ - if (mtmp->mgold) { - long g = mtmp->mgold; - - (void) mkgold(g, omx, omy); - if (is_pet && cansee(omx, omy) && flags.verbose) - pline("%s drops %ld gold piece%s.", Monnam(mtmp), - g, plur(g)); - mtmp->mgold = 0L; - } -#endif - while ((otmp = (is_pet ? droppables(mtmp) : mtmp->minvent)) != 0) { obj_extract_self(otmp); mdrop_obj(mtmp, otmp, is_pet && flags.verbose); diff --git a/src/trap.c b/src/trap.c index cde767106..636598789 100644 --- a/src/trap.c +++ b/src/trap.c @@ -3176,30 +3176,7 @@ boolean *lostsome; /* else continue */ } } -#ifndef GOLDOBJ - if (!otmp) { - /* Nothing available left to drop; try gold */ - if (u.ugold) { - pline("In desperation, you drop your purse."); - /* Hack: gold is not in the inventory, so make a gold object - * and put it at the head of the inventory list. - */ - obj = mkgoldobj(u.ugold); /* removes from u.ugold */ - obj->in_use = TRUE; - u.ugold = obj->quan; /* put the gold back */ - assigninvlet(obj); /* might end up as NOINVSYM */ - obj->nobj = invent; - invent = obj; - *lostsome = TRUE; - dropx(obj); - continue; /* Try again */ - } - /* We can't even drop gold! */ - return (FALSE); - } -#else if (!otmp) return (FALSE); /* nothing to drop! */ -#endif if (otmp->owornmask) remove_worn_item(otmp, FALSE); *lostsome = TRUE; dropx(otmp); diff --git a/src/u_init.c b/src/u_init.c index 09930dd11..bfe54671c 100644 --- a/src/u_init.c +++ b/src/u_init.c @@ -210,12 +210,10 @@ static struct trobj Wishing[] = { { WAN_WISHING, 3, WAND_CLASS, 1, 0 }, { 0, 0, 0, 0, 0 } }; -#ifdef GOLDOBJ static struct trobj Money[] = { { GOLD_PIECE, 0 , COIN_CLASS, 1, 0 }, { 0, 0, 0, 0, 0 } }; -#endif /* race-based substitutions for initial inventory; the weaker cloak for elven rangers is intentional--they shoot better */ @@ -597,11 +595,7 @@ u_init() skill_init(Skill_C); break; case PM_HEALER: -#ifndef GOLDOBJ - u.ugold = u.ugold0 = rn1(1000, 1001); -#else u.umoney0 = rn1(1000, 1001); -#endif ini_inv(Healer); if(!rn2(25)) ini_inv(Lamp); knows_object(POT_FULL_HEALING); @@ -650,11 +644,7 @@ u_init() break; case PM_ROGUE: Rogue[R_DAGGERS].trquan = rn1(10, 6); -#ifndef GOLDOBJ - u.ugold = u.ugold0 = 0; -#else u.umoney0 = 0; -#endif ini_inv(Rogue); if(!rn2(5)) ini_inv(Blindfold); knows_object(SACK); @@ -670,11 +660,7 @@ u_init() break; case PM_TOURIST: Tourist[T_DARTS].trquan = rn1(20, 21); -#ifndef GOLDOBJ - u.ugold = u.ugold0 = rnd(1000); -#else u.umoney0 = rnd(1000); -#endif ini_inv(Tourist); if(!rn2(25)) ini_inv(Tinopener); else if(!rn2(25)) ini_inv(Leash); @@ -778,12 +764,8 @@ u_init() if (wizard) read_wizkit(); -#ifndef GOLDOBJ - u.ugold0 += hidden_gold(); /* in case sack has gold in it */ -#else if (u.umoney0) ini_inv(Money); u.umoney0 += hidden_gold(); /* in case sack has gold in it */ -#endif find_ac(); /* get initial ac value */ init_attr(75); /* init attribute values */ @@ -939,12 +921,10 @@ register struct trobj *trop; nocreate4 = otyp; } -#ifdef GOLDOBJ if (trop->trclass == COIN_CLASS) { /* no "blessed" or "identified" money */ obj->quan = u.umoney0; } else { -#endif if (objects[otyp].oc_uses_known) obj->known = 1; obj->dknown = obj->bknown = obj->rknown = 1; if (Is_container(obj) || obj->otyp == STATUE) { @@ -966,9 +946,7 @@ register struct trobj *trop; obj->spe = trop->trspe; if (trop->trbless != UNDEF_BLESS) obj->blessed = trop->trbless; -#ifdef GOLDOBJ } -#endif /* defined after setting otyp+quan + blessedness */ obj->owt = weight(obj); obj = addinv(obj); diff --git a/src/uhitm.c b/src/uhitm.c index 0057e573d..04ec05c11 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -1461,13 +1461,6 @@ register struct attack *mattk; tmp = 0; break; case AD_SGLD: -#ifndef GOLDOBJ - if (mdef->mgold) { - u.ugold += mdef->mgold; - mdef->mgold = 0; - Your("purse feels heavier."); - } -#else /* This you as a leprechaun, so steal real gold only, no lesser coins */ { @@ -1484,7 +1477,6 @@ register struct attack *mattk; } } } -#endif exercise(A_DEX, TRUE); tmp = 0; break; diff --git a/src/vault.c b/src/vault.c index 487cb8e7c..87c13b31a 100644 --- a/src/vault.c +++ b/src/vault.c @@ -366,11 +366,7 @@ fnd: return; } verbalize("I don't know you."); -#ifndef GOLDOBJ - umoney = u.ugold; -#else umoney = money_cnt(invent); -#endif if (Deaf) { ; } else if (!umoney && !hidden_gold()) { @@ -513,12 +509,8 @@ register struct monst *grd; grd_in_vault = *in_rooms(grd->mx, grd->my, VAULT)? TRUE : FALSE; boolean disappear_msg_seen = FALSE, semi_dead = (grd->mhp <= 0); -#ifndef GOLDOBJ - register boolean u_carry_gold = ((u.ugold + hidden_gold()) > 0L); -#else long umoney = money_cnt(invent); register boolean u_carry_gold = ((umoney + hidden_gold()) > 0L); -#endif boolean see_guard, newspot = FALSE; if(!on_level(&(egrd->gdlevel), &u.uz)) return(-1); @@ -560,15 +552,9 @@ register struct monst *grd; if(egrd->warncnt == 3 && !Deaf) verbalize("I repeat, %sfollow me!", u_carry_gold ? ( -#ifndef GOLDOBJ - !u.ugold ? - "drop that hidden gold and " : - "drop that gold and ") : ""); -#else !umoney ? "drop that hidden money and " : "drop that money and ") : ""); -#endif if(egrd->warncnt == 7) { m = grd->mx; n = grd->my; @@ -654,13 +640,8 @@ letknow: if (m == u.ux && n == u.uy) { struct obj *gold = g_at(m,n); /* Grab the gold from between the hero's feet. */ -#ifndef GOLDOBJ - grd->mgold += gold->quan; - delobj(gold); -#else obj_extract_self(gold); add_to_minv(grd, gold); -#endif newsym(m,n); } else if (m == x && n == y) { mpickgold(grd); /* does a newsym */ @@ -828,30 +809,17 @@ void paygd() { register struct monst *grd = findgd(); -#ifndef GOLDOBJ - struct obj *gold; -#else long umoney = money_cnt(invent); struct obj *coins, *nextcoins; -#endif int gx,gy; char buf[BUFSZ]; -#ifndef GOLDOBJ - if (!u.ugold || !grd) return; -#else if (!umoney || !grd) return; -#endif if (u.uinvault) { Your("%ld %s goes into the Magic Memory Vault.", -#ifndef GOLDOBJ - u.ugold, - currency(u.ugold)); -#else umoney, currency(umoney)); -#endif gx = u.ux; gy = u.uy; } else { @@ -868,10 +836,6 @@ paygd() plname, mons[u.umonster].mname); make_grave(gx, gy, buf); } -#ifndef GOLDOBJ - place_object(gold = mkgoldobj(u.ugold), gx, gy); - stackobj(gold); -#else for (coins = invent; coins; coins = nextcoins) { nextcoins = coins->nobj; if (objects[coins->otyp].oc_class == COIN_CLASS) { @@ -880,7 +844,6 @@ paygd() stackobj(coins); } } -#endif mongone(grd); } diff --git a/src/wield.c b/src/wield.c index 32a3e1eb4..dbb5d271f 100644 --- a/src/wield.c +++ b/src/wield.c @@ -238,17 +238,10 @@ register struct obj *obj; static NEARDATA const char wield_objs[] = { ALL_CLASSES, ALLOW_NONE, WEAPON_CLASS, TOOL_CLASS, 0 }; -#ifdef GOLDOBJ static NEARDATA const char ready_objs[] = { COIN_CLASS, ALL_CLASSES, ALLOW_NONE, WEAPON_CLASS, 0 }; static NEARDATA const char bullets[] = /* (note: different from dothrow.c) */ { COIN_CLASS, ALL_CLASSES, ALLOW_NONE, GEM_CLASS, WEAPON_CLASS, 0 }; -#else -static NEARDATA const char ready_objs[] = - { ALL_CLASSES, ALLOW_NONE, WEAPON_CLASS, 0 }; -static NEARDATA const char bullets[] = /* (note: different from dothrow.c) */ - { ALL_CLASSES, ALLOW_NONE, GEM_CLASS, WEAPON_CLASS, 0 }; -#endif int dowield() diff --git a/src/zap.c b/src/zap.c index 173bee625..c4d98c33c 100644 --- a/src/zap.c +++ b/src/zap.c @@ -436,11 +436,7 @@ struct monst *mtmp; mstatusline(mtmp); if (notonhead) return; /* don't show minvent for long worm tail */ -#ifndef GOLDOBJ - if (mtmp->minvent || mtmp->mgold) { -#else if (mtmp->minvent) { -#endif for (otmp = mtmp->minvent; otmp; otmp = otmp->nobj) { otmp->dknown = 1; /* treat as "seen" */ if (Is_container(otmp) || otmp->otyp == STATUE) { @@ -3661,9 +3657,6 @@ const char *fltxt; obfree(otmp, (struct obj *)0); } } -#ifndef GOLDOBJ - mon->mgold = 0L; -#endif #undef oresist_disintegration diff --git a/sys/amiga/amirip.c b/sys/amiga/amirip.c index 00e98b12d..5b625ba6d 100644 --- a/sys/amiga/amirip.c +++ b/sys/amiga/amirip.c @@ -183,12 +183,7 @@ time_t when; tomb_text(buf); /* Put $ on stone */ - Sprintf(buf, "%ld Au", -#ifndef GOLDOBJ - u.ugold); -#else - done_money); -#endif + Sprintf(buf, "%ld Au", done_money); buf[STONE_LINE_LEN] = 0; /* It could be a *lot* of gold :-) */ tomb_text(buf); diff --git a/sys/wince/mhstatus.c b/sys/wince/mhstatus.c index 6e18ed12a..dd86e2d6e 100644 --- a/sys/wince/mhstatus.c +++ b/sys/wince/mhstatus.c @@ -233,11 +233,7 @@ void FormatStatusString(char* text, int format) (void) describe_level(nb=eos(nb)); Sprintf(nb = eos(nb), "%c:%-2ld HP:%d(%d) Pw:%d(%d) AC:%-2d", showsyms[COIN_CLASS + SYM_OFF_O], -#ifndef GOLDOBJ - u.ugold, -#else money_cnt(invent), -#endif hp, hpmax, u.uen, u.uenmax, u.uac); if (Upolyd) diff --git a/util/makedefs.c b/util/makedefs.c index ad2186887..9102945ce 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -960,7 +960,6 @@ do_rumors() * */ #define IGNORED_FEATURES ( 0L \ - | (1L << 12) /* GOLDOBJ */ \ | (1L << 19) /* EXP_ON_BOTL */ \ | (1L << 20) /* SCORE_ON_BOTL */ \ | (1L << 27) /* ZEROCOMP */ \ @@ -993,9 +992,6 @@ make_version() | (1L << 6) #endif /* objects (10..14) */ -#ifdef GOLDOBJ - | (1L << 10) -#endif /* flag bits and/or other global variables (15..26) */ #ifdef TEXTCOLOR | (1L << 17) @@ -1239,9 +1235,6 @@ static const char *build_opts[] = { #ifdef MFLOPPY "floppy drive support", #endif -#ifdef GOLDOBJ - "gold object in inventories", -#endif #ifdef INSURANCE "insurance files for recovering from crashes", #endif diff --git a/win/Qt/qt_win.cpp b/win/Qt/qt_win.cpp index af412e25a..16ff7873b 100644 --- a/win/Qt/qt_win.cpp +++ b/win/Qt/qt_win.cpp @@ -2550,11 +2550,7 @@ void NetHackQtStatusWindow::updateStats() dlevel.setLabel(buf,(long)depth(&u.uz)); } -#ifndef GOLDOBJ - gold.setLabel("Au:", u.ugold); -#else gold.setLabel("Au:", money_cnt(invent)); -#endif if (u.mtimedone) { // You're a monster! @@ -3296,11 +3292,7 @@ static char** rip_line=0; Sprintf(rip_line[NAME_LINE], "%s", plname); /* Put $ on stone */ -#ifndef GOLDOBJ - Sprintf(rip_line[GOLD_LINE], "%ld Au", u.ugold); -#else Sprintf(rip_line[GOLD_LINE], "%ld Au", done_money); -#endif /* Put together death description */ formatkiller(buf, sizeof buf, how); diff --git a/win/X11/winstat.c b/win/X11/winstat.c index 42462cbc3..ab65a168c 100644 --- a/win/X11/winstat.c +++ b/win/X11/winstat.c @@ -600,11 +600,7 @@ update_fancy_status(wp) case F_NAME: val = (long) 0L; break; /* special */ case F_DLEVEL: val = (long) 0L; break; /* special */ -#ifndef GOLDOBJ - case F_GOLD: val = (long) u.ugold; break; -#else case F_GOLD: val = money_cnt(invent); break; -#endif case F_HP: val = (long) (u.mtimedone ? (u.mh > 0 ? u.mh : 0): (u.uhp > 0 ? u.uhp : 0)); break; diff --git a/win/X11/wintext.c b/win/X11/wintext.c index 9b337d3b2..795b765a7 100644 --- a/win/X11/wintext.c +++ b/win/X11/wintext.c @@ -469,11 +469,7 @@ calculate_rip_text(int how, time_t when) /* Put $ on stone */ Sprintf(rip_line[GOLD_LINE], "%ld Au", -#ifndef GOLDOBJ - u.ugold); -#else done_money); -#endif /* Put together death description */ formatkiller(buf, sizeof buf, how); diff --git a/win/gem/wingem.c b/win/gem/wingem.c index 87d175231..ccc076bdf 100644 --- a/win/gem/wingem.c +++ b/win/gem/wingem.c @@ -1088,11 +1088,7 @@ time_t when; Sprintf(rip_line[NAME_LINE], "%s", plname); /* Put $ on stone */ Sprintf(rip_line[GOLD_LINE], "%ld Au", -#ifndef GOLDOBJ - u.ugold); -#else done_money); -#endif /* Put together death description */ formatkiller(buf, sizeof buf, how); diff --git a/win/gnome/gnbind.c b/win/gnome/gnbind.c index c48535a26..b001de04f 100644 --- a/win/gnome/gnbind.c +++ b/win/gnome/gnbind.c @@ -1183,12 +1183,7 @@ void gnome_outrip(winid wid, int how, time_t when) Strcat(ripString, buf); /* Put $ on stone */ - Sprintf(buf, "%ld Au\n", -#ifndef GOLDOBJ - u.ugold); -#else - done_money); -#endif + Sprintf(buf, "%ld Au\n", done_money); Strcat(ripString, buf); /* Put together death description */ diff --git a/win/gnome/gnstatus.c b/win/gnome/gnstatus.c index 6e3841cc3..37e1d7bf6 100644 --- a/win/gnome/gnstatus.c +++ b/win/gnome/gnstatus.c @@ -434,9 +434,7 @@ void ghack_status_window_update_stats() const char* hung; const char* enc; static int firstTime=TRUE; -#ifdef GOLDOBJ long umoney; -#endif /* First, fill in the player name and the dungeon level */ strcpy(buf, plname); @@ -565,30 +563,17 @@ void ghack_status_window_update_stats() gtk_label_set( GTK_LABEL( chaLabel), buf); /* Now do the non-pixmaped stats (gold and such) */ -#ifndef GOLDOBJ - sprintf(buf,"Au:%ld", u.ugold); - if (lastAu < u.ugold && firstTime==FALSE) { -#else umoney = money_cnt(invent); sprintf(buf,"Au:%ld", umoney); if (lastAu < umoney && firstTime==FALSE) { -#endif /* Ok, this changed so add it to the highlighing list */ ghack_highlight_widget( goldLabel, normalStyle, greenStyle); } -#ifndef GOLDOBJ - else if (lastAu > u.ugold && firstTime==FALSE) { -#else else if (lastAu > umoney && firstTime==FALSE) { -#endif /* Ok, this changed so add it to the highlighing list */ ghack_highlight_widget( goldLabel, normalStyle, redStyle); } -#ifndef GOLDOBJ - lastAu = u.ugold; -#else lastAu = umoney; -#endif gtk_label_set( GTK_LABEL( goldLabel), buf); if (u.mtimedone) { diff --git a/win/win32/mswproc.c b/win/win32/mswproc.c index 39776d87b..7d2177286 100644 --- a/win/win32/mswproc.c +++ b/win/win32/mswproc.c @@ -1796,11 +1796,7 @@ void mswin_outrip(winid wid, int how, time_t when) putstr(wid, 0, buf); /* Put $ on stone */ -#ifndef GOLDOBJ - Sprintf(buf, "%ld Au", u.ugold); -#else Sprintf(buf, "%ld Au", done_money); -#endif buf[STONE_LINE_LEN] = 0; /* It could be a *lot* of gold :-) */ putstr(wid, 0, buf); From 612852f7de8a1d621ca29335edadef77a1a05369 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Mon, 9 Feb 2015 20:56:44 +0200 Subject: [PATCH 034/132] 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. --- include/global.h | 2 + include/hack.h | 28 +++++++++++-- include/sys.h | 1 + src/apply.c | 4 +- src/attrib.c | 46 ++++++---------------- src/bones.c | 4 +- src/cmd.c | 21 +++++----- src/dbridge.c | 100 ++++++++++++----------------------------------- src/dig.c | 36 +++++------------ src/dungeon.c | 2 + src/eat.c | 70 --------------------------------- src/files.c | 3 ++ src/hack.c | 2 +- src/light.c | 12 ++---- src/makemon.c | 24 +++--------- src/mklev.c | 11 +----- src/mkmaze.c | 8 +--- src/mkobj.c | 16 ++------ src/mon.c | 4 +- src/pickup.c | 4 +- src/questpgr.c | 11 +++--- src/restore.c | 4 +- src/rnd.c | 20 ++++------ src/save.c | 4 +- src/shk.c | 6 +-- src/sp_lev.c | 11 ------ src/steal.c | 2 +- src/sys.c | 1 + src/teleport.c | 4 +- src/zap.c | 8 +--- sys/unix/sysconf | 5 +++ win/tty/wintty.c | 2 +- 32 files changed, 136 insertions(+), 340 deletions(-) diff --git a/include/global.h b/include/global.h index 7e8acda38..985066520 100644 --- a/include/global.h +++ b/include/global.h @@ -11,6 +11,8 @@ #define BETA /* development or beta testing [MRS] */ +#define DEBUG + /* * Files expected to exist in the playground directory. */ diff --git a/include/hack.h b/include/hack.h index c88d8dd56..0ace170e5 100644 --- a/include/hack.h +++ b/include/hack.h @@ -11,9 +11,31 @@ #include "config.h" #endif -/* For debugging beta code. */ -#ifdef BETA -#define Dpline pline +#ifdef DEBUG +/* due to strstr(), mon.c matches makemon.c */ +# define showdebug() (sysopt.debugfiles && \ + ((sysopt.debugfiles[0] == '*') || \ + (strstr( __FILE__ , sysopt.debugfiles)))) + +/* GCC understands this syntax */ +# ifdef __GNUC__ +/* ... but whines about it anyway without these pragmas. */ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wvariadic-macros" +# define debugpline(args...) \ + do { if (showdebug()) pline( args ); } while(0); +# pragma GCC diagnostic pop +# endif + +/* and Visual Studio understands this one */ +# ifdef _MSC_VER +# define debugpline(...) \ + do { if (showdebug()) pline(__VA_ARGS__); } while(0); +# endif + +#else +# define showdebug() (0) +# define debugpline(...) #endif #define TELL 1 diff --git a/include/sys.h b/include/sys.h index 227e68781..ac39239ee 100644 --- a/include/sys.h +++ b/include/sys.h @@ -15,6 +15,7 @@ struct sysopt { char *recover; /* how to run recover - may be overridden by win port */ char *wizards; char *shellers; /* like wizards, for ! command (-DSHELL) */ + char *debugfiles; /* files to show debugplines in. '*' is all. */ int maxplayers; /* record file */ int persmax; diff --git a/src/apply.c b/src/apply.c index e92e6199f..d2377b51e 100644 --- a/src/apply.c +++ b/src/apply.c @@ -1773,9 +1773,7 @@ long timeout; char monnambuf[BUFSZ], carriedby[BUFSZ]; if (!figurine) { -#ifdef DEBUG - pline("null figurine in fig_transform()"); -#endif + debugpline("null figurine in fig_transform()"); return; } silent = (timeout != monstermoves); /* happened while away */ diff --git a/src/attrib.c b/src/attrib.c index b2d5738b8..8bba3d61c 100644 --- a/src/attrib.c +++ b/src/attrib.c @@ -8,8 +8,6 @@ #include "hack.h" #include -/* #define DEBUG */ /* uncomment for debugging info */ - /* part of the output on gain or loss of attribute */ static const char * const plusattr[] = { @@ -349,9 +347,7 @@ exercise(i, inc_or_dec) int i; boolean inc_or_dec; { -#ifdef DEBUG - pline("Exercise:"); -#endif + debugpline("Exercise:"); if (i == A_INT || i == A_CHA) return; /* can't exercise these */ /* no physical exercise while polymorphed; the body's temporary */ @@ -368,12 +364,10 @@ boolean inc_or_dec; * Note: *YES* ACURR is the right one to use. */ AEXE(i) += (inc_or_dec) ? (rn2(19) > ACURR(i)) : -rn2(2); -#ifdef DEBUG - pline("%s, %s AEXE = %d", + debugpline("%s, %s AEXE = %d", (i == A_STR) ? "Str" : (i == A_WIS) ? "Wis" : (i == A_DEX) ? "Dex" : "Con", (inc_or_dec) ? "inc" : "dec", AEXE(i)); -#endif } if (moves > 0 && (i == A_STR || i == A_CON)) (void)encumber_msg(); } @@ -398,9 +392,7 @@ exerper() (u.uhunger > 50) ? HUNGRY : (u.uhunger > 0) ? WEAK : FAINTING; -#ifdef DEBUG - pline("exerper: Hunger checks"); -#endif + debugpline("exerper: Hunger checks"); switch (hs) { case SATIATED: exercise(A_DEX, FALSE); if (Role_if(PM_MONK)) @@ -416,9 +408,7 @@ exerper() } /* Encumberance Checks */ -#ifdef DEBUG - pline("exerper: Encumber checks"); -#endif + debugpline("exerper: Encumber checks"); switch (near_capacity()) { case MOD_ENCUMBER: exercise(A_STR, TRUE); break; case HVY_ENCUMBER: exercise(A_STR, TRUE); @@ -431,9 +421,7 @@ exerper() /* status checks */ if(!(moves % 5)) { -#ifdef DEBUG - pline("exerper: Status checks"); -#endif + debugpline("exerper: Status checks"); if ((HClairvoyant & (INTRINSIC|TIMEOUT)) && !BClairvoyant) exercise(A_WIS, TRUE); if (HRegeneration) exercise(A_STR, TRUE); @@ -464,15 +452,11 @@ exerchk() /* Check out the periodic accumulations */ exerper(); -#ifdef DEBUG if(moves >= context.next_attrib_check) - pline("exerchk: ready to test. multi = %d.", multi); -#endif + debugpline("exerchk: ready to test. multi = %d.", multi); /* Are we ready for a test? */ if(moves >= context.next_attrib_check && !multi) { -#ifdef DEBUG - pline("exerchk: testing."); -#endif + debugpline("exerchk: testing."); /* * Law of diminishing returns (Part II): * @@ -499,13 +483,11 @@ exerchk() exercise/abuse gradually wears off without impact then */ if (Upolyd && i != A_WIS) goto nextattrib; -#ifdef DEBUG - pline("exerchk: testing %s (%d).", + debugpline("exerchk: testing %s (%d).", (i == A_STR) ? "Str" : (i == A_INT) ? "Int?" : (i == A_WIS) ? "Wis" : (i == A_DEX) ? "Dex" : (i == A_CON) ? "Con" : (i == A_CHA) ? "Cha?" : "???", ax); -#endif /* * Law of diminishing returns (Part III): * @@ -515,13 +497,9 @@ exerchk() if (rn2(AVAL) > ((i != A_WIS) ? (abs(ax) * 2 / 3) : abs(ax))) goto nextattrib; -#ifdef DEBUG - pline("exerchk: changing %d.", i); -#endif + debugpline("exerchk: changing %d.", i); if(adjattrib(i, mod_val, -1)) { -#ifdef DEBUG - pline("exerchk: changed %d.", i); -#endif + debugpline("exerchk: changed %d.", i); /* if you actually changed an attrib - zero accumulation */ AEXE(i) = ax = 0; /* then print an explanation */ @@ -535,9 +513,7 @@ exerchk() AEXE(i) = (abs(ax) / 2) * mod_val; } context.next_attrib_check += rn1(200,800); -#ifdef DEBUG - pline("exerchk: next check at %ld.", context.next_attrib_check); -#endif + debugpline("exerchk: next check at %ld.", context.next_attrib_check); } } diff --git a/src/bones.c b/src/bones.c index 66a4d43f5..926b9079e 100644 --- a/src/bones.c +++ b/src/bones.c @@ -581,11 +581,9 @@ getbones() for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) { if (has_mname(mtmp)) sanitize_name(MNAME(mtmp)); if (mtmp->mhpmax == DEFUNCT_MONSTER) { -#if defined(DEBUG) if (wizard) - pline("Removing defunct monster %s from bones.", + debugpline("Removing defunct monster %s from bones.", mtmp->data->mname); -#endif mongone(mtmp); } else /* to correctly reset named artifacts on the level */ diff --git a/src/cmd.c b/src/cmd.c index f07abb78c..1477eabdc 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -5,7 +5,6 @@ #include "hack.h" #include "func_tab.h" -/* #define DEBUG */ /* uncomment for debugging */ #ifdef ALTMETA STATIC_VAR boolean alt_esc = FALSE; @@ -30,12 +29,8 @@ extern const char *enc_stat[]; /* encumbrance status from botl.c */ #define CMD_CLICKLOOK (char)0x8F #ifdef DEBUG -/* - * only one "wiz_debug_cmd" routine should be available (in whatever - * module you are trying to debug) or things are going to get rather - * hard to link :-) - */ -extern int NDECL(wiz_debug_cmd); +extern int NDECL(wiz_debug_cmd_bury); +extern int NDECL(wiz_debug_cmd_traveldisplay); #endif #ifdef DUMB /* stuff commented out in extern.h, but needed here */ @@ -389,11 +384,11 @@ extcmd_via_menu() /* here after # - now show pick-list of possible commands */ Sprintf(fmtstr, "%%-%ds", biggest + 15); } if (++i > MAX_EXT_CMD) { -# if defined(DEBUG) || defined(BETA) +# if defined(BETA) impossible( "Exceeded %d extended commands in doextcmd() menu; 'extmenu' disabled.", MAX_EXT_CMD); -# endif /* DEBUG || BETA */ +# endif /* BETA */ iflags.extmenu = 0; return -1; } @@ -454,7 +449,7 @@ extcmd_via_menu() /* here after # - now show pick-list of possible commands */ if (n == 1) { if (matchlevel > (QBUFSZ - 2)) { free((genericptr_t)pick_list); -# if defined(DEBUG) || defined(BETA) +# if defined(BETA) impossible("Too many chars (%d) entered in extcmd_via_menu()", matchlevel); # endif @@ -2507,7 +2502,8 @@ struct ext_func_tab extcmdlist[] = { {(char *)0, (char *)0, donull, TRUE}, /* vision */ {(char *)0, (char *)0, donull, TRUE}, /* wizsmell */ #ifdef DEBUG - {(char *)0, (char *)0, donull, TRUE}, /* wizdebug */ + {(char *)0, (char *)0, donull, TRUE}, /* wizdebug_traveldisplay */ + {(char *)0, (char *)0, donull, TRUE}, /* wizdebug_bury */ #endif {(char *)0, (char *)0, donull, TRUE}, /* wizrumorcheck */ {(char *)0, (char *)0, donull, TRUE}, /* wmode */ @@ -2534,7 +2530,8 @@ static const struct ext_func_tab debug_extcmdlist[] = { {"vision", "show vision array", wiz_show_vision, TRUE}, {"wizsmell", "smell monster", wiz_smell, TRUE}, #ifdef DEBUG - {"wizdebug", "wizard debug command", wiz_debug_cmd, TRUE}, + {"wizdebug_traveldisplay", "wizard debug: toggle travel display", wiz_debug_cmd_traveldisplay, TRUE}, + {"wizdebug_bury", "wizard debug: bury objs under and around you", wiz_debug_cmd_bury, TRUE}, #endif {"wizrumorcheck", "verify rumor boundaries", wiz_rumor_check, TRUE}, {"wmode", "show wall modes", wiz_show_wmodes, TRUE}, diff --git a/src/dbridge.c b/src/dbridge.c index b63d2714c..316b2707f 100644 --- a/src/dbridge.c +++ b/src/dbridge.c @@ -26,9 +26,6 @@ STATIC_DCL void FDECL(m_to_e, (struct monst *, int, int, struct entity *)); STATIC_DCL void FDECL(u_to_e, (struct entity *)); STATIC_DCL void FDECL(set_entity, (int, int, struct entity *)); STATIC_DCL const char *FDECL(e_nam, (struct entity *)); -#ifdef D_DEBUG -static const char *FDECL(Enam, (struct entity *)); /* unused */ -#endif STATIC_DCL const char *FDECL(E_phrase, (struct entity *, const char *)); STATIC_DCL boolean FDECL(e_survives_at, (struct entity *, int, int)); STATIC_DCL void FDECL(e_died, (struct entity *, int, int)); @@ -253,8 +250,8 @@ int x, y; (occupants[entitycnt].ex == x) && (occupants[entitycnt].ey == y)) break; + debugpline("entitycnt = %d", entitycnt); #ifdef D_DEBUG - pline("entitycnt = %d", entitycnt); wait_synch(); #endif return((entitycnt == ENTITIES)? @@ -319,19 +316,6 @@ struct entity *etmp; return(is_u(etmp)? "you" : mon_nam(etmp->emon)); } -#ifdef D_DEBUG -/* - * Enam is another unused utility routine: E_phrase is preferable. - */ - -static const char * -Enam(etmp) -struct entity *etmp; -{ - return(is_u(etmp)? "You" : Monnam(etmp->emon)); -} -#endif /* D_DEBUG */ - /* * Generates capitalized entity name, makes 2nd -> 3rd person conversion on * verb, where necessary. @@ -465,10 +449,8 @@ boolean chunks; { int misses; -#ifdef D_DEBUG if (chunks) - pline("Do chunks miss?"); -#endif + debugpline("Do chunks miss?"); if (automiss(etmp)) return(TRUE); @@ -488,9 +470,7 @@ boolean chunks; if (is_db_wall(etmp->ex, etmp->ey)) misses -= 3; /* less airspace */ -#ifdef D_DEBUG - pline("Miss chance = %d (out of 8)", misses); -#endif + debugpline("Miss chance = %d (out of 8)", misses); return((boolean)((misses >= rnd(8))? TRUE : FALSE)); } @@ -519,9 +499,7 @@ struct entity *etmp; if (is_db_wall(etmp->ex, etmp->ey)) tmp -= 2; /* less room to maneuver */ -#ifdef D_DEBUG - pline("%s to jump (%d chances in 10)", E_phrase(etmp, "try"), tmp); -#endif + debugpline("%s to jump (%d chances in 10)", E_phrase(etmp, "try"), tmp); return((boolean)((tmp >= rnd(10))? TRUE : FALSE)); } @@ -554,17 +532,13 @@ struct entity *etmp; if (at_portcullis) pline_The("portcullis misses %s!", e_nam(etmp)); -#ifdef D_DEBUG else - pline_The("drawbridge misses %s!", + debugpline("The drawbridge misses %s!", e_nam(etmp)); -#endif if (e_survives_at(etmp, oldx, oldy)) return; else { -#ifdef D_DEBUG - pline("Mon can't survive here"); -#endif + debugpline("Mon can't survive here"); if (at_portcullis) must_jump = TRUE; else @@ -583,9 +557,7 @@ struct entity *etmp; if (at_portcullis) { if (e_jumps(etmp)) { relocates = TRUE; -#ifdef D_DEBUG - pline("Jump succeeds!"); -#endif + debugpline("Jump succeeds!"); } else { if (e_inview) pline("%s crushed by the falling portcullis!", @@ -598,9 +570,7 @@ struct entity *etmp; } } else { /* tries to jump off bridge to original square */ relocates = !e_jumps(etmp); -#ifdef D_DEBUG - pline("Jump %s!", (relocates)? "fails" : "succeeds"); -#endif + debugpline("Jump %s!", (relocates)? "fails" : "succeeds"); } } @@ -610,17 +580,13 @@ struct entity *etmp; * would be inaccessible (i.e. etmp started on drawbridge square) or * unnecessary (i.e. etmp started here) in such a situation. */ -#ifdef D_DEBUG - pline("Doing relocation."); -#endif + debugpline("Doing relocation."); newx = oldx; newy = oldy; (void)find_drawbridge(&newx, &newy); if ((newx == oldx) && (newy == oldy)) get_wall_for_db(&newx, &newy); -#ifdef D_DEBUG - pline("Checking new square for occupancy."); -#endif + debugpline("Checking new square for occupancy."); if (relocates && (e_at(newx, newy))) { /* @@ -631,30 +597,24 @@ struct entity *etmp; struct entity *other; other = e_at(newx, newy); -#ifdef D_DEBUG - pline("New square is occupied by %s", e_nam(other)); -#endif + debugpline("New square is occupied by %s", e_nam(other)); if (e_survives_at(other, newx, newy) && automiss(other)) { relocates = FALSE; /* "other" won't budge */ -#ifdef D_DEBUG - pline("%s suicide.", E_phrase(etmp, "commit")); -#endif + debugpline("%s suicide.", E_phrase(etmp, "commit")); } else { -#ifdef D_DEBUG - pline("Handling %s", e_nam(other)); -#endif + debugpline("Handling %s", e_nam(other)); while ((e_at(newx, newy) != 0) && (e_at(newx, newy) != etmp)) do_entity(other); + debugpline("Checking existence of %s", e_nam(etmp)); #ifdef D_DEBUG - pline("Checking existence of %s", e_nam(etmp)); wait_synch(); #endif if (e_at(oldx, oldy) != etmp) { -#ifdef D_DEBUG - pline("%s moved or died in recursion somewhere", + debugpline("%s moved or died in recursion somewhere", E_phrase(etmp, "have")); +#ifdef D_DEBUG wait_synch(); #endif return; @@ -662,9 +622,7 @@ struct entity *etmp; } } if (relocates && !e_at(newx, newy)) {/* if e_at() entity = worm tail */ -#ifdef D_DEBUG - pline("Moving %s", e_nam(etmp)); -#endif + debugpline("Moving %s", e_nam(etmp)); if (!is_u(etmp)) { remove_monster(etmp->ex, etmp->ey); place_monster(etmp->emon, newx, newy); @@ -677,13 +635,13 @@ struct entity *etmp; etmp->ey = newy; e_inview = e_canseemon(etmp); } + debugpline("Final disposition of %s", e_nam(etmp)); #ifdef D_DEBUG - pline("Final disposition of %s", e_nam(etmp)); wait_synch(); #endif if (is_db_wall(etmp->ex, etmp->ey)) { + debugpline("%s in portcullis chamber", E_phrase(etmp, "are")); #ifdef D_DEBUG - pline("%s in portcullis chamber", E_phrase(etmp, "are")); wait_synch(); #endif if (e_inview) { @@ -703,13 +661,9 @@ struct entity *etmp; e_died(etmp, 0, CRUSHING); /* no message */ return; } -#ifdef D_DEBUG - pline("%s in here", E_phrase(etmp, "survive")); -#endif + debugpline("%s in here", E_phrase(etmp, "survive")); } else { -#ifdef D_DEBUG - pline("%s on drawbridge square", E_phrase(etmp, "are")); -#endif + debugpline("%s on drawbridge square", E_phrase(etmp, "are")); if (is_pool(etmp->ex, etmp->ey) && !e_inview) if (!Deaf) You_hear("a splash."); @@ -720,9 +674,7 @@ struct entity *etmp; E_phrase(etmp, "fall")); return; } -#ifdef D_DEBUG - pline("%s cannot survive on the drawbridge square",Enam(etmp)); -#endif + debugpline("%s cannot survive on the drawbridge square",E_phrase(etmp, NULL)); if (is_pool(etmp->ex, etmp->ey) || is_lava(etmp->ex, etmp->ey)) if (e_inview && !is_u(etmp)) { /* drown() will supply msgs if nec. */ @@ -938,9 +890,7 @@ int x,y; if (etmp1->edata) { e_inview = e_canseemon(etmp1); if (e_missed(etmp1, TRUE)) { -#ifdef D_DEBUG - pline("%s spared!", E_phrase(etmp1, "are")); -#endif + debugpline("%s spared!", E_phrase(etmp1, "are")); /* if there is water or lava here, fall in now */ if (is_u(etmp1)) spoteffects(FALSE); @@ -957,11 +907,9 @@ int x,y; } else { if (!Deaf && !is_u(etmp1) && !is_pool(x,y)) You_hear("a crushing sound."); -#ifdef D_DEBUG else - pline("%s from shrapnel", + debugpline("%s from shrapnel", E_phrase(etmp1, "die")); -#endif } killer.format = KILLED_BY_AN; Strcpy(killer.name, "collapsing drawbridge"); diff --git a/src/dig.c b/src/dig.c index dee64940c..00a60aaba 100644 --- a/src/dig.c +++ b/src/dig.c @@ -5,8 +5,6 @@ #include "hack.h" -/* #define DEBUG */ /* turn on for diagnostics */ - static NEARDATA boolean did_dig_msg; STATIC_DCL boolean NDECL(rm_waslit); @@ -1692,9 +1690,7 @@ bury_an_obj(otmp) struct obj *otmp2; boolean under_ice; -#ifdef DEBUG - pline("bury_an_obj: %s", xname(otmp)); -#endif + debugpline("bury_an_obj: %s", xname(otmp)); if (otmp == uball) { unpunish(); u.utrap = rn1(50,20); @@ -1756,10 +1752,8 @@ int x, y; { struct obj *otmp, *otmp2; -#ifdef DEBUG if(level.objects[x][y] != (struct obj *)0) - pline("bury_objs: at %d, %d", x, y); -#endif + debugpline("bury_objs: at %d, %d", x, y); for (otmp = level.objects[x][y]; otmp; otmp = otmp2) otmp2 = bury_an_obj(otmp); @@ -1776,9 +1770,7 @@ int x, y; struct obj *otmp, *otmp2, *bball; coord cc; -#ifdef DEBUG - pline("unearth_objs: at %d, %d", x, y); -#endif + debugpline("unearth_objs: at %d, %d", x, y); cc.x = x; cc.y = y; bball = buried_ball(&cc); for (otmp = level.buriedobjlist; otmp; otmp = otmp2) { @@ -1887,9 +1879,7 @@ void bury_monst(mtmp) struct monst *mtmp; { -#ifdef DEBUG - pline("bury_monst: %s", mon_nam(mtmp)); -#endif + debugpline("bury_monst: %s", mon_nam(mtmp)); if(canseemon(mtmp)) { if(is_flyer(mtmp->data) || is_floater(mtmp->data)) { pline_The("%s opens up, but %s is not swallowed!", @@ -1908,9 +1898,7 @@ struct monst *mtmp; void bury_you() { -#ifdef DEBUG - pline("bury_you"); -#endif + debugpline("bury_you"); if (!Levitation && !Flying) { if(u.uswallow) You_feel("a sensation like falling into a trap!"); @@ -1927,9 +1915,7 @@ bury_you() void unearth_you() { -#ifdef DEBUG - pline("unearth_you"); -#endif + debugpline("unearth_you"); u.uburied = FALSE; under_ground(0); if(!uamul || uamul->otyp != AMULET_OF_STRANGULATION) @@ -1940,9 +1926,7 @@ unearth_you() void escape_tomb() { -#ifdef DEBUG - pline("escape_tomb"); -#endif + debugpline("escape_tomb"); if ((Teleportation || can_teleport(youmonst.data)) && (Teleport_control || rn2(3) < Luck+2)) { You("attempt a teleport spell."); @@ -1974,9 +1958,7 @@ bury_obj(otmp) struct obj *otmp; { -#ifdef DEBUG - pline("bury_obj"); -#endif + debugpline("bury_obj"); if(cansee(otmp->ox, otmp->oy)) pline_The("objects on the %s tumble into a hole!", surface(otmp->ox, otmp->oy)); @@ -1987,7 +1969,7 @@ struct obj *otmp; #ifdef DEBUG int -wiz_debug_cmd() /* in this case, bury everything at your loc and around */ +wiz_debug_cmd_bury() /* in this case, bury everything at your loc and around */ { int x, y; diff --git a/src/dungeon.c b/src/dungeon.c index ed6b726de..4c8e6beeb 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -81,6 +81,8 @@ dumpit() s_level *x; branch *br; + if (!showdebug()) return; + for(i = 0; i < n_dgns; i++) { fprintf(stderr, "\n#%d \"%s\" (%s):\n", i, DD.dname, DD.proto); diff --git a/src/eat.c b/src/eat.c index 7259e6424..67e4b88b9 100644 --- a/src/eat.c +++ b/src/eat.c @@ -5,12 +5,6 @@ #include "hack.h" -/* #define DEBUG */ /* uncomment to enable new eat code debugging */ - -#ifdef DEBUG -#define debugpline if (wizard) pline -#endif - STATIC_PTR int NDECL(eatmdone); STATIC_PTR int NDECL(eatfood); STATIC_PTR void FDECL(costly_tin, (int)); @@ -290,15 +284,11 @@ recalc_wt() { struct obj *piece = context.victual.piece; -#ifdef DEBUG debugpline("Old weight = %d", piece->owt); debugpline("Used time = %d, Req'd time = %d", context.victual.usedtime, context.victual.reqtime); -#endif piece->owt = weight(piece); -#ifdef DEBUG debugpline("New weight = %d", piece->owt); -#endif } void @@ -308,9 +298,7 @@ reset_eat() /* called when eating interrupted by an event */ * the round is spent eating. */ if(context.victual.eating && !context.victual.doreset) { -#ifdef DEBUG debugpline("reset_eat..."); -#endif context.victual.doreset = TRUE; } return; @@ -325,9 +313,7 @@ register struct obj *otmp; (void) splitobj(otmp, otmp->quan - 1L); else otmp = splitobj(otmp, 1L); -#ifdef DEBUG debugpline("split object,"); -#endif } if (!otmp->oeaten) { @@ -388,9 +374,7 @@ struct obj *old_obj, *new_obj; STATIC_OVL void do_reset_eat() { -#ifdef DEBUG debugpline("do_reset_eat..."); -#endif if (context.victual.piece) { context.victual.o_id = 0; context.victual.piece = touchfood(context.victual.piece); @@ -731,57 +715,39 @@ register struct permonst *ptr; switch (type) { case FIRE_RES: res = (ptr->mconveys & MR_FIRE) != 0; -#ifdef DEBUG if (res) debugpline("can get fire resistance"); -#endif break; case SLEEP_RES: res = (ptr->mconveys & MR_SLEEP) != 0; -#ifdef DEBUG if (res) debugpline("can get sleep resistance"); -#endif break; case COLD_RES: res = (ptr->mconveys & MR_COLD) != 0; -#ifdef DEBUG if (res) debugpline("can get cold resistance"); -#endif break; case DISINT_RES: res = (ptr->mconveys & MR_DISINT) != 0; -#ifdef DEBUG if (res) debugpline("can get disintegration resistance"); -#endif break; case SHOCK_RES: /* shock (electricity) resistance */ res = (ptr->mconveys & MR_ELEC) != 0; -#ifdef DEBUG if (res) debugpline("can get shock resistance"); -#endif break; case POISON_RES: res = (ptr->mconveys & MR_POISON) != 0; -#ifdef DEBUG if (res) debugpline("can get poison resistance"); -#endif break; case TELEPORT: res = can_teleport(ptr); -#ifdef DEBUG if (res) debugpline("can get teleport"); -#endif break; case TELEPORT_CONTROL: res = control_teleport(ptr); -#ifdef DEBUG if (res) debugpline("can get teleport control"); -#endif break; case TELEPAT: res = telepathic(ptr); -#ifdef DEBUG if (res) debugpline("can get telepathy"); -#endif break; default: /* res stays 0 */ @@ -800,9 +766,7 @@ register struct permonst *ptr; { register int chance; -#ifdef DEBUG debugpline("Attempting to give intrinsic %d", type); -#endif /* some intrinsics are easier to get than others */ switch (type) { case POISON_RES: @@ -831,9 +795,7 @@ register struct permonst *ptr; switch (type) { case FIRE_RES: -#ifdef DEBUG debugpline("Trying to give fire resistance"); -#endif if(!(HFire_resistance & FROMOUTSIDE)) { You(Hallucination ? "be chillin'." : "feel a momentary chill."); @@ -841,27 +803,21 @@ register struct permonst *ptr; } break; case SLEEP_RES: -#ifdef DEBUG debugpline("Trying to give sleep resistance"); -#endif if(!(HSleep_resistance & FROMOUTSIDE)) { You_feel("wide awake."); HSleep_resistance |= FROMOUTSIDE; } break; case COLD_RES: -#ifdef DEBUG debugpline("Trying to give cold resistance"); -#endif if(!(HCold_resistance & FROMOUTSIDE)) { You_feel("full of hot air."); HCold_resistance |= FROMOUTSIDE; } break; case DISINT_RES: -#ifdef DEBUG debugpline("Trying to give disintegration resistance"); -#endif if(!(HDisint_resistance & FROMOUTSIDE)) { You_feel(Hallucination ? "totally together, man." : @@ -870,9 +826,7 @@ register struct permonst *ptr; } break; case SHOCK_RES: /* shock (electricity) resistance */ -#ifdef DEBUG debugpline("Trying to give shock resistance"); -#endif if(!(HShock_resistance & FROMOUTSIDE)) { if (Hallucination) You_feel("grounded in reality."); @@ -882,9 +836,7 @@ register struct permonst *ptr; } break; case POISON_RES: -#ifdef DEBUG debugpline("Trying to give poison resistance"); -#endif if(!(HPoison_resistance & FROMOUTSIDE)) { You_feel(Poison_resistance ? "especially healthy." : "healthy."); @@ -892,9 +844,7 @@ register struct permonst *ptr; } break; case TELEPORT: -#ifdef DEBUG debugpline("Trying to give teleport"); -#endif if(!(HTeleportation & FROMOUTSIDE)) { You_feel(Hallucination ? "diffuse." : "very jumpy."); @@ -902,9 +852,7 @@ register struct permonst *ptr; } break; case TELEPORT_CONTROL: -#ifdef DEBUG debugpline("Trying to give teleport control"); -#endif if(!(HTeleport_control & FROMOUTSIDE)) { You_feel(Hallucination ? "centered in your personal space." : @@ -913,9 +861,7 @@ register struct permonst *ptr; } break; case TELEPAT: -#ifdef DEBUG debugpline("Trying to give telepathy"); -#endif if(!(HTelepat & FROMOUTSIDE)) { You_feel(Hallucination ? "in touch with the cosmos." : @@ -926,9 +872,7 @@ register struct permonst *ptr; } break; default: -#ifdef DEBUG debugpline("Tried to give an impossible intrinsic"); -#endif break; } } @@ -1059,9 +1003,7 @@ register int pm; case PM_DISENCHANTER: /* picks an intrinsic at random and removes it; there's no feedback if hero already lacks the chosen ability */ -#ifdef DEBUG debugpline("using attrcurse to strip an intrinsic"); -#endif attrcurse(); break; case PM_MIND_FLAYER: @@ -1101,9 +1043,7 @@ register int pm; if (conveys_STR) { count = 1; tmp = -1; /* use -1 as fake prop index for STR */ -#ifdef DEBUG debugpline("\"Intrinsic\" strength, %d", tmp); -#endif } for (i = 1; i <= LAST_PROP; i++) { if (!intrinsic_possible(i, ptr)) continue; @@ -1113,9 +1053,7 @@ register int pm; of keeping the old choice (note that 1 in 1 and 0 in 1 are what we want for the first candidate) */ if (!rn2(count)) { -#ifdef DEBUG debugpline("Intrinsic %d replacing %d", i, tmp); -#endif tmp = i; } } @@ -1659,13 +1597,11 @@ start_eating(otmp) /* called as you start to eat */ { const char *old_nomovemsg, *save_nomovemsg; -#ifdef DEBUG debugpline("start_eating: %lx (victual = %lx)", otmp, context.victual.piece); debugpline("reqtime = %d", context.victual.reqtime); debugpline("(original reqtime = %d)", objects[otmp->otyp].oc_delay); debugpline("nmod = %d", context.victual.nmod); debugpline("oeaten = %d", otmp->oeaten); -#endif context.victual.fullwarn = context.victual.doreset = FALSE; context.victual.eating = TRUE; @@ -2505,15 +2441,11 @@ doeat() /* generic "eat" command funtion (see cmd.c) */ if (otmp->otyp == CORPSE) basenutrit = mons[otmp->corpsenm].cnutrit; else basenutrit = objects[otmp->otyp].oc_nutrition; -#ifdef DEBUG debugpline("before rounddiv: context.victual.reqtime == %d", context.victual.reqtime); debugpline("oeaten == %d, basenutrit == %d", otmp->oeaten, basenutrit); -#endif context.victual.reqtime = (basenutrit == 0 ? 0 : rounddiv(context.victual.reqtime * (long)otmp->oeaten, basenutrit)); -#ifdef DEBUG debugpline("after rounddiv: context.victual.reqtime == %d", context.victual.reqtime); -#endif /* calculate the modulo value (nutrit. units per round eating) * note: this isn't exact - you actually lose a little nutrition * due to this method. @@ -2615,9 +2547,7 @@ register int num; { /* See comments in newuhs() for discussion on force_save_hs */ boolean iseating = (occupation == eatfood) || force_save_hs; -#ifdef DEBUG debugpline("lesshungry(%d)", num); -#endif u.uhunger += num; if(u.uhunger >= 2000) { if (!iseating || context.victual.canchoke) { diff --git a/src/files.c b/src/files.c index 03b4d5ea3..f45db8bce 100644 --- a/src/files.c +++ b/src/files.c @@ -2107,6 +2107,9 @@ int src; } else if (src == SET_IN_SYS && match_varname(buf, "SHELLERS", 8)) { if (sysopt.shellers) free(sysopt.shellers); sysopt.shellers = dupstr(bufp); + } else if (src == SET_IN_SYS && match_varname(buf, "DEBUGFILES", 5)) { + if (sysopt.debugfiles) free(sysopt.debugfiles); + sysopt.debugfiles = dupstr(bufp); } else if (src == SET_IN_SYS && match_varname(buf, "SUPPORT", 7)) { if (sysopt.support) free(sysopt.support); sysopt.support = dupstr(bufp); diff --git a/src/hack.c b/src/hack.c index fafff35b6..1edfb9f4e 100644 --- a/src/hack.c +++ b/src/hack.c @@ -767,7 +767,7 @@ int mode; static boolean trav_debug = FALSE; int -wiz_debug_cmd() /* in this case, toggle display of travel debug info */ +wiz_debug_cmd_traveldisplay() /* in this case, toggle display of travel debug info */ { trav_debug = !trav_debug; return 0; diff --git a/src/light.c b/src/light.c index 244126021..f7d43eeee 100644 --- a/src/light.c +++ b/src/light.c @@ -393,18 +393,14 @@ write_ls(fd, ls) otmp = ls->id.a_obj; ls->id = zeroany; ls->id.a_uint = otmp->o_id; -#ifdef DEBUG - if (find_oid((unsigned)ls->id) != otmp) - panic("write_ls: can't find obj #%u!", ls->id.a_uint); -#endif + if (find_oid((unsigned)ls->id.a_uint) != otmp) + debugpline("write_ls: can't find obj #%u!", ls->id.a_uint); } else { /* ls->type == LS_MONSTER */ mtmp = (struct monst *)ls->id.a_monst; ls->id = zeroany; ls->id.a_uint = mtmp->m_id; -#ifdef DEBUG - if (find_mid((unsigned)ls->id, FM_EVERYWHERE) != mtmp) - panic("write_ls: can't find mon #%u!", ls->x_id); -#endif + if (find_mid((unsigned)ls->id.a_uint, FM_EVERYWHERE) != mtmp) + debugpline("write_ls: can't find mon #%u!", ls->id.a_uint); } ls->flags |= LSF_NEEDS_FIXUP; bwrite(fd, (genericptr_t)ls, sizeof(light_source)); diff --git a/src/makemon.c b/src/makemon.c index 9b63c72ec..afaa0140a 100644 --- a/src/makemon.c +++ b/src/makemon.c @@ -93,9 +93,7 @@ register int x, y, n; int cnttmp,cntdiv; cnttmp = cnt; -# ifdef DEBUG - pline("init group call x=%d,y=%d,n=%d,cnt=%d.", x, y, n, cnt); -# endif + debugpline("init group call x=%d,y=%d,n=%d,cnt=%d.", x, y, n, cnt); cntdiv = ((u.ulevel < 3) ? 4 : (u.ulevel < 5) ? 2 : 1); #endif /* Tuning: cut down on swarming at low character levels [mrs] */ @@ -760,10 +758,8 @@ boolean ghostly; mvitals[mndx].born++; if ((int) mvitals[mndx].born >= lim && !(mons[mndx].geno & G_NOGEN) && !(mvitals[mndx].mvflags & G_EXTINCT)) { -#ifdef DEBUG - if (wizard) pline("Automatically extinguished %s.", + if (wizard) debugpline("Automatically extinguished %s.", makeplural(mons[mndx].mname)); -#endif mvitals[mndx].mvflags |= G_EXTINCT; reset_rndmonst(mndx); } @@ -906,11 +902,9 @@ register int mmflags; /* if you are to make a specific monster and it has already been genocided, return */ if (mvitals[mndx].mvflags & G_GENOD) return((struct monst *) 0); -#ifdef DEBUG if (wizard && (mvitals[mndx].mvflags & G_EXTINCT)) - pline("Explicitly creating extinct monster %s.", + debugpline("Explicitly creating extinct monster %s.", mons[mndx].mname); -#endif } else { /* make a random (common) monster that can survive here. * (the special levels ask for random monsters at specific @@ -922,9 +916,7 @@ register int mmflags; do { if(!(ptr = rndmonst())) { -#ifdef DEBUG - pline("Warning: no monster."); -#endif + debugpline("Warning: no monster."); return((struct monst *) 0); /* no more monsters! */ } fakemon.data = ptr; /* set up for goodpos */ @@ -1260,9 +1252,7 @@ rndmonst() } if (mndx == SPECIAL_PM) { /* evidently they've all been exterminated */ -#ifdef DEBUG - pline("rndmonst: no common mons!"); -#endif + debugpline("rndmonst: no common mons!"); return (struct permonst *)0; } /* else `mndx' now ready for use below */ zlevel = level_difficulty(); @@ -1300,9 +1290,7 @@ rndmonst() if (rndmonst_state.choice_count <= 0) { /* maybe no common mons left, or all are too weak or too strong */ -#ifdef DEBUG - Norep("rndmonst: choice_count=%d", rndmonst_state.choice_count); -#endif + debugpline("rndmonst: choice_count=%d", rndmonst_state.choice_count); return (struct permonst *)0; } diff --git a/src/mklev.c b/src/mklev.c index 43bccaf40..2d4899984 100644 --- a/src/mklev.c +++ b/src/mklev.c @@ -4,11 +4,6 @@ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" -/* #define DEBUG */ /* uncomment to enable code debugging */ - -#ifdef DEBUG -#define debugpline if (wizard) pline -#endif /* for UNIX, Rand #def'd to (long)lrand48() or (long)random() */ /* croom->lx etc are schar (width <= int), so % arith ensures that */ @@ -689,9 +684,7 @@ makelevel() /* make a secret treasure vault, not connected to the rest */ if(do_vault()) { xchar w,h; -#ifdef DEBUG debugpline("trying to make a vault..."); -#endif w = 1; h = 1; if (check_room(&vault_x, &w, &vault_y, &h, TRUE)) { @@ -1567,9 +1560,7 @@ xchar x, y; *source = u.uz; insert_branch(br, TRUE); -#ifdef DEBUG - pline("Made knox portal."); -#endif + debugpline("Made knox portal."); place_branch(br, x, y); } diff --git a/src/mkmaze.c b/src/mkmaze.c index 7f4536869..0cfdbe35a 100644 --- a/src/mkmaze.c +++ b/src/mkmaze.c @@ -587,12 +587,10 @@ register const char *s; int x_range = x_maze_max - x_maze_min - 2*INVPOS_X_MARGIN - 1, y_range = y_maze_max - y_maze_min - 2*INVPOS_Y_MARGIN - 1; -#ifdef DEBUG if (x_range <= INVPOS_X_MARGIN || y_range <= INVPOS_Y_MARGIN || (x_range * y_range) <= (INVPOS_DISTANCE * INVPOS_DISTANCE)) - panic("inv_pos: maze is too small! (%d x %d)", + debugpline("inv_pos: maze is too small! (%d x %d)", x_maze_max, y_maze_max); -#endif inv_pos.x = inv_pos.y = 0; /*{occupied() => invocation_pos()}*/ do { x = rn1(x_range, x_maze_min + INVPOS_X_MARGIN + 1); @@ -879,10 +877,8 @@ register xchar x, y, todnum, todlevel; impossible("portal on top of portal??"); return; } -#ifdef DEBUG - pline("mkportal: at (%d,%d), to %s, level %d", + debugpline("mkportal: at (%d,%d), to %s, level %d", x, y, dungeons[todnum].dname, todlevel); -#endif ttmp->dst.dnum = todnum; ttmp->dst.dlevel = todlevel; return; diff --git a/src/mkobj.c b/src/mkobj.c index 47b6668e7..08bb41bfb 100644 --- a/src/mkobj.c +++ b/src/mkobj.c @@ -17,8 +17,6 @@ STATIC_DCL void FDECL(insane_object, (struct obj *,const char *,const char *,struct monst *)); STATIC_DCL void FDECL(check_contained, (struct obj *,const char *)); -/*#define DEBUG_EFFECTS*/ /* show some messages for debugging */ - struct icp { int iprob; /* probability of an item type */ char iclass; /* item class */ @@ -1526,12 +1524,10 @@ struct obj *otmp; /* Adjust the age; must be same as obj_timer_checks() for off ice*/ age = monstermoves - otmp->age; retval += age * (ROT_ICE_ADJUSTMENT-1) / ROT_ICE_ADJUSTMENT; -#ifdef DEBUG_EFFECTS - pline_The("%s age has ice modifications:otmp->age = %ld, returning %ld.", + debugpline("The %s age has ice modifications:otmp->age = %ld, returning %ld.", s_suffix(doname(otmp)),otmp->age, retval); - pline("Effective age of corpse: %ld.", + debugpline("Effective age of corpse: %ld.", monstermoves - retval); -#endif } return retval; } @@ -1560,9 +1556,7 @@ int force; /* 0 = no force so do checks, <0 = force off, >0 force on */ /* mark the corpse as being on ice */ otmp->on_ice = 1; -#ifdef DEBUG_EFFECTS - pline("%s is now on ice at %d,%d.", The(xname(otmp)),x,y); -#endif + debugpline("%s is now on ice at %d,%d.", The(xname(otmp)),x,y); /* Adjust the time remaining */ tleft *= ROT_ICE_ADJUSTMENT; restart_timer = TRUE; @@ -1588,9 +1582,7 @@ int force; /* 0 = no force so do checks, <0 = force off, >0 force on */ long age; otmp->on_ice = 0; -#ifdef DEBUG_EFFECTS - pline("%s is no longer on ice at %d,%d.", The(xname(otmp)),x,y); -#endif + debugpline("%s is no longer on ice at %d,%d.", The(xname(otmp)),x,y); /* Adjust the remaining time */ tleft /= ROT_ICE_ADJUSTMENT; restart_timer = TRUE; diff --git a/src/mon.c b/src/mon.c index 0de59cf8a..d3841462e 100644 --- a/src/mon.c +++ b/src/mon.c @@ -1278,10 +1278,8 @@ register struct monst *mtmp, *mtmp2; /* transfer the monster's inventory */ for (otmp = mtmp2->minvent; otmp; otmp = otmp->nobj) { -#ifdef DEBUG if (otmp->where != OBJ_MINVENT || otmp->ocarry != mtmp) - panic("replmon: minvent inconsistency"); -#endif + debugpline("replmon: minvent inconsistency"); otmp->ocarry = mtmp2; } mtmp->minvent = 0; diff --git a/src/pickup.c b/src/pickup.c index 30188e5f2..ee0d91dc7 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -903,9 +903,7 @@ int how; /* type of query */ (*pick_list)->item.a_int = curr->oclass; return 1; } else { -#ifdef DEBUG - impossible("query_category: no single object match"); -#endif + debugpline("query_category: no single object match"); } return 0; } diff --git a/src/questpgr.c b/src/questpgr.c index 9f717754f..e85877840 100644 --- a/src/questpgr.c +++ b/src/questpgr.c @@ -12,8 +12,6 @@ #define QTEXT_FILE "quest.dat" -/* #define DEBUG */ /* uncomment for debugging */ - /* from sp_lev.c, for deliver_splev_message() */ extern char *lev_message; @@ -46,6 +44,8 @@ dump_qtlist() /* dump the character msg list to check appearance */ struct qtmsg *msg; long size; + if (!showdebug()) return; + for (msg = qt_list.chrole; msg->msgnum > 0; msg++) { pline("msgnum %d: delivery %c", msg->msgnum, msg->delivery); @@ -54,7 +54,10 @@ dump_qtlist() /* dump the character msg list to check appearance */ deliver_by_window(msg, NHW_TEXT); } } -#endif /* DEBUG */ +#else +static void +dump_qtlist() { } +#endif /* !DEBUG */ static void Fread(ptr, size, nitems, stream) @@ -133,9 +136,7 @@ load_qtlist() if (!qt_list.common || !qt_list.chrole) impossible("load_qtlist: cannot load quest text."); -#ifdef DEBUG dump_qtlist(); -#endif return; /* no ***DON'T*** close the msg_file */ } diff --git a/src/restore.c b/src/restore.c index b4d4bb7fb..af974d147 100644 --- a/src/restore.c +++ b/src/restore.c @@ -1153,9 +1153,7 @@ register int fd; ++msgcount; } if (msgcount) putmsghistory((char *)0, TRUE); -#ifdef DEBUG_MSGCOUNT - pline("Read %d messages from savefile.", msgcount); -#endif + debugpline("Read %d messages from savefile.", msgcount); } /* Clear all structures for object and monster ID mapping. */ diff --git a/src/rnd.c b/src/rnd.c index a2ce45685..662d1a275 100644 --- a/src/rnd.c +++ b/src/rnd.c @@ -5,10 +5,6 @@ #include "hack.h" -#if defined(BETA) && !defined(DEBUG) && !defined(NODEBUG) -#define DEBUG -#endif - /* "Rand()"s definition is determined by [OS]conf.h */ #if defined(LINT) && defined(UNIX) /* rand() is long... */ extern int NDECL(rand); @@ -26,9 +22,9 @@ int rn2(x) /* 0 <= rn2(x) < x */ register int x; { -#ifdef DEBUG +#ifdef BETA if (x <= 0) { - impossible("rn2(%d) attempted", x); + debugpline("rn2(%d) attempted", x); return(0); } x = RND(x); @@ -44,9 +40,9 @@ register int x; /* good luck approaches 0, bad luck approaches (x-1) */ { register int i, adjustment; -#ifdef DEBUG +#ifdef BETA if (x <= 0) { - impossible("rnl(%d) attempted", x); + debugpline("rnl(%d) attempted", x); return(0); } #endif @@ -83,9 +79,9 @@ int rnd(x) /* 1 <= rnd(x) <= x */ register int x; { -#ifdef DEBUG +#ifdef BETA if (x <= 0) { - impossible("rnd(%d) attempted", x); + debugpline("rnd(%d) attempted", x); return(1); } x = RND(x)+1; @@ -101,9 +97,9 @@ register int n, x; { register int tmp = n; -#ifdef DEBUG +#ifdef BETA if (x < 0 || n < 0 || (x == 0 && n != 0)) { - impossible("d(%d,%d) attempted", n, x); + debugpline("d(%d,%d) attempted", n, x); return(1); } #endif diff --git a/src/save.c b/src/save.c index 88db771e2..1fa51dfaa 100644 --- a/src/save.c +++ b/src/save.c @@ -1210,9 +1210,7 @@ int fd, mode; } bwrite(fd, (genericptr_t) &minusone, sizeof(int)); } -#ifdef DEBUG_MSGCOUNT - pline("Stored %d messages into savefile.", msgcount); -#endif + debugpline("Stored %d messages into savefile.", msgcount); /* note: we don't attempt to handle release_data() here */ } diff --git a/src/shk.c b/src/shk.c index 0fe0e94db..12f22eb40 100644 --- a/src/shk.c +++ b/src/shk.c @@ -5,8 +5,6 @@ #include "hack.h" -/*#define DEBUG*/ - #define PAY_SOME 2 #define PAY_BUY 1 #define PAY_CANT 0 /* too poor */ @@ -1207,9 +1205,7 @@ dopay() } if(!shkp) { -#ifdef DEBUG - pline("dopay: null shkp."); -#endif + debugpline("dopay: null shkp."); return(0); } proceed: diff --git a/src/sp_lev.c b/src/sp_lev.c index f27637b9b..6be2c9713 100644 --- a/src/sp_lev.c +++ b/src/sp_lev.c @@ -12,11 +12,6 @@ #include "hack.h" #include "dlb.h" -/* #define DEBUG */ /* uncomment to enable code debugging */ - -#ifdef DEBUG -#define debugpline if (wizard) pline -#endif #include "sp_lev.h" @@ -329,10 +324,8 @@ chk: lev = &levl[x][y]; for (; y <= ymax; y++) { if (lev++->typ) { -#ifdef DEBUG if(!vault) debugpline("strange area [%d,%d] in check_room.",x,y); -#endif if (!rn2(3)) return FALSE; if (x < *lowx) *lowx = x + xlim + 1; @@ -405,9 +398,7 @@ xchar rtype, rlit; r1 = rnd_rect(); /* Get a random rectangle */ if (!r1) { /* No more free rectangles ! */ -#ifdef DEBUG debugpline("No more rects..."); -#endif return FALSE; } hx = r1->hx; @@ -1320,10 +1311,8 @@ schar ftyp, btyp; if (xx <= 0 || yy <= 0 || tx <= 0 || ty <= 0 || xx > COLNO-1 || tx > COLNO-1 || yy > ROWNO-1 || ty > ROWNO-1) { -#ifdef DEBUG debugpline("dig_corridor: bad coords : (%d,%d) (%d,%d).", xx,yy,tx,ty); -#endif return FALSE; } if (tx > xx) dx = 1; diff --git a/src/steal.c b/src/steal.c index 0812a79df..bf7238b01 100644 --- a/src/steal.c +++ b/src/steal.c @@ -424,12 +424,12 @@ register struct monst *mtmp; register struct obj *otmp; { int freed_otmp; + boolean snuff_otmp = FALSE; /* if monster is acquiring a thrown or kicked object, the throwing or kicking code shouldn't continue to track and place it */ if (otmp == thrownobj) thrownobj = 0; else if (otmp == kickedobj) kickedobj = 0; - boolean snuff_otmp = FALSE; /* don't want hidden light source inside the monster; assumes that engulfers won't have external inventories; whirly monsters cause the light to be extinguished rather than letting it shine thru */ diff --git a/src/sys.c b/src/sys.c index 2f6c5fd87..b559c1450 100644 --- a/src/sys.c +++ b/src/sys.c @@ -20,6 +20,7 @@ sys_early_init(){ #else sysopt.wizards = WIZARD_NAME; #endif + sysopt.debugfiles = NULL; sysopt.shellers = NULL; sysopt.maxplayers = 0; /* XXX eventually replace MAX_NR_OF_PLAYERS */ diff --git a/src/teleport.c b/src/teleport.c index ab8bb063e..cd179c1f1 100644 --- a/src/teleport.c +++ b/src/teleport.c @@ -121,9 +121,7 @@ unsigned entflags; struct monst fakemon; /* dummy monster */ if (!mdat) { -#ifdef DEBUG - pline("enexto() called with mdat==0"); -#endif + debugpline("enexto() called with mdat==0"); /* default to player's original monster type */ mdat = &mons[u.umonster]; } diff --git a/src/zap.c b/src/zap.c index c4d98c33c..97fa65a15 100644 --- a/src/zap.c +++ b/src/zap.c @@ -1717,9 +1717,7 @@ struct obj *obj, *otmp; if (context.bypasses) return 0; else { -#ifdef DEBUG - pline("%s for a moment.", Tobjnam(obj, "pulsate")); -#endif + debugpline("%s for a moment.", Tobjnam(obj, "pulsate")); obj->bypass = 0; } } @@ -3418,9 +3416,7 @@ struct obj **ootmp; /* to return worn armor for caller to disintegrate */ resist(mon, type < ZT_SPELL(0) ? WAND_CLASS : '\0', 0, NOTELL)) tmp /= 2; if (tmp < 0) tmp = 0; /* don't allow negative damage */ -#ifdef WIZ_PATCH_DEBUG - pline("zapped monster hp = %d (= %d - %d)", mon->mhp-tmp,mon->mhp,tmp); -#endif + debugpline("zapped monster hp = %d (= %d - %d)", mon->mhp-tmp,mon->mhp,tmp); mon->mhp -= tmp; return(tmp); } diff --git a/sys/unix/sysconf b/sys/unix/sysconf index 3eb07ecaa..74e7fb1ae 100644 --- a/sys/unix/sysconf +++ b/sys/unix/sysconf @@ -14,6 +14,11 @@ WIZARDS=root games # Uses the same syntax as the WIZARDS option above. #SHELLERS= +# Show debugging information originating from these source files. +# Use '*' for all, or list source files separated by spaces. +# Only available if game has been compiled with DEBUG. +#DEBUGFILES=* + # Limit the number of simultaneous games (see also nethack.sh). MAXPLAYERS=10 diff --git a/win/tty/wintty.c b/win/tty/wintty.c index 12ec044b3..d4c921501 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -1946,7 +1946,7 @@ register int x, y; /* not xchar: perhaps xchar is unsigned and case NHW_TEXT: s = "[text window]"; break; case NHW_BASE: s = "[base window]"; break; } - impossible("bad curs positioning win %d %s (%d,%d)", window, s, x, y); + debugpline("bad curs positioning win %d %s (%d,%d)", window, s, x, y); return; } #endif From 6e9fa71b0523a8de55730dd85eb3742dc0fd0fe4 Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Fri, 27 Feb 2015 19:05:01 -0500 Subject: [PATCH 035/132] Make SEDUCE unconditional. --- include/config.h | 1 - include/extern.h | 2 -- include/monattk.h | 1 - include/sys.h | 6 +----- src/mhitm.c | 2 -- src/mhitu.c | 23 ++++------------------- src/monst.c | 10 ++-------- src/sounds.c | 2 -- src/sys.c | 2 -- src/uhitm.c | 2 -- src/zap.c | 2 -- util/makedefs.c | 3 --- 12 files changed, 7 insertions(+), 49 deletions(-) diff --git a/include/config.h b/include/config.h index 1af4b0560..3084be864 100644 --- a/include/config.h +++ b/include/config.h @@ -417,7 +417,6 @@ typedef unsigned char uchar; /* dungeon levels */ #define WALLIFIED_MAZE /* Fancy mazes - Jean-Christophe Collet */ /* monsters & objects */ -#define SEDUCE /* Succubi/incubi seduction, by KAA, suggested by IM */ /* I/O */ #define REDO /* support for redoing last command - DGK */ #if !defined(MAC) diff --git a/include/extern.h b/include/extern.h index 492718730..9f03e8151 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1112,9 +1112,7 @@ E boolean NDECL(gulp_blnd_check); E int FDECL(gazemu, (struct monst *,struct attack *)); E void FDECL(mdamageu, (struct monst *,int)); E int FDECL(could_seduce, (struct monst *,struct monst *,struct attack *)); -#ifdef SEDUCE E int FDECL(doseduce, (struct monst *)); -#endif /* ### minion.c ### */ diff --git a/include/monattk.h b/include/monattk.h index 7c228c87d..1bd7ff616 100644 --- a/include/monattk.h +++ b/include/monattk.h @@ -72,7 +72,6 @@ #define AD_DISE 33 /* confers diseases */ #define AD_DCAY 34 /* decays organics (brown Pudding) */ #define AD_SSEX 35 /* Succubus seduction (extended) */ - /* If no SEDUCE then same as AD_SEDU */ #define AD_HALU 36 /* causes hallucination */ #define AD_DETH 37 /* for Death only */ #define AD_PEST 38 /* for Pestilence only */ diff --git a/include/sys.h b/include/sys.h index ac39239ee..713e33a55 100644 --- a/include/sys.h +++ b/include/sys.h @@ -35,11 +35,7 @@ struct sysopt { }; E struct sysopt sysopt; -#ifdef SEDUCE -# define SYSOPT_SEDUCE sysopt.seduce -#else -# define SYSOPT_SEDUCE 0 -#endif +#define SYSOPT_SEDUCE sysopt.seduce #endif /* SYS_H */ diff --git a/src/mhitm.c b/src/mhitm.c index 0e8bf7d1c..24e5c7f1c 100644 --- a/src/mhitm.c +++ b/src/mhitm.c @@ -1083,9 +1083,7 @@ mdamagem(magr, mdef, mattk) /* Automatic kill if drained past level 0 */ } break; -#ifdef SEDUCE case AD_SSEX: -#endif case AD_SITM: /* for now these are the same */ case AD_SEDU: if (magr->mcan) break; diff --git a/src/mhitu.c b/src/mhitu.c index 511513f39..6f298ff63 100644 --- a/src/mhitu.c +++ b/src/mhitu.c @@ -12,9 +12,7 @@ STATIC_DCL void FDECL(urustm, (struct monst *, struct obj *)); STATIC_DCL boolean FDECL(u_slip_free, (struct monst *,struct attack *)); STATIC_DCL int FDECL(passiveum, (struct permonst *,struct monst *,struct attack *)); -#ifdef SEDUCE STATIC_DCL void FDECL(mayberem, (struct obj *, const char *)); -#endif STATIC_DCL boolean FDECL(diseasemu, (struct permonst *)); STATIC_DCL int FDECL(hitmu, (struct monst *,struct attack *)); @@ -1256,7 +1254,6 @@ dopois: if(!mtmp->mcan) stealgold(mtmp); break; -#ifdef SEDUCE case AD_SSEX: if(SYSOPT_SEDUCE){ if(could_seduce(mtmp, &youmonst, mattk) == 1 @@ -1266,7 +1263,6 @@ dopois: break; } /* else FALLTHRU */ -#endif case AD_SITM: /* for now these are the same */ case AD_SEDU: if (is_animal(mtmp->data)) { @@ -1274,10 +1270,7 @@ dopois: if (mtmp->mcan) break; /* Continue below */ } else if (dmgtype(youmonst.data, AD_SEDU) -#ifdef SEDUCE - || (SYSOPT_SEDUCE && dmgtype(youmonst.data, AD_SSEX)) -#endif - ) { + || (SYSOPT_SEDUCE && dmgtype(youmonst.data, AD_SSEX))) { pline("%s %s.", Monnam(mtmp), mtmp->minvent ? "brags about the goods some dungeon explorer provided" : "makes some remarks about how difficult theft is lately"); @@ -2198,19 +2191,13 @@ struct attack *mattk; gendef = gender(mdef); } - if(agrinvis && !defperc -#ifdef SEDUCE - && (!SYSOPT_SEDUCE || ( mattk && mattk->adtyp != AD_SSEX)) -#endif - ) + if(agrinvis && !defperc && + (!SYSOPT_SEDUCE || ( mattk && mattk->adtyp != AD_SSEX))) return 0; if(pagr->mlet != S_NYMPH && ((pagr != &mons[PM_INCUBUS] && pagr != &mons[PM_SUCCUBUS]) -#ifdef SEDUCE - || (SYSOPT_SEDUCE && mattk && mattk->adtyp != AD_SSEX) -#endif - )) + || (SYSOPT_SEDUCE && mattk && mattk->adtyp != AD_SSEX))) return 0; if(genagr == 1 - gendef) @@ -2219,7 +2206,6 @@ struct attack *mattk; return (pagr->mlet == S_NYMPH) ? 2 : 0; } -#ifdef SEDUCE /* Returns 1 if monster teleported */ int doseduce(mon) @@ -2485,7 +2471,6 @@ const char *str; } remove_worn_item(obj, TRUE); } -#endif /* SEDUCE */ STATIC_OVL int passiveum(olduasmon,mtmp,mattk) diff --git a/src/monst.c b/src/monst.c index 420118eda..d6b843b6c 100644 --- a/src/monst.c +++ b/src/monst.c @@ -2554,14 +2554,9 @@ struct permonst _mons2[] = { #define SEDUCTION_ATTACKS_NO \ A(ATTK(AT_CLAW, AD_PHYS, 1, 3), ATTK(AT_CLAW, AD_PHYS, 1, 3), \ ATTK(AT_BITE, AD_DRLI, 2, 6), NO_ATTK, NO_ATTK, NO_ATTK) -#ifdef SEDUCE -# define SEDUCTION_ATTACKS SEDUCTION_ATTACKS_YES -#else -# define SEDUCTION_ATTACKS SEDUCTION_ATTACKS_NO -#endif MON("succubus", S_DEMON, LVL(6, 12, 0, 70, -9), (G_NOCORPSE|1), - SEDUCTION_ATTACKS, + SEDUCTION_ATTACKS_YES, SIZ(WT_HUMAN, 400, MS_SEDUCE, MZ_HUMAN), MR_FIRE|MR_POISON, 0, M1_HUMANOID|M1_FLY|M1_POIS, M2_DEMON|M2_STALK|M2_HOSTILE|M2_NASTY|M2_FEMALE, @@ -2577,12 +2572,11 @@ struct permonst _mons2[] = { CLR_BROWN), MON("incubus", S_DEMON, LVL(6, 12, 0, 70, -9), (G_NOCORPSE|1), - SEDUCTION_ATTACKS, + SEDUCTION_ATTACKS_YES, SIZ(WT_HUMAN, 400, MS_SEDUCE, MZ_HUMAN), MR_FIRE|MR_POISON, 0, M1_HUMANOID|M1_FLY|M1_POIS, M2_DEMON|M2_STALK|M2_HOSTILE|M2_NASTY|M2_MALE, M3_INFRAVISIBLE|M3_INFRAVISION, CLR_GRAY), -#undef SEDUCTION_ATTACKS /* Used by AD&D for a type of demon, originally one of the Furies */ /* and spelled this way */ MON("erinys", S_DEMON, diff --git a/src/sounds.c b/src/sounds.c index 593c3ecd6..d57904778 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -807,7 +807,6 @@ register struct monst *mtmp; case MS_SEDUCE: { int swval; -#ifdef SEDUCE if (SYSOPT_SEDUCE) { if (ptr->mlet != S_NYMPH && could_seduce(mtmp, &youmonst, (struct attack *)0) == 1) { @@ -816,7 +815,6 @@ register struct monst *mtmp; } swval = ((poly_gender() != (int) mtmp->female) ? rn2(3) : 0); } else -#endif swval = ((poly_gender() == 0) ? rn2(3) : 0); switch(swval){ case 2: diff --git a/src/sys.c b/src/sys.c index b559c1450..5f17a0a91 100644 --- a/src/sys.c +++ b/src/sys.c @@ -54,10 +54,8 @@ sys_early_init(){ # endif #endif -#ifdef SEDUCE sysopt.seduce = 1; /* if it's compiled in, default to on */ sysopt_seduce_set(sysopt.seduce); -#endif } diff --git a/src/uhitm.c b/src/uhitm.c index 04ec05c11..bbb3a7fb4 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -1452,9 +1452,7 @@ register struct attack *mattk; minstapetrify(mdef, TRUE); tmp = 0; break; -#ifdef SEDUCE case AD_SSEX: -#endif case AD_SEDU: case AD_SITM: steal_it(mdef, mattk); diff --git a/src/zap.c b/src/zap.c index 97fa65a15..cbc533041 100644 --- a/src/zap.c +++ b/src/zap.c @@ -584,9 +584,7 @@ coord *cc; /* most cancelled monsters return to normal, but some need to stay cancelled */ if (!dmgtype(mtmp2->data, AD_SEDU) -#ifdef SEDUCE && (!SYSOPT_SEDUCE || !dmgtype(mtmp2->data, AD_SSEX)) -#endif ) mtmp2->mcan = 0; mtmp2->mcansee = 1; /* set like in makemon */ mtmp2->mblinded = 0; diff --git a/util/makedefs.c b/util/makedefs.c index 9102945ce..32107d0ab 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -1298,9 +1298,6 @@ static const char *build_opts[] = { # endif # endif #endif -#ifdef SEDUCE - "seduction", -#endif #ifdef SHELL "shell command", #endif From b138d380eafedf59cf3d5a7bcdf0926ebfd9c6c0 Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Fri, 27 Feb 2015 19:06:01 -0500 Subject: [PATCH 036/132] Make BARGETHROUGH unconditional. --- include/config.h | 1 - include/extern.h | 6 ------ include/mfndpos.h | 2 -- include/mondata.h | 2 -- include/monflag.h | 1 - src/dogmove.c | 20 -------------------- src/mhitm.c | 2 -- src/mon.c | 12 ------------ src/monmove.c | 12 ------------ util/makedefs.c | 3 --- 10 files changed, 61 deletions(-) diff --git a/include/config.h b/include/config.h index 3084be864..399217b6f 100644 --- a/include/config.h +++ b/include/config.h @@ -425,7 +425,6 @@ typedef unsigned char uchar; # endif #endif #define AUTOPICKUP_EXCEPTIONS /* exceptions to autopickup */ -#define BARGETHROUGH /* allow some monsters to move others out of their way */ #ifdef REDO # define DOAGAIN '\001' /* ^A, the "redo" key used in cmd.c and getline.c */ diff --git a/include/extern.h b/include/extern.h index 9f03e8151..e4cccef6f 100644 --- a/include/extern.h +++ b/include/extern.h @@ -520,9 +520,7 @@ E void FDECL(clear_symsetentry, (int,BOOLEAN_P)); E void FDECL(update_l_symset, (struct symparse *,int)); E void FDECL(update_r_symset, (struct symparse *,int)); #endif -#ifdef BARGETHROUGH E boolean FDECL(cursed_object_at, (int, int)); -#endif /* ### dungeon.c ### */ @@ -1090,9 +1088,7 @@ E int FDECL(buzzmu, (struct monst *,struct attack *)); E int FDECL(fightm, (struct monst *)); E int FDECL(mattackm, (struct monst *,struct monst *)); E boolean FDECL(engulf_target, (struct monst *,struct monst *)); -#ifdef BARGETHROUGH E int FDECL(mdisplacem, (struct monst *,struct monst *,BOOLEAN_P)); -#endif E void FDECL(paralyze_monst, (struct monst *,int)); E int FDECL(sleep_monst, (struct monst *,int,int)); E void FDECL(slept_monst, (struct monst *)); @@ -1374,11 +1370,9 @@ E boolean FDECL(accessible, (int,int)); E void FDECL(set_apparxy, (struct monst *)); E boolean FDECL(can_ooze, (struct monst *)); E boolean FDECL(can_fog, (struct monst *)); -#ifdef BARGETHROUGH E boolean FDECL(should_displace, (struct monst *,coord *,long *,int, XCHAR_P,XCHAR_P)); E boolean FDECL(undesirable_disp, (struct monst *,XCHAR_P,XCHAR_P)); -#endif /* ### monst.c ### */ diff --git a/include/mfndpos.h b/include/mfndpos.h index ffbb50d74..00406798d 100644 --- a/include/mfndpos.h +++ b/include/mfndpos.h @@ -7,9 +7,7 @@ #ifndef MFNDPOS_H #define MFNDPOS_H -#ifdef BARGETHROUGH #define ALLOW_MDISP 0x00001000L /* can displace a monster out of its way */ -#endif #define ALLOW_TRAPS 0x00020000L /* can enter traps */ #define ALLOW_U 0x00040000L /* can attack you */ #define ALLOW_M 0x00080000L /* can attack other monsters */ diff --git a/include/mondata.h b/include/mondata.h index 3996e439e..e5c7332ea 100644 --- a/include/mondata.h +++ b/include/mondata.h @@ -131,9 +131,7 @@ #define is_covetous(ptr) ((ptr->mflags3 & M3_COVETOUS)) #define infravision(ptr) ((ptr->mflags3 & M3_INFRAVISION)) #define infravisible(ptr) ((ptr->mflags3 & M3_INFRAVISIBLE)) -#ifdef BARGETHROUGH #define is_displacer(ptr) (((ptr)->mflags3 & M3_DISPLACES) != 0L) -#endif #define is_mplayer(ptr) (((ptr) >= &mons[PM_ARCHEOLOGIST]) && \ ((ptr) <= &mons[PM_WIZARD])) #define is_rider(ptr) ((ptr) == &mons[PM_DEATH] || \ diff --git a/include/monflag.h b/include/monflag.h index bf6875581..df703dc3d 100644 --- a/include/monflag.h +++ b/include/monflag.h @@ -161,7 +161,6 @@ #define M3_INFRAVISION 0x0100 /* has infravision */ #define M3_INFRAVISIBLE 0x0200 /* visible by infravision */ -/* define the bit even if BARGETHROUGH is not defined for savefile compat. */ #define M3_DISPLACES 0x0400 /* moves monsters out of its way */ #define MZ_TINY 0 /* < 2' */ diff --git a/src/dogmove.c b/src/dogmove.c index 0b6e7a6f8..604c52267 100644 --- a/src/dogmove.c +++ b/src/dogmove.c @@ -109,19 +109,11 @@ struct monst *mon; static NEARDATA const char nofetch[] = { BALL_CLASS, CHAIN_CLASS, ROCK_CLASS, 0 }; -#ifndef BARGETHROUGH -STATIC_OVL boolean FDECL(cursed_object_at, (int, int)); -#endif /* not BARGETHROUGH */ - STATIC_VAR xchar gtyp, gx, gy; /* type and position of dog's current goal */ STATIC_PTR void FDECL(wantdoor, (int, int, genericptr_t)); -#ifdef BARGETHROUGH boolean -#else -STATIC_OVL boolean -#endif cursed_object_at(x, y) int x, y; { @@ -584,9 +576,7 @@ register int after; /* this is extra fast monster movement */ struct obj *obj = (struct obj *) 0; xchar otyp; boolean has_edog, cursemsg[9], do_eat = FALSE; -#ifdef BARGETHROUGH boolean better_with_displacing = FALSE; -#endif xchar nix, niy; /* position mtmp is (considering) moving to */ register int nx, ny; /* temporary coordinates */ xchar cnt, uncursedcnt, chcnt; @@ -642,9 +632,7 @@ register int after; /* this is extra fast monster movement */ if (passes_walls(mtmp->data)) allowflags |= (ALLOW_ROCK | ALLOW_WALL); if (passes_bars(mtmp->data)) allowflags |= ALLOW_BARS; if (throws_rocks(mtmp->data)) allowflags |= ALLOW_ROCK; -#ifdef BARGETHROUGH if (is_displacer(mtmp->data)) allowflags |= ALLOW_MDISP; -#endif if (Conflict && !resist(mtmp, RING_CLASS, 0, 0)) { allowflags |= ALLOW_U; if (!has_edog) { @@ -681,19 +669,13 @@ register int after; /* this is extra fast monster movement */ uncursedcnt = 0; for (i = 0; i < cnt; i++) { nx = poss[i].x; ny = poss[i].y; -#ifdef BARGETHROUGH if (MON_AT(nx,ny) && !((info[i] & ALLOW_M) || info[i] & ALLOW_MDISP)) continue; -#else - if (MON_AT(nx,ny) && !(info[i] & ALLOW_M)) continue; -#endif if (cursed_object_at(nx, ny)) continue; uncursedcnt++; } -#ifdef BARGETHROUGH better_with_displacing = should_displace(mtmp,poss,info,cnt,gx,gy); -#endif chcnt = 0; chi = -1; @@ -747,7 +729,6 @@ register int after; /* this is extra fast monster movement */ } return 0; } -#ifdef BARGETHROUGH if ((info[i] & ALLOW_MDISP) && MON_AT(nx, ny) && better_with_displacing && !undesirable_disp(mtmp,nx,ny)) { @@ -757,7 +738,6 @@ register int after; /* this is extra fast monster movement */ if (mstatus & MM_DEF_DIED) return 2; return 0; } -#endif /* BARGETHROUGH */ { /* Dog avoids harmful traps, but perhaps it has to pass one * in order to follow player. (Non-harmful traps do not diff --git a/src/mhitm.c b/src/mhitm.c index 24e5c7f1c..47a14915f 100644 --- a/src/mhitm.c +++ b/src/mhitm.c @@ -168,7 +168,6 @@ fightm(mtmp) /* have monsters fight each other */ return 0; } -#ifdef BARGETHROUGH /* * mdisplacem() -- attacker moves defender out of the way; * returns same results as mattackm(). @@ -244,7 +243,6 @@ boolean quietly; return MM_HIT; } -#endif /* BARGETHROUGH */ /* * mattackm() -- a monster attacks another monster. diff --git a/src/mon.c b/src/mon.c index d3841462e..4823ae1c7 100644 --- a/src/mon.c +++ b/src/mon.c @@ -14,9 +14,7 @@ STATIC_DCL boolean FDECL(restrap,(struct monst *)); STATIC_DCL long FDECL(mm_aggression, (struct monst *,struct monst *)); -#ifdef BARGETHROUGH STATIC_DCL long FDECL(mm_displacement, (struct monst *,struct monst *)); -#endif STATIC_DCL int NDECL(pick_animal); STATIC_DCL void FDECL(kill_eggs, (struct obj *)); STATIC_DCL void FDECL(dealloc_mextra, (struct mextra *)); @@ -1083,13 +1081,6 @@ nexttry: /* eels prefer the water, but if there is no water nearby, struct monst *mtmp2 = m_at(nx, ny); long mmflag = flag | mm_aggression(mon, mtmp2); -#ifndef BARGETHROUGH - if (!(mmflag & ALLOW_M)) continue; - info[cnt] |= ALLOW_M; - if (mtmp2->mtame) { - if (!(mmflag & ALLOW_TM)) continue; - info[cnt] |= ALLOW_TM; -#else /* BARGETHROUGH */ if (mmflag & ALLOW_M) { info[cnt] |= ALLOW_M; if (mtmp2->mtame) { @@ -1100,7 +1091,6 @@ nexttry: /* eels prefer the water, but if there is no water nearby, mmflag = flag | mm_displacement(mon, mtmp2); if (!(mmflag & ALLOW_MDISP)) continue; info[cnt] |= ALLOW_MDISP; -#endif /* BARGETHROUGH */ } } /* Note: ALLOW_SANCT only prevents movement, not */ @@ -1206,7 +1196,6 @@ struct monst *magr, /* monster that is currently deciding where to move */ return 0L; } -#ifdef BARGETHROUGH /* Monster displacing another monster out of the way */ STATIC_OVL long mm_displacement(magr, mdef) @@ -1232,7 +1221,6 @@ struct monst *magr, /* monster that is currently deciding where to move */ return ALLOW_MDISP; return 0L; } -#endif /* BARGETHROUGH */ boolean monnear(mon, x, y) diff --git a/src/monmove.c b/src/monmove.c index 316018e52..81eb563d3 100644 --- a/src/monmove.c +++ b/src/monmove.c @@ -579,7 +579,6 @@ register struct monst *mtmp; return(FALSE); } -#ifdef BARGETHROUGH /* * should_displace() * @@ -623,7 +622,6 @@ xchar gx, gy; return TRUE; return FALSE; } -#endif /* BARGETHROUGH */ /* Return values: * 0: did not move, but can still attack and do other stuff. @@ -644,9 +642,7 @@ register int after; boolean can_open=0, can_unlock=0, doorbuster=0; boolean uses_items=0, setlikes=0; boolean avoid=FALSE; -#ifdef BARGETHROUGH boolean better_with_displacing = FALSE; -#endif struct permonst *ptr; struct monst *mtoo; schar mmoved = 0; /* not strictly nec.: chi >= 0 will do */ @@ -956,19 +952,15 @@ not_special: for(i = 0; i < cnt; i++) if(!(info[i] & NOTONL)) avoid=TRUE; } -#ifdef BARGETHROUGH better_with_displacing = should_displace(mtmp,poss,info,cnt,gx,gy); -#endif for(i=0; i < cnt; i++) { if (avoid && (info[i] & NOTONL)) continue; nx = poss[i].x; ny = poss[i].y; -#ifdef BARGETHROUGH if (MON_AT(nx,ny) && (info[i] & ALLOW_MDISP) && !(info[i] & ALLOW_M) && !better_with_displacing) continue; -#endif if (appr != 0) { mtrk = &mtmp->mtrack[0]; for(j=0; j < jcnt; mtrk++, j++) @@ -1064,7 +1056,6 @@ not_special: return 3; } -#ifdef BARGETHROUGH if((info[chi] & ALLOW_MDISP)) { struct monst *mtmp2; int mstatus; @@ -1075,7 +1066,6 @@ not_special: if (mstatus & MM_HIT) return 1; return 3; } -#endif /* BARGETHROUGH */ if (!m_in_out_region(mtmp,nix,niy)) return 3; @@ -1369,7 +1359,6 @@ found_you: mtmp->muy = my; } -#ifdef BARGETHROUGH /* * mon-to-mon displacement is a deliberate "get out of my way" act, * not an accidental bump, so we don't consider mstun or mconf in @@ -1401,7 +1390,6 @@ xchar x,y; return FALSE; } -#endif /* BARGETHROUGH */ /* * Inventory prevents passage under door. diff --git a/util/makedefs.c b/util/makedefs.c index 32107d0ab..b0d9f2078 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -1247,9 +1247,6 @@ static const char *build_opts[] = { #ifdef MAIL "mail daemon", #endif -#ifdef BARGETHROUGH - "monsters moving monsters", -#endif #ifdef GNUDOS "MSDOS protected mode", #endif From 74e741bbbce1bba9eb57dc1b034d18de9c65df71 Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Fri, 27 Feb 2015 19:06:17 -0500 Subject: [PATCH 037/132] Make AUTOPICKUP_EXCEPTIONS unconditional. --- include/config.h | 3 +-- include/decl.h | 4 +--- include/extern.h | 6 +----- include/flag.h | 4 +--- include/wceconf.h | 4 +--- src/files.c | 4 +--- src/options.c | 16 +--------------- src/pickup.c | 8 +------- src/save.c | 4 +--- util/makedefs.c | 5 +---- 10 files changed, 10 insertions(+), 48 deletions(-) diff --git a/include/config.h b/include/config.h index 399217b6f..282b6949b 100644 --- a/include/config.h +++ b/include/config.h @@ -1,4 +1,4 @@ -/* NetHack 3.5 config.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 config.h $NHDT-Date: 1425081976 2015/02/28 00:06:16 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.48 $ */ /* NetHack 3.5 config.h $Date: 2012/01/27 20:15:26 $ $Revision: 1.37 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -424,7 +424,6 @@ typedef unsigned char uchar; # define CLIPPING /* allow smaller screens -- ERS */ # endif #endif -#define AUTOPICKUP_EXCEPTIONS /* exceptions to autopickup */ #ifdef REDO # define DOAGAIN '\001' /* ^A, the "redo" key used in cmd.c and getline.c */ diff --git a/include/decl.h b/include/decl.h index 1e882705f..4733b5317 100644 --- a/include/decl.h +++ b/include/decl.h @@ -1,4 +1,4 @@ -/* NetHack 3.5 decl.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 decl.h $NHDT-Date: 1425081976 2015/02/28 00:06:16 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.50 $ */ /* NetHack 3.5 decl.h $Date: 2011/12/29 20:06:27 $ $Revision: 1.44 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -381,13 +381,11 @@ E char *fqn_prefix_names[PREFIX_COUNT]; E NEARDATA struct savefile_info sfcap, sfrestinfo, sfsaveinfo; -#ifdef AUTOPICKUP_EXCEPTIONS struct autopickup_exception { char *pattern; boolean grab; struct autopickup_exception *next; }; -#endif /* AUTOPICKUP_EXCEPTIONS */ #ifdef PANICTRACE E char *ARGV0; diff --git a/include/extern.h b/include/extern.h index e4cccef6f..be15406c2 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1,4 +1,4 @@ -/* NetHack 3.5 extern.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 extern.h $NHDT-Date: 1425081976 2015/02/28 00:06:16 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.390 $ */ /* NetHack 3.5 extern.h $Date: 2013/11/05 00:57:53 $ $Revision: 1.380 $ */ /* Copyright (c) Steve Creps, 1988. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1587,10 +1587,8 @@ E void FDECL(set_duplicate_opt_detection, (int)); E void FDECL(set_wc_option_mod_status, (unsigned long, int)); E void FDECL(set_wc2_option_mod_status, (unsigned long, int)); E void FDECL(set_option_mod_status, (const char *,int)); -#ifdef AUTOPICKUP_EXCEPTIONS E int FDECL(add_autopickup_exception, (const char *)); E void NDECL(free_autopickup_exceptions); -#endif /* AUTOPICKUP_EXCEPTIONS */ #ifdef LOADSYMSETS E int FDECL(load_symset, (const char *,int)); E void FDECL(parsesymbols, (char *)); @@ -1687,9 +1685,7 @@ E boolean FDECL(container_gone, (int (*)(OBJ_P))); E int FDECL(use_container, (struct obj **,int)); E int FDECL(loot_mon, (struct monst *,int *,boolean *)); E int NDECL(dotip); -#ifdef AUTOPICKUP_EXCEPTIONS E boolean FDECL(is_autopickup_exception, (struct obj *, BOOLEAN_P)); -#endif /* AUTOPICKUP_EXCEPTIONS */ /* ### pline.c ### */ diff --git a/include/flag.h b/include/flag.h index 1f53bdec6..2b5d2c3ee 100644 --- a/include/flag.h +++ b/include/flag.h @@ -1,4 +1,4 @@ -/* NetHack 3.5 flag.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 flag.h $NHDT-Date: 1425081976 2015/02/28 00:06:16 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.60 $ */ /* NetHack 3.5 flag.h $Date: 2012/04/09 02:56:32 $ $Revision: 1.59 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -297,11 +297,9 @@ struct instance_flags { boolean cmdassist; /* provide detailed assistance for some commands */ boolean clicklook; /* allow right-clicking for look */ boolean obsolete; /* obsolete options can point at this, it isn't used */ -#ifdef AUTOPICKUP_EXCEPTIONS struct autopickup_exception *autopickup_exceptions[2]; #define AP_LEAVE 0 #define AP_GRAB 1 -#endif #ifdef WIN32CON #define MAX_ALTKEYHANDLER 25 char altkeyhandler[MAX_ALTKEYHANDLER]; diff --git a/include/wceconf.h b/include/wceconf.h index c5fef1547..808334768 100644 --- a/include/wceconf.h +++ b/include/wceconf.h @@ -1,4 +1,4 @@ -/* NetHack 3.5 wceconf.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 wceconf.h $NHDT-Date: 1425081976 2015/02/28 00:06:16 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.12 $ */ /* NetHack 3.5 wceconf.h $Date: 2009/10/22 02:59:14 $ $Revision: 1.12 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ @@ -44,8 +44,6 @@ #define USER_SOUNDS -#define AUTOPICKUP_EXCEPTIONS - /* * ----------------------------------------------------------------- * The remaining code shouldn't need modification. diff --git a/src/files.c b/src/files.c index f45db8bce..5d8b2bf2e 100644 --- a/src/files.c +++ b/src/files.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 files.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 files.c $NHDT-Date: 1425081976 2015/02/28 00:06:16 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.127 $ */ /* NetHack 3.5 files.c $Date: 2012/03/10 02:49:08 $ $Revision: 1.124 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2020,10 +2020,8 @@ int src; parseoptions(bufp, TRUE, TRUE); if (plname[0]) /* If a name was given */ plnamesuffix(); /* set the character class */ -#ifdef AUTOPICKUP_EXCEPTIONS } else if (match_varname(buf, "AUTOPICKUP_EXCEPTION", 5)) { add_autopickup_exception(bufp); -#endif #ifdef NOCWD_ASSUMPTIONS } else if (match_varname(buf, "HACKDIR", 4)) { adjust_prefix(bufp, HACKPREFIX); diff --git a/src/options.c b/src/options.c index dc8cbcfc2..ecb259159 100644 --- a/src/options.c +++ b/src/options.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 options.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 options.c $NHDT-Date: 1425081976 2015/02/28 00:06:16 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.156 $ */ /* NetHack 3.5 options.c $Date: 2012/04/09 02:56:30 $ $Revision: 1.153 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -501,10 +501,8 @@ STATIC_OVL boolean FDECL(is_wc_option, (const char *)); STATIC_OVL boolean FDECL(wc_supported, (const char *)); STATIC_OVL boolean FDECL(is_wc2_option, (const char *)); STATIC_OVL boolean FDECL(wc2_supported, (const char *)); -#ifdef AUTOPICKUP_EXCEPTIONS STATIC_DCL void FDECL(remove_autopickup_exception, (struct autopickup_exception *)); STATIC_OVL int FDECL(count_ape_maps, (int *, int *)); -#endif /* check whether a user-supplied option string is a proper leading substring of a particular option name; option string might have @@ -2923,12 +2921,10 @@ doset() add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, MENU_UNSELECTED); # endif #endif -#ifdef AUTOPICKUP_EXCEPTIONS any.a_int = -1; Sprintf(buf, "autopickup exceptions (%d currently set)", count_ape_maps((int *)0, (int *)0)); add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, MENU_UNSELECTED); -#endif /* AUTOPICKUP_EXCEPTIONS */ #ifdef PREFIXES_IN_USE any = zeroany; add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, "", MENU_UNSELECTED); @@ -2948,12 +2944,10 @@ doset() */ for (pick_idx = 0; pick_idx < pick_cnt; ++pick_idx) { opt_indx = pick_list[pick_idx].item.a_int - 1; -#ifdef AUTOPICKUP_EXCEPTIONS if (opt_indx == -2) { /* -3 due to -1 offset for select_menu() */ (void)special_handling("autopickup_exception", setinitial, fromfile); } else -#endif #ifdef STATUS_VIA_WINDOWPORT # ifdef STATUS_HILITES if (opt_indx == -3) { /* -3 due to -1 offset for select_menu() */ @@ -3020,9 +3014,7 @@ boolean setinitial,setfromfile; /* Special handling of menustyle, pickup_burden, pickup_types, * disclose, runmode, msg_window, menu_headings, and number_pad options. -#ifdef AUTOPICKUP_EXCEPTIONS * Also takes care of interactive autopickup_exception_handling changes. -#endif */ if (!strcmp("menustyle", optname)) { const char *style_name; @@ -3296,7 +3288,6 @@ boolean setinitial,setfromfile; } destroy_nhwindow(tmpwin); } else if (!strcmp("autopickup_exception", optname)) { -#ifdef AUTOPICKUP_EXCEPTIONS int pick_cnt, pick_idx, opt_idx, pass; int totalapes = 0, numapes[2] = {0,0}; menu_item *pick_list = (menu_item *)0; @@ -3392,7 +3383,6 @@ boolean setinitial,setfromfile; destroy_nhwindow(tmpwin); if (pick_cnt >= 0) goto ape_again; } -#endif /* AUTOPICKUP_EXCEPTIONS */ } else if (!strcmp("symset", optname) || !strcmp("roguesymset", optname)) { menu_item *symset_pick = (menu_item *)0; @@ -3897,12 +3887,10 @@ dotogglepickup() if (flags.pickup) { oc_to_str(flags.pickup_types, ocl); Sprintf(buf, "ON, for %s objects%s", ocl[0] ? ocl : "all", -#ifdef AUTOPICKUP_EXCEPTIONS (iflags.autopickup_exceptions[AP_LEAVE] || iflags.autopickup_exceptions[AP_GRAB]) ? ((count_ape_maps((int *)0, (int *)0) == 1) ? ", with one exception" : ", with some exceptions") : -#endif ""); } else { Strcpy(buf, "OFF"); @@ -3911,7 +3899,6 @@ dotogglepickup() return 0; } -#ifdef AUTOPICKUP_EXCEPTIONS int add_autopickup_exception(mapping) const char *mapping; @@ -4004,7 +3991,6 @@ free_autopickup_exceptions() } } } -#endif /* AUTOPICKUP_EXCEPTIONS */ #ifdef LOADSYMSETS /* bundle some common usage into one easy-to-use routine */ diff --git a/src/pickup.c b/src/pickup.c index ee0d91dc7..2c1564f84 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 pickup.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 pickup.c $NHDT-Date: 1425081977 2015/02/28 00:06:17 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.126 $ */ /* NetHack 3.5 pickup.c $Date: 2012/02/16 03:01:38 $ $Revision: 1.123 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -612,7 +612,6 @@ end_query: return (n_tried > 0); } -#ifdef AUTOPICKUP_EXCEPTIONS boolean is_autopickup_exception(obj, grab) struct obj *obj; @@ -631,7 +630,6 @@ boolean grab; /* forced pickup, rather than forced leave behind? */ } return FALSE; } -#endif /* AUTOPICKUP_EXCEPTIONS */ /* * Pick from the given list using flags.pickup_types. Return the number @@ -655,12 +653,10 @@ menu_item **pick_list; /* list of objects and counts to pick up */ /* first count the number of eligible items */ for (n = 0, curr = olist; curr; curr = FOLLOW(curr, follow)) { pickit = (!*otypes || index(otypes, curr->oclass)); -#ifdef AUTOPICKUP_EXCEPTIONS /* check for "always pick up */ if (!pickit) pickit = is_autopickup_exception(curr, TRUE); /* then for "never pick up */ if (pickit) pickit = !is_autopickup_exception(curr, FALSE); -#endif /* pickup_thrown overrides pickup_types and exceptions */ if (!pickit) pickit = (flags.pickup_thrown && curr->was_thrown); /* finally, do we count this object? */ @@ -671,10 +667,8 @@ menu_item **pick_list; /* list of objects and counts to pick up */ *pick_list = pi = (menu_item *) alloc(sizeof(menu_item) * n); for (n = 0, curr = olist; curr; curr = FOLLOW(curr, follow)) { pickit = (!*otypes || index(otypes, curr->oclass)); -#ifdef AUTOPICKUP_EXCEPTIONS if (!pickit) pickit = is_autopickup_exception(curr, TRUE); if (pickit) pickit = !is_autopickup_exception(curr, FALSE); -#endif if (!pickit) pickit = (flags.pickup_thrown && curr->was_thrown); if (pickit) { pi[n].item.a_obj = curr; diff --git a/src/save.c b/src/save.c index 1fa51dfaa..d7828655a 100644 --- a/src/save.c +++ b/src/save.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 save.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 save.c $NHDT-Date: 1425081977 2015/02/28 00:06:17 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.59 $ */ /* NetHack 3.5 save.c $Date: 2012/02/16 02:40:24 $ $Revision: 1.53 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1345,9 +1345,7 @@ freedynamicdata() if (iflags.wc_font_menu) free(iflags.wc_font_menu); if (iflags.wc_font_status) free(iflags.wc_font_status); if (iflags.wc_tile_file) free(iflags.wc_tile_file); -#ifdef AUTOPICKUP_EXCEPTIONS free_autopickup_exceptions(); -#endif #endif /* FREE_ALL_MEMORY */ #ifdef STATUS_VIA_WINDOWPORT status_finish(); diff --git a/util/makedefs.c b/util/makedefs.c index b0d9f2078..c61b561d1 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 makedefs.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 makedefs.c $NHDT-Date: 1425081977 2015/02/28 00:06:17 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.61 $ */ /* NetHack 3.5 makedefs.c $Date: 2012/01/15 09:27:03 $ $Revision: 1.50 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) M. Stephenson, 1990, 1991. */ @@ -1208,9 +1208,6 @@ static const char *build_opts[] = { #ifdef ANSI_DEFAULT "ANSI default terminal", #endif -#ifdef AUTOPICKUP_EXCEPTIONS - "autopickup exceptions", -#endif #ifdef TEXTCOLOR "color", #endif From d218bedbf7757ccc59499cab6cdce594186a3b99 Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Sat, 14 Feb 2015 14:15:27 -0500 Subject: [PATCH 038/132] Make LOADSYMSETS unconditional. There are some bugs here, but this functionality should make it into the release in some form. --- include/config.h | 1 - include/extern.h | 6 ------ include/rm.h | 4 ---- src/drawing.c | 8 -------- src/files.c | 12 ------------ src/mapglyph.c | 38 +------------------------------------- src/options.c | 32 -------------------------------- sys/share/pcmain.c | 10 ++-------- sys/share/unixtty.c | 2 -- sys/unix/unixmain.c | 4 ---- sys/vms/vmsmain.c | 4 ---- 11 files changed, 3 insertions(+), 118 deletions(-) diff --git a/include/config.h b/include/config.h index 282b6949b..db5070a3a 100644 --- a/include/config.h +++ b/include/config.h @@ -412,7 +412,6 @@ typedef unsigned char uchar; */ /* display features */ -#define LOADSYMSETS /* loadable symbol sets; only default symbols w/o this */ /* dungeon features */ /* dungeon levels */ #define WALLIFIED_MAZE /* Fancy mazes - Jean-Christophe Collet */ diff --git a/include/extern.h b/include/extern.h index be15406c2..836b64d5f 100644 --- a/include/extern.h +++ b/include/extern.h @@ -515,11 +515,9 @@ E void NDECL(init_r_symbols); E void NDECL(init_symbols); E void NDECL(init_showsyms); E void NDECL(init_l_symbols); -#ifdef LOADSYMSETS E void FDECL(clear_symsetentry, (int,BOOLEAN_P)); E void FDECL(update_l_symset, (struct symparse *,int)); E void FDECL(update_r_symset, (struct symparse *,int)); -#endif E boolean FDECL(cursed_object_at, (int, int)); /* ### dungeon.c ### */ @@ -733,11 +731,9 @@ E boolean FDECL(can_read_file, (const char *)); E boolean FDECL(read_config_file, (const char *, int)); E void FDECL(check_recordfile, (const char *)); E void NDECL(read_wizkit); -#ifdef LOADSYMSETS E int FDECL(read_sym_file, (int)); E int FDECL(parse_sym_line, (char *,int)); E int FDECL(sym_val, (const char *)); -#endif E void FDECL(paniclog, (const char *, const char *)); E int FDECL(validate_prefix_locations, (char *)); #ifdef SELECTSAVED @@ -1589,11 +1585,9 @@ E void FDECL(set_wc2_option_mod_status, (unsigned long, int)); E void FDECL(set_option_mod_status, (const char *,int)); E int FDECL(add_autopickup_exception, (const char *)); E void NDECL(free_autopickup_exceptions); -#ifdef LOADSYMSETS E int FDECL(load_symset, (const char *,int)); E void FDECL(parsesymbols, (char *)); E struct symparse *FDECL(match_sym, (char *)); -#endif E void NDECL(set_playmode); /* ### pager.c ### */ diff --git a/include/rm.h b/include/rm.h index 8747407f9..2fa3da6b6 100644 --- a/include/rm.h +++ b/include/rm.h @@ -278,12 +278,8 @@ extern const struct symdef def_warnsyms[WARNCOUNT]; extern int currentgraphics; /* from drawing.c */ extern nhsym showsyms[]; -#ifdef LOADSYMSETS extern struct symsetentry symset[NUM_GRAPHICS]; /* from drawing.c */ #define SYMHANDLING(ht) (symset[currentgraphics].handling == (ht)) -#else -#define SYMHANDLING(ht) ((ht) == H_UNK) -#endif /* * The 5 possible states of doors diff --git a/src/drawing.c b/src/drawing.c index 3d94d8803..7fb0d461a 100644 --- a/src/drawing.c +++ b/src/drawing.c @@ -19,9 +19,7 @@ #define C(n) #endif -#ifdef LOADSYMSETS struct symsetentry symset[NUM_GRAPHICS]; -#endif int currentgraphics = 0; @@ -399,9 +397,7 @@ init_l_symbols() l_syms[i + SYM_OFF_X] = DEF_INVISIBLE; } -#ifdef LOADSYMSETS clear_symsetentry(PRIMARY, FALSE); -#endif } void @@ -433,13 +429,11 @@ init_r_symbols() r_syms[i + SYM_OFF_X] = DEF_INVISIBLE; } -# ifdef LOADSYMSETS clear_symsetentry(ROGUESET, FALSE); symset[ROGUESET].nocolor = 1; /* default on Rogue level is no color * but some symbol sets can * override that */ -# endif } void @@ -499,7 +493,6 @@ int nondefault; init_symbols(); } -#ifdef LOADSYMSETS void update_l_symset(symp, val) struct symparse *symp; @@ -755,7 +748,6 @@ struct symparse loadsyms[] = { {SYM_OTH, SYM_INVISIBLE + SYM_OFF_X, "S_invisible"}, {0,0,(const char *)0} /* fence post */ }; -#endif /*LOADSYMSETS*/ /*drawing.c*/ diff --git a/src/files.c b/src/files.c index 5d8b2bf2e..cb7363399 100644 --- a/src/files.c +++ b/src/files.c @@ -190,10 +190,8 @@ STATIC_DCL FILE *FDECL(fopen_config_file, (const char *, int)); STATIC_DCL int FDECL(get_uchars, (FILE *,char *,char *,uchar *,BOOLEAN_P,int,const char *)); int FDECL(parse_config_line, (FILE *,char *,int)); -#ifdef LOADSYMSETS STATIC_DCL FILE *NDECL(fopen_sym_file); STATIC_DCL void FDECL(set_symhandling, (char *,int)); -#endif #ifdef NOCWD_ASSUMPTIONS STATIC_DCL void FDECL(adjust_prefix, (char *, int)); #endif @@ -2202,10 +2200,6 @@ int src; WARNCOUNT, "WARNINGS"); assign_warnings(translate); } else if (match_varname(buf, "SYMBOLS", 4)) { - /* This part is not ifdef LOADSYMSETS because we want to be able - * to silently ignore its presence in a config file if that is - * not defined. - */ char *op, symbuf[BUFSZ]; boolean morelines; do { @@ -2224,10 +2218,8 @@ int src; /* strip trailing space now that '\' is gone */ while (--op >= bufp && isspace(*op)) *op = '\0'; } -#ifdef LOADSYMSETS /* parse here */ parsesymbols(bufp); -#endif if (morelines) do { *symbuf = '\0'; @@ -2238,9 +2230,7 @@ int src; bufp = symbuf; } while (*bufp == '#'); } while (morelines); -#ifdef LOADSYMSETS switch_symbols(TRUE); -#endif } else if (match_varname(buf, "WIZKIT", 6)) { (void) strncpy(wizkit, bufp, WIZKIT_MAX-1); #ifdef AMIGA @@ -2561,7 +2551,6 @@ read_wizkit() return; } -#ifdef LOADSYMSETS extern struct symsetentry *symset_list; /* options.c */ extern struct symparse loadsyms[]; /* drawing.c */ extern const char *known_handling[]; /* drawing.c */ @@ -2897,7 +2886,6 @@ const char *cp; } return cval; } -#endif /*LOADSYMSETS*/ /* ---------- END CONFIG FILE HANDLING ----------- */ diff --git a/src/mapglyph.c b/src/mapglyph.c index f1adae27a..c00d6f8ad 100644 --- a/src/mapglyph.c +++ b/src/mapglyph.c @@ -34,9 +34,6 @@ int explcolors[] = { #define pet_color(n) color = iflags.use_color ? mons[n].mcolor : NO_COLOR #define warn_color(n) color = iflags.use_color ? def_warnsyms[n].color : NO_COLOR #define explode_color(n) color = iflags.use_color ? explcolors[n] : NO_COLOR -#ifdef LOADSYMSETS -# define ROGUE_COLOR -#endif #else /* no text color */ @@ -66,17 +63,13 @@ int *ochar; unsigned *ospecial; { register int offset, idx; -#if defined(TEXTCOLOR) || defined(ROGUE_COLOR) int color = NO_COLOR; -#endif nhsym ch; unsigned special = 0; /* condense multiple tests in macro version down to single */ boolean has_rogue_ibm_graphics = HAS_ROGUE_IBM_GRAPHICS; -#ifdef ROGUE_COLOR boolean has_rogue_color = (has_rogue_ibm_graphics && (symset[currentgraphics].nocolor == 0)); -#endif /* * Map the glyph back to a character and color. @@ -86,45 +79,36 @@ unsigned *ospecial; */ if ((offset = (glyph - GLYPH_STATUE_OFF)) >= 0) { /* a statue */ idx = mons[offset].mlet + SYM_OFF_M; -# ifdef ROGUE_COLOR if (has_rogue_color) color = CLR_RED; else -# endif obj_color(STATUE); special |= MG_STATUE; } else if ((offset = (glyph - GLYPH_WARNING_OFF)) >= 0) { /* a warning flash */ idx = offset + SYM_OFF_W; -# ifdef ROGUE_COLOR if (has_rogue_color) color = NO_COLOR; else -# endif warn_color(offset); } else if ((offset = (glyph - GLYPH_SWALLOW_OFF)) >= 0) { /* swallow */ /* see swallow_to_glyph() in display.c */ idx = (S_sw_tl + (offset & 0x7)) + SYM_OFF_P; -#ifdef ROGUE_COLOR if (has_rogue_color && iflags.use_color) color = NO_COLOR; else -#endif mon_color(offset >> 3); } else if ((offset = (glyph - GLYPH_ZAP_OFF)) >= 0) { /* zap beam */ /* see zapdir_to_glyph() in display.c */ idx = (S_vbeam + (offset & 0x3)) + SYM_OFF_P; -#ifdef ROGUE_COLOR if (has_rogue_color && iflags.use_color) color = NO_COLOR; else -#endif zap_color((offset >> 2)); } else if ((offset = (glyph - GLYPH_EXPLODE_OFF)) >= 0) { /* explosion */ idx = ((offset % MAXEXPCHARS) + S_explode1) + SYM_OFF_P; explode_color(offset / MAXEXPCHARS); } else if ((offset = (glyph - GLYPH_CMAP_OFF)) >= 0) { /* cmap */ idx = offset + SYM_OFF_P; -#ifdef ROGUE_COLOR if (has_rogue_color && iflags.use_color) { if (offset >= S_vwall && offset <= S_hcdoor) color = CLR_BROWN; @@ -137,7 +121,6 @@ unsigned *ospecial; else color = NO_COLOR; } else -#endif #ifdef TEXTCOLOR /* provide a visible difference if normal and lit corridor * use the same symbol */ @@ -151,7 +134,6 @@ unsigned *ospecial; idx = objects[offset].oc_class + SYM_OFF_O; if (offset == BOULDER && iflags.bouldersym) idx = SYM_BOULDER + SYM_OFF_X; -#ifdef ROGUE_COLOR if (has_rogue_color && iflags.use_color) { switch(objects[offset].oc_class) { case COIN_CLASS: color = CLR_YELLOW; break; @@ -159,70 +141,56 @@ unsigned *ospecial; default: color = CLR_BRIGHT_BLUE; break; } } else -#endif obj_color(offset); } else if ((offset = (glyph - GLYPH_RIDDEN_OFF)) >= 0) { /* mon ridden */ idx = mons[offset].mlet + SYM_OFF_M; -#ifdef ROGUE_COLOR if (has_rogue_color) /* This currently implies that the hero is here -- monsters */ /* don't ride (yet...). Should we set it to yellow like in */ /* the monster case below? There is no equivalent in rogue. */ color = NO_COLOR; /* no need to check iflags.use_color */ else -#endif mon_color(offset); special |= MG_RIDDEN; } else if ((offset = (glyph - GLYPH_BODY_OFF)) >= 0) { /* a corpse */ idx = objects[CORPSE].oc_class + SYM_OFF_O; -#ifdef ROGUE_COLOR if (has_rogue_color && iflags.use_color) color = CLR_RED; else -#endif mon_color(offset); special |= MG_CORPSE; } else if ((offset = (glyph - GLYPH_DETECT_OFF)) >= 0) { /* mon detect */ idx = mons[offset].mlet + SYM_OFF_M; -#ifdef ROGUE_COLOR if (has_rogue_color) color = NO_COLOR; /* no need to check iflags.use_color */ else -#endif mon_color(offset); /* Disabled for now; anyone want to get reverse video to work? */ /* is_reverse = TRUE; */ special |= MG_DETECT; } else if ((offset = (glyph - GLYPH_INVIS_OFF)) >= 0) { /* invisible */ idx = SYM_INVISIBLE + SYM_OFF_X; -#ifdef ROGUE_COLOR if (has_rogue_color) color = NO_COLOR; /* no need to check iflags.use_color */ else -#endif invis_color(offset); special |= MG_INVIS; } else if ((offset = (glyph - GLYPH_PET_OFF)) >= 0) { /* a pet */ idx = mons[offset].mlet + SYM_OFF_M; -#ifdef ROGUE_COLOR if (has_rogue_color) color = NO_COLOR; /* no need to check iflags.use_color */ else -#endif pet_color(offset); special |= MG_PET; } else { /* a monster */ idx = mons[glyph].mlet + SYM_OFF_M; -#ifdef ROGUE_COLOR if (has_rogue_color && iflags.use_color) { if (x == u.ux && y == u.uy) /* actually player should be yellow-on-gray if in a corridor */ color = CLR_YELLOW; else color = NO_COLOR; - } else -#endif - { + } else { mon_color(glyph); /* special case the hero for `showrace' option */ #ifdef TEXTCOLOR @@ -236,11 +204,7 @@ unsigned *ospecial; ch = showsyms[idx]; #ifdef TEXTCOLOR /* Turn off color if no color defined, or rogue level w/o PC graphics. */ -# ifdef ROGUE_COLOR if (!has_color(color) || (Is_rogue_level(&u.uz) && !has_rogue_color)) -# else - if (!has_color(color) || Is_rogue_level(&u.uz)) -# endif color = NO_COLOR; #endif diff --git a/src/options.c b/src/options.c index ecb259159..51bda6c59 100644 --- a/src/options.c +++ b/src/options.c @@ -350,17 +350,9 @@ static struct Comp_Opt { "soundcard", "type of sound card to use", 20, SET_IN_FILE }, #endif { "symset", "load a set of display symbols from the symbols file", 70, -#ifdef LOADSYMSETS SET_IN_GAME }, -#else - DISP_IN_GAME}, -#endif { "roguesymset", "load a set of rogue display symbols from the symbols file", 70, -#ifdef LOADSYMSETS SET_IN_GAME }, -#else - DISP_IN_GAME}, -#endif { "suppress_alert", "suppress alerts about version-specific features", 8, SET_IN_GAME }, { "tile_width", "width of tiles", 20, DISP_IN_GAME}, /*WC*/ @@ -654,11 +646,9 @@ initoptions_init() */ /* this detects the IBM-compatible console on most 386 boxes */ if ((opts = nh_getenv("TERM")) && !strncmp(opts, "AT", 2)) { -#ifdef LOADSYMSETS if (!symset[PRIMARY].name) load_symset("IBMGraphics", PRIMARY); if (!symset[ROGUESET].name) load_symset("RogueIBM", ROGUESET); switch_symbols(TRUE); -#endif # ifdef TEXTCOLOR iflags.use_color = TRUE; # endif @@ -670,10 +660,8 @@ initoptions_init() if ((opts = nh_getenv("TERM")) && !strncmpi(opts, "vt", 2) && AS && AE && index(AS, '\016') && index(AE, '\017')) { -# ifdef LOADSYMSETS if (!symset[PRIMARY].name) load_symset("DECGraphics", PRIMARY); switch_symbols(TRUE); -# endif /*LOADSYMSETS*/ } # endif #endif /* UNIX || VMS */ @@ -1406,7 +1394,6 @@ boolean tinitial, tfrom_file; fullname = "symset"; if (match_optname(opts, fullname, 6, TRUE)) { -#ifdef LOADSYMSETS if (duplicate) complain_about_duplicate(opts,1); if (negated) bad_negation(fullname, FALSE); else if ((op = string_for_opt(opts, FALSE)) != 0) { @@ -1422,7 +1409,6 @@ boolean tinitial, tfrom_file; need_redraw = TRUE; } } -#endif return; } @@ -2505,7 +2491,6 @@ goodfruit: fullname = "DECgraphics"; if (match_optname(opts, fullname, 10, TRUE)) { boolean badflag = FALSE; -# ifdef LOADSYMSETS if (duplicate) complain_about_duplicate(opts,1); if (!negated) { /* There is no rogue level DECgraphics-specific set */ @@ -2525,14 +2510,12 @@ goodfruit: wait_synch(); } } -# endif /*LOADSYMSETS*/ return; } fullname = "IBMgraphics"; if (match_optname(opts, fullname, 10, TRUE)) { const char *sym_name = fullname; boolean badflag = FALSE; -# ifdef LOADSYMSETS if (duplicate) complain_about_duplicate(opts,1); if (!negated) { for (i = PRIMARY; i <= ROGUESET; ++i) { @@ -2559,7 +2542,6 @@ goodfruit: assign_graphics(ROGUESET); } } -# endif /*LOADSYMSETS*/ return; } #endif @@ -2567,7 +2549,6 @@ goodfruit: fullname = "MACgraphics"; if (match_optname(opts, fullname, 11, TRUE)) { boolean badflag = FALSE; -# ifdef LOADSYMSETS if (duplicate) complain_about_duplicate(opts,1); if (!negated) { if (symset[PRIMARY]).name badflag = TRUE; @@ -2589,7 +2570,6 @@ goodfruit: assign_graphics(ROGUESET); } } -# endif /*LOADSYMSETS*/ return; } #endif @@ -2997,10 +2977,8 @@ doset() return 0; } -#ifdef LOADSYMSETS struct symsetentry *symset_list = 0; /* files.c will populate this with list of available sets */ -#endif STATIC_OVL boolean special_handling(optname, setinitial, setfromfile) @@ -3390,19 +3368,16 @@ boolean setinitial,setfromfile; rogueflag = (*optname == 'r'), ready_to_switch = FALSE, nothing_to_do = FALSE; -#ifdef LOADSYMSETS int res; char *symset_name, fmtstr[20]; struct symsetentry *sl; int setcount = 0; -#endif int chosen = -2, which_set; if (rogueflag) which_set = ROGUESET; else which_set = PRIMARY; -#ifdef LOADSYMSETS /* clear symset[].name as a flag to read_sym_file() to build list */ symset_name = symset[which_set].name; symset[which_set].name = (char *)0; @@ -3551,7 +3526,6 @@ boolean setinitial,setfromfile; assign_graphics(ROGUESET); } else if (!rogueflag) assign_graphics(PRIMARY); need_redraw = TRUE; -#endif /*LOADSYMSETS*/ return TRUE; } else { @@ -3772,10 +3746,8 @@ char *buf; Sprintf(buf, "%s", rolestring(flags.initrace, races, noun)); else if (!strcmp(optname, "roguesymset")) { Sprintf(buf, "%s", -#ifdef LOADSYMSETS symset[ROGUESET].name ? symset[ROGUESET].name : -#endif "default"); if (currentgraphics == ROGUESET && symset[ROGUESET].name) Strcat(buf, ", active"); @@ -3813,10 +3785,8 @@ char *buf; } else if (!strcmp(optname, "symset")) { Sprintf(buf, "%s", -#ifdef LOADSYMSETS symset[PRIMARY].name ? symset[PRIMARY].name : -#endif "default"); if (currentgraphics == PRIMARY && symset[PRIMARY].name) Strcat(buf, ", active"); @@ -3992,7 +3962,6 @@ free_autopickup_exceptions() } } -#ifdef LOADSYMSETS /* bundle some common usage into one easy-to-use routine */ int load_symset(s, which_set) @@ -4070,7 +4039,6 @@ char *buf; } return (struct symparse *)0; } -#endif /*LOADSYMSETS*/ /* data for option_help() */ static const char *opt_intro[] = { diff --git a/sys/share/pcmain.c b/sys/share/pcmain.c index 55188619b..6635c56ad 100644 --- a/sys/share/pcmain.c +++ b/sys/share/pcmain.c @@ -303,8 +303,7 @@ char *argv[]; process_options(argc, argv); #endif -#ifdef LOADSYMSETS -# if defined(MSDOS) || defined(WIN32) +#if defined(MSDOS) || defined(WIN32) /* Player didn't specify any symbol set so use IBM defaults */ if (!symset[PRIMARY].name) { load_symset("IBMGraphics_2", PRIMARY); @@ -312,8 +311,7 @@ char *argv[]; if (!symset[ROGUESET].name) { load_symset("RogueEpyx", ROGUESET); } -# endif -#endif /*LOADSYMSETS*/ +#endif #ifdef MSDOS init_nhwindows(&argc,argv); @@ -536,20 +534,16 @@ char *argv[]; case 'I': case 'i': if (!strncmpi(argv[0]+1, "IBM", 3)) { -# ifdef LOADSYMSETS load_symset("IBMGraphics", PRIMARY); load_symset("RogueIBM", ROGUESET); switch_symbols(TRUE); -# endif } break; /* case 'D': */ case 'd': if (!strncmpi(argv[0]+1, "DEC", 3)) { -# ifdef LOADSYMSETS load_symset("DECGraphics", PRIMARY); switch_symbols(TRUE); -# endif } break; #endif diff --git a/sys/share/unixtty.c b/sys/share/unixtty.c index 68c6f104c..678ab565d 100644 --- a/sys/share/unixtty.c +++ b/sys/share/unixtty.c @@ -364,11 +364,9 @@ init_sco_cons() if (!strcmp(windowprocs.name, "tty") && sco_flag_console) { atexit(sco_mapon); sco_mapoff(); -# ifdef LOADSYMSETS load_symset("IBMGraphics", PRIMARY); load_symset("RogueIBM", ROGUESET); switch_symbols(TRUE); -# endif # ifdef TEXTCOLOR if (has_colors()) iflags.use_color = TRUE; diff --git a/sys/unix/unixmain.c b/sys/unix/unixmain.c index f7cb9b26c..c470dc6e0 100644 --- a/sys/unix/unixmain.c +++ b/sys/unix/unixmain.c @@ -357,20 +357,16 @@ char *argv[]; case 'I': case 'i': if (!strncmpi(argv[0]+1, "IBM", 3)) { -#ifdef LOADSYMSETS load_symset("IBMGraphics", PRIMARY); load_symset("RogueIBM", ROGUESET); switch_symbols(TRUE); -#endif } break; /* case 'D': */ case 'd': if (!strncmpi(argv[0]+1, "DEC", 3)) { -#ifdef LOADSYMSETS load_symset("DECGraphics", PRIMARY); switch_symbols(TRUE); -#endif } break; case 'p': /* profession (role) */ diff --git a/sys/vms/vmsmain.c b/sys/vms/vmsmain.c index a34224005..abeff040e 100644 --- a/sys/vms/vmsmain.c +++ b/sys/vms/vmsmain.c @@ -266,20 +266,16 @@ char *argv[]; case 'I': case 'i': if (!strncmpi(argv[0]+1, "IBM", 3)) { -#ifdef LOADSYMSETS load_symset("IBMGraphics", PRIMARY); load_symset("RogueIBM", ROGUESET); switch_symbols(TRUE); -#endif } break; /* case 'D': */ case 'd': if (!strncmpi(argv[0]+1, "DEC", 3)) { -#ifdef LOADSYMSETS load_symset("DECGraphics", PRIMARY); switch_symbols(TRUE); -#endif } break; case 'p': /* profession (role) */ From 0001534d040b793eb79af669d308f7543c562b20 Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Fri, 27 Feb 2015 19:24:28 -0500 Subject: [PATCH 039/132] Make REDO unconditional. --- include/config.h | 5 +---- include/decl.h | 2 -- include/extern.h | 2 -- include/global.h | 6 ------ include/ntconf.h | 5 ----- include/os2conf.h | 5 ----- include/pcconf.h | 5 ----- include/unixconf.h | 3 --- include/vmsconf.h | 3 --- include/wceconf.h | 5 ----- src/allmain.c | 8 +------- src/cmd.c | 24 +++--------------------- src/decl.c | 2 -- src/invent.c | 12 ------------ src/o_init.c | 2 -- sys/share/pcsys.c | 2 +- util/makedefs.c | 3 --- win/tty/getline.c | 8 +------- 18 files changed, 7 insertions(+), 95 deletions(-) diff --git a/include/config.h b/include/config.h index db5070a3a..5cf035b54 100644 --- a/include/config.h +++ b/include/config.h @@ -417,16 +417,13 @@ typedef unsigned char uchar; #define WALLIFIED_MAZE /* Fancy mazes - Jean-Christophe Collet */ /* monsters & objects */ /* I/O */ -#define REDO /* support for redoing last command - DGK */ #if !defined(MAC) # if !defined(NOCLIPPING) # define CLIPPING /* allow smaller screens -- ERS */ # endif #endif -#ifdef REDO -# define DOAGAIN '\001' /* ^A, the "redo" key used in cmd.c and getline.c */ -#endif +#define DOAGAIN '\001' /* ^A, the "redo" key used in cmd.c and getline.c */ #define EXP_ON_BOTL /* Show experience on bottom line */ /* #define SCORE_ON_BOTL */ /* added by Gary Erickson (erickson@ucivax) */ diff --git a/include/decl.h b/include/decl.h index 4733b5317..92f1e8240 100644 --- a/include/decl.h +++ b/include/decl.h @@ -39,9 +39,7 @@ E NEARDATA int warn_obj_cnt; /* count of monsters meeting criteria */ E int x_maze_max, y_maze_max; E int otg_temp; -#ifdef REDO E NEARDATA int in_doagain; -#endif E struct dgn_topology { /* special dungeon levels for speed */ d_level d_oracle_level; diff --git a/include/extern.h b/include/extern.h index 836b64d5f..bfd361326 100644 --- a/include/extern.h +++ b/include/extern.h @@ -182,11 +182,9 @@ E int NDECL(wiz_wish); #endif /* USE_TRAMPOLI */ E void NDECL(reset_occupations); E void FDECL(set_occupation, (int (*)(void),const char *,int)); -#ifdef REDO E char NDECL(pgetchar); E void FDECL(pushch, (CHAR_P)); E void FDECL(savech, (CHAR_P)); -#endif E void NDECL(add_debug_extended_commands); E void FDECL(reset_commands, (BOOLEAN_P)); E void FDECL(rhack, (char *)); diff --git a/include/global.h b/include/global.h index 985066520..e3292e243 100644 --- a/include/global.h +++ b/include/global.h @@ -134,12 +134,6 @@ typedef char nhptext; */ #define LARGEST_INT 32767 - -#ifdef REDO -#define Getchar pgetchar -#endif - - #include "coord.h" /* * Automatic inclusions for the subsidiary files. diff --git a/include/ntconf.h b/include/ntconf.h index 539833aed..4ad1a6e73 100644 --- a/include/ntconf.h +++ b/include/ntconf.h @@ -229,11 +229,6 @@ int _RTLENTRY _EXPFUNC read (int __handle, void _FAR *__buf, unsigned __len); #define ALLOCA_HACK /* used in util/panic.c */ #endif -#ifndef REDO -#undef Getchar -#define Getchar nhgetch -#endif - extern int FDECL(set_win32_option, (const char *, const char *)); #ifdef WIN32CON #define LEFTBUTTON FROM_LEFT_1ST_BUTTON_PRESSED diff --git a/include/os2conf.h b/include/os2conf.h index eeb4e53aa..1c24c10fd 100644 --- a/include/os2conf.h +++ b/include/os2conf.h @@ -100,11 +100,6 @@ #define sethanguphandler(foo) (void)signal(SIGHUP, (SIG_RET_TYPE)foo) #endif -#ifndef REDO -# undef Getchar -# define Getchar nhgetch -#endif - void hangup(int i); #endif /* OS2CONF_H */ #endif /* OS2 */ diff --git a/include/pcconf.h b/include/pcconf.h index 70a519c00..77a496dac 100644 --- a/include/pcconf.h +++ b/include/pcconf.h @@ -249,11 +249,6 @@ #include -#ifndef REDO -# undef Getchar -# define Getchar nhgetch -#endif - #ifdef MSDOS # define TEXTCOLOR /* */ # define PORT_HELP "msdoshlp.txt" /* msdos port specific help file */ diff --git a/include/unixconf.h b/include/unixconf.h index 0ffa2e119..c85611c2a 100644 --- a/include/unixconf.h +++ b/include/unixconf.h @@ -281,9 +281,6 @@ #define HLOCK "perm" /* an empty file used for locking purposes */ -#ifndef REDO -#define Getchar nhgetch -#endif #define tgetch getchar #ifndef NOSHELL diff --git a/include/vmsconf.h b/include/vmsconf.h index d675588e2..f3045bed7 100644 --- a/include/vmsconf.h +++ b/include/vmsconf.h @@ -234,9 +234,6 @@ typedef __mode_t mode_t; # define O_TRUNC 0x400 #endif -#ifndef REDO -# define Getchar nhgetch -#endif #define tgetch vms_getchar #include "system.h" diff --git a/include/wceconf.h b/include/wceconf.h index 808334768..52ad4d1f1 100644 --- a/include/wceconf.h +++ b/include/wceconf.h @@ -185,11 +185,6 @@ extern void NDECL(toggle_mouse_support); #define ALLOCA_HACK /* used in util/panic.c */ #endif -#ifndef REDO -#undef Getchar -#define Getchar nhgetch -#endif - #ifdef _MSC_VER #if 0 #pragma warning(disable:4018) /* signed/unsigned mismatch */ diff --git a/src/allmain.c b/src/allmain.c index d56f11bda..2bb1c4240 100644 --- a/src/allmain.c +++ b/src/allmain.c @@ -246,11 +246,9 @@ boolean resuming; if (!next_to_u()) { check_leash(old_ux, old_uy); } -#ifdef REDO /* clear doagain keystrokes */ pushch(0); savech(0); -#endif } } /* delayed change may not be valid anymore */ @@ -355,12 +353,10 @@ boolean resuming; #if defined(MICRO) || defined(WIN32) abort_lev = 0; if (kbhit()) { - if ((ch = Getchar()) == ABORT) + if ((ch = pgetchar()) == ABORT) abort_lev++; -# ifdef REDO else pushch(ch); -# endif /* REDO */ } if (!abort_lev && (*occupation)() == 0) #else @@ -439,10 +435,8 @@ stop_occupation() You("stop %s.", occtxt); occupation = 0; context.botl = 1; /* in case u.uhs changed */ -#ifdef REDO nomul(0); pushch(0); -#endif } } diff --git a/src/cmd.c b/src/cmd.c index 1477eabdc..f7e858e01 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -236,7 +236,6 @@ int xtime; return; } -#ifdef REDO STATIC_DCL char NDECL(popch); @@ -298,7 +297,6 @@ char ch; } return; } -#endif /* REDO */ STATIC_PTR int doextcmd(VOID_ARGS) /* here after # - now read a full-word command */ @@ -2950,7 +2948,6 @@ register char *cmd; context.move = FALSE; return; } -#ifdef REDO if (*cmd == DOAGAIN && !in_doagain && saveq[0]) { in_doagain = TRUE; stail = 0; @@ -2960,9 +2957,6 @@ register char *cmd; } /* Special case of *cmd == ' ' handled better below */ if(!*cmd || *cmd == (char)0377) -#else - if(!*cmd || *cmd == (char)0377 || (!flags.rest_on_space && *cmd == ' ')) -#endif { nhbell(); context.move = FALSE; @@ -3253,11 +3247,9 @@ const char *s; int is_mov; retry: -#ifdef REDO if (in_doagain || *readchar_queue) dirsym = readchar(); else -#endif dirsym = yn_function((s && *s != '^') ? s : "In what direction?", (char *)0, '\0'); /* remove the prompt string so caller won't have to */ @@ -3267,9 +3259,7 @@ const char *s; docrt(); /* redraw */ goto retry; } -#ifdef REDO savech(dirsym); -#endif if (dirsym == '.' || dirsym == 's') { u.dx = u.dy = u.dz = 0; @@ -3554,14 +3544,12 @@ parse() if (foo == '\033') { /* esc cancels count (TH) */ clear_nhwindow(WIN_MESSAGE); multi = last_multi = 0; -# ifdef REDO } else if (foo == DOAGAIN || in_doagain) { multi = last_multi; } else { last_multi = multi; savech(0); /* reset input queue */ savech((char)foo); -# endif } if (multi) { @@ -3589,9 +3577,7 @@ parse() if (foo == 'g' || foo == 'G' || foo == 'm' || foo == 'M' || foo == 'F' || (Cmd.num_pad && (foo == '5' || foo == '-'))) { foo = readchar(); -#ifdef REDO savech((char)foo); -#endif in_line[1] = foo; in_line[2] = 0; } @@ -3658,11 +3644,7 @@ readchar() if ( *readchar_queue ) sym = *readchar_queue++; else -#ifdef REDO - sym = in_doagain ? Getchar() : nh_poskey(&x, &y, &mod); -#else - sym = Getchar(); -#endif + sym = in_doagain ? pgetchar() : nh_poskey(&x, &y, &mod); #ifdef NR_OF_EOFS if (sym == EOF) { @@ -3674,7 +3656,7 @@ readchar() */ do { clearerr(stdin); /* omit if clearerr is undefined */ - sym = Getchar(); + sym = pgetchar(); } while (--cnt && sym == EOF); } #endif /* NR_OF_EOFS */ @@ -3687,7 +3669,7 @@ readchar() #ifdef ALTMETA } else if (sym == '\033' && alt_esc) { /* iflags.altmeta: treat two character ``ESC c'' as single `M-c' */ - sym = *readchar_queue ? *readchar_queue++ : Getchar(); + sym = *readchar_queue ? *readchar_queue++ : pgetchar(); if (sym == EOF || sym == 0) sym = '\033'; else if (sym != '\033') diff --git a/src/decl.c b/src/decl.c index 47043d0cd..f7601bda0 100644 --- a/src/decl.c +++ b/src/decl.c @@ -31,9 +31,7 @@ int x_maze_max = (COLNO-1) & ~1, int otg_temp; /* used by object_to_glyph() [otg] */ -#ifdef REDO NEARDATA int in_doagain = 0; -#endif /* * The following structure will be initialized at startup time with diff --git a/src/invent.c b/src/invent.c index 7a7a83734..e3cd20247 100644 --- a/src/invent.c +++ b/src/invent.c @@ -928,11 +928,9 @@ register const char *let,*word; Sprintf(qbuf, "What do you want to %s? [%s or ?*]", word, buf); } -#ifdef REDO if (in_doagain) ilet = readchar(); else -#endif ilet = yn_function(qbuf, (char *)0, '\0'); if (digit(ilet) && !allowcnt) { pline("No count allowed with this command."); @@ -940,9 +938,7 @@ register const char *let,*word; } if (ilet == '0') prezero = TRUE; while (digit(ilet)) { -#ifdef REDO if (ilet != '?' && ilet != '*') savech(ilet); -#endif /* accumulate unless cnt has overflowed */ if (allowcnt < 3) { prevcnt = cnt; @@ -1018,23 +1014,17 @@ register const char *let,*word; } } context.botl = 1; /* May have changed the amount of money */ -#ifdef REDO savech(ilet); -#endif for (otmp = invent; otmp; otmp = otmp->nobj) if (otmp->invlet == ilet) break; if(!otmp) { You("don't have that object."); -#ifdef REDO if (in_doagain) return((struct obj *) 0); -#endif continue; } else if (cnt < 0 || otmp->quan < cnt) { You("don't have that many! You have only %ld.", otmp->quan); -#ifdef REDO if (in_doagain) return((struct obj *) 0); -#endif continue; } break; @@ -2102,9 +2092,7 @@ dotypeinv() if(class_count > 1) { c = yn_function(prompt, types, '\0'); -#ifdef REDO savech(c); -#endif if(c == '\0') { clear_nhwindow(WIN_MESSAGE); return 0; diff --git a/src/o_init.c b/src/o_init.c index 102160635..4ae8892e9 100644 --- a/src/o_init.c +++ b/src/o_init.c @@ -568,9 +568,7 @@ doclassdisco() } /* get the class (via its symbol character) */ c = yn_function(prompt, discosyms, '\0'); -#ifdef REDO savech(c); -#endif if (!c) clear_nhwindow(WIN_MESSAGE); } else { diff --git a/sys/share/pcsys.c b/sys/share/pcsys.c index 0fc5ee8ed..16d36bbb7 100644 --- a/sys/share/pcsys.c +++ b/sys/share/pcsys.c @@ -407,7 +407,7 @@ const char *str; #else msmsg("Hit %s.", str); #endif - while (Getchar() != '\n') ; + while (pgetchar() != '\n') ; return; } diff --git a/util/makedefs.c b/util/makedefs.c index c61b561d1..9ea0d3898 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -1261,9 +1261,6 @@ static const char *build_opts[] = { # endif # endif #endif -#ifdef REDO - "redo command", -#endif #ifdef SELECTSAVED "restore saved games via menu", #endif diff --git a/win/tty/getline.c b/win/tty/getline.c index 6dfa10a6e..2dd90ae3f 100644 --- a/win/tty/getline.c +++ b/win/tty/getline.c @@ -82,7 +82,7 @@ getlin_hook_proc hook; #else Strcat(strcat(strcpy(toplines, query), " "), obufp); #endif - c = Getchar(); + c = pgetchar(); if (c == '\033' || c == EOF) { obufp[0] = '\033'; obufp[1] = '\0'; @@ -271,26 +271,20 @@ tty_get_ext_cmd() if (iflags.extmenu) return extcmd_via_menu(); /* maybe a runtime option? */ /* hooked_tty_getlin("#", buf, flags.cmd_comp ? ext_cmd_getlin_hook : (getlin_hook_proc) 0); */ -#ifdef REDO hooked_tty_getlin("#", buf, in_doagain ? (getlin_hook_proc)0 : ext_cmd_getlin_hook); -#else - hooked_tty_getlin("#", buf, ext_cmd_getlin_hook); -#endif (void) mungspaces(buf); if (buf[0] == 0 || buf[0] == '\033') return -1; for (i = 0; extcmdlist[i].ef_txt != (char *)0; i++) if (!strcmpi(buf, extcmdlist[i].ef_txt)) break; -#ifdef REDO if (!in_doagain) { int j; for (j = 0; buf[j]; j++) savech(buf[j]); savech('\n'); } -#endif if (extcmdlist[i].ef_txt == (char *)0) { pline("%s: unknown extended command.", buf); From 7c09285a8c344022ab813d71b8861c2d4553f99a Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Fri, 27 Feb 2015 19:24:43 -0500 Subject: [PATCH 040/132] Make EXP_ON_BOTL unconditional. --- include/config.h | 3 +-- src/botl.c | 4 +--- src/options.c | 8 +------- sys/wince/mhstatus.c | 4 +--- util/makedefs.c | 13 +++---------- win/X11/winstat.c | 15 +-------------- win/gnome/gnstatus.c | 4 +--- 7 files changed, 9 insertions(+), 42 deletions(-) diff --git a/include/config.h b/include/config.h index 5cf035b54..3bddda18b 100644 --- a/include/config.h +++ b/include/config.h @@ -1,4 +1,4 @@ -/* NetHack 3.5 config.h $NHDT-Date: 1425081976 2015/02/28 00:06:16 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.48 $ */ +/* NetHack 3.5 config.h $NHDT-Date: 1425083082 2015/02/28 00:24:42 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.51 $ */ /* NetHack 3.5 config.h $Date: 2012/01/27 20:15:26 $ $Revision: 1.37 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -425,7 +425,6 @@ typedef unsigned char uchar; #define DOAGAIN '\001' /* ^A, the "redo" key used in cmd.c and getline.c */ -#define EXP_ON_BOTL /* Show experience on bottom line */ /* #define SCORE_ON_BOTL */ /* added by Gary Erickson (erickson@ucivax) */ /* diff --git a/src/botl.c b/src/botl.c index ab02ae35b..76d16a8ff 100644 --- a/src/botl.c +++ b/src/botl.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 botl.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 botl.c $NHDT-Date: 1425083082 2015/02/28 00:24:42 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.38 $ */ /* NetHack 3.5 botl.c $Date: 2012/01/10 17:47:19 $ $Revision: 1.36 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -268,10 +268,8 @@ bot2() if (Upolyd) Sprintf(nb = eos(nb), " HD:%d", mons[u.umonnum].mlevel); -#ifdef EXP_ON_BOTL else if(flags.showexp) Sprintf(nb = eos(nb), " Xp:%u/%-1ld", u.ulevel,u.uexp); -#endif else Sprintf(nb = eos(nb), " Exp:%u", u.ulevel); diff --git a/src/options.c b/src/options.c index 51bda6c59..97378888a 100644 --- a/src/options.c +++ b/src/options.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 options.c $NHDT-Date: 1425081976 2015/02/28 00:06:16 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.156 $ */ +/* NetHack 3.5 options.c $NHDT-Date: 1425083082 2015/02/28 00:24:42 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.158 $ */ /* NetHack 3.5 options.c $Date: 2012/04/09 02:56:30 $ $Revision: 1.153 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -175,11 +175,7 @@ static struct Bool_Opt {"safe_pet", &flags.safe_dog, TRUE, SET_IN_GAME}, {"sanity_check", &iflags.sanity_check, FALSE, SET_IN_GAME}, {"selectsaved", &iflags.wc2_selectsaved, TRUE, DISP_IN_GAME}, /*WC*/ -#ifdef EXP_ON_BOTL {"showexp", &flags.showexp, FALSE, SET_IN_GAME}, -#else - {"showexp", (boolean *)0, FALSE, SET_IN_FILE}, -#endif {"showrace", &flags.showrace, FALSE, SET_IN_GAME}, #ifdef SCORE_ON_BOTL {"showscore", &flags.showscore, FALSE, SET_IN_GAME}, @@ -2618,9 +2614,7 @@ goodfruit: if (initial) return; if ((boolopt[i].addr) == &flags.time -#ifdef EXP_ON_BOTL || (boolopt[i].addr) == &flags.showexp -#endif #ifdef SCORE_ON_BOTL || (boolopt[i].addr) == &flags.showscore #endif diff --git a/sys/wince/mhstatus.c b/sys/wince/mhstatus.c index dd86e2d6e..397f2dcb8 100644 --- a/sys/wince/mhstatus.c +++ b/sys/wince/mhstatus.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 mhstatus.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhstatus.c $NHDT-Date: 1425083082 2015/02/28 00:24:42 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.8 $ */ /* NetHack 3.5 mhstatus.c $Date: 2009/05/06 10:52:28 $ $Revision: 1.7 $ */ /* SCCS Id: @(#)mhstatus.c 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ @@ -238,10 +238,8 @@ void FormatStatusString(char* text, int format) if (Upolyd) Sprintf(nb = eos(nb), " HD:%d", mons[u.umonnum].mlevel); -#ifdef EXP_ON_BOTL else if(flags.showexp) Sprintf(nb = eos(nb), " Xp:%u/%-1ld", u.ulevel,u.uexp); -#endif else Sprintf(nb = eos(nb), " Exp:%u", u.ulevel); if( format==NHSTAT_LINES_4 ) strcat(text, "\r\n"); diff --git a/util/makedefs.c b/util/makedefs.c index 9ea0d3898..ba3ee79f3 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 makedefs.c $NHDT-Date: 1425081977 2015/02/28 00:06:17 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.61 $ */ +/* NetHack 3.5 makedefs.c $NHDT-Date: 1425083082 2015/02/28 00:24:42 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.63 $ */ /* NetHack 3.5 makedefs.c $Date: 2012/01/15 09:27:03 $ $Revision: 1.50 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) M. Stephenson, 1990, 1991. */ @@ -960,8 +960,7 @@ do_rumors() * */ #define IGNORED_FEATURES ( 0L \ - | (1L << 19) /* EXP_ON_BOTL */ \ - | (1L << 20) /* SCORE_ON_BOTL */ \ + | (1L << 19) /* SCORE_ON_BOTL */ \ | (1L << 27) /* ZEROCOMP */ \ | (1L << 28) /* RLECOMP */ \ ) @@ -999,11 +998,8 @@ make_version() #ifdef INSURANCE | (1L << 18) #endif -#ifdef EXP_ON_BOTL - | (1L << 19) -#endif #ifdef SCORE_ON_BOTL - | (1L << 20) + | (1L << 19) #endif /* data format (27..31) * External compression methods such as COMPRESS and ZLIB_COMP @@ -1226,9 +1222,6 @@ static const char *build_opts[] = { #ifdef DLB "data librarian", #endif -#ifdef EXP_ON_BOTL - "experience points on status line", -#endif #ifdef MFLOPPY "floppy drive support", #endif diff --git a/win/X11/winstat.c b/win/X11/winstat.c index ab65a168c..ae2a3ce83 100644 --- a/win/X11/winstat.c +++ b/win/X11/winstat.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 winstat.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winstat.c $NHDT-Date: 1425083083 2015/02/28 00:24:43 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.5 $ */ /* NetHack 3.5 winstat.c $Date: 2009/05/06 10:55:59 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)winstat.c 3.5 1996/04/05 */ /* Copyright (c) Dean Luick, 1992 */ @@ -427,7 +427,6 @@ update_val(attr_rec, new_value) /* special case: exp can be enabled & disabled */ else if (attr_rec == &shown_stats[F_EXP]) { static boolean flagexp = TRUE; -#ifdef EXP_ON_BOTL if (flags.showexp && !flagexp) { set_name(attr_rec->w, shown_stats[F_EXP].name); @@ -439,14 +438,6 @@ update_val(attr_rec, new_value) flagexp = flags.showexp; } if (!flagexp) return; -#else - if (flagexp) { - set_name(attr_rec->w, ""); - set_value(attr_rec->w, ""); - flagexp = FALSE; - } - return; /* don't show it at all */ -#endif } /* special case: score can be enabled & disabled */ @@ -612,11 +603,7 @@ update_fancy_status(wp) case F_LEVEL: val = (long) (u.mtimedone ? mons[u.umonnum].mlevel : u.ulevel); break; -#ifdef EXP_ON_BOTL case F_EXP: val = flags.showexp ? u.uexp : 0L; break; -#else - case F_EXP: val = 0L; break; -#endif case F_ALIGN: val = (long) u.ualign.type; break; case F_TIME: val = flags.time ? (long) moves : 0L; break; #ifdef SCORE_ON_BOTL diff --git a/win/gnome/gnstatus.c b/win/gnome/gnstatus.c index 37e1d7bf6..5109f5bb7 100644 --- a/win/gnome/gnstatus.c +++ b/win/gnome/gnstatus.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 gnstatus.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnstatus.c $NHDT-Date: 1425083083 2015/02/28 00:24:43 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.6 $ */ /* NetHack 3.5 gnstatus.c $Date: 2009/05/06 10:57:54 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)gnstatus.c 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ @@ -655,7 +655,6 @@ void ghack_status_window_update_stats() lastAC = u.uac; gtk_label_set( GTK_LABEL( acLabel), buf); -#ifdef EXP_ON_BOTL if (flags.showexp) { sprintf(buf,"Exp:%ld", u.uexp); if (lastExp < u.uexp && firstTime==FALSE) { @@ -669,7 +668,6 @@ void ghack_status_window_update_stats() lastExp = u.uexp; gtk_label_set( GTK_LABEL( expLabel), buf); } else -#endif { gtk_label_set( GTK_LABEL( expLabel), ""); } From a3faa9340340745b8b6886d46fc2a68972343117 Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Sat, 14 Feb 2015 15:02:50 -0500 Subject: [PATCH 041/132] Remove experimental Unicode support. This reverts commit 7f0f43e6f98bccab20db7ab3cb509fdbe60a7b2b 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 --- dat/symbols | 132 ----------------- include/config.h | 4 - include/decl.h | 2 +- include/extern.h | 16 +-- include/flag.h | 2 - include/global.h | 33 +---- include/ntconf.h | 5 - include/rm.h | 22 +-- include/tradstdc.h | 9 -- include/wintty.h | 17 +-- src/decl.c | 3 +- src/drawing.c | 6 +- src/files.c | 90 +----------- src/hacklib.c | 188 ------------------------- src/mapglyph.c | 17 ++- src/options.c | 40 +++--- src/pager.c | 2 +- src/pline.c | 6 +- sys/winnt/nttty.c | 84 ++--------- win/tty/getline.c | 62 +++----- win/tty/topl.c | 167 ++++++++-------------- win/tty/wintty.c | 342 +++++---------------------------------------- 22 files changed, 189 insertions(+), 1060 deletions(-) diff --git a/dat/symbols b/dat/symbols index 8f396582b..108d761d1 100644 --- a/dat/symbols +++ b/dat/symbols @@ -201,10 +201,6 @@ start: RogueEpyx S_food: \x05 # club (as in cards) S_potion: \xad # upside down '!' S_scroll: \x0e # musical note -# S_armor: \x5b -# S_ring: \x3d -# S_amulet: \x0c -# S_tool: \x28 S_wand: \xe7 # greek tau S_coin: \x0f # yes it's the same as gems S_gem: \x0f # fancy '*' @@ -397,131 +393,3 @@ start: NHAccess S_explode9: \047 finish -start: Unicode_US - Description: Unicode symbols similar to code page 437 - Restrictions: Unicode - S_vwall: U+2502 # box drawings light vertical - S_hwall: U+2500 # box drawings light horizontal - S_tlcorn: U+250C # box drawings light down and right - S_trcorn: U+2510 # box drawings light down and left - S_blcorn: U+2514 # box drawings light up and right - S_brcorn: U+2518 # box drawings light up and left - S_crwall: U+253C # box drawings light up and left - S_tuwall: U+2534 # box drawings light up and horizontal - S_tdwall: U+252C # box drawings light down and horizontal - S_tlwall: U+2524 # box drawings light vertical and left - S_trwall: U+251C # box drawings light vertical and right - S_ndoor: U+2556 # box drawings down double and left single - S_vodoor: U+25A0 # black square - S_hodoor: U+25A0 # black square - S_bars: U+2261 # identical to - S_tree: U+00B1 # plus-minus sign - S_room: U+00B7 # middle dot - S_corr: U+2591 # light shade - S_litcorr: U+2592 # medium shade - S_fountain: U+2320 # top half integral - S_pool: U+2248 # almost equal to - S_ice: U+00B7 # middle dot - S_lava: U+2248 # almost equal to - S_vodbridge: U+00B7 # middle dot - S_hodbridge: U+00B7 # middle dot - S_water: U+2248 # almost equal to - S_vbeam: U+2502 # box drawings light vertical - S_hbeam: U+2500 # box drawings light horizontal - S_sw_ml: U+2502 # box drawings light vertical - S_sw_mr: U+2502 # box drawings light vertical - S_explode4: U+2502 # box drawings light vertical - S_explode6: U+2502 # box drawings light vertical -finish - -start: Unicode_non_US - Description: If default OEM CP for non-Unicode programs is not 437 or 850 - Restrictions: Unicode - S_vwall: U+2502 # box drawings light vertical - S_hwall: U+2500 # box drawings light horizontal - S_tlcorn: U+250C # box drawings light down and right - S_trcorn: U+2510 # box drawings light down and left - S_blcorn: U+2514 # box drawings light up and right - S_brcorn: U+2518 # box drawings light up and left - S_crwall: U+253C # box drawings light up and left - S_tuwall: U+2534 # box drawings light up and horizontal - S_tdwall: U+252C # box drawings light down and horizontal - S_tlwall: U+2524 # box drawings light vertical and left - S_trwall: U+251C # box drawings light vertical and right - S_vodoor: U+25A0 # black square - S_hodoor: U+25A0 # black square - S_corr: U+2591 # light shade - S_litcorr: U+2592 # medium shade - S_vbeam: U+2502 # box drawings light vertical - S_hbeam: U+2500 # box drawings light horizontal - S_sw_ml: U+2502 # box drawings light vertical - S_sw_mr: U+2502 # box drawings light vertical - S_explode4: U+2502 # box drawings light vertical - S_explode6: U+2502 # box drawings light vertical - S_coin: U+20AC # euro -finish - -start: UnicodeRogueEpyx - Description: Unicode Rogue level symbols - Restrictions: Unicode - Restrictions: Rogue - Color: Yes - S_weapon: U+2191 # up arrow - S_armor: U+25d9 # Vert rect with o - S_ring: U+2642 # circle with arrow - S_amulet: U+2640 # "female" symbol - S_food: U+2663 # club (as in cards) - S_potion: U+00a1 # upside down '!' - S_scroll: U+266a # musical note - S_wand: U+03c4 # greek tau - S_coin: U+263c # yes it's the same as gems - S_gem: U+263c # fancy '*' - S_rock: U+0060 # grave accent - S_ball: U+0030 # digit 0 - S_chain: U+005f # low line - S_venom: U+002e # full stop - S_book: U+002b # + sign - S_vwall: U+2551 # all walls now use - S_hwall: U+2550 # double line graphics - S_tlcorn: U+2554 # box drawing double down and right - S_trcorn: U+2557 # box drawing double down and left - S_blcorn: U+255a # box drawing double up and right - S_brcorn: U+255d # box drawing double up and left - S_crwall: U+256c # box drawing double vertical and horizontal - S_tuwall: U+2569 # box drawing double up and horizontal - S_tdwall: U+2566 # box drawing double down and horizontal - S_tlwall: U+2563 # box drawing double vertical and left - S_trwall: U+2560 # box drawing double vertical and right - S_ndoor: U+256c # box drawing double vertical and horizontal - S_vodoor: U+256c # box drawing double vertical and horizontal - S_hodoor: U+256c # box drawing double vertical and horizontal - S_room: U+00b7 # centered dot - S_corr: U+2592 # medium shade - S_litcorr: U+2593 # dark shade - S_upstair: U+001e # Greek Xi - S_dnstair: U+001f - S_arrow_trap: U+2666 # diamond (cards) - S_dart_trap: U+2666 - S_falling_rock_trap: U+2666 - S_squeaky_board: U+2666 - S_bear_trap: U+2666 - S_land_mine: U+2666 - S_rolling_boulder_trap: U+2666 - S_sleeping_gas_trap: U+2666 - S_rust_trap: U+2666 - S_fire_trap: U+2666 - S_pit: U+2666 - S_spiked_pit: U+2666 - S_hole: U+2666 - S_trap_door: U+2666 - S_teleportation_trap: U+2666 - S_level_teleporter: U+2666 - S_magic_portal: U+2666 - S_web: U+2666 - S_statue_trap: U+2666 - S_magic_trap: U+2666 - S_anti_magic_trap: U+2666 - S_polymorph_trap: U+2666 - S_human: U+263a # face -finish - diff --git a/include/config.h b/include/config.h index 3bddda18b..c13b2dd01 100644 --- a/include/config.h +++ b/include/config.h @@ -315,10 +315,6 @@ */ #endif /* CHDIR */ -/* - * Enable some UNICODE support. - */ -/*#define UNICODE_SUPPORT */ /* master on/off for any unicode support */ /* diff --git a/include/decl.h b/include/decl.h index 92f1e8240..f9d4a7b7c 100644 --- a/include/decl.h +++ b/include/decl.h @@ -320,7 +320,6 @@ E NEARDATA winid WIN_MESSAGE; E NEARDATA winid WIN_STATUS; #endif E NEARDATA winid WIN_MAP, WIN_INVEN; -E nhwchar toplines[]; /* pline (et al) for a single string argument (suppress compiler warning) */ #define pline1(cstr) pline("%s", cstr) @@ -331,6 +330,7 @@ E nhwchar toplines[]; #define Sprintf1(buf, cstr) Sprintf(buf, "%s", cstr) #define panic1(cstr) panic("%s", cstr) +E char toplines[]; #ifndef TCAP_H E struct tc_gbl_data { /* also declared in tcap.h */ char *tc_AS, *tc_AE; /* graphics start and end (tty font swapping) */ diff --git a/include/extern.h b/include/extern.h index bfd361326..c3004a0a0 100644 --- a/include/extern.h +++ b/include/extern.h @@ -731,7 +731,6 @@ E void FDECL(check_recordfile, (const char *)); E void NDECL(read_wizkit); E int FDECL(read_sym_file, (int)); E int FDECL(parse_sym_line, (char *,int)); -E int FDECL(sym_val, (const char *)); E void FDECL(paniclog, (const char *, const char *)); E int FDECL(validate_prefix_locations, (char *)); #ifdef SELECTSAVED @@ -846,20 +845,6 @@ E int NDECL(phase_of_the_moon); E boolean NDECL(friday_13th); E int NDECL(night); E int NDECL(midnight); -#ifdef UNICODE_WIDEWINPORT -E nhwchar *FDECL(nhwstrncpy, (nhwchar *,const char *,size_t)); -E nhwchar *FDECL(nhwncpy, (nhwchar *,const nhwchar *,size_t)); -E nhwchar *FDECL(nhwcpy, (nhwchar *,const nhwchar *)); -E nhwchar *FDECL(nhwstrcpy, (nhwchar *,const char *)); -E char *FDECL(strnhwcpy, (char *,const nhwchar *)); -E nhwchar *FDECL(nhwstrcat, (nhwchar *,const char *)); -E nhwchar *FDECL(nhwcat, (nhwchar *,const nhwchar *)); -E nhwchar *FDECL(nhwindex, (const nhwchar *,int)); -E size_t FDECL(nhwlen, (const nhwchar *)); -E int FDECL(nhwcmp, (const nhwchar *,const nhwchar *)); -E int FDECL(nhwncmp, (const nhwchar *,const nhwchar *,int)); -E int FDECL(nhwstrcmp, (const nhwchar *,const char *)); -#endif /* ### invent.c ### */ @@ -1587,6 +1572,7 @@ E int FDECL(load_symset, (const char *,int)); E void FDECL(parsesymbols, (char *)); E struct symparse *FDECL(match_sym, (char *)); E void NDECL(set_playmode); +E int FDECL(sym_val, (char *)); /* ### pager.c ### */ diff --git a/include/flag.h b/include/flag.h index 2b5d2c3ee..de2b63e84 100644 --- a/include/flag.h +++ b/include/flag.h @@ -198,8 +198,6 @@ struct instance_flags { boolean rlecomp; /* run-length comp of levels when writing savefile */ uchar num_pad_mode; boolean echo; /* 1 to echo characters */ - boolean unicodecapable; /* unicode support is possible on platform */ - boolean unicodedisp; /* unicode support is turned on */ #if 0 boolean DECgraphics; /* use DEC VT-xxx extended character set */ boolean IBMgraphics; /* use IBM extended character set */ diff --git a/include/global.h b/include/global.h index e3292e243..6179409bb 100644 --- a/include/global.h +++ b/include/global.h @@ -65,41 +65,10 @@ typedef xchar boolean; /* 0 or 1 */ #endif /* - * UNICODE_SUPPORT - * Unicode/wide character related support. + * type nhsym: loadable symbols go into this type */ -#ifdef UNICODE_SUPPORT -# define UNICODE_DRAWING /* store drawing symbols in wchar_t data type */ -# define UNICODE_WIDEWINPORT /* store and render wide chars in window port */ -/*# define UNICODE_PLAYERTEXT*/ /* not implemented - player input in wide chars */ -#include -#include -#else -# undef UNICODE_DRAWING -# undef UNICODE_WIDEWINPORT -# undef UNICODE_PLAYERTEXT -#endif - -#if defined(UNICODE_DRAWING) -typedef wchar_t nhsym; /* nhsym is wide char */ -#else typedef uchar nhsym; -#endif -#if defined(UNICODE_WIDEWINPORT) -typedef wchar_t nhwchar; /* nhwchar (window port char) is wide char */ -#else -typedef char nhwchar; -#endif - -#if 0 -/* Not Implemented presently */ -#if defined(UNICODE_PLAYERTEXT) -typedef wchar_t nhptext; /* player input is wide char */ -#else -typedef char nhptext; -#endif -#endif #ifndef STRNCMPI # ifndef __SASC_60 /* SAS/C already shifts to stricmp */ diff --git a/include/ntconf.h b/include/ntconf.h index 4ad1a6e73..95a506635 100644 --- a/include/ntconf.h +++ b/include/ntconf.h @@ -193,11 +193,6 @@ extern void NDECL(toggle_mouse_support); extern void FDECL(map_subkeyvalue, (char *)); extern void NDECL(load_keyboard_handler); extern void NDECL(raw_clear_screen); -# ifdef UNICODE_WIDEWINPORT -extern void FDECL(xputc, (NHWCHAR_P)); -# else -extern void FDECL(xputc, (int)); -# endif #endif #include diff --git a/include/rm.h b/include/rm.h index 2fa3da6b6..c007f6a4f 100644 --- a/include/rm.h +++ b/include/rm.h @@ -227,13 +227,6 @@ struct symdef { #endif }; -/* - * Graphics sets for display symbols - */ -#define PRIMARY 0 /* primary graphics */ -#define ROGUESET 1 /* rogue graphics */ -#define NUM_GRAPHICS 2 - struct symparse { unsigned range; #define SYM_CONTROL 1 /* start/finish markers */ @@ -260,18 +253,25 @@ struct symsetentry { Bitfield(nocolor,1); /* don't use color if set */ Bitfield(primary,1); /* restricted for use as primary set */ Bitfield(rogue,1); /* restricted for use as rogue lev set */ - Bitfield(unicode,1); /* restricted for use as a unicode set */ /* 5 free bits */ }; +/* + * Graphics sets for display symbols + */ +#define DEFAULT_GRAPHICS 0 /* regular characters: '-', '+', &c */ +#define PRIMARY 0 /* primary graphics set */ +#define ROGUESET 1 /* rogue graphics set */ +#define NUM_GRAPHICS 2 + /* * special symbol set handling types ( for invoking callbacks, etc.) * Must match the order of the known_handlers strings * in drawing.c */ -#define H_UNK 0 -#define H_IBM 1 -#define H_DEC 2 +#define H_UNK 0 +#define H_IBM 1 +#define H_DEC 2 extern const struct symdef defsyms[MAXPCHARS]; /* defaults */ extern const struct symdef def_warnsyms[WARNCOUNT]; diff --git a/include/tradstdc.h b/include/tradstdc.h index 480ea7878..dc75bc393 100644 --- a/include/tradstdc.h +++ b/include/tradstdc.h @@ -257,7 +257,6 @@ typedef genericptr genericptr_t; /* (void *) or (char *) */ # define BOOLEAN_P boolean # endif # define ALIGNTYP_P aligntyp -# define NHWCHAR_P nhwchar #else # ifdef WIDENED_PROTOTYPES # define CHAR_P int @@ -267,14 +266,6 @@ typedef genericptr genericptr_t; /* (void *) or (char *) */ # define SHORT_P int # define BOOLEAN_P int # define ALIGNTYP_P int -# if defined(UNICODE_WIDEWINPORT) && defined(WCHAR_MAX) -# if WCHAR_MAX >= INT_MAX -# define NHWCHAR_P nhwchar -# endif -# endif -# ifndef NHWCHAR_P -# define NHWCHAR_P int -# endif # else /* Neither widened nor unwidened prototypes. Argument list expansion * by FDECL/VDECL always empty; all xxx_P vanish so defs aren't needed. */ diff --git a/include/wintty.h b/include/wintty.h index a2ed1e009..507804a9f 100644 --- a/include/wintty.h +++ b/include/wintty.h @@ -35,8 +35,8 @@ struct WinDesc { /* maxcol is also used by WIN_MESSAGE for */ /* tracking the ^P command */ short *datlen; /* allocation size for *data */ - nhwchar **data; /* window data [row][column] */ - nhwchar *morestr; /* string to display instead of default */ + char **data; /* window data [row][column] */ + char *morestr; /* string to display instead of default */ tty_menu_item *mlist; /* menu information (MENU) */ tty_menu_item **plist; /* menu page pointers (MENU) */ short plist_size; /* size of allocated plist (MENU) */ @@ -88,7 +88,7 @@ extern struct WinDesc *wins[MAXWIN]; extern struct DisplayDesc *ttyDisplay; /* the tty display descriptor */ extern char morc; /* last character typed to xwaitforspace */ -extern nhwchar defmorestr[]; /* default --more-- prompt */ +extern char defmorestr[]; /* default --more-- prompt */ /* port specific external function references */ @@ -109,9 +109,7 @@ E void NDECL(tty_shutdown); * actually would be expanded. So here, we have to make an exception. */ E void FDECL(xputc, (int)); #else -# ifndef WIN32CON E void FDECL(xputc, (CHAR_P)); -# endif #endif E void FDECL(xputs, (const char *)); #if defined(SCREEN_VGA) || defined(SCREEN_8514) @@ -154,10 +152,10 @@ E int FDECL(has_color,(int color)); /* ### topl.c ### */ -E void FDECL(addtopl, (const nhwchar *)); +E void FDECL(addtopl, (const char *)); E void NDECL(more); -E void FDECL(update_topl, (const nhwchar *)); -E void FDECL(putsyms, (const nhwchar *)); +E void FDECL(update_topl, (const char *)); +E void FDECL(putsyms, (const char*)); /* ### wintty.c ### */ #ifdef CLIPPING @@ -167,9 +165,6 @@ E void FDECL(docorner, (int, int)); E void NDECL(end_glyphout); E void FDECL(g_putch, (int)); E void FDECL(win_tty_init, (int)); -#ifdef UNICODE_WIDEWINPORT -E void FDECL(u_putch, (nhwchar)); -#endif /* external declarations */ E void FDECL(tty_init_nhwindows, (int *, char **)); diff --git a/src/decl.c b/src/decl.c index f7601bda0..6c83f0f14 100644 --- a/src/decl.c +++ b/src/decl.c @@ -262,8 +262,7 @@ NEARDATA winid WIN_MESSAGE = WIN_ERR; NEARDATA winid WIN_STATUS = WIN_ERR; #endif NEARDATA winid WIN_MAP = WIN_ERR, WIN_INVEN = WIN_ERR; -nhwchar toplines[TBUFSZ]; - +char toplines[TBUFSZ]; /* Windowing stuff that's really tty oriented, but present for all ports */ struct tc_gbl_data tc_gbl_data = { 0,0, 0,0 }; /* AS,AE, LI,CO */ diff --git a/src/drawing.c b/src/drawing.c index 7fb0d461a..a5cc10d46 100644 --- a/src/drawing.c +++ b/src/drawing.c @@ -24,8 +24,8 @@ struct symsetentry symset[NUM_GRAPHICS]; int currentgraphics = 0; nhsym showsyms[SYM_MAX] = DUMMY; /* symbols to be displayed */ -nhsym l_syms[SYM_MAX] = DUMMY; /* loaded symbols */ -nhsym r_syms[SYM_MAX] = DUMMY; /* rogue symbols */ +nhsym l_syms[SYM_MAX] = DUMMY; /* loaded symbols */ +nhsym r_syms[SYM_MAX] = DUMMY; /* rogue symbols */ nhsym warnsyms[WARNCOUNT] = DUMMY; /* the current warning display symbols */ const char invisexplain[] = "remembered, unseen, creature"; @@ -525,7 +525,6 @@ boolean name_too; /* initialize restriction bits */ symset[which_set].primary = 0; symset[which_set].rogue = 0; - symset[which_set].unicode = 0; if (name_too) { if (symset[which_set].name) @@ -563,7 +562,6 @@ const char *known_handling[] = { const char *known_restrictions[] = { "primary", "rogue", - "unicode", (const char *)0, }; diff --git a/src/files.c b/src/files.c index cb7363399..7ba180547 100644 --- a/src/files.c +++ b/src/files.c @@ -2607,7 +2607,7 @@ parse_sym_line(buf, which_set) char *buf; int which_set; { - int val; + int val, i; struct symparse *symp = (struct symparse *)0; char *bufp, *commentp, *altp; @@ -2657,7 +2657,6 @@ int which_set; return 0; if (!symset[which_set].name) { - int i; /* A null symset name indicates that we're just building a pick-list of possible symset values from the file, so only do that */ @@ -2682,7 +2681,6 @@ int which_set; /* initialize restriction bits */ tmpsp->primary = 0; tmpsp->rogue = 0; - tmpsp->unicode = 0; break; case 2: /* handler type identified */ @@ -2705,17 +2703,14 @@ int which_set; case 5: /* restrictions: xxxx*/ tmpsp = symset_list; /* most recent symset */ - i = 0; - while (known_restrictions[i]) { + for (i = 0; known_restrictions[i]; ++i) { if (!strcmpi(known_restrictions[i], bufp)) { switch(i) { case 0: tmpsp->primary = 1; break; case 1: tmpsp->rogue = 1; break; - case 2: tmpsp->unicode = 1; break; } break; /* while loop */ } - i++; } break; } @@ -2732,7 +2727,7 @@ int which_set; chosen_symset_start = TRUE; /* these init_*() functions clear symset fields too */ if (which_set == ROGUESET) init_r_symbols(); - else if (which_set == PRIMARY) init_l_symbols(); + else if (which_set == PRIMARY) init_l_symbols(); } break; case 1: @@ -2771,23 +2766,12 @@ int which_set; break; case 1: symset[which_set].rogue = 1; break; - case 2: symset[which_set].unicode = 1; - break; } break; /* while loop */ } n++; } - /* Don't allow unicode set if code can't handle it */ - if (symset[which_set].unicode && - !iflags.unicodedisp) { - if (chosen_symset_start) - chosen_symset_end = FALSE; - chosen_symset_start = FALSE; - if (which_set == ROGUESET) init_r_symbols(); - else if (which_set == PRIMARY) init_l_symbols(); - } - } + } break; } } else { /* !SYM_CONTROL */ @@ -2821,72 +2805,6 @@ int which_set; } } -/* - * Produces a single integer value. - */ -int -sym_val(cp) -const char *cp; -{ - unsigned int cval = 0; - int meta = 0, dcount = 0; - const char *dp, *hex = "00112233445566778899aAbBcCdDeEfF"; - - while (*cp) - { - if (*cp == '\\' && index("mM", cp[1])) { - meta = 1; - cp += 2; - } - if ((*cp == 'U' || *cp == 'u') && cp[1] == '+' && index(hex, cp[2])) - { - dcount = 0; - cp++; - for (++cp; *cp && (dp = index(hex, *cp)) && (dcount++ < 4); cp++) - cval = (unsigned int)((cval * 16) + - ((unsigned int)(dp - hex) / 2)); - } - else if (*cp == '\\' && index("0123456789xXoO", cp[1])) - { - dcount = 0; - cp++; - if (*cp == 'x' || *cp == 'X') - for (++cp; *cp && (dp = index(hex, *cp)) && (dcount++ < 4); cp++) - cval = (unsigned int)((cval * 16) + - ((unsigned int)(dp - hex) / 2)); - else if (*cp == 'o' || *cp == 'O') - for (++cp; *cp && (index("01234567",*cp)) && (dcount++ < 5); cp++) - cval = (cval * 8) + (unsigned int)(*cp - '0'); - else - for (; *cp && (index("0123456789",*cp)) && (dcount++ < 5); cp++) - cval = (cval * 10) + (unsigned int)(*cp - '0'); - } - else if (*cp == '\\') /* C-style character escapes */ - { - switch (*++cp) - { - case '\\': cval = '\\'; break; - case 'n': cval = '\n'; break; - case 't': cval = '\t'; break; - case 'b': cval = '\b'; break; - case 'r': cval = '\r'; break; - default: cval = (unsigned int)*cp; - } - cp++; - } - else if (*cp == '^') /* expand control-character syntax */ - { - cval = (unsigned int)(*++cp & 0x1f); - cp++; - } - else - cval = (unsigned int)*cp++; - if (meta) - cval |= 0x80; - } - return cval; -} - /* ---------- END CONFIG FILE HANDLING ----------- */ /* ---------- BEGIN SCOREBOARD CREATION ----------- */ diff --git a/src/hacklib.c b/src/hacklib.c index 398b96dd4..4565f6d65 100644 --- a/src/hacklib.c +++ b/src/hacklib.c @@ -768,192 +768,4 @@ midnight() return(getlt()->tm_hour == 0); } -#ifdef UNICODE_WIDEWINPORT -nhwchar * -nhwstrncpy(dest, strSource, cnt) -nhwchar *dest; -const char *strSource; -size_t cnt; -{ - nhwchar *d = dest; - const char *s = strSource; - size_t dcnt = 0; - - while(*s && dcnt < cnt) { - *d++ = (nhwchar)*s++; - dcnt++; - } - if (dcnt < cnt) *d = 0; - return dest; -} - -nhwchar * -nhwncpy(dest, src, cnt) -nhwchar *dest; -const nhwchar *src; -size_t cnt; -{ - nhwchar *d = dest; - const nhwchar *s = src; - size_t dcnt = 0; - - while(*s && dcnt < cnt) { - *d++ = *s++; - dcnt++; - } - if (dcnt < cnt) *d = 0; - return dest; -} - -nhwchar * -nhwcpy(dest, src) -nhwchar *dest; -const nhwchar *src; -{ - nhwchar *d = dest; - const nhwchar *s = src; - - while(*s) { - *d++ = *s++; - } - *d = 0; - return dest; -} - -nhwchar * -nhwstrcpy(dest, strSource) -nhwchar *dest; -const char *strSource; -{ - nhwchar *d = dest; - const char *s = strSource; - - while(*s) { - *d++ = *s++; - } - *d = 0; - return dest; -} - -char * -strnhwcpy(strDest, src) -char *strDest; -const nhwchar *src; -{ - char *d = strDest; - const nhwchar *s = src; - - while(*s) { - *d++ = (char)*s++; - } - *d = 0; - return strDest; -} - -nhwchar * -nhwstrcat(dest, strSource) -nhwchar *dest; -const char *strSource; -{ - nhwchar *d = dest; - const char *s = strSource; - - while(*d) d++; - while(*s) { - *d++ = *s++; - } - *d = 0; - return dest; -} - -nhwchar * -nhwcat(dest, src) -nhwchar *dest; -const nhwchar *src; -{ - nhwchar *d = dest; - const nhwchar *s = src; - - while(*d) d++; - while(*s) { - *d++ = *s++; - } - *d = 0; - return dest; -} - -nhwchar * -nhwindex(ss, c) -const nhwchar *ss; -int c; -{ - const nhwchar *s = ss; - - while (*s) { - if (*s == c) return (nhwchar *)s; - s++; - } - if (*s == c) return (nhwchar *)s; - return (nhwchar *)0; -} - -size_t nhwlen(src) -const nhwchar *src; -{ - register size_t dl = 0; - - while(*src++) dl++; - return dl; -} - -int -nhwcmp(s1, s2) /* case sensitive comparison */ -register const nhwchar *s1, *s2; -{ - register nhwchar t1, t2; - - for (;;) { - if (!*s2) return (*s1 != 0); /* s1 >= s2 */ - else if (!*s1) return -1; /* s1 < s2 */ - t1 = *s1++; - t2 = *s2++; - if (t1 != t2) return (t1 > t2) ? 1 : -1; - } - return 0; /* s1 == s2 */ -} - -int -nhwncmp(s1, s2, n) /* case sensitive counted nhwchar (wide string) comparison */ - register const nhwchar *s1, *s2; - register int n; /*(should probably be size_t, which is usually unsigned)*/ -{ - register nhwchar t1, t2; - - while (n--) { - if (!*s2) return (*s1 != 0); /* s1 >= s2 */ - else if (!*s1) return -1; /* s1 < s2 */ - t1 = *s1++; - t2 = *s2++; - if (t1 != t2) return (t1 > t2) ? 1 : -1; - } - return 0; /* s1 == s2 */ -} - -int -nhwstrcmp(s1, s2) -register const nhwchar *s1; -const char *s2; -{ - register nhwchar t1, t2; - - for (;;) { - if (!*s2) return (*s1 != 0); /* s1 >= s2 */ - else if (!*s1) return -1; /* s1 < s2 */ - t1 = *s1++; - t2 = (nhwchar)*s2++; - if (t1 != t2) return (t1 > t2) ? 1 : -1; - } - return 0; /* s1 == s2 */ -} -#endif /*hacklib.c*/ diff --git a/src/mapglyph.c b/src/mapglyph.c index c00d6f8ad..e44265d3a 100644 --- a/src/mapglyph.c +++ b/src/mapglyph.c @@ -225,7 +225,6 @@ int glyph; return encbuf; } -#ifndef UNICODE_WIDEWINPORT /* * This differs from putstr() because the str parameter can * contain a sequence of characters representing: @@ -267,12 +266,25 @@ genl_putmixed(window, attr, str) gv = (int)((gv * 16) + ((int)(dp - hex) / 2)); so = mapglyph(gv, &ch, &oc, &os, 0, 0); *put++ = showsyms[so]; - continue; } else { /* possible forgery - leave it the way it is */ cp = save_cp; } break; +# if 0 + case 'S': /* symbol offset */ + dcount = 0; + for (++cp; *cp && (dp = index(hex, *cp)) && (dcount++ < 4); cp++) + rndchk = (int)((rndchk * 16) + ((int)(dp - hex) / 2)); + + if (rndchk == context.rndencode) { + dcount = 0; + for (; *cp && (dp = index(hex, *cp)) && (dcount++ < 2); cp++) + so = (int)((so * 16) + ((int)(dp - hex) / 2)); + } + *put++ = showsyms[so]; + break; +# endif case '\\': break; } @@ -283,5 +295,4 @@ genl_putmixed(window, attr, str) /* now send it to the normal putstr */ putstr(window, attr, buf); } -#endif /*!UNICODE_WIDEWINPORT*/ /*mapglyph.c*/ diff --git a/src/options.c b/src/options.c index 97378888a..1c63c5ed5 100644 --- a/src/options.c +++ b/src/options.c @@ -198,9 +198,6 @@ static struct Bool_Opt {"tombstone",&flags.tombstone, TRUE, SET_IN_GAME}, {"toptenwin",&iflags.toptenwin, FALSE, SET_IN_GAME}, {"travel", &flags.travelcmd, TRUE, SET_IN_GAME}, -#ifdef UNICODE_SUPPORT - {"unicode", &iflags.unicodedisp, FALSE, SET_IN_GAME}, -#endif #ifdef WIN32CON {"use_inverse", &iflags.wc_inverse, TRUE, SET_IN_GAME}, /*WC*/ #else @@ -605,9 +602,6 @@ initoptions_init() iflags.msg_history = 20; #ifdef TTY_GRAPHICS iflags.prevmsg_window = 's'; -# if defined(UNIX) && defined(UNICODE_WIDEWINPORT) - iflags.unicodecapable = TRUE; -# endif #endif iflags.menu_headings = ATR_INVERSE; @@ -2514,7 +2508,7 @@ goodfruit: boolean badflag = FALSE; if (duplicate) complain_about_duplicate(opts,1); if (!negated) { - for (i = PRIMARY; i <= ROGUESET; ++i) { + for (i = 0; i < NUM_GRAPHICS; ++i) { if (symset[i].name) badflag = TRUE; else { @@ -3359,7 +3353,7 @@ boolean setinitial,setfromfile; || !strcmp("roguesymset", optname)) { menu_item *symset_pick = (menu_item *)0; boolean primaryflag = (*optname == 's'), - rogueflag = (*optname == 'r'), + rogueflag = (*optname == 'r'), ready_to_switch = FALSE, nothing_to_do = FALSE; int res; @@ -3384,8 +3378,7 @@ boolean setinitial,setfromfile; sl = symset_list; while (sl) { /* check restrictions */ - if ((!rogueflag && sl->rogue) || - (!iflags.unicodedisp && sl->unicode) || + if ((!rogueflag && sl->rogue) || (!primaryflag && sl->primary)) { sl = sl->next; continue; @@ -3398,8 +3391,8 @@ boolean setinitial,setfromfile; } if (!setcount) { pline("There are no appropriate %ssymbol sets available.", - (rogueflag) ? "rogue level " : - (primaryflag) ? "primary " : + (rogueflag) ? "rogue level " : + (primaryflag) ? "primary " : ""); return TRUE; } @@ -3415,7 +3408,6 @@ boolean setinitial,setfromfile; while (sl) { /* check restrictions */ if ((!rogueflag && sl->rogue) || - (!iflags.unicodedisp && sl->unicode) || (!primaryflag && sl->primary)) { sl = sl->next; continue; @@ -3502,7 +3494,7 @@ boolean setinitial,setfromfile; if(rogueflag) init_r_symbols(); else - init_l_symbols(); + init_l_symbols(); if (symset[which_set].name) { if (read_sym_file(which_set)) @@ -3568,14 +3560,9 @@ char *buf; #endif #ifdef BACKWARD_COMPAT else if (!strcmp(optname, "boulder")) - Sprintf(buf, -# ifdef UNICODE_DRAWING - "\\x%04X", -# else - "%c", -# endif - iflags.bouldersym ? iflags.bouldersym : - showsyms[(int)objects[BOULDER].oc_class + SYM_OFF_O]); + Sprintf(buf, "%c", iflags.bouldersym ? + iflags.bouldersym : + showsyms[(int)objects[BOULDER].oc_class + SYM_OFF_O]); #endif else if (!strcmp(optname, "catname")) Sprintf(buf, "%s", catname[0] ? catname : none); @@ -4034,6 +4021,15 @@ char *buf; return (struct symparse *)0; } +int sym_val(strval) +char *strval; +{ + char buf[QBUFSZ]; + buf[0] = '\0'; + escapes(strval, buf); + return (int)*buf; +} + /* data for option_help() */ static const char *opt_intro[] = { "", diff --git a/src/pager.c b/src/pager.c index 4d734e5ef..4e8008c1b 100644 --- a/src/pager.c +++ b/src/pager.c @@ -571,7 +571,7 @@ do_look(mode, click_cc) for (i = 0; i < MAXMCLASSES; i++) { if (sym == ((from_screen || clicklook) ? showsyms[i + SYM_OFF_M] : def_monsyms[i].sym) && - def_monsyms[i].explain) { + def_monsyms[i].explain) { need_to_look = TRUE; if (!found) { Sprintf(out_str, "%s %s", diff --git a/src/pline.c b/src/pline.c index bd80a040f..3ee998684 100644 --- a/src/pline.c +++ b/src/pline.c @@ -76,11 +76,7 @@ pline VA_DECL(const char *, line) return; } #ifndef MAC -# ifdef UNICODE_WIDEWINPORT - if (no_repeat && !nhwstrcmp(toplines, line)) -# else - if (no_repeat && !strcmp(toplines, line)) -# endif + if (no_repeat && !strcmp(line, toplines)) return; #endif /* MAC */ if (vision_full_recalc) vision_recalc(0); diff --git a/sys/winnt/nttty.c b/sys/winnt/nttty.c index a0f9d95fe..9b9b186bc 100644 --- a/sys/winnt/nttty.c +++ b/sys/winnt/nttty.c @@ -64,6 +64,9 @@ int GUILaunched; extern int redirect_stdout; static BOOL FDECL(CtrlHandler, (DWORD)); +/* Flag for whether unicode is supported */ +static boolean has_unicode; + #ifdef PORT_DEBUG static boolean display_cursor_info = FALSE; #endif @@ -146,12 +149,6 @@ static void NDECL(init_ttycolor); # endif static void NDECL(really_move_cursor); -#ifdef UNICODE_WIDEWINPORT -void FDECL(xputc_core,(NHWCHAR_P)); -#else -void FDECL(xputc_core,(int)); -#endif - #define MAX_OVERRIDES 256 unsigned char key_overrides[MAX_OVERRIDES]; @@ -199,14 +196,11 @@ const char *s; void setftty() { - static int cp = 0; - if (!cp) cp = GetConsoleOutputCP(); - /* SetConsoleOutputCP(1250); */ #ifdef CHANGE_COLOR if (altered_palette) adjust_palette(); #endif start_screen(); - iflags.unicodecapable = ((GetVersion() & 0x80000000) == 0); + has_unicode = ((GetVersion() & 0x80000000) == 0); } void @@ -457,61 +451,24 @@ int x,y; ttyDisplay->cury = y; } -#ifdef UNICODE_WIDEWINPORT -#define T(x) L##x -#else -#define T(x) x -#endif - void -xputc_core(ich) -#ifdef UNICODE_WIDEWINPORT -nhwchar ich; -#else -int ich; -#endif +xputc_core(ch) +char ch; { - static uchar c[2] = {0,0}; - char ch = (char)ich; - -#if 0 - /*EURO symbol*/ - if (ich == 0x20AC) { - if (!c[0]) { - wchar_t t[2]={0x20ac, 0x0000}; - int cp = GetConsoleOutputCP(); - (void) WideCharToMultiByte(cp, - 0, - t, 1, - c, 2, - (LPCSTR)0, - (LPBOOL)0); - } - ich = (nhwchar)c[0]; - } -#endif -#ifdef UNICODE_WIDEWINPORT - switch(ich) { -#else switch(ch) { -#endif - case T('\n'): + case '\n': cursor.Y++; /* fall through */ - case T('\r'): + case '\r': cursor.X = 1; break; - case T('\b'): + case '\b': cursor.X--; break; default: WriteConsoleOutputAttribute(hConOut,&attr,1, cursor,&acount); - if (iflags.unicodedisp) { -#ifdef UNICODE_WIDEWINPORT - WriteConsoleOutputCharacterW(hConOut,&ich,1, - cursor,&ccount); -#else + if (has_unicode) { /* Avoid bug in ANSI API on WinNT */ WCHAR c2[2]; int rc; @@ -522,7 +479,6 @@ int ich; c2, 2); WriteConsoleOutputCharacterW(hConOut,c2,rc, cursor,&ccount); -#endif } else { WriteConsoleOutputCharacterA(hConOut,&ch,1, @@ -534,11 +490,7 @@ int ich; void xputc(ch) -#ifdef UNICODE_WIDEWINPORT -nhwchar ch; -#else -int ch; -#endif +char ch; { cursor.X = ttyDisplay->curx; cursor.Y = ttyDisplay->cury; @@ -569,8 +521,8 @@ const char *s; * for win32. It is used for glyphs only, not text. */ void -g_putch(in_sym) -int in_sym; +g_putch(in_ch) +int in_ch; { /* CP437 to Unicode mapping according to the Unicode Consortium */ static const WCHAR cp437[] = @@ -608,18 +560,12 @@ int in_sym; 0x2261, 0x00b1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00f7, 0x2248, 0x00b0, 0x2219, 0x00b7, 0x221a, 0x207f, 0x00b2, 0x25a0, 0x00a0 }; - uchar ch = (uchar)in_sym; + unsigned char ch = (unsigned char)in_ch; cursor.X = ttyDisplay->curx; cursor.Y = ttyDisplay->cury; WriteConsoleOutputAttribute(hConOut,&attr,1,cursor,&acount); -#ifdef UNICODE_DRAWING - if (symset[currentgraphics].name && - symset[currentgraphics].unicode && iflags.unicodedisp) - WriteConsoleOutputCharacterW(hConOut,(LPCWSTR)&in_sym,1,cursor,&ccount); - else -#endif - if (SYMHANDLING(H_IBM)) + if (has_unicode) WriteConsoleOutputCharacterW(hConOut,&cp437[ch],1,cursor,&ccount); else WriteConsoleOutputCharacterA(hConOut,&ch,1,cursor,&ccount); diff --git a/win/tty/getline.c b/win/tty/getline.c index 2dd90ae3f..4a2d8c251 100644 --- a/win/tty/getline.c +++ b/win/tty/getline.c @@ -24,25 +24,6 @@ extern int NDECL(extcmd_via_menu); /* cmd.c */ extern char erase_char, kill_char; /* from appropriate tty.c file */ -/* cloned from topl.c, but not identical - */ -#ifdef UNICODE_WIDEWINPORT - /* nhwchar is wchar; data from core needs narrow-to-wide conversion; - data going back to core needs wide-to-narrow conversion; data - used within tty routines typically needs wide-to-wide awareness */ -STATIC_VAR nhwchar getl_wbuf[BUFSZ]; -STATIC_VAR char getl_nbuf[BUFSZ]; -#define T(x) L##x -#define Waddtopl(str) addtopl(nhwstrcpy(getl_wbuf,str)) -#define Wputsyms(str) putsyms(nhwstrcpy(getl_wbuf,str)) -#define NWstrcpy(wdst,src) nhwstrcpy(wdst,src) /* narrow-to-wide */ -#else /*!UNICODE_WIDEWINPORT*/ - /* nhwchar is char; no conversions needed */ -#define T(x) x -#define Waddtopl(str) addtopl(str) -#define Wputsyms(str) putsyms(str) -#endif /*?UNICODE_WIDEWINPORT*/ - /* * Read a line closed with '\n' into the array char bufp[BUFSZ]. * (The '\n' is not stored. The string is closed with a '\0'.) @@ -76,12 +57,7 @@ getlin_hook_proc hook; *obufp = 0; for(;;) { (void) fflush(stdout); -#ifdef UNICODE_WIDEWINPORT - Strcat(strcat(strcpy(getl_nbuf, query), " "), obufp); - (void)NWstrcpy(toplines, getl_nbuf); -#else Strcat(strcat(strcpy(toplines, query), " "), obufp); -#endif c = pgetchar(); if (c == '\033' || c == EOF) { obufp[0] = '\033'; @@ -100,10 +76,10 @@ getlin_hook_proc hook; ttyDisplay->inread = sav; tty_clear_nhwindow(WIN_MESSAGE); cw->maxcol = cw->maxrow; - Waddtopl(query); - Waddtopl(T(" ")); + addtopl(query); + addtopl(" "); *bufp = 0; - Waddtopl(obufp); + addtopl(obufp); } else { if (!doprev) (void) tty_doprev_message();/* need two initially */ @@ -115,10 +91,10 @@ getlin_hook_proc hook; tty_clear_nhwindow(WIN_MESSAGE); cw->maxcol = cw->maxrow; doprev = 0; - Waddtopl(query); - Waddtopl(T(" ")); + addtopl(query); + addtopl(" "); *bufp = 0; - Waddtopl(obufp); + addtopl(obufp); } if(c == erase_char || c == '\b') { if(bufp != obufp) { @@ -128,11 +104,11 @@ getlin_hook_proc hook; #endif /* NEWAUTOCOMP */ bufp--; #ifndef NEWAUTOCOMP - putsyms(T("\b \b"));/* putsym converts \b */ + putsyms("\b \b");/* putsym converts \b */ #else /* NEWAUTOCOMP */ - putsyms(T("\b")); - for (i = bufp; *i; ++i) putsyms(T(" ")); - for (; i > bufp; --i) putsyms(T("\b")); + putsyms("\b"); + for (i = bufp; *i; ++i) putsyms(" "); + for (; i > bufp; --i) putsyms("\b"); *bufp = 0; #endif /* NEWAUTOCOMP */ } else tty_nhbell(); @@ -155,21 +131,21 @@ getlin_hook_proc hook; #endif /* NEWAUTOCOMP */ *bufp = c; bufp[1] = 0; - Wputsyms(bufp); + putsyms(bufp); bufp++; if (hook && (*hook)(obufp)) { - Wputsyms(bufp); + putsyms(bufp); #ifndef NEWAUTOCOMP bufp = eos(bufp); #else /* NEWAUTOCOMP */ /* pointer and cursor left where they were */ - for (i = bufp; *i; ++i) putsyms(T("\b")); + for (i = bufp; *i; ++i) putsyms("\b"); } else if (i > bufp) { char *s = i; /* erase rest of prior guess */ - for (; i > bufp; --i) putsyms(T(" ")); - for (; s > bufp; --s) putsyms(T("\b")); + for (; i > bufp; --i) putsyms(" "); + for (; s > bufp; --s) putsyms("\b"); #endif /* NEWAUTOCOMP */ } } else if(c == kill_char || c == '\177') { /* Robert Viduya */ @@ -177,11 +153,11 @@ getlin_hook_proc hook; #ifndef NEWAUTOCOMP while(bufp != obufp) { bufp--; - putsyms(T("\b \b")); + putsyms("\b \b"); } #else /* NEWAUTOCOMP */ - for (; *bufp; ++bufp) putsyms(T(" ")); - for (; bufp != obufp; --bufp) putsyms(T("\b \b")); + for (; *bufp; ++bufp) putsyms(" "); + for (; bufp != obufp; --bufp) putsyms("\b \b"); *bufp = 0; #endif /* NEWAUTOCOMP */ } else @@ -192,8 +168,6 @@ getlin_hook_proc hook; clear_nhwindow(WIN_MESSAGE); /* clean up after ourselves */ } -#undef T - void xwaitforspace(s) register const char *s; /* chars allowed besides return */ diff --git a/win/tty/topl.c b/win/tty/topl.c index 3efb52696..db307b73a 100644 --- a/win/tty/topl.c +++ b/win/tty/topl.c @@ -1,5 +1,4 @@ -/* NetHack 3.5 topl.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ -/* NetHack 3.5 topl.c $Date: 2012/01/23 06:29:37 $ $Revision: 1.24 $ */ +/* NetHack 3.5 topl.c $NHDT-Date: 1425081315 2015/02/27 23:55:15 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.24 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -15,44 +14,8 @@ #define C(c) (0x1f & (c)) #endif -/* use caution with this stuff; it's very easy to get things mixed up... - */ -#ifdef UNICODE_WIDEWINPORT - /* nhwchar is wchar; data from core needs narrow-to-wide conversion; - data going back to core needs wide-to-narrow conversion; data - used within tty routines typically needs wide-to-wide awareness */ -STATIC_VAR nhwchar topl_wbuf[BUFSZ]; -STATIC_VAR char topl_nbuf[BUFSZ]; -#define T(x) L##x -#define DoGputch(x) ((x) >= 0x80) -#define Waddtopl(str) addtopl(nhwstrcpy(topl_wbuf,str)) -#define Wputstr(win,atr,wstr) putstr(win,atr,strnhwcpy(topl_nbuf,wstr)) -#define Windex(wstr,wchr) nhwindex(wstr,wchr) -#define Wstrlen(wstr) (int)nhwlen(wstr) -#define NWstrcpy(wdst,src) nhwstrcpy(wdst,src) /* narrow-to-wide */ -#define WNstrcpy(dst,wsrc) strnhwcpy(dst,wsrc) /* wide-to-narrow */ -#define WWstrcpy(wdst,wsrc) nhwcpy(wdst,wsrc) /* wide-to-wide */ -#define WWstrcat(wdst,wsrc) nhwcat(wdst,wsrc) -#define WWstrncpy(wdst,wsrc,ln nhwncpy(wdst,wsrc,ln) -#define WWstrncmp(wst1,wst2,ln) nhwncmp(wst1,wst2,ln) -#else /*!UNICODE_WIDEWINPORT*/ - /* nhwchar is char; no conversions needed */ -#define T(x) x -#define DoGputch(x) ((x) & 0x80) -#define Waddtopl(str) addtopl(str) -#define Wputstr(win,atr,str) putstr(win,atr,str) -#define Windex(wstr,wchr) index(wstr,wchr) -#define Wstrlen(wstr) (int)strlen(wstr) -#define NWstrcpy(wdst,src) strcpy(wdst,src) -#define WNstrcpy(dst,wsrc) strcpy(dst,wsrc) -#define WWstrcpy(wdst,wsrc) strcpy(wdst,wsrc) -#define WWstrcat(wdst,wsrc) strcat(wdst,wsrc) -#define WWstrncpy(wdst,wsrc,ln) strncpy(wdst,wsrc,ln) -#define WWstrncmp(wst1,wst2,ln) strncmp(wst1,wst2,ln) -#endif /*?UNICODE_WIDEWINPORT*/ - -STATIC_DCL void FDECL(redotoplin, (const nhwchar*)); -STATIC_DCL void FDECL(topl_putsym, (NHWCHAR_P)); +STATIC_DCL void FDECL(redotoplin, (const char*)); +STATIC_DCL void FDECL(topl_putsym, (CHAR_P)); STATIC_DCL void NDECL(remember_topl); STATIC_DCL void FDECL(removetopl, (int)); STATIC_DCL void FDECL(msghistory_snapshot, (BOOLEAN_P)); @@ -62,9 +25,9 @@ int tty_doprev_message() { register struct WinDesc *cw = wins[WIN_MESSAGE]; + winid prevmsg_win; int i; - if ((iflags.prevmsg_window != 's') && !ttyDisplay->inread) { /* not single */ if(iflags.prevmsg_window == 'f') { /* full */ prevmsg_win = create_nhwindow(NHW_MENU); @@ -73,11 +36,11 @@ tty_doprev_message() cw->maxcol = cw->maxrow; i = cw->maxcol; do { - if (cw->data[i] && *cw->data[i]) - Wputstr(prevmsg_win, 0, cw->data[i]); + if(cw->data[i] && strcmp(cw->data[i], "") ) + putstr(prevmsg_win, 0, cw->data[i]); i = (i + 1) % cw->rows; } while (i != cw->maxcol); - Wputstr(prevmsg_win, 0, toplines); + putstr(prevmsg_win, 0, toplines); display_nhwindow(prevmsg_win, TRUE); destroy_nhwindow(prevmsg_win); } else if (iflags.prevmsg_window == 'c') { /* combination */ @@ -104,12 +67,11 @@ tty_doprev_message() cw->maxcol = cw->maxrow; i = cw->maxcol; do { - if (cw->data[i] && *cw->data[i]) - Wputstr(prevmsg_win, 0, cw->data[i]); + if(cw->data[i] && strcmp(cw->data[i], "") ) + putstr(prevmsg_win, 0, cw->data[i]); i = (i + 1) % cw->rows; } while (i != cw->maxcol); - - Wputstr(prevmsg_win, 0, toplines); + putstr(prevmsg_win, 0, toplines); display_nhwindow(prevmsg_win, TRUE); destroy_nhwindow(prevmsg_win); } @@ -121,11 +83,11 @@ tty_doprev_message() prevmsg_win = create_nhwindow(NHW_MENU); putstr(prevmsg_win, 0, "Message History"); putstr(prevmsg_win, 0, ""); - Wputstr(prevmsg_win, 0, toplines); + putstr(prevmsg_win, 0, toplines); cw->maxcol=cw->maxrow-1; if(cw->maxcol < 0) cw->maxcol = cw->rows-1; do { - Wputstr(prevmsg_win, 0, cw->data[cw->maxcol]); + putstr(prevmsg_win, 0, cw->data[cw->maxcol]); cw->maxcol--; if (cw->maxcol < 0) cw->maxcol = cw->rows-1; if (!cw->data[cw->maxcol]) @@ -156,19 +118,19 @@ tty_doprev_message() } STATIC_OVL void -redotoplin(symstr) - const nhwchar *symstr; +redotoplin(str) + const char *str; { int otoplin = ttyDisplay->toplin; home(); - if (DoGputch(*symstr)) { + if(*str & 0x80) { /* kludge for the / command, the only time we ever want a */ /* graphics character on the top line */ - g_putch((int)*symstr++); + g_putch((int)*str++); ttyDisplay->curx++; } end_glyphout(); /* in case message printed during graphics output */ - putsyms(symstr); + putsyms(str); cl_end(); ttyDisplay->toplin = 1; if(ttyDisplay->cury && otoplin != 3) @@ -180,25 +142,25 @@ remember_topl() { register struct WinDesc *cw = wins[WIN_MESSAGE]; int idx = cw->maxrow; - unsigned len; + unsigned len = strlen(toplines) + 1; if ((cw->flags & WIN_LOCKHISTORY) || !*toplines) return; - len = Wstrlen(toplines) + 1; + if (len > (unsigned)cw->datlen[idx]) { if (cw->data[idx]) free(cw->data[idx]); len += (8 - (len & 7)); /* pad up to next multiple of 8 */ - cw->data[idx] = (nhwchar *)alloc(sizeof(nhwchar) * len); + cw->data[idx] = (char *)alloc(len); cw->datlen[idx] = (short)len; } - (void)WWstrcpy(cw->data[idx], toplines); + Strcpy(cw->data[idx], toplines); *toplines = '\0'; cw->maxcol = cw->maxrow = (idx + 1) % cw->rows; } void addtopl(s) -const nhwchar *s; +const char *s; { register struct WinDesc *cw = wins[WIN_MESSAGE]; @@ -219,8 +181,7 @@ more() if(ttyDisplay->toplin) { tty_curs(BASE_WINDOW, cw->curx+1, cw->cury); - if(cw->curx >= CO - 8) - topl_putsym(T('\n')); + if(cw->curx >= CO - 8) topl_putsym('\n'); } if(flags.standout) @@ -249,22 +210,22 @@ more() void update_topl(bp) - register const nhwchar *bp; + register const char *bp; { - register nhwchar *tl, *otl; + register char *tl, *otl; register int n0; int notdied = 1; struct WinDesc *cw = wins[WIN_MESSAGE]; /* If there is room on the line, print message on same line */ /* But messages like "You die..." deserve their own line */ - n0 = Wstrlen(bp); + n0 = strlen(bp); if ((ttyDisplay->toplin == 1 || (cw->flags & WIN_STOP)) && cw->cury == 0 && - n0 + Wstrlen(toplines) + 3 < CO-8 && /* room for --More-- */ - (notdied = WWstrncmp(bp, T("You die"), 7))) { - (void)WWstrcat(toplines, T(" ")); - (void)WWstrcat(toplines, bp); + n0 + (int)strlen(toplines) + 3 < CO-8 && /* room for --More-- */ + (notdied = strncmp(bp, "You die", 7))) { + Strcat(toplines, " "); + Strcat(toplines, bp); cw->curx += 2; if(!(cw->flags & WIN_STOP)) addtopl(bp); @@ -277,7 +238,7 @@ update_topl(bp) } } remember_topl(); - (void)WWstrncpy(toplines, bp, TBUFSZ); + (void) strncpy(toplines, bp, TBUFSZ); toplines[TBUFSZ - 1] = 0; for(tl = toplines; n0 >= CO; ){ @@ -285,11 +246,11 @@ update_topl(bp) for(tl+=CO-1; tl != otl && !isspace(*tl); --tl) ; if(tl == otl) { /* Eek! A huge token. Try splitting after it. */ - tl = Windex(otl, T(' ')); + tl = index(otl, ' '); if (!tl) break; /* No choice but to spit it out whole. */ } - *tl++ = T('\n'); - n0 = Wstrlen(tl); + *tl++ = '\n'; + n0 = strlen(tl); } if(!notdied) cw->flags &= ~WIN_STOP; if(!(cw->flags & WIN_STOP)) redotoplin(toplines); @@ -298,21 +259,21 @@ update_topl(bp) STATIC_OVL void topl_putsym(c) - nhwchar c; + char c; { register struct WinDesc *cw = wins[WIN_MESSAGE]; if(cw == (struct WinDesc *) 0) panic("Putsym window MESSAGE nonexistant"); switch(c) { - case T('\b'): + case '\b': if(ttyDisplay->curx == 0 && ttyDisplay->cury > 0) tty_curs(BASE_WINDOW, CO, (int)ttyDisplay->cury-1); backsp(); ttyDisplay->curx--; cw->curx = ttyDisplay->curx; return; - case T('\n'): + case '\n': cl_end(); ttyDisplay->curx = 0; ttyDisplay->cury++; @@ -323,7 +284,7 @@ topl_putsym(c) break; default: if(ttyDisplay->curx == CO-1) - topl_putsym(T('\n')); /* 1 <= curx <= CO; avoid CO */ + topl_putsym('\n'); /* 1 <= curx <= CO; avoid CO */ #ifdef WIN32CON (void) putchar(c); #endif @@ -337,11 +298,11 @@ topl_putsym(c) } void -putsyms(symstr) - const nhwchar *symstr; +putsyms(str) + const char *str; { - while(*symstr) - topl_putsym(*symstr++); + while(*str) + topl_putsym(*str++); } STATIC_OVL void @@ -349,8 +310,7 @@ removetopl(n) register int n; { /* assume addtopl() has been done, so ttyDisplay->toplin is already set */ - while (n-- > 0) - putsyms(T("\b \b")); + while (n-- > 0) putsyms("\b \b"); } extern char erase_char; /* from xxxtty.c; don't need kill_char */ @@ -413,7 +373,7 @@ char def; ttyDisplay->inread = sav; tty_clear_nhwindow(WIN_MESSAGE); cw->maxcol = cw->maxrow; - Waddtopl(prompt); + addtopl(prompt); } else { if(!doprev) (void) tty_doprev_message(); /* need two initially */ @@ -429,7 +389,7 @@ char def; tty_clear_nhwindow(WIN_MESSAGE); cw->maxcol = cw->maxrow; doprev = 0; - Waddtopl(prompt); + addtopl(prompt); q = '\0'; /* force another loop iteration */ continue; } @@ -450,14 +410,13 @@ char def; tty_nhbell(); q = (char)0; } else if (q == '#' || digit_ok) { - char z; - nhwchar digit_string[2]; + char z, digit_string[2]; int n_len = 0; long value = 0; - addtopl(T("#")), n_len++; - digit_string[1] = (nhwchar)0; + addtopl("#"), n_len++; + digit_string[1] = '\0'; if (q != '#') { - digit_string[0] = (nhwchar)q; + digit_string[0] = q; addtopl(digit_string), n_len++; value = q - '0'; q = '#'; @@ -467,7 +426,7 @@ char def; if (digit(z)) { value = (10 * value) + (z - '0'); if (value < 0) break; /* overflow: try again */ - digit_string[0] = (nhwchar)z; + digit_string[0] = z; addtopl(digit_string), n_len++; } else if (z == 'y' || index(quitchars, z)) { if (z == '\033') value = -1; /* abort */ @@ -492,7 +451,7 @@ char def; if (q != '#') { Sprintf(rtmp, "%c", q); - Waddtopl(rtmp); + addtopl(rtmp); } clean_up: ttyDisplay->inread--; @@ -505,7 +464,7 @@ char def; } /* shared by tty_getmsghistory() and tty_putmsghistory() */ -static nhwchar **snapshot_mesgs = 0; +static char **snapshot_mesgs = 0; /* collect currently available message history data into a sequential array; optionally, purge that data from the active circular buffer set as we go */ @@ -513,7 +472,7 @@ STATIC_OVL void msghistory_snapshot(purge) boolean purge; /* clear message history buffer as we copy it */ { - nhwchar *mesg; + char *mesg; int i, inidx, outidx; struct WinDesc *cw; @@ -528,24 +487,24 @@ boolean purge; /* clear message history buffer as we copy it */ history updating to take place because that could clobber them */ if (!purge) cw->flags |= WIN_LOCKHISTORY; - snapshot_mesgs = (nhwchar **)alloc((cw->rows + 1) * sizeof (nhwchar *)); + snapshot_mesgs = (char **)alloc((cw->rows + 1) * sizeof (char *)); outidx = 0; inidx = cw->maxrow; for (i = 0; i < cw->rows; ++i) { - snapshot_mesgs[i] = (nhwchar *)0; + snapshot_mesgs[i] = (char *)0; mesg = cw->data[inidx]; if (mesg && *mesg) { snapshot_mesgs[outidx++] = mesg; if (purge) { /* we're taking this pointer away; subsequest history updates will eventually allocate a new one to replace it */ - cw->data[inidx] = (nhwchar *)0; + cw->data[inidx] = (char *)0; cw->datlen[inidx] = 0; } } inidx = (inidx + 1) % cw->rows; } - snapshot_mesgs[cw->rows] = (nhwchar *)0; /* sentinel */ + snapshot_mesgs[cw->rows] = (char *)0; /* sentinel */ /* for a destructive snapshot, history is now completely empty */ if (purge) cw->maxcol = cw->maxrow = 0; @@ -565,7 +524,7 @@ boolean purged; /* True: took history's pointers, False: just cloned them */ free((genericptr_t)snapshot_mesgs[i]); } - free((genericptr_t)snapshot_mesgs), snapshot_mesgs = (nhwchar **)0; + free((genericptr_t)snapshot_mesgs), snapshot_mesgs = (char **)0; /* history can resume being updated at will now... */ if (!purged) wins[WIN_MESSAGE]->flags &= ~WIN_LOCKHISTORY; @@ -587,7 +546,7 @@ tty_getmsghistory(init) boolean init; { static int nxtidx; - nhwchar *nextmesg; + char *nextmesg; char *result = 0; if (init) { @@ -598,11 +557,7 @@ boolean init; if (snapshot_mesgs) { nextmesg = snapshot_mesgs[nxtidx++]; if (nextmesg) { -#ifdef UNICODE_WIDEWINPORT - result = WNstrcpy(topl_nbuf, nextmesg); /* wide-to-narrow */ -#else result = (char *)nextmesg; -#endif } else { free_msghistory_snapshot(FALSE); } @@ -648,12 +603,12 @@ boolean restoring_msghist; if (msg) { /* move most recent message to history, make this become most recent */ remember_topl(); - (void)NWstrcpy(toplines, msg); /* narrow-to-wide */ + Strcpy(toplines, msg); } else if (snapshot_mesgs) { /* done putting arbitrary messages in; put the snapshot ones back */ for (idx = 0; snapshot_mesgs[idx]; ++idx) { remember_topl(); - (void)WWstrcpy(toplines, snapshot_mesgs[idx]); /* wide-to-wide */ + Strcpy(toplines, snapshot_mesgs[idx]); } /* now release the snapshot */ free_msghistory_snapshot(TRUE); diff --git a/win/tty/wintty.c b/win/tty/wintty.c index d4c921501..a526897b7 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -43,11 +43,6 @@ extern char mapped_menu_cmds[]; /* from options.c */ /* this is only needed until tty_status_* routines are written */ extern NEARDATA winid WIN_STATUS; -#ifdef UNICODE_WIDEWINPORT -void FDECL(tty_putmixed,(winid,int,const char *)); -void FDECL(tty_putstr_core,(winid,int,const nhwchar *)); -#endif - /* Interface definition, for windows.c */ struct window_procs tty_procs = { "tty", @@ -75,11 +70,7 @@ struct window_procs tty_procs = { tty_destroy_nhwindow, tty_curs, tty_putstr, -#ifdef UNICODE_WIDEWINPORT - tty_putmixed, -#else genl_putmixed, -#endif tty_display_file, tty_start_menu, tty_add_menu, @@ -151,12 +142,7 @@ static char obuf[BUFSIZ]; /* BUFSIZ is defined in stdio.h */ #endif static char winpanicstr[] = "Bad window id %d"; -#ifdef UNICODE_WIDEWINPORT -nhwchar defmorestr[] = L"--More--"; -#else -nhwchar defmorestr[] = "--More--"; -#endif -nhwchar emptysym[1] = {0}; +char defmorestr[] = "--More--"; #ifdef CLIPPING # if defined(USE_TILES) && defined(MSDOS) @@ -196,11 +182,8 @@ STATIC_DCL void FDECL(process_menu_window, (winid,struct WinDesc *)); STATIC_DCL void FDECL(process_text_window, (winid,struct WinDesc *)); STATIC_DCL tty_menu_item *FDECL(reverse, (tty_menu_item *)); STATIC_DCL const char * FDECL(compress_str, (const char *)); -STATIC_DCL void FDECL(tty_putsym, (winid, int, int, NHWCHAR_P)); +STATIC_DCL void FDECL(tty_putsym, (winid, int, int, CHAR_P)); STATIC_DCL char *FDECL(copy_of, (const char *)); -#ifdef UNICODE_WIDEWINPORT -STATIC_DCL nhwchar *FDECL(nhwchar_copy_of, (const nhwchar *)); -#endif STATIC_DCL void FDECL(bail, (const char *)); /* __attribute__((noreturn)) */ /* @@ -295,11 +278,7 @@ if(wc_tracelogf) for(i=WIN_INVEN; i < MAXWIN; i++) if(wins[i] && wins[i]->active) { /* cop-out */ -#ifdef UNICODE_WIDEWINPORT - addtopl(L"Press Return to continue: "); -#else addtopl("Press Return to continue: "); -#endif break; } (void) fflush(stdout); @@ -1120,24 +1099,24 @@ tty_create_nhwindow(type) if(newwin->maxrow) { newwin->data = - (nhwchar **) alloc(sizeof(nhwchar *) * (unsigned)newwin->maxrow); + (char **) alloc(sizeof(char *) * (unsigned)newwin->maxrow); newwin->datlen = (short *) alloc(sizeof(short) * (unsigned)newwin->maxrow); if(newwin->maxcol) { for (i = 0; i < newwin->maxrow; i++) { - newwin->data[i] = (nhwchar *) alloc(sizeof(nhwchar) * (unsigned)newwin->maxcol); + newwin->data[i] = (char *) alloc((unsigned)newwin->maxcol); newwin->datlen[i] = newwin->maxcol; } } else { for (i = 0; i < newwin->maxrow; i++) { - newwin->data[i] = (nhwchar *) 0; + newwin->data[i] = (char *) 0; newwin->datlen[i] = 0; } } if(newwin->type == NHW_MESSAGE) newwin->maxrow = 0; } else { - newwin->data = (nhwchar **)0; + newwin->data = (char **)0; newwin->datlen = (short *)0; } @@ -1175,12 +1154,12 @@ free_window_info(cw, free_data) for(i=0; imaxrow; i++) if(cw->data[i]) { free((genericptr_t)cw->data[i]); - cw->data[i] = (nhwchar *)0; + cw->data[i] = (char *)0; if (cw->datlen) cw->datlen[i] = 0; } if (free_data) { free((genericptr_t)cw->data); - cw->data = (nhwchar **)0; + cw->data = (char **)0; if (cw->datlen) free((genericptr_t)cw->datlen); cw->datlen = (short *)0; cw->rows = 0; @@ -1254,25 +1233,15 @@ dmore(cw, s) register struct WinDesc *cw; const char *s; /* valid responses */ { -#ifdef UNICODE_WIDEWINPORT - char buf[BUFSZ]; -#endif - const nhwchar *prompt = cw->morestr ? cw->morestr : defmorestr; - + const char *prompt = cw->morestr ? cw->morestr : defmorestr; int offset = (cw->type == NHW_TEXT) ? 1 : 2; tty_curs(BASE_WINDOW, (int)ttyDisplay->curx + offset, (int)ttyDisplay->cury); if(flags.standout) standoutbeg(); -#ifdef UNICODE_WIDEWINPORT - strnhwcpy(buf, prompt); - xputs(buf); - ttyDisplay->curx += strlen(buf); -#else xputs(prompt); ttyDisplay->curx += strlen(prompt); -#endif if(flags.standout) standoutend(); @@ -1387,13 +1356,13 @@ struct WinDesc *cw; long count; int n, curr_page, page_lines; boolean finished, counting, reset_count; - char *cp, *rp, resp[QBUFSZ], gacc[QBUFSZ]; - nhwchar *msave, *morestr; + char *cp, *rp, resp[QBUFSZ], gacc[QBUFSZ], + *msave, *morestr; curr_page = page_lines = 0; page_start = page_end = 0; msave = cw->morestr; /* save the morestr */ - cw->morestr = morestr = (nhwchar*) alloc(sizeof(nhwchar) * (unsigned) QBUFSZ); + cw->morestr = morestr = (char*) alloc((unsigned) QBUFSZ); counting = FALSE; count = 0L; reset_count = TRUE; @@ -1510,41 +1479,20 @@ struct WinDesc *cw; Strcat(resp, gacc); /* group accelerators */ Strcat(resp, mapped_menu_cmds); - if (cw->npages > 1) { -#ifdef UNICODE_WIDEWINPORT - char buf[BUFSZ]; - Sprintf(buf, "(%d of %d)", - curr_page + 1, (int) cw->npages); - (void)nhwstrcpy(cw->morestr, buf); -#else + if (cw->npages > 1) Sprintf(cw->morestr, "(%d of %d)", curr_page + 1, (int) cw->npages); -#endif - } else if (msave) { -#ifdef UNICODE_WIDEWINPORT - (void)nhwcpy(cw->morestr, msave); -#else + else if (msave) Strcpy(cw->morestr, msave); -#endif - } else { -#ifdef UNICODE_WIDEWINPORT - (void)nhwcpy(cw->morestr, defmorestr); -#else + else Strcpy(cw->morestr, defmorestr); -#endif - } + tty_curs(window, 1, page_lines); cl_end(); dmore(cw, resp); } else { /* just put the cursor back... */ - tty_curs(window, -#ifdef UNICODE_WIDEWINPORT - (int) nhwlen(cw->morestr) + 2, -#else - (int) strlen(cw->morestr) + 2, -#endif - page_lines); + tty_curs(window, (int) strlen(cw->morestr) + 2, page_lines); xwaitforspace(resp); } @@ -1708,7 +1656,7 @@ winid window; struct WinDesc *cw; { int i, n, attr; - register nhwchar *cp; + register char *cp; for (n = 0, i = 0; i < cw->maxrow; i++) { if (!cw->offx && (n + cw->offy == ttyDisplay->rows - 1)) { @@ -1746,11 +1694,7 @@ struct WinDesc *cw; *cp && (int) ttyDisplay->curx < (int) ttyDisplay->cols; cp++, ttyDisplay->curx++) #endif -#ifdef UNICODE_WIDEWINPORT - u_putch(*cp); -#else (void) putchar(*cp); -#endif term_end_attr(attr); } } @@ -1996,7 +1940,7 @@ STATIC_OVL void tty_putsym(window, x, y, ch) winid window; int x, y; - nhwchar ch; + char ch; { register struct WinDesc *cw = 0; @@ -2008,11 +1952,7 @@ tty_putsym(window, x, y, ch) case NHW_MAP: case NHW_BASE: tty_curs(window, x, y); -#ifdef UNICODE_WIDEWINPORT - u_putch(ch); -#else (void) putchar(ch); -#endif ttyDisplay->curx++; cw->curx++; break; @@ -2055,14 +1995,9 @@ tty_putstr(window, attr, str) const char *str; { register struct WinDesc *cw = 0; -#ifdef UNICODE_WIDEWINPORT - nhwchar symbuf[BUFSZ]; - register const nhwchar *symstr = symbuf; -#else - register const nhwchar *nb; - register nhwchar *ob; + register char *ob; + register const char *nb; register int i, j, n0; -#endif /* Assume there's a real problem if the window is missing -- * probably a panic message @@ -2077,52 +2012,21 @@ tty_putstr(window, attr, str) return; if(cw->type != NHW_MESSAGE) str = compress_str(str); -#if defined(USER_SOUNDS) && defined(WIN32CON) - else - play_sound_for_message(str); -#endif - -#ifdef UNICODE_WIDEWINPORT - nhwstrcpy(symbuf, str); - tty_putstr_core(window, attr, symstr); -} - -void -tty_putstr_core(window, attr, symstr) - winid window; - int attr; - const nhwchar *symstr; -{ - register struct WinDesc *cw = wins[window]; - register const nhwchar *nb; - register nhwchar *ob; - register int i, j, n0; -#endif ttyDisplay->lastwin = window; switch(cw->type) { case NHW_MESSAGE: /* really do this later */ -#ifdef UNICODE_WIDEWINPORT - update_topl(symstr); -#else - update_topl(str); +#if defined(USER_SOUNDS) && defined(WIN32CON) + play_sound_for_message(str); #endif + update_topl(str); break; case NHW_STATUS: ob = &cw->data[cw->cury][j = cw->curx]; if(context.botlx) *ob = 0; -#ifdef UNICODE_WIDEWINPORT - if(!cw->cury && (int)nhwlen(symstr) >= CO) { - /* the characters before "St:" are unnecessary */ - nb = nhwindex(symstr, L':'); - if(nb && nb > symstr+2) - symstr = nb - 2; - } - nb = symstr; -#else if(!cw->cury && (int)strlen(str) >= CO) { /* the characters before "St:" are unnecessary */ nb = index(str, ':'); @@ -2130,8 +2034,6 @@ tty_putstr_core(window, attr, symstr) str = nb - 2; } nb = str; -#endif - for(i = cw->curx+1, n0 = cw->cols; i < n0; i++, nb++) { if(!*nb) { if(*ob || context.botlx) { @@ -2146,31 +2048,19 @@ tty_putstr_core(window, attr, symstr) if(*ob) ob++; } -#ifdef UNICODE_WIDEWINPORT - (void) nhwncpy(&cw->data[cw->cury][j], symstr, cw->cols - j - 1); -#else (void) strncpy(&cw->data[cw->cury][j], str, cw->cols - j - 1); -#endif - cw->data[cw->cury][cw->cols-1] = (nhwchar)0; /* null terminate */ + cw->data[cw->cury][cw->cols-1] = '\0'; /* null terminate */ cw->cury = (cw->cury+1) % 2; cw->curx = 0; break; case NHW_MAP: tty_curs(window, cw->curx+1, cw->cury); term_start_attr(attr); -#ifdef UNICODE_WIDEWINPORT - while(*symstr && (int) ttyDisplay->curx < (int) ttyDisplay->cols-1) { - u_putch(*symstr); - symstr++; - ttyDisplay->curx++; - } -#else while(*str && (int) ttyDisplay->curx < (int) ttyDisplay->cols-1) { (void) putchar(*str); str++; ttyDisplay->curx++; } -#endif cw->curx = 0; cw->cury++; term_end_attr(attr); @@ -2178,23 +2068,14 @@ tty_putstr_core(window, attr, symstr) case NHW_BASE: tty_curs(window, cw->curx+1, cw->cury); term_start_attr(attr); -#ifdef UNICODE_WIDEWINPORT - while (*symstr) { -#else while (*str) { -#endif if ((int) ttyDisplay->curx >= (int) ttyDisplay->cols-1) { cw->curx = 0; cw->cury++; tty_curs(window, cw->curx+1, cw->cury); } -#ifdef UNICODE_WIDEWINPORT - u_putch(*symstr); - symstr++; -#else (void) putchar(*str); str++; -#endif ttyDisplay->curx++; } cw->curx = 0; @@ -2221,10 +2102,10 @@ tty_putstr_core(window, attr, symstr) } /* always grows one at a time, but alloc 12 at a time */ if(cw->cury >= cw->rows) { - nhwchar **tmp; + char **tmp; cw->rows += 12; - tmp = (nhwchar **) alloc(sizeof(nhwchar *) * (unsigned)cw->rows); + tmp = (char **) alloc(sizeof(char *) * (unsigned)cw->rows); for(i=0; imaxrow; i++) tmp[i] = cw->data[i]; if(cw->data) @@ -2236,19 +2117,10 @@ tty_putstr_core(window, attr, symstr) } if(cw->data[cw->cury]) free((genericptr_t)cw->data[cw->cury]); -#ifdef UNICODE_WIDEWINPORT - n0 = nhwlen(symstr) + 1; -#else n0 = strlen(str) + 1; -#endif - - ob = cw->data[cw->cury] = (nhwchar *)alloc(sizeof(nhwchar) * ((unsigned)n0 + 1)); - *ob++ = (nhwchar)(attr + 1); /* avoid nuls, for convenience */ -#ifdef UNICODE_WIDEWINPORT - (void)nhwcpy(ob, symstr); -#else + ob = cw->data[cw->cury] = (char *)alloc((unsigned)n0 + 1); + *ob++ = (char)(attr + 1); /* avoid nuls, for convenience */ Strcpy(ob, str); -#endif if(n0 > cw->maxcol) cw->maxcol = n0; @@ -2256,19 +2128,11 @@ tty_putstr_core(window, attr, symstr) cw->maxrow = cw->cury; if(n0 > CO) { /* attempt to break the line */ -#ifdef UNICODE_WIDEWINPORT - for(i = CO-1; i && symstr[i] != L' ' && symstr[i] != L'\n';) -#else for(i = CO-1; i && str[i] != ' ' && str[i] != '\n';) -#endif i--; if(i) { - cw->data[cw->cury-1][++i] = (nhwchar)0; -#ifdef UNICODE_WIDEWINPORT - tty_putstr_core(window, attr, &symstr[i]); -#else + cw->data[cw->cury-1][++i] = '\0'; tty_putstr(window, attr, &str[i]); -#endif } } @@ -2276,60 +2140,6 @@ tty_putstr_core(window, attr, symstr) } } -#ifdef UNICODE_WIDEWINPORT -/* - * This differs from putstr() because the str parameter can - * contain a sequence of characters representing: - * \GXXXXNNNN a glyph value, encoded by encglyph(). - * - */ -void -tty_putmixed(window, attr, str) - winid window; - int attr; - const char *str; -{ - nhwchar wbuf[BUFSZ]; - const char *cp = str; - nhwchar *put = wbuf; - while (*cp) { - if (*cp == '\\') { - int rndchk = 0, so = 0, gv = 0, ch, oc, dcount; - unsigned os; - const char *dp, *hex = "00112233445566778899aAbBcCdDeEfF"; - const char *save_cp = cp; - - cp++; - switch(*cp) { - case 'G': /* glyph value \GXXXXNNNN*/ - dcount = 0; - for (++cp; *cp && (dp = index(hex, *cp)) && (dcount++ < 4); cp++) - rndchk = (int)((rndchk * 16) + ((int)(dp - hex) / 2)); - - if (rndchk == context.rndencode) { - dcount = 0; - for (; *cp && (dp = index(hex, *cp)) && (dcount++ < 4); cp++) - gv = (int)((gv * 16) + ((int)(dp - hex) / 2)); - so = mapglyph(gv, &ch, &oc, &os, 0, 0); - *put++ = (nhwchar)showsyms[so]; - continue; - } else { - /* possible forgery - leave it the way it is */ - cp = save_cp; - } - break; - case '\\': - break; - } - } - *put++ = (nhwchar)*cp++; - } - *put = (nhwchar)0; - /* now send it to tty_putstr_core() */ - tty_putstr_core(window, attr, wbuf); -} -#endif /*UNICODE_WIDEWINPORT*/ - void tty_display_file(fname, complain) const char *fname; @@ -2515,7 +2325,7 @@ tty_end_menu(window, prompt) /* Reverse the list so that items are in correct order. */ cw->mlist = reverse(cw->mlist); - /* Put the prompt at the beginning of the menu. */ + /* Put the promt at the beginning of the menu. */ if (prompt) { anything any; @@ -2567,19 +2377,10 @@ tty_end_menu(window, prompt) /* produce the largest demo string */ Sprintf(buf, "(%d of %d) ", cw->npages, cw->npages); len = strlen(buf); -#ifdef UNICODE_WIDEWINPORT - cw->morestr = nhwchar_copy_of(emptysym); -#else cw->morestr = copy_of(""); -#endif } else { -#ifdef UNICODE_WIDEWINPORT - cw->morestr = nhwchar_copy_of(L"(end) "); - len = nhwlen(cw->morestr); -#else cw->morestr = copy_of("(end) "); len = strlen(cw->morestr); -#endif } if (len > (int)ttyDisplay->cols) { @@ -2699,11 +2500,7 @@ tty_wait_synch() } else { tty_display_nhwindow(WIN_MAP, FALSE); if(ttyDisplay->inmore) { -#ifdef UNICODE_WIDEWINPORT - addtopl(L"--More--"); -#else addtopl("--More--"); -#endif (void) fflush(stdout); } else if(ttyDisplay->inread > program_state.gameover) { /* this can only happen if we were reading and got interrupted */ @@ -2775,58 +2572,6 @@ end_glyphout() #endif } -#ifdef UNICODE_WIDEWINPORT -/* - * Parts of u_putch() were contributed by Adam Wozniak, 2005. - */ -void -u_putch(sym) -nhwchar sym; -{ - unsigned long unicode = sym; - if (!iflags.unicodedisp) - putchar((char)sym); - else { -#if defined(UNIX) || defined(VMS) - /* send utf8 to display */ - if (unicode < 0x80) { - (void) putchar(unicode); - } else if (unicode < 0x00000800) { - (void) putchar(0xC0 | (unicode >> 6)); - (void) putchar(0x80 | (unicode & 0x3F)); - } else if (unicode < 0x00010000) { - (void) putchar(0xE0 | (unicode >> 12)); - (void) putchar(0x80 | ((unicode >> 6) & 0x3F)); - (void) putchar(0x80 | (unicode & 0x3F)); - } else if (unicode < 0x00200000) { - (void) putchar(0xF0 | (unicode >> 18)); - (void) putchar(0x80 | ((unicode >> 12) & 0x3F)); - (void) putchar(0x80 | ((unicode >> 6) & 0x3F)); - (void) putchar(0x80 | (unicode & 0x3F)); - } else if (unicode < 0x04000000) { - (void) putchar(0xF8 | (unicode >> 24)); - (void) putchar(0x80 | ((unicode >> 18) & 0x3F)); - (void) putchar(0x80 | ((unicode >> 12) & 0x3F)); - (void) putchar(0x80 | ((unicode >> 6) & 0x3F)); - (void) putchar(0x80 | (unicode & 0x3F)); - } else { - (void) putchar(0xFC | (unicode >> 30)); - (void) putchar(0x80 | ((unicode >> 24) & 0x3F)); - (void) putchar(0x80 | ((unicode >> 18) & 0x3F)); - (void) putchar(0x80 | ((unicode >> 12) & 0x3F)); - (void) putchar(0x80 | ((unicode >> 6) & 0x3F)); - (void) putchar(0x80 | (unicode & 0x3F)); - } -#else - /* it is assumed that whatever is being substituted for - putchar() can handle unicode characters directly at - this point (nttty's xputc() for example) */ - (void) putchar(sym); -#endif - } -} -#endif /*UNICODE_WIDEWINPORT*/ - #ifndef WIN32 void g_putch(in_ch) @@ -2835,11 +2580,6 @@ int in_ch; register char ch = (char)in_ch; # if defined(ASCIIGRAPH) && !defined(NO_TERMS) -# if defined(UNICODE_WIDEWINPORT) && defined(UNICODE_DRAWING) - if (iflags.unicodedisp && symset[currentgraphics].name) { - u_putch(in_ch); - } else -# endif if (SYMHANDLING(H_IBM) || iflags.eight_bit_tty) { /* IBM-compatible displays don't need other stuff */ (void) putchar(ch); @@ -2923,9 +2663,9 @@ tty_print_glyph(window, x, y, glyph) xchar x, y; int glyph; { - int ch, idx; + int ch; boolean reverse_on = FALSE; - int color; + int color; unsigned special; #ifdef CLIPPING @@ -2935,7 +2675,7 @@ tty_print_glyph(window, x, y, glyph) } #endif /* map glyph to character and color */ - idx = mapglyph(glyph, &ch, &color, &special, x, y); + (void)mapglyph(glyph, &ch, &color, &special, x, y); /* Move the cursor. */ tty_curs(window, x,y); @@ -2968,11 +2708,6 @@ tty_print_glyph(window, x, y, glyph) if (iflags.grmode && iflags.tile_view) xputg(glyph,ch,special); else -#endif -#if defined(UNICODE_WIDEWINPORT) && defined(UNICODE_DRAWING) - if (iflags.unicodedisp && symset[currentgraphics].name) - g_putch(showsyms[idx]); /* use the unicode symset */ - else #endif g_putch(ch); /* print the character */ @@ -3127,15 +2862,6 @@ copy_of(s) return strcpy((char *) alloc((unsigned) (strlen(s) + 1)), s); } -# ifdef UNICODE_WIDEWINPORT -STATIC_OVL nhwchar * -nhwchar_copy_of(s) - const nhwchar *s; -{ - if (!s) s = emptysym; - return nhwcpy((nhwchar *) alloc(sizeof(nhwchar) * (unsigned) (nhwlen(s) + 1)), s); -} -# endif /*UNICODE_WIDEWINPORT*/ #endif /* TTY_GRAPHICS */ /*wintty.c*/ From 17ea9ff9ab8fdd5a7488d3a1171be9eefde0031a Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Mon, 16 Feb 2015 02:09:57 -0500 Subject: [PATCH 042/132] Fix some warnings on the unconditionals branch. --- src/eat.c | 2 +- src/questpgr.c | 6 ++++++ util/makedefs.c | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/eat.c b/src/eat.c index 67e4b88b9..320fa2351 100644 --- a/src/eat.c +++ b/src/eat.c @@ -1597,7 +1597,7 @@ start_eating(otmp) /* called as you start to eat */ { const char *old_nomovemsg, *save_nomovemsg; - debugpline("start_eating: %lx (victual = %lx)", otmp, context.victual.piece); + debugpline("start_eating: %p (victual = %p)", otmp, context.victual.piece); debugpline("reqtime = %d", context.victual.reqtime); debugpline("(original reqtime = %d)", objects[otmp->otyp].oc_delay); debugpline("nmod = %d", context.victual.nmod); diff --git a/src/questpgr.c b/src/questpgr.c index e85877840..d1bd4b250 100644 --- a/src/questpgr.c +++ b/src/questpgr.c @@ -12,6 +12,10 @@ #define QTEXT_FILE "quest.dat" +#ifdef TTY_GRAPHICS +#include "wintty.h" +#endif + /* from sp_lev.c, for deliver_splev_message() */ extern char *lev_message; @@ -49,7 +53,9 @@ dump_qtlist() /* dump the character msg list to check appearance */ for (msg = qt_list.chrole; msg->msgnum > 0; msg++) { pline("msgnum %d: delivery %c", msg->msgnum, msg->delivery); +#ifdef TTY_GRAPHICS more(); +#endif (void) dlb_fseek(msg_file, msg->offset, SEEK_SET); deliver_by_window(msg, NHW_TEXT); } diff --git a/util/makedefs.c b/util/makedefs.c index ba3ee79f3..6914af250 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -2256,7 +2256,7 @@ put_qt_hdrs() qt_hdr.n_hdr, ofp); #ifdef DEBUG for(i = 0; i < qt_hdr.n_hdr; i++) - Fprintf(stderr, "%c @ %ld, ", qt_hdr.id[i], qt_hdr.offset[i]); + Fprintf(stderr, "%s @ %ld, ", qt_hdr.id[i], qt_hdr.offset[i]); Fprintf(stderr, "\n"); #endif @@ -2267,7 +2267,7 @@ put_qt_hdrs() for(i = 0; i < qt_hdr.n_hdr; i++) { #ifdef DEBUG - Fprintf(stderr, "%ld: %c header info.\n", ftell(ofp), + Fprintf(stderr, "%ld: %s header info.\n", ftell(ofp), qt_hdr.id[i]); #endif (void) fwrite((genericptr_t)&(msg_hdr[i].n_msg), sizeof(int), From 5ee52039ca191a20ac9c68f732de6ffa2ca3b155 Mon Sep 17 00:00:00 2001 From: "Derek S. Ray" Date: Tue, 17 Feb 2015 13:42:59 -0500 Subject: [PATCH 043/132] Remove unused size from questpgr.c --- src/questpgr.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/questpgr.c b/src/questpgr.c index d1bd4b250..7f51965f7 100644 --- a/src/questpgr.c +++ b/src/questpgr.c @@ -46,7 +46,6 @@ static void dump_qtlist() /* dump the character msg list to check appearance */ { struct qtmsg *msg; - long size; if (!showdebug()) return; From 4dddb97301f42d7d42b160667d8f29b0370cb5d5 Mon Sep 17 00:00:00 2001 From: "Derek S. Ray" Date: Tue, 17 Feb 2015 13:58:27 -0500 Subject: [PATCH 044/132] remove and transfer INVISIBLE_OBJECTS to branch --- include/display.h | 8 ++++++-- include/extern.h | 3 --- include/obj.h | 6 +----- src/apply.c | 3 --- src/display.c | 24 ------------------------ src/do_wear.c | 6 ------ src/invent.c | 6 ------ src/mkobj.c | 3 --- src/mon.c | 8 -------- src/objnam.c | 18 ------------------ src/pickup.c | 3 --- src/potion.c | 22 ---------------------- src/steal.c | 22 +++++----------------- src/weapon.c | 5 ----- src/zap.c | 8 -------- 15 files changed, 12 insertions(+), 133 deletions(-) diff --git a/include/display.h b/include/display.h index 94ee1a15c..5be06d08a 100644 --- a/include/display.h +++ b/include/display.h @@ -16,9 +16,13 @@ #include "mondata.h" /* for mindless() */ #endif -#ifndef INVISIBLE_OBJECTS +/* + * vobj_at() + * + * Returns the head of the list of objects that the player can see + * at location (x,y). + */ #define vobj_at(x,y) (level.objects[x][y]) -#endif /* * sensemon() diff --git a/include/extern.h b/include/extern.h index c3004a0a0..39a42641c 100644 --- a/include/extern.h +++ b/include/extern.h @@ -295,9 +295,6 @@ E void FDECL(bury_obj, (struct obj *)); /* ### display.c ### */ -#ifdef INVISIBLE_OBJECTS -E struct obj * FDECL(vobj_at, (XCHAR_P,XCHAR_P)); -#endif /* INVISIBLE_OBJECTS */ E void FDECL(magic_map_background, (XCHAR_P,XCHAR_P,int)); E void FDECL(map_background, (XCHAR_P,XCHAR_P,int)); E void FDECL(map_trap, (struct trap *,int)); diff --git a/include/obj.h b/include/obj.h index 3d0e5d88d..dc522b338 100644 --- a/include/obj.h +++ b/include/obj.h @@ -94,11 +94,7 @@ struct obj { Bitfield(recharged,3); /* number of times it's been recharged */ #define on_ice recharged /* corpse on ice */ Bitfield(lamplit,1); /* a light-source -- can be lit */ -#ifdef INVISIBLE_OBJECTS - Bitfield(oinvis,1); /* invisible */ -#else - Bitfield(oreserved1,1); -#endif + Bitfield(oreserved1,1); /* was the placeholder for invisible objects, free for use */ Bitfield(greased,1); /* covered with grease */ Bitfield(nomerge,1); /* set temporarily to prevent merging */ Bitfield(was_thrown,1); /* thrown by hero since last picked up */ diff --git a/src/apply.c b/src/apply.c index d2377b51e..2ac4088dd 100644 --- a/src/apply.c +++ b/src/apply.c @@ -715,9 +715,6 @@ struct obj *obj; if(!getdir((char *)0)) return 0; invis_mirror = Invis; -#ifdef INVISIBLE_OBJECTS - if (obj->oinvis) invis_mirror = TRUE; -#endif useeit = !Blind && (!invis_mirror || See_invisible); uvisage = (ACURR(A_CHA) > 14) ? (poly_gender() == 1 ? "beautiful" : "handsome") : "ugly"; diff --git a/src/display.c b/src/display.c index 48b9f0b65..23dcef3a0 100644 --- a/src/display.c +++ b/src/display.c @@ -139,30 +139,6 @@ STATIC_DCL int FDECL(wall_angle, (struct rm *)); #define remember_topology(x,y) (lastseentyp[x][y] = levl[x][y].typ) -#ifdef INVISIBLE_OBJECTS -/* - * vobj_at() - * - * Returns a pointer to an object if the hero can see an object at the - * given location. This takes care of invisible objects. NOTE, this - * assumes that the hero is not blind and on top of the object pile. - * It does NOT take into account that the location is out of sight, or, - * say, one can see blessed, etc. - */ -struct obj * -vobj_at(x,y) - xchar x,y; -{ - register struct obj *obj = level.objects[x][y]; - - while (obj) { - if (!obj->oinvis || See_invisible) return obj; - obj = obj->nexthere; - } - return ((struct obj *) 0); -} -#endif /* else vobj_at() is defined in display.h */ - /* * magic_map_background() * diff --git a/src/do_wear.c b/src/do_wear.c index 6b622d7af..414f5a522 100644 --- a/src/do_wear.c +++ b/src/do_wear.c @@ -854,9 +854,6 @@ register struct obj *obj; /* can now see invisible monsters */ set_mimic_blocking(); /* do special mimic handling */ see_monsters(); -#ifdef INVISIBLE_OBJECTS - see_objects(); -#endif if (Invis && !oldprop && !HSee_invisible && !Blind) { newsym(u.ux,u.uy); @@ -966,9 +963,6 @@ boolean gone; if (!See_invisible) { set_mimic_blocking(); /* do special mimic handling */ see_monsters(); -#ifdef INVISIBLE_OBJECTS - see_objects(); -#endif } if (Invisible && !Blind) { diff --git a/src/invent.c b/src/invent.c index e3cd20247..62295915c 100644 --- a/src/invent.c +++ b/src/invent.c @@ -2315,9 +2315,6 @@ boolean picked_some; /* only one object */ if (dfeature) pline1(fbuf); read_engr_at(u.ux, u.uy); /* Eric Backus */ -#ifdef INVISIBLE_OBJECTS - if (otmp->oinvis && !See_invisible) verb = "feel"; -#endif You("%s here %s.", verb, doname(otmp)); iflags.last_msg = PLNMSG_ONE_ITEM_HERE; if (otmp->otyp == CORPSE) feel_cockatrice(otmp, FALSE); @@ -2421,9 +2418,6 @@ mergable(otmp, obj) /* returns TRUE if obj & otmp can be merged */ obj->obroken != otmp->obroken || obj->otrapped != otmp->otrapped || obj->lamplit != otmp->lamplit || -#ifdef INVISIBLE_OBJECTS - obj->oinvis != otmp->oinvis || -#endif obj->greased != otmp->greased || obj->oeroded != otmp->oeroded || obj->oeroded2 != otmp->oeroded2 || diff --git a/src/mkobj.c b/src/mkobj.c index 08bb41bfb..5c7cffb7c 100644 --- a/src/mkobj.c +++ b/src/mkobj.c @@ -606,9 +606,6 @@ boolean artif; otmp->known = 1; otmp->lknown = 0; otmp->cknown = 0; -#ifdef INVISIBLE_OBJECTS - otmp->oinvis = !rn2(1250); -#endif otmp->corpsenm = NON_PM; if (init) switch (let) { diff --git a/src/mon.c b/src/mon.c index 4823ae1c7..f617dad4c 100644 --- a/src/mon.c +++ b/src/mon.c @@ -303,11 +303,6 @@ unsigned corpseflags; */ if (Blind && !sensemon(mtmp)) obj->dknown = 0; -#ifdef INVISIBLE_OBJECTS - /* Invisible monster ==> invisible corpse */ - obj->oinvis = mtmp->minvis; -#endif - stackobj(obj); newsym(x, y); return obj; @@ -858,9 +853,6 @@ mpickstuff(mtmp, str) if (!touch_artifact(otmp,mtmp)) continue; if (!can_carry(mtmp,otmp)) continue; if (is_pool(mtmp->mx,mtmp->my)) continue; -#ifdef INVISIBLE_OBJECTS - if (otmp->oinvis && !perceives(mtmp->data)) continue; -#endif if (cansee(mtmp->mx,mtmp->my) && flags.verbose) pline("%s picks up %s.", Monnam(mtmp), (distu(mtmp->mx, mtmp->my) <= 5) ? diff --git a/src/objnam.c b/src/objnam.c index 321d7ff29..84c3599f4 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -683,10 +683,6 @@ register struct obj *obj; } else Strcpy(prefix, "a "); -#ifdef INVISIBLE_OBJECTS - if (obj->oinvis) Strcat(prefix,"invisible "); -#endif - /* "empty" goes at the beginning, but item count goes at the end */ if (cknown && (Is_container(obj) || obj->otyp == STATUE) && !Has_contents(obj)) @@ -2241,9 +2237,6 @@ struct obj *no_wish; int cnt, spe, spesgn, typ, very, rechrg; int blessed, uncursed, iscursed, ispoisoned, isgreased; int eroded, eroded2, erodeproof; -#ifdef INVISIBLE_OBJECTS - int isinvisible; -#endif int halfeaten, mntmp, contents; int islit, unlabeled, ishistoric, isdiluted, trapped; int tmp, tinv, tvariety; @@ -2271,9 +2264,6 @@ struct obj *no_wish; cnt = spe = spesgn = typ = very = rechrg = blessed = uncursed = iscursed = -#ifdef INVISIBLE_OBJECTS - isinvisible = -#endif ispoisoned = isgreased = eroded = eroded2 = erodeproof = halfeaten = islit = unlabeled = ishistoric = isdiluted = trapped = 0; @@ -2324,10 +2314,6 @@ struct obj *no_wish; iscursed = 1; } else if (!strncmpi(bp, "uncursed ", l=9)) { uncursed = 1; -#ifdef INVISIBLE_OBJECTS - } else if (!strncmpi(bp, "invisible ", l=10)) { - isinvisible = 1; -#endif } else if (!strncmpi(bp, "rustproof ", l=10) || !strncmpi(bp, "erodeproof ", l=11) || !strncmpi(bp, "corrodeproof ", l=13) || @@ -3137,10 +3123,6 @@ typfnd: curse(otmp); } -#ifdef INVISIBLE_OBJECTS - if (isinvisible) otmp->oinvis = 1; -#endif - /* set eroded */ if (is_damageable(otmp) || otmp->otyp == CRYSKNIFE) { if (eroded && (is_flammable(otmp) || is_rustprone(otmp))) diff --git a/src/pickup.c b/src/pickup.c index 2c1564f84..fea45dce3 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -1266,9 +1266,6 @@ boolean telekinesis; /* not picking it up directly by hand */ /* In case of auto-pickup, where we haven't had a chance to look at it yet; affects docall(SCR_SCARE_MONSTER). */ if (!Blind) -#ifdef INVISIBLE_OBJECTS - if (!obj->oinvis || See_invisible) -#endif obj->dknown = 1; if (obj == uchain) { /* do not pick up attached chain */ diff --git a/src/potion.c b/src/potion.c index 7a4014635..7542ea451 100644 --- a/src/potion.c +++ b/src/potion.c @@ -1909,28 +1909,6 @@ dodip() return 1; } -#ifdef INVISIBLE_OBJECTS - if (potion->otyp == POT_INVISIBILITY && !obj->oinvis) { - obj->oinvis = TRUE; - if (!Blind) { - if (!See_invisible) pline("Where did %s go?", - the(xname(obj))); - else You("notice a little haziness around %s.", - the(xname(obj))); - } - goto poof; - } else if (potion->otyp == POT_SEE_INVISIBLE && obj->oinvis) { - obj->oinvis = FALSE; - if (!Blind) { - if (!See_invisible) pline("So that's where %s went!", - the(xname(obj))); - else pline_The("haziness around %s disappears.", - the(xname(obj))); - } - goto poof; - } -#endif - if(is_poisonable(obj)) { if(potion->otyp == POT_SICKNESS && !obj->opoisoned) { char buf[BUFSZ]; diff --git a/src/steal.c b/src/steal.c index bf7238b01..c73878310 100644 --- a/src/steal.c +++ b/src/steal.c @@ -242,26 +242,14 @@ nothing_to_steal: retry: tmp = 0; for(otmp = invent; otmp; otmp = otmp->nobj) - if ((!uarm || otmp != uarmc) && otmp != uskin - && otmp->oclass != COIN_CLASS -#ifdef INVISIBLE_OBJECTS - && (!otmp->oinvis || perceives(mtmp->data)) -#endif - ) - tmp += ((otmp->owornmask & - (W_ARMOR | W_RING | W_AMUL | W_TOOL)) ? 5 : 1); + if ((!uarm || otmp != uarmc) && otmp != uskin && otmp->oclass != COIN_CLASS) + tmp += ((otmp->owornmask & (W_ARMOR | W_RING | W_AMUL | W_TOOL)) ? 5 : 1); if (!tmp) goto nothing_to_steal; tmp = rn2(tmp); for(otmp = invent; otmp; otmp = otmp->nobj) - if ((!uarm || otmp != uarmc) && otmp != uskin - && otmp->oclass != COIN_CLASS -#ifdef INVISIBLE_OBJECTS - && (!otmp->oinvis || perceives(mtmp->data)) -#endif - ) - if((tmp -= ((otmp->owornmask & - (W_ARMOR | W_RING | W_AMUL | W_TOOL)) ? 5 : 1)) < 0) - break; + if ((!uarm || otmp != uarmc) && otmp != uskin && otmp->oclass != COIN_CLASS) + if((tmp -= ((otmp->owornmask & (W_ARMOR | W_RING | W_AMUL | W_TOOL)) ? 5 : 1)) < 0) + break; if(!otmp) { impossible("Steal fails!"); return(0); diff --git a/src/weapon.c b/src/weapon.c index 746d1b5cd..5f611ddcf 100644 --- a/src/weapon.c +++ b/src/weapon.c @@ -183,11 +183,6 @@ struct monst *mon; if (is_pick(otmp) && (passes_walls(ptr) && thick_skinned(ptr))) tmp += 2; -#ifdef INVISIBLE_OBJECTS - /* Invisible weapons against monsters who can't see invisible */ - if (otmp->oinvis && !perceives(ptr)) tmp += 3; -#endif - /* Check specially named weapon "to hit" bonuses */ if (otmp->oartifact) tmp += spec_abon(otmp, mon); diff --git a/src/zap.c b/src/zap.c index cbc533041..dfdf95d4c 100644 --- a/src/zap.c +++ b/src/zap.c @@ -979,10 +979,6 @@ register struct obj *obj; } unbless(obj); uncurse(obj); -#ifdef INVISIBLE_OBJECTS - /*[this will be insufficient if it ever reduces obj's shop value]*/ - if (obj->oinvis) obj->oinvis = 0; -#endif return; } @@ -1833,10 +1829,6 @@ struct obj *obj, *otmp; (void) rloco(obj); break; case WAN_MAKE_INVISIBLE: -#ifdef INVISIBLE_OBJECTS - obj->oinvis = TRUE; - newsym(obj->ox,obj->oy); /* make object disappear */ -#endif break; case WAN_UNDEAD_TURNING: case SPE_TURN_UNDEAD: From b7537e0fbff5e4e89269cd017cd41e49ae80ddaa Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Wed, 25 Feb 2015 22:29:17 +0200 Subject: [PATCH 045/132] Add new parameters to makedefs: --debug and --make "makedefs --debug --make q" is equivalent to "makedefs -q" with DEBUG defined. --- doc/makedefs.6 | 8 ++++++++ util/makedefs.c | 38 +++++++++++++++++++------------------- 2 files changed, 27 insertions(+), 19 deletions(-) diff --git a/doc/makedefs.6 b/doc/makedefs.6 index 9a81780ec..7b850108c 100644 --- a/doc/makedefs.6 +++ b/doc/makedefs.6 @@ -118,6 +118,14 @@ and .IR vis_tab.h . .SH LONG COMMANDS .TP +.BI --debug +Show debugging output. +.br +.TP +.B --make \fR[\fIcommand\fR] +Execute a short command. Command is given without preceding dash. +.br +.TP .BI --input " file" Specify the input .I file diff --git a/util/makedefs.c b/util/makedefs.c index 6914af250..ad37677bc 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -6,7 +6,6 @@ /* NetHack may be freely redistributed. See license for details. */ #define MAKEDEFS_C /* use to conditionally include file sections */ -/* #define DEBUG */ /* uncomment for debugging info */ #include "config.h" #include "permonst.h" @@ -385,6 +384,7 @@ getfp(template, tag, mode) return rv; } +static boolean debug = FALSE; static FILE *inputfp; static FILE *outputfp; @@ -431,6 +431,15 @@ do_ext_makedefs(int argc, char **argv){ Fprintf(stdout, "%s", version_string(buf, delim)); exit(EXIT_SUCCESS); } + IS_OPTION("debug"){ + debug = TRUE; + CONTINUE; + } + IS_OPTION("make"){ + CONSUME; + do_makedefs(argv[0]); + exit(EXIT_SUCCESS); + } IS_OPTION("input"){ CONSUME; if(!strcmp(argv[0], "-")){ @@ -2246,36 +2255,30 @@ put_qt_hdrs() /* * The main header record. */ -#ifdef DEBUG - Fprintf(stderr, "%ld: header info.\n", ftell(ofp)); -#endif + if (debug) Fprintf(stderr, "%ld: header info.\n", ftell(ofp)); (void) fwrite((genericptr_t)&(qt_hdr.n_hdr), sizeof(int), 1, ofp); (void) fwrite((genericptr_t)&(qt_hdr.id[0][0]), sizeof(char)*LEN_HDR, qt_hdr.n_hdr, ofp); (void) fwrite((genericptr_t)&(qt_hdr.offset[0]), sizeof(long), qt_hdr.n_hdr, ofp); -#ifdef DEBUG - for(i = 0; i < qt_hdr.n_hdr; i++) + if (debug) { + for(i = 0; i < qt_hdr.n_hdr; i++) Fprintf(stderr, "%s @ %ld, ", qt_hdr.id[i], qt_hdr.offset[i]); - - Fprintf(stderr, "\n"); -#endif + Fprintf(stderr, "\n"); + } /* * The individual class headers. */ for(i = 0; i < qt_hdr.n_hdr; i++) { -#ifdef DEBUG - Fprintf(stderr, "%ld: %s header info.\n", ftell(ofp), - qt_hdr.id[i]); -#endif + if (debug) Fprintf(stderr, "%ld: %s header info.\n", ftell(ofp), + qt_hdr.id[i]); (void) fwrite((genericptr_t)&(msg_hdr[i].n_msg), sizeof(int), 1, ofp); (void) fwrite((genericptr_t)&(msg_hdr[i].qt_msg[0]), sizeof(struct qtmsg), msg_hdr[i].n_msg, ofp); -#ifdef DEBUG - { int j; + if (debug) { int j; for(j = 0; j < msg_hdr[i].n_msg; j++) { Fprintf(stderr, "msg %d @ %ld (%ld)", msg_hdr[i].qt_msg[j].msgnum, @@ -2287,7 +2290,6 @@ put_qt_hdrs() Fprintf(stderr, "\n"); } } -#endif } } @@ -2340,9 +2342,7 @@ do_questtxt() /* we have summary text; replace raw %E record with it */ Strcpy(in_line, summary_p); /* (guaranteed to fit) */ } else if(qt_comment(in_line)) continue; -#ifdef DEBUG - Fprintf(stderr, "%ld: %s", ftell(stdout), in_line); -#endif + if (debug) Fprintf(stderr, "%ld: %s", ftell(stdout), in_line); (void) fputs(xcrypt(in_line), ofp); } Fclose(ifp); From 91b96e2331ae480e566cbcdc84b3e2b3a12743c0 Mon Sep 17 00:00:00 2001 From: keni Date: Sat, 28 Feb 2015 17:52:19 -0500 Subject: [PATCH 046/132] Change NHtext to double the speed of "git checkout" --- DEVEL/hooksdir/NHtext | 82 +++++++++++++++++++++++-------------------- 1 file changed, 43 insertions(+), 39 deletions(-) diff --git a/DEVEL/hooksdir/NHtext b/DEVEL/hooksdir/NHtext index e9ee8c28c..03550e513 100755 --- a/DEVEL/hooksdir/NHtext +++ b/DEVEL/hooksdir/NHtext @@ -5,30 +5,32 @@ # clean/smudge filter for handling substitutions use strict; -my $debug = 0; # save trace to file -my $debug2 = 0; # annotate output when running from command line +#my $debug = 0; # save trace to file +#my $debug2 = 0; # annotate output when running from command line -my $sink = ($^O eq "MSWin32")? "NUL" :"/dev/null"; -my $dbgfile = ($^O eq "MSWin32") ? "$ENV{TEMP}.$$" : "/tmp/trace.$$"; -open TRACE, ">>", ($debug==0)? $sink : $dbgfile; -print TRACE "START CLIENT ARGV:\n"; -print TRACE "[0] $0\n"; -my $x1; -for(my $x=0;$x $ENV{$k}\n"; -} -print TRACE "CWD: " . `pwd`; -print TRACE "END\n"; +#my $sink = ($^O eq "MSWin32")? "NUL" :"/dev/null"; +#my $dbgfile = ($^O eq "MSWin32") ? "$ENV{TEMP}.$$" : "/tmp/trace.$$"; +#open TRACE, ">>", ($debug==0)? $sink : $dbgfile; # pick up the prefix for substitutions in this repo -my $PREFIX = `git config --local --get nethack.substprefix`; -chomp($PREFIX); +#my $PREFIX = `git config --local --get nethack.substprefix`; +#chomp($PREFIX); +sub git_config { + my($section, $var) = @_; + local($_); + open(CONFIG, "<", "$ENV{GIT_DIR}/config") or die "Missing .git/config: $!"; + while(){ + m/^\[$section]/ && do { + while(){ + m/^\s+$var\s+=\s+(.*)/ && do { + return $1; + }; + } + }; + } + die "Missing config var: [$section] $var\n"; +} +my $PREFIX = &git_config('nethack','substprefix'); my $submode = 0; # ok to make non-cleaning changes to file my $mode; @@ -37,7 +39,7 @@ if($ARGV[0] eq "--clean"){ $mode = "c"; if(0 == 0+$ENV{NHMODE}){ $submode = 1; # do NOT add extra changes to the file - print TRACE "SKIPPING\n"; +# print TRACE "SKIPPING\n"; } } elsif($ARGV[0] eq "--smudge"){ $mode = "s"; @@ -51,27 +53,30 @@ if($ARGV[0] eq "--clean"){ #XXX #git check-attr -a $ARGV[1] -# process stdin to stdout +# Process stdin to stdout. +# For speed we read in the entire file then do the substitutions. -while(){ - print TRACE "IN: $_"; - # $1 - var and value (including trailing space but not $) - # $2 - var - # $4 - value or undef -# s/\$$PREFIX-(([A-Za-z][A-Za-z0-9_]*)(: ([^\N{DOLLAR SIGN}]+))?)\$/&handlevar($2,$4)/eg; - s/\$$PREFIX-(([A-Za-z][A-Za-z0-9_]*)(: ([^\x24]+))?)\$/&handlevar($2,$4)/eg; - if($debug2){ - chomp; - print "XX: |$_|\n"; - } else { - print; - } - print TRACE "OT: X${_}X\n"; +local($_) = ''; +my $len; +while(1){ + # On at least some systems we only get 64K. + my $len = sysread(STDIN, $_, 999999, length($_)); + last if($len == 0); + die "read failed: $!" unless defined($len); } +# $1 - var and value (including trailing space but not $) +# $2 - var +# $4 - value or undef +# s/\$$PREFIX-(([A-Za-z][A-Za-z0-9_]*)(: ([^\N{DOLLAR SIGN}]+))?)\$/&handlevar($2,$4)/eg; +s/\$$PREFIX-(([A-Za-z][A-Za-z0-9_]*)(: ([^\x24]+))?)\$/&handlevar($2,$4)/ego; + +die "write failed: $!" unless defined syswrite(STDOUT, $_); +exit 0; + sub handlevar { my($var, $val) = @_; - print "HIT '$var' '$val'\n" if($debug2); +# print "HIT '$var' '$val'\n" if($debug2); my $subname = "PREFIX::$var"; if(defined &$subname){ @@ -147,4 +152,3 @@ sub Revision { return $val; } -__END__ From 7754afd9fa5c28d11fa9db3fd9ad528fc8f28b43 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sun, 1 Mar 2015 10:16:00 +0200 Subject: [PATCH 047/132] Remove last mention of DUNGEON_OVERVIEW --- src/display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/display.c b/src/display.c index 23dcef3a0..0e8b042a6 100644 --- a/src/display.c +++ b/src/display.c @@ -168,7 +168,7 @@ magic_map_background(x, y, show) lev->glyph = glyph; if (show) show_glyph(x,y, glyph); - remember_topology(x,y); /* DUNGEON_OVERVIEW */ + remember_topology(x,y); } /* @@ -325,7 +325,7 @@ unmap_object(x, y) else \ map_background(x,y,show); \ \ - remember_topology(x,y); /* DUNGEON_OVERVIEW */ \ + remember_topology(x,y); \ } void From 7cbd2fd592349f7ada742c8b708d3daffe76e4e2 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sun, 1 Mar 2015 10:26:24 +0200 Subject: [PATCH 048/132] Remove last mention of EXP_ON_BOTL --- dat/opthelp | 3 +-- win/Qt/qt_win.cpp | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/dat/opthelp b/dat/opthelp index f6759e04d..836e33d87 100644 --- a/dat/opthelp +++ b/dat/opthelp @@ -30,6 +30,7 @@ pushweapon when wielding a new weapon, put your previously rawio allow the use of raw I/O [FALSE] rest_on_space count the space bar as a rest character [FALSE] safe_pet prevent you from (knowingly) attacking your pet(s) [TRUE] +showexp display your accumulated experience points [FALSE] showrace show yourself by your race rather than by role [FALSE] silent don't use your terminal's bell sound [TRUE] sortpack group similar kinds of objects in inventory [TRUE] @@ -61,8 +62,6 @@ news print any news from game administrator on startup [TRUE] Boolean option if MFLOPPY was set at compile time: checkspace check free disk space before writing files to disk [TRUE] -Boolean option if EXP_ON_BOTL was set at compile time: -showexp display your accumulated experience points [FALSE] Boolean option if SCORE_ON_BOTL was set at compile time: showscore display your approximate accumulated score [FALSE] diff --git a/win/Qt/qt_win.cpp b/win/Qt/qt_win.cpp index 16ff7873b..110f34756 100644 --- a/win/Qt/qt_win.cpp +++ b/win/Qt/qt_win.cpp @@ -2567,11 +2567,9 @@ void NetHackQtStatusWindow::updateStats() Sprintf(buf, "/%d", u.uenmax); power.setLabel("Pow:",u.uen,buf); ac.setLabel("AC:",(long)u.uac); -#ifdef EXP_ON_BOTL if (::flags.showexp) { exp.setLabel("Exp:",(long)u.uexp); } else -#endif { exp.setLabel(""); } From 6c4c53bfd23691503d69307a5793500d3256eead Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sun, 1 Mar 2015 12:03:51 +0200 Subject: [PATCH 049/132] Remove mention of compile-time AUTOPICKUP_EXCEPTIONS --- doc/Guidebook.mn | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index cf8196b3a..f04f3b309 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -1882,8 +1882,7 @@ the character position in the current font to be used in displaying each entry. Such a sequence can be continued to multiple lines by putting a `\e' at the end of each line to be continued. .pg -If your copy of the game included the compile time AUTOPICKUP_EXCEPTIONS -option, then any line starting with ``AUTOPICKUP_EXCEPTION='' is taken +Any line starting with ``AUTOPICKUP_EXCEPTION='' is taken as defining an exception to the .op pickup_types option. @@ -2234,8 +2233,7 @@ or match an autopickup exception. Default is on. .lp pickup_types Specify the object types to be picked up when .op autopickup -is on. Default is all types. If your copy of the game has the -compile time option AUTOPICKUP_EXCEPTIONS included, you may be able to use +is on. Default is all types. You can use .op autopickup_exception configuration file lines to further refine .op autopickup @@ -2540,9 +2538,7 @@ Cannot be set with the `O' command. .hn 2 Configuring autopickup exceptions .pg -There is a compile time option called AUTOPICKUP_EXCEPTIONS. -If your copy of the game was built with that option defined, you can -further refine the behavior of the +You can further refine the behavior of the .op autopickup option beyond what is available through the .op pickup_types From d7c9abe0f8432fb77a17ed6f451835d542d16d79 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sun, 1 Mar 2015 14:33:03 +0200 Subject: [PATCH 050/132] Remove useless dungeon.def mangling --- util/makedefs.c | 51 +------------------------------------------------ 1 file changed, 1 insertion(+), 50 deletions(-) diff --git a/util/makedefs.c b/util/makedefs.c index ad37677bc..b8a40199f 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -169,8 +169,6 @@ static char *FDECL(bannerc_string, (char *,const char *)); static char *FDECL(xcrypt, (const char *)); static unsigned long FDECL(read_rumors_file, (const char *,int *,long *,unsigned long)); -static int FDECL(check_control, (char *)); -static char *FDECL(without_control, (char *)); static boolean FDECL(d_filter, (char *)); static boolean FDECL(h_filter, (char *)); static boolean FDECL(ranged_attk,(struct permonst*)); @@ -1788,38 +1786,6 @@ dead_data: perror(in_line); /* report the problem */ return; } - -static struct deflist { - - const char *defname; - boolean true_or_false; -} deflist[] = { - { "REINCARNATION", TRUE }, - { 0, 0 } -}; - -static int -check_control(s) - char *s; -{ - int i; - - if(s[0] != '%') return(-1); - - for(i = 0; deflist[i].defname; i++) - if(!strncmp(deflist[i].defname, s+1, strlen(deflist[i].defname))) - return(i); - - return(-1); -} - -static char * -without_control(s) - char *s; -{ - return(s + 1 + strlen(deflist[check_control(in_line)].defname)); -} - void do_dungeon() { @@ -1850,22 +1816,7 @@ do_dungeon() rcnt++; if(in_line[0] == '#') continue; /* discard comments */ -recheck: - if(in_line[0] == '%') { - int i = check_control(in_line); - if(i >= 0) { - if(!deflist[i].true_or_false) { - while (fgets(in_line, sizeof in_line, ifp) != 0) - if(check_control(in_line) != i) goto recheck; - } else - (void) fputs(without_control(in_line),ofp); - } else { - Fprintf(stderr, "Unknown control option '%s' in file %s at line %d.\n", - in_line, DGN_I_FILE, rcnt); - exit(EXIT_FAILURE); - } - } else - (void) fputs(in_line,ofp); + (void) fputs(in_line,ofp); } Fclose(ifp); Fclose(ofp); From a609bda9964ecf6ce99bb4fb093e9324c53a3286 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 1 Mar 2015 09:28:09 -0500 Subject: [PATCH 051/132] catch up fixes with some recent changes; also add 'community patch' section --- doc/fixes35.0 | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 6721eb0bb..3cc0e61dd 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -987,7 +987,6 @@ allow digging an adjacent pit with wand of digging while trapped in a pit #terrain command to show unobstructed view of map (w/o mons, objs, traps) digging can activate or disarm some types of traps some monsters can eat tins in addition to corpses to cure some ailments -add Roderick Schertler's pickup_thrown patch add ability to sort the list when viewing known spells with '+' command describe magic cancellation from worn armor in enlightment/end-of-game feedback disclose half physical and/or spell damage in enlightment/end-of-game feedback @@ -1001,7 +1000,6 @@ new config file keyword: SYMBOLS for overriding character symbol values by name opening magic frees from bear traps and webs, activates trap doors closing magic activates bear traps and webs locking converts a hole into a trap door; striking does the opposite -add Malcolm Ryan's Statue Glyphs patch lembas and cram never rot unless cursed multiple squeaks for squeaky boards include time, user ID, and play mode in paniclog entries @@ -1045,15 +1043,6 @@ chatting to a gecko or shopkeeper while hallucinating gives alternate message mimic posing as door might steal hero's key when [un]locking is attempted polymorphing into a dragon while wearing dragon scale mail will cause that mail to revert to dragon scales -adopt/adapt/improve the Paranoid_Quit patch; default is paranoid_confirm:pray - paranoid_confirm:Confirm when requiring "yes" instead of y to confirm, - also require explicit "no" to reject - paranoid_confirm:quit yes vs y to quit or to enter explore mode - paranoid_confirm:die yes vs y to die in explore or wizard mode - paranoid_confirm:bones yes vs y to save bones when dying in wizard mode - paranoid_confirm:attack yes vs y to attack a peaceful monster - paranoid_confirm:pray y to confirm #pray; supersedes prayconfirm - paranoid_confirm:Remove always pick from inventory for 'R' and 'T' flexibility for specifying "detect " vs " detection" when wishing when a sokoban puzzle has been completed (last pit or hole filled in), stop assessing luck penalties and lift most movement restrictions @@ -1088,6 +1077,22 @@ smartphone: fixed F command to prompt for direction unix,vms: altmeta option to handle terminals which send "ESC c" for Alt+c +NetHack Community Patches (or Variation) Included +------------------------------------------------- +Roderick Schertler's pickup_thrown patch +Malcolm Ryan's Statue Glyphs patch +adopt/adapt/improve the Paranoid_Quit patch; default is paranoid_confirm:pray + paranoid_confirm:Confirm when requiring "yes" instead of y to confirm, + also require explicit "no" to reject + paranoid_confirm:quit yes vs y to quit or to enter explore mode + paranoid_confirm:die yes vs y to die in explore or wizard mode + paranoid_confirm:bones yes vs y to save bones when dying in wizard mode + paranoid_confirm:attack yes vs y to attack a peaceful monster + paranoid_confirm:pray y to confirm #pray; supersedes prayconfirm + paranoid_confirm:Remove always pick from inventory for 'R' and 'T' +adopt/adapt/improve Dungeon Overview + + Code Cleanup and Reorganization ------------------------------- removed OVLx section dividers previously used for TRAMPOLINE overlay system @@ -1106,3 +1111,17 @@ drawing symbols for DECGraphics, IBMGraphics, MACgraphics are now stored in an new hints-based configuration system allow documentation to be specialized to the options in the game binary add param to winsys ini routines to allow cleaner shifting during startup +make STEED unconditional +make EXP_ON_BOTL unconditional +make REDO unconditional +make AUTOPICKUP_EXCEPTIONS unconditional +make SEDUCE compile-time unconditional but still removable through SYSCF +clean up some DEBUG conditional code +make GOLDOBJ unconditional +make WIZARD unconditional +make SINKS +make REINCARNATION +make TOURIST unconditional +make KOPS unconditional +make ELBERETH unconditional + From 774e6c2f6f36f5d059cd3f53a642bf8da57a83fc Mon Sep 17 00:00:00 2001 From: keni Date: Sun, 1 Mar 2015 20:26:29 -0500 Subject: [PATCH 052/132] Switch NHtext from "git branch" to "git symbolic-ref" to avoid corner cases. --- DEVEL/hooksdir/NHtext | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/DEVEL/hooksdir/NHtext b/DEVEL/hooksdir/NHtext index 03550e513..861b9e6b1 100755 --- a/DEVEL/hooksdir/NHtext +++ b/DEVEL/hooksdir/NHtext @@ -12,9 +12,6 @@ use strict; #my $dbgfile = ($^O eq "MSWin32") ? "$ENV{TEMP}.$$" : "/tmp/trace.$$"; #open TRACE, ">>", ($debug==0)? $sink : $dbgfile; -# pick up the prefix for substitutions in this repo -#my $PREFIX = `git config --local --get nethack.substprefix`; -#chomp($PREFIX); sub git_config { my($section, $var) = @_; local($_); @@ -30,6 +27,7 @@ sub git_config { } die "Missing config var: [$section] $var\n"; } +# pick up the prefix for substitutions in this repo my $PREFIX = &git_config('nethack','substprefix'); my $submode = 0; # ok to make non-cleaning changes to file @@ -119,16 +117,17 @@ sub Date { #sub Author { #} -# NB: the standard-ish Revision line isn't enough - you need Branch/Revision - +# NB: the standard-ish Revision line isn't enough - you need Branch:Revision - # but we split it into 2 so we can use the standard processing code on Revision # and just slip Branch in. sub Branch { my($val, $mode, $submode) = @_; if($mode eq "c"){ if($submode==0){ - $val = `git branch --no-color --contains`; + $val = `git symbolic-ref -q --short HEAD`; $val =~ s/[\n\r]*$//; $val =~ s/^\*\s*//; + $val = "(unknown)" unless($val =~ m/^[[:print:]]+$/); } } # if($mode eq "s"){ From 6fd30ab1ce94ec47a34f446b92f38587f055216c Mon Sep 17 00:00:00 2001 From: keni Date: Sun, 1 Mar 2015 20:32:28 -0500 Subject: [PATCH 053/132] Manually fix botched NHDT-Branch expansions. --- include/config.h | 2 +- include/decl.h | 2 +- include/extern.h | 2 +- include/flag.h | 2 +- include/wceconf.h | 2 +- src/botl.c | 2 +- src/files.c | 2 +- src/options.c | 2 +- src/pickup.c | 2 +- src/save.c | 2 +- sys/wince/mhstatus.c | 2 +- util/makedefs.c | 2 +- win/X11/winstat.c | 2 +- win/gnome/gnstatus.c | 2 +- win/share/tilemap.c | 2 +- win/tty/topl.c | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/include/config.h b/include/config.h index c13b2dd01..d8b067fc7 100644 --- a/include/config.h +++ b/include/config.h @@ -1,4 +1,4 @@ -/* NetHack 3.5 config.h $NHDT-Date: 1425083082 2015/02/28 00:24:42 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.51 $ */ +/* NetHack 3.5 config.h $NHDT-Date: 1425083082 2015/02/28 00:24:42 $ $NHDT-Branch: master $:$NHDT-Revision: 1.51 $ */ /* NetHack 3.5 config.h $Date: 2012/01/27 20:15:26 $ $Revision: 1.37 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/decl.h b/include/decl.h index f9d4a7b7c..4591226e4 100644 --- a/include/decl.h +++ b/include/decl.h @@ -1,4 +1,4 @@ -/* NetHack 3.5 decl.h $NHDT-Date: 1425081976 2015/02/28 00:06:16 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.50 $ */ +/* NetHack 3.5 decl.h $NHDT-Date: 1425081976 2015/02/28 00:06:16 $ $NHDT-Branch: master $:$NHDT-Revision: 1.50 $ */ /* NetHack 3.5 decl.h $Date: 2011/12/29 20:06:27 $ $Revision: 1.44 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/extern.h b/include/extern.h index 39a42641c..cdeee5478 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1,4 +1,4 @@ -/* NetHack 3.5 extern.h $NHDT-Date: 1425081976 2015/02/28 00:06:16 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.390 $ */ +/* NetHack 3.5 extern.h $NHDT-Date: 1425081976 2015/02/28 00:06:16 $ $NHDT-Branch: master $:$NHDT-Revision: 1.390 $ */ /* NetHack 3.5 extern.h $Date: 2013/11/05 00:57:53 $ $Revision: 1.380 $ */ /* Copyright (c) Steve Creps, 1988. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/flag.h b/include/flag.h index de2b63e84..a34abe839 100644 --- a/include/flag.h +++ b/include/flag.h @@ -1,4 +1,4 @@ -/* NetHack 3.5 flag.h $NHDT-Date: 1425081976 2015/02/28 00:06:16 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.60 $ */ +/* NetHack 3.5 flag.h $NHDT-Date: 1425081976 2015/02/28 00:06:16 $ $NHDT-Branch: master $:$NHDT-Revision: 1.60 $ */ /* NetHack 3.5 flag.h $Date: 2012/04/09 02:56:32 $ $Revision: 1.59 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/wceconf.h b/include/wceconf.h index 52ad4d1f1..d2d11d404 100644 --- a/include/wceconf.h +++ b/include/wceconf.h @@ -1,4 +1,4 @@ -/* NetHack 3.5 wceconf.h $NHDT-Date: 1425081976 2015/02/28 00:06:16 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.12 $ */ +/* NetHack 3.5 wceconf.h $NHDT-Date: 1425081976 2015/02/28 00:06:16 $ $NHDT-Branch: master $:$NHDT-Revision: 1.12 $ */ /* NetHack 3.5 wceconf.h $Date: 2009/10/22 02:59:14 $ $Revision: 1.12 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/botl.c b/src/botl.c index 76d16a8ff..6006df8ce 100644 --- a/src/botl.c +++ b/src/botl.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 botl.c $NHDT-Date: 1425083082 2015/02/28 00:24:42 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.38 $ */ +/* NetHack 3.5 botl.c $NHDT-Date: 1425083082 2015/02/28 00:24:42 $ $NHDT-Branch: master $:$NHDT-Revision: 1.38 $ */ /* NetHack 3.5 botl.c $Date: 2012/01/10 17:47:19 $ $Revision: 1.36 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/files.c b/src/files.c index 7ba180547..71fd0c217 100644 --- a/src/files.c +++ b/src/files.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 files.c $NHDT-Date: 1425081976 2015/02/28 00:06:16 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.127 $ */ +/* NetHack 3.5 files.c $NHDT-Date: 1425081976 2015/02/28 00:06:16 $ $NHDT-Branch: master $:$NHDT-Revision: 1.127 $ */ /* NetHack 3.5 files.c $Date: 2012/03/10 02:49:08 $ $Revision: 1.124 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/options.c b/src/options.c index 1c63c5ed5..54ad99efc 100644 --- a/src/options.c +++ b/src/options.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 options.c $NHDT-Date: 1425083082 2015/02/28 00:24:42 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.158 $ */ +/* NetHack 3.5 options.c $NHDT-Date: 1425083082 2015/02/28 00:24:42 $ $NHDT-Branch: master $:$NHDT-Revision: 1.158 $ */ /* NetHack 3.5 options.c $Date: 2012/04/09 02:56:30 $ $Revision: 1.153 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/pickup.c b/src/pickup.c index fea45dce3..d044cf46f 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 pickup.c $NHDT-Date: 1425081977 2015/02/28 00:06:17 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.126 $ */ +/* NetHack 3.5 pickup.c $NHDT-Date: 1425081977 2015/02/28 00:06:17 $ $NHDT-Branch: master $:$NHDT-Revision: 1.126 $ */ /* NetHack 3.5 pickup.c $Date: 2012/02/16 03:01:38 $ $Revision: 1.123 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/save.c b/src/save.c index d7828655a..b220f945d 100644 --- a/src/save.c +++ b/src/save.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 save.c $NHDT-Date: 1425081977 2015/02/28 00:06:17 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.59 $ */ +/* NetHack 3.5 save.c $NHDT-Date: 1425081977 2015/02/28 00:06:17 $ $NHDT-Branch: master $:$NHDT-Revision: 1.59 $ */ /* NetHack 3.5 save.c $Date: 2012/02/16 02:40:24 $ $Revision: 1.53 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhstatus.c b/sys/wince/mhstatus.c index 397f2dcb8..a9a6b2855 100644 --- a/sys/wince/mhstatus.c +++ b/sys/wince/mhstatus.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 mhstatus.c $NHDT-Date: 1425083082 2015/02/28 00:24:42 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.8 $ */ +/* NetHack 3.5 mhstatus.c $NHDT-Date: 1425083082 2015/02/28 00:24:42 $ $NHDT-Branch: master $:$NHDT-Revision: 1.8 $ */ /* NetHack 3.5 mhstatus.c $Date: 2009/05/06 10:52:28 $ $Revision: 1.7 $ */ /* SCCS Id: @(#)mhstatus.c 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ diff --git a/util/makedefs.c b/util/makedefs.c index b8a40199f..f4ca9febb 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 makedefs.c $NHDT-Date: 1425083082 2015/02/28 00:24:42 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.63 $ */ +/* NetHack 3.5 makedefs.c $NHDT-Date: 1425083082 2015/02/28 00:24:42 $ $NHDT-Branch: master $:$NHDT-Revision: 1.63 $ */ /* NetHack 3.5 makedefs.c $Date: 2012/01/15 09:27:03 $ $Revision: 1.50 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) M. Stephenson, 1990, 1991. */ diff --git a/win/X11/winstat.c b/win/X11/winstat.c index ae2a3ce83..3267e26be 100644 --- a/win/X11/winstat.c +++ b/win/X11/winstat.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 winstat.c $NHDT-Date: 1425083083 2015/02/28 00:24:43 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.5 $ */ +/* NetHack 3.5 winstat.c $NHDT-Date: 1425083083 2015/02/28 00:24:43 $ $NHDT-Branch: master $:$NHDT-Revision: 1.5 $ */ /* NetHack 3.5 winstat.c $Date: 2009/05/06 10:55:59 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)winstat.c 3.5 1996/04/05 */ /* Copyright (c) Dean Luick, 1992 */ diff --git a/win/gnome/gnstatus.c b/win/gnome/gnstatus.c index 5109f5bb7..2f1cea075 100644 --- a/win/gnome/gnstatus.c +++ b/win/gnome/gnstatus.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 gnstatus.c $NHDT-Date: 1425083083 2015/02/28 00:24:43 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.6 $ */ +/* NetHack 3.5 gnstatus.c $NHDT-Date: 1425083083 2015/02/28 00:24:43 $ $NHDT-Branch: master $:$NHDT-Revision: 1.6 $ */ /* NetHack 3.5 gnstatus.c $Date: 2009/05/06 10:57:54 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)gnstatus.c 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ diff --git a/win/share/tilemap.c b/win/share/tilemap.c index 06c966113..bb8273f47 100644 --- a/win/share/tilemap.c +++ b/win/share/tilemap.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 tilemap.c $NHDT-Date: 1425082379 2015/02/28 00:12:59 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.12 $ */ +/* NetHack 3.5 tilemap.c $NHDT-Date: 1425082379 2015/02/28 00:12:59 $ $NHDT-Branch: master $:$NHDT-Revision: 1.12 $ */ /* NetHack 3.5 tilemap.c $Date: 2009/05/06 10:59:02 $ $Revision: 1.7 $ */ /* SCCS Id: @(#)tilemap.c 3.5 2000/06/04 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/tty/topl.c b/win/tty/topl.c index db307b73a..cc4df15d5 100644 --- a/win/tty/topl.c +++ b/win/tty/topl.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 topl.c $NHDT-Date: 1425081315 2015/02/27 23:55:15 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.24 $ */ +/* NetHack 3.5 topl.c $NHDT-Date: 1425081315 2015/02/27 23:55:15 $ $NHDT-Branch: master $:$NHDT-Revision: 1.24 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ From 5ffd5a3000c6d90c26402ac2a79f588bb35b8a6a Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Mon, 23 Feb 2015 14:59:24 -0500 Subject: [PATCH 054/132] Factor out a new `is_moat` function. The fact that Juiblex's swamp is MOAT but not moat is weird and should probably be looked at at some point. --- include/extern.h | 1 + src/dbridge.c | 23 ++++++++++++++++++++--- src/dig.c | 19 +++++++++---------- src/zap.c | 7 ++++--- 4 files changed, 34 insertions(+), 16 deletions(-) diff --git a/include/extern.h b/include/extern.h index cdeee5478..0f7fb0d3f 100644 --- a/include/extern.h +++ b/include/extern.h @@ -219,6 +219,7 @@ E boolean FDECL(is_pool, (int,int)); E boolean FDECL(is_lava, (int,int)); E boolean FDECL(is_pool_or_lava, (int,int)); E boolean FDECL(is_ice, (int,int)); +E boolean FDECL(is_moat, (int,int)); E int FDECL(is_drawbridge_wall, (int,int)); E boolean FDECL(is_db_wall, (int,int)); E boolean FDECL(find_drawbridge, (int *,int*)); diff --git a/src/dbridge.c b/src/dbridge.c index 316b2707f..a82805377 100644 --- a/src/dbridge.c +++ b/src/dbridge.c @@ -42,9 +42,11 @@ int x,y; if (!isok(x,y)) return FALSE; ltyp = levl[x][y].typ; - if (ltyp == POOL || ltyp == MOAT || ltyp == WATER) return TRUE; - if (ltyp == DRAWBRIDGE_UP && - (levl[x][y].drawbridgemask & DB_UNDER) == DB_MOAT) return TRUE; + /* The ltyp == MOAT is not redundant with is_moat, because the + * Juiblex level does not have moats, although it has MOATs. There + * is probably a better way to express this. */ + if (ltyp == POOL || ltyp == MOAT || ltyp == WATER || is_moat(x, y)) + return TRUE; return FALSE; } @@ -86,6 +88,21 @@ int x,y; return FALSE; } +boolean +is_moat(x,y) +int x, y; +{ + schar ltyp; + + if (!isok(x, y)) return FALSE; + ltyp = levl[x][y].typ; + if (!Is_juiblex_level(&u.uz) && + (ltyp == MOAT || (ltyp == DRAWBRIDGE_UP && + (levl[x][y].drawbridgemask & DB_UNDER) == DB_MOAT))) + return TRUE; + return FALSE; +} + /* * We want to know whether a wall (or a door) is the portcullis (passageway) * of an eventual drawbridge. diff --git a/src/dig.c b/src/dig.c index 00a60aaba..39791dde0 100644 --- a/src/dig.c +++ b/src/dig.c @@ -486,16 +486,15 @@ boolean fill_if_any; /* force filling if it exists at all */ for (x1 = lo_x; x1 <= hi_x; x1++) for (y1 = lo_y; y1 <= hi_y; y1++) - if (levl[x1][y1].typ == POOL) - pool_cnt++; - else if (levl[x1][y1].typ == MOAT || - (levl[x1][y1].typ == DRAWBRIDGE_UP && - (levl[x1][y1].drawbridgemask & DB_UNDER) == DB_MOAT)) - moat_cnt++; - else if (levl[x1][y1].typ == LAVAPOOL || - (levl[x1][y1].typ == DRAWBRIDGE_UP && - (levl[x1][y1].drawbridgemask & DB_UNDER) == DB_LAVA)) - lava_cnt++; + if (is_moat(x1, y1)) + moat_cnt++; + else if (is_pool(x1, y1)) + /* This must come after is_moat since moats are pools + * but not vice-versa. */ + pool_cnt++; + else if (is_lava(x1, y1)) + lava_cnt++; + if (!fill_if_any) pool_cnt /= 3; /* not as much liquid as the others */ if ((lava_cnt > moat_cnt + pool_cnt && rn2(lava_cnt + 1)) || diff --git a/src/zap.c b/src/zap.c index dfdf95d4c..03cbc6c52 100644 --- a/src/zap.c +++ b/src/zap.c @@ -4017,7 +4017,7 @@ short exploding_wand_typ; case ZT_COLD: if (is_pool(x,y) || is_lava(x,y)) { boolean lava = is_lava(x,y); - const char *moat = waterbody_name(x, y); + boolean moat = is_moat(x,y); if (lev->typ == WATER) { /* For now, don't let WATER freeze. */ @@ -4041,8 +4041,9 @@ short exploding_wand_typ; if (see_it) { if(lava) Norep("The lava cools and solidifies."); - else if(strcmp(moat, "moat") == 0) - Norep("The %s is bridged with ice!", moat); + else if(moat) + Norep("The %s is bridged with ice!", + waterbody_name(x,y)); else Norep("The water freezes."); newsym(x,y); From 9c4b0113aa7f2472fc87b0ae19b7d235396df9cf Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Mon, 23 Feb 2015 15:08:30 -0500 Subject: [PATCH 055/132] Remove the `victim` argument to `rust_dmg()`. The argument can be calculated from `otmp`. --- include/extern.h | 2 +- src/dokick.c | 2 +- src/mhitu.c | 14 +++++++------- src/sit.c | 4 ++-- src/trap.c | 33 +++++++++++++++++---------------- src/uhitm.c | 22 +++++++++++----------- 6 files changed, 39 insertions(+), 38 deletions(-) diff --git a/include/extern.h b/include/extern.h index 0f7fb0d3f..120f7d506 100644 --- a/include/extern.h +++ b/include/extern.h @@ -2203,7 +2203,7 @@ E coord *FDECL(gettrack, (int,int)); /* ### trap.c ### */ E boolean FDECL(burnarmor,(struct monst *)); -E boolean FDECL(rust_dmg, (struct obj *,const char *,int,BOOLEAN_P,struct monst *)); +E boolean FDECL(rust_dmg, (struct obj *,const char *,int,BOOLEAN_P)); E void FDECL(grease_protect, (struct obj *,const char *,struct monst *)); E struct trap *FDECL(maketrap, (int,int,int)); E void FDECL(fall_through, (BOOLEAN_P)); diff --git a/src/dokick.c b/src/dokick.c index b17379e07..06ff075e6 100644 --- a/src/dokick.c +++ b/src/dokick.c @@ -983,7 +983,7 @@ dokick() if(!rn2(3)) goto ouch; /* make metal boots rust */ if(uarmf && rn2(3)) - if (!rust_dmg(uarmf, "metal boots", 1, FALSE, &youmonst)) { + if (!rust_dmg(uarmf, "metal boots", 1, FALSE)) { Your("boots get wet."); /* could cause short-lived fumbling here */ } diff --git a/src/mhitu.c b/src/mhitu.c index 6f298ff63..416edaa5b 100644 --- a/src/mhitu.c +++ b/src/mhitu.c @@ -740,12 +740,12 @@ int attk; while (1) { switch(rn2(5)) { case 0: - if (!uarmh || !rust_dmg(uarmh, xname(uarmh), hurt, FALSE, &youmonst)) + if (!uarmh || !rust_dmg(uarmh, xname(uarmh), hurt, FALSE)) continue; break; case 1: if (uarmc) { - (void)rust_dmg(uarmc, xname(uarmc), hurt, TRUE, &youmonst); + (void)rust_dmg(uarmc, xname(uarmc), hurt, TRUE); break; } /* Note the difference between break and continue; @@ -754,20 +754,20 @@ int attk; * something else did. */ if (uarm) - (void)rust_dmg(uarm, xname(uarm), hurt, TRUE, &youmonst); + (void)rust_dmg(uarm, xname(uarm), hurt, TRUE); else if (uarmu) - (void)rust_dmg(uarmu, xname(uarmu), hurt, TRUE, &youmonst); + (void)rust_dmg(uarmu, xname(uarmu), hurt, TRUE); break; case 2: - if (!uarms || !rust_dmg(uarms, xname(uarms), hurt, FALSE, &youmonst)) + if (!uarms || !rust_dmg(uarms, xname(uarms), hurt, FALSE)) continue; break; case 3: - if (!uarmg || !rust_dmg(uarmg, xname(uarmg), hurt, FALSE, &youmonst)) + if (!uarmg || !rust_dmg(uarmg, xname(uarmg), hurt, FALSE)) continue; break; case 4: - if (!uarmf || !rust_dmg(uarmf, xname(uarmf), hurt, FALSE, &youmonst)) + if (!uarmf || !rust_dmg(uarmf, xname(uarmf), hurt, FALSE)) continue; break; } diff --git a/src/sit.c b/src/sit.c index aa3a16605..e5e77aa42 100644 --- a/src/sit.c +++ b/src/sit.c @@ -113,9 +113,9 @@ dosit() in_water: You("sit in the water."); if (!rn2(10) && uarm) - (void) rust_dmg(uarm, "armor", 1, TRUE, &youmonst); + (void) rust_dmg(uarm, "armor", 1, TRUE); if (!rn2(10) && uarmf && uarmf->otyp != WATER_WALKING_BOOTS) - (void) rust_dmg(uarm, "armor", 1, TRUE, &youmonst); + (void) rust_dmg(uarm, "armor", 1, TRUE); } else if(IS_SINK(typ)) { You(sit_message, defsyms[S_sink].explanation); Your("%s gets wet.", humanoid(youmonst.data) ? "rump" : "underside"); diff --git a/src/trap.c b/src/trap.c index 636598789..d819724a5 100644 --- a/src/trap.c +++ b/src/trap.c @@ -55,7 +55,7 @@ struct monst *victim; int mat_idx; if (!victim) return 0; -#define burn_dmg(obj,descr) rust_dmg(obj, descr, 0, FALSE, victim) +#define burn_dmg(obj,descr) rust_dmg(obj, descr, 0, FALSE) while (1) { switch (rn2(5)) { case 0: @@ -107,20 +107,21 @@ struct monst *victim; * returned only for rustable items. */ boolean -rust_dmg(otmp, ostr, type, print, victim) +rust_dmg(otmp, ostr, type, print) register struct obj *otmp; register const char *ostr; int type; boolean print; -struct monst *victim; { static NEARDATA const char * const action[] = { "smoulder", "rust", "rot", "corrode" }; static NEARDATA const char * const msg[] = { "burnt", "rusted", "rotten", "corroded" }; boolean vulnerable = FALSE; boolean grprot = FALSE; boolean is_primary = TRUE; - boolean vismon = (victim != &youmonst) && canseemon(victim); int erosion; + struct monst *victim = + carried(otmp) ? &youmonst : mcarried(otmp) ? otmp->ocarry : NULL; + boolean vismon = (victim != &youmonst) && canseemon(victim); if (!otmp) return(FALSE); switch(type) { @@ -920,17 +921,17 @@ unsigned trflags; pline("%s you on the %s!", A_gush_of_water_hits, body_part(HEAD)); (void) rust_dmg(uarmh, helm_simple_name(uarmh), - 1, TRUE, &youmonst); + 1, TRUE); break; case 1: pline("%s your left %s!", A_gush_of_water_hits, body_part(ARM)); - if (rust_dmg(uarms, "shield", 1, TRUE, &youmonst)) + if (rust_dmg(uarms, "shield", 1, TRUE)) break; if (u.twoweap || (uwep && bimanual(uwep))) (void) erode_obj(u.twoweap ? uswapwep : uwep, 1, TRUE, FALSE); -glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst); +glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE); /* Not "metal gauntlets" since it gets called * even if it's leather for the message */ @@ -948,11 +949,11 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst); (void) snuff_lit(otmp); if (uarmc) (void) rust_dmg(uarmc, cloak_simple_name(uarmc), - 1, TRUE, &youmonst); + 1, TRUE); else if (uarm) - (void) rust_dmg(uarm, "armor", 1, TRUE, &youmonst); + (void) rust_dmg(uarm, "armor", 1, TRUE); else if (uarmu) - (void) rust_dmg(uarmu, "shirt", 1, TRUE, &youmonst); + (void) rust_dmg(uarmu, "shirt", 1, TRUE); } update_inventory(); break; @@ -2051,20 +2052,20 @@ register struct monst *mtmp; mon_nam(mtmp), mbodypart(mtmp, HEAD)); target = which_armor(mtmp, W_ARMH); (void) rust_dmg(target, helm_simple_name(target), - 1, TRUE, mtmp); + 1, TRUE); break; case 1: if (in_sight) pline("%s %s's left %s!", A_gush_of_water_hits, mon_nam(mtmp), mbodypart(mtmp, ARM)); target = which_armor(mtmp, W_ARMS); - if (rust_dmg(target, "shield", 1, TRUE, mtmp)) + if (rust_dmg(target, "shield", 1, TRUE)) break; target = MON_WEP(mtmp); if (target && bimanual(target)) (void) erode_obj(target, 1, TRUE, FALSE); glovecheck: target = which_armor(mtmp, W_ARMG); - (void) rust_dmg(target, "gauntlets", 1, TRUE, mtmp); + (void) rust_dmg(target, "gauntlets", 1, TRUE); break; case 2: if (in_sight) @@ -2083,11 +2084,11 @@ glovecheck: target = which_armor(mtmp, W_ARMG); if ((target = which_armor(mtmp, W_ARMC)) != 0) (void) rust_dmg(target, cloak_simple_name(target), - 1, TRUE, mtmp); + 1, TRUE); else if ((target = which_armor(mtmp, W_ARM)) != 0) - (void) rust_dmg(target, "armor", 1, TRUE, mtmp); + (void) rust_dmg(target, "armor", 1, TRUE); else if ((target = which_armor(mtmp, W_ARMU)) != 0) - (void) rust_dmg(target, "shirt", 1, TRUE, mtmp); + (void) rust_dmg(target, "shirt", 1, TRUE); } if (mptr == &mons[PM_IRON_GOLEM]) { diff --git a/src/uhitm.c b/src/uhitm.c index bbb3a7fb4..1ccb8a2cb 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -56,34 +56,34 @@ int attk; switch(rn2(5)) { case 0: target = which_armor(mdef, W_ARMH); - if (!target || !rust_dmg(target, xname(target), hurt, FALSE, mdef)) + if (!target || !rust_dmg(target, xname(target), hurt, FALSE)) continue; break; case 1: target = which_armor(mdef, W_ARMC); if (target) { - (void)rust_dmg(target, xname(target), hurt, TRUE, mdef); + (void)rust_dmg(target, xname(target), hurt, TRUE); break; } if ((target = which_armor(mdef, W_ARM)) != (struct obj *)0) { - (void)rust_dmg(target, xname(target), hurt, TRUE, mdef); + (void)rust_dmg(target, xname(target), hurt, TRUE); } else if ((target = which_armor(mdef, W_ARMU)) != (struct obj *)0) { - (void)rust_dmg(target, xname(target), hurt, TRUE, mdef); + (void)rust_dmg(target, xname(target), hurt, TRUE); } break; case 2: target = which_armor(mdef, W_ARMS); - if (!target || !rust_dmg(target, xname(target), hurt, FALSE, mdef)) + if (!target || !rust_dmg(target, xname(target), hurt, FALSE)) continue; break; case 3: target = which_armor(mdef, W_ARMG); - if (!target || !rust_dmg(target, xname(target), hurt, FALSE, mdef)) + if (!target || !rust_dmg(target, xname(target), hurt, FALSE)) continue; break; case 4: target = which_armor(mdef, W_ARMF); - if (!target || !rust_dmg(target, xname(target), hurt, FALSE, mdef)) + if (!target || !rust_dmg(target, xname(target), hurt, FALSE)) continue; break; } @@ -2231,7 +2231,7 @@ boolean wep_was_destroyed; if(mhit && !mon->mcan) { if (aatyp == AT_KICK) { if (uarmf && !rn2(6)) - (void)rust_dmg(uarmf, xname(uarmf), 0, TRUE, &youmonst); + (void)rust_dmg(uarmf, xname(uarmf), 0, TRUE); } else if (aatyp == AT_WEAP || aatyp == AT_CLAW || aatyp == AT_MAGC || aatyp == AT_TUCH) passive_obj(mon, (struct obj*)0, &(ptr->mattk[i])); @@ -2251,7 +2251,7 @@ boolean wep_was_destroyed; if (mhit) { if (aatyp == AT_KICK) { if (uarmf && !rn2(6)) - (void)rust_dmg(uarmf, xname(uarmf), 3, TRUE, &youmonst); + (void)rust_dmg(uarmf, xname(uarmf), 3, TRUE); } else if (aatyp == AT_WEAP || aatyp == AT_CLAW || aatyp == AT_MAGC || aatyp == AT_TUCH) passive_obj(mon, (struct obj*)0, &(ptr->mattk[i])); @@ -2284,7 +2284,7 @@ boolean wep_was_destroyed; if(mhit && !mon->mcan) { if (aatyp == AT_KICK) { if (uarmf) - (void)rust_dmg(uarmf, xname(uarmf), 1, TRUE, &youmonst); + (void)rust_dmg(uarmf, xname(uarmf), 1, TRUE); } else if (aatyp == AT_WEAP || aatyp == AT_CLAW || aatyp == AT_MAGC || aatyp == AT_TUCH) passive_obj(mon, (struct obj*)0, &(ptr->mattk[i])); @@ -2294,7 +2294,7 @@ boolean wep_was_destroyed; if(mhit && !mon->mcan) { if (aatyp == AT_KICK) { if (uarmf) - (void)rust_dmg(uarmf, xname(uarmf), 3, TRUE, &youmonst); + (void)rust_dmg(uarmf, xname(uarmf), 3, TRUE); } else if (aatyp == AT_WEAP || aatyp == AT_CLAW || aatyp == AT_MAGC || aatyp == AT_TUCH) passive_obj(mon, (struct obj*)0, &(ptr->mattk[i])); From d588210a776c6bd7d28cfe6ce8ffb0cf87aeb7fb Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Mon, 2 Mar 2015 12:36:33 -0500 Subject: [PATCH 056/132] Cover a couple of corner cases with `rust_dmg()`. --- doc/fixes35.0 | 3 + include/extern.h | 2 +- include/obj.h | 6 ++ src/trap.c | 139 +++++++++++++++++++++++++++++------------------ 4 files changed, 96 insertions(+), 54 deletions(-) diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 3cc0e61dd..4fd81cff5 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -858,6 +858,9 @@ fix "object_is_local" panic when saving bones after hero is killed by explosion if lava burns up the player's water walking boots, the player falls in the messages for lava burning items up are always printed fix used-up magic trap trying to hit steed. +messages are now printed when objects on the ground are eroded +object erosion now always identifies rust/rot/fire/corrodeproof objects +grease protects from all types of erosion Platform- and/or Interface-Specific Fixes diff --git a/include/extern.h b/include/extern.h index 120f7d506..87427dd3a 100644 --- a/include/extern.h +++ b/include/extern.h @@ -2204,7 +2204,7 @@ E coord *FDECL(gettrack, (int,int)); E boolean FDECL(burnarmor,(struct monst *)); E boolean FDECL(rust_dmg, (struct obj *,const char *,int,BOOLEAN_P)); -E void FDECL(grease_protect, (struct obj *,const char *,struct monst *)); +E boolean FDECL(grease_protect, (struct obj *,const char *,struct monst *)); E struct trap *FDECL(maketrap, (int,int,int)); E void FDECL(fall_through, (BOOLEAN_P)); E struct monst *FDECL(animate_statue, (struct obj *,XCHAR_P,XCHAR_P,int,int *)); diff --git a/include/obj.h b/include/obj.h index dc522b338..12b1fce35 100644 --- a/include/obj.h +++ b/include/obj.h @@ -319,6 +319,12 @@ struct obj { #define CONTAINED_TOO 0x1 #define BURIED_TOO 0x2 +/* object erosion types */ +#define ERODE_BURN 0 +#define ERODE_RUST 1 +#define ERODE_ROT 2 +#define ERODE_CORRODE 3 + /* * Notes for adding new oextra structures: * diff --git a/src/trap.c b/src/trap.c index d819724a5..1220105f5 100644 --- a/src/trap.c +++ b/src/trap.c @@ -101,10 +101,9 @@ struct monst *victim; #undef burn_dmg } -/* Generic rust-armor function. Returns TRUE if a message was printed; - * "print", if set, means to print a message (and thus to return TRUE) even - * if the item could not be rusted; otherwise a message is printed and TRUE is - * returned only for rustable items. +/* Generic erode-item function. Returns TRUE if any change in state + * occurred. "print", if set, means to print a message even if no change + * occurs. */ boolean rust_dmg(otmp, ostr, type, print) @@ -119,69 +118,95 @@ boolean print; boolean grprot = FALSE; boolean is_primary = TRUE; int erosion; - struct monst *victim = - carried(otmp) ? &youmonst : mcarried(otmp) ? otmp->ocarry : NULL; - boolean vismon = (victim != &youmonst) && canseemon(victim); + struct monst *victim; + boolean vismon; + boolean visobj; if (!otmp) return(FALSE); + + victim = carried(otmp) ? &youmonst : mcarried(otmp) ? + otmp->ocarry : NULL; + vismon = victim && (victim != &youmonst) && canseemon(victim); + /* Is bhitpos correct here? Ugh. */ + visobj = !victim && cansee(bhitpos.x, bhitpos.y); + switch(type) { - case 0: vulnerable = is_flammable(otmp); - break; - case 1: vulnerable = is_rustprone(otmp); - grprot = TRUE; - break; - case 2: vulnerable = is_rottable(otmp); - is_primary = FALSE; - break; - case 3: vulnerable = is_corrodeable(otmp); - grprot = TRUE; - is_primary = FALSE; - break; + case ERODE_BURN: + vulnerable = is_flammable(otmp); + break; + case ERODE_RUST: + vulnerable = is_rustprone(otmp); + grprot = TRUE; + break; + case ERODE_ROT: + vulnerable = is_rottable(otmp); + is_primary = FALSE; + break; + case ERODE_CORRODE: + vulnerable = is_corrodeable(otmp); + grprot = TRUE; + is_primary = FALSE; + break; + default: + impossible("Invalid erosion type in rust_dmg"); + return FALSE; } erosion = is_primary ? otmp->oeroded : otmp->oeroded2; - if (!print && (!vulnerable || otmp->oerodeproof || erosion == MAX_ERODE)) - return FALSE; + if (!ostr) + ostr = cxname(otmp); - if (!vulnerable) { - if (flags.verbose) { + if (grprot && otmp->greased) { + return grease_protect(otmp, ostr, victim); + } else if (!vulnerable || (otmp->oerodeproof && otmp->rknown)) { + if (print && flags.verbose) { if (victim == &youmonst) Your("%s %s not affected.", ostr, vtense(ostr, "are")); else if (vismon) pline("%s's %s %s not affected.", Monnam(victim), ostr, vtense(ostr, "are")); } - } else if (erosion < MAX_ERODE) { - if (grprot && otmp->greased) { - grease_protect(otmp,ostr,victim); - } else if (otmp->oerodeproof || (otmp->blessed && !rnl(4))) { - if (flags.verbose) { - if (victim == &youmonst) - pline("Somehow, your %s %s not affected.", - ostr, vtense(ostr, "are")); - else if (vismon) - pline("Somehow, %s's %s %s not affected.", - mon_nam(victim), ostr, vtense(ostr, "are")); - } - } else { + return FALSE; + } else if (otmp->oerodeproof || otmp->blessed && !rnl(4)) { + if (flags.verbose && (print || otmp->oerodeproof)) { if (victim == &youmonst) - Your("%s %s%s!", ostr, - vtense(ostr, action[type]), - erosion+1 == MAX_ERODE ? " completely" : - erosion ? " further" : ""); + pline("Somehow, your %s %s not affected.", + ostr, vtense(ostr, "are")); else if (vismon) - pline("%s's %s %s%s!", Monnam(victim), ostr, - vtense(ostr, action[type]), - erosion+1 == MAX_ERODE ? " completely" : - erosion ? " further" : ""); - if (is_primary) - otmp->oeroded++; - else - otmp->oeroded2++; - update_inventory(); - } + pline("Somehow, %s's %s %s not affected.", + mon_nam(victim), ostr, vtense(ostr, "are")); + else if (visobj) + pline("Somehow, the %s %s not affected." ostr, + vtense(ostr, "are")); + } + /* We assume here that if the object is protected because it + * is blessed, it still shows some minor signs of wear, and + * the hero can distinguish this from an object that is + * actually proof against damage. */ + if (otmp->oerodeproof) + otmp->rknown = TRUE; + return FALSE; + } else if (erosion < MAX_ERODE) { + const char *adverb = (erosion + 1 == MAX_ERODE) ? + " complete" : erosion ? " further" : ""; + + if (victim == &youmonst) + Your("%s %s%s!", ostr, vtense(ostr, action[type]), adverb); + else if (vismon) + pline("%s's %s %s%s!", Monnam(victim), ostr, + vtense(ostr, action[type]), adverb); + else if (visobj) + pline("The %s %s%s!", ostr, vtense(ostr, action[type]), adverb); + + if (is_primary) + otmp->oeroded++; + else + otmp->oeroded2++; + + update_inventory(); + return TRUE; } else { - if (flags.verbose) { + if (flags.verbose && print) { if (victim == &youmonst) Your("%s %s completely %s.", ostr, vtense(ostr, Blind ? "feel" : "look"), @@ -190,12 +215,18 @@ boolean print; pline("%s's %s %s completely %s.", Monnam(victim), ostr, vtense(ostr, "look"), msg[type]); + else if (visobj) + pline("The %s %s completely %s.", ostr, + vtense(ostr, "look"), msg[type]); } + return FALSE; } - return(TRUE); } -void +/* Protect an item from erosion with grease. Returns TRUE if the grease + * wears off. + */ +boolean grease_protect(otmp,ostr,victim) register struct obj *otmp; register const char *ostr; @@ -219,7 +250,9 @@ struct monst *victim; pline_The("grease dissolves."); update_inventory(); } + return TRUE; } + return FALSE; } struct trap * From 7e0d552b068f56e0c6a1698ae24dee9dca8ec87f Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Mon, 23 Feb 2015 17:21:11 -0500 Subject: [PATCH 057/132] A lot more cleanup to rust and water. --- doc/fixes35.0 | 1 + include/extern.h | 8 +- src/do.c | 3 +- src/do_wear.c | 14 --- src/dokick.c | 2 +- src/fountain.c | 2 +- src/mhitm.c | 10 +- src/mhitu.c | 70 +----------- src/mon.c | 6 +- src/objnam.c | 2 +- src/sit.c | 4 +- src/trap.c | 279 ++++++++++++++++++++++++----------------------- src/uhitm.c | 43 +++----- src/worn.c | 25 ++++- src/zap.c | 4 +- 15 files changed, 206 insertions(+), 267 deletions(-) diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 4fd81cff5..48da8da36 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -861,6 +861,7 @@ fix used-up magic trap trying to hit steed. messages are now printed when objects on the ground are eroded object erosion now always identifies rust/rot/fire/corrodeproof objects grease protects from all types of erosion +all sources of erosion now affect objects the same way Platform- and/or Interface-Specific Fixes diff --git a/include/extern.h b/include/extern.h index 87427dd3a..87d3adee7 100644 --- a/include/extern.h +++ b/include/extern.h @@ -434,7 +434,6 @@ E int NDECL(doputon); E void NDECL(find_ac); E void NDECL(glibr); E struct obj *FDECL(some_armor,(struct monst *)); -E void FDECL(erode_armor, (struct monst *,BOOLEAN_P)); E struct obj *FDECL(stuck_ring, (struct obj *,int)); E struct obj *NDECL(unchanger); E void NDECL(reset_remarm); @@ -2203,7 +2202,7 @@ E coord *FDECL(gettrack, (int,int)); /* ### trap.c ### */ E boolean FDECL(burnarmor,(struct monst *)); -E boolean FDECL(rust_dmg, (struct obj *,const char *,int,BOOLEAN_P)); +E boolean FDECL(rust_dmg, (struct obj *,const char *,int,BOOLEAN_P,BOOLEAN_P)); E boolean FDECL(grease_protect, (struct obj *,const char *,struct monst *)); E struct trap *FDECL(maketrap, (int,int,int)); E void FDECL(fall_through, (BOOLEAN_P)); @@ -2223,7 +2222,8 @@ E void FDECL(fill_pit, (int,int)); E int FDECL(float_down, (long, long)); E void NDECL(climb_pit); E int FDECL(fire_damage, (struct obj *,BOOLEAN_P,BOOLEAN_P,XCHAR_P,XCHAR_P)); -E void FDECL(water_damage, (struct obj **,BOOLEAN_P,BOOLEAN_P)); +E int FDECL(water_damage, (struct obj *,const char*,BOOLEAN_P)); +E void FDECL(water_damage_chain, (struct obj *,BOOLEAN_P)); E boolean NDECL(drown); E void FDECL(drain_en, (int)); E int NDECL(dountrap); @@ -2253,7 +2253,7 @@ E void NDECL(u_init); /* ### uhitm.c ### */ -E void FDECL(hurtmarmor,(struct monst *,int)); +E void FDECL(erode_armor,(struct monst *,int)); E boolean FDECL(attack_checks, (struct monst *,struct obj *)); E void FDECL(check_caitiff, (struct monst *)); E int FDECL(find_roll_to_hit, (struct monst *,UCHAR_P,struct obj *,int *,int *)); diff --git a/src/do.c b/src/do.c index 981981293..319317bf5 100644 --- a/src/do.c +++ b/src/do.c @@ -201,8 +201,7 @@ const char *verb; map_background(x, y, 0); newsym(x, y); } - water_damage(&obj, FALSE, FALSE); - if (!obj) return TRUE; + return water_damage(obj, NULL, FALSE) == 3; } else if (u.ux == x && u.uy == y && (t = t_at(x,y)) != 0 && uteetering_at_seen_pit(t)) { if (Blind && !Deaf) diff --git a/src/do_wear.c b/src/do_wear.c index 414f5a522..9925ceaf0 100644 --- a/src/do_wear.c +++ b/src/do_wear.c @@ -1937,20 +1937,6 @@ struct monst *victim; return(otmph); } -/* erode some arbitrary armor worn by the victim */ -void -erode_armor(victim, acid_dmg) -struct monst *victim; -boolean acid_dmg; -{ - struct obj *otmph = some_armor(victim); - - if (otmph && (otmph != uarmf)) { - (void) erode_obj(otmph, acid_dmg ? 3 : 1, FALSE, FALSE); - if (carried(otmph)) update_inventory(); - } -} - /* used for praying to check and fix levitation trouble */ struct obj * stuck_ring(ring, otyp) diff --git a/src/dokick.c b/src/dokick.c index 06ff075e6..c399f6bbc 100644 --- a/src/dokick.c +++ b/src/dokick.c @@ -983,7 +983,7 @@ dokick() if(!rn2(3)) goto ouch; /* make metal boots rust */ if(uarmf && rn2(3)) - if (!rust_dmg(uarmf, "metal boots", 1, FALSE)) { + if (!water_damage(uarmf, "metal boots", TRUE)) { Your("boots get wet."); /* could cause short-lived fumbling here */ } diff --git a/src/fountain.c b/src/fountain.c index f167c09d4..cc8aeb7bf 100644 --- a/src/fountain.c +++ b/src/fountain.c @@ -136,7 +136,7 @@ genericptr_t poolcnt; levl[x][y].typ = POOL; /* No kelp! */ del_engr_at(x, y); - water_damage(&level.objects[x][y], FALSE, TRUE); + water_damage_chain(level.objects[x][y], TRUE); if ((mtmp = m_at(x, y)) != 0) (void) minliquid(mtmp); diff --git a/src/mhitm.c b/src/mhitm.c index 47a14915f..ae66279e7 100644 --- a/src/mhitm.c +++ b/src/mhitm.c @@ -883,7 +883,7 @@ mdamagem(magr, mdef, mattk) pline("%s is covered in acid!", Monnam(mdef)); pline("It burns %s!", mon_nam(mdef)); } - if (!rn2(30)) erode_armor(mdef, TRUE); + if (!rn2(30)) erode_armor(mdef, ERODE_CORRODE); if (!rn2(6)) (void) erode_obj(MON_WEP(mdef), 3, TRUE, FALSE); break; case AD_RUST: @@ -897,13 +897,13 @@ mdamagem(magr, mdef, mattk) return (MM_DEF_DIED | (grow_up(magr,mdef) ? 0 : MM_AGR_DIED)); } - hurtmarmor(mdef, AD_RUST); + erode_armor(mdef, ERODE_RUST); mdef->mstrategy &= ~STRAT_WAITFORU; tmp = 0; break; case AD_CORR: if (magr->mcan) break; - hurtmarmor(mdef, AD_CORR); + erode_armor(mdef, ERODE_CORRODE); mdef->mstrategy &= ~STRAT_WAITFORU; tmp = 0; break; @@ -919,7 +919,7 @@ mdamagem(magr, mdef, mattk) return (MM_DEF_DIED | (grow_up(magr,mdef) ? 0 : MM_AGR_DIED)); } - hurtmarmor(mdef, AD_DCAY); + erode_armor(mdef, ERODE_CORRODE); mdef->mstrategy &= ~STRAT_WAITFORU; tmp = 0; break; @@ -1361,7 +1361,7 @@ int mdead; tmp = 0; } } else tmp = 0; - if (!rn2(30)) erode_armor(magr, TRUE); + if (!rn2(30)) erode_armor(magr, ERODE_CORRODE); if (!rn2(6)) (void)erode_obj(MON_WEP(magr), 3, TRUE, FALSE); goto assess_dmg; case AD_ENCH: /* KMH -- remove enchantment (disenchanter) */ diff --git a/src/mhitu.c b/src/mhitu.c index 416edaa5b..cc9b6f1be 100644 --- a/src/mhitu.c +++ b/src/mhitu.c @@ -22,7 +22,6 @@ STATIC_DCL void FDECL(missmu,(struct monst *,BOOLEAN_P,struct attack *)); STATIC_DCL void FDECL(mswings,(struct monst *,struct obj *)); STATIC_DCL void FDECL(wildmiss, (struct monst *,struct attack *)); -STATIC_DCL void FDECL(hurtarmor,(int)); STATIC_DCL void FDECL(hitmsg,(struct monst *,struct attack *)); /* See comment in mhitm.c. If we use this a lot it probably should be */ @@ -714,67 +713,6 @@ mattacku(mtmp) return(0); } -/* - * helper function for some compilers that have trouble with hitmu - */ - -STATIC_OVL void -hurtarmor(attk) -int attk; -{ - int hurt; - - switch(attk) { - /* 0 is burning, which we should never be called with */ - case AD_RUST: hurt = 1; break; - case AD_CORR: hurt = 3; break; - default: hurt = 2; break; - } - - /* What the following code does: it keeps looping until it - * finds a target for the rust monster. - * Head, feet, etc... not covered by metal, or covered by - * rusty metal, are not targets. However, your body always - * is, no matter what covers it. - */ - while (1) { - switch(rn2(5)) { - case 0: - if (!uarmh || !rust_dmg(uarmh, xname(uarmh), hurt, FALSE)) - continue; - break; - case 1: - if (uarmc) { - (void)rust_dmg(uarmc, xname(uarmc), hurt, TRUE); - break; - } - /* Note the difference between break and continue; - * break means it was hit and didn't rust; continue - * means it wasn't a target and though it didn't rust - * something else did. - */ - if (uarm) - (void)rust_dmg(uarm, xname(uarm), hurt, TRUE); - else if (uarmu) - (void)rust_dmg(uarmu, xname(uarmu), hurt, TRUE); - break; - case 2: - if (!uarms || !rust_dmg(uarms, xname(uarms), hurt, FALSE)) - continue; - break; - case 3: - if (!uarmg || !rust_dmg(uarmg, xname(uarmg), hurt, FALSE)) - continue; - break; - case 4: - if (!uarmf || !rust_dmg(uarmf, xname(uarmf), hurt, FALSE)) - continue; - break; - } - break; /* Out of while loop */ - } -} - STATIC_OVL boolean diseasemu(mdat) struct permonst *mdat; @@ -1336,12 +1274,12 @@ dopois: rehumanize(); break; } - hurtarmor(AD_RUST); + erode_armor(&youmonst, ERODE_RUST); break; case AD_CORR: hitmsg(mtmp, mattk); if (mtmp->mcan) break; - hurtarmor(AD_CORR); + erode_armor(&youmonst, ERODE_CORRODE); break; case AD_DCAY: hitmsg(mtmp, mattk); @@ -1353,7 +1291,7 @@ dopois: rehumanize(); break; } - hurtarmor(AD_DCAY); + erode_armor(&youmonst, ERODE_ROT); break; case AD_HEAL: /* a cancelled nurse is just an ordinary monster, @@ -2503,7 +2441,7 @@ register struct attack *mattk; tmp = 0; } } else tmp = 0; - if (!rn2(30)) erode_armor(mtmp, TRUE); + if (!rn2(30)) erode_armor(mtmp, ERODE_CORRODE); if (!rn2(6)) (void)erode_obj(MON_WEP(mtmp), 3, TRUE, FALSE); goto assess_dmg; case AD_STON: /* cockatrice */ diff --git a/src/mon.c b/src/mon.c index f617dad4c..1c2009a0b 100644 --- a/src/mon.c +++ b/src/mon.c @@ -333,7 +333,7 @@ register struct monst *mtmp; if (mtmp->data == &mons[PM_GREMLIN] && (inpool || infountain) && rn2(3)) { if (split_mon(mtmp, (struct monst *)0)) dryup(mtmp->mx, mtmp->my, FALSE); - if (inpool) water_damage(&mtmp->minvent, FALSE, FALSE); + if (inpool) water_damage_chain(mtmp->minvent, FALSE); return (0); } else if (mtmp->data == &mons[PM_IRON_GOLEM] && inpool && !rn2(5)) { int dam = d(2,6); @@ -345,7 +345,7 @@ register struct monst *mtmp; mondead(mtmp); if (mtmp->mhp < 1) return (1); } - water_damage(&mtmp->minvent, FALSE, FALSE); + water_damage_chain(mtmp->minvent, FALSE); return (0); } @@ -398,7 +398,7 @@ register struct monst *mtmp; } mondead(mtmp); if (mtmp->mhp > 0) { - water_damage(&mtmp->minvent, FALSE, FALSE); + water_damage_chain(mtmp->minvent, FALSE); (void) rloc(mtmp, FALSE); return 0; } diff --git a/src/objnam.c b/src/objnam.c index 84c3599f4..fe692b226 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -2893,7 +2893,7 @@ wiztrap: del_engr_at(x, y); pline("A %s.", (lev->typ == POOL) ? "pool" : "moat"); /* Must manually make kelp! */ - water_damage(&level.objects[x][y], FALSE, TRUE); + water_damage_chain(level.objects[x][y], TRUE); newsym(x, y); return &zeroobj; } diff --git a/src/sit.c b/src/sit.c index e5e77aa42..19cd63471 100644 --- a/src/sit.c +++ b/src/sit.c @@ -113,9 +113,9 @@ dosit() in_water: You("sit in the water."); if (!rn2(10) && uarm) - (void) rust_dmg(uarm, "armor", 1, TRUE); + (void) water_damage(uarm, "armor", TRUE); if (!rn2(10) && uarmf && uarmf->otyp != WATER_WALKING_BOOTS) - (void) rust_dmg(uarm, "armor", 1, TRUE); + (void) water_damage(uarm, "armor", TRUE); } else if(IS_SINK(typ)) { You(sit_message, defsyms[S_sink].explanation); Your("%s gets wet.", humanoid(youmonst.data) ? "rump" : "underside"); diff --git a/src/trap.c b/src/trap.c index 1220105f5..f6266791f 100644 --- a/src/trap.c +++ b/src/trap.c @@ -55,7 +55,7 @@ struct monst *victim; int mat_idx; if (!victim) return 0; -#define burn_dmg(obj,descr) rust_dmg(obj, descr, 0, FALSE) +#define burn_dmg(obj,descr) rust_dmg(obj, descr, ERODE_BURN, TRUE, FALSE) while (1) { switch (rn2(5)) { case 0: @@ -102,20 +102,21 @@ struct monst *victim; } /* Generic erode-item function. Returns TRUE if any change in state - * occurred. "print", if set, means to print a message even if no change - * occurs. + * occurred, or if grease protected the item. + * "check_grease", if FALSE, means that grease is not checked for + * "print", if set, means to print a message even if no change occurs. */ boolean -rust_dmg(otmp, ostr, type, print) +rust_dmg(otmp, ostr, type, check_grease, print) register struct obj *otmp; register const char *ostr; int type; +boolean check_grease; boolean print; { static NEARDATA const char * const action[] = { "smoulder", "rust", "rot", "corrode" }; static NEARDATA const char * const msg[] = { "burnt", "rusted", "rotten", "corroded" }; boolean vulnerable = FALSE; - boolean grprot = FALSE; boolean is_primary = TRUE; int erosion; struct monst *victim; @@ -133,18 +134,18 @@ boolean print; switch(type) { case ERODE_BURN: vulnerable = is_flammable(otmp); + check_grease = FALSE; break; case ERODE_RUST: vulnerable = is_rustprone(otmp); - grprot = TRUE; break; case ERODE_ROT: vulnerable = is_rottable(otmp); + check_grease = FALSE; is_primary = FALSE; break; case ERODE_CORRODE: vulnerable = is_corrodeable(otmp); - grprot = TRUE; is_primary = FALSE; break; default: @@ -156,8 +157,9 @@ boolean print; if (!ostr) ostr = cxname(otmp); - if (grprot && otmp->greased) { - return grease_protect(otmp, ostr, victim); + if (check_grease && otmp->greased) { + grease_protect(otmp, ostr, victim); + return TRUE; } else if (!vulnerable || (otmp->oerodeproof && otmp->rknown)) { if (print && flags.verbose) { if (victim == &youmonst) @@ -167,7 +169,7 @@ boolean print; vtense(ostr, "are")); } return FALSE; - } else if (otmp->oerodeproof || otmp->blessed && !rnl(4)) { + } else if (otmp->oerodeproof || (otmp->blessed && !rnl(4))) { if (flags.verbose && (print || otmp->oerodeproof)) { if (victim == &youmonst) pline("Somehow, your %s %s not affected.", @@ -176,7 +178,7 @@ boolean print; pline("Somehow, %s's %s %s not affected.", mon_nam(victim), ostr, vtense(ostr, "are")); else if (visobj) - pline("Somehow, the %s %s not affected." ostr, + pline("Somehow, the %s %s not affected.", ostr, vtense(ostr, "are")); } /* We assume here that if the object is protected because it @@ -188,7 +190,7 @@ boolean print; return FALSE; } else if (erosion < MAX_ERODE) { const char *adverb = (erosion + 1 == MAX_ERODE) ? - " complete" : erosion ? " further" : ""; + " completely" : erosion ? " further" : ""; if (victim == &youmonst) Your("%s %s%s!", ostr, vtense(ostr, action[type]), adverb); @@ -931,18 +933,6 @@ unsigned trflags; case RUST_TRAP: seetrap(trap); - if (u.umonnum == PM_IRON_GOLEM) { - int dam = u.mhmax; - - pline("%s you!", A_gush_of_water_hits); - You("are covered with rust!"); - losehp(Maybe_Half_Phys(dam), "rusting away", KILLED_BY); - break; - } else if (u.umonnum == PM_GREMLIN && rn2(3)) { - pline("%s you!", A_gush_of_water_hits); - (void)split_mon(&youmonst, (struct monst *)0); - break; - } /* Unlike monsters, traps cannot aim their rust attacks at * you, so instead of looping through and taking either the @@ -953,18 +943,18 @@ unsigned trflags; case 0: pline("%s you on the %s!", A_gush_of_water_hits, body_part(HEAD)); - (void) rust_dmg(uarmh, helm_simple_name(uarmh), - 1, TRUE); + (void) water_damage(uarmh, helm_simple_name(uarmh), + TRUE); break; case 1: pline("%s your left %s!", A_gush_of_water_hits, body_part(ARM)); - if (rust_dmg(uarms, "shield", 1, TRUE)) + if (water_damage(uarms, "shield", TRUE)) break; if (u.twoweap || (uwep && bimanual(uwep))) (void) erode_obj(u.twoweap ? uswapwep : uwep, 1, TRUE, FALSE); -glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE); +glovecheck: (void) water_damage(uarmg, "gauntlets", TRUE); /* Not "metal gauntlets" since it gets called * even if it's leather for the message */ @@ -981,14 +971,26 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE); (otmp != uswapwep || !u.twoweap)) (void) snuff_lit(otmp); if (uarmc) - (void) rust_dmg(uarmc, cloak_simple_name(uarmc), - 1, TRUE); + (void) water_damage(uarmc, cloak_simple_name(uarmc), + TRUE); else if (uarm) - (void) rust_dmg(uarm, "armor", 1, TRUE); + (void) water_damage(uarm, "armor", TRUE); else if (uarmu) - (void) rust_dmg(uarmu, "shirt", 1, TRUE); + (void) water_damage(uarmu, "shirt", TRUE); } update_inventory(); + + if (u.umonnum == PM_IRON_GOLEM) { + int dam = u.mhmax; + + pline("%s you!", A_gush_of_water_hits); + You("are covered with rust!"); + losehp(Maybe_Half_Phys(dam), "rusting away", KILLED_BY); + } else if (u.umonnum == PM_GREMLIN && rn2(3)) { + pline("%s you!", A_gush_of_water_hits); + (void)split_mon(&youmonst, (struct monst *)0); + } + break; case FIRE_TRAP: @@ -2084,21 +2086,21 @@ register struct monst *mtmp; pline("%s %s on the %s!", A_gush_of_water_hits, mon_nam(mtmp), mbodypart(mtmp, HEAD)); target = which_armor(mtmp, W_ARMH); - (void) rust_dmg(target, helm_simple_name(target), - 1, TRUE); + (void) water_damage(target, helm_simple_name(target), + TRUE); break; case 1: if (in_sight) pline("%s %s's left %s!", A_gush_of_water_hits, mon_nam(mtmp), mbodypart(mtmp, ARM)); target = which_armor(mtmp, W_ARMS); - if (rust_dmg(target, "shield", 1, TRUE)) + if (water_damage(target, "shield", TRUE)) break; target = MON_WEP(mtmp); if (target && bimanual(target)) (void) erode_obj(target, 1, TRUE, FALSE); glovecheck: target = which_armor(mtmp, W_ARMG); - (void) rust_dmg(target, "gauntlets", 1, TRUE); + (void) water_damage(target, "gauntlets", TRUE); break; case 2: if (in_sight) @@ -2115,13 +2117,13 @@ glovecheck: target = which_armor(mtmp, W_ARMG); (otmp->owornmask & (W_WEP|W_SWAPWEP)) == 0) (void) snuff_lit(otmp); if ((target = which_armor(mtmp, W_ARMC)) != 0) - (void) rust_dmg(target, - cloak_simple_name(target), - 1, TRUE); + (void) water_damage(target, + cloak_simple_name(target), + TRUE); else if ((target = which_armor(mtmp, W_ARM)) != 0) - (void) rust_dmg(target, "armor", 1, TRUE); + (void) water_damage(target, "armor", TRUE); else if ((target = which_armor(mtmp, W_ARMU)) != 0) - (void) rust_dmg(target, "shirt", 1, TRUE); + (void) water_damage(target, "shirt", TRUE); } if (mptr == &mons[PM_IRON_GOLEM]) { @@ -3067,107 +3069,112 @@ xchar x, y; return retval; } -void -water_damage(objp, force, here) -struct obj **objp; -boolean force, here; +/* returns: + * 0 if obj is unaffected + * 1 if obj is protected by grease + * 2 if obj is changed but survived + * 3 if obj is destroyed + */ +int +water_damage(obj, ostr, force) +struct obj *obj; +const char *ostr; +boolean force; { - register struct obj *obj = *objp, *otmp; boolean loose_obj = (obj && obj->where == OBJ_FREE), exploded = FALSE; - if (loose_obj && (obj->nobj || obj->nexthere)) { - /* [this should actually be a panic()] */ - impossible("water_damage: loose object has%s%s%s list%s?", - obj->nobj ? " nobj" : "", - (obj->nobj && obj->nexthere) ? " and" : "", - obj->nexthere ? " nexthere" : "", - (obj->nobj && obj->nexthere) ? "s" : ""); - } + (void) snuff_lit(obj); - /* Scrolls, spellbooks, potions, weapons and - pieces of armor may get affected by the water. - - [FIXME? The item transformations here lack shop price/billing - handling [costly_alteration()], which is okay as long as shops - don't contain any pools. However, that's probably not a valid - assumption; a broken fountain might spill new pools far enough - to put one inside a nearby shop, particularly if dug walls in - Minetown haven't been repaired yet. Note that water_damage() - might be getting called right now because we're in the midst - of creating such a pool, not just because one has already been - created and we've walked into it while carrying unpaid stuff.] - */ - for (; obj; obj = otmp) { - otmp = here ? obj->nexthere : obj->nobj; - - (void) snuff_lit(obj); - - if(obj->otyp == CAN_OF_GREASE && obj->spe > 0) { - continue; - } else if(obj->greased) { - if (force || !rn2(2)) obj->greased = 0; - } else if(Is_container(obj) && !Is_box(obj) && - (obj->otyp != OILSKIN_SACK || (obj->cursed && !rn2(3)))) { - water_damage(&obj->cobj, force, FALSE); - } else if (!force && (Luck + 5) > rn2(20)) { - /* chance per item of sustaining damage: - * max luck: 10% - * avg luck (Luck==0): 75% - * awful luck (Luck<-4): 100% - */ - continue; - } else if (obj->oclass == SCROLL_CLASS) { + if(obj->otyp == CAN_OF_GREASE && obj->spe > 0) { + return 0; + } else if(obj->greased) { + if (!rn2(2)) obj->greased = 0; + if (carried(obj)) update_inventory(); + return 1; + } else if(Is_container(obj) && !Is_box(obj) && + (obj->otyp != OILSKIN_SACK || (obj->cursed && !rn2(3)))) { + water_damage_chain(obj->cobj, FALSE); + return 0; + } else if (!force && (Luck + 5) > rn2(20)) { + /* chance per item of sustaining damage: + * max luck: 10% + * avg luck (Luck==0): 75% + * awful luck (Luck<-4): 100% + */ + return 0; + } else if (obj->oclass == SCROLL_CLASS) { #ifdef MAIL - if (obj->otyp == SCR_MAIL) continue; + if (obj->otyp == SCR_MAIL) return 0; #endif - obj->otyp = SCR_BLANK_PAPER; - obj->dknown = 0; - obj->spe = 0; - } else if (obj->oclass == SPBOOK_CLASS) { - if (obj->otyp == SPE_BOOK_OF_THE_DEAD) { - pline("Steam rises from %s.", the(xname(obj))); - continue; - } - obj->otyp = SPE_BLANK_PAPER; - obj->dknown = 0; - } else if (obj->oclass == POTION_CLASS) { - if (obj->otyp == POT_ACID) { - char *bufp, buf[BUFSZ]; - boolean one = (obj->quan == 1L); + obj->otyp = SCR_BLANK_PAPER; + obj->dknown = 0; + obj->spe = 0; + if (carried(obj)) + update_inventory(); + return 2; + } else if (obj->oclass == SPBOOK_CLASS) { + if (obj->otyp == SPE_BOOK_OF_THE_DEAD) { + pline("Steam rises from %s.", the(xname(obj))); + return 0; + } + obj->otyp = SPE_BLANK_PAPER; + obj->dknown = 0; + if (carried(obj)) + update_inventory(); + return 2; + } else if (obj->oclass == POTION_CLASS) { + if (obj->otyp == POT_ACID) { + char *bufp, buf[BUFSZ]; + boolean one = (obj->quan == 1L); + boolean update = carried(obj); - bufp = strcpy(buf, "potion"); - if (!one) bufp = makeplural(bufp); - /* [should we damage player/monster?] */ - pline("%s %s %s!", /* "A potion explodes!" */ - !exploded ? (one ? "A" : "Some") : - (one ? "Another" : "More"), - bufp, vtense(bufp, "explode")); - exploded = TRUE; - /* let caller know that obj has gone away - [when obj is part of a list, delobj()'s - obj_extract_self() takes care of this; - for loose_obj, obj should always equal - *objp and otmp should always be null] */ - if (loose_obj && obj == *objp) *objp = otmp; - delobj(obj); - continue; - } else if (obj->odiluted) { - obj->otyp = POT_WATER; - obj->dknown = 0; - obj->blessed = obj->cursed = 0; - obj->odiluted = 0; - } else if (obj->otyp != POT_WATER) - obj->odiluted++; - } else if (is_rustprone(obj) && obj->oeroded < MAX_ERODE && - !(obj->oerodeproof || (obj->blessed && !rnl(4)))) { - /* all metal stuff and armor except (body armor - protected by oilskin cloak) */ - if(obj->oclass != ARMOR_CLASS || obj != uarm || - !uarmc || uarmc->otyp != OILSKIN_CLOAK || - (uarmc->cursed && !rn2(3))) - obj->oeroded++; - } - } + bufp = strcpy(buf, "potion"); + if (!one) bufp = makeplural(bufp); + /* [should we damage player/monster?] */ + pline("%s %s %s!", /* "A potion explodes!" */ + !exploded ? (one ? "A" : "Some") : + (one ? "Another" : "More"), + bufp, vtense(bufp, "explode")); + exploded = TRUE; + /* let caller know that obj has gone away + [when obj is part of a list, delobj()'s + obj_extract_self() takes care of this; + for loose_obj, obj should always equal + *objp and otmp should always be null] */ + delobj(obj); + if (update) + update_inventory(); + return 3; + } else if (obj->odiluted) { + obj->otyp = POT_WATER; + obj->dknown = 0; + obj->blessed = obj->cursed = 0; + obj->odiluted = 0; + if (carried(obj)) + update_inventory(); + return 2; + } else if (obj->otyp != POT_WATER) { + obj->odiluted++; + if (carried(obj)) + update_inventory(); + return 2; + } + } else { + return rust_dmg(obj, ostr, ERODE_RUST, FALSE, FALSE) ? 2 : 0; + } + return 0; +} + +void +water_damage_chain(obj,here) +struct obj *obj; +boolean here; +{ + struct obj *otmp; + for (; obj; obj = otmp) { + otmp = here ? obj->nexthere : obj->nobj; + water_damage(obj, NULL, FALSE); + } } /* @@ -3246,7 +3253,7 @@ drown() Hallucination ? "the Titanic" : "a rock"); } - water_damage(&invent, FALSE, FALSE); + water_damage_chain(invent, FALSE); if (u.umonnum == PM_GREMLIN && rn2(3)) (void)split_mon(&youmonst, (struct monst *)0); diff --git a/src/uhitm.c b/src/uhitm.c index 1ccb8a2cb..a0f90d3de 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -30,22 +30,13 @@ static boolean override_confirmation = FALSE; #define PROJECTILE(obj) ((obj) && is_ammo(obj)) -/* modified from hurtarmor() in mhitu.c */ -/* This is not static because it is also used for monsters rusting monsters */ void -hurtmarmor(mdef, attk) +erode_armor(mdef, hurt) struct monst *mdef; -int attk; +int hurt; { - int hurt; struct obj *target; - switch(attk) { - /* 0 is burning, which we should never be called with */ - case AD_RUST: hurt = 1; break; - case AD_CORR: hurt = 3; break; - default: hurt = 2; break; - } /* What the following code does: it keeps looping until it * finds a target for the rust monster. * Head, feet, etc... not covered by metal, or covered by @@ -56,34 +47,34 @@ int attk; switch(rn2(5)) { case 0: target = which_armor(mdef, W_ARMH); - if (!target || !rust_dmg(target, xname(target), hurt, FALSE)) + if (!target || !rust_dmg(target, xname(target), hurt, TRUE, FALSE)) continue; break; case 1: target = which_armor(mdef, W_ARMC); if (target) { - (void)rust_dmg(target, xname(target), hurt, TRUE); + (void)rust_dmg(target, xname(target), hurt, TRUE, TRUE); break; } if ((target = which_armor(mdef, W_ARM)) != (struct obj *)0) { - (void)rust_dmg(target, xname(target), hurt, TRUE); + (void)rust_dmg(target, xname(target), hurt, TRUE, TRUE); } else if ((target = which_armor(mdef, W_ARMU)) != (struct obj *)0) { - (void)rust_dmg(target, xname(target), hurt, TRUE); + (void)rust_dmg(target, xname(target), hurt, TRUE, TRUE); } break; case 2: target = which_armor(mdef, W_ARMS); - if (!target || !rust_dmg(target, xname(target), hurt, FALSE)) + if (!target || !rust_dmg(target, xname(target), hurt, TRUE, FALSE)) continue; break; case 3: target = which_armor(mdef, W_ARMG); - if (!target || !rust_dmg(target, xname(target), hurt, FALSE)) + if (!target || !rust_dmg(target, xname(target), hurt, TRUE, FALSE)) continue; break; case 4: target = which_armor(mdef, W_ARMF); - if (!target || !rust_dmg(target, xname(target), hurt, FALSE)) + if (!target || !rust_dmg(target, xname(target), hurt, TRUE, FALSE)) continue; break; } @@ -1536,11 +1527,11 @@ register struct attack *mattk; pline("%s falls to pieces!", Monnam(mdef)); xkilled(mdef,0); } - hurtmarmor(mdef, AD_RUST); + erode_armor(mdef, ERODE_RUST); tmp = 0; break; case AD_CORR: - hurtmarmor(mdef, AD_CORR); + erode_armor(mdef, ERODE_CORRODE); tmp = 0; break; case AD_DCAY: @@ -1549,7 +1540,7 @@ register struct attack *mattk; pline("%s falls to pieces!", Monnam(mdef)); xkilled(mdef,0); } - hurtmarmor(mdef, AD_DCAY); + erode_armor(mdef, ERODE_ROT); tmp = 0; break; case AD_DREN: @@ -2231,7 +2222,7 @@ boolean wep_was_destroyed; if(mhit && !mon->mcan) { if (aatyp == AT_KICK) { if (uarmf && !rn2(6)) - (void)rust_dmg(uarmf, xname(uarmf), 0, TRUE); + (void)rust_dmg(uarmf, xname(uarmf), ERODE_BURN, TRUE, TRUE); } else if (aatyp == AT_WEAP || aatyp == AT_CLAW || aatyp == AT_MAGC || aatyp == AT_TUCH) passive_obj(mon, (struct obj*)0, &(ptr->mattk[i])); @@ -2246,12 +2237,12 @@ boolean wep_was_destroyed; if (!Acid_resistance) mdamageu(mon, tmp); - if(!rn2(30)) erode_armor(&youmonst, TRUE); + if(!rn2(30)) erode_armor(&youmonst, ERODE_CORRODE); } if (mhit) { if (aatyp == AT_KICK) { if (uarmf && !rn2(6)) - (void)rust_dmg(uarmf, xname(uarmf), 3, TRUE); + (void)rust_dmg(uarmf, xname(uarmf), ERODE_CORRODE, TRUE, TRUE); } else if (aatyp == AT_WEAP || aatyp == AT_CLAW || aatyp == AT_MAGC || aatyp == AT_TUCH) passive_obj(mon, (struct obj*)0, &(ptr->mattk[i])); @@ -2284,7 +2275,7 @@ boolean wep_was_destroyed; if(mhit && !mon->mcan) { if (aatyp == AT_KICK) { if (uarmf) - (void)rust_dmg(uarmf, xname(uarmf), 1, TRUE); + (void)rust_dmg(uarmf, xname(uarmf), ERODE_RUST, TRUE, TRUE); } else if (aatyp == AT_WEAP || aatyp == AT_CLAW || aatyp == AT_MAGC || aatyp == AT_TUCH) passive_obj(mon, (struct obj*)0, &(ptr->mattk[i])); @@ -2294,7 +2285,7 @@ boolean wep_was_destroyed; if(mhit && !mon->mcan) { if (aatyp == AT_KICK) { if (uarmf) - (void)rust_dmg(uarmf, xname(uarmf), 3, TRUE); + (void)rust_dmg(uarmf, xname(uarmf), ERODE_CORRODE, TRUE, TRUE); } else if (aatyp == AT_WEAP || aatyp == AT_CLAW || aatyp == AT_MAGC || aatyp == AT_TUCH) passive_obj(mon, (struct obj*)0, &(ptr->mattk[i])); diff --git a/src/worn.c b/src/worn.c index 32bfe1003..a542f3be4 100644 --- a/src/worn.c +++ b/src/worn.c @@ -583,11 +583,28 @@ which_armor(mon, flag) struct monst *mon; long flag; { - register struct obj *obj; + if (mon == &youmonst) { + switch (flag) { + case W_ARM: return uarm; + case W_ARMC: return uarmc; + case W_ARMH: return uarmh; + case W_ARMS: return uarms; + case W_ARMG: return uarmg; + case W_ARMF: return uarmf; +#ifdef TOURIST + case W_ARMU: return uarmu; +#endif + default: + impossible("bad flag in which_armor"); + return 0; + } + } else { + register struct obj *obj; - for(obj = mon->minvent; obj; obj = obj->nobj) - if (obj->owornmask & flag) return obj; - return((struct obj *)0); + for(obj = mon->minvent; obj; obj = obj->nobj) + if (obj->owornmask & flag) return obj; + return((struct obj *)0); + } } /* remove an item of armor and then drop it */ diff --git a/src/zap.c b/src/zap.c index 03cbc6c52..2fb2396de 100644 --- a/src/zap.c +++ b/src/zap.c @@ -3396,7 +3396,7 @@ struct obj **ootmp; /* to return worn armor for caller to disintegrate */ } tmp = d(nd,6); if (!rn2(6)) (void) erode_obj(MON_WEP(mon), 3, TRUE, FALSE); - if (!rn2(6)) erode_armor(mon, TRUE); + if (!rn2(6)) erode_armor(mon, ERODE_CORRODE); break; } if (sho_shieldeff) shieldeff(mon->mx, mon->my); @@ -3525,7 +3525,7 @@ xchar sx, sy; (void) erode_obj(uwep, 3, TRUE, FALSE); if (u.twoweap && !rn2(3)) (void) erode_obj(uswapwep, 3, TRUE, FALSE); - if (!rn2(6)) erode_armor(&youmonst, TRUE); + if (!rn2(6)) erode_armor(&youmonst, ERODE_CORRODE); break; } From 3a049cf66e0c8587c278aa90e0d9da19db587583 Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Tue, 24 Feb 2015 15:20:01 -0500 Subject: [PATCH 058/132] Eliminate `erode_obj()` and other erosion. Now all erosion that isn't fire-based goes through `rust_dmg()` --- doc/fixes35.0 | 4 +- include/extern.h | 3 +- src/mhitm.c | 23 +++++---- src/mhitu.c | 25 +--------- src/potion.c | 2 +- src/spell.c | 16 +----- src/trap.c | 57 ++++++++++++++++----- src/uhitm.c | 8 +-- src/wield.c | 125 ----------------------------------------------- src/zap.c | 6 +-- 10 files changed, 73 insertions(+), 196 deletions(-) diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 48da8da36..9dc59fa66 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -859,9 +859,11 @@ if lava burns up the player's water walking boots, the player falls in the messages for lava burning items up are always printed fix used-up magic trap trying to hit steed. messages are now printed when objects on the ground are eroded -object erosion now always identifies rust/rot/fire/corrodeproof objects +object erosion now always identifies fooproof objects grease protects from all types of erosion all sources of erosion now affect objects the same way +passive attacks no longer erode armor covered by other armor +dipping a fooproof item into acid no longer forgets that it's fooproof Platform- and/or Interface-Specific Fixes diff --git a/include/extern.h b/include/extern.h index 87d3adee7..6ca49b411 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1070,6 +1070,7 @@ E int FDECL(sleep_monst, (struct monst *,int,int)); E void FDECL(slept_monst, (struct monst *)); E void FDECL(xdrainenergym, (struct monst *,BOOLEAN_P)); E long FDECL(attk_protection, (int)); +E void FDECL(rustm, (struct monst *,struct obj *)); /* ### mhitu.c ### */ @@ -2222,6 +2223,7 @@ E void FDECL(fill_pit, (int,int)); E int FDECL(float_down, (long, long)); E void NDECL(climb_pit); E int FDECL(fire_damage, (struct obj *,BOOLEAN_P,BOOLEAN_P,XCHAR_P,XCHAR_P)); +E void acid_damage(struct obj *); E int FDECL(water_damage, (struct obj *,const char*,BOOLEAN_P)); E void FDECL(water_damage_chain, (struct obj *,BOOLEAN_P)); E boolean NDECL(drown); @@ -2516,7 +2518,6 @@ E void NDECL(uwepgone); E void NDECL(uswapwepgone); E void NDECL(uqwepgone); E void NDECL(untwoweapon); -E boolean FDECL(erode_obj, (struct obj *,int,BOOLEAN_P,BOOLEAN_P)); E int FDECL(chwepon, (struct obj *,int)); E int FDECL(welded, (struct obj *)); E void FDECL(weldmsg, (struct obj *)); diff --git a/src/mhitm.c b/src/mhitm.c index ae66279e7..31c9dba11 100644 --- a/src/mhitm.c +++ b/src/mhitm.c @@ -16,7 +16,6 @@ static const char brief_feeling[] = "have a %s feeling for a moment, then it passes."; STATIC_DCL char *FDECL(mon_nam_too, (char *,struct monst *,struct monst *)); -STATIC_DCL void FDECL(mrustm, (struct monst *, struct monst *, struct obj *)); STATIC_DCL int FDECL(hitmm, (struct monst *,struct monst *,struct attack *)); STATIC_DCL int FDECL(gazemm, (struct monst *,struct monst *,struct attack *)); STATIC_DCL int FDECL(gulpmm, (struct monst *,struct monst *,struct attack *)); @@ -796,7 +795,7 @@ mdamagem(magr, mdef, mattk) (grow_up(magr,mdef) ? 0 : MM_AGR_DIED)); } if (tmp) - mrustm(magr, mdef, otmp); + rustm(mdef, otmp); } } else if (pa == &mons[PM_PURPLE_WORM] && pd == &mons[PM_SHRIEKER]) { @@ -884,7 +883,7 @@ mdamagem(magr, mdef, mattk) pline("It burns %s!", mon_nam(mdef)); } if (!rn2(30)) erode_armor(mdef, ERODE_CORRODE); - if (!rn2(6)) (void) erode_obj(MON_WEP(mdef), 3, TRUE, FALSE); + if (!rn2(6)) acid_damage(MON_WEP(mdef)); break; case AD_RUST: if (magr->mcan) break; @@ -1287,24 +1286,24 @@ struct monst *mon; } } -STATIC_OVL void -mrustm(magr, mdef, obj) -register struct monst *magr, *mdef; +void +rustm(mdef, obj) +register struct monst *mdef; register struct obj *obj; { int dmgtyp; - if (!magr || !mdef || !obj) return; /* just in case */ + if (!mdef || !obj) return; /* just in case */ /* AD_ACID is handled in passivemm */ if (dmgtype(mdef->data, AD_CORR)) - dmgtyp = 3; + dmgtyp = ERODE_CORRODE; else if (dmgtype(mdef->data, AD_RUST)) - dmgtyp = 1; + dmgtyp = ERODE_RUST; else if (dmgtype(mdef->data, AD_FIRE)) - dmgtyp = 0; + dmgtyp = ERODE_BURN; else return; - (void) erode_obj(obj, dmgtyp, FALSE, FALSE); + (void) rust_dmg(obj, 0, dmgtyp, TRUE, TRUE); } STATIC_OVL void @@ -1362,7 +1361,7 @@ int mdead; } } else tmp = 0; if (!rn2(30)) erode_armor(magr, ERODE_CORRODE); - if (!rn2(6)) (void)erode_obj(MON_WEP(magr), 3, TRUE, FALSE); + if (!rn2(6)) acid_damage(MON_WEP(magr)); goto assess_dmg; case AD_ENCH: /* KMH -- remove enchantment (disenchanter) */ if (mhit && !mdef->mcan && otmp) { diff --git a/src/mhitu.c b/src/mhitu.c index cc9b6f1be..6aa4225f7 100644 --- a/src/mhitu.c +++ b/src/mhitu.c @@ -8,7 +8,6 @@ STATIC_VAR NEARDATA struct obj *otmp; -STATIC_DCL void FDECL(urustm, (struct monst *, struct obj *)); STATIC_DCL boolean FDECL(u_slip_free, (struct monst *,struct attack *)); STATIC_DCL int FDECL(passiveum, (struct permonst *,struct monst *,struct attack *)); @@ -920,7 +919,7 @@ hitmu(mtmp, mattk) if (cloneu()) You("divide as %s hits you!", mon_nam(mtmp)); } - urustm(mtmp, otmp); + rustm(&youmonst, otmp); } else if (mattk->aatyp != AT_TUCH || dmg != 0 || mtmp != u.ustuck) hitmsg(mtmp, mattk); @@ -2079,26 +2078,6 @@ register int n; } } -STATIC_OVL void -urustm(mon, obj) -register struct monst *mon; -register struct obj *obj; -{ - int dmgtyp; - - if (!mon || !obj) return; /* just in case */ - /* AD_ACID is handled in passiveum */ - if (dmgtype(youmonst.data, AD_CORR)) - dmgtyp = 3; - else if (dmgtype(youmonst.data, AD_RUST)) - dmgtyp = 1; - else if (dmgtype(youmonst.data, AD_FIRE)) - dmgtyp = 0; - else - return; - (void) erode_obj(obj, dmgtyp, FALSE, FALSE); -} - int could_seduce(magr,mdef,mattk) struct monst *magr, *mdef; @@ -2442,7 +2421,7 @@ register struct attack *mattk; } } else tmp = 0; if (!rn2(30)) erode_armor(mtmp, ERODE_CORRODE); - if (!rn2(6)) (void)erode_obj(MON_WEP(mtmp), 3, TRUE, FALSE); + if (!rn2(6)) acid_damage(MON_WEP(mtmp)); goto assess_dmg; case AD_STON: /* cockatrice */ { diff --git a/src/potion.c b/src/potion.c index 7542ea451..483544c2b 100644 --- a/src/potion.c +++ b/src/potion.c @@ -1931,7 +1931,7 @@ dodip() } if (potion->otyp == POT_ACID) { - if (erode_obj(obj, 3, FALSE, TRUE)) + if (rust_dmg(obj, 0, ERODE_CORRODE, TRUE, FALSE)) goto poof; } diff --git a/src/spell.c b/src/spell.c index e1f6fc55b..5d499bf73 100644 --- a/src/spell.c +++ b/src/spell.c @@ -144,21 +144,7 @@ cursed_book(bp) case 5: pline_The("book was coated with contact poison!"); if (uarmg) { - if (uarmg->oerodeproof || !is_corrodeable(uarmg)) { - Your("gloves seem unaffected."); - } else if (uarmg->oeroded2 < MAX_ERODE) { - if (uarmg->greased) { - grease_protect(uarmg, "gloves", &youmonst); - } else { - Your("gloves corrode%s!", - uarmg->oeroded2+1 == MAX_ERODE ? - " completely" : uarmg->oeroded2 ? - " further" : ""); - uarmg->oeroded2++; - } - } else - Your("gloves %s completely corroded.", - Blind ? "feel" : "look"); + rust_dmg(uarmg, "gloves", ERODE_CORRODE, TRUE, TRUE); break; } /* temp disable in_use; death should not destroy the book */ diff --git a/src/trap.c b/src/trap.c index f6266791f..f78b7ad66 100644 --- a/src/trap.c +++ b/src/trap.c @@ -103,6 +103,8 @@ struct monst *victim; /* Generic erode-item function. Returns TRUE if any change in state * occurred, or if grease protected the item. + * "ostr", if non-null, is an alternate string to print instead of the + * object's name. * "check_grease", if FALSE, means that grease is not checked for * "print", if set, means to print a message even if no change occurs. */ @@ -165,8 +167,8 @@ boolean print; if (victim == &youmonst) Your("%s %s not affected.", ostr, vtense(ostr, "are")); else if (vismon) - pline("%s's %s %s not affected.", Monnam(victim), ostr, - vtense(ostr, "are")); + pline("%s %s %s not affected.", s_suffix(Monnam(victim)), + ostr, vtense(ostr, "are")); } return FALSE; } else if (otmp->oerodeproof || (otmp->blessed && !rnl(4))) { @@ -175,8 +177,9 @@ boolean print; pline("Somehow, your %s %s not affected.", ostr, vtense(ostr, "are")); else if (vismon) - pline("Somehow, %s's %s %s not affected.", - mon_nam(victim), ostr, vtense(ostr, "are")); + pline("Somehow, %s %s %s not affected.", + s_suffix(mon_nam(victim)), ostr, + vtense(ostr, "are")); else if (visobj) pline("Somehow, the %s %s not affected.", ostr, vtense(ostr, "are")); @@ -214,8 +217,8 @@ boolean print; vtense(ostr, Blind ? "feel" : "look"), msg[type]); else if (vismon) - pline("%s's %s %s completely %s.", - Monnam(victim), ostr, + pline("%s %s %s completely %s.", + s_suffix(Monnam(victim)), ostr, vtense(ostr, "look"), msg[type]); else if (visobj) pline("The %s %s completely %s.", ostr, @@ -952,8 +955,8 @@ unsigned trflags; if (water_damage(uarms, "shield", TRUE)) break; if (u.twoweap || (uwep && bimanual(uwep))) - (void) erode_obj(u.twoweap ? uswapwep : uwep, - 1, TRUE, FALSE); + (void) water_damage(u.twoweap ? uswapwep : uwep, 0, + TRUE); glovecheck: (void) water_damage(uarmg, "gauntlets", TRUE); /* Not "metal gauntlets" since it gets called * even if it's leather for the message @@ -962,7 +965,7 @@ glovecheck: (void) water_damage(uarmg, "gauntlets", TRUE); case 2: pline("%s your right %s!", A_gush_of_water_hits, body_part(ARM)); - (void) erode_obj(uwep, 1, TRUE, FALSE); + (void) water_damage(uwep, 0, TRUE); goto glovecheck; default: pline("%s you!", A_gush_of_water_hits); @@ -2098,7 +2101,7 @@ register struct monst *mtmp; break; target = MON_WEP(mtmp); if (target && bimanual(target)) - (void) erode_obj(target, 1, TRUE, FALSE); + (void) water_damage(target, 0, TRUE); glovecheck: target = which_armor(mtmp, W_ARMG); (void) water_damage(target, "gauntlets", TRUE); break; @@ -2106,7 +2109,7 @@ glovecheck: target = which_armor(mtmp, W_ARMG); if (in_sight) pline("%s %s's right %s!", A_gush_of_water_hits, mon_nam(mtmp), mbodypart(mtmp, ARM)); - (void) erode_obj(MON_WEP(mtmp), 1, TRUE, FALSE); + (void) water_damage(MON_WEP(mtmp), 0, TRUE); goto glovecheck; default: if (in_sight) @@ -3069,6 +3072,38 @@ xchar x, y; return retval; } +void +acid_damage(obj) +struct obj *obj; +{ + /* Scrolls but not spellbooks can be erased by acid. */ + struct monst *victim = + carried(obj) ? &youmonst : mcarried(obj) ? obj->ocarry : NULL; + boolean vismon = victim && (victim != &youmonst) && canseemon(victim); + + if (obj->greased) + grease_protect(obj, NULL, victim); + else if (obj->oclass == SCROLL_CLASS && obj->otyp != SCR_BLANK_PAPER) { + if (obj->otyp != SCR_BLANK_PAPER +#ifdef MAIL + && obj->otyp != SCR_MAIL +#endif + ) { + if (!Blind) { + if (victim == &youmonst) + pline("Your %s.", aobjnam(obj, "fade")); + else if (vismon) + pline("%s %s.", s_suffix(Monnam(victim)), + aobjnam(obj, "fade")); + } + } + obj->otyp = SCR_BLANK_PAPER; + obj->spe = 0; + obj->dknown = 0; + } else + rust_dmg(obj, NULL, ERODE_CORRODE, TRUE, TRUE); +} + /* returns: * 0 if obj is unaffected * 1 if obj is protected by grease diff --git a/src/uhitm.c b/src/uhitm.c index a0f90d3de..51f38eee0 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -2446,22 +2446,22 @@ struct attack *mattk; /* null means we find one internally */ case AD_FIRE: if(!rn2(6) && !mon->mcan) { - (void) erode_obj(obj, 0, FALSE, FALSE); + (void) rust_dmg(obj, 0, ERODE_BURN, FALSE, FALSE); } break; case AD_ACID: if(!rn2(6)) { - (void) erode_obj(obj, 3, FALSE, FALSE); + (void) rust_dmg(obj, 0, ERODE_CORRODE, FALSE, FALSE); } break; case AD_RUST: if(!mon->mcan) { - (void) erode_obj(obj, 1, FALSE, FALSE); + (void) rust_dmg(obj, 0, ERODE_RUST, FALSE, FALSE); } break; case AD_CORR: if(!mon->mcan) { - (void) erode_obj(obj, 3, FALSE, FALSE); + (void) rust_dmg(obj, 0, ERODE_CORRODE, FALSE, FALSE); } break; case AD_ENCH: diff --git a/src/wield.c b/src/wield.c index dbb5d271f..9e1447bff 100644 --- a/src/wield.c +++ b/src/wield.c @@ -597,131 +597,6 @@ untwoweapon() return; } -/* Maybe rust (or corrode, burn, rot) object. - * Returns TRUE if something happened. */ -boolean -erode_obj(target, type, fade_scrolls, for_dip) -struct obj *target; /* object (e.g. weapon or armor) to erode */ -int type; -boolean fade_scrolls; -boolean for_dip; -{ - static NEARDATA const char * const action[] = { "smoulder", "rust", "rot", "corrode" }; - static NEARDATA const char * const msg[] = { "burnt", "rusty", "rotten", "corroded" }; - boolean vulnerable = FALSE; - boolean grprot = FALSE; - boolean is_primary = TRUE; - int erosion; - int dmgtyp = AD_ACID; - struct monst *victim; - boolean vismon, visobj, chill; - boolean ret = FALSE; - boolean already_affected = FALSE; - - if (!target) - return FALSE; - victim = carried(target) ? &youmonst : - mcarried(target) ? target->ocarry : (struct monst *)0; - vismon = victim && (victim != &youmonst) && canseemon(victim); - visobj = !victim && cansee(bhitpos.x, bhitpos.y); /* assume thrown */ - - switch(type) { - case 0: vulnerable = is_flammable(target); - dmgtyp = AD_FIRE; - break; - case 1: vulnerable = is_rustprone(target); - dmgtyp = AD_RUST; - grprot = TRUE; - if (target->lamplit) { - already_affected = snuff_lit(target); - if (already_affected) ret = TRUE; - } - break; - case 2: vulnerable = is_rottable(target); - dmgtyp = AD_DCAY; - is_primary = FALSE; - break; - case 3: vulnerable = is_corrodeable(target); - dmgtyp = AD_ACID; - grprot = TRUE; - is_primary = FALSE; - break; - } - erosion = is_primary ? target->oeroded : target->oeroded2; - - if (target->greased && grprot) { - grease_protect(target,(char *)0,victim); - ret = TRUE; - } else if (target->oclass == SCROLL_CLASS && (type == 1 || type == 3)) { - if(fade_scrolls && target->otyp != SCR_BLANK_PAPER -#ifdef MAIL - && target->otyp != SCR_MAIL -#endif - ) - { - if (!Blind) { - if ((victim == &youmonst) || vismon || visobj) - pline("%s.", Yobjnam2(target, "fade")); - } - target->otyp = SCR_BLANK_PAPER; - target->spe = 0; - ret = TRUE; - } - } else if (target->oartifact && arti_immune(target, dmgtyp)) { - if (flags.verbose && (dmgtyp != AD_FIRE)) { - if (victim == &youmonst) - pline("%s.", Yobjnam2(target, "sizzle")); - } - /* no damage to object */ - } else if (target->oartifact && (type == 1) && - /* cold and fire provide partial protection against rust */ - ((chill = arti_immune(target, AD_COLD)) != 0 || - arti_immune(target, AD_FIRE)) && - /* once rusted, the chance for further rusting goes up */ - rn2(2 * (MAX_ERODE + 1 - erosion))) { - if (flags.verbose && target->oclass == WEAPON_CLASS) { - if (victim == &youmonst || vismon || visobj) - pline("%s some water.", - Yobjnam2(target, chill ? "freeze" : "boil")); - } - /* no damage to object */ - } else if (target->oerodeproof || !vulnerable) { - /* no message if dipping or not carried */ - if (for_dip) { - /* assumes that for_dip implies player action */ - if (!Blind) target->rknown = 0; - } else if (victim == &youmonst || vismon) { - if (flags.verbose || (vulnerable && !target->rknown)) - pline("%s not %s.", Yobjnam2(target, "are"), - already_affected ? "harmed" : "affected"); - if (vulnerable) target->rknown = 1; - } - } else if (erosion < MAX_ERODE) { - if (victim == &youmonst || vismon || visobj) { - pline("%s%s!", Yobjnam2(target, action[type]), - erosion+1 == MAX_ERODE ? " completely" : - erosion ? " further" : ""); - target->rknown = 1; /* it's obviously not erode-proof */ - } - if (is_primary) - target->oeroded++; - else - target->oeroded2++; - ret = TRUE; - } else { - if (flags.verbose && !for_dip) { - if (victim == &youmonst) - pline("%s completely %s.", - Yobjnam2(target, Blind ? "feel" : "look"), msg[type]); - else if (vismon || visobj) - pline("%s completely %s.", - Yobjnam2(target, "look"), msg[type]); - } - } - - return ret; -} - int chwepon(otmp, amount) register struct obj *otmp; diff --git a/src/zap.c b/src/zap.c index 2fb2396de..95b9760a3 100644 --- a/src/zap.c +++ b/src/zap.c @@ -3395,7 +3395,7 @@ struct obj **ootmp; /* to return worn armor for caller to disintegrate */ break; } tmp = d(nd,6); - if (!rn2(6)) (void) erode_obj(MON_WEP(mon), 3, TRUE, FALSE); + if (!rn2(6)) acid_damage(MON_WEP(mon)); if (!rn2(6)) erode_armor(mon, ERODE_CORRODE); break; } @@ -3522,9 +3522,9 @@ xchar sx, sy; } /* using two weapons at once makes both of them more vulnerable */ if (!rn2(u.twoweap ? 3 : 6)) - (void) erode_obj(uwep, 3, TRUE, FALSE); + acid_damage(uwep); if (u.twoweap && !rn2(3)) - (void) erode_obj(uswapwep, 3, TRUE, FALSE); + acid_damage(uswapwep); if (!rn2(6)) erode_armor(&youmonst, ERODE_CORRODE); break; } From 57dcad377405dc480bd29b453dca8c362722e838 Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Tue, 24 Feb 2015 15:21:30 -0500 Subject: [PATCH 059/132] Rename `rust_dmg()` to `erode_obj()`. --- include/extern.h | 2 +- src/mhitm.c | 2 +- src/potion.c | 2 +- src/spell.c | 2 +- src/trap.c | 10 +++++----- src/uhitm.c | 30 +++++++++++++++--------------- 6 files changed, 24 insertions(+), 24 deletions(-) diff --git a/include/extern.h b/include/extern.h index 6ca49b411..f9fc3be0c 100644 --- a/include/extern.h +++ b/include/extern.h @@ -2203,7 +2203,7 @@ E coord *FDECL(gettrack, (int,int)); /* ### trap.c ### */ E boolean FDECL(burnarmor,(struct monst *)); -E boolean FDECL(rust_dmg, (struct obj *,const char *,int,BOOLEAN_P,BOOLEAN_P)); +E boolean FDECL(erode_obj, (struct obj *,const char *,int,BOOLEAN_P,BOOLEAN_P)); E boolean FDECL(grease_protect, (struct obj *,const char *,struct monst *)); E struct trap *FDECL(maketrap, (int,int,int)); E void FDECL(fall_through, (BOOLEAN_P)); diff --git a/src/mhitm.c b/src/mhitm.c index 31c9dba11..88770c523 100644 --- a/src/mhitm.c +++ b/src/mhitm.c @@ -1303,7 +1303,7 @@ register struct obj *obj; dmgtyp = ERODE_BURN; else return; - (void) rust_dmg(obj, 0, dmgtyp, TRUE, TRUE); + (void) erode_obj(obj, 0, dmgtyp, TRUE, TRUE); } STATIC_OVL void diff --git a/src/potion.c b/src/potion.c index 483544c2b..782fa7ace 100644 --- a/src/potion.c +++ b/src/potion.c @@ -1931,7 +1931,7 @@ dodip() } if (potion->otyp == POT_ACID) { - if (rust_dmg(obj, 0, ERODE_CORRODE, TRUE, FALSE)) + if (erode_obj(obj, 0, ERODE_CORRODE, TRUE, FALSE)) goto poof; } diff --git a/src/spell.c b/src/spell.c index 5d499bf73..597d4e606 100644 --- a/src/spell.c +++ b/src/spell.c @@ -144,7 +144,7 @@ cursed_book(bp) case 5: pline_The("book was coated with contact poison!"); if (uarmg) { - rust_dmg(uarmg, "gloves", ERODE_CORRODE, TRUE, TRUE); + erode_obj(uarmg, "gloves", ERODE_CORRODE, TRUE, TRUE); break; } /* temp disable in_use; death should not destroy the book */ diff --git a/src/trap.c b/src/trap.c index f78b7ad66..d535fc230 100644 --- a/src/trap.c +++ b/src/trap.c @@ -55,7 +55,7 @@ struct monst *victim; int mat_idx; if (!victim) return 0; -#define burn_dmg(obj,descr) rust_dmg(obj, descr, ERODE_BURN, TRUE, FALSE) +#define burn_dmg(obj,descr) erode_obj(obj, descr, ERODE_BURN, TRUE, FALSE) while (1) { switch (rn2(5)) { case 0: @@ -109,7 +109,7 @@ struct monst *victim; * "print", if set, means to print a message even if no change occurs. */ boolean -rust_dmg(otmp, ostr, type, check_grease, print) +erode_obj(otmp, ostr, type, check_grease, print) register struct obj *otmp; register const char *ostr; int type; @@ -151,7 +151,7 @@ boolean print; is_primary = FALSE; break; default: - impossible("Invalid erosion type in rust_dmg"); + impossible("Invalid erosion type in erode_obj"); return FALSE; } erosion = is_primary ? otmp->oeroded : otmp->oeroded2; @@ -3101,7 +3101,7 @@ struct obj *obj; obj->spe = 0; obj->dknown = 0; } else - rust_dmg(obj, NULL, ERODE_CORRODE, TRUE, TRUE); + erode_obj(obj, NULL, ERODE_CORRODE, TRUE, TRUE); } /* returns: @@ -3195,7 +3195,7 @@ boolean force; return 2; } } else { - return rust_dmg(obj, ostr, ERODE_RUST, FALSE, FALSE) ? 2 : 0; + return erode_obj(obj, ostr, ERODE_RUST, FALSE, FALSE) ? 2 : 0; } return 0; } diff --git a/src/uhitm.c b/src/uhitm.c index 51f38eee0..b594fd863 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -47,34 +47,34 @@ int hurt; switch(rn2(5)) { case 0: target = which_armor(mdef, W_ARMH); - if (!target || !rust_dmg(target, xname(target), hurt, TRUE, FALSE)) + if (!target || !erode_obj(target, xname(target), hurt, TRUE, FALSE)) continue; break; case 1: target = which_armor(mdef, W_ARMC); if (target) { - (void)rust_dmg(target, xname(target), hurt, TRUE, TRUE); + (void)erode_obj(target, xname(target), hurt, TRUE, TRUE); break; } if ((target = which_armor(mdef, W_ARM)) != (struct obj *)0) { - (void)rust_dmg(target, xname(target), hurt, TRUE, TRUE); + (void)erode_obj(target, xname(target), hurt, TRUE, TRUE); } else if ((target = which_armor(mdef, W_ARMU)) != (struct obj *)0) { - (void)rust_dmg(target, xname(target), hurt, TRUE, TRUE); + (void)erode_obj(target, xname(target), hurt, TRUE, TRUE); } break; case 2: target = which_armor(mdef, W_ARMS); - if (!target || !rust_dmg(target, xname(target), hurt, TRUE, FALSE)) + if (!target || !erode_obj(target, xname(target), hurt, TRUE, FALSE)) continue; break; case 3: target = which_armor(mdef, W_ARMG); - if (!target || !rust_dmg(target, xname(target), hurt, TRUE, FALSE)) + if (!target || !erode_obj(target, xname(target), hurt, TRUE, FALSE)) continue; break; case 4: target = which_armor(mdef, W_ARMF); - if (!target || !rust_dmg(target, xname(target), hurt, TRUE, FALSE)) + if (!target || !erode_obj(target, xname(target), hurt, TRUE, FALSE)) continue; break; } @@ -2222,7 +2222,7 @@ boolean wep_was_destroyed; if(mhit && !mon->mcan) { if (aatyp == AT_KICK) { if (uarmf && !rn2(6)) - (void)rust_dmg(uarmf, xname(uarmf), ERODE_BURN, TRUE, TRUE); + (void)erode_obj(uarmf, xname(uarmf), ERODE_BURN, TRUE, TRUE); } else if (aatyp == AT_WEAP || aatyp == AT_CLAW || aatyp == AT_MAGC || aatyp == AT_TUCH) passive_obj(mon, (struct obj*)0, &(ptr->mattk[i])); @@ -2242,7 +2242,7 @@ boolean wep_was_destroyed; if (mhit) { if (aatyp == AT_KICK) { if (uarmf && !rn2(6)) - (void)rust_dmg(uarmf, xname(uarmf), ERODE_CORRODE, TRUE, TRUE); + (void)erode_obj(uarmf, xname(uarmf), ERODE_CORRODE, TRUE, TRUE); } else if (aatyp == AT_WEAP || aatyp == AT_CLAW || aatyp == AT_MAGC || aatyp == AT_TUCH) passive_obj(mon, (struct obj*)0, &(ptr->mattk[i])); @@ -2275,7 +2275,7 @@ boolean wep_was_destroyed; if(mhit && !mon->mcan) { if (aatyp == AT_KICK) { if (uarmf) - (void)rust_dmg(uarmf, xname(uarmf), ERODE_RUST, TRUE, TRUE); + (void)erode_obj(uarmf, xname(uarmf), ERODE_RUST, TRUE, TRUE); } else if (aatyp == AT_WEAP || aatyp == AT_CLAW || aatyp == AT_MAGC || aatyp == AT_TUCH) passive_obj(mon, (struct obj*)0, &(ptr->mattk[i])); @@ -2285,7 +2285,7 @@ boolean wep_was_destroyed; if(mhit && !mon->mcan) { if (aatyp == AT_KICK) { if (uarmf) - (void)rust_dmg(uarmf, xname(uarmf), ERODE_CORRODE, TRUE, TRUE); + (void)erode_obj(uarmf, xname(uarmf), ERODE_CORRODE, TRUE, TRUE); } else if (aatyp == AT_WEAP || aatyp == AT_CLAW || aatyp == AT_MAGC || aatyp == AT_TUCH) passive_obj(mon, (struct obj*)0, &(ptr->mattk[i])); @@ -2446,22 +2446,22 @@ struct attack *mattk; /* null means we find one internally */ case AD_FIRE: if(!rn2(6) && !mon->mcan) { - (void) rust_dmg(obj, 0, ERODE_BURN, FALSE, FALSE); + (void) erode_obj(obj, 0, ERODE_BURN, FALSE, FALSE); } break; case AD_ACID: if(!rn2(6)) { - (void) rust_dmg(obj, 0, ERODE_CORRODE, FALSE, FALSE); + (void) erode_obj(obj, 0, ERODE_CORRODE, FALSE, FALSE); } break; case AD_RUST: if(!mon->mcan) { - (void) rust_dmg(obj, 0, ERODE_RUST, FALSE, FALSE); + (void) erode_obj(obj, 0, ERODE_RUST, FALSE, FALSE); } break; case AD_CORR: if(!mon->mcan) { - (void) rust_dmg(obj, 0, ERODE_CORRODE, FALSE, FALSE); + (void) erode_obj(obj, 0, ERODE_CORRODE, FALSE, FALSE); } break; case AD_ENCH: From 3acd3c4a0058e72a29bc5b8e2a9b6877d23a0f1e Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Tue, 24 Feb 2015 15:26:09 -0500 Subject: [PATCH 060/132] Fold `get_wet()` into `water_damage()`. This now ensures that dipping into water works like other sources of water damage. There is a potentially significant gameplay change here: dipping a container into uncursed water will wet all its contents. If this is a problem, then we should add another parameter to water_damage which will suppress this behaviour for dipping. --- doc/fixes35.0 | 2 +- include/extern.h | 1 - src/fountain.c | 2 +- src/potion.c | 96 +----------------------------------------------- src/trap.c | 3 +- 5 files changed, 6 insertions(+), 98 deletions(-) diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 9dc59fa66..d3f6b1a90 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -864,7 +864,7 @@ grease protects from all types of erosion all sources of erosion now affect objects the same way passive attacks no longer erode armor covered by other armor dipping a fooproof item into acid no longer forgets that it's fooproof - +dipping a container into uncursed water now gets its contents wet Platform- and/or Interface-Specific Fixes ----------------------------------------- diff --git a/include/extern.h b/include/extern.h index f9fc3be0c..4da79874d 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1726,7 +1726,6 @@ E void FDECL(healup, (int,int,BOOLEAN_P,BOOLEAN_P)); E void FDECL(strange_feeling, (struct obj *,const char *)); E void FDECL(potionhit, (struct monst *,struct obj *,BOOLEAN_P)); E void FDECL(potionbreathe, (struct obj *)); -E boolean FDECL(get_wet, (struct obj *)); E int NDECL(dodip); E void FDECL(mongrantswish, (struct monst **)); E void FDECL(djinni_from_bottle, (struct obj *)); diff --git a/src/fountain.c b/src/fountain.c index cc8aeb7bf..7de917ad9 100644 --- a/src/fountain.c +++ b/src/fountain.c @@ -402,7 +402,7 @@ register struct obj *obj; if(in_town(u.ux, u.uy)) (void) angry_guards(FALSE); return; - } else if (get_wet(obj)) { + } else if (water_damage(obj, NULL, TRUE)) { if (obj->otyp == POT_ACID) { /* Acid and water don't mix */ useup(obj); return; diff --git a/src/potion.c b/src/potion.c index 782fa7ace..4c57eaecb 100644 --- a/src/potion.c +++ b/src/potion.c @@ -1088,7 +1088,7 @@ const char *objphrase; /* "Your widget glows" or "Steed's saddle glows" */ } else { /* dipping into uncursed water; carried() check skips steed saddle */ if (carried(targobj)) { - if (get_wet(targobj)) + if (water_damage(targobj, 0, TRUE)) res = TRUE; } } @@ -1626,98 +1626,6 @@ register struct obj *o1, *o2; return 0; } - -boolean -get_wet(obj) -register struct obj *obj; -/* returns TRUE if something happened (potion should be used up) */ -{ - if (snuff_lit(obj)) return(TRUE); - - if (obj->greased) { - grease_protect(obj,(char *)0,&youmonst); - return(FALSE); - } - - /* (Rusting shop goods ought to be charged for.) */ - switch (obj->oclass) { - case POTION_CLASS: - if (obj->otyp == POT_WATER) return FALSE; - /* KMH -- Water into acid causes an explosion */ - if (obj->otyp == POT_ACID) { - pline("It boils vigorously!"); - You("are caught in the explosion!"); - losehp(Maybe_Half_Phys(rnd(10)), "elementary chemistry", - KILLED_BY); - makeknown(obj->otyp); - update_inventory(); - return (TRUE); - } - pline("%s%s.", Yobjnam2(obj,"dilute"), - obj->odiluted ? " further" : ""); - costly_alteration(obj, COST_DILUTE); - if (obj->odiluted) { - obj->odiluted = 0; - obj->blessed = FALSE; - obj->cursed = FALSE; - obj->otyp = POT_WATER; - } else - obj->odiluted++; - update_inventory(); - return TRUE; - case SCROLL_CLASS: - if (obj->otyp != SCR_BLANK_PAPER -#ifdef MAIL - && obj->otyp != SCR_MAIL -#endif - ) { - if (!Blind) - pline_The("scroll%s %s.", - plur(obj->quan), otense(obj, "fade")); - costly_alteration(obj, COST_ERASE); - obj->otyp = SCR_BLANK_PAPER; - obj->spe = 0; - update_inventory(); - return TRUE; - } else break; - case SPBOOK_CLASS: - if (obj->otyp != SPE_BLANK_PAPER) { - - if (obj->otyp == SPE_BOOK_OF_THE_DEAD) { - pline( - "%s suddenly heats up; steam rises and it remains dry.", - The(xname(obj))); - } else { - if (!Blind) - pline_The("spellbook%s %s.", - plur(obj->quan), - otense(obj, "fade")); - costly_alteration(obj, COST_ERASE); - obj->otyp = SPE_BLANK_PAPER; - update_inventory(); - } - return TRUE; - } - break; - case WEAPON_CLASS: - /* Just "fall through" to generic rustprone check for now. */ - /* fall through */ - default: - if (!obj->oerodeproof && is_rustprone(obj) && - (obj->oeroded < MAX_ERODE) && !rn2(2)) { - pline("%s some%s.", - Yobjnam2(obj, "rust"), - obj->oeroded ? " more" : "what"); - obj->oeroded++; - update_inventory(); - return TRUE; - } - break; - } - pline("%s wet.", Yobjnam2(obj, "get")); - return FALSE; -} - int dodip() { @@ -1756,7 +1664,7 @@ dodip() rider_cant_reach(); /* not skilled enough to reach */ } else { if (obj->otyp == POT_ACID) obj->in_use = 1; - (void) get_wet(obj); + (void) water_damage(obj, 0, TRUE); if (obj->in_use) useup(obj); } return 1; diff --git a/src/trap.c b/src/trap.c index d535fc230..6a5cb3755 100644 --- a/src/trap.c +++ b/src/trap.c @@ -3118,7 +3118,8 @@ boolean force; { boolean loose_obj = (obj && obj->where == OBJ_FREE), exploded = FALSE; - (void) snuff_lit(obj); + if (snuff_lit(obj)) + return 2; if(obj->otyp == CAN_OF_GREASE && obj->spe > 0) { return 0; From 777328bd5c7de7c19eaf8513fd3f6ed629a00d99 Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Sun, 1 Mar 2015 11:54:40 -0500 Subject: [PATCH 061/132] Merge fire-based erosion to common codepaths. This finally eliminates all direct increases of `oeroded` and `oeroded2` and moves them all to go via `erode_obj()`. They are still manipulated directly in a few places, but not to erode objects. This now merges the `fire_damage()` function to a common codepath, used for items on lava and burning oil, but fire needs more work. There is still a duplication between `destroy_item()` and `fire_damage()`; the two codepaths should eventually be merged in some manner so that there is only one codepath to say "an object was affected by fire". This path might require some parameters, such as whether the fire will just erode objects or burn them outright, but that can happen another day. --- include/extern.h | 5 +- include/hack.h | 3 + include/obj.h | 13 +++ src/do.c | 4 +- src/dokick.c | 3 +- src/fountain.c | 2 +- src/mhitm.c | 2 +- src/mkobj.c | 2 +- src/mon.c | 4 +- src/potion.c | 30 +---- src/spell.c | 3 +- src/trap.c | 294 +++++++++++++++++++++++++++-------------------- src/uhitm.c | 38 +++--- 13 files changed, 226 insertions(+), 177 deletions(-) diff --git a/include/extern.h b/include/extern.h index 4da79874d..0bd3aab7b 100644 --- a/include/extern.h +++ b/include/extern.h @@ -2202,7 +2202,7 @@ E coord *FDECL(gettrack, (int,int)); /* ### trap.c ### */ E boolean FDECL(burnarmor,(struct monst *)); -E boolean FDECL(erode_obj, (struct obj *,const char *,int,BOOLEAN_P,BOOLEAN_P)); +E int FDECL(erode_obj, (struct obj *,const char *,int,int)); E boolean FDECL(grease_protect, (struct obj *,const char *,struct monst *)); E struct trap *FDECL(maketrap, (int,int,int)); E void FDECL(fall_through, (BOOLEAN_P)); @@ -2221,7 +2221,8 @@ E void NDECL(float_up); E void FDECL(fill_pit, (int,int)); E int FDECL(float_down, (long, long)); E void NDECL(climb_pit); -E int FDECL(fire_damage, (struct obj *,BOOLEAN_P,BOOLEAN_P,XCHAR_P,XCHAR_P)); +E boolean FDECL(fire_damage, (struct obj *,BOOLEAN_P,XCHAR_P,XCHAR_P)); +E int FDECL(fire_damage_chain, (struct obj *,BOOLEAN_P,BOOLEAN_P,XCHAR_P,XCHAR_P)); E void acid_damage(struct obj *); E int FDECL(water_damage, (struct obj *,const char*,BOOLEAN_P)); E void FDECL(water_damage_chain, (struct obj *,BOOLEAN_P)); diff --git a/include/hack.h b/include/hack.h index 0ace170e5..7c6af5b18 100644 --- a/include/hack.h +++ b/include/hack.h @@ -99,6 +99,9 @@ #define COST_BITE 13 /* start eating food */ #define COST_OPEN 14 /* open tin */ #define COST_BRKLCK 15 /* break box/chest's lock */ +#define COST_RUST 16 /* rust damage */ +#define COST_ROT 17 /* rotting attack */ +#define COST_CORRODE 18 /* acid damage */ /* bitmask flags for corpse_xname(); PFX_THE takes precedence over ARTICLE, NO_PFX takes precedence over both */ diff --git a/include/obj.h b/include/obj.h index 12b1fce35..fe43d0878 100644 --- a/include/obj.h +++ b/include/obj.h @@ -325,6 +325,19 @@ struct obj { #define ERODE_ROT 2 #define ERODE_CORRODE 3 +/* erosion flags for erode_obj() */ +#define EF_NONE 0 +#define EF_GREASE 0x1 /* check for a greased object */ +#define EF_DESTROY 0x2 /* potentially destroy the object */ +#define EF_VERBOSE 0x4 /* print extra messages */ +#define EF_PAY 0x8 /* it's the player's fault */ + +/* erosion return values for erode_obj(), water_damage() */ +#define ER_NOTHING 0 /* nothing happened */ +#define ER_GREASED 1 /* protected by grease */ +#define ER_DAMAGED 2 /* object was damaged in some way */ +#define ER_DESTROYED 3 /* object was destroyed */ + /* * Notes for adding new oextra structures: * diff --git a/src/do.c b/src/do.c index 319317bf5..30cfb77f1 100644 --- a/src/do.c +++ b/src/do.c @@ -184,7 +184,7 @@ const char *verb; newsym(x,y); return TRUE; } else if (is_lava(x, y)) { - return fire_damage(obj, FALSE, FALSE, x, y); + return fire_damage(obj, FALSE, x, y); } else if (is_pool(x, y)) { /* Reasonably bulky objects (arbitrary) splash when dropped. * If you're floating above the water even small things make @@ -201,7 +201,7 @@ const char *verb; map_background(x, y, 0); newsym(x, y); } - return water_damage(obj, NULL, FALSE) == 3; + return water_damage(obj, NULL, FALSE) == ER_DESTROYED; } else if (u.ux == x && u.uy == y && (t = t_at(x,y)) != 0 && uteetering_at_seen_pit(t)) { if (Blind && !Deaf) diff --git a/src/dokick.c b/src/dokick.c index c399f6bbc..645eb5cf2 100644 --- a/src/dokick.c +++ b/src/dokick.c @@ -983,7 +983,8 @@ dokick() if(!rn2(3)) goto ouch; /* make metal boots rust */ if(uarmf && rn2(3)) - if (!water_damage(uarmf, "metal boots", TRUE)) { + if (water_damage(uarmf, "metal boots", TRUE) == + ER_NOTHING) { Your("boots get wet."); /* could cause short-lived fumbling here */ } diff --git a/src/fountain.c b/src/fountain.c index 7de917ad9..482b0ed76 100644 --- a/src/fountain.c +++ b/src/fountain.c @@ -402,7 +402,7 @@ register struct obj *obj; if(in_town(u.ux, u.uy)) (void) angry_guards(FALSE); return; - } else if (water_damage(obj, NULL, TRUE)) { + } else if (water_damage(obj, NULL, TRUE) != ER_NOTHING) { if (obj->otyp == POT_ACID) { /* Acid and water don't mix */ useup(obj); return; diff --git a/src/mhitm.c b/src/mhitm.c index 88770c523..6ec4b9833 100644 --- a/src/mhitm.c +++ b/src/mhitm.c @@ -1303,7 +1303,7 @@ register struct obj *obj; dmgtyp = ERODE_BURN; else return; - (void) erode_obj(obj, 0, dmgtyp, TRUE, TRUE); + (void) erode_obj(obj, NULL, dmgtyp, EF_GREASE | EF_VERBOSE); } STATIC_OVL void diff --git a/src/mkobj.c b/src/mkobj.c index 5c7cffb7c..ddfa363d4 100644 --- a/src/mkobj.c +++ b/src/mkobj.c @@ -502,7 +502,7 @@ static const char * const alteration_verbs[] = { "cancel", "drain", "uncharge", "unbless", "uncurse", "disenchant", "degrade", "dilute", "erase", "burn", "neutralize", "destroy", "splatter", "bite", "open", - "break the lock on", + "break the lock on", "rust", "rot", "tarnish" }; /* possibly bill for an object which the player has just modified */ diff --git a/src/mon.c b/src/mon.c index 1c2009a0b..f229cd399 100644 --- a/src/mon.c +++ b/src/mon.c @@ -373,8 +373,8 @@ register struct monst *mtmp; pline("%s burns slightly.", Monnam(mtmp)); } if (mtmp->mhp > 0) { - (void) fire_damage(mtmp->minvent, FALSE, FALSE, - mtmp->mx, mtmp->my); + (void) fire_damage_chain(mtmp->minvent, FALSE, FALSE, mtmp->mx, + mtmp->my); (void) rloc(mtmp, FALSE); return 0; } diff --git a/src/potion.c b/src/potion.c index 4c57eaecb..d4bfcdad3 100644 --- a/src/potion.c +++ b/src/potion.c @@ -1088,7 +1088,7 @@ const char *objphrase; /* "Your widget glows" or "Steed's saddle glows" */ } else { /* dipping into uncursed water; carried() check skips steed saddle */ if (carried(targobj)) { - if (water_damage(targobj, 0, TRUE)) + if (water_damage(targobj, 0, TRUE) != ER_NOTHING) res = TRUE; } } @@ -1839,38 +1839,14 @@ dodip() } if (potion->otyp == POT_ACID) { - if (erode_obj(obj, 0, ERODE_CORRODE, TRUE, FALSE)) + if (erode_obj(obj, 0, ERODE_CORRODE, EF_GREASE) != ER_NOTHING) goto poof; } if (potion->otyp == POT_OIL) { boolean wisx = FALSE; if (potion->lamplit) { /* burning */ - int omat = objects[obj->otyp].oc_material; - /* the code here should be merged with fire_damage */ - if (catch_lit(obj)) { - /* catch_lit does all the work if true */ - } else if (obj->oerodeproof || obj_resists(obj, 5, 95) || - !is_flammable(obj) || obj->oclass == FOOD_CLASS) { - pline("%s %s to burn for a moment but %s unharmed.", - Yname2(obj), otense(obj, "seem"), otense(obj, "are")); - } else { - if ((omat == PLASTIC || omat == PAPER) && !obj->oartifact) - obj->oeroded = MAX_ERODE; - pline_The("burning oil %s %s%c", - obj->oeroded == MAX_ERODE ? "destroys" : "damages", - yname(obj), - obj->oeroded == MAX_ERODE ? '!' : '.'); - costly_alteration(obj, COST_BURN); - if (obj->oeroded == MAX_ERODE) { - if (obj->owornmask) remove_worn_item(obj, TRUE); - obj_extract_self(obj); - obfree(obj, (struct obj *)0); - obj = (struct obj *) 0; - } else { - obj->oeroded++; - } - } + fire_damage(obj, TRUE, u.ux, u.uy); } else if (potion->cursed) { pline_The("potion spills and covers your %s with oil.", makeplural(body_part(FINGER))); diff --git a/src/spell.c b/src/spell.c index 597d4e606..53b8626f0 100644 --- a/src/spell.c +++ b/src/spell.c @@ -144,7 +144,8 @@ cursed_book(bp) case 5: pline_The("book was coated with contact poison!"); if (uarmg) { - erode_obj(uarmg, "gloves", ERODE_CORRODE, TRUE, TRUE); + erode_obj(uarmg, "gloves", ERODE_CORRODE, + EF_GREASE | EF_VERBOSE); break; } /* temp disable in_use; death should not destroy the book */ diff --git a/src/trap.c b/src/trap.c index 6a5cb3755..77b1f92c4 100644 --- a/src/trap.c +++ b/src/trap.c @@ -55,7 +55,7 @@ struct monst *victim; int mat_idx; if (!victim) return 0; -#define burn_dmg(obj,descr) erode_obj(obj, descr, ERODE_BURN, TRUE, FALSE) +#define burn_dmg(obj,descr) erode_obj(obj, descr, ERODE_BURN, EF_GREASE) while (1) { switch (rn2(5)) { case 0: @@ -101,31 +101,34 @@ struct monst *victim; #undef burn_dmg } -/* Generic erode-item function. Returns TRUE if any change in state - * occurred, or if grease protected the item. +/* Generic erode-item function. * "ostr", if non-null, is an alternate string to print instead of the * object's name. - * "check_grease", if FALSE, means that grease is not checked for - * "print", if set, means to print a message even if no change occurs. + * "type" is an ERODE_* value for the erosion type + * "flags" is an or-ed list of EF_* flags + * + * Returns an erosion return value (ER_*) */ -boolean -erode_obj(otmp, ostr, type, check_grease, print) +int +erode_obj(otmp, ostr, type, ef_flags) register struct obj *otmp; register const char *ostr; int type; -boolean check_grease; -boolean print; +int ef_flags; { static NEARDATA const char * const action[] = { "smoulder", "rust", "rot", "corrode" }; static NEARDATA const char * const msg[] = { "burnt", "rusted", "rotten", "corroded" }; boolean vulnerable = FALSE; boolean is_primary = TRUE; + boolean check_grease = ef_flags & EF_GREASE; + boolean print = ef_flags & EF_VERBOSE; int erosion; struct monst *victim; boolean vismon; boolean visobj; + int cost_type; - if (!otmp) return(FALSE); + if (!otmp) return ER_NOTHING; victim = carried(otmp) ? &youmonst : mcarried(otmp) ? otmp->ocarry : NULL; @@ -137,22 +140,26 @@ boolean print; case ERODE_BURN: vulnerable = is_flammable(otmp); check_grease = FALSE; + cost_type = COST_BURN; break; case ERODE_RUST: vulnerable = is_rustprone(otmp); + cost_type = COST_RUST; break; case ERODE_ROT: vulnerable = is_rottable(otmp); check_grease = FALSE; is_primary = FALSE; + cost_type = COST_ROT; break; case ERODE_CORRODE: vulnerable = is_corrodeable(otmp); is_primary = FALSE; + cost_type = COST_CORRODE; break; default: impossible("Invalid erosion type in erode_obj"); - return FALSE; + return ER_NOTHING; } erosion = is_primary ? otmp->oeroded : otmp->oeroded2; @@ -161,7 +168,7 @@ boolean print; if (check_grease && otmp->greased) { grease_protect(otmp, ostr, victim); - return TRUE; + return ER_GREASED; } else if (!vulnerable || (otmp->oerodeproof && otmp->rknown)) { if (print && flags.verbose) { if (victim == &youmonst) @@ -170,7 +177,7 @@ boolean print; pline("%s %s %s not affected.", s_suffix(Monnam(victim)), ostr, vtense(ostr, "are")); } - return FALSE; + return ER_NOTHING; } else if (otmp->oerodeproof || (otmp->blessed && !rnl(4))) { if (flags.verbose && (print || otmp->oerodeproof)) { if (victim == &youmonst) @@ -188,9 +195,13 @@ boolean print; * is blessed, it still shows some minor signs of wear, and * the hero can distinguish this from an object that is * actually proof against damage. */ - if (otmp->oerodeproof) + if (otmp->oerodeproof) { otmp->rknown = TRUE; - return FALSE; + if (victim == &youmonst) + update_inventory(); + } + + return ER_NOTHING; } else if (erosion < MAX_ERODE) { const char *adverb = (erosion + 1 == MAX_ERODE) ? " completely" : erosion ? " further" : ""; @@ -198,19 +209,39 @@ boolean print; if (victim == &youmonst) Your("%s %s%s!", ostr, vtense(ostr, action[type]), adverb); else if (vismon) - pline("%s's %s %s%s!", Monnam(victim), ostr, + pline("%s %s %s%s!", s_suffix(Monnam(victim)), ostr, vtense(ostr, action[type]), adverb); else if (visobj) pline("The %s %s%s!", ostr, vtense(ostr, action[type]), adverb); + if (ef_flags & EF_PAY) + costly_alteration(otmp, cost_type); + if (is_primary) otmp->oeroded++; else otmp->oeroded2++; - update_inventory(); - return TRUE; - } else { + if (victim == &youmonst) + update_inventory(); + + return ER_DAMAGED; + } else if (ef_flags & EF_DESTROY) { + if (victim == &youmonst) + Your("%s %s away!", ostr, vtense(ostr, action[type])); + else if (vismon) + pline("%s %s %s away!", s_suffix(Monnam(victim)), ostr, + vtense(ostr, action[type])); + else if (visobj) + pline("The %s %s away!", ostr, vtense(ostr, action[type])); + + if (ef_flags & EF_PAY) + costly_alteration(otmp, cost_type); + + setnotworn(otmp); + delobj(otmp); + return ER_DESTROYED; + } else { if (flags.verbose && print) { if (victim == &youmonst) Your("%s %s completely %s.", ostr, @@ -224,7 +255,7 @@ boolean print; pline("The %s %s completely %s.", ostr, vtense(ostr, "look"), msg[type]); } - return FALSE; + return ER_NOTHING; } } @@ -952,7 +983,7 @@ unsigned trflags; case 1: pline("%s your left %s!", A_gush_of_water_hits, body_part(ARM)); - if (water_damage(uarms, "shield", TRUE)) + if (water_damage(uarms, "shield", TRUE) != ER_NOTHING) break; if (u.twoweap || (uwep && bimanual(uwep))) (void) water_damage(u.twoweap ? uswapwep : uwep, 0, @@ -2097,7 +2128,7 @@ register struct monst *mtmp; pline("%s %s's left %s!", A_gush_of_water_hits, mon_nam(mtmp), mbodypart(mtmp, ARM)); target = which_armor(mtmp, W_ARMS); - if (water_damage(target, "shield", TRUE)) + if (water_damage(target, "shield", TRUE) != ER_NOTHING) break; target = MON_WEP(mtmp); if (target && bimanual(target)) @@ -2972,104 +3003,118 @@ domagictrap() } } -/* - * Scrolls, spellbooks, potions, and flammable items - * may get affected by the fire. +/* Set an item on fire. + * "force" means not to roll a luck-based protection check for the + * item. + * "x" and "y" are the coordinates to dump the contents of a + * container, if it burns up. * - * Return number of objects destroyed. --ALI + * Return whether the object was destroyed. */ -int -fire_damage(chain, force, here, x, y) -struct obj *chain; -boolean force, here; +boolean +fire_damage(obj, force, x, y) +struct obj *obj; +boolean force; xchar x, y; { int chance; - struct obj *obj, *otmp, *nobj, *ncobj; + struct obj *otmp, *ncobj; int retval = 0; int in_sight = !Blind && couldsee(x, y); /* Don't care if it's lit */ int dindx; + /* object might light in a controlled manner */ + if (catch_lit(obj)) + return FALSE; + + if (Is_container(obj)) { + switch (obj->otyp) { + case ICE_BOX: + return FALSE; /* Immune */ + case CHEST: + chance = 40; + break; + case LARGE_BOX: + chance = 30; + break; + default: + chance = 20; + break; + } + if ((!force && (Luck + 5) > rn2(chance)) || + (is_flammable(obj) && obj->oerodeproof)) + return FALSE; + /* Container is burnt up - dump contents out */ + if (in_sight) pline("%s catches fire and burns.", Yname2(obj)); + if (Has_contents(obj)) { + if (in_sight) pline("Its contents fall out."); + for (otmp = obj->cobj; otmp; otmp = ncobj) { + ncobj = otmp->nobj; + obj_extract_self(otmp); + if (!flooreffects(otmp, x, y, "")) + place_object(otmp, x, y); + } + } + setnotworn(obj); + delobj(obj); + return TRUE; + } else if (!force && (Luck + 5) > rn2(20)) { + /* chance per item of sustaining damage: + * max luck (Luck==13): 10% + * avg luck (Luck==0): 75% + * awful luck (Luck<-4): 100% + */ + return FALSE; + } else if (obj->oclass == SCROLL_CLASS || obj->oclass == SPBOOK_CLASS) { + if (obj->otyp == SCR_FIRE || obj->otyp == SPE_FIREBALL) + return FALSE; + if (obj->otyp == SPE_BOOK_OF_THE_DEAD) { + if (in_sight) pline("Smoke rises from %s.", the(xname(obj))); + return FALSE; + } + dindx = (obj->oclass == SCROLL_CLASS) ? 3 : 4; + if (in_sight) + pline("%s %s.", Yname2(obj), + destroy_strings[dindx][(obj->quan > 1L)]); + setnotworn(obj); + delobj(obj); + return TRUE; + } else if (obj->oclass == POTION_CLASS) { + dindx = (obj->otyp != POT_OIL) ? 1 : 2; + if (in_sight) + pline("%s %s.", Yname2(obj), + destroy_strings[dindx][(obj->quan > 1L)]); + setnotworn(obj); + delobj(obj); + return TRUE; + } else if (erode_obj(obj, NULL, ERODE_BURN, EF_DESTROY) == ER_DESTROYED) { + return TRUE; + } + return FALSE; +} + +/* + * Apply fire_damage() to an entire chain. + * + * Return number of objects destroyed. --ALI + */ +int +fire_damage_chain(chain, force, here, x, y) +struct obj *chain; +boolean force, here; +xchar x, y; +{ + struct obj *obj, *nobj; + int num = 0; for (obj = chain; obj; obj = nobj) { nobj = here ? obj->nexthere : obj->nobj; - - /* object might light in a controlled manner */ - if (catch_lit(obj)) - continue; - - if (Is_container(obj)) { - switch (obj->otyp) { - case ICE_BOX: - continue; /* Immune */ - /*NOTREACHED*/ - break; - case CHEST: - chance = 40; - break; - case LARGE_BOX: - chance = 30; - break; - default: - chance = 20; - break; - } - if ((!force && (Luck + 5) > rn2(chance)) || - (is_flammable(obj) && obj->oerodeproof)) - continue; - /* Container is burnt up - dump contents out */ - if (in_sight) pline("%s catches fire and burns.", Yname2(obj)); - if (Has_contents(obj)) { - if (in_sight) pline("Its contents fall out."); - for (otmp = obj->cobj; otmp; otmp = ncobj) { - ncobj = otmp->nobj; - obj_extract_self(otmp); - if (!flooreffects(otmp, x, y, "")) - place_object(otmp, x, y); - } - } - delobj(obj); - retval++; - } else if (!force && (Luck + 5) > rn2(20)) { - /* chance per item of sustaining damage: - * max luck (Luck==13): 10% - * avg luck (Luck==0): 75% - * awful luck (Luck<-4): 100% - */ - continue; - } else if (obj->oclass == SCROLL_CLASS || obj->oclass == SPBOOK_CLASS) { - if (obj->otyp == SCR_FIRE || obj->otyp == SPE_FIREBALL) - continue; - if (obj->otyp == SPE_BOOK_OF_THE_DEAD) { - if (in_sight) pline("Smoke rises from %s.", the(xname(obj))); - continue; - } - dindx = (obj->oclass == SCROLL_CLASS) ? 3 : 4; - if (in_sight) - pline("%s %s.", Yname2(obj), - destroy_strings[dindx][(obj->quan > 1L)]); - delobj(obj); - retval++; - } else if (obj->oclass == POTION_CLASS) { - dindx = (obj->otyp != POT_OIL) ? 1 : 2; - if (in_sight) - pline("%s %s.", Yname2(obj), - destroy_strings[dindx][(obj->quan > 1L)]); - delobj(obj); - retval++; - } else if (is_flammable(obj) && obj->oeroded < MAX_ERODE && - !(obj->oerodeproof || (obj->blessed && !rnl(4)))) { - if (in_sight) { - pline("%s %s%s.", Yname2(obj), otense(obj, "burn"), - obj->oeroded+1 == MAX_ERODE ? " completely" : - obj->oeroded ? " further" : ""); - } - obj->oeroded++; - } + if (fire_damage(obj, force, x, y)) + ++num; } - if (retval && !in_sight) + if (num && (Blind && !couldsee(x, y))) You("smell smoke."); - return retval; + return num; } void @@ -3101,14 +3146,14 @@ struct obj *obj; obj->spe = 0; obj->dknown = 0; } else - erode_obj(obj, NULL, ERODE_CORRODE, TRUE, TRUE); + erode_obj(obj, NULL, ERODE_CORRODE, EF_GREASE | EF_VERBOSE); } -/* returns: - * 0 if obj is unaffected - * 1 if obj is protected by grease - * 2 if obj is changed but survived - * 3 if obj is destroyed +/* Get an object wet and damage it appropriately. + * "ostr", if present, is used instead of the object name in some + * messages. + * "force" means not to roll luck to protect some objects. + * Returns an erosion return value (ER_*) */ int water_damage(obj, ostr, force) @@ -3119,25 +3164,25 @@ boolean force; boolean loose_obj = (obj && obj->where == OBJ_FREE), exploded = FALSE; if (snuff_lit(obj)) - return 2; + return ER_DAMAGED; if(obj->otyp == CAN_OF_GREASE && obj->spe > 0) { - return 0; + return ER_NOTHING; } else if(obj->greased) { if (!rn2(2)) obj->greased = 0; if (carried(obj)) update_inventory(); - return 1; + return ER_GREASED; } else if(Is_container(obj) && !Is_box(obj) && (obj->otyp != OILSKIN_SACK || (obj->cursed && !rn2(3)))) { water_damage_chain(obj->cobj, FALSE); - return 0; + return ER_NOTHING; } else if (!force && (Luck + 5) > rn2(20)) { /* chance per item of sustaining damage: * max luck: 10% * avg luck (Luck==0): 75% * awful luck (Luck<-4): 100% */ - return 0; + return ER_NOTHING; } else if (obj->oclass == SCROLL_CLASS) { #ifdef MAIL if (obj->otyp == SCR_MAIL) return 0; @@ -3147,7 +3192,7 @@ boolean force; obj->spe = 0; if (carried(obj)) update_inventory(); - return 2; + return ER_DAMAGED; } else if (obj->oclass == SPBOOK_CLASS) { if (obj->otyp == SPE_BOOK_OF_THE_DEAD) { pline("Steam rises from %s.", the(xname(obj))); @@ -3157,7 +3202,7 @@ boolean force; obj->dknown = 0; if (carried(obj)) update_inventory(); - return 2; + return ER_DAMAGED; } else if (obj->oclass == POTION_CLASS) { if (obj->otyp == POT_ACID) { char *bufp, buf[BUFSZ]; @@ -3177,10 +3222,11 @@ boolean force; obj_extract_self() takes care of this; for loose_obj, obj should always equal *objp and otmp should always be null] */ + setnotworn(obj); delobj(obj); if (update) update_inventory(); - return 3; + return ER_DESTROYED; } else if (obj->odiluted) { obj->otyp = POT_WATER; obj->dknown = 0; @@ -3188,17 +3234,17 @@ boolean force; obj->odiluted = 0; if (carried(obj)) update_inventory(); - return 2; + return ER_DAMAGED; } else if (obj->otyp != POT_WATER) { obj->odiluted++; if (carried(obj)) update_inventory(); - return 2; + return ER_DAMAGED; } } else { - return erode_obj(obj, ostr, ERODE_RUST, FALSE, FALSE) ? 2 : 0; + return erode_obj(obj, ostr, ERODE_RUST, EF_NONE); } - return 0; + return ER_NOTHING; } void diff --git a/src/uhitm.c b/src/uhitm.c index b594fd863..21de567e5 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -47,34 +47,38 @@ int hurt; switch(rn2(5)) { case 0: target = which_armor(mdef, W_ARMH); - if (!target || !erode_obj(target, xname(target), hurt, TRUE, FALSE)) + if (!target || + erode_obj(target, xname(target), hurt, EF_GREASE) == ER_NOTHING) continue; break; case 1: target = which_armor(mdef, W_ARMC); if (target) { - (void)erode_obj(target, xname(target), hurt, TRUE, TRUE); + (void)erode_obj(target, xname(target), hurt, EF_GREASE | EF_VERBOSE); break; } if ((target = which_armor(mdef, W_ARM)) != (struct obj *)0) { - (void)erode_obj(target, xname(target), hurt, TRUE, TRUE); + (void)erode_obj(target, xname(target), hurt, EF_GREASE | EF_VERBOSE); } else if ((target = which_armor(mdef, W_ARMU)) != (struct obj *)0) { - (void)erode_obj(target, xname(target), hurt, TRUE, TRUE); + (void)erode_obj(target, xname(target), hurt, EF_GREASE | EF_VERBOSE); } break; case 2: target = which_armor(mdef, W_ARMS); - if (!target || !erode_obj(target, xname(target), hurt, TRUE, FALSE)) + if (!target || + erode_obj(target, xname(target), hurt, EF_GREASE) == ER_NOTHING) continue; break; case 3: target = which_armor(mdef, W_ARMG); - if (!target || !erode_obj(target, xname(target), hurt, TRUE, FALSE)) + if (!target || + erode_obj(target, xname(target), hurt, EF_GREASE) == ER_NOTHING) continue; break; case 4: target = which_armor(mdef, W_ARMF); - if (!target || !erode_obj(target, xname(target), hurt, TRUE, FALSE)) + if (!target || + erode_obj(target, xname(target), hurt, EF_GREASE) == ER_NOTHING) continue; break; } @@ -2222,7 +2226,8 @@ boolean wep_was_destroyed; if(mhit && !mon->mcan) { if (aatyp == AT_KICK) { if (uarmf && !rn2(6)) - (void)erode_obj(uarmf, xname(uarmf), ERODE_BURN, TRUE, TRUE); + (void)erode_obj(uarmf, xname(uarmf), ERODE_BURN, + EF_GREASE | EF_VERBOSE); } else if (aatyp == AT_WEAP || aatyp == AT_CLAW || aatyp == AT_MAGC || aatyp == AT_TUCH) passive_obj(mon, (struct obj*)0, &(ptr->mattk[i])); @@ -2242,7 +2247,8 @@ boolean wep_was_destroyed; if (mhit) { if (aatyp == AT_KICK) { if (uarmf && !rn2(6)) - (void)erode_obj(uarmf, xname(uarmf), ERODE_CORRODE, TRUE, TRUE); + (void)erode_obj(uarmf, xname(uarmf), ERODE_CORRODE, + EF_GREASE | EF_VERBOSE); } else if (aatyp == AT_WEAP || aatyp == AT_CLAW || aatyp == AT_MAGC || aatyp == AT_TUCH) passive_obj(mon, (struct obj*)0, &(ptr->mattk[i])); @@ -2275,7 +2281,8 @@ boolean wep_was_destroyed; if(mhit && !mon->mcan) { if (aatyp == AT_KICK) { if (uarmf) - (void)erode_obj(uarmf, xname(uarmf), ERODE_RUST, TRUE, TRUE); + (void)erode_obj(uarmf, xname(uarmf), ERODE_RUST, + EF_GREASE | EF_VERBOSE); } else if (aatyp == AT_WEAP || aatyp == AT_CLAW || aatyp == AT_MAGC || aatyp == AT_TUCH) passive_obj(mon, (struct obj*)0, &(ptr->mattk[i])); @@ -2285,7 +2292,8 @@ boolean wep_was_destroyed; if(mhit && !mon->mcan) { if (aatyp == AT_KICK) { if (uarmf) - (void)erode_obj(uarmf, xname(uarmf), ERODE_CORRODE, TRUE, TRUE); + (void)erode_obj(uarmf, xname(uarmf), ERODE_CORRODE, + EF_GREASE | EF_VERBOSE); } else if (aatyp == AT_WEAP || aatyp == AT_CLAW || aatyp == AT_MAGC || aatyp == AT_TUCH) passive_obj(mon, (struct obj*)0, &(ptr->mattk[i])); @@ -2446,22 +2454,22 @@ struct attack *mattk; /* null means we find one internally */ case AD_FIRE: if(!rn2(6) && !mon->mcan) { - (void) erode_obj(obj, 0, ERODE_BURN, FALSE, FALSE); + (void) erode_obj(obj, NULL, ERODE_BURN, EF_NONE); } break; case AD_ACID: if(!rn2(6)) { - (void) erode_obj(obj, 0, ERODE_CORRODE, FALSE, FALSE); + (void) erode_obj(obj, NULL, ERODE_CORRODE, EF_NONE); } break; case AD_RUST: if(!mon->mcan) { - (void) erode_obj(obj, 0, ERODE_RUST, FALSE, FALSE); + (void) erode_obj(obj, NULL, ERODE_RUST, EF_NONE); } break; case AD_CORR: if(!mon->mcan) { - (void) erode_obj(obj, 0, ERODE_CORRODE, FALSE, FALSE); + (void) erode_obj(obj, NULL, ERODE_CORRODE, EF_NONE); } break; case AD_ENCH: From bd62873ee25a50c9bef3fbf95fcc39c2c0240efd Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Sun, 1 Mar 2015 12:02:38 -0500 Subject: [PATCH 062/132] Print lava item destructions only if surviving. This partially reverts commit 72c2ae233d35076adece2e8d02a7f8839e4a5aa8 in order to prevent players from using hangups during the destruction messages to save themselves. --- src/trap.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/trap.c b/src/trap.c index 77b1f92c4..7efe8db00 100644 --- a/src/trap.c +++ b/src/trap.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 trap.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 trap.c $NHDT-Date: 1425318721 2015/03/02 17:52:01 $ $NHDT-Branch: master $:$NHDT-Revision: 1.194 $ */ /* NetHack 3.5 trap.c $Date: 2013/03/14 01:58:21 $ $Revision: 1.179 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -4737,6 +4737,9 @@ lava_effects() } else You("fall into the lava!"); + usurvive = Lifesaved || discover; + if (wizard) usurvive = TRUE; + /* prevent remove_worn_item() -> Boots_off(WATER_WALKING_BOOTS) -> spoteffects() -> lava_effects() recursion which would successfully delete (via useupall) the no-longer-worn boots; @@ -4748,16 +4751,18 @@ lava_effects() obj2 = obj->nobj; /* above, we set in_use for objects which are to be destroyed */ if (obj->otyp == SPE_BOOK_OF_THE_DEAD && !Blind) { - pline("%s glows a strange %s, but remains intact.", - The(xname(obj)), hcolor("dark red")); + if (usurvive) + pline("%s glows a strange %s, but remains intact.", + The(xname(obj)), hcolor("dark red")); } else if (obj->in_use) { if (obj->owornmask) { - pline("%s into flame!", Yobjnam2(obj, "burst")); + if (usurvive) + pline("%s into flame!", Yobjnam2(obj, "burst")); remove_worn_item(obj, TRUE); } useupall(obj); } - } + } iflags.in_lava_effects--; From d829b92f0e58d18c78c8b857d2eaae6a05f58351 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Mon, 2 Mar 2015 20:10:18 +0200 Subject: [PATCH 063/132] Sanitize petnames and fruit to prevent escape codes --- doc/fixes35.0 | 1 + src/options.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/doc/fixes35.0 b/doc/fixes35.0 index d3f6b1a90..1e31bf65a 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -865,6 +865,7 @@ all sources of erosion now affect objects the same way passive attacks no longer erode armor covered by other armor dipping a fooproof item into acid no longer forgets that it's fooproof dipping a container into uncursed water now gets its contents wet +sanitize petnames and fruit to prevent escape codes Platform- and/or Interface-Specific Fixes ----------------------------------------- diff --git a/src/options.c b/src/options.c index 54ad99efc..229c2df91 100644 --- a/src/options.c +++ b/src/options.c @@ -1300,6 +1300,7 @@ boolean tinitial, tfrom_file; if (negated) bad_negation(fullname, FALSE); else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) nmcpy(catname, op, PL_PSIZ); + sanitize_name(catname); return; } @@ -1309,6 +1310,7 @@ boolean tinitial, tfrom_file; if (negated) bad_negation(fullname, FALSE); else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) nmcpy(dogname, op, PL_PSIZ); + sanitize_name(dogname); return; } @@ -1318,6 +1320,7 @@ boolean tinitial, tfrom_file; if (negated) bad_negation(fullname, FALSE); else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) nmcpy(horsename, op, PL_PSIZ); + sanitize_name(horsename); return; } @@ -1662,6 +1665,7 @@ boolean tinitial, tfrom_file; } goodfruit: nmcpy(pl_fruit, op, PL_FSIZ); + sanitize_name(pl_fruit); /* OBJ_NAME(objects[SLIME_MOLD]) won't work after initialization */ if (!*pl_fruit) nmcpy(pl_fruit, "slime mold", PL_FSIZ); From 748d9ea55b74c92d17226b3b36f91c73170238ae Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Mon, 2 Mar 2015 20:21:34 +0200 Subject: [PATCH 064/132] Fix segfault when MD termcap is not defined --- win/tty/termcap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/win/tty/termcap.c b/win/tty/termcap.c index 563491c48..b06a9abfe 100644 --- a/win/tty/termcap.c +++ b/win/tty/termcap.c @@ -847,6 +847,7 @@ init_hilite() hilites[CLR_GRAY] = hilites[NO_COLOR] = (char *)0; if (tgetnum("Co") < 8 + || (MD == NULL) || (strlen(MD) == 0) || ((setf = tgetstr("AF", (char **)0)) == (char *)0 && (setf = tgetstr("Sf", (char **)0)) == (char *)0)) return; From f64e530bff1bc35146e1eb947db6b7127f9e0259 Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Mon, 2 Mar 2015 13:11:24 -0500 Subject: [PATCH 065/132] Make a few fixes to code that was confusing indent --- src/dog.c | 18 +++++++----------- src/end.c | 2 +- src/mon.c | 3 ++- sys/msdos/pctiles.c | 4 ++-- sys/msdos/vidvga.c | 9 +++++---- 5 files changed, 17 insertions(+), 19 deletions(-) diff --git a/src/dog.c b/src/dog.c index ff7dd525d..d8ab09e4f 100644 --- a/src/dog.c +++ b/src/dog.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 dog.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 dog.c $NHDT-Date: 1425319883 2015/03/02 18:11:23 $ $NHDT-Branch: master $:$NHDT-Revision: 1.39 $ */ /* NetHack 3.5 dog.c $Date: 2011/04/15 01:55:42 $ $Revision: 1.37 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -295,16 +295,12 @@ boolean with_you; num_segs = mtmp->wormno; /* baby long worms have no tail so don't use is_longworm() */ - if ((mtmp->data == &mons[PM_LONG_WORM]) && -#ifdef DCC30_BUG - (mtmp->wormno = get_wormno(), mtmp->wormno != 0)) -#else - (mtmp->wormno = get_wormno()) != 0) -#endif - { - initworm(mtmp, num_segs); - /* tail segs are not yet initialized or displayed */ - } else mtmp->wormno = 0; + if (mtmp->data == &mons[PM_LONG_WORM]) { + mtmp->wormno = get_wormno(); + if (mtmp->wormno) + initworm(mtmp, num_segs); + } else + mtmp->wormno = 0; /* some monsters might need to do something special upon arrival _after_ the current level has been fully set up; see dochug() */ diff --git a/src/end.c b/src/end.c index f7e7f5ec3..995ef8ec7 100644 --- a/src/end.c +++ b/src/end.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 end.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 end.c $NHDT-Date: 1425319883 2015/03/02 18:11:23 $ $NHDT-Branch: master $:$NHDT-Revision: 1.81 $ */ /* NetHack 3.5 end.c $Date: 2012/04/09 02:56:30 $ $Revision: 1.79 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/mon.c b/src/mon.c index f229cd399..82457199a 100644 --- a/src/mon.c +++ b/src/mon.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 mon.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mon.c $NHDT-Date: 1425319883 2015/03/02 18:11:23 $ $NHDT-Branch: master $:$NHDT-Revision: 1.137 $ */ /* NetHack 3.5 mon.c $Date: 2012/05/16 02:15:10 $ $Revision: 1.126 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -32,6 +32,7 @@ STATIC_DCL struct permonst *FDECL(accept_newcham_form, (int)); /* part of the original warning code which was replaced in 3.3.1 */ const char *warnings[] = { "white", "pink", "red", "ruby", "purple", "black" +}; #endif /* 0 */ STATIC_DCL struct obj *FDECL(make_corpse,(struct monst *, unsigned)); diff --git a/sys/msdos/pctiles.c b/sys/msdos/pctiles.c index e60c26f7a..fb294067a 100644 --- a/sys/msdos/pctiles.c +++ b/sys/msdos/pctiles.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 pctiles.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 pctiles.c $NHDT-Date: 1425319883 2015/03/02 18:11:23 $ $NHDT-Branch: master $:$NHDT-Revision: 1.5 $ */ /* NetHack 3.5 pctiles.c $Date: 2009/05/06 10:49:39 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)pctiles.c 3.5 1995/07/31 */ /* Copyright (c) NetHack PC Development Team 1993, 1994 */ @@ -241,7 +241,7 @@ char (*pta)[TILE_X]; long fpos; fpos = ((long)(tilenum) * (long)(TILE_Y * TILE_X) + - (long)TIBHEADER_SIZE; + (long)TIBHEADER_SIZE); if (fseek(tilefile,fpos,SEEK_SET)) { return 1; } else { diff --git a/sys/msdos/vidvga.c b/sys/msdos/vidvga.c index 0784cf007..e93810fea 100644 --- a/sys/msdos/vidvga.c +++ b/sys/msdos/vidvga.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 vidvga.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 vidvga.c $NHDT-Date: 1425319884 2015/03/02 18:11:24 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ */ /* NetHack 3.5 vidvga.c $Date: 2009/05/06 10:49:50 $ $Revision: 1.9 $ */ /* SCCS Id: @(#)vidvga.c 3.5 2006/07/08 */ /* Copyright (c) NetHack PC Development Team 1995 */ @@ -627,12 +627,13 @@ boolean left; for (y = 0; y < ROWNO; ++y) { for (x = i; x < j; x += 2) { t = map[y][x].glyph; - if (!ReadPlanarTileFile(glyph2tile[t], &planecell)) + if (!ReadPlanarTileFile(glyph2tile[t], &planecell)) { if (map[y][x].special) decal_planar(planecell, map[y][x].special); vga_DisplayCell(planecell, x - clipx, y + TOP_MAP_ROW); - else + } else { pline("vga_shiftmap: Error reading tile (%d,%d)", - t, glyph2tile[t]); + t, glyph2tile[t]); + } } } } From 9da976f004e2ec22921772a802623fc31a4ccdd2 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Mon, 2 Mar 2015 20:34:25 +0200 Subject: [PATCH 066/132] Fix TTY crashing when a location has more than 32k items --- include/wintty.h | 12 ++++++------ win/tty/wintty.c | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/wintty.h b/include/wintty.h index 507804a9f..76007ed3f 100644 --- a/include/wintty.h +++ b/include/wintty.h @@ -29,9 +29,9 @@ struct WinDesc { xchar type; /* type of window */ boolean active; /* true if window is active */ short offx, offy; /* offset from topleft of display */ - short rows, cols; /* dimensions */ - short curx, cury; /* current cursor position */ - short maxrow, maxcol; /* the maximum size used -- for MENU wins */ + long rows, cols; /* dimensions */ + long curx, cury; /* current cursor position */ + long maxrow, maxcol; /* the maximum size used -- for MENU wins */ /* maxcol is also used by WIN_MESSAGE for */ /* tracking the ^P command */ short *datlen; /* allocation size for *data */ @@ -39,9 +39,9 @@ struct WinDesc { char *morestr; /* string to display instead of default */ tty_menu_item *mlist; /* menu information (MENU) */ tty_menu_item **plist; /* menu page pointers (MENU) */ - short plist_size; /* size of allocated plist (MENU) */ - short npages; /* number of pages in menu (MENU) */ - short nitems; /* total number of items (MENU) */ + long plist_size; /* size of allocated plist (MENU) */ + long npages; /* number of pages in menu (MENU) */ + long nitems; /* total number of items (MENU) */ short how; /* menu mode - pick 1 or N (MENU) */ char menu_ch; /* menu char (MENU) */ }; diff --git a/win/tty/wintty.c b/win/tty/wintty.c index a526897b7..67b0243d4 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -1997,7 +1997,7 @@ tty_putstr(window, attr, str) register struct WinDesc *cw = 0; register char *ob; register const char *nb; - register int i, j, n0; + register long i, j, n0; /* Assume there's a real problem if the window is missing -- * probably a panic message @@ -2375,7 +2375,7 @@ tty_end_menu(window, prompt) if (cw->npages > 1) { char buf[QBUFSZ]; /* produce the largest demo string */ - Sprintf(buf, "(%d of %d) ", cw->npages, cw->npages); + Sprintf(buf, "(%ld of %ld) ", cw->npages, cw->npages); len = strlen(buf); cw->morestr = copy_of(""); } else { From 23f213bc63bada1a4ae39c98988721cbe4717d74 Mon Sep 17 00:00:00 2001 From: keni Date: Mon, 2 Mar 2015 16:32:29 -0500 Subject: [PATCH 067/132] Fix NHtext when GIT_DIR is not defined. --- DEVEL/hooksdir/NHtext | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/DEVEL/hooksdir/NHtext b/DEVEL/hooksdir/NHtext index 861b9e6b1..0cc065db3 100755 --- a/DEVEL/hooksdir/NHtext +++ b/DEVEL/hooksdir/NHtext @@ -15,6 +15,13 @@ use strict; sub git_config { my($section, $var) = @_; local($_); + # Sigh. Without GIT_DIR we have to do it the slow way, and sometimes we don't + # have GIT_DIR. + if(0 == length($ENV{GIT_DIR})){ + my $raw = `git config --local --get $section.$var`; + chomp($raw); + return $raw + } open(CONFIG, "<", "$ENV{GIT_DIR}/config") or die "Missing .git/config: $!"; while(){ m/^\[$section]/ && do { From 4a0935114ccf390d7e9e20d1decdfad63e247902 Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 3 Mar 2015 20:13:51 -0500 Subject: [PATCH 068/132] Updated README On 3/1/2015 10:37 AM, coppro wrote: > >> Sun SPARC based machine running SunOS 4.x, Solaris 2.x, or > Solaris 7 > > By release time, I should have access to a BSD flavour installed on a SPARC > machine. Would out be helpful for me to do cursory tests? On 3/1/2015 10:41 AM, lorimer wrote: > I have access to a Borland environment too, so I'll be > borrowing that at some point. [Just not soon.] I didn't include the above, just in case they don't happen. The README can, of course, be updated again once they have been tried. --- README | 162 +++++++++++++++++++++++---------------------------------- 1 file changed, 64 insertions(+), 98 deletions(-) diff --git a/README b/README index e38bf2e83..1d4b8063d 100644 --- a/README +++ b/README @@ -1,18 +1,27 @@ - NetHack 3.5.0 -- General information + NetHack 3.6.0 -- General information -NetHack 3.5 is an enhancement to the dungeon exploration game NetHack. +NetHack 3.6 is an enhancement to the dungeon exploration game NetHack. It is a distant descendent of Rogue and Hack, and a direct descendent of -NetHack 3.4. +NetHack 3.4. In order to avoid confusion with interim development code +that was posted online in 2014 by others, there is no NetHack 3.5 release. -NetHack 3.5.0 has many new features. - * List new features here +NetHack 3.6.0 contains some code reorganization, new features, and bugfixes. -A fuller list of changes for this release can be found in the file -doc/fixes35.0 in the source distribution. The text in there was written -for the development team's own use and is provided "as is", so please do -not ask us to further explain the entries in that file. +The file doc/fixes36.0 in the source disribution has a full list of each. +The text in there was written for the development team's own use and is +provided "as is", so please do not ask us to further explain the entries +in that file. Some entries might be considered "spoilers", particularly +in the "new features" section. + +Here are some additional general notes that are not considered spoilers: + * Some code paths and long-established game features have been made + part of the base build and no longer conditional on compile settings. + * Save files and bones files should be compatible across platforms and + machine architectures. + * The following treasured NetHack community patches, or a variation of + them, have been rolled in to the base NetHack source tree: menucolors, + pickup thrown, statue glyphs, . -If you are a developer, please see the file DEVEL/Developer.txt. - - - - - - - - - - - Please read items (1), (2) and (3) BEFORE doing anything with your new code. @@ -21,64 +30,28 @@ Please read items (1), (2) and (3) BEFORE doing anything with your new code. directory as the 'Top' directory. It makes no difference what you call it. -2. If there is no flaw in the packaging, many sub-directories will be - automatically created, and files will be deposited in them: +2. Having unpacked, you should have a file called 'Files' in your Top + directory. - a. A 'dat' directory, which contains a variety of data files. - b. A 'doc' directory, which contains various documentation. - c. An 'include' directory, which contains *.h files. - d. A 'src' directory, which contains game *.c files used by all versions. - e. A 'util' directory, which contains files for utility programs. - f. A 'sys' directory, which contains subdirectories for files that - are operating-system specific. - g. A 'sys/share' subdirectory, which contains files shared by some OSs. - h. A 'sys/share/sounds' subsubdirectory, which contains sound files - shared by some OSs. - i. A 'sys/amiga' subdirectory, which contains files specific to AmigaDOS. - j. A 'sys/atari' subdirectory, which contains files specific to TOS. - k. A 'sys/be' subdirectory, which contains files specific to Be OS. - l. A 'sys/mac' subdirectory, which contains files specific to MacOS. - m. A 'sys/msdos' subdirectory, which contains files specific to MS-DOS. - n. A 'sys/os2' subdirectory, which contains files specific to OS/2. - o. A 'sys/unix' subdirectory, which contains files specific to UNIX. - p. A 'sys/vms' subdirectory, which contains files specific to VMS. - q. A 'sys/wince' subdirectory, which contains files specific to Windows CE. - r. A 'sys/wince/ceinc' subdirectory; header files for Windows CE - s. A 'sys/wince/ceinc/sys' subdirectory; ditto - t. A 'sys/winnt' subdirectory, which contains files specific to Windows NT. - u. A 'win' directory, which contains subdirectories for files that - are windowing-system specific (but not operating-system specific). - v. A 'win/share' subdirectory, which contains files shared by some - windowing systems. - w. A 'win/Qt' subdirectory, which contains files specific to Qt. - x. A 'win/X11' subdirectory, which contains files specific to X11. - y. A 'win/gem' subdirectory, which contains files specific to GEM. - z. A 'win/gnome' subdirectory, which contains files specific to GNOME. - A. A 'win/tty' subdirectory, which contains files specific to ttys. - B. A 'win/win32' subdirectory, which contains files specific to the - Windows Win32 API. - C. A 'DEVEL' directory, which contains files for NetHack developers. - - The names of these directories should not be changed unless you are - ready to go through the makefiles and the makedefs program and change - all the directory references in them. - -3. Having unpacked, you should have a file called 'Files' in your Top - directory. This file contains the list of all the files you now SHOULD + This file contains the list of all the files you now SHOULD have in each directory. Please check the files in each directory against this list to make sure that you have a complete set. -4. Before you do anything else, please read carefully the file called + This file also contains a list of what files are created during + the build process. + + The names of the directories listed should not be changed unless you + are ready to go through the makefiles and the makedefs program and change + all the directory references in them. + +3. Before you do anything else, please read carefully the file called "license" in the 'dat' subdirectory. It is expected that you comply with the terms of that license, and we are very serious about it. -5. If everything is in order, you can now turn to trying to get the program +4. If everything is in order, you can now turn to trying to get the program to compile and run on your particular system. It is worth mentioning that the default configuration is SysV/Sun/Solaris2.x (simply because - the code was housed on such a system). It is also worth mentioning - here that NetHack 3.5 is a huge program. If you intend to run it on a - small machine, you'll have to make hard choices among the options - available in config.h. + the code was housed on such a system). The files sys/*/Install.* were written to guide you in configuring the program for your operating system. The files win/*/Install.* are @@ -86,21 +59,21 @@ Please read items (1), (2) and (3) BEFORE doing anything with your new code. for particular windowing environments. Reading them, and the man pages, should answer most of your questions. - At the time of this release, NetHack 3.5 is known to run/compile on: + At the time of this release, NetHack 3.6 has been tested to run/compile on: - Intel 80386 or greater (or clone) boxes running Linux, BSDI, or - Windows NT/XP/2000/2003/2008 - Intel Pentium or better (or clone) running BeOS 4.5 + Intel Pentium or better (or clone) running Linux, BSDI, or + Windows (XP through 8.1) + Intel 80386 or greater (or clone) boxes running Linux, or BSDI Sun SPARC based machine running SunOS 4.x, Solaris 2.x, or Solaris 7 + Mac OS X 10.9 should be added to the list. - - Previous versions of NetHack were tested on the following systems, - and with a little work we expect that NetHack 3.5 will work on them - as well: + Previous versions of NetHack were tested and known to run on the + following systems, but it is unknown if they can still build and + execute NetHack 3.6: Apple Macintosh running MacOS 7.5 or higher, LinuxPPC, BeOS 4.0 Atari ST/TT/Falcon running TOS (or MultiTOS) with GCC - AT&T 3B1 running System V (3.51) + AT&T 3B1 running System V (3.61) AT&T 3B2/600 & 3B2/622 running System V R3.2.1 AT&T 3B2/1000 Model 80 running System V R3.2.2 AT&T 3B4000 running System V @@ -116,14 +89,18 @@ Please read items (1), (2) and (3) BEFORE doing anything with your new code. Gould NP1 running UTX 3/2 HP 9000s300 running HP-UX HP 9000s700 running HP-UX 9.x, 10.x, 11.x + H/PC Pro devices running Windows CE 2.11 and higher. IBM PC/RT and RS/6000 running AIX 3.x IBM PS/2 and AT compatibles running OS/2 - 2.0 and up with GCC emx IBM PS/2 and AT compatibles running OS/2 1.1 - 2.0 (and probably Warp) with Microsoft 6.0, and OS/2 2.0 and up with IBM CSet++ 2.0. Intel 80386 or greater (or clone) running 386BSD Intel 80386 or greater (or clone) boxes running MS-DOS with DPMI. + Intel x86 running version of Windows prior to XP. Mips M2000 running RiscOS 4.1 NeXT running Mach (using BSD configuration) + Palm Size PC 1.1 devices running Windows CE 2.11 + Pocket PC devices running Windows CE 3.0 and higher Pyramid 9820x running OSx 4.4c SGI Iris running IRIX Stardent Vistra 800 running SysV R4.0 @@ -135,54 +112,43 @@ Please read items (1), (2) and (3) BEFORE doing anything with your new code. Unless otherwise mentioned, the compiler used was the OS-vendor's C compiler. - NetHack 3.5 may also run on the following, but a cross-compiler hosted - on another platform, such as win32, would be required to build from - source. - - Pocket PC devices running Windows CE 3.0 and higher - H/PC Pro devices running Windows CE 2.11 and higher. - Palm Size PC 1.1 devices running Windows CE 2.11 - - The sources necessary to build an 80286 DOS "real mode" overlaid version - are still included in the source distribution, so if someone has access - to a real-mode compiler and lots of spare time on their hands, you may - be able to get things working. Of course you do so at your own risk. - - - - - - - - - - - - If you have problems building the game, or you find bugs in it, we recommend filing a bug report from our "Contact Us" web page at: http://www.nethack.org/ +A public repository of the latest NetHack code that we've made +available can be obtained via git here: + + When sending correspondence, please observe the following: o Please be sure to include your machine type, OS, and patchlevel. -o Never send us binary files (e.g. save files or bones files). Whichever - platform you are using, only a small minority of the development team has - access to it, and you will rapidly annoy the others. If you have found - a bug and think that your save file would aid in solving the problem, - send us a description in words of the problem, your machine type, your - operating system, and the version of NetHack. Tell us that you have a - save file, but do not actually send it. - In the rare case that we think your save file would be helpful, you will - be contacted by a member of the development team with the address of a - specific person to send the save file to. +o Please avoid sending us binary files (e.g. save files or bones files). + If you have found a bug and think that your save file would aid in solving + the problem, send us a description in words of the problem, your machine + type, your operating system, and the version of NetHack. Tell us that you + have a save file, but do not actually send it. + You may then be contacted by a member of the development team with the + address of a specific person to send the save file to. o Though we make an effort to reply to each bug report, it may take some time before you receive feedback. This is especially true during the period immediately after a new release, when we get the most bug reports. o We don't give hints for playing the game. -o Don't bother to ask when the next version will be out. You will not get - a reply. +o Don't bother to ask when the next version will be out, or expect a + stock answer. -If you don't have access to the world wide web, or if you want to submit -a patch for the NetHack source code via email directly, you can direct it -to this address: +If you want to submit a patch for the NetHack source code via email directly, +you can direct it to this address: nethack-bugs (at) nethack.org If a feature is not accepted you are free, of course, to post the patches to the net yourself and let the marketplace decide their worth. All of this amounts to the following: If you decide to apply a free-lanced -patch to your 3.5 code, you are on your own. In our own patches, we will -assume that your code is synchronized with ours. +patch to your 3.6 code, you are welcome to do so, of course, but we won't +be able to provide support or receive bug reports for it. + +In our own patches, we will assume that your code is synchronized with ours. -- Good luck, and happy Hacking -- From e37d4224b3decfc78937b09ab6a88865f4fc6ba8 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Thu, 5 Mar 2015 14:03:56 +0200 Subject: [PATCH 069/132] Fix data.base entries -"bat" overrode later "combat" entry. -"gelatinous cube" and "jack boot" have their own entries. -"vampire bat" matched twice; use the bat entry. -dagger attribution started with spaces instead of tabs. --- dat/data.base | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dat/data.base b/dat/data.base index 67fca7aba..0c9f493b0 100644 --- a/dat/data.base +++ b/dat/data.base @@ -429,6 +429,7 @@ barbed devil Barbed devils lack any real special abilities, though they are quite difficult to kill. # takes "bat or bird" when specifying 'B' +~combat *bat bat or bird A bat, flitting in the darkness outside, took the wrong turn @@ -511,7 +512,6 @@ blind io own. Several were currently hovering above the table. [ The Colour of Magic, by Terry Pratchett ] * blob -gelatinous cube ooze * ooze *pudding @@ -548,6 +548,7 @@ candelabrum* Because it is Saint Peter's holy day. (Enter all the Friars to sing the dirge) [ Doctor Faustus and Other Plays, by Christopher Marlowe ] +~*jack*boot* *boot* In Fantasyland these are remarkable in that they seldom or never wear out and are suitable for riding or walking in @@ -1101,7 +1102,7 @@ cyclops Proceeding from the heat-oppressed brain? I see thee yet, in form as palpable As this which now I draw. - [ Macbeth, by William Shakespeare ] + [ Macbeth, by William Shakespeare ] dark one ... But he ruled rather by force and fear, if they might avail; and those who perceived his shadow spreading over the @@ -5157,7 +5158,7 @@ valkyrie Nations, by Herbert Robinson and Knox Wilson ] vampire -vampire bat +~vampire bat vampire lord The Oxford English Dictionary is quite unequivocal: _vampire_ - "a preternatural being of a malignant nature (in From 40851d2e6931288010bf83ae336d7d5e739dc3d0 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Thu, 5 Mar 2015 14:21:21 +0200 Subject: [PATCH 070/132] Add database entry for shuriken --- dat/data.base | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dat/data.base b/dat/data.base index 0c9f493b0..31d9360be 100644 --- a/dat/data.base +++ b/dat/data.base @@ -4503,6 +4503,14 @@ shrieker its fetid bulk looming overhead... The monster was some kind of great dark worm, but that was about all they were sure of. [ The Adventurers, Epic IV, by Thomas A. Miller ] +shuriken + You know, that's what I hate most about fighting against magic: + you never know what they're trying to do to you until it hits. + The sorceress knew what hit her, however. Two of the shuriken + got past whatever defenses she had. One caught her just below + the throat, the other in the middle of her chest. It wouldn't + kill her, but she wouldn't be fighting anyone for a while. + [ Jhereg, Steven Brust ] skeleton A skeleton is a magically animated undead creature. Unlike shades, only a humanoid creature can be used to create a From c427f450ca73b5b2ba77beae7910425d8ce20c45 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Thu, 5 Mar 2015 14:22:19 +0200 Subject: [PATCH 071/132] Fix shuriken attribution --- dat/data.base | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dat/data.base b/dat/data.base index 31d9360be..1da1c54dd 100644 --- a/dat/data.base +++ b/dat/data.base @@ -4510,7 +4510,7 @@ shuriken got past whatever defenses she had. One caught her just below the throat, the other in the middle of her chest. It wouldn't kill her, but she wouldn't be fighting anyone for a while. - [ Jhereg, Steven Brust ] + [ Jhereg, by Steven Brust ] skeleton A skeleton is a magically animated undead creature. Unlike shades, only a humanoid creature can be used to create a From cc25d29490b79690cfc0c1b1b713a33d928c51f8 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Thu, 5 Mar 2015 14:23:23 +0200 Subject: [PATCH 072/132] Make shuriken entry also match throwing star. --- dat/data.base | 1 + 1 file changed, 1 insertion(+) diff --git a/dat/data.base b/dat/data.base index 1da1c54dd..409d5eba4 100644 --- a/dat/data.base +++ b/dat/data.base @@ -4503,6 +4503,7 @@ shrieker its fetid bulk looming overhead... The monster was some kind of great dark worm, but that was about all they were sure of. [ The Adventurers, Epic IV, by Thomas A. Miller ] +throwing star shuriken You know, that's what I hate most about fighting against magic: you never know what they're trying to do to you until it hits. From 4cc13161631fb50e0ee35c8c4a957846eeda18f0 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Thu, 5 Mar 2015 16:15:40 +0200 Subject: [PATCH 073/132] Add database entry for fedora --- dat/data.base | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dat/data.base b/dat/data.base index 409d5eba4..9fa99e08f 100644 --- a/dat/data.base +++ b/dat/data.base @@ -1571,6 +1571,12 @@ eyes of the overworld Usually, there is nothing to be seen. However, the wearer is also able to look back and see the area around herself, much like looking on a map. Why anyone would want to ... +fedora + Some hats can only be worn if you're willing to be jaunty, to set + them at an angle and to walk beneath them with a spring in your + stride as if you're only a step away from dancing. They demand a + lot of you. + [ Anansi Boys, by Neil Gaiman ] figurine* Then it appeared in Paris at just about the time that Paris was full of Carlists who had to get out of Spain. One of From 44c0534a97028dfc86634c1a7868bbdce8793658 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Thu, 5 Mar 2015 16:34:16 +0200 Subject: [PATCH 074/132] Add database entry for land mine --- dat/data.base | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dat/data.base b/dat/data.base index 9fa99e08f..6bca23177 100644 --- a/dat/data.base +++ b/dat/data.base @@ -2774,6 +2774,12 @@ lance evil plight. [ Don Quixote of La Mancha, by Miquel de Cervantes Saavedra ] +land mine + Your heart is intact, your brain is not badly damaged, but the rest + of your injuries are comparable to stepping on a land mine. You'd + never walk again, and you'd be in great pain. You would come to + wish you had not survived. + [ Steel Beach, by John Varley ] *lantern While pretending to be a fancy safety lamp, it is in fact battery powered. A discreet little switch is marked "on/off" From e9a03fd09427f361fa91804885975ece696628a8 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 5 Mar 2015 20:45:17 -0500 Subject: [PATCH 075/132] Fix some README mistakes that Janet spotted --- README | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/README b/README index 1d4b8063d..a2ee7cf40 100644 --- a/README +++ b/README @@ -7,7 +7,7 @@ that was posted online in 2014 by others, there is no NetHack 3.5 release. NetHack 3.6.0 contains some code reorganization, new features, and bugfixes. -The file doc/fixes36.0 in the source disribution has a full list of each. +The file doc/fixes36.0 in the source distribution has a full list of each. The text in there was written for the development team's own use and is provided "as is", so please do not ask us to further explain the entries in that file. Some entries might be considered "spoilers", particularly @@ -17,7 +17,7 @@ Here are some additional general notes that are not considered spoilers: * Some code paths and long-established game features have been made part of the base build and no longer conditional on compile settings. * Save files and bones files should be compatible across platforms and - machine architectures. + machine architectures . * The following treasured NetHack community patches, or a variation of them, have been rolled in to the base NetHack source tree: menucolors, pickup thrown, statue glyphs, . @@ -64,8 +64,7 @@ Please read items (1), (2) and (3) BEFORE doing anything with your new code. Intel Pentium or better (or clone) running Linux, BSDI, or Windows (XP through 8.1) Intel 80386 or greater (or clone) boxes running Linux, or BSDI - Sun SPARC based machine running SunOS 4.x, Solaris 2.x, or Solaris 7 - Mac OS X 10.9 should be added to the list. + Mac OS X 10.9 Previous versions of NetHack were tested and known to run on the following systems, but it is unknown if they can still build and @@ -73,7 +72,7 @@ Please read items (1), (2) and (3) BEFORE doing anything with your new code. Apple Macintosh running MacOS 7.5 or higher, LinuxPPC, BeOS 4.0 Atari ST/TT/Falcon running TOS (or MultiTOS) with GCC - AT&T 3B1 running System V (3.61) + AT&T 3B1 running System V (3.51) AT&T 3B2/600 & 3B2/622 running System V R3.2.1 AT&T 3B2/1000 Model 80 running System V R3.2.2 AT&T 3B4000 running System V @@ -96,7 +95,7 @@ Please read items (1), (2) and (3) BEFORE doing anything with your new code. Warp) with Microsoft 6.0, and OS/2 2.0 and up with IBM CSet++ 2.0. Intel 80386 or greater (or clone) running 386BSD Intel 80386 or greater (or clone) boxes running MS-DOS with DPMI. - Intel x86 running version of Windows prior to XP. + Intel x86 running a version of Windows prior to XP. Mips M2000 running RiscOS 4.1 NeXT running Mach (using BSD configuration) Palm Size PC 1.1 devices running Windows CE 2.11 @@ -107,8 +106,15 @@ Please read items (1), (2) and (3) BEFORE doing anything with your new code. Stride 460 running UniStride 2.1 Sun-3s, -4s, and -386is running SunOS 3.x Sun-3s and -386is running SunOS 4.x + Sun SPARC based machine running SunOS 4.x, Solaris 2.x, or Solaris 7 Valid Logic Systems SCALD-System + Previous versions, using a cross-compiler hosted on another platform, such as + win32, could also build the following from source: + Pocket PC devices running Windows CE 3.0 and higher + H/PC Pro devices running Windows CE 2.11 and higher + Palm Size PC 1.1 devices running Windows CE 2.11 + Unless otherwise mentioned, the compiler used was the OS-vendor's C compiler. @@ -135,8 +141,8 @@ o Though we make an effort to reply to each bug report, it may take some time before you receive feedback. This is especially true during the period immediately after a new release, when we get the most bug reports. o We don't give hints for playing the game. -o Don't bother to ask when the next version will be out, or expect a - stock answer. +o Don't bother to ask when the next version will be out or you can expect + to receive a stock answer. If you want to submit a patch for the NetHack source code via email directly, you can direct it to this address: From f2ab8f336b859701208784f9ef9a80142bdcf37c Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Fri, 6 Mar 2015 21:01:02 +0200 Subject: [PATCH 076/132] You_hear already checks deafness --- src/dig.c | 2 +- src/lock.c | 4 ++-- src/mon.c | 10 +++++----- src/music.c | 2 +- src/pray.c | 3 +-- src/trap.c | 9 +++------ src/zap.c | 14 ++++++-------- 7 files changed, 19 insertions(+), 25 deletions(-) diff --git a/src/dig.c b/src/dig.c index 39791dde0..1c053ec73 100644 --- a/src/dig.c +++ b/src/dig.c @@ -1245,7 +1245,7 @@ register struct monst *mtmp; if (IS_WALL(here->typ)) { /* KMH -- Okay on arboreal levels (room walls are still stone) */ - if (!Deaf && flags.verbose && !rn2(5)) + if (flags.verbose && !rn2(5)) You_hear("crashing rock."); if (*in_rooms(mtmp->mx, mtmp->my, SHOPBASE)) add_damage(mtmp->mx, mtmp->my, 0L); diff --git a/src/lock.c b/src/lock.c index 67a11a545..91e0f0728 100644 --- a/src/lock.c +++ b/src/lock.c @@ -888,7 +888,7 @@ int x, y; else if (flags.verbose) { if (cansee(x,y)) pline("KABOOM!! You see a door explode."); - else if (!Deaf) + else You_hear("a distant explosion."); } door->doormask = D_NODOOR; @@ -901,7 +901,7 @@ int x, y; if (flags.verbose) { if (cansee(x,y)) pline_The("door crashes open!"); - else if (!Deaf) + else You_hear("a crashing sound."); } unblock_point(x,y); diff --git a/src/mon.c b/src/mon.c index 82457199a..49f6282dc 100644 --- a/src/mon.c +++ b/src/mon.c @@ -638,7 +638,7 @@ meatmetal(mtmp) if (cansee(mtmp->mx,mtmp->my) && flags.verbose) pline("%s eats %s!", Monnam(mtmp), distant_name(otmp,doname)); - else if (!Deaf && flags.verbose) + else if (flags.verbose) You_hear("a crunching sound."); mtmp->meating = otmp->owt/2 + 1; /* Heal up to the object's weight in hp */ @@ -758,7 +758,7 @@ meatobj(mtmp) /* for gelatinous cubes */ if (cansee(mtmp->mx,mtmp->my) && flags.verbose) pline("%s eats %s!", Monnam(mtmp), distant_name(otmp, doname)); - else if (!Deaf && flags.verbose) + else if (flags.verbose) You_hear("a slurping sound."); /* Heal up to the object's weight in hp */ if (mtmp->mhp < mtmp->mhpmax) { @@ -803,7 +803,7 @@ meatobj(mtmp) /* for gelatinous cubes */ if (ecount > 0) { if (cansee(mtmp->mx, mtmp->my) && flags.verbose && buf[0]) pline1(buf); - else if (!Deaf && flags.verbose) + else if (flags.verbose) You_hear("%s slurping sound%s.", ecount == 1 ? "a" : "several", ecount == 1 ? "" : "s"); @@ -1642,7 +1642,7 @@ boolean was_swallowed; /* digestion */ s_suffix(mdat->mname)); losehp(Maybe_Half_Phys(tmp), killer.name, KILLED_BY_AN); } else { - if (!Deaf) You_hear("an explosion."); + You_hear("an explosion."); magr->mhp -= tmp; if (magr->mhp < 1) mondied(magr); if (magr->mhp < 1) { /* maybe lifesaved */ @@ -3106,7 +3106,7 @@ register boolean silent; else if(!Blind) You_see("%sangry guard%s approaching!", sct == 1 ? "an " : "", sct > 1 ? "s" : ""); - } else if(!Deaf) + } else You_hear("the shrill sound of a guard's whistle."); } return(TRUE); diff --git a/src/music.c b/src/music.c index 94f6282d1..0912d78cc 100644 --- a/src/music.c +++ b/src/music.c @@ -334,7 +334,7 @@ do_pit: chasm = maketrap(x,y,PIT); if (!m_already_trapped) { /* suppress messages */ if(cansee(x,y)) pline("%s falls into a chasm!", Monnam(mtmp)); - else if (!Deaf && humanoid(mtmp->data)) + else if (humanoid(mtmp->data)) You_hear("a scream!"); } /* Falling is okay for falling down diff --git a/src/pray.c b/src/pray.c index a91782c72..d2b24c00a 100644 --- a/src/pray.c +++ b/src/pray.c @@ -1386,8 +1386,7 @@ verbalize("In return for thy service, I grant thee the gift of Immortality!"); if (otmp->otyp == FAKE_AMULET_OF_YENDOR) { if (!highaltar && !otmp->known) goto too_soon; - if (!Deaf) - You_hear("a nearby thunderclap."); + You_hear("a nearby thunderclap."); if (!otmp->known) { You("realize you have made a %s.", Hallucination ? "boo-boo" : "mistake"); diff --git a/src/trap.c b/src/trap.c index 7efe8db00..911aafdc5 100644 --- a/src/trap.c +++ b/src/trap.c @@ -2062,10 +2062,9 @@ register struct monst *mtmp; pline("%s stops momentarily and appears to cringe.", Monnam(mtmp)); } - } else if (!Deaf) { + } else You_hear("a distant %s squeak.", trapnote(trap,1)); - } /* wake up nearby monsters */ wake_nearto(mtmp->mx, mtmp->my, 40); break; @@ -2080,9 +2079,8 @@ register struct monst *mtmp; Monnam(mtmp), a_your[trap->madeby_u]); seetrap(trap); } else { - if((mptr == &mons[PM_OWLBEAR] + if(mptr == &mons[PM_OWLBEAR] || mptr == &mons[PM_BUGBEAR]) - && !Deaf) You_hear("the roaring of an angry bear!"); } } else if (force_mintrap) { @@ -2923,9 +2921,8 @@ domagictrap() if (!Blind) Your1(vision_clears); } else if (!Blind) { You_see("a flash of light!"); - } else if (!Deaf) { + } else You_hear("a deafening roar!"); - } incr_itimeout(&HDeaf, rn1(20,30)); while(cnt--) (void) makemon((struct permonst *) 0, u.ux, u.uy, NO_MM_FLAGS); diff --git a/src/zap.c b/src/zap.c index 95b9760a3..38b883115 100644 --- a/src/zap.c +++ b/src/zap.c @@ -1790,7 +1790,7 @@ struct obj *obj, *otmp; if (obj->otyp == BOULDER) { if (cansee(obj->ox, obj->oy)) pline_The("boulder falls apart."); - else if (!Deaf) + else You_hear("a crumbling sound."); fracture_rock(obj); } @@ -1801,9 +1801,8 @@ struct obj *obj, *otmp; pline_The("%s shatters.", rndmonnam()); else pline_The("statue shatters."); - } else if (!Deaf) { + } else You_hear("a crumbling sound."); - } } } else { if (context.mon_moving ? @@ -3025,7 +3024,7 @@ struct obj **pobj; /* object tossed/used, set to NULL if (!Blind) pline("%s %s%s.", Yname2(obj), otense(obj, "skip"), skipcount ? " again" : ""); - else if (!Deaf) You_hear("%s skip.", yname(obj)); + else You_hear("%s skip.", yname(obj)); skipcount++; } else if (skiprange_start > skiprange_end + 1) { --skiprange_start; @@ -4047,7 +4046,7 @@ short exploding_wand_typ; else Norep("The water freezes."); newsym(x,y); - } else if(!Deaf && !lava) + } else if(!lava) You_hear("a crackling sound."); if (x == u.ux && y == u.uy) { @@ -4214,9 +4213,8 @@ short exploding_wand_typ; newsym(x, y); } else if (sense_txt) { You1(sense_txt); - } else if (hear_txt) { - if (!Deaf) You_hear1(hear_txt); - } + } else if (hear_txt) + You_hear1(hear_txt); if (picking_at(x, y)) { stop_occupation(); reset_pick(); From 1609081320968a41e1f96713e3f844cefcbb8797 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sat, 7 Mar 2015 15:11:41 +0200 Subject: [PATCH 077/132] Implement fcntl(2) file locking If you run a server, then you know of the somewhat annoying perm_lock errors that creep up, requiring your attention before anyone else can start a game. This patch properly implements fcntl(2) locking on systems that can handle it (*nix systems), that results in the lock being automatically released on program termination, whether abnormal or not. Original patch by Drew Streib, update by Edoardo Spadolini --- include/unixconf.h | 6 +++++ src/files.c | 60 ++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 62 insertions(+), 4 deletions(-) diff --git a/include/unixconf.h b/include/unixconf.h index c85611c2a..9feefd2c8 100644 --- a/include/unixconf.h +++ b/include/unixconf.h @@ -217,6 +217,12 @@ #define FCMASK 0660 /* file creation mask */ +/* fcntl(2) is a POSIX-portable call for manipulating file descriptors. + * Comment out the USE_FCNTL if for some reason you have a strange + * OS/filesystem combination for which fcntl(2) does not work. */ +#ifdef POSIX_TYPES +# define USE_FCNTL +#endif /* * The remainder of the file should not need to be changed. diff --git a/src/files.c b/src/files.c index 71fd0c217..2cae9fb7f 100644 --- a/src/files.c +++ b/src/files.c @@ -12,7 +12,7 @@ #include -#if !defined(MAC) && !defined(O_WRONLY) && !defined(AZTEC_C) +#if (!defined(MAC) && !defined(O_WRONLY) && !defined(AZTEC_C)) || defined(USE_FCNTL) #include #endif @@ -185,7 +185,9 @@ STATIC_DCL void FDECL(docompress_file, (const char *,BOOLEAN_P)); #if defined(ZLIB_COMP) STATIC_DCL boolean FDECL(make_compressed_name, (const char *, char *)); #endif +#ifndef USE_FCNTL STATIC_DCL char *FDECL(make_lockname, (const char *,char *)); +#endif STATIC_DCL FILE *FDECL(fopen_config_file, (const char *, int)); STATIC_DCL int FDECL(get_uchars, (FILE *,char *,char *,uchar *,BOOLEAN_P,int,const char *)); @@ -1537,12 +1539,16 @@ boolean uncomp; static int nesting = 0; -#ifdef NO_FILE_LINKS /* implies UNIX */ +#if defined(NO_FILE_LINKS) || defined(USE_FCNTL) /* implies UNIX */ static int lockfd; /* for lock_file() to pass to unlock_file() */ #endif +#ifdef USE_FCNTL +struct flock sflock; /* for unlocking, same as above */ +#endif #define HUP if (!program_state.done_hup) +#ifndef USE_FCNTL STATIC_OVL char * make_lockname(filename, lockname) const char *filename; @@ -1574,6 +1580,7 @@ char *lockname; return (char*)0; #endif } +#endif /* !USE_FCNTL */ /* lock a file */ boolean @@ -1585,8 +1592,10 @@ int retryct; #if defined(PRAGMA_UNUSED) && !(defined(UNIX) || defined(VMS)) && !(defined(AMIGA) || defined(WIN32) || defined(MSDOS)) # pragma unused(retryct) #endif +#ifndef USE_FCNTL char locknambuf[BUFSZ]; const char *lockname; +#endif nesting++; if (nesting > 1) { @@ -1594,18 +1603,50 @@ int retryct; return TRUE; } +#ifndef USE_FCNTL lockname = make_lockname(filename, locknambuf); - filename = fqname(filename, whichprefix, 0); #ifndef NO_FILE_LINKS /* LOCKDIR should be subsumed by LOCKPREFIX */ lockname = fqname(lockname, LOCKPREFIX, 2); #endif +#endif + filename = fqname(filename, whichprefix, 0); +#ifdef USE_FCNTL + lockfd = open(filename,O_RDWR); + if (lockfd == -1) { + HUP raw_printf("Cannot open file %s. This is a program bug.", + filename); + } + sflock.l_type = F_WRLCK; + sflock.l_whence = SEEK_SET; + sflock.l_start = 0; + sflock.l_len = 0; +#endif #if defined(UNIX) || defined(VMS) +# ifdef USE_FCNTL + while (fcntl(lockfd,F_SETLK,&sflock) == -1) { +# else # ifdef NO_FILE_LINKS while ((lockfd = open(lockname, O_RDWR|O_CREAT|O_EXCL, 0666)) == -1) { # else while (link(filename, lockname) == -1) { # endif +# endif + +#ifdef USE_FCNTL + if (retryct--) { + HUP raw_printf( + "Waiting for release of fcntl lock on %s. (%d retries left).", + filename, retryct); + sleep(1); + } else { + HUP (void) raw_print("I give up. Sorry."); + HUP raw_printf("Some other process has an unnatural grip on %s.", + filename); + nesting--; + return FALSE; + } +#else register int errnosv = errno; switch (errnosv) { /* George Barbanis */ @@ -1660,11 +1701,12 @@ int retryct; nesting--; return FALSE; } +#endif /* USE_FCNTL */ } #endif /* UNIX || VMS */ -#if defined(AMIGA) || defined(WIN32) || defined(MSDOS) +#if (defined(AMIGA) || defined(WIN32) || defined(MSDOS)) && !defined(USE_FCNTL) # ifdef AMIGA #define OPENFAILURE(fd) (!fd) lockptr = 0; @@ -1711,10 +1753,19 @@ void unlock_file(filename) const char *filename; { +#ifndef USE_FCNTL char locknambuf[BUFSZ]; const char *lockname; +#endif if (nesting == 1) { +#ifdef USE_FCNTL + sflock.l_type = F_UNLCK; + if (fcntl(lockfd,F_SETLK,&sflock) == -1) { + HUP raw_printf("Can't remove fcntl lock on %s.", filename); + (void) close(lockfd); + } +#else lockname = make_lockname(filename, locknambuf); #ifndef NO_FILE_LINKS /* LOCKDIR should be subsumed by LOCKPREFIX */ lockname = fqname(lockname, LOCKPREFIX, 2); @@ -1734,6 +1785,7 @@ const char *filename; DeleteFile(lockname); lockptr = 0; #endif /* AMIGA || WIN32 || MSDOS */ +#endif /* USE_FCNTL */ } nesting--; From a66b498dda0bafffcafc81ee377670207c106b0b Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sun, 8 Mar 2015 10:40:26 +0200 Subject: [PATCH 078/132] TTY: Do not cut off statuslines at 80 characters Show as much of the status line as possible, instead of chopping it at COLNO - this prevents possible game-influencing status effects (Ill, Burdened, etc) from being hidden. --- win/tty/wintty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win/tty/wintty.c b/win/tty/wintty.c index 67b0243d4..19af943b9 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -1061,7 +1061,7 @@ tty_create_nhwindow(type) #endif newwin->offy = min((int)ttyDisplay->rows-2, ROWNO+1); newwin->rows = newwin->maxrow = 2; - newwin->cols = newwin->maxcol = min(ttyDisplay->cols, COLNO); + newwin->cols = newwin->maxcol = ttyDisplay->cols; break; case NHW_MAP: /* map window, ROWNO lines long, full width, below message window */ From 8c048e60861d41a6da6b12378556af18fa36fe09 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sun, 8 Mar 2015 15:11:01 +0200 Subject: [PATCH 079/132] TTY: Prevent accidental escapes from string entries On NAO, one of the major complaints was accidental escaping from wishing prompt when using cursor keys. The users were trying to go "back" on the entry to fix a typo, but lost the wish instead. This prevents escaping out of a text prompt if there is any text entered into the prompt; pressing escape clears the prompt. --- win/tty/getline.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/win/tty/getline.c b/win/tty/getline.c index 4a2d8c251..1e4e6c43f 100644 --- a/win/tty/getline.c +++ b/win/tty/getline.c @@ -60,9 +60,19 @@ getlin_hook_proc hook; Strcat(strcat(strcpy(toplines, query), " "), obufp); c = pgetchar(); if (c == '\033' || c == EOF) { - obufp[0] = '\033'; - obufp[1] = '\0'; - break; + if (c == '\033' && obufp[0] != '\0') { + obufp[0] = '\0'; + bufp = obufp; + tty_clear_nhwindow(WIN_MESSAGE); + cw->maxcol = cw->maxrow; + addtopl(query); + addtopl(" "); + addtopl(obufp); + } else { + obufp[0] = '\033'; + obufp[1] = '\0'; + break; + } } if (ttyDisplay->intr) { ttyDisplay->intr--; From 8e31929ef56c00cae8b19ff5dde02b880c35b1a1 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Mon, 9 Mar 2015 18:42:53 +0200 Subject: [PATCH 080/132] Define for generic usernames which prompt for name Instead of hard-coding the "play", "player", etc. usernames which will prompt the user for their name, allow defining the names in config.h --- include/config.h | 5 +++++ src/role.c | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/include/config.h b/include/config.h index d8b067fc7..930bd549c 100644 --- a/include/config.h +++ b/include/config.h @@ -316,6 +316,11 @@ #endif /* CHDIR */ +/* If GENERIC_USERNAMES is defined, and the user name is found + * in that list, prompt for username instead. + * A public server should probably disable this. */ +#define GENERIC_USERNAMES "play player game games nethack nethacker" + /* * Section 3: Definitions that may vary with system type. diff --git a/src/role.c b/src/role.c index 59624c528..2e2cbabae 100644 --- a/src/role.c +++ b/src/role.c @@ -1332,12 +1332,15 @@ plnamesuffix() char *sptr, *eptr; int i; +#ifdef GENERIC_USERNAMES /* some generic user names will be ignored in favor of prompting */ i = (int)strlen(plname); - if ((i >= 4 && !strncmpi(plname, "player", i)) || /* play[er] */ - (i >= 4 && !strncmpi(plname, "games", i)) || /* game[s] */ - (i >= 7 && !strncmpi(plname, "nethacker", i))) /* nethack[er] */ + eptr = GENERIC_USERNAMES; + sptr = strstri(eptr, plname); + if (sptr && ((sptr == eptr && (sptr[i] == ' ' || sptr[i] == '\0')) + || sptr[i] == ' ' || sptr[i] == '\0')) *plname = '\0'; /* call askname() */ +#endif do { if (!*plname) askname(); /* fill plname[] if necessary */ From c0a5b49e62e889f13bfe32f2f23a3b7d9a2aa9c3 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Mon, 9 Mar 2015 21:08:42 +0200 Subject: [PATCH 081/132] Use a menu to loot multiple containers When looting a location with multiple containers, show a menu for user to pick the containers to loot instead of asking a yes/no question for each container. --- src/pickup.c | 108 ++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 77 insertions(+), 31 deletions(-) diff --git a/src/pickup.c b/src/pickup.c index d044cf46f..0b6abf06d 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -1451,6 +1451,36 @@ int x, y; return FALSE; } +int +do_loot_cont(cobjp) +struct obj **cobjp; +{ + struct obj *cobj = *cobjp; + if (!cobj) return 0; + if (cobj->olocked) { + pline("%s locked.", cobj->lknown ? "It is" : + "Hmmm, it turns out to be"); + cobj->lknown = 1; + return 0; + } + cobj->lknown = 1; + + if (cobj->otyp == BAG_OF_TRICKS) { + int tmp; + You("carefully open the bag..."); + pline("It develops a huge set of teeth and bites you!"); + tmp = rnd(10); + losehp(Maybe_Half_Phys(tmp), "carnivorous bag", KILLED_BY_AN); + makeknown(BAG_OF_TRICKS); + return 1; + } + + You("%sopen %s...", + (!cobj->cknown || !cobj->lknown) ? "carefully " : "", + the(xname(cobj))); + return use_container(cobjp, 0); +} + int doloot() /* loot a container on the floor or loot saddle from mon. */ { @@ -1486,46 +1516,62 @@ lootcont: if (container_at(cc.x, cc.y, FALSE)) { boolean any = FALSE; + int num_conts = 0; if (!able_to_loot(cc.x, cc.y, TRUE)) return 0; - for (cobj = level.objects[cc.x][cc.y]; cobj; cobj = nobj) { - nobj = cobj->nexthere; - if (Is_container(cobj)) { - c = ynq(safe_qbuf(qbuf, "There is ", " here, loot it?", - cobj, doname, ansimpleoname, "a container")); - if (c == 'q') return (timepassed); - if (c == 'n') continue; - any = TRUE; + for (cobj = level.objects[cc.x][cc.y]; cobj; cobj = cobj->nexthere) + if (Is_container(cobj)) num_conts++; - if (cobj->olocked) { - pline("%s locked.", cobj->lknown ? "It is" : - "Hmmm, it turns out to be"); - cobj->lknown = 1; - continue; + if (num_conts > 1) { + /* use a menu to loot many containers */ + int n, i; + winid win; + anything any; + menu_item *pick_list = NULL; + + any.a_void = 0; + win = create_nhwindow(NHW_MENU); + start_menu(win); + + for (cobj = level.objects[cc.x][cc.y]; cobj; cobj = cobj->nexthere) + if (Is_container(cobj)) { + any.a_obj = cobj; + add_menu(win, NO_GLYPH, &any, 0, 0, ATR_NONE, doname(cobj), MENU_UNSELECTED); } - cobj->lknown = 1; + end_menu(win, "Loot which containers?"); + n = select_menu(win, PICK_ANY, &pick_list); + destroy_nhwindow(win); - if (cobj->otyp == BAG_OF_TRICKS) { - int tmp; - You("carefully open the bag..."); - pline("It develops a huge set of teeth and bites you!"); - tmp = rnd(10); - losehp(Maybe_Half_Phys(tmp), "carnivorous bag", KILLED_BY_AN); - makeknown(BAG_OF_TRICKS); - timepassed = 1; - continue; + if (n > 0) { + for (i = 0; i < n; i++) { + timepassed |= do_loot_cont(&pick_list[i].item.a_obj); + if (multi < 0 || !pick_list[i].item.a_obj) { + free((genericptr_t) pick_list); + return 1; + } } - - You("%sopen %s...", - (!cobj->cknown || !cobj->lknown) ? "carefully " : "", - the(xname(cobj))); - timepassed |= use_container(&cobj, 0); - /* might have triggered chest trap or magic bag explosion */ - if (multi < 0 || !cobj) return 1; } + if (pick_list) free((genericptr_t) pick_list); + if (n != 0) c = 'y'; + } else { + for (cobj = level.objects[cc.x][cc.y]; cobj; cobj = nobj) { + nobj = cobj->nexthere; + + if (Is_container(cobj)) { + c = ynq(safe_qbuf(qbuf, "There is ", " here, loot it?", + cobj, doname, ansimpleoname, "a container")); + if (c == 'q') return (timepassed); + if (c == 'n') continue; + any = TRUE; + + timepassed |= do_loot_cont(&cobj); + /* might have triggered chest trap or magic bag explosion */ + if (multi < 0 || !cobj) return 1; + } + } + if (any) c = 'y'; } - if (any) c = 'y'; } else if (IS_GRAVE(levl[cc.x][cc.y].typ)) { You("need to dig up the grave to effectively loot it..."); } From fa186c01562f760be72cb857fb7512fbba45f7fc Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Mon, 9 Mar 2015 22:22:32 +0200 Subject: [PATCH 082/132] Comment typofix --- src/fountain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fountain.c b/src/fountain.c index 482b0ed76..e87748e0a 100644 --- a/src/fountain.c +++ b/src/fountain.c @@ -456,7 +456,7 @@ register struct obj *obj; long money = money_cnt(invent); struct obj *otmp; if (money > 10) { - /* Amount to loose. Might get rounded up as fountains don't pay change... */ + /* Amount to lose. Might get rounded up as fountains don't pay change... */ money = somegold(money) / 10; for (otmp = invent; otmp && money > 0; otmp = otmp->nobj) if (otmp->oclass == COIN_CLASS) { int denomination = objects[otmp->otyp].oc_cost; From 560898d3d46657020a1e051f0432fb26973c66d4 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Mon, 9 Mar 2015 22:53:43 +0200 Subject: [PATCH 083/132] Change command X to twoweapon toggle Explore mode is now an extended command #exploremode. There's no sense that a command used max. once per game, and in normal games not at all, takes up a key. So, analogous to the 'x' command (swap weapons), 'X' now toggles two-weapon combat. --- dat/cmdhelp | 2 +- dat/help | 2 +- dat/hh | 2 +- doc/Guidebook.mn | 7 ++++--- src/cmd.c | 3 ++- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/dat/cmdhelp b/dat/cmdhelp index 811c9bdda..d7487750f 100644 --- a/dat/cmdhelp +++ b/dat/cmdhelp @@ -69,7 +69,7 @@ V Show long version and game history w Wield (put in use) a weapon W Wear a piece of armor x Swap wielded and secondary weapons -X Enter explore (discovery) mode (only if defined) +X Toggle two-weapon combat y Go northwest 1 space Y Go northwest until you are on top of something ^Y Go northwest until you are near something diff --git a/dat/help b/dat/help index 7f9ee92ab..07971cec2 100644 --- a/dat/help +++ b/dat/help @@ -147,7 +147,7 @@ Commands: w Wield weapon. w- means wield nothing, use bare hands. W Wear armor. x Swap wielded and secondary weapons. - X Switch the game to explore (discovery) mode. + X Toggle two-weapon combat. ^X Show your attributes. z Zap a wand. (Use y instead of z if number_pad is -1.) Z Cast a spell. (Use Y instead of Z if number_pad is -1.) diff --git a/dat/hh b/dat/hh index 1887547c7..b16b1c91c 100644 --- a/dat/hh +++ b/dat/hh @@ -32,7 +32,6 @@ O options set options \ known display list of what's been discovered v version display version number V history display game history -X explore switch the game to explore (discovery) mode ^A again redo the previous command (^A denotes the keystroke CTRL-A) ^R redraw redraw the screen ^P prevmsg repeat previous message (subsequent ^P's repeat earlier ones) @@ -70,6 +69,7 @@ T takeoff take off some armor w wield wield a weapon (w- wield nothing) W wear put on some armor x xchange swap wielded and secondary weapons +X twoweapon toggle two-weapon combat z zap zap a wand (use y instead of z if number_pad is -1) Z Zap cast a spell (use Y instead of Z if number_pad is -1) < up go up the stairs diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index f04f3b309..86094fe26 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -708,7 +708,8 @@ The latter is used as your secondary weapon when engaging in two-weapon combat. Note that if one of these slots is empty, the exchange still takes place. .lp X -Enter explore (discovery) mode, explained in its own section later. +Toggle two-weapon combat, if your character can do it. Also available +via the ``#twoweapon'' extended command .lp "" Since using this command by accident would be troublesome, you are asked to confirm your intent before switching to explore mode. By default @@ -2980,8 +2981,8 @@ with the .op -X command-line switch or with the .op playmode:explore -option. The other is to issue the `X' command while already -playing the game. Starting a new game in explore mode provides your +option. The other is to issue the ``#exploremode'' extended command while +already playing the game. Starting a new game in explore mode provides your character with a wand of wishing in initial inventory; switching via `X' during play does not. The other benefits of explore mode are left for the trepid reader to discover. diff --git a/src/cmd.c b/src/cmd.c index f7e858e01..5d9bcfc27 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -2411,7 +2411,7 @@ static const struct func_tab cmdlist[] = { {'W', FALSE, dowear}, {M('w'), FALSE, dowipe}, {'x', FALSE, doswapweapon}, - {'X', TRUE, enter_explore_mode}, + {'X', FALSE, dotwoweapon}, /* 'y', 'Y' : go nw */ {'z', FALSE, dozap}, {'Z', TRUE, docast}, @@ -2456,6 +2456,7 @@ struct ext_func_tab extcmdlist[] = { {"dip", "dip an object into something", dodip, FALSE}, {"enhance", "advance or check weapon and spell skills", enhance_weapon_skill, TRUE}, + {"exploremode", "enter explore mode", enter_explore_mode, TRUE}, {"force", "force a lock", doforce, FALSE}, {"invoke", "invoke an object's powers", doinvoke, TRUE}, {"jump", "jump to a location", dojump, FALSE}, From fa04eff2821fe4c9f9c6587bf85160f57c8d7203 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 9 Mar 2015 21:08:26 -0400 Subject: [PATCH 084/132] fix a segfault in mapglyph reported by Pasi earlier today Changes to be committed: modified: src/pager.c Steps to reproduce the reported segfault: Use / command, answer n, press space and enter In do_look() variable glyph is only set to a proper value if using the screen (from_screen) or the mouse (clicklook). On the code path that triggered the segfault, glyph was being passed to mapglyph with a random arbitrary value. If glyph had been initialized at the start of do_look(), it would have prevented the segfault, but would have always displayed a giant ant or something silly instead of the correct thing. Don't use glyph except under from_screen || clicklook. --- src/pager.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/pager.c b/src/pager.c index 4e8008c1b..721119060 100644 --- a/src/pager.c +++ b/src/pager.c @@ -574,9 +574,14 @@ do_look(mode, click_cc) def_monsyms[i].explain) { need_to_look = TRUE; if (!found) { - Sprintf(out_str, "%s %s", + if (from_screen || clicklook) + Sprintf(out_str, "%s %s", encglyph(glyph), - an(def_monsyms[i].explain)); + an(def_monsyms[i].explain)); + else + Sprintf(out_str, "%c %s", + sym, + an(def_monsyms[i].explain)); firstmatch = def_monsyms[i].explain; found++; } else { From 7113829de0759d099854ad9626864faf45709244 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 9 Mar 2015 22:05:48 -0400 Subject: [PATCH 085/132] more do_look() glyph usage without it being set properly Changes to be committed: modified: src/pager.c When the previous occurrence that triggered a segfault was fixed, I didn't check for more of them. It turns out there were more instances. This also removes some dead code. --- src/pager.c | 76 ++++++++++++++++------------------------------------- 1 file changed, 23 insertions(+), 53 deletions(-) diff --git a/src/pager.c b/src/pager.c index 721119060..377eda642 100644 --- a/src/pager.c +++ b/src/pager.c @@ -453,7 +453,7 @@ do_look(mode, click_cc) { boolean quick = (mode == 1); /* use cursor && don't search for "more info" */ boolean clicklook = (mode == 2); /* right mouse-click method */ - char out_str[BUFSZ], look_buf[BUFSZ]; + char out_str[BUFSZ], look_buf[BUFSZ], prefix[BUFSZ]; const char *x_str, *firstmatch = 0; struct permonst *pm = 0; int glyph; /* glyph at selected position */ @@ -532,36 +532,14 @@ do_look(mode, click_cc) glyph = glyph_at(cc.x,cc.y); /* Convert the glyph at the selected position to a symbol. */ -#if 0 - if (glyph_is_cmap(glyph)) { - sym = showsyms[glyph_to_cmap(glyph)]; - } else if (glyph_is_trap(glyph)) { - sym = showsyms[trap_to_defsym(glyph_to_trap(glyph))]; - } else if (glyph_is_statue(glyph)) { - sym = showsyms[(int)mons[glyph_to_mon(glyph)].mlet + SYM_OFF_M]; - } else if (glyph_is_object(glyph)) { - sym = showsyms[(int)objects[glyph_to_obj(glyph)].oc_class + SYM_OFF_O]; - if (sym == '`' && iflags.bouldersym && (int)glyph_to_obj(glyph) == BOULDER) - sym = iflags.bouldersym; - } else if (glyph_is_monster(glyph)) { - /* takes care of pets, detected, ridden, and regular mons */ - sym = showsyms[(int)mons[glyph_to_mon(glyph)].mlet + SYM_OFF_M]; - } else if (glyph_is_swallow(glyph)) { - sym = showsyms[glyph_to_swallow(glyph)+S_sw_tl]; - } else if (glyph_is_invisible(glyph)) { - sym = DEF_INVISIBLE; - } else if (glyph_is_warning(glyph)) { - sym = glyph_to_warning(glyph); - sym = showsyms[sym + SYM_OFF_W]; - } else { - impossible("do_look: bad glyph %d at (%d,%d)", - glyph, (int)cc.x, (int)cc.y); - sym = ' '; - } -#endif so = mapglyph(glyph, &sym, &oc, &os, cc.x, cc.y); } + if (from_screen || clicklook) + Sprintf(prefix, "%s ", encglyph(glyph)); + else + Sprintf(prefix, "%s ", sym); + /* * Check all the possibilities, saving all explanations in a buffer. * When all have been checked then the string is printed. @@ -574,14 +552,8 @@ do_look(mode, click_cc) def_monsyms[i].explain) { need_to_look = TRUE; if (!found) { - if (from_screen || clicklook) - Sprintf(out_str, "%s %s", - encglyph(glyph), - an(def_monsyms[i].explain)); - else - Sprintf(out_str, "%c %s", - sym, - an(def_monsyms[i].explain)); + Sprintf(out_str, "%s%s", + prefix, an(def_monsyms[i].explain)); firstmatch = def_monsyms[i].explain; found++; } else { @@ -605,8 +577,8 @@ do_look(mode, click_cc) */ if (u.uswallow && (from_screen || clicklook) && is_swallow_sym(sym)) { if (!found) { - Sprintf(out_str, "%s %s", - encglyph(glyph), mon_interior); + Sprintf(out_str, "%s%s", + prefix, mon_interior); firstmatch = mon_interior; } else { found += append_str(out_str, mon_interior); @@ -624,9 +596,8 @@ do_look(mode, click_cc) continue; } if (!found) { - Sprintf(out_str, "%s %s", - encglyph(glyph), - an(def_oc_syms[i].explain)); + Sprintf(out_str, "%s%s", + prefix, an(def_oc_syms[i].explain)); firstmatch = def_oc_syms[i].explain; found++; } else { @@ -637,8 +608,8 @@ do_look(mode, click_cc) if (sym == DEF_INVISIBLE) { if (!found) { - Sprintf(out_str, "%s %s", - encglyph(glyph), + Sprintf(out_str, "%s%s", + prefix, an(invisexplain)); firstmatch = invisexplain; found++; @@ -662,12 +633,11 @@ do_look(mode, click_cc) if (!found) { if (is_cmap_trap(i)) { - Sprintf(out_str, "%s a trap", - encglyph(glyph)); + Sprintf(out_str, "%sa trap", prefix); hit_trap = TRUE; } else { - Sprintf(out_str, "%s %s", - encglyph(glyph), + Sprintf(out_str, "%s%s", + prefix, article == 2 ? the(x_str) : article == 1 ? an(x_str) : x_str); } @@ -692,8 +662,8 @@ do_look(mode, click_cc) if (sym == ((from_screen || clicklook) ? warnsyms[i] : def_warnsyms[i].sym)) { if (!found) { - Sprintf(out_str, "%s %s", - encglyph(glyph), def_warnsyms[i].explanation); + Sprintf(out_str, "%s%s", + prefix, def_warnsyms[i].explanation); firstmatch = def_warnsyms[i].explanation; found++; } else { @@ -711,8 +681,8 @@ do_look(mode, click_cc) if (skipped_venom && found < 2) { x_str = def_oc_syms[VENOM_CLASS].explain; if (!found) { - Sprintf(out_str, "%s %s", - encglyph(glyph), an(x_str)); + Sprintf(out_str, "%s%s", + prefix, an(x_str)); firstmatch = x_str; found++; } else { @@ -724,8 +694,8 @@ do_look(mode, click_cc) if (iflags.bouldersym && sym == iflags.bouldersym) { if (!found) { firstmatch = "boulder"; - Sprintf(out_str, "%s %s", - encglyph(glyph), an(firstmatch)); + Sprintf(out_str, "%s%s", + prefix, an(firstmatch)); found++; } else { found += append_str(out_str, "boulder"); From 67aab26a834493978f61ee91085dbbe5d717f57f Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 9 Mar 2015 22:11:49 -0400 Subject: [PATCH 086/132] typo in format string on previous commit --- src/pager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pager.c b/src/pager.c index 377eda642..459a6daf4 100644 --- a/src/pager.c +++ b/src/pager.c @@ -538,7 +538,7 @@ do_look(mode, click_cc) if (from_screen || clicklook) Sprintf(prefix, "%s ", encglyph(glyph)); else - Sprintf(prefix, "%s ", sym); + Sprintf(prefix, "%c ", sym); /* * Check all the possibilities, saving all explanations in a buffer. From f0a335da2a039a0aed69671830df89819b47d0ab Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Tue, 10 Mar 2015 17:30:24 +0200 Subject: [PATCH 087/132] Fix GENERIC_USERNAMES thinko --- src/role.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/role.c b/src/role.c index 2e2cbabae..9e09d448a 100644 --- a/src/role.c +++ b/src/role.c @@ -1337,8 +1337,9 @@ plnamesuffix() i = (int)strlen(plname); eptr = GENERIC_USERNAMES; sptr = strstri(eptr, plname); - if (sptr && ((sptr == eptr && (sptr[i] == ' ' || sptr[i] == '\0')) - || sptr[i] == ' ' || sptr[i] == '\0')) + if (sptr + && (sptr == eptr || sptr[-1] == ' ') + && (sptr[i] == ' ' || sptr[i] == '\0')) *plname = '\0'; /* call askname() */ #endif From d5abd07dad434e60b6cef622c6f894ede458cb96 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Tue, 10 Mar 2015 19:48:04 +0200 Subject: [PATCH 088/132] Add boolean option "bones" Setting bones off prevents saving and loading bones files. --- doc/Guidebook.mn | 2 ++ include/flag.h | 1 + include/patchlevel.h | 2 +- src/bones.c | 2 ++ src/options.c | 1 + 5 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 86094fe26..8ce5dbaad 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -1927,6 +1927,8 @@ quality of the weapon; you are free to manually fill your quiver or quiver sack or make ready with the `Q' command instead. If no weapon is found or the option is false, the `t' (throw) command is executed instead. (default false) +.lp bones +Allow saving and loading bones files. (default true) .lp boulder Set the character used to display boulders (default is rock class symbol). .lp catname diff --git a/include/flag.h b/include/flag.h index a34abe839..aaff7431c 100644 --- a/include/flag.h +++ b/include/flag.h @@ -21,6 +21,7 @@ struct flag { boolean autoquiver; /* Automatically fill quiver */ boolean beginner; boolean biff; /* enable checking for mail */ + boolean bones; /* allow saving/loading bones */ boolean confirm; /* confirm before hitting tame monsters */ boolean debug; /* in debugging mode */ #define wizard flags.debug diff --git a/include/patchlevel.h b/include/patchlevel.h index 2399ca5b0..00411a2c2 100644 --- a/include/patchlevel.h +++ b/include/patchlevel.h @@ -14,7 +14,7 @@ * Incrementing EDITLEVEL can be used to force invalidation of old bones * and save files. */ -#define EDITLEVEL 55 +#define EDITLEVEL 56 #define COPYRIGHT_BANNER_A \ "NetHack, Copyright 1985-2012" diff --git a/src/bones.c b/src/bones.c index 926b9079e..269152578 100644 --- a/src/bones.c +++ b/src/bones.c @@ -287,6 +287,7 @@ can_make_bones() { register struct trap *ttmp; + if (!flags.bones) return FALSE; if (ledger_no(&u.uz) <= 0 || ledger_no(&u.uz) > maxledgerno()) return FALSE; if (no_bones_level(&u.uz)) @@ -533,6 +534,7 @@ getbones() if(discover) /* save bones files for real games */ return(0); + if (!flags.bones) return (0); /* wizard check added by GAN 02/05/87 */ if(rn2(3) /* only once in three times do we find bones */ && !wizard diff --git a/src/options.c b/src/options.c index 229c2df91..98ab3724b 100644 --- a/src/options.c +++ b/src/options.c @@ -85,6 +85,7 @@ static struct Bool_Opt #else {"BIOS", (boolean *)0, FALSE, SET_IN_FILE}, #endif + {"bones", &flags.bones, TRUE, SET_IN_FILE}, #ifdef INSURANCE {"checkpoint", &flags.ins_chkpt, TRUE, SET_IN_GAME}, #else From 7c65f47dfd5fc6232f1c243dd0e0b7b8283cd6dd Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 10 Mar 2015 14:25:54 -0400 Subject: [PATCH 089/132] One VS Makefile for Nethack that works with VS2010-VS2015 --- sys/winnt/Makefile.msc | 164 ++++++++++++++++++++++++++++++++++------- 1 file changed, 136 insertions(+), 28 deletions(-) diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index 4d2b4c066..847aa3797 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -1,13 +1,17 @@ -# NetHack 3.5 Makefile.msc $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ -# NetHack 3.5 Makefile.msc $Date: 2012/04/14 00:38:09 $ $Revision: 1.54 $ -# Copyright (c) NetHack PC Development Team 1993-2012 +# NetHack 3.5 Makefile.msc $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +# Copyright (c) NetHack PC Development Team 1993-2015 # -# NetHack 3.5.x Makefile for MS Visual Studio Visual C++ compiler +#============================================================================== +# Build Tools Environment +# +# NetHack 3.6.x Makefile for MS Visual Studio Visual C++ compiler # -# Win32 Compilers Tested: -# - Microsoft Visual Studio 2010 Express +# Visual Studio Compilers Tested: # - Microsoft Visual Studio 2010 Express, with the Platform SDK +# - Microsoft Visual Studio 2013 Express +# - Microsoft Visual Studio 2015 Express (pre-release) # +#============================================================================== # This is used for building two versions of NetHack: # A tty port utilizing the Win32 Console I/O subsystem, Console # NetHack; @@ -21,18 +25,71 @@ # .y yacc (such as bison) # .l lex (such as flex) # -# -# If you have any questions read the sys/winnt/Install.nt file included -# with the distribution. +# If you have any questions read the sys/winnt/Install.nt file included +# with the distribution. #============================================================================== -# Do not delete the following line. +#============================================================================== +# This section is used to determine the version of Visual Studio we are using. +# We set VSVER to 0000 to flag any version that is too old or untested. +# +!IF "$(_NMAKE_VER)" == "14.00.22310.1" +VSVER=2015 +!ELSEIF "$(_NMAKE_VER)" == "12.00.21005.1" +VSVER=2013 +!ELSEIF "$(_NMAKE_VER)" == "10.00.40219.01" +VSVER=2010 +!ELSE +VSVER=0000 #untested version +!ENDIF +# +#============================================================================== +# BUILD DECISIONS SECTION +# +# 1. 32-bit or 64-bit? +# +!IF ($(VSVER) >= 2013) +# Set your desired target to x86 (32-bit) or x64 (64-bit) here by +# uncommenting the appropriate target size. +# +# 64 bit +#TARGET_CPU=x64 +# +# 32 bit +TARGET_CPU=x86 +!ELSE +# For VS2010 use "setenv /x86" or "setenv /x64" before invoking make process +# DO NOT DELETE THE FOLLOWING LINE !include - +!ENDIF +# +#--------------------------------------------------------------- +# 2. Graphical version or command line version? +# # Graphical interface -# Set to Y for a graphical version +# Uncomment below to set to Y for a graphical version #GRAPHICAL = Y +# +#--------------------------------------------------------------- +# 3. Where do you want the game to be built (which folder)? +# + +GAMEDIR = ..\binary # Game directory + +# This marks the end of the BUILD DECISIONS section. +#============================================================================== +# +#=============================================== +#======= End of Modification Section =========== +#=============================================== +# +################################################ +# # +# Nothing below here should have to be changed.# +# # +################################################ + # Set the gamedir according to your preference. # If not present prior to compilation it gets created. @@ -42,8 +99,6 @@ GAME = NetHackW # Game Name GAME = NetHack # Game Name !ENDIF -GAMEDIR = ..\binary # Game directory - # # Source directories. Makedefs hardcodes these, don't change them. # @@ -65,6 +120,66 @@ WSHR = ..\win\share # Tile support files OBJ = o +cc=cl +link=link +rc=Rc + +# +#============================================= +# Visual Studio versions >= 2013 specific stuff +#============================================= + +!IF "$(TARGET_CPU)" == "" +TARGET_CPU=x86 +!ENDIF + +# Common compiler flags: +# -c - compile without linking +# -W3 - Set warning level to level 3 (-W4 for 64-bit compilations) +# -Zi - generate debugging information +# -Od - disable all optimizations +# -Ox - use maximum optimizations +# -Zd - generate only public symbols and line numbers for debugging +# -GS - enable security checks +# +ccommon=-c -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -GS -c +lflags=/INCREMENTAL:NO /NOLOGO + +!IF "$(TARGET_CPU)" == "x86" +cflags = $(ccommon) -D_X86_=1 -DWIN32 -D_WIN32 -W3 +scall = -Gz + +!ELSEIF "$(TARGET_CPU)" == "x64" +cflags = $(ccommon) -D_AMD64_=1 -DWIN64 -D_WIN64 -DWIN32 -D_WIN32 +cflags = $(cflags) -W4 +scall = +!ENDIF + +# declarations for use on Intel x86 systems +!IF "$(TARGET_CPU)" == "x86" +DLLENTRY = @12 +!ENDIF + +# declarations for use on AMD64 systems +!IF "$(TARGET_CPU)" == "x64" +DLLENTRY = +!ENDIF + +# for Windows applications +conlflags = $(lflags) -subsystem:console,$(EXEVER) +guilflags = $(lflags) -subsystem:windows,$(EXEVER) +dlllflags = $(lflags) -entry:_DllMainCRTStartup$(DLLENTRY) -dll + +# basic subsystem specific libraries, less the C Run-Time +baselibs = kernel32.lib $(optlibs) $(winsocklibs) advapi32.lib +winlibs = $(baselibs) user32.lib gdi32.lib comdlg32.lib winspool.lib + +# for Windows applications that use the C Run-Time libraries +conlibs = $(baselibs) +guilibs = $(winlibs) +# +# End of VS2013 and greater stuff +#============================================= # #========================================== @@ -134,15 +249,6 @@ PRECOMPHEAD = N # set to Y if you want to use precomp. headers #ZLIB = zlib.lib -#=============================================== -#======= End of Modification Section =========== -#=============================================== -################################################ -# # -# Nothing below here should have to be changed.# -# # -################################################ - !IF "$(GRAPHICAL)" == "Y" WINPORT = $(O)tile.o $(O)mhaskyn.o $(O)mhdlg.o \ $(O)mhfont.o $(O)mhinput.o $(O)mhmain.o $(O)mhmap.o \ @@ -420,7 +526,7 @@ OBJS = $(VOBJ01) $(VOBJ02) $(VOBJ03) $(VOBJ04) $(VOBJ05) \ $(VOBJ11) $(VOBJ12) $(VOBJ13) $(VOBJ14) $(VOBJ15) \ $(VOBJ16) $(VOBJ17) $(VOBJ18) $(VOBJ19) $(VOBJ20) \ $(VOBJ21) $(VOBJ22) $(VOBJ23) $(VOBJ24) $(VOBJ25) \ - $(VOBJ26) $(VOBJ27) + $(VOBJ26) $(VOBJ27) $(VOBJ28) $(VOBJ29) WINPOBJ = $(WINPORT) @@ -483,10 +589,10 @@ GAMEFILE = $(GAMEDIR)\$(GAME).exe # # The default make target (so just typing 'nmake' is useful). # -default : $(GAMEFILE) +default : install # -# The main target. +# The game target. # $(GAME): $(O)obj.tag $(O)utility.tag envchk $(GAMEFILE) @@ -920,10 +1026,12 @@ $(O)obj.tag: #========================================== envchk: +! IF ($(VSVER) < 2010) + @echo Your Visual Studio version is too old or untested ($(_NMAKE_VER)) +!ERROR Your Visual Studio version is too old or untested ($(_NMAKE_VER)) +! ENDIF ! IF "$(TARGET_CPU)"=="x64" @echo Windows x64 64-bit build -! ELSEIF "$(TARGET_CPU)"=="IA64" - @echo Windows x64 64-bit build ! ELSE @echo Windows x86 32-bit build ! ENDIF From 1287999b1c7e6ce4228aecc8f0fd604c681be408 Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 10 Mar 2015 18:00:49 -0400 Subject: [PATCH 090/132] do_look() in post-3.4.3 code fixes entry --- doc/fixes35.0 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 1e31bf65a..b6ddc30d1 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -866,6 +866,8 @@ passive attacks no longer erode armor covered by other armor dipping a fooproof item into acid no longer forgets that it's fooproof dipping a container into uncursed water now gets its contents wet sanitize petnames and fruit to prevent escape codes +do_look() in post-3.4.3 used glyph prior to setting it in pager.c + Platform- and/or Interface-Specific Fixes ----------------------------------------- From 64b3c6460a3d9877bfdd156c52aec0fe50e79348 Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 10 Mar 2015 18:34:01 -0400 Subject: [PATCH 091/132] catch up on some fixes entries --- doc/fixes35.0 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/doc/fixes35.0 b/doc/fixes35.0 index b6ddc30d1..f6519a6f7 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -866,6 +866,12 @@ passive attacks no longer erode armor covered by other armor dipping a fooproof item into acid no longer forgets that it's fooproof dipping a container into uncursed water now gets its contents wet sanitize petnames and fruit to prevent escape codes +data.base "bat" overrode later "combat" entry +data.base "gelatinous cube" and "jack boot" have their own entries +data.base "vampire bat" matched twice; use the bat entry +data.base dagger attribution started with spaces instead of tabs +remove 'if (Deaf)' guards preceding You_hear which already checks deafness +tse a menu to loot multiple containers do_look() in post-3.4.3 used glyph prior to setting it in pager.c @@ -883,6 +889,10 @@ tty: when loading user's run-time configuration, explicitly negating one of to regular ASCII and left the earlier option inaccurately set to "on" tty: various bugfixes for very wide and/or tall screens tty+GOLDOBJ: dropping or looting by menu wouldn't honor a count for gold +tty: fix crashing when a location has more than 32k items +tty: fix segfault when MD termcap is not defined +tty: do not cut off statuslines at 80 characters for wider term +tty: prevent accidental escapes from string entries unix: remove use of parentheses in nethack man page usage that confused a man page conversion tool unix: new -wwindowtype option @@ -890,6 +900,7 @@ unix: don't clobber old level files if 2nd hangup/disconnect occurs while reconnected user is responding to the "destroy old game?" prompt unix/Qt: saved games were not found if nethack was built with prefixes in use unix,vms: allow digits after first character in name at "Who are you?" prompt +unix: implement fcntl(2) locking on systems that can handle it vms: the DLB configuration could fail to build if a file without a dot in its name happened to match a logical name Windows: starting a game with nethack.exe (tty) and saving, then restoring @@ -1065,6 +1076,10 @@ dipping multiple potions in another potion may only dip part of their stack make being inside a stinking cloud (when not immune or resistant) become a major trouble which is fixable by prayer introduce some variation in monster movement rates +Add database entry for shuriken and make it match throwing star +Add database entry for fedora +Add database entry for land mine +change command X to twoweapon toggle Platform- and/or Interface-Specific New Features @@ -1133,4 +1148,5 @@ make REINCARNATION make TOURIST unconditional make KOPS unconditional make ELBERETH unconditional +allow defining of generic usernames in config.h instead of hard-coding in role.c From 3243b332a3b25fcab04ee462977af6e0ad586d19 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Wed, 11 Mar 2015 17:16:05 +0200 Subject: [PATCH 092/132] getpos improvements: automatic description Pressing '@' will move the cursor on top of the hero. Pressing '#' will toggle automatic description mode, where the feature under the cursor is automatically described when the cursor is moved. --- doc/fixes35.0 | 3 + src/do_name.c | 43 ++++- src/pager.c | 427 ++++++++++++++++++++++++++------------------------ 3 files changed, 271 insertions(+), 202 deletions(-) diff --git a/doc/fixes35.0 b/doc/fixes35.0 index f6519a6f7..89646e389 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -1080,6 +1080,9 @@ Add database entry for shuriken and make it match throwing star Add database entry for fedora Add database entry for land mine change command X to twoweapon toggle +pressing @ when cursor positioning moves cursor on top of hero +pressing # when cursor positioning toggles automatic description of features + under the cursor Platform- and/or Interface-Specific New Features diff --git a/src/do_name.c b/src/do_name.c index 4face203e..ce538adb4 100644 --- a/src/do_name.c +++ b/src/do_name.c @@ -40,6 +40,8 @@ const char *goal; putstr(tmpwin, 0, sbuf); putstr(tmpwin, 0, "Use [HJKL] to move the cursor 8 units at a time."); putstr(tmpwin, 0, "Or enter a background symbol (ex. <)."); + putstr(tmpwin, 0, "Use @ to move the cursor on yourself."); + putstr(tmpwin, 0, "Use # to toggle automatic description."); /* disgusting hack; the alternate selection characters work for any getpos call, but they only matter for dowhatis (and doquickwhatis) */ doing_what_is = (goal == what_is_an_unknown_object); @@ -63,6 +65,8 @@ const char *goal; int cx, cy, i, c; int sidx, tx, ty; boolean msg_given = TRUE; /* clear message window by default */ + boolean auto_msg = FALSE; + boolean show_goal_msg = FALSE; static const char pick_chars[] = ".,;:"; const char *cp; @@ -82,7 +86,32 @@ const char *goal; lock_mouse_cursor(TRUE); #endif for (;;) { + + if (show_goal_msg) { + pline("Move cursor to %s:", goal); + curs(WIN_MAP, cx, cy); + flush_screen(0); + show_goal_msg = FALSE; + } else if (auto_msg && !msg_given) { + coord cc; + int sym = 0; + char tmpbuf[BUFSZ]; + char *firstmatch = NULL; + cc.x = cx; + cc.y = cy; + if (do_screen_description(cc, TRUE, sym, tmpbuf, &firstmatch)) { + /* there may be an encoded glyph */ + putmixed(WIN_MESSAGE, 0, tmpbuf); + curs(WIN_MAP, cx, cy); + flush_screen(0); + } + } + c = nh_poskey(&tx, &ty, &sidx); + + if (auto_msg) + msg_given = FALSE; + if (c == '\033') { cx = cy = -10; msg_given = TRUE; /* force clear */ @@ -142,8 +171,20 @@ const char *goal; else /* ^R */ docrt(); /* redraw */ /* update message window to reflect that we're still targetting */ - pline("Move cursor to %s:", goal); + show_goal_msg = TRUE; msg_given = TRUE; + } else if (c == '#') { + auto_msg = !auto_msg; + pline("Automatic description %sis %s.", + flags.verbose ? "of features under cursor " : "", + auto_msg ? "on" : "off"); + if (!auto_msg) show_goal_msg = TRUE; + msg_given = TRUE; + goto nxtc; + } else if (c == '@') { + cx = u.ux; + cy = u.uy; + goto nxtc; } else { if (!index(quitchars, c)) { char matching[MAXPCHARS]; diff --git a/src/pager.c b/src/pager.c index 459a6daf4..af36ba6e0 100644 --- a/src/pager.c +++ b/src/pager.c @@ -437,6 +437,229 @@ bad_data_file: impossible("'data' file in wrong format"); (void) dlb_fclose(fp); } +int +do_screen_description(cc, looked, sym, out_str, firstmatch) +coord cc; +boolean looked; +int sym; +char *out_str; +const char **firstmatch; +{ + boolean need_to_look = FALSE; + int glyph; + char look_buf[BUFSZ], prefix[BUFSZ]; + int found = 0; /* count of matching syms found */ + int i; + int skipped_venom = 0; + boolean hit_trap; + const char *x_str; + static const char *mon_interior = "the interior of a monster"; + struct permonst *pm = NULL; + + if (looked) { + int oc, so; + unsigned os; + + glyph = glyph_at(cc.x,cc.y); + + /* Convert the glyph at the selected position to a symbol. */ + so = mapglyph(glyph, &sym, &oc, &os, cc.x, cc.y); + } + + if (looked) + Sprintf(prefix, "%s ", encglyph(glyph)); + else + Sprintf(prefix, "%c ", sym); + + /* + * Check all the possibilities, saving all explanations in a buffer. + * When all have been checked then the string is printed. + */ + + /* Check for monsters */ + for (i = 0; i < MAXMCLASSES; i++) { + if (sym == ((looked) ? + showsyms[i + SYM_OFF_M] : def_monsyms[i].sym) && + def_monsyms[i].explain) { + need_to_look = TRUE; + if (!found) { + Sprintf(out_str, "%s%s", + prefix, an(def_monsyms[i].explain)); + *firstmatch = def_monsyms[i].explain; + found++; + } else { + found += append_str(out_str, an(def_monsyms[i].explain)); + } + } + } + /* handle '@' as a special case if it refers to you and you're + playing a character which isn't normally displayed by that + symbol; firstmatch is assumed to already be set for '@' */ + if (((looked) ? + (sym == showsyms[S_HUMAN + SYM_OFF_M] && cc.x == u.ux && cc.y == u.uy) : + (sym == def_monsyms[S_HUMAN].sym && !flags.showrace)) && + !(Race_if(PM_HUMAN) || Race_if(PM_ELF)) && !Upolyd) + found += append_str(out_str, "you"); /* tack on "or you" */ + + /* + * Special case: if identifying from the screen, and we're swallowed, + * and looking at something other than our own symbol, then just say + * "the interior of a monster". + */ + if (u.uswallow && (looked) && is_swallow_sym(sym)) { + if (!found) { + Sprintf(out_str, "%s%s", + prefix, mon_interior); + *firstmatch = mon_interior; + } else { + found += append_str(out_str, mon_interior); + } + need_to_look = TRUE; + } + + /* Now check for objects */ + for (i = 1; i < MAXOCLASSES; i++) { + if (sym == ((looked) ? + showsyms[i + SYM_OFF_O] : def_oc_syms[i].sym)) { + need_to_look = TRUE; + if ((looked) && i == VENOM_CLASS) { + skipped_venom++; + continue; + } + if (!found) { + Sprintf(out_str, "%s%s", + prefix, an(def_oc_syms[i].explain)); + *firstmatch = def_oc_syms[i].explain; + found++; + } else { + found += append_str(out_str, an(def_oc_syms[i].explain)); + } + } + } + + if (sym == DEF_INVISIBLE) { + if (!found) { + Sprintf(out_str, "%s%s", + prefix, + an(invisexplain)); + *firstmatch = invisexplain; + found++; + } else { + found += append_str(out_str, an(invisexplain)); + } + } + +#define is_cmap_trap(i) ((i) >= S_arrow_trap && (i) <= S_polymorph_trap) +#define is_cmap_drawbridge(i) ((i) >= S_vodbridge && (i) <= S_hcdbridge) + + /* Now check for graphics symbols */ + for (hit_trap = FALSE, i = 0; i < MAXPCHARS; i++) { + x_str = defsyms[i].explanation; + if (sym == ((looked) ? + showsyms[i] : defsyms[i].sym) && *x_str) { + /* avoid "an air", "a water", or "a floor of a room" */ + int article = (i == S_room) ? 2 : /* 2=>"the" */ + !(strcmp(x_str, "air") == 0 || /* 1=>"an" */ + strcmp(x_str, "water") == 0); /* 0=>(none)*/ + + if (!found) { + if (is_cmap_trap(i)) { + Sprintf(out_str, "%sa trap", prefix); + hit_trap = TRUE; + } else { + Sprintf(out_str, "%s%s", + prefix, + article == 2 ? the(x_str) : + article == 1 ? an(x_str) : x_str); + } + *firstmatch = x_str; + found++; + } else if (!u.uswallow && !(hit_trap && is_cmap_trap(i)) && + !(found >= 3 && is_cmap_drawbridge(i))) { + found += append_str(out_str, + article == 2 ? the(x_str) : + article == 1 ? an(x_str) : x_str); + if (is_cmap_trap(i)) hit_trap = TRUE; + } + + if (i == S_altar || is_cmap_trap(i)) + need_to_look = TRUE; + } + } + + /* Now check for warning symbols */ + for (i = 1; i < WARNCOUNT; i++) { + x_str = def_warnsyms[i].explanation; + if (sym == ((looked) ? + warnsyms[i] : def_warnsyms[i].sym)) { + if (!found) { + Sprintf(out_str, "%s%s", + prefix, def_warnsyms[i].explanation); + *firstmatch = def_warnsyms[i].explanation; + found++; + } else { + found += append_str(out_str, def_warnsyms[i].explanation); + } + /* Kludge: warning trumps boulders on the display. + Reveal the boulder too or player can get confused */ + if ((looked) && sobj_at(BOULDER, cc.x, cc.y)) + Strcat(out_str, " co-located with a boulder"); + break; /* out of for loop*/ + } + } + + /* if we ignored venom and list turned out to be short, put it back */ + if (skipped_venom && found < 2) { + x_str = def_oc_syms[VENOM_CLASS].explain; + if (!found) { + Sprintf(out_str, "%s%s", + prefix, an(x_str)); + *firstmatch = x_str; + found++; + } else { + found += append_str(out_str, an(x_str)); + } + } + + /* handle optional boulder symbol as a special case */ + if (iflags.bouldersym && sym == iflags.bouldersym) { + if (!found) { + *firstmatch = "boulder"; + Sprintf(out_str, "%s%s", + prefix, an(*firstmatch)); + found++; + } else { + found += append_str(out_str, "boulder"); + } + } + + /* + * If we are looking at the screen, follow multiple possibilities or + * an ambiguous explanation by something more detailed. + */ + if (looked) { + if (found > 1 || need_to_look) { + char monbuf[BUFSZ]; + char temp_buf[BUFSZ]; + + pm = lookat(cc.x, cc.y, look_buf, monbuf); + *firstmatch = look_buf; + if (*(*firstmatch)) { + Sprintf(temp_buf, " (%s)", *firstmatch); + (void)strncat(out_str, temp_buf, BUFSZ-strlen(out_str)-1); + found = 1; /* we have something to look up */ + } + if (monbuf[0]) { + Sprintf(temp_buf, " [seen: %s]", monbuf); + (void)strncat(out_str, temp_buf, BUFSZ-strlen(out_str)-1); + } + } + } + + return found; +} + + /* getpos() return values */ #define LOOK_TRADITIONAL 0 /* '.' -- ask about "more info?" */ #define LOOK_QUICK 1 /* ',' -- skip "more info?" */ @@ -453,19 +676,15 @@ do_look(mode, click_cc) { boolean quick = (mode == 1); /* use cursor && don't search for "more info" */ boolean clicklook = (mode == 2); /* right mouse-click method */ - char out_str[BUFSZ], look_buf[BUFSZ], prefix[BUFSZ]; - const char *x_str, *firstmatch = 0; + char out_str[BUFSZ]; + const char *firstmatch = 0; struct permonst *pm = 0; - int glyph; /* glyph at selected position */ int i, ans = 0; int sym; /* typed symbol or converted glyph */ int found; /* count of matching syms found */ coord cc; /* screen pos of unknown glyph */ boolean save_verbose; /* saved value of flags.verbose */ boolean from_screen; /* question from the screen */ - boolean need_to_look; /* need to get explan. from glyph */ - boolean hit_trap; /* true if found trap explanation */ - int skipped_venom; /* non-zero if we ignored "splash of venom" */ static const char *mon_interior = "the interior of a monster"; if (!clicklook) { @@ -506,9 +725,7 @@ do_look(mode, click_cc) */ do { /* Reset some variables. */ - need_to_look = FALSE; pm = (struct permonst *)0; - skipped_venom = 0; found = 0; out_str[0] = '\0'; @@ -529,201 +746,9 @@ do_look(mode, click_cc) } flags.verbose = FALSE; /* only print long question once */ } - glyph = glyph_at(cc.x,cc.y); - - /* Convert the glyph at the selected position to a symbol. */ - so = mapglyph(glyph, &sym, &oc, &os, cc.x, cc.y); } - if (from_screen || clicklook) - Sprintf(prefix, "%s ", encglyph(glyph)); - else - Sprintf(prefix, "%c ", sym); - - /* - * Check all the possibilities, saving all explanations in a buffer. - * When all have been checked then the string is printed. - */ - - /* Check for monsters */ - for (i = 0; i < MAXMCLASSES; i++) { - if (sym == ((from_screen || clicklook) ? - showsyms[i + SYM_OFF_M] : def_monsyms[i].sym) && - def_monsyms[i].explain) { - need_to_look = TRUE; - if (!found) { - Sprintf(out_str, "%s%s", - prefix, an(def_monsyms[i].explain)); - firstmatch = def_monsyms[i].explain; - found++; - } else { - found += append_str(out_str, an(def_monsyms[i].explain)); - } - } - } - /* handle '@' as a special case if it refers to you and you're - playing a character which isn't normally displayed by that - symbol; firstmatch is assumed to already be set for '@' */ - if (((from_screen || clicklook) ? - (sym == showsyms[S_HUMAN + SYM_OFF_M] && cc.x == u.ux && cc.y == u.uy) : - (sym == def_monsyms[S_HUMAN].sym && !flags.showrace)) && - !(Race_if(PM_HUMAN) || Race_if(PM_ELF)) && !Upolyd) - found += append_str(out_str, "you"); /* tack on "or you" */ - - /* - * Special case: if identifying from the screen, and we're swallowed, - * and looking at something other than our own symbol, then just say - * "the interior of a monster". - */ - if (u.uswallow && (from_screen || clicklook) && is_swallow_sym(sym)) { - if (!found) { - Sprintf(out_str, "%s%s", - prefix, mon_interior); - firstmatch = mon_interior; - } else { - found += append_str(out_str, mon_interior); - } - need_to_look = TRUE; - } - - /* Now check for objects */ - for (i = 1; i < MAXOCLASSES; i++) { - if (sym == ((from_screen || clicklook) ? - showsyms[i + SYM_OFF_O] : def_oc_syms[i].sym)) { - need_to_look = TRUE; - if ((from_screen || clicklook) && i == VENOM_CLASS) { - skipped_venom++; - continue; - } - if (!found) { - Sprintf(out_str, "%s%s", - prefix, an(def_oc_syms[i].explain)); - firstmatch = def_oc_syms[i].explain; - found++; - } else { - found += append_str(out_str, an(def_oc_syms[i].explain)); - } - } - } - - if (sym == DEF_INVISIBLE) { - if (!found) { - Sprintf(out_str, "%s%s", - prefix, - an(invisexplain)); - firstmatch = invisexplain; - found++; - } else { - found += append_str(out_str, an(invisexplain)); - } - } - -#define is_cmap_trap(i) ((i) >= S_arrow_trap && (i) <= S_polymorph_trap) -#define is_cmap_drawbridge(i) ((i) >= S_vodbridge && (i) <= S_hcdbridge) - - /* Now check for graphics symbols */ - for (hit_trap = FALSE, i = 0; i < MAXPCHARS; i++) { - x_str = defsyms[i].explanation; - if (sym == ((from_screen || clicklook) ? - showsyms[i] : defsyms[i].sym) && *x_str) { - /* avoid "an air", "a water", or "a floor of a room" */ - int article = (i == S_room) ? 2 : /* 2=>"the" */ - !(strcmp(x_str, "air") == 0 || /* 1=>"an" */ - strcmp(x_str, "water") == 0); /* 0=>(none)*/ - - if (!found) { - if (is_cmap_trap(i)) { - Sprintf(out_str, "%sa trap", prefix); - hit_trap = TRUE; - } else { - Sprintf(out_str, "%s%s", - prefix, - article == 2 ? the(x_str) : - article == 1 ? an(x_str) : x_str); - } - firstmatch = x_str; - found++; - } else if (!u.uswallow && !(hit_trap && is_cmap_trap(i)) && - !(found >= 3 && is_cmap_drawbridge(i))) { - found += append_str(out_str, - article == 2 ? the(x_str) : - article == 1 ? an(x_str) : x_str); - if (is_cmap_trap(i)) hit_trap = TRUE; - } - - if (i == S_altar || is_cmap_trap(i)) - need_to_look = TRUE; - } - } - - /* Now check for warning symbols */ - for (i = 1; i < WARNCOUNT; i++) { - x_str = def_warnsyms[i].explanation; - if (sym == ((from_screen || clicklook) ? - warnsyms[i] : def_warnsyms[i].sym)) { - if (!found) { - Sprintf(out_str, "%s%s", - prefix, def_warnsyms[i].explanation); - firstmatch = def_warnsyms[i].explanation; - found++; - } else { - found += append_str(out_str, def_warnsyms[i].explanation); - } - /* Kludge: warning trumps boulders on the display. - Reveal the boulder too or player can get confused */ - if ((from_screen || clicklook) && sobj_at(BOULDER, cc.x, cc.y)) - Strcat(out_str, " co-located with a boulder"); - break; /* out of for loop*/ - } - } - - /* if we ignored venom and list turned out to be short, put it back */ - if (skipped_venom && found < 2) { - x_str = def_oc_syms[VENOM_CLASS].explain; - if (!found) { - Sprintf(out_str, "%s%s", - prefix, an(x_str)); - firstmatch = x_str; - found++; - } else { - found += append_str(out_str, an(x_str)); - } - } - - /* handle optional boulder symbol as a special case */ - if (iflags.bouldersym && sym == iflags.bouldersym) { - if (!found) { - firstmatch = "boulder"; - Sprintf(out_str, "%s%s", - prefix, an(firstmatch)); - found++; - } else { - found += append_str(out_str, "boulder"); - } - } - - /* - * If we are looking at the screen, follow multiple possibilities or - * an ambiguous explanation by something more detailed. - */ - if (from_screen || clicklook) { - if (found > 1 || need_to_look) { - char monbuf[BUFSZ]; - char temp_buf[BUFSZ]; - - pm = lookat(cc.x, cc.y, look_buf, monbuf); - firstmatch = look_buf; - if (*firstmatch) { - Sprintf(temp_buf, " (%s)", firstmatch); - (void)strncat(out_str, temp_buf, BUFSZ-strlen(out_str)-1); - found = 1; /* we have something to look up */ - } - if (monbuf[0]) { - Sprintf(temp_buf, " [seen: %s]", monbuf); - (void)strncat(out_str, temp_buf, BUFSZ-strlen(out_str)-1); - } - } - } + found = do_screen_description(cc, (from_screen||clicklook), sym, out_str, &firstmatch); /* Finally, print out our explanation. */ if (found) { From a335f8306f29739dd1ea1172e9d973bb12fd326e Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Wed, 11 Mar 2015 19:56:34 +0200 Subject: [PATCH 093/132] Add MAX_STATUENAME_RANK sysconf setting MAX_STATUENAME_RANK tells how many score file entries to use for random statue names. --- doc/Guidebook.mn | 4 ++++ include/sys.h | 1 + src/files.c | 7 +++++++ src/sys.c | 1 + src/topten.c | 2 +- sys/unix/sysconf | 3 +++ 6 files changed, 17 insertions(+), 1 deletion(-) diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 8ce5dbaad..4c499ac96 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -2945,6 +2945,10 @@ Minimum number of points to get an entry in the score file. PERS_IS_UID 0 or 1 to use user names or numeric userids, respectively, to identify unique people for the score file. +.lp +MAX_STATUENAME_RANK +Maximum number of score file entries to use for random statue names +(default is 10). .hn 1 Scoring .pg diff --git a/include/sys.h b/include/sys.h index 713e33a55..8358021a2 100644 --- a/include/sys.h +++ b/include/sys.h @@ -22,6 +22,7 @@ struct sysopt { int pers_is_uid; int entrymax; int pointsmin; + int tt_oname_maxrank; #ifdef PANICTRACE /* panic options */ char *gdbpath; diff --git a/src/files.c b/src/files.c index 2cae9fb7f..d4c216276 100644 --- a/src/files.c +++ b/src/files.c @@ -2209,6 +2209,13 @@ int src; return 0; } sysopt.pointsmin = n; + } else if (src == SET_IN_SYS && match_varname(buf, "MAX_STATUENAME_RANK", 10)) { + n = atoi(bufp); + if (n < 1) { + raw_printf("Illegal value in MAX_STATUENAME_RANK (minimum is 1)."); + return 0; + } + sysopt.tt_oname_maxrank = n; # ifdef PANICTRACE } else if (src == SET_IN_SYS && match_varname(buf, "PANICTRACE_LIBC", 15)) { diff --git a/src/sys.c b/src/sys.c index 5f17a0a91..14e0aa642 100644 --- a/src/sys.c +++ b/src/sys.c @@ -29,6 +29,7 @@ sys_early_init(){ sysopt.entrymax = ENTRYMAX; sysopt.pointsmin = POINTSMIN; sysopt.pers_is_uid = PERS_IS_UID; + sysopt.tt_oname_maxrank = 10; /* sanity checks */ if(PERSMAX<1) sysopt.persmax = 1; diff --git a/src/topten.c b/src/topten.c index 58079a6de..db2e6fccb 100644 --- a/src/topten.c +++ b/src/topten.c @@ -975,7 +975,7 @@ struct obj *otmp; } tt = &tt_buf; - rank = rnd(10); + rank = rnd(sysopt.tt_oname_maxrank); pickentry: for(i = rank; i; i--) { readentry(rfile, tt); diff --git a/sys/unix/sysconf b/sys/unix/sysconf index 74e7fb1ae..cff28b04f 100644 --- a/sys/unix/sysconf +++ b/sys/unix/sysconf @@ -45,6 +45,9 @@ MAXPLAYERS=10 # numeric (1) user id. #PERS_IS_UID=1 +# Maximum number of score file entries to use for random statue names +#MAX_STATUENAME_RANK=10 + # Try to get more info in case of a program bug or crash. Using GDB can # get more information and works on more systems but requires gdb be available; # using LIBC only works if NetHack is linked with a libc that supports the From a46b7a3cf3de519c6175e781e9e98495c7765cde Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Wed, 11 Mar 2015 21:56:12 +0200 Subject: [PATCH 094/132] TTY: Implement the menu_search command When in a menu that allows selecting entries, press ':' to enter any text. Entries that match the text (via pmatch) will be toggled. --- doc/Guidebook.mn | 2 +- doc/fixes35.0 | 1 + win/tty/wintty.c | 86 ++++++++++++++++++++++++++++++++++++------------ 3 files changed, 67 insertions(+), 22 deletions(-) diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 4c499ac96..82fa2d195 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -2104,7 +2104,7 @@ Implemented by the Amiga, Gem and tty ports. Default '<'. .lp menu_search Menu character accelerator to search for a menu item. -Implemented by the Amiga, Gem and X11 ports. +Implemented by the Amiga, Gem, X11 and tty ports. Default ':'. .lp menu_select_all Menu character accelerator to select all items in a menu. diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 89646e389..2da27738f 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -1097,6 +1097,7 @@ win32tty: support for 'selectsaved' option for menu of existing save files to choose from at game startup tty: add window port routines for saving/restoring message history tty: enhanced role, race, &c selection at start of new game +tty: implement : (menu_search) command smartphone: added "Type Cmd" command that allows to type arbitrary commands using phone keypad smartphone: added Q(quiver) command to "Attack" layout diff --git a/win/tty/wintty.c b/win/tty/wintty.c index 19af943b9..a201218e7 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -201,6 +201,7 @@ static const char default_menu_cmds[] = { MENU_SELECT_PAGE, MENU_UNSELECT_PAGE, MENU_INVERT_PAGE, + MENU_SEARCH, 0 /* null terminator */ }; @@ -1228,6 +1229,42 @@ tty_clear_nhwindow(window) cw->curx = cw->cury = 0; } + +boolean +toggle_menu_curr(window, curr, lineno, in_view, counting, count) +winid window; +tty_menu_item *curr; +int lineno; +boolean in_view, counting; +long count; +{ + if (curr->selected) { + if (counting && count > 0) { + curr->count = count; + if (in_view) set_item_state(window, lineno, curr); + return TRUE; + } else { /* change state */ + curr->selected = FALSE; + curr->count = -1L; + if (in_view) set_item_state(window, lineno, curr); + return TRUE; + } + } else { /* !selected */ + if (counting && count > 0) { + curr->count = count; + curr->selected = TRUE; + if (in_view) set_item_state(window, lineno, curr); + return TRUE; + } else if (!counting) { + curr->selected = TRUE; + if (in_view) set_item_state(window, lineno, curr); + return TRUE; + } + /* do nothing counting&&count==0 */ + } + return FALSE; +} + STATIC_OVL void dmore(cw, s) register struct WinDesc *cw; @@ -1600,6 +1637,33 @@ struct WinDesc *cw; if (cw->how == PICK_ANY) invert_all(window, page_start, page_end, 0); break; + case MENU_SEARCH: + if (cw->how == PICK_NONE) { + tty_nhbell(); + break; + } else { + char searchbuf[BUFSZ], tmpbuf[BUFSZ]; + boolean on_curr_page = FALSE; + int lineno = 0; + tty_getlin("Search for:", tmpbuf); + if (!tmpbuf || tmpbuf[0] == '\033') break; + Sprintf(searchbuf, "*%s*", tmpbuf); + for (curr = cw->mlist; curr; curr = curr->next) { + if (on_curr_page) lineno++; + if (curr == page_start) + on_curr_page = TRUE; + else if (curr == page_end) + on_curr_page = FALSE; + if (curr->identifier.a_void && pmatch(searchbuf, curr->str)) { + toggle_menu_curr(window, curr, lineno, on_curr_page, counting, count); + if (cw->how == PICK_ONE) { + finished = TRUE; + break; + } + } + } + } + break; default: if (cw->how == PICK_NONE || !index(resp, morc)) { /* unacceptable input received */ @@ -1618,27 +1682,7 @@ struct WinDesc *cw; curr != page_end; n++, curr = curr->next) if (morc == curr->selector) { - if (curr->selected) { - if (counting && count > 0) { - curr->count = count; - set_item_state(window, n, curr); - } else { /* change state */ - curr->selected = FALSE; - curr->count = -1L; - set_item_state(window, n, curr); - } - } else { /* !selected */ - if (counting && count > 0) { - curr->count = count; - curr->selected = TRUE; - set_item_state(window, n, curr); - } else if (!counting) { - curr->selected = TRUE; - set_item_state(window, n, curr); - } - /* do nothing counting&&count==0 */ - } - + toggle_menu_curr(window, curr, n, TRUE, counting, count); if (cw->how == PICK_ONE) finished = TRUE; break; /* from `for' loop */ } From b889a4b938c9535f6012139a70ee926b44cc0971 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 11 Mar 2015 21:57:36 -0400 Subject: [PATCH 095/132] from ais523 list: charge for boulder filling pit --- doc/fixes35.0 | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 2da27738f..4ad731e36 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -873,6 +873,7 @@ data.base dagger attribution started with spaces instead of tabs remove 'if (Deaf)' guards preceding You_hear which already checks deafness tse a menu to loot multiple containers do_look() in post-3.4.3 used glyph prior to setting it in pager.c +charge for a boulder that fills a pit in shop Platform- and/or Interface-Specific Fixes From a46ad54b1dff32e3b789d7a4cdeefc9b5d790bd0 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 11 Mar 2015 23:04:02 -0400 Subject: [PATCH 096/132] charge for a boulder that fills a pit in shop Changes to be committed: modified: src/do.c From the email sent by ais523 earlier: > You aren't charged for digging a pit below an unpaid boulder > (causing the boulder to fill the pit). --- src/do.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/do.c b/src/do.c index 30cfb77f1..3069a4047 100644 --- a/src/do.c +++ b/src/do.c @@ -179,7 +179,7 @@ const char *verb; } } deltrap(t); - obfree(obj, (struct obj *)0); + useupf(obj, 1L); bury_objs(x, y); newsym(x,y); return TRUE; From 400d842a8febb7c4e450424f372c78b832cc8547 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Thu, 12 Mar 2015 17:57:13 +0200 Subject: [PATCH 097/132] Fix warnings --- include/extern.h | 1 + src/do_name.c | 2 +- src/pager.c | 10 +++------- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/include/extern.h b/include/extern.h index 0bd3aab7b..f382c4f7a 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1582,6 +1582,7 @@ E int NDECL(dowhatdoes); E char *FDECL(dowhatdoes_core,(CHAR_P, char *)); E int NDECL(dohelp); E int NDECL(dohistory); +E int FDECL(do_screen_description, (coord, BOOLEAN_P, int, char *, const char **)); E int FDECL(do_look, (int, coord *)); /* ### pcmain.c ### */ diff --git a/src/do_name.c b/src/do_name.c index ce538adb4..f1960b6ff 100644 --- a/src/do_name.c +++ b/src/do_name.c @@ -96,7 +96,7 @@ const char *goal; coord cc; int sym = 0; char tmpbuf[BUFSZ]; - char *firstmatch = NULL; + const char *firstmatch = NULL; cc.x = cx; cc.y = cy; if (do_screen_description(cc, TRUE, sym, tmpbuf, &firstmatch)) { diff --git a/src/pager.c b/src/pager.c index af36ba6e0..bb1c82e72 100644 --- a/src/pager.c +++ b/src/pager.c @@ -454,16 +454,15 @@ const char **firstmatch; boolean hit_trap; const char *x_str; static const char *mon_interior = "the interior of a monster"; - struct permonst *pm = NULL; if (looked) { - int oc, so; + int oc; unsigned os; glyph = glyph_at(cc.x,cc.y); /* Convert the glyph at the selected position to a symbol. */ - so = mapglyph(glyph, &sym, &oc, &os, cc.x, cc.y); + (void) mapglyph(glyph, &sym, &oc, &os, cc.x, cc.y); } if (looked) @@ -642,7 +641,7 @@ const char **firstmatch; char monbuf[BUFSZ]; char temp_buf[BUFSZ]; - pm = lookat(cc.x, cc.y, look_buf, monbuf); + (void) lookat(cc.x, cc.y, look_buf, monbuf); *firstmatch = look_buf; if (*(*firstmatch)) { Sprintf(temp_buf, " (%s)", *firstmatch); @@ -685,7 +684,6 @@ do_look(mode, click_cc) coord cc; /* screen pos of unknown glyph */ boolean save_verbose; /* saved value of flags.verbose */ boolean from_screen; /* question from the screen */ - static const char *mon_interior = "the interior of a monster"; if (!clicklook) { if (quick) { @@ -730,8 +728,6 @@ do_look(mode, click_cc) out_str[0] = '\0'; if (from_screen || clicklook) { - int oc, so; - unsigned os; if (from_screen) { if (flags.verbose) pline("Please move the cursor to %s.", From f8aced5480b42527d2e6bed7586501ae31b6ab0e Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Thu, 12 Mar 2015 21:35:04 +0200 Subject: [PATCH 098/132] Add Extended Logfile --- doc/fixes35.0 | 1 + include/config.h | 1 + include/decl.h | 4 ++ include/dungeon.h | 2 + include/extern.h | 1 + include/obj.h | 1 + include/you.h | 22 +++++++++ src/allmain.c | 7 +++ src/do.c | 1 + src/dungeon.c | 2 + src/end.c | 1 + src/invent.c | 13 +++++ src/mon.c | 2 + src/pray.c | 1 + src/restore.c | 6 +++ src/save.c | 1 + src/sp_lev.c | 12 +++++ src/topten.c | 107 ++++++++++++++++++++++++++++++++++++++++++ sys/unix/Makefile.top | 8 ++-- 19 files changed, 189 insertions(+), 4 deletions(-) diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 4ad731e36..10b4a8f68 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -1120,6 +1120,7 @@ adopt/adapt/improve the Paranoid_Quit patch; default is paranoid_confirm:pray paranoid_confirm:pray y to confirm #pray; supersedes prayconfirm paranoid_confirm:Remove always pick from inventory for 'R' and 'T' adopt/adapt/improve Dungeon Overview +Aardvark Joe's Extended Logfile Code Cleanup and Reorganization diff --git a/include/config.h b/include/config.h index 930bd549c..d8c96af14 100644 --- a/include/config.h +++ b/include/config.h @@ -187,6 +187,7 @@ #endif #define LOGFILE "logfile" /* larger file for debugging purposes */ +#define XLOGFILE "xlogfile" /* even larger logfile */ #define NEWS "news" /* the file containing the latest hack news */ #define PANICLOG "paniclog" /* log of panic and impossible events */ diff --git a/include/decl.h b/include/decl.h index 4591226e4..2071277dc 100644 --- a/include/decl.h +++ b/include/decl.h @@ -67,6 +67,8 @@ E struct dgn_topology { /* special dungeon levels for speed */ xchar d_mines_dnum, d_quest_dnum; d_level d_qstart_level, d_qlocate_level, d_nemesis_level; d_level d_knox_level; + d_level d_mineend_level; + d_level d_sokoend_level; } dungeon_topology; /* macros for accesing the dungeon levels by their old names */ #define oracle_level (dungeon_topology.d_oracle_level) @@ -97,6 +99,8 @@ E struct dgn_topology { /* special dungeon levels for speed */ #define qlocate_level (dungeon_topology.d_qlocate_level) #define nemesis_level (dungeon_topology.d_nemesis_level) #define knox_level (dungeon_topology.d_knox_level) +#define mineend_level (dungeon_topology.d_mineend_level) +#define sokoend_level (dungeon_topology.d_sokoend_level) E NEARDATA stairway dnstair, upstair; /* stairs up and down */ #define xdnstair (dnstair.sx) diff --git a/include/dungeon.h b/include/dungeon.h index f2bf75ef6..3607649b0 100644 --- a/include/dungeon.h +++ b/include/dungeon.h @@ -122,6 +122,8 @@ typedef struct branch { #define Is_qlocate(x) (on_level(x, &qlocate_level)) #define Is_nemesis(x) (on_level(x, &nemesis_level)) #define Is_knox(x) (on_level(x, &knox_level)) +#define Is_mineend_level(x) (on_level(x, &mineend_level)) +#define Is_sokoend_level(x) (on_level(x, &sokoend_level)) #define In_sokoban(x) ((x)->dnum == sokoban_dnum) #define Inhell In_hell(&u.uz) /* now gehennom */ diff --git a/include/extern.h b/include/extern.h index f382c4f7a..7e222778f 100644 --- a/include/extern.h +++ b/include/extern.h @@ -26,6 +26,7 @@ E void NDECL(stop_occupation); E void NDECL(display_gamewindows); E void NDECL(newgame); E void FDECL(welcome, (BOOLEAN_P)); +E time_t NDECL(get_realtime); /* ### apply.c ### */ diff --git a/include/obj.h b/include/obj.h index fe43d0878..f4fd78007 100644 --- a/include/obj.h +++ b/include/obj.h @@ -109,6 +109,7 @@ struct obj { #define leashmon corpsenm /* gets m_id of attached pet */ #define spestudied corpsenm /* # of times a spellbook has been studied */ #define fromsink corpsenm /* a potion from a sink */ +#define record_achieve_special corpsenm unsigned oeaten; /* nutrition left in food, if partly eaten */ long age; /* creation date */ long owornmask; diff --git a/include/you.h b/include/you.h index 0c343b3c4..81aba0ba4 100644 --- a/include/you.h +++ b/include/you.h @@ -53,6 +53,26 @@ struct u_event { Bitfield(ascended,1); /* has offered the Amulet */ }; +struct u_achieve { + Bitfield(amulet,1); /* touched Amulet */ + Bitfield(bell,1); /* touched Bell */ + Bitfield(book,1); /* touched Book */ + Bitfield(menorah,1); /* touched Candelabrum */ + Bitfield(enter_gehennom,1); /* entered Gehennom (or Valley) by any means */ + Bitfield(ascended,1); /* not quite the same as u.uevent.ascended */ + Bitfield(mines_luckstone,1); /* got a luckstone at end of mines */ + Bitfield(finish_sokoban,1); /* obtained the sokoban prize */ + + Bitfield(killed_medusa,1); +}; + +struct u_realtime { + time_t realtime; /* actual playing time up until the last restore */ + time_t restored; /* time the game was started or restored */ + time_t endtime; +}; + + /* KMH, conduct -- * These are voluntary challenges. Each field denotes the number of * times a challenge has been violated. @@ -306,6 +326,8 @@ struct you { /* 1 free bit! */ unsigned udg_cnt; /* how long you have been demigod */ + struct u_achieve uachieve; /* achievements */ + struct u_realtime urealtime; struct u_event uevent; /* certain events have happened */ struct u_have uhave; /* you're carrying special objects */ struct u_conduct uconduct; /* KMH, conduct */ diff --git a/src/allmain.c b/src/allmain.c index 2bb1c4240..eb1f2b69b 100644 --- a/src/allmain.c +++ b/src/allmain.c @@ -533,6 +533,13 @@ newgame() #endif program_state.something_worth_saving++; /* useful data now exists */ + u.urealtime.realtime = (time_t)0L; +#if defined(BSD) && !defined(POSIX_TYPES) + (void) time((long *)&u.urealtime.restored); +#else + (void) time(&u.urealtime.restored); +#endif + /* Success! */ welcome(TRUE); return; diff --git a/src/do.c b/src/do.c index 3069a4047..44b2a23bb 100644 --- a/src/do.c +++ b/src/do.c @@ -1316,6 +1316,7 @@ boolean at_stairs, falling, portal; #endif You_hear("groans and moans everywhere."); } else pline("It is hot here. You smell smoke..."); + u.uachieve.enter_gehennom = 1; } /* in case we've managed to bypass the Valley's stairway down */ if (Inhell && !Is_valley(&u.uz)) u.uevent.gehennom_entered = 1; diff --git a/src/dungeon.c b/src/dungeon.c index 4c8e6beeb..fd253750f 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -672,6 +672,8 @@ struct level_map { { "wizard1", &wiz1_level }, { "wizard2", &wiz2_level }, { "wizard3", &wiz3_level }, + { "minend", &mineend_level }, + { "soko1", &sokoend_level }, { X_START, &qstart_level }, { X_LOCATE, &qlocate_level }, { X_GOAL, &nemesis_level }, diff --git a/src/end.c b/src/end.c index 995ef8ec7..111fd1b3a 100644 --- a/src/end.c +++ b/src/end.c @@ -911,6 +911,7 @@ die: topten figure it out separately and possibly getting different time or even day if player is slow responding to --More-- */ endtime = getnow(); + u.urealtime.realtime += (endtime - u.urealtime.restored); /* Sometimes you die on the first move. Life's not fair. * On those rare occasions you get hosed immediately, go out diff --git a/src/invent.c b/src/invent.c index 62295915c..24213c7e3 100644 --- a/src/invent.c +++ b/src/invent.c @@ -240,15 +240,19 @@ struct obj *obj; } else if (obj->otyp == AMULET_OF_YENDOR) { if (u.uhave.amulet) impossible("already have amulet?"); u.uhave.amulet = 1; + u.uachieve.amulet = 1; } else if (obj->otyp == CANDELABRUM_OF_INVOCATION) { if (u.uhave.menorah) impossible("already have candelabrum?"); u.uhave.menorah = 1; + u.uachieve.menorah = 1; } else if (obj->otyp == BELL_OF_OPENING) { if (u.uhave.bell) impossible("already have silver bell?"); u.uhave.bell = 1; + u.uachieve.bell = 1; } else if (obj->otyp == SPE_BOOK_OF_THE_DEAD) { if (u.uhave.book) impossible("already have the book?"); u.uhave.book = 1; + u.uachieve.book = 1; } else if (obj->oartifact) { if (is_quest_artifact(obj)) { if (u.uhave.questart) @@ -258,6 +262,15 @@ struct obj *obj; } set_artifact_intrinsic(obj, 1, W_ART); } + if(obj->otyp == LUCKSTONE && obj->record_achieve_special) { + u.uachieve.mines_luckstone = 1; + obj->record_achieve_special = 0; + } else if((obj->otyp == AMULET_OF_REFLECTION || + obj->otyp == BAG_OF_HOLDING) && + obj->record_achieve_special) { + u.uachieve.finish_sokoban = 1; + obj->record_achieve_special = 0; + } } /* diff --git a/src/mon.c b/src/mon.c index 49f6282dc..b848e7586 100644 --- a/src/mon.c +++ b/src/mon.c @@ -1604,6 +1604,8 @@ register struct monst *mtmp; } if(mtmp->iswiz) wizdead(); if(mtmp->data->msound == MS_NEMESIS) nemdead(); + if(mtmp->data == &mons[PM_MEDUSA]) + u.uachieve.killed_medusa = 1; if(glyph_is_invisible(levl[mtmp->mx][mtmp->my].glyph)) unmap_object(mtmp->mx, mtmp->my); m_detach(mtmp, mptr); diff --git a/src/pray.c b/src/pray.c index d2b24c00a..ffdee9b49 100644 --- a/src/pray.c +++ b/src/pray.c @@ -1373,6 +1373,7 @@ dosacrifice() done(ESCAPED); } else { /* super big win */ adjalign(10); + u.uachieve.ascended = 1; pline("An invisible choir sings, and you are bathed in radiance..."); godvoice(altaralign, "Congratulations, mortal!"); display_nhwindow(WIN_MESSAGE, FALSE); diff --git a/src/restore.c b/src/restore.c index af974d147..f7707f5ed 100644 --- a/src/restore.c +++ b/src/restore.c @@ -554,6 +554,12 @@ unsigned int *stuckid, *steedid; mread(fd, (genericptr_t) timebuf, 14); timebuf[14] = '\0'; ubirthday = time_from_yyyymmddhhmmss(timebuf); +#if defined(BSD) && !defined(POSIX_TYPES) + (void) time((long *)&u.urealtime.restored); +#else + (void) time(&u.urealtime.restored); +#endif + set_uasmon(); #ifdef CLIPPING diff --git a/src/save.c b/src/save.c index b220f945d..1c9dea6e6 100644 --- a/src/save.c +++ b/src/save.c @@ -307,6 +307,7 @@ register int fd, mode; #ifdef SYSFLAGS bwrite(fd, (genericptr_t) &sysflags, sizeof(struct sysflag)); #endif + u.urealtime.realtime += (getnow() - u.urealtime.restored); bwrite(fd, (genericptr_t) &u, sizeof(struct you)); bwrite(fd, yyyymmddhhmmss(ubirthday), 14); save_killers(fd, mode); diff --git a/src/sp_lev.c b/src/sp_lev.c index 6be2c9713..623504855 100644 --- a/src/sp_lev.c +++ b/src/sp_lev.c @@ -1062,6 +1062,18 @@ struct mkroom *croom; mongone(was); } + /* Nasty hack here: try to determine if this is the Mines or Sokoban + * "prize" and then set record_achieve_special (maps to corpsenm) + * for the object. That field will later be checked to find out if + * the player obtained the prize. */ + if(otmp->otyp == LUCKSTONE && Is_mineend_level(&u.uz)) { + otmp->record_achieve_special = 1; + } else if((otmp->otyp == AMULET_OF_REFLECTION || + otmp->otyp == BAG_OF_HOLDING) && + Is_sokoend_level(&u.uz)) { + otmp->record_achieve_special = 1; + } + stackobj(otmp); } /* if (rn2(100) < o->chance) */ diff --git a/src/topten.c b/src/topten.c index db2e6fccb..cc4aefbe1 100644 --- a/src/topten.c +++ b/src/topten.c @@ -65,6 +65,9 @@ STATIC_DCL void FDECL(outentry, (int,struct toptenentry *,BOOLEAN_P)); STATIC_DCL void FDECL(discardexcess, (FILE *)); STATIC_DCL void FDECL(readentry, (FILE *,struct toptenentry *)); STATIC_DCL void FDECL(writeentry, (FILE *,struct toptenentry *)); +STATIC_DCL void FDECL(writexlentry, (FILE*, struct toptenentry *)); +STATIC_DCL long FDECL(encodeconduct, (void)); +STATIC_DCL long FDECL(encodeachieve, (void)); STATIC_DCL void FDECL(free_ttlist, (struct toptenentry *)); STATIC_DCL int FDECL(classmon, (char *,BOOLEAN_P)); STATIC_DCL int FDECL(score_wanted, @@ -292,6 +295,95 @@ struct toptenentry *tt; #endif } +#define XLOG_SEP "\t" /* xlogfile field separator. */ +/* as tab is never used in eg. plname or death, no need to mangle those. */ +STATIC_OVL void +writexlentry(rfile,tt) +FILE *rfile; +struct toptenentry *tt; +{ + char buf[DTHSZ+1]; + (void)fprintf(rfile, + "version=%d.%d.%d" + XLOG_SEP "points=%ld" + XLOG_SEP "deathdnum=%d" + XLOG_SEP "deathlev=%d" + XLOG_SEP "maxlvl=%d" + XLOG_SEP "hp=%d" + XLOG_SEP "maxhp=%d" + XLOG_SEP "deaths=%d" + XLOG_SEP "deathdate=%d" + XLOG_SEP "birthdate=%d" + XLOG_SEP "uid=%d", + tt->ver_major, tt->ver_minor, tt->patchlevel, + tt->points, tt->deathdnum, tt->deathlev, + tt->maxlvl, tt->hp, tt->maxhp, tt->deaths, + tt->deathdate, tt->birthdate, tt->uid); + (void)fprintf(rfile, + XLOG_SEP "role=%s" + XLOG_SEP "race=%s" + XLOG_SEP "gender=%s" + XLOG_SEP "align=%s", + tt->plrole, tt->plrace, tt->plgend, tt->plalign); + (void)fprintf(rfile, XLOG_SEP "name=%s", plname); + (void)fprintf(rfile, XLOG_SEP "death=%s", tt->death); + (void)fprintf(rfile, XLOG_SEP "conduct=0x%lx", encodeconduct()); + (void)fprintf(rfile, XLOG_SEP "turns=%ld", moves); + (void)fprintf(rfile, XLOG_SEP "achieve=0x%lx", encodeachieve()); + (void)fprintf(rfile, XLOG_SEP "realtime=%ld", (long)u.urealtime.realtime); + (void)fprintf(rfile, XLOG_SEP "starttime=%ld", (long)ubirthday); + (void)fprintf(rfile, XLOG_SEP "endtime=%ld", (long)u.urealtime.endtime); + (void)fprintf(rfile, XLOG_SEP "gender0=%s", genders[flags.initgend].filecode); + (void)fprintf(rfile, XLOG_SEP "align0=%s", + aligns[1 - u.ualignbase[A_ORIGINAL]].filecode); + fprintf(rfile, "\n"); +} +#undef XLOG_SEP + +long +encodeconduct(void) +{ + long e = 0L; + + if(!u.uconduct.food) e |= 1L << 0; + if(!u.uconduct.unvegan) e |= 1L << 1; + if(!u.uconduct.unvegetarian) e |= 1L << 2; + if(!u.uconduct.gnostic) e |= 1L << 3; + if(!u.uconduct.weaphit) e |= 1L << 4; + if(!u.uconduct.killer) e |= 1L << 5; + if(!u.uconduct.literate) e |= 1L << 6; + if(!u.uconduct.polypiles) e |= 1L << 7; + if(!u.uconduct.polyselfs) e |= 1L << 8; + if(!u.uconduct.wishes) e |= 1L << 9; + if(!u.uconduct.wisharti) e |= 1L << 10; + if(!num_genocides()) e |= 1L << 11; + + return e; +} + +long +encodeachieve(void) +{ + long r = 0L; + + if(u.uachieve.bell) r |= 1L << 0; + if(u.uachieve.enter_gehennom) r |= 1L << 1; + if(u.uachieve.menorah) r |= 1L << 2; + if(u.uachieve.book) r |= 1L << 3; + if(u.uevent.invoked) r |= 1L << 4; + if(u.uachieve.amulet) r |= 1L << 5; + if(In_endgame(&u.uz)) r |= 1L << 6; + if(Is_astralevel(&u.uz)) r |= 1L << 7; + if(u.uachieve.ascended) r |= 1L << 8; + if(u.uachieve.mines_luckstone) r |= 1L << 9; + if(u.uachieve.finish_sokoban) r |= 1L << 10; + if(u.uachieve.killed_medusa) r |= 1L << 11; + + return r; +} + + + STATIC_OVL void free_ttlist(tt) struct toptenentry *tt; @@ -322,6 +414,9 @@ time_t when; #ifdef LOGFILE FILE *lfile; #endif /* LOGFILE */ +#ifdef XLOGFILE + FILE *xlfile; +#endif /* XLOGFILE */ /* Under DICE 3.0, this crashes the system consistently, apparently due to * corruption of *rfile somewhere. Until I figure this out, just cut out @@ -380,6 +475,7 @@ time_t when; t0->birthdate = yyyymmdd(ubirthday); t0->deathdate = yyyymmdd(when); t0->tt_next = 0; + u.urealtime.endtime = when; #ifdef UPDATE_RECORD_IN_PLACE t0->fpos = -1L; #endif @@ -395,6 +491,17 @@ time_t when; unlock_file(LOGFILE); } #endif /* LOGFILE */ +#ifdef XLOGFILE + if (lock_file(XLOGFILE, SCOREPREFIX, 10)) { + if(!(xlfile = fopen_datafile(XLOGFILE, "a", SCOREPREFIX))) { + HUP raw_print("Cannot open extended log file!"); + } else { + writexlentry(xlfile, t0); + (void) fclose(xlfile); + } + unlock_file(XLOGFILE); + } +#endif /* XLOGFILE */ if (wizard || discover) { if (how != PANICKED) HUP { diff --git a/sys/unix/Makefile.top b/sys/unix/Makefile.top index 6d94d6908..f9e474a5b 100644 --- a/sys/unix/Makefile.top +++ b/sys/unix/Makefile.top @@ -264,10 +264,10 @@ install: rootcheck $(GAME) recover $(VARDAT) dungeon spec_levs # set up the game files ( $(MAKE) dofiles ) # set up some additional files - touch $(VARDIR)/perm $(VARDIR)/record $(VARDIR)/logfile - -( cd $(VARDIR) ; $(CHOWN) $(GAMEUID) perm record logfile ; \ - $(CHGRP) $(GAMEGRP) perm record logfile ; \ - chmod $(VARFILEPERM) perm record logfile ) + touch $(VARDIR)/perm $(VARDIR)/record $(VARDIR)/logfile $(VARDIR)/xlogfile + -( cd $(VARDIR) ; $(CHOWN) $(GAMEUID) perm record logfile xlogfile ; \ + $(CHGRP) $(GAMEGRP) perm record logfile xlogfile ; \ + chmod $(VARFILEPERM) perm record logfile xlogfile ) true; $(POSTINSTALL) # and a reminder @echo You may also want to reinstall the man pages via the doc Makefile. From 1e76ed28ae611ea272295e745e4e3bf07560cac7 Mon Sep 17 00:00:00 2001 From: "Derek S. Ray" Date: Thu, 12 Mar 2015 22:47:44 -0400 Subject: [PATCH 099/132] Initial version of simple recipes file --- DEVEL/git_recipes.txt | 115 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 DEVEL/git_recipes.txt diff --git a/DEVEL/git_recipes.txt b/DEVEL/git_recipes.txt new file mode 100644 index 000000000..49c7a7cca --- /dev/null +++ b/DEVEL/git_recipes.txt @@ -0,0 +1,115 @@ +Git has a messy learning curve. This file is an attempt to serve as a quick +reference for basic tasks while you get up to speed. + +------------------------ + +git checkout [-f] (branch) + +Switch your local repository to be at the most recent commit of (branch). +Including -f will discard changes made in the working directory. + + +git status [-uall | -uno] + +Shows all changed files in your local repository and also a list of the ones +you have staged for commit. +Including -uall will also show you all untracked files in all subdirectories. +Including -uno will show you _no_ untracked files. + + +git log [-NUM] +git log +git log [--pretty=one] +git log (branch) + +For a full explanation of all the arguments you can pass to 'log', please see +the manual; there are a lot and these are just a few of the common ones. For +our purposes, git log will show you all the commits according to criteria +you specify: + +-NUM: The last NUM commits in this branch + : all commits between commit1 and commit2 +-pretty=one: format output as a single line for each entry +(branch): show the commits from (branch) instead of the current one + + +git add (filename) + +Adds the changes you've made in (filename) to the pre-commit staging area. +(also referred to as the 'index') + + +git commit [-a] [-m "text"] + +Commits all staged changes (in the index) to this branch in your local repo +from your current position. +Including -a will 'git add' all eligible files before doing so. +Including -m will use "text" as the commit message instead of opening an +editor window for you to create one. + + +git push [--all] [-u origin (branch)] + +Sends all your commits for the current branch to the centralized repo. +Including --all will send the commits for _all_ branches. +Specifying -u is only needed the first time you push (branch) that you +created; it establishes the connection between local and remote for that +branch. + + +git reset [--hard] (filename) + +Without any parameters, unstages the changes for (filename) from the index; +does not change the working tree. This is the equivalent of the command +git reset --mixed (filename); git reset --soft (filename) has no effect. + +With --hard, unstages (filename) from the index and reverts (filename) in +the working tree to the most recent commit. + +*** WARNING *** --hard _will_ throw away your changes. + + +[DSR: I'm hesitant about including this command because you can trash stuff +with it. But at the same time, for people who are adapting to a commit not +also automatically being a send, it's nice for them to know how to undo one in +case they do something wrong. thoughts?] + +git reset [--soft | --mixed | --hard] HEAD~1 + +*** WARNING *** Never, EVER do this to a commit that you have already pushed; +you will be rewriting history on other people's machines and this will +generally turn out very poorly. + +With --soft, undoes the most recent 'git commit' action, but leaves the +changes in the index and in the working directory. + +With --mixed, does everything --soft does but also unstages the changes from +the index. If you don't specify one of the three, reset will assume this. + +With --hard, does everything --mixed does but also reverts the working tree to +the prior commit. + +*** WARNING *** --hard will effectively delete a commit and "lose" the changes. + + +git fetch [-a] + +Retrieve commits from the remote repository to your machine. +Including -a will get commits for all branches. + + +git pull + +Incorporate any fetched commits for the current branch into your repository +and update your position accordingly. + + +git merge (branch) [--no-commit] + +Merges all the changes from (branch) since it last diverged from a common +ancestor into your current branch. + +With --no-commit, does not automatically create a merge entry in the log but +leaves all the merged files in your working directory; to complete the merge +you must commit them manually later (likely after you have edited them). + From 75e6fc27dbb4344942fb143b8b631e5604790e91 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 13 Mar 2015 01:02:09 -0400 Subject: [PATCH 100/132] abuse wisdom in keeping with Rider eating msg The death message for eating a Rider is "unwisely tried to eat...", but it doesn't abuse Wisdom (potentially relevant if you lifesave) --- doc/fixes35.0 | 1 + src/eat.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 4ad731e36..3ac75e94e 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -874,6 +874,7 @@ remove 'if (Deaf)' guards preceding You_hear which already checks deafness tse a menu to loot multiple containers do_look() in post-3.4.3 used glyph prior to setting it in pager.c charge for a boulder that fills a pit in shop +abuse wisdom in keeping with Rider eating message Platform- and/or Interface-Specific Fixes diff --git a/src/eat.c b/src/eat.c index 320fa2351..793925fb7 100644 --- a/src/eat.c +++ b/src/eat.c @@ -659,6 +659,8 @@ register int pm; mons[pm].mname); killer.format = NO_KILLER_PREFIX; done(DIED); + /* life-saving needed to reach here */ + exercise(A_WIS, FALSE); /* It so happens that since we know these monsters */ /* cannot appear in tins, context.victual.piece will always */ /* be what we want, which is not generally true. */ From da83545660f955fa55230c431b48f5583e5de411 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 13 Mar 2015 07:33:32 -0400 Subject: [PATCH 101/132] "swallowed whole" was preceded by "You bite into" Another reported by ais523: The death message "swallowed %s whole" is preceded by "You bite into %s."; these contradict. --- doc/fixes35.0 | 2 ++ src/uhitm.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 3ac75e94e..614bbe57f 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -875,6 +875,8 @@ tse a menu to loot multiple containers do_look() in post-3.4.3 used glyph prior to setting it in pager.c charge for a boulder that fills a pit in shop abuse wisdom in keeping with Rider eating message +message inconsistency: death message "swallowed whole" was preceded + by "You bite into" Platform- and/or Interface-Specific Fixes diff --git a/src/uhitm.c b/src/uhitm.c index 21de567e5..80f38addf 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -1822,7 +1822,7 @@ register struct attack *mattk; const char *mname = pd->mname; if (!type_is_pname(pd)) mname = an(mname); - You("bite into %s.", mon_nam(mdef)); + You("englut %s.", mon_nam(mdef)); Sprintf(kbuf, "swallowing %s whole", mname); instapetrify(kbuf); } else { From ece3385900822518c00610c05c4dfa3163201e00 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 13 Mar 2015 22:27:09 -0400 Subject: [PATCH 102/132] fix messaging in obstructed() in lock.c From ais523's recent list of bugs: If a long worm tail is blocking the door, and you're blind and not telepathic, attempting to close the door marks the position of its head. From an email received in late September 2014 before the git conversion: > I was trying to close a door, not noticing that there was a garter > snake there, and this message resulted: > The garter snake stands in the way! > I haven't tried it with any other monsters without feet, but > "stands in the way" appears to be the wrong way to describe > this situation... Both of the above were found in the same function in lock.c --- doc/fixes35.0 | 1 + src/lock.c | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 614bbe57f..ad8117820 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -877,6 +877,7 @@ charge for a boulder that fills a pit in shop abuse wisdom in keeping with Rider eating message message inconsistency: death message "swallowed whole" was preceded by "You bite into" +improve the messaging when a monster you can't see is causing an obstruction Platform- and/or Interface-Specific Fixes diff --git a/src/lock.c b/src/lock.c index 91e0f0728..b57d9eb85 100644 --- a/src/lock.c +++ b/src/lock.c @@ -627,13 +627,16 @@ register int x, y; boolean quietly; { register struct monst *mtmp = m_at(x, y); + boolean is_worm_tail = ((mtmp->mx != x) || (mtmp->my != y)); if(mtmp && mtmp->m_ap_type != M_AP_FURNITURE) { if (mtmp->m_ap_type == M_AP_OBJECT) goto objhere; - if (!quietly) pline("%s stands in the way!", !canspotmon(mtmp) ? - "Some creature" : Monnam(mtmp)); + if (!quietly) pline("%s %s in the way!", + is_worm_tail ? "Something" : + !canspotmon(mtmp) ? "Some creature" : Monnam(mtmp), + slithy(mtmp->data) ? "is situated" : "stands"); if (!canspotmon(mtmp)) - map_invisible(mtmp->mx, mtmp->my); + map_invisible(x, y); return(TRUE); } if (OBJ_AT(x, y)) { From f799bffbb2901b28e6ccd982db9e4d8e6fb56193 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 14 Mar 2015 09:43:07 -0400 Subject: [PATCH 103/132] Additional obstruction messaging fixup --- src/lock.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/lock.c b/src/lock.c index b57d9eb85..3de76fe66 100644 --- a/src/lock.c +++ b/src/lock.c @@ -627,14 +627,21 @@ register int x, y; boolean quietly; { register struct monst *mtmp = m_at(x, y); - boolean is_worm_tail = ((mtmp->mx != x) || (mtmp->my != y)); if(mtmp && mtmp->m_ap_type != M_AP_FURNITURE) { if (mtmp->m_ap_type == M_AP_OBJECT) goto objhere; - if (!quietly) pline("%s %s in the way!", - is_worm_tail ? "Something" : - !canspotmon(mtmp) ? "Some creature" : Monnam(mtmp), - slithy(mtmp->data) ? "is situated" : "stands"); + if (!quietly) { + if ((mtmp->mx != x) || (mtmp->my != y)) { + /* worm tail */ + pline("%s%s blocks the way!", + !canspotmon(mtmp) ? Something : + s_suffix(Monnam(mtmp)), + !canspotmon(mtmp) ? "" : " tail"); + } else { + pline("%s blocks the way!", + !canspotmon(mtmp) ? "Some creature" : Monnam(mtmp)); + } + } if (!canspotmon(mtmp)) map_invisible(x, y); return(TRUE); From 3bbbb01c53d7dca5bb36cba84425374aedf945c4 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sun, 15 Mar 2015 09:53:34 +0200 Subject: [PATCH 104/132] Death talks in CAPITAL LETTERS --- include/extern.h | 1 + src/hacklib.c | 12 ++++++++++++ src/sounds.c | 10 +++++++++- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/include/extern.h b/include/extern.h index f382c4f7a..0a1dabe77 100644 --- a/include/extern.h +++ b/include/extern.h @@ -800,6 +800,7 @@ E boolean FDECL(letter, (CHAR_P)); E char FDECL(highc, (CHAR_P)); E char FDECL(lowc, (CHAR_P)); E char *FDECL(lcase, (char *)); +E char *FDECL(ucase, (char *)); E char *FDECL(upstart, (char *)); E char *FDECL(mungspaces, (char *)); E char *FDECL(eos, (char *)); diff --git a/src/hacklib.c b/src/hacklib.c index 4565f6d65..fd4273074 100644 --- a/src/hacklib.c +++ b/src/hacklib.c @@ -17,6 +17,7 @@ NetHack, except that rounddiv may call panic(). char highc (char) char lowc (char) char * lcase (char *) + char * ucase (char *) char * upstart (char *) char * mungspaces (char *) char * eos (char *) @@ -99,6 +100,17 @@ lcase(s) /* convert a string into all lowercase */ return s; } +char * +ucase(s) /* convert a string into all uppercase */ + char *s; +{ + register char *p; + + for (p = s; *p; p++) + if ('a' <= *p && *p <= 'z') *p &= ~040; + return s; +} + char * upstart(s) /* convert first character of a string to uppercase */ char *s; diff --git a/src/sounds.c b/src/sounds.c index d57904778..3b2ee2f56 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -901,7 +901,15 @@ register struct monst *mtmp; if (pline_msg) pline("%s %s", Monnam(mtmp), pline_msg); else if (mtmp->mcan && verbl_msg_mcan) verbalize1(verbl_msg_mcan); - else if (verbl_msg) verbalize1(verbl_msg); + else if (verbl_msg) { + if (ptr == &mons[PM_DEATH]) { /* Death talks in CAPITAL LETTERS */ + char tmpbuf[BUFSZ]; + Sprintf(tmpbuf, "%s", verbl_msg); + verbalize1(ucase(tmpbuf)); + } else { + verbalize1(verbl_msg); + } + } return(1); } From 6e0a3dda2ee1f25ec9235dcbd97280bc0752e833 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 15 Mar 2015 12:36:45 -0400 Subject: [PATCH 105/132] catch up on half-physical damage docs This is catching up on some things that were changed in development years ago that Dave C. suggested be documented. For the record: -The things that were evaluated and ruled out are now documented in include/youprop.h so they don't come up again. - The things that were evaluated and deemed to be susceptible to the intrinsic and thus led to a modification in the code are listed below in this commit message. Modifications: - A crystal ball exploding on being applied - Artifacts' blasting - Being a fish out of water - Being hit by Mjollnir on the return - Being thwacked by an iron ball chained to you - Boiling/freezing potions - Broken wands - Bumping head on ceiling by cursed levitation - Burning (un)holy water - Chest/door/tin traps - Dipping a lit lamp into a potion of oil - Exploding rings and wands (under all circumstances) - Exploding spellbooks - Falling downstairs - Falling into a (spiked) pit - Falling off or failing to mount a steed - Falling on a sink while levitating - Getting squished in a pit under a boulder - Hitting your foot with a bullwhip - Hitting yourself with your pick-axe - Hooking yourself with a grappling hook - iron-ball-pulling yourself out of a bear trap - Jumping/Newton's-Thirding into something solid - Kicking something that makes you go "Ouch!" - Land mine explosion - Sitting in a spiked pit - Stinking cloud damage - Thrown potion (bottle) - Zapping yourself with a wand, horn or spell - Jumping yourself out of a bear trap --- doc/fixes35.0 | 2 ++ include/youprop.h | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/doc/fixes35.0 b/doc/fixes35.0 index ad8117820..5efe01fbe 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -4,6 +4,8 @@ $rcsfile: fixes35.0,v $ $Revision: 1.445 $ $Date: 2014/11/18 03:10:36 $ General Fixes and Modified Features ----------------------------------- change the dreaded "Stop eating?" to "Continue eating?" with default "no" +fix half-physical damage intrinsic protection from a number of + events and circumstances setmangry should not be called when a monster enters a bones region bad capitalization of msg when charging for something that catches light missing opthelp for use_inverse diff --git a/include/youprop.h b/include/youprop.h index a29e20bf8..1dfe3a9e9 100644 --- a/include/youprop.h +++ b/include/youprop.h @@ -286,7 +286,35 @@ * 2. it doesn't leave a mark. Marks include destruction of, or * damage to, an internal organ (including the brain), * lacerations, bruises, crushed body parts, bleeding. + * + * The following were evaluated and determined _NOT_ to be + * susceptable to Half_physical_damage protection: + * Being caught in a fireball [fire damage] + * Sitting in lava [lava damage] + * Thrown potion (acid) [acid damage] + * Splattered burning oil from thrown potion [fire damage] + * Mixing water and acid [acid damage] + * Molten lava (entering or being splashed) [lava damage] + * boiling water from a sink [fire damage] + * Fire traps [fire damage] + * Scrolls of fire (confused and otherwise) [fire damage] + * Alchemical explosion [not physical] + * System shock [shock damage] + * Bag of holding explosion [magical] + * Being undead-turned by your god [magical] + * Level-drain [magical] + * Magical explosion of a magic trap [magical] + * Sitting on a throne with a bad effect [magical] + * Contaminated water from a sink [poison/sickness] + * Contact-poisoned spellbooks [poison/sickness] + * Eating acidic/poisonous/mildly-old corpses [poison/sickness] + * Eating a poisoned weapon while polyselfed [poison/sickness] + * Engulfing a zombie or mummy (AT_ENGL in hmonas) [poison/sickness] + * Quaffed potions of sickness, lit oil, acid [poison/sickness] + * Pyrolisks' fiery gaze [fire damage] + * Any passive attack [most don't qualify] */ + #define HHalf_physical_damage u.uprops[HALF_PHDAM].intrinsic #define EHalf_physical_damage u.uprops[HALF_PHDAM].extrinsic #define Half_physical_damage (HHalf_physical_damage || EHalf_physical_damage) From 5fa4a1c82f77d70e708f4e32b2d3f8164ce135be Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 15 Mar 2015 12:59:34 -0400 Subject: [PATCH 106/132] withdraw fixes35.0 part of prior commit There was actually a fixes35.0 entry further down that covered off that particular entry already which I missed first time around. > many instances of physical damage were not taking Half_physical_damage > into account when reducing your hitpoints --- doc/fixes35.0 | 2 -- 1 file changed, 2 deletions(-) diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 5efe01fbe..ad8117820 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -4,8 +4,6 @@ $rcsfile: fixes35.0,v $ $Revision: 1.445 $ $Date: 2014/11/18 03:10:36 $ General Fixes and Modified Features ----------------------------------- change the dreaded "Stop eating?" to "Continue eating?" with default "no" -fix half-physical damage intrinsic protection from a number of - events and circumstances setmangry should not be called when a monster enters a bones region bad capitalization of msg when charging for something that catches light missing opthelp for use_inverse From de8e1a5a9d20be654e5cab1c35b1afea364be81d Mon Sep 17 00:00:00 2001 From: "Derek S. Ray" Date: Sun, 15 Mar 2015 14:28:01 -0400 Subject: [PATCH 107/132] Some few updates/additions; clean up formatting --- DEVEL/git_recipes.txt | 87 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 70 insertions(+), 17 deletions(-) diff --git a/DEVEL/git_recipes.txt b/DEVEL/git_recipes.txt index 49c7a7cca..71ce0e5dc 100644 --- a/DEVEL/git_recipes.txt +++ b/DEVEL/git_recipes.txt @@ -3,13 +3,13 @@ reference for basic tasks while you get up to speed. ------------------------ -git checkout [-f] (branch) +[*] git checkout [-f] (branch) Switch your local repository to be at the most recent commit of (branch). Including -f will discard changes made in the working directory. -git status [-uall | -uno] +[*] git status [-uall | -uno] Shows all changed files in your local repository and also a list of the ones you have staged for commit. @@ -17,10 +17,10 @@ Including -uall will also show you all untracked files in all subdirectories. Including -uno will show you _no_ untracked files. -git log [-NUM] -git log -git log [--pretty=one] -git log (branch) +[*] git log [-NUM] +[*] git log +[*] git log [--pretty=one] +[*] git log (branch) For a full explanation of all the arguments you can pass to 'log', please see the manual; there are a lot and these are just a few of the common ones. For @@ -33,13 +33,13 @@ you specify: (branch): show the commits from (branch) instead of the current one -git add (filename) +[*] git add (filename) Adds the changes you've made in (filename) to the pre-commit staging area. (also referred to as the 'index') -git commit [-a] [-m "text"] +[*] git commit [-a] [-m "text"] Commits all staged changes (in the index) to this branch in your local repo from your current position. @@ -48,7 +48,7 @@ Including -m will use "text" as the commit message instead of opening an editor window for you to create one. -git push [--all] [-u origin (branch)] +[*] git push [--all] [-u origin (branch)] Sends all your commits for the current branch to the centralized repo. Including --all will send the commits for _all_ branches. @@ -57,11 +57,11 @@ created; it establishes the connection between local and remote for that branch. -git reset [--hard] (filename) +[*] git reset [--hard] (filename) Without any parameters, unstages the changes for (filename) from the index; does not change the working tree. This is the equivalent of the command -git reset --mixed (filename); git reset --soft (filename) has no effect. +[*] git reset --mixed (filename); git reset --soft (filename) has no effect. With --hard, unstages (filename) from the index and reverts (filename) in the working tree to the most recent commit. @@ -74,7 +74,7 @@ with it. But at the same time, for people who are adapting to a commit not also automatically being a send, it's nice for them to know how to undo one in case they do something wrong. thoughts?] -git reset [--soft | --mixed | --hard] HEAD~1 +[*] git reset [--soft | --mixed | --hard] HEAD~1 *** WARNING *** Never, EVER do this to a commit that you have already pushed; you will be rewriting history on other people's machines and this will @@ -90,26 +90,79 @@ With --hard, does everything --mixed does but also reverts the working tree to the prior commit. *** WARNING *** --hard will effectively delete a commit and "lose" the changes. +[/end area-of-concern] -git fetch [-a] +[*] git fetch [-a] Retrieve commits from the remote repository to your machine. Including -a will get commits for all branches. +Does NOT merge them into your local repository. -git pull +[*] git pull Incorporate any fetched commits for the current branch into your repository -and update your position accordingly. +and update your position accordingly. This will create a merge commit (noting +that you merged a branch into itself). -git merge (branch) [--no-commit] +[*] git rebase [no-arguments version ONLY] + +Incorporate fetched commits for the current branch into your repository, and +replay any local commits and changes afterwards on top. + +Quality picture-pages ASCII art: + + E---F---G---H (remote changes) + / + / +(branch 'frog') A---B---C---D---E'---F' (your local changes) + +After 'git fetch' and 'git rebase', it will look like this: + + --- (remote HEAD) + | + V +(branch 'frog') A---B---C---D---E---F---G---H---E'---F' + ^ ^ + | | + -------- (to be pushed) + + +[*] git branch (branch) + +Creates a new branch from the current commit you're pointed to. +Does not automatically checkout (switch to) the branch. + + +[*] git checkout -b (branch) + +Creates a new branch from the current commit you're pointed to, and +automatically checks out that branch. + + +[*] git branch --list | [--all | -a] | [--remotes | -r] + +Lists all branches matching . +With --all instead, lists all branches (including remotely tracked ones). +With --remotes instead, lists only remote branches. + + +[*] git merge (branch) [--no-commit] Merges all the changes from (branch) since it last diverged from a common ancestor into your current branch. With --no-commit, does not automatically create a merge entry in the log but leaves all the merged files in your working directory; to complete the merge -you must commit them manually later (likely after you have edited them). +you must commit them manually later (likely after you have edited them). This +more accurately mimics the merge behavior of svn [and cvs?] + + +======================================= +Typical workflows for common activities +======================================= + +{To be added in near future: DSR 3/15} From 14525ed0c67ad95993113c56fb3e821539f04c5a Mon Sep 17 00:00:00 2001 From: PatR Date: Sun, 15 Mar 2015 18:02:26 -0700 Subject: [PATCH 108/132] DEBUG/debugpline() fixup * Replace variadic debugpline() with fixed argument debugpline0(str), debugpline1(fmt,arg), and so on so that C99 support isn't required; * showdebug() becomes a function rather than a macro and handles a bit more; * two debugpline() calls in light.c have been changed to impossible(); * DEBUGFILES macro (in sys.c) can substitute for SYSCF's DEBUGFILES setting in !SYSCF configuration (I hope that's temporary). --- include/extern.h | 5 ++- include/hack.h | 40 +++++++++-------------- src/apply.c | 4 +-- src/attrib.c | 25 +++++++------- src/bones.c | 4 +-- src/dbridge.c | 51 +++++++++++++++-------------- src/dig.c | 18 +++++------ src/dungeon.c | 4 +-- src/eat.c | 84 +++++++++++++++++++++++++----------------------- src/files.c | 53 +++++++++++++++++++++++++++++- src/light.c | 6 ++-- src/makemon.c | 17 +++++----- src/mklev.c | 6 ++-- src/mkmaze.c | 6 ++-- src/mkobj.c | 15 +++++---- src/mon.c | 4 +-- src/pickup.c | 4 +-- src/questpgr.c | 4 +-- src/restore.c | 4 +-- src/rnd.c | 10 +++--- src/save.c | 4 +-- src/shk.c | 4 +-- src/sp_lev.c | 12 +++---- src/sys.c | 20 ++++++++---- src/teleport.c | 4 +-- src/zap.c | 12 ++++--- win/tty/wintty.c | 4 +-- 27 files changed, 243 insertions(+), 181 deletions(-) diff --git a/include/extern.h b/include/extern.h index 0a1dabe77..cd8843762 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1,4 +1,4 @@ -/* NetHack 3.5 extern.h $NHDT-Date: 1425081976 2015/02/28 00:06:16 $ $NHDT-Branch: master $:$NHDT-Revision: 1.390 $ */ +/* NetHack 3.5 extern.h $NHDT-Date: 1426465429 2015/03/16 00:23:49 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.406 $ */ /* NetHack 3.5 extern.h $Date: 2013/11/05 00:57:53 $ $Revision: 1.380 $ */ /* Copyright (c) Steve Creps, 1988. */ /* NetHack may be freely redistributed. See license for details. */ @@ -741,6 +741,9 @@ E boolean NDECL(recover_savefile); #ifdef HOLD_LOCKFILE_OPEN E void NDECL(really_close); #endif +#ifdef DEBUG +E boolean FDECL(showdebug, (const char *)); +#endif /* ### fountain.c ### */ diff --git a/include/hack.h b/include/hack.h index 7c6af5b18..c85f95d8d 100644 --- a/include/hack.h +++ b/include/hack.h @@ -1,4 +1,4 @@ -/* NetHack 3.5 hack.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 hack.h $NHDT-Date: 1426465431 2015/03/16 00:23:51 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.52 $ */ /* NetHack 3.5 hack.h $Date: 2009/05/06 10:44:46 $ $Revision: 1.49 $ */ /* SCCS Id: @(#)hack.h 3.5 2008/03/19 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ @@ -11,32 +11,22 @@ #include "config.h" #endif +/* [DEBUG shouldn't be defined unless you know what you're doing...] */ #ifdef DEBUG -/* due to strstr(), mon.c matches makemon.c */ -# define showdebug() (sysopt.debugfiles && \ - ((sysopt.debugfiles[0] == '*') || \ - (strstr( __FILE__ , sysopt.debugfiles)))) - -/* GCC understands this syntax */ -# ifdef __GNUC__ -/* ... but whines about it anyway without these pragmas. */ -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wvariadic-macros" -# define debugpline(args...) \ - do { if (showdebug()) pline( args ); } while(0); -# pragma GCC diagnostic pop -# endif - -/* and Visual Studio understands this one */ -# ifdef _MSC_VER -# define debugpline(...) \ - do { if (showdebug()) pline(__VA_ARGS__); } while(0); -# endif - +# define ifdebug(stmt) do { if (showdebug(__FILE__)) stmt; } while (0) +/* these don't require compiler support for C99 variadic macros */ +# define debugpline0(str) ifdebug(pline(str)) +# define debugpline1(fmt,arg) ifdebug(pline(fmt,arg)) +# define debugpline2(fmt,a1,a2) ifdebug(pline(fmt,a1,a2)) +# define debugpline3(fmt,a1,a2,a3) ifdebug(pline(fmt,a1,a2,a3)) +# define debugpline4(fmt,a1,a2,a3,a4) ifdebug(pline(fmt,a1,a2,a3,a4)) #else -# define showdebug() (0) -# define debugpline(...) -#endif +# define debugpline0(str) /*empty*/ +# define debugpline1(fmt,arg) /*empty*/ +# define debugpline2(fmt,a1,a2) /*empty*/ +# define debugpline3(fmt,a1,a2,a3) /*empty*/ +# define debugpline4(fmt,a1,a2,a3,a4) /*empty*/ +#endif /*DEBUG*/ #define TELL 1 #define NOTELL 0 diff --git a/src/apply.c b/src/apply.c index 2ac4088dd..fd3193fb3 100644 --- a/src/apply.c +++ b/src/apply.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 apply.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 apply.c $NHDT-Date: 1426465431 2015/03/16 00:23:51 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.173 $ */ /* NetHack 3.5 apply.c $Date: 2012/05/01 02:22:32 $ $Revision: 1.168 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1770,7 +1770,7 @@ long timeout; char monnambuf[BUFSZ], carriedby[BUFSZ]; if (!figurine) { - debugpline("null figurine in fig_transform()"); + debugpline0("null figurine in fig_transform()"); return; } silent = (timeout != monstermoves); /* happened while away */ diff --git a/src/attrib.c b/src/attrib.c index 8bba3d61c..b9ce67596 100644 --- a/src/attrib.c +++ b/src/attrib.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 attrib.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 attrib.c $NHDT-Date: 1426465433 2015/03/16 00:23:53 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.34 $ */ /* NetHack 3.5 attrib.c $Date: 2011/10/01 00:25:55 $ $Revision: 1.30 $ */ /* Copyright 1988, 1989, 1990, 1992, M. Stephenson */ /* NetHack may be freely redistributed. See license for details. */ @@ -347,7 +347,7 @@ exercise(i, inc_or_dec) int i; boolean inc_or_dec; { - debugpline("Exercise:"); + debugpline0("Exercise:"); if (i == A_INT || i == A_CHA) return; /* can't exercise these */ /* no physical exercise while polymorphed; the body's temporary */ @@ -364,7 +364,7 @@ boolean inc_or_dec; * Note: *YES* ACURR is the right one to use. */ AEXE(i) += (inc_or_dec) ? (rn2(19) > ACURR(i)) : -rn2(2); - debugpline("%s, %s AEXE = %d", + debugpline3("%s, %s AEXE = %d", (i == A_STR) ? "Str" : (i == A_WIS) ? "Wis" : (i == A_DEX) ? "Dex" : "Con", (inc_or_dec) ? "inc" : "dec", AEXE(i)); @@ -392,7 +392,7 @@ exerper() (u.uhunger > 50) ? HUNGRY : (u.uhunger > 0) ? WEAK : FAINTING; - debugpline("exerper: Hunger checks"); + debugpline0("exerper: Hunger checks"); switch (hs) { case SATIATED: exercise(A_DEX, FALSE); if (Role_if(PM_MONK)) @@ -408,7 +408,7 @@ exerper() } /* Encumberance Checks */ - debugpline("exerper: Encumber checks"); + debugpline0("exerper: Encumber checks"); switch (near_capacity()) { case MOD_ENCUMBER: exercise(A_STR, TRUE); break; case HVY_ENCUMBER: exercise(A_STR, TRUE); @@ -421,7 +421,7 @@ exerper() /* status checks */ if(!(moves % 5)) { - debugpline("exerper: Status checks"); + debugpline0("exerper: Status checks"); if ((HClairvoyant & (INTRINSIC|TIMEOUT)) && !BClairvoyant) exercise(A_WIS, TRUE); if (HRegeneration) exercise(A_STR, TRUE); @@ -453,10 +453,10 @@ exerchk() exerper(); if(moves >= context.next_attrib_check) - debugpline("exerchk: ready to test. multi = %d.", multi); + debugpline1("exerchk: ready to test. multi = %d.", multi); /* Are we ready for a test? */ if(moves >= context.next_attrib_check && !multi) { - debugpline("exerchk: testing."); + debugpline0("exerchk: testing."); /* * Law of diminishing returns (Part II): * @@ -483,7 +483,7 @@ exerchk() exercise/abuse gradually wears off without impact then */ if (Upolyd && i != A_WIS) goto nextattrib; - debugpline("exerchk: testing %s (%d).", + debugpline2("exerchk: testing %s (%d).", (i == A_STR) ? "Str" : (i == A_INT) ? "Int?" : (i == A_WIS) ? "Wis" : (i == A_DEX) ? "Dex" : (i == A_CON) ? "Con" : (i == A_CHA) ? "Cha?" : "???", @@ -497,9 +497,9 @@ exerchk() if (rn2(AVAL) > ((i != A_WIS) ? (abs(ax) * 2 / 3) : abs(ax))) goto nextattrib; - debugpline("exerchk: changing %d.", i); + debugpline1("exerchk: changing %d.", i); if(adjattrib(i, mod_val, -1)) { - debugpline("exerchk: changed %d.", i); + debugpline1("exerchk: changed %d.", i); /* if you actually changed an attrib - zero accumulation */ AEXE(i) = ax = 0; /* then print an explanation */ @@ -513,7 +513,8 @@ exerchk() AEXE(i) = (abs(ax) / 2) * mod_val; } context.next_attrib_check += rn1(200,800); - debugpline("exerchk: next check at %ld.", context.next_attrib_check); + debugpline1("exerchk: next check at %ld.", + context.next_attrib_check); } } diff --git a/src/bones.c b/src/bones.c index 269152578..9024354a2 100644 --- a/src/bones.c +++ b/src/bones.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 bones.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 bones.c $NHDT-Date: 1426465433 2015/03/16 00:23:53 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.45 $ */ /* NetHack 3.5 bones.c $Date: 2012/02/16 02:40:24 $ $Revision: 1.39 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985,1993. */ /* NetHack may be freely redistributed. See license for details. */ @@ -584,7 +584,7 @@ getbones() if (has_mname(mtmp)) sanitize_name(MNAME(mtmp)); if (mtmp->mhpmax == DEFUNCT_MONSTER) { if (wizard) - debugpline("Removing defunct monster %s from bones.", + debugpline1("Removing defunct monster %s from bones.", mtmp->data->mname); mongone(mtmp); } else diff --git a/src/dbridge.c b/src/dbridge.c index a82805377..8c4b90031 100644 --- a/src/dbridge.c +++ b/src/dbridge.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 dbridge.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 dbridge.c $NHDT-Date: 1426465433 2015/03/16 00:23:53 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.23 $ */ /* NetHack 3.5 dbridge.c $Date: 2012/02/01 00:49:16 $ $Revision: 1.21 $ */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ @@ -267,7 +267,7 @@ int x, y; (occupants[entitycnt].ex == x) && (occupants[entitycnt].ey == y)) break; - debugpline("entitycnt = %d", entitycnt); + debugpline1("entitycnt = %d", entitycnt); #ifdef D_DEBUG wait_synch(); #endif @@ -467,7 +467,7 @@ boolean chunks; int misses; if (chunks) - debugpline("Do chunks miss?"); + debugpline0("Do chunks miss?"); if (automiss(etmp)) return(TRUE); @@ -487,7 +487,7 @@ boolean chunks; if (is_db_wall(etmp->ex, etmp->ey)) misses -= 3; /* less airspace */ - debugpline("Miss chance = %d (out of 8)", misses); + debugpline1("Miss chance = %d (out of 8)", misses); return((boolean)((misses >= rnd(8))? TRUE : FALSE)); } @@ -516,7 +516,8 @@ struct entity *etmp; if (is_db_wall(etmp->ex, etmp->ey)) tmp -= 2; /* less room to maneuver */ - debugpline("%s to jump (%d chances in 10)", E_phrase(etmp, "try"), tmp); + debugpline2("%s to jump (%d chances in 10)", + E_phrase(etmp, "try"), tmp); return((boolean)((tmp >= rnd(10))? TRUE : FALSE)); } @@ -550,12 +551,11 @@ struct entity *etmp; pline_The("portcullis misses %s!", e_nam(etmp)); else - debugpline("The drawbridge misses %s!", - e_nam(etmp)); + debugpline1("The drawbridge misses %s!", e_nam(etmp)); if (e_survives_at(etmp, oldx, oldy)) return; else { - debugpline("Mon can't survive here"); + debugpline0("Mon can't survive here"); if (at_portcullis) must_jump = TRUE; else @@ -574,7 +574,7 @@ struct entity *etmp; if (at_portcullis) { if (e_jumps(etmp)) { relocates = TRUE; - debugpline("Jump succeeds!"); + debugpline0("Jump succeeds!"); } else { if (e_inview) pline("%s crushed by the falling portcullis!", @@ -587,7 +587,7 @@ struct entity *etmp; } } else { /* tries to jump off bridge to original square */ relocates = !e_jumps(etmp); - debugpline("Jump %s!", (relocates)? "fails" : "succeeds"); + debugpline1("Jump %s!", (relocates)? "fails" : "succeeds"); } } @@ -597,13 +597,13 @@ struct entity *etmp; * would be inaccessible (i.e. etmp started on drawbridge square) or * unnecessary (i.e. etmp started here) in such a situation. */ - debugpline("Doing relocation."); + debugpline0("Doing relocation."); newx = oldx; newy = oldy; (void)find_drawbridge(&newx, &newy); if ((newx == oldx) && (newy == oldy)) get_wall_for_db(&newx, &newy); - debugpline("Checking new square for occupancy."); + debugpline0("Checking new square for occupancy."); if (relocates && (e_at(newx, newy))) { /* @@ -614,22 +614,22 @@ struct entity *etmp; struct entity *other; other = e_at(newx, newy); - debugpline("New square is occupied by %s", e_nam(other)); + debugpline1("New square is occupied by %s", e_nam(other)); if (e_survives_at(other, newx, newy) && automiss(other)) { relocates = FALSE; /* "other" won't budge */ - debugpline("%s suicide.", E_phrase(etmp, "commit")); + debugpline1("%s suicide.", E_phrase(etmp, "commit")); } else { - debugpline("Handling %s", e_nam(other)); + debugpline1("Handling %s", e_nam(other)); while ((e_at(newx, newy) != 0) && (e_at(newx, newy) != etmp)) do_entity(other); - debugpline("Checking existence of %s", e_nam(etmp)); + debugpline1("Checking existence of %s", e_nam(etmp)); #ifdef D_DEBUG wait_synch(); #endif if (e_at(oldx, oldy) != etmp) { - debugpline("%s moved or died in recursion somewhere", + debugpline1("%s moved or died in recursion somewhere", E_phrase(etmp, "have")); #ifdef D_DEBUG wait_synch(); @@ -639,7 +639,7 @@ struct entity *etmp; } } if (relocates && !e_at(newx, newy)) {/* if e_at() entity = worm tail */ - debugpline("Moving %s", e_nam(etmp)); + debugpline1("Moving %s", e_nam(etmp)); if (!is_u(etmp)) { remove_monster(etmp->ex, etmp->ey); place_monster(etmp->emon, newx, newy); @@ -652,12 +652,12 @@ struct entity *etmp; etmp->ey = newy; e_inview = e_canseemon(etmp); } - debugpline("Final disposition of %s", e_nam(etmp)); + debugpline1("Final disposition of %s", e_nam(etmp)); #ifdef D_DEBUG wait_synch(); #endif if (is_db_wall(etmp->ex, etmp->ey)) { - debugpline("%s in portcullis chamber", E_phrase(etmp, "are")); + debugpline1("%s in portcullis chamber", E_phrase(etmp, "are")); #ifdef D_DEBUG wait_synch(); #endif @@ -678,9 +678,9 @@ struct entity *etmp; e_died(etmp, 0, CRUSHING); /* no message */ return; } - debugpline("%s in here", E_phrase(etmp, "survive")); + debugpline1("%s in here", E_phrase(etmp, "survive")); } else { - debugpline("%s on drawbridge square", E_phrase(etmp, "are")); + debugpline1("%s on drawbridge square", E_phrase(etmp, "are")); if (is_pool(etmp->ex, etmp->ey) && !e_inview) if (!Deaf) You_hear("a splash."); @@ -691,7 +691,8 @@ struct entity *etmp; E_phrase(etmp, "fall")); return; } - debugpline("%s cannot survive on the drawbridge square",E_phrase(etmp, NULL)); + debugpline1("%s cannot survive on the drawbridge square", + E_phrase(etmp, NULL)); if (is_pool(etmp->ex, etmp->ey) || is_lava(etmp->ex, etmp->ey)) if (e_inview && !is_u(etmp)) { /* drown() will supply msgs if nec. */ @@ -907,7 +908,7 @@ int x,y; if (etmp1->edata) { e_inview = e_canseemon(etmp1); if (e_missed(etmp1, TRUE)) { - debugpline("%s spared!", E_phrase(etmp1, "are")); + debugpline1("%s spared!", E_phrase(etmp1, "are")); /* if there is water or lava here, fall in now */ if (is_u(etmp1)) spoteffects(FALSE); @@ -925,7 +926,7 @@ int x,y; if (!Deaf && !is_u(etmp1) && !is_pool(x,y)) You_hear("a crushing sound."); else - debugpline("%s from shrapnel", + debugpline1("%s from shrapnel", E_phrase(etmp1, "die")); } killer.format = KILLED_BY_AN; diff --git a/src/dig.c b/src/dig.c index 1c053ec73..fa25f76a0 100644 --- a/src/dig.c +++ b/src/dig.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 dig.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 dig.c $NHDT-Date: 1426465434 2015/03/16 00:23:54 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.73 $ */ /* NetHack 3.5 dig.c $Date: 2012/02/16 03:01:37 $ $Revision: 1.67 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1689,7 +1689,7 @@ bury_an_obj(otmp) struct obj *otmp2; boolean under_ice; - debugpline("bury_an_obj: %s", xname(otmp)); + debugpline1("bury_an_obj: %s", xname(otmp)); if (otmp == uball) { unpunish(); u.utrap = rn1(50,20); @@ -1752,7 +1752,7 @@ int x, y; struct obj *otmp, *otmp2; if(level.objects[x][y] != (struct obj *)0) - debugpline("bury_objs: at %d, %d", x, y); + debugpline2("bury_objs: at <%d,%d>", x, y); for (otmp = level.objects[x][y]; otmp; otmp = otmp2) otmp2 = bury_an_obj(otmp); @@ -1769,7 +1769,7 @@ int x, y; struct obj *otmp, *otmp2, *bball; coord cc; - debugpline("unearth_objs: at %d, %d", x, y); + debugpline2("unearth_objs: at <%d,%d>", x, y); cc.x = x; cc.y = y; bball = buried_ball(&cc); for (otmp = level.buriedobjlist; otmp; otmp = otmp2) { @@ -1878,7 +1878,7 @@ void bury_monst(mtmp) struct monst *mtmp; { - debugpline("bury_monst: %s", mon_nam(mtmp)); + debugpline1("bury_monst: %s", mon_nam(mtmp)); if(canseemon(mtmp)) { if(is_flyer(mtmp->data) || is_floater(mtmp->data)) { pline_The("%s opens up, but %s is not swallowed!", @@ -1897,7 +1897,7 @@ struct monst *mtmp; void bury_you() { - debugpline("bury_you"); + debugpline0("bury_you"); if (!Levitation && !Flying) { if(u.uswallow) You_feel("a sensation like falling into a trap!"); @@ -1914,7 +1914,7 @@ bury_you() void unearth_you() { - debugpline("unearth_you"); + debugpline0("unearth_you"); u.uburied = FALSE; under_ground(0); if(!uamul || uamul->otyp != AMULET_OF_STRANGULATION) @@ -1925,7 +1925,7 @@ unearth_you() void escape_tomb() { - debugpline("escape_tomb"); + debugpline0("escape_tomb"); if ((Teleportation || can_teleport(youmonst.data)) && (Teleport_control || rn2(3) < Luck+2)) { You("attempt a teleport spell."); @@ -1957,7 +1957,7 @@ bury_obj(otmp) struct obj *otmp; { - debugpline("bury_obj"); + debugpline0("bury_obj"); if(cansee(otmp->ox, otmp->oy)) pline_The("objects on the %s tumble into a hole!", surface(otmp->ox, otmp->oy)); diff --git a/src/dungeon.c b/src/dungeon.c index 4c8e6beeb..ed87652f1 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 dungeon.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 dungeon.c $NHDT-Date: 1426465434 2015/03/16 00:23:54 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.39 $ */ /* NetHack 3.5 dungeon.c $Date: 2012/04/14 08:31:05 $ $Revision: 1.34 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -81,7 +81,7 @@ dumpit() s_level *x; branch *br; - if (!showdebug()) return; + if (!showdebug(__FILE__)) return; for(i = 0; i < n_dgns; i++) { fprintf(stderr, "\n#%d \"%s\" (%s):\n", i, diff --git a/src/eat.c b/src/eat.c index 793925fb7..983f6bcec 100644 --- a/src/eat.c +++ b/src/eat.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 eat.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 eat.c $NHDT-Date: 1426465435 2015/03/16 00:23:55 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.123 $ */ /* NetHack 3.5 eat.c $Date: 2012/02/01 00:49:16 $ $Revision: 1.116 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -284,11 +284,11 @@ recalc_wt() { struct obj *piece = context.victual.piece; - debugpline("Old weight = %d", piece->owt); - debugpline("Used time = %d, Req'd time = %d", - context.victual.usedtime, context.victual.reqtime); + debugpline1("Old weight = %d", piece->owt); + debugpline2("Used time = %d, Req'd time = %d", + context.victual.usedtime, context.victual.reqtime); piece->owt = weight(piece); - debugpline("New weight = %d", piece->owt); + debugpline1("New weight = %d", piece->owt); } void @@ -298,7 +298,7 @@ reset_eat() /* called when eating interrupted by an event */ * the round is spent eating. */ if(context.victual.eating && !context.victual.doreset) { - debugpline("reset_eat..."); + debugpline0("reset_eat..."); context.victual.doreset = TRUE; } return; @@ -313,7 +313,7 @@ register struct obj *otmp; (void) splitobj(otmp, otmp->quan - 1L); else otmp = splitobj(otmp, 1L); - debugpline("split object,"); + debugpline0("split object,"); } if (!otmp->oeaten) { @@ -374,7 +374,7 @@ struct obj *old_obj, *new_obj; STATIC_OVL void do_reset_eat() { - debugpline("do_reset_eat..."); + debugpline0("do_reset_eat..."); if (context.victual.piece) { context.victual.o_id = 0; context.victual.piece = touchfood(context.victual.piece); @@ -717,39 +717,39 @@ register struct permonst *ptr; switch (type) { case FIRE_RES: res = (ptr->mconveys & MR_FIRE) != 0; - if (res) debugpline("can get fire resistance"); + if (res) debugpline0("can get fire resistance"); break; case SLEEP_RES: res = (ptr->mconveys & MR_SLEEP) != 0; - if (res) debugpline("can get sleep resistance"); + if (res) debugpline0("can get sleep resistance"); break; case COLD_RES: res = (ptr->mconveys & MR_COLD) != 0; - if (res) debugpline("can get cold resistance"); + if (res) debugpline0("can get cold resistance"); break; case DISINT_RES: res = (ptr->mconveys & MR_DISINT) != 0; - if (res) debugpline("can get disintegration resistance"); + if (res) debugpline0("can get disintegration resistance"); break; case SHOCK_RES: /* shock (electricity) resistance */ res = (ptr->mconveys & MR_ELEC) != 0; - if (res) debugpline("can get shock resistance"); + if (res) debugpline0("can get shock resistance"); break; case POISON_RES: res = (ptr->mconveys & MR_POISON) != 0; - if (res) debugpline("can get poison resistance"); + if (res) debugpline0("can get poison resistance"); break; case TELEPORT: res = can_teleport(ptr); - if (res) debugpline("can get teleport"); + if (res) debugpline0("can get teleport"); break; case TELEPORT_CONTROL: res = control_teleport(ptr); - if (res) debugpline("can get teleport control"); + if (res) debugpline0("can get teleport control"); break; case TELEPAT: res = telepathic(ptr); - if (res) debugpline("can get telepathy"); + if (res) debugpline0("can get telepathy"); break; default: /* res stays 0 */ @@ -768,7 +768,7 @@ register struct permonst *ptr; { register int chance; - debugpline("Attempting to give intrinsic %d", type); + debugpline1("Attempting to give intrinsic %d", type); /* some intrinsics are easier to get than others */ switch (type) { case POISON_RES: @@ -797,7 +797,7 @@ register struct permonst *ptr; switch (type) { case FIRE_RES: - debugpline("Trying to give fire resistance"); + debugpline0("Trying to give fire resistance"); if(!(HFire_resistance & FROMOUTSIDE)) { You(Hallucination ? "be chillin'." : "feel a momentary chill."); @@ -805,21 +805,21 @@ register struct permonst *ptr; } break; case SLEEP_RES: - debugpline("Trying to give sleep resistance"); + debugpline0("Trying to give sleep resistance"); if(!(HSleep_resistance & FROMOUTSIDE)) { You_feel("wide awake."); HSleep_resistance |= FROMOUTSIDE; } break; case COLD_RES: - debugpline("Trying to give cold resistance"); + debugpline0("Trying to give cold resistance"); if(!(HCold_resistance & FROMOUTSIDE)) { You_feel("full of hot air."); HCold_resistance |= FROMOUTSIDE; } break; case DISINT_RES: - debugpline("Trying to give disintegration resistance"); + debugpline0("Trying to give disintegration resistance"); if(!(HDisint_resistance & FROMOUTSIDE)) { You_feel(Hallucination ? "totally together, man." : @@ -828,7 +828,7 @@ register struct permonst *ptr; } break; case SHOCK_RES: /* shock (electricity) resistance */ - debugpline("Trying to give shock resistance"); + debugpline0("Trying to give shock resistance"); if(!(HShock_resistance & FROMOUTSIDE)) { if (Hallucination) You_feel("grounded in reality."); @@ -838,7 +838,7 @@ register struct permonst *ptr; } break; case POISON_RES: - debugpline("Trying to give poison resistance"); + debugpline0("Trying to give poison resistance"); if(!(HPoison_resistance & FROMOUTSIDE)) { You_feel(Poison_resistance ? "especially healthy." : "healthy."); @@ -846,7 +846,7 @@ register struct permonst *ptr; } break; case TELEPORT: - debugpline("Trying to give teleport"); + debugpline0("Trying to give teleport"); if(!(HTeleportation & FROMOUTSIDE)) { You_feel(Hallucination ? "diffuse." : "very jumpy."); @@ -854,7 +854,7 @@ register struct permonst *ptr; } break; case TELEPORT_CONTROL: - debugpline("Trying to give teleport control"); + debugpline0("Trying to give teleport control"); if(!(HTeleport_control & FROMOUTSIDE)) { You_feel(Hallucination ? "centered in your personal space." : @@ -863,7 +863,7 @@ register struct permonst *ptr; } break; case TELEPAT: - debugpline("Trying to give telepathy"); + debugpline0("Trying to give telepathy"); if(!(HTelepat & FROMOUTSIDE)) { You_feel(Hallucination ? "in touch with the cosmos." : @@ -874,7 +874,7 @@ register struct permonst *ptr; } break; default: - debugpline("Tried to give an impossible intrinsic"); + debugpline0("Tried to give an impossible intrinsic"); break; } } @@ -1005,7 +1005,7 @@ register int pm; case PM_DISENCHANTER: /* picks an intrinsic at random and removes it; there's no feedback if hero already lacks the chosen ability */ - debugpline("using attrcurse to strip an intrinsic"); + debugpline0("using attrcurse to strip an intrinsic"); attrcurse(); break; case PM_MIND_FLAYER: @@ -1045,7 +1045,7 @@ register int pm; if (conveys_STR) { count = 1; tmp = -1; /* use -1 as fake prop index for STR */ - debugpline("\"Intrinsic\" strength, %d", tmp); + debugpline1("\"Intrinsic\" strength, %d", tmp); } for (i = 1; i <= LAST_PROP; i++) { if (!intrinsic_possible(i, ptr)) continue; @@ -1055,7 +1055,7 @@ register int pm; of keeping the old choice (note that 1 in 1 and 0 in 1 are what we want for the first candidate) */ if (!rn2(count)) { - debugpline("Intrinsic %d replacing %d", i, tmp); + debugpline2("Intrinsic %d replacing %d", i, tmp); tmp = i; } } @@ -1599,11 +1599,12 @@ start_eating(otmp) /* called as you start to eat */ { const char *old_nomovemsg, *save_nomovemsg; - debugpline("start_eating: %p (victual = %p)", otmp, context.victual.piece); - debugpline("reqtime = %d", context.victual.reqtime); - debugpline("(original reqtime = %d)", objects[otmp->otyp].oc_delay); - debugpline("nmod = %d", context.victual.nmod); - debugpline("oeaten = %d", otmp->oeaten); + debugpline2("start_eating: %lx (victual = %lx)", + (unsigned long)otmp, (unsigned long)context.victual.piece); + debugpline1("reqtime = %d", context.victual.reqtime); + debugpline1("(original reqtime = %d)", objects[otmp->otyp].oc_delay); + debugpline1("nmod = %d", context.victual.nmod); + debugpline1("oeaten = %d", otmp->oeaten); context.victual.fullwarn = context.victual.doreset = FALSE; context.victual.eating = TRUE; @@ -2443,11 +2444,14 @@ doeat() /* generic "eat" command funtion (see cmd.c) */ if (otmp->otyp == CORPSE) basenutrit = mons[otmp->corpsenm].cnutrit; else basenutrit = objects[otmp->otyp].oc_nutrition; - debugpline("before rounddiv: context.victual.reqtime == %d", context.victual.reqtime); - debugpline("oeaten == %d, basenutrit == %d", otmp->oeaten, basenutrit); + debugpline1("before rounddiv: context.victual.reqtime == %d", + context.victual.reqtime); + debugpline2("oeaten == %d, basenutrit == %d", + otmp->oeaten, basenutrit); context.victual.reqtime = (basenutrit == 0 ? 0 : rounddiv(context.victual.reqtime * (long)otmp->oeaten, basenutrit)); - debugpline("after rounddiv: context.victual.reqtime == %d", context.victual.reqtime); + debugpline1("after rounddiv: context.victual.reqtime == %d", + context.victual.reqtime); /* calculate the modulo value (nutrit. units per round eating) * note: this isn't exact - you actually lose a little nutrition * due to this method. @@ -2549,7 +2553,7 @@ register int num; { /* See comments in newuhs() for discussion on force_save_hs */ boolean iseating = (occupation == eatfood) || force_save_hs; - debugpline("lesshungry(%d)", num); + debugpline1("lesshungry(%d)", num); u.uhunger += num; if(u.uhunger >= 2000) { if (!iseating || context.victual.canchoke) { diff --git a/src/files.c b/src/files.c index d4c216276..9e9cea746 100644 --- a/src/files.c +++ b/src/files.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 files.c $NHDT-Date: 1425081976 2015/02/28 00:06:16 $ $NHDT-Branch: master $:$NHDT-Revision: 1.127 $ */ +/* NetHack 3.5 files.c $NHDT-Date: 1426465435 2015/03/16 00:23:55 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.133 $ */ /* NetHack 3.5 files.c $Date: 2012/03/10 02:49:08 $ $Revision: 1.124 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -3195,4 +3195,55 @@ int ifd, ofd; /* ---------- END INTERNAL RECOVER ----------- */ #endif /*SELF_RECOVER*/ +#ifdef DEBUG +/* used by debugpline() to decide whether to issue a message + from a partiular source file; caller passes __FILE__ and we check + whether it is in the source file list supplied by SYSCF's DEBUGFILES */ +boolean +showdebug(filename) +const char *filename; +{ + const char *debugfiles, *p; + + if (!filename || !*filename) return FALSE; /* sanity precaution */ + + debugfiles = sysopt.debugfiles; + /* usual case: sysopt.debugfiles will be empty */ + if (!debugfiles || !*debugfiles) return FALSE; + + /* strip filename's path if present */ +# ifdef UNIX + if ((p = rindex(filename, '/')) != 0) filename = p + 1; +# endif +# ifdef VMS + filename = vms_basename(filename); + /* vms_basename strips off 'type' suffix as well as path and version; + we want to put suffix back (".c" assumed); since it always returns + a pointer to a static buffer, we can safely modify its result */ + Strcat((char *)filename, ".c"); +# endif + + /* + * Wildcard match will only work if there's a single pattern (which + * might be a single file name without any wildcarding) rather than + * a space-separated list. + * [to NOT do: We could step through the space-separated list and + * attempt a wildcard match against each element, but that would be + * overkill for the intended usage.] + */ + if (pmatch(debugfiles, filename)) + return TRUE; + + /* check whether filename is an element of the list */ + if ((p = strstr(debugfiles, filename)) != 0) { + int l = (int)strlen(filename); + + if ((p == debugfiles || p[-1] == ' ' || p[-1] == '/') + && (p[l] == ' ' || p[l] == '\0')) + return TRUE; + } + return FALSE; +} +#endif /*DEBUG*/ + /*files.c*/ diff --git a/src/light.c b/src/light.c index f7d43eeee..52efe9759 100644 --- a/src/light.c +++ b/src/light.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 light.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 light.c $NHDT-Date: 1426465436 2015/03/16 00:23:56 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.17 $ */ /* NetHack 3.5 light.c $Date: 2009/05/06 10:46:38 $ $Revision: 1.15 $ */ /* SCCS Id: @(#)light.c 3.5 2009/01/20 */ /* Copyright (c) Dean Luick, 1994 */ @@ -394,13 +394,13 @@ write_ls(fd, ls) ls->id = zeroany; ls->id.a_uint = otmp->o_id; if (find_oid((unsigned)ls->id.a_uint) != otmp) - debugpline("write_ls: can't find obj #%u!", ls->id.a_uint); + impossible("write_ls: can't find obj #%u!", ls->id.a_uint); } else { /* ls->type == LS_MONSTER */ mtmp = (struct monst *)ls->id.a_monst; ls->id = zeroany; ls->id.a_uint = mtmp->m_id; if (find_mid((unsigned)ls->id.a_uint, FM_EVERYWHERE) != mtmp) - debugpline("write_ls: can't find mon #%u!", ls->id.a_uint); + impossible("write_ls: can't find mon #%u!", ls->id.a_uint); } ls->flags |= LSF_NEEDS_FIXUP; bwrite(fd, (genericptr_t)ls, sizeof(light_source)); diff --git a/src/makemon.c b/src/makemon.c index afaa0140a..6ce548ea0 100644 --- a/src/makemon.c +++ b/src/makemon.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 makemon.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 makemon.c $NHDT-Date: 1426465436 2015/03/16 00:23:56 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.74 $ */ /* NetHack 3.5 makemon.c $Date: 2012/01/29 00:34:33 $ $Revision: 1.69 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -93,7 +93,7 @@ register int x, y, n; int cnttmp,cntdiv; cnttmp = cnt; - debugpline("init group call x=%d,y=%d,n=%d,cnt=%d.", x, y, n, cnt); + debugpline4("init group call <%d,%d>, n=%d, cnt=%d.", x, y, n, cnt); cntdiv = ((u.ulevel < 3) ? 4 : (u.ulevel < 5) ? 2 : 1); #endif /* Tuning: cut down on swarming at low character levels [mrs] */ @@ -758,7 +758,7 @@ boolean ghostly; mvitals[mndx].born++; if ((int) mvitals[mndx].born >= lim && !(mons[mndx].geno & G_NOGEN) && !(mvitals[mndx].mvflags & G_EXTINCT)) { - if (wizard) debugpline("Automatically extinguished %s.", + if (wizard) debugpline1("Automatically extinguished %s.", makeplural(mons[mndx].mname)); mvitals[mndx].mvflags |= G_EXTINCT; reset_rndmonst(mndx); @@ -903,8 +903,8 @@ register int mmflags; already been genocided, return */ if (mvitals[mndx].mvflags & G_GENOD) return((struct monst *) 0); if (wizard && (mvitals[mndx].mvflags & G_EXTINCT)) - debugpline("Explicitly creating extinct monster %s.", - mons[mndx].mname); + debugpline1("Explicitly creating extinct monster %s.", + mons[mndx].mname); } else { /* make a random (common) monster that can survive here. * (the special levels ask for random monsters at specific @@ -916,7 +916,7 @@ register int mmflags; do { if(!(ptr = rndmonst())) { - debugpline("Warning: no monster."); + debugpline0("Warning: no monster."); return((struct monst *) 0); /* no more monsters! */ } fakemon.data = ptr; /* set up for goodpos */ @@ -1252,7 +1252,7 @@ rndmonst() } if (mndx == SPECIAL_PM) { /* evidently they've all been exterminated */ - debugpline("rndmonst: no common mons!"); + debugpline0("rndmonst: no common mons!"); return (struct permonst *)0; } /* else `mndx' now ready for use below */ zlevel = level_difficulty(); @@ -1290,7 +1290,8 @@ rndmonst() if (rndmonst_state.choice_count <= 0) { /* maybe no common mons left, or all are too weak or too strong */ - debugpline("rndmonst: choice_count=%d", rndmonst_state.choice_count); + debugpline1("rndmonst: choice_count=%d", + rndmonst_state.choice_count); return (struct permonst *)0; } diff --git a/src/mklev.c b/src/mklev.c index 2d4899984..4412d68aa 100644 --- a/src/mklev.c +++ b/src/mklev.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 mklev.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mklev.c $NHDT-Date: 1426465436 2015/03/16 00:23:56 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.25 $ */ /* NetHack 3.5 mklev.c $Date: 2012/02/15 01:55:33 $ $Revision: 1.20 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -684,7 +684,7 @@ makelevel() /* make a secret treasure vault, not connected to the rest */ if(do_vault()) { xchar w,h; - debugpline("trying to make a vault..."); + debugpline0("trying to make a vault..."); w = 1; h = 1; if (check_room(&vault_x, &w, &vault_y, &h, TRUE)) { @@ -1560,7 +1560,7 @@ xchar x, y; *source = u.uz; insert_branch(br, TRUE); - debugpline("Made knox portal."); + debugpline0("Made knox portal."); place_branch(br, x, y); } diff --git a/src/mkmaze.c b/src/mkmaze.c index 0cfdbe35a..87a3a870b 100644 --- a/src/mkmaze.c +++ b/src/mkmaze.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 mkmaze.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mkmaze.c $NHDT-Date: 1426465437 2015/03/16 00:23:57 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.20 $ */ /* NetHack 3.5 mkmaze.c $Date: 2009/05/06 10:46:56 $ $Revision: 1.18 $ */ /* SCCS Id: @(#)mkmaze.c 3.5 2007/06/18 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ @@ -589,7 +589,7 @@ register const char *s; if (x_range <= INVPOS_X_MARGIN || y_range <= INVPOS_Y_MARGIN || (x_range * y_range) <= (INVPOS_DISTANCE * INVPOS_DISTANCE)) - debugpline("inv_pos: maze is too small! (%d x %d)", + debugpline2("inv_pos: maze is too small! (%d x %d)", x_maze_max, y_maze_max); inv_pos.x = inv_pos.y = 0; /*{occupied() => invocation_pos()}*/ do { @@ -877,7 +877,7 @@ register xchar x, y, todnum, todlevel; impossible("portal on top of portal??"); return; } - debugpline("mkportal: at (%d,%d), to %s, level %d", + debugpline4("mkportal: at <%d,%d>, to %s, level %d", x, y, dungeons[todnum].dname, todlevel); ttmp->dst.dnum = todnum; ttmp->dst.dlevel = todlevel; diff --git a/src/mkobj.c b/src/mkobj.c index ddfa363d4..4092401cd 100644 --- a/src/mkobj.c +++ b/src/mkobj.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 mkobj.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mkobj.c $NHDT-Date: 1426465437 2015/03/16 00:23:57 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.77 $ */ /* NetHack 3.5 mkobj.c $Date: 2012/03/10 02:49:08 $ $Revision: 1.70 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1521,10 +1521,9 @@ struct obj *otmp; /* Adjust the age; must be same as obj_timer_checks() for off ice*/ age = monstermoves - otmp->age; retval += age * (ROT_ICE_ADJUSTMENT-1) / ROT_ICE_ADJUSTMENT; - debugpline("The %s age has ice modifications:otmp->age = %ld, returning %ld.", - s_suffix(doname(otmp)),otmp->age, retval); - debugpline("Effective age of corpse: %ld.", - monstermoves - retval); + debugpline3("The %s age has ice modifications: otmp->age = %ld, returning %ld.", + s_suffix(doname(otmp)), otmp->age, retval); + debugpline1("Effective age of corpse: %ld.", monstermoves - retval); } return retval; } @@ -1553,7 +1552,8 @@ int force; /* 0 = no force so do checks, <0 = force off, >0 force on */ /* mark the corpse as being on ice */ otmp->on_ice = 1; - debugpline("%s is now on ice at %d,%d.", The(xname(otmp)),x,y); + debugpline3("%s is now on ice at <%d,%d>.", + The(xname(otmp)), x, y); /* Adjust the time remaining */ tleft *= ROT_ICE_ADJUSTMENT; restart_timer = TRUE; @@ -1579,7 +1579,8 @@ int force; /* 0 = no force so do checks, <0 = force off, >0 force on */ long age; otmp->on_ice = 0; - debugpline("%s is no longer on ice at %d,%d.", The(xname(otmp)),x,y); + debugpline3("%s is no longer on ice at <%d,%d>.", + The(xname(otmp)), x, y); /* Adjust the remaining time */ tleft /= ROT_ICE_ADJUSTMENT; restart_timer = TRUE; diff --git a/src/mon.c b/src/mon.c index 49f6282dc..fb0a75a57 100644 --- a/src/mon.c +++ b/src/mon.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 mon.c $NHDT-Date: 1425319883 2015/03/02 18:11:23 $ $NHDT-Branch: master $:$NHDT-Revision: 1.137 $ */ +/* NetHack 3.5 mon.c $NHDT-Date: 1426465438 2015/03/16 00:23:58 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.139 $ */ /* NetHack 3.5 mon.c $Date: 2012/05/16 02:15:10 $ $Revision: 1.126 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1260,7 +1260,7 @@ register struct monst *mtmp, *mtmp2; /* transfer the monster's inventory */ for (otmp = mtmp2->minvent; otmp; otmp = otmp->nobj) { if (otmp->where != OBJ_MINVENT || otmp->ocarry != mtmp) - debugpline("replmon: minvent inconsistency"); + debugpline0("replmon: minvent inconsistency"); otmp->ocarry = mtmp2; } mtmp->minvent = 0; diff --git a/src/pickup.c b/src/pickup.c index 0b6abf06d..7b3096c59 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 pickup.c $NHDT-Date: 1425081977 2015/02/28 00:06:17 $ $NHDT-Branch: master $:$NHDT-Revision: 1.126 $ */ +/* NetHack 3.5 pickup.c $NHDT-Date: 1426465438 2015/03/16 00:23:58 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.130 $ */ /* NetHack 3.5 pickup.c $Date: 2012/02/16 03:01:38 $ $Revision: 1.123 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -897,7 +897,7 @@ int how; /* type of query */ (*pick_list)->item.a_int = curr->oclass; return 1; } else { - debugpline("query_category: no single object match"); + debugpline0("query_category: no single object match"); } return 0; } diff --git a/src/questpgr.c b/src/questpgr.c index 7f51965f7..62e1ae4e4 100644 --- a/src/questpgr.c +++ b/src/questpgr.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 questpgr.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 questpgr.c $NHDT-Date: 1426465439 2015/03/16 00:23:59 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.18 $ */ /* NetHack 3.5 questpgr.c $Date: 2012/02/02 09:18:14 $ $Revision: 1.14 $ */ /* Copyright 1991, M. Stephenson */ /* NetHack may be freely redistributed. See license for details. */ @@ -47,7 +47,7 @@ dump_qtlist() /* dump the character msg list to check appearance */ { struct qtmsg *msg; - if (!showdebug()) return; + if (!showdebug(__FILE__)) return; for (msg = qt_list.chrole; msg->msgnum > 0; msg++) { pline("msgnum %d: delivery %c", diff --git a/src/restore.c b/src/restore.c index af974d147..24a0f777c 100644 --- a/src/restore.c +++ b/src/restore.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 restore.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 restore.c $NHDT-Date: 1426465439 2015/03/16 00:23:59 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.77 $ */ /* NetHack 3.5 restore.c $Date: 2012/02/16 02:40:24 $ $Revision: 1.71 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1153,7 +1153,7 @@ register int fd; ++msgcount; } if (msgcount) putmsghistory((char *)0, TRUE); - debugpline("Read %d messages from savefile.", msgcount); + debugpline1("Read %d messages from savefile.", msgcount); } /* Clear all structures for object and monster ID mapping. */ diff --git a/src/rnd.c b/src/rnd.c index 662d1a275..fc7147d50 100644 --- a/src/rnd.c +++ b/src/rnd.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 rnd.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 rnd.c $NHDT-Date: 1426465440 2015/03/16 00:24:00 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.8 $ */ /* NetHack 3.5 rnd.c $Date: 2009/05/06 10:47:41 $ $Revision: 1.7 $ */ /* SCCS Id: @(#)rnd.c 3.5 2004/08/27 */ /* NetHack may be freely redistributed. See license for details. */ @@ -24,7 +24,7 @@ register int x; { #ifdef BETA if (x <= 0) { - debugpline("rn2(%d) attempted", x); + debugpline1("rn2(%d) attempted", x); return(0); } x = RND(x); @@ -42,7 +42,7 @@ register int x; /* good luck approaches 0, bad luck approaches (x-1) */ #ifdef BETA if (x <= 0) { - debugpline("rnl(%d) attempted", x); + debugpline1("rnl(%d) attempted", x); return(0); } #endif @@ -81,7 +81,7 @@ register int x; { #ifdef BETA if (x <= 0) { - debugpline("rnd(%d) attempted", x); + debugpline1("rnd(%d) attempted", x); return(1); } x = RND(x)+1; @@ -99,7 +99,7 @@ register int n, x; #ifdef BETA if (x < 0 || n < 0 || (x == 0 && n != 0)) { - debugpline("d(%d,%d) attempted", n, x); + debugpline2("d(%d,%d) attempted", n, x); return(1); } #endif diff --git a/src/save.c b/src/save.c index b220f945d..165c792db 100644 --- a/src/save.c +++ b/src/save.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 save.c $NHDT-Date: 1425081977 2015/02/28 00:06:17 $ $NHDT-Branch: master $:$NHDT-Revision: 1.59 $ */ +/* NetHack 3.5 save.c $NHDT-Date: 1426465440 2015/03/16 00:24:00 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.61 $ */ /* NetHack 3.5 save.c $Date: 2012/02/16 02:40:24 $ $Revision: 1.53 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1210,7 +1210,7 @@ int fd, mode; } bwrite(fd, (genericptr_t) &minusone, sizeof(int)); } - debugpline("Stored %d messages into savefile.", msgcount); + debugpline1("Stored %d messages into savefile.", msgcount); /* note: we don't attempt to handle release_data() here */ } diff --git a/src/shk.c b/src/shk.c index 12f22eb40..ffc827482 100644 --- a/src/shk.c +++ b/src/shk.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 shk.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 shk.c $NHDT-Date: 1426465441 2015/03/16 00:24:01 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.96 $ */ /* NetHack 3.5 shk.c $Date: 2012/07/03 22:54:49 $ $Revision: 1.91 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1205,7 +1205,7 @@ dopay() } if(!shkp) { - debugpline("dopay: null shkp."); + debugpline0("dopay: null shkp."); return(0); } proceed: diff --git a/src/sp_lev.c b/src/sp_lev.c index 6be2c9713..41a747da9 100644 --- a/src/sp_lev.c +++ b/src/sp_lev.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 sp_lev.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 sp_lev.c $NHDT-Date: 1426465441 2015/03/16 00:24:01 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.25 $ */ /* NetHack 3.5 sp_lev.c $Date: 2011/01/05 01:28:36 $ $Revision: 1.23 $ */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ @@ -324,8 +324,8 @@ chk: lev = &levl[x][y]; for (; y <= ymax; y++) { if (lev++->typ) { - if(!vault) - debugpline("strange area [%d,%d] in check_room.",x,y); + if (!vault) + debugpline2("strange area [%d,%d] in check_room.", x, y); if (!rn2(3)) return FALSE; if (x < *lowx) *lowx = x + xlim + 1; @@ -398,7 +398,7 @@ xchar rtype, rlit; r1 = rnd_rect(); /* Get a random rectangle */ if (!r1) { /* No more free rectangles ! */ - debugpline("No more rects..."); + debugpline0("No more rects..."); return FALSE; } hx = r1->hx; @@ -1311,8 +1311,8 @@ schar ftyp, btyp; if (xx <= 0 || yy <= 0 || tx <= 0 || ty <= 0 || xx > COLNO-1 || tx > COLNO-1 || yy > ROWNO-1 || ty > ROWNO-1) { - debugpline("dig_corridor: bad coords : (%d,%d) (%d,%d).", - xx,yy,tx,ty); + debugpline4("dig_corridor: bad coords <%d,%d> <%d,%d>.", + xx, yy, tx, ty); return FALSE; } if (tx > xx) dx = 1; diff --git a/src/sys.c b/src/sys.c index 14e0aa642..0392d6554 100644 --- a/src/sys.c +++ b/src/sys.c @@ -1,26 +1,34 @@ -/* NetHack 3.5 sys.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 sys.c $NHDT-Date: 1426465442 2015/03/16 00:24:02 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.16 $ */ /* NetHack 3.5 sys.c $Date: 2012/03/10 02:22:07 $ $Revision: 1.12 $ */ /* Copyright (c) Kenneth Lorber, Kensington, Maryland, 2008. */ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" -/* for KR1ED config, WIZARD is 0 or 1 and WIZARD_NAME is a string; - for usual config, WIZARD is the string; forcing WIZARD_NAME to match it - eliminates conditional testing for which one to use in string ops */ +#ifndef SYSCF +/* !SYSCF configurations need '#define DEBUGFILES "foo.c bar.c"' + to enable debugging feedback for source files foo.c and bar.c; + to activate debugpline(), set an appropriate value and uncomment */ +/* # define DEBUGFILES "*" */ +#endif struct sysopt sysopt; void -sys_early_init(){ +sys_early_init() +{ sysopt.support = NULL; sysopt.recover = NULL; #ifdef SYSCF sysopt.wizards = NULL; #else - sysopt.wizards = WIZARD_NAME; + sysopt.wizards = dupstr(WIZARD_NAME); #endif +#if defined(SYSCF) || !defined(DEBUGFILES) sysopt.debugfiles = NULL; +#else + sysopt.debugfiles = dupstr(DEBUGFILES); +#endif sysopt.shellers = NULL; sysopt.maxplayers = 0; /* XXX eventually replace MAX_NR_OF_PLAYERS */ diff --git a/src/teleport.c b/src/teleport.c index cd179c1f1..bf5e323a7 100644 --- a/src/teleport.c +++ b/src/teleport.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 teleport.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 teleport.c $NHDT-Date: 1426465443 2015/03/16 00:24:03 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.48 $ */ /* NetHack 3.5 teleport.c $Date: 2012/01/04 18:52:36 $ $Revision: 1.45 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -121,7 +121,7 @@ unsigned entflags; struct monst fakemon; /* dummy monster */ if (!mdat) { - debugpline("enexto() called with mdat==0"); + debugpline0("enexto() called with null mdat"); /* default to player's original monster type */ mdat = &mons[u.umonster]; } diff --git a/src/zap.c b/src/zap.c index 38b883115..5f39fc30e 100644 --- a/src/zap.c +++ b/src/zap.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 zap.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 zap.c $NHDT-Date: 1426465444 2015/03/16 00:24:04 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.195 $ */ /* NetHack 3.5 zap.c $Date: 2013/11/05 00:57:56 $ $Revision: 1.183 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1708,10 +1708,11 @@ struct obj *obj, *otmp; * as a safeguard against any stray occurrence left in an obj * struct someplace, although that should never happen. */ - if (context.bypasses) + if (context.bypasses) { return 0; - else { - debugpline("%s for a moment.", Tobjnam(obj, "pulsate")); + } else { + debugpline1("%s for a moment.", + Tobjnam(obj, "pulsate")); obj->bypass = 0; } } @@ -3405,7 +3406,8 @@ struct obj **ootmp; /* to return worn armor for caller to disintegrate */ resist(mon, type < ZT_SPELL(0) ? WAND_CLASS : '\0', 0, NOTELL)) tmp /= 2; if (tmp < 0) tmp = 0; /* don't allow negative damage */ - debugpline("zapped monster hp = %d (= %d - %d)", mon->mhp-tmp,mon->mhp,tmp); + debugpline3("zapped monster hp = %d (= %d - %d)", + mon->mhp-tmp, mon->mhp, tmp); mon->mhp -= tmp; return(tmp); } diff --git a/win/tty/wintty.c b/win/tty/wintty.c index a201218e7..553553744 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 wintty.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 wintty.c $NHDT-Date: 1426465444 2015/03/16 00:24:04 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.71 $ */ /* NetHack 3.5 wintty.c $Date: 2012/01/22 06:27:09 $ $Revision: 1.66 $ */ /* Copyright (c) David Cohrs, 1991 */ /* NetHack may be freely redistributed. See license for details. */ @@ -1934,7 +1934,7 @@ register int x, y; /* not xchar: perhaps xchar is unsigned and case NHW_TEXT: s = "[text window]"; break; case NHW_BASE: s = "[base window]"; break; } - debugpline("bad curs positioning win %d %s (%d,%d)", window, s, x, y); + debugpline4("bad curs positioning win %d %s (%d,%d)", window, s, x, y); return; } #endif From a983a58b6af0aab41ce9d0af4d2287206f1dad48 Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 16 Mar 2015 02:03:40 -0700 Subject: [PATCH 109/132] free 'sysopt' strings upon termination --- include/extern.h | 4 +++- include/sys.h | 9 +++------ src/save.c | 3 ++- src/sys.c | 20 +++++++++++++++++++- 4 files changed, 27 insertions(+), 9 deletions(-) diff --git a/include/extern.h b/include/extern.h index cd8843762..d901d3641 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1,4 +1,4 @@ -/* NetHack 3.5 extern.h $NHDT-Date: 1426465429 2015/03/16 00:23:49 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.406 $ */ +/* NetHack 3.5 extern.h $NHDT-Date: 1426496453 2015/03/16 09:00:53 $ $NHDT-Branch: master $:$NHDT-Revision: 1.407 $ */ /* NetHack 3.5 extern.h $Date: 2013/11/05 00:57:53 $ $Revision: 1.380 $ */ /* Copyright (c) Steve Creps, 1988. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2065,6 +2065,8 @@ E void FDECL(play_sound_for_message, (const char *)); /* ### sys.c ### */ +E void NDECL(sys_early_init); +E void NDECL(sysopt_release); E void FDECL(sysopt_seduce_set,(int)); /* ### sys/msdos/sound.c ### */ diff --git a/include/sys.h b/include/sys.h index 8358021a2..940e95a11 100644 --- a/include/sys.h +++ b/include/sys.h @@ -1,4 +1,4 @@ -/* NetHack 3.5 sys.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 sys.h $NHDT-Date: 1426496454 2015/03/16 09:00:54 $ $NHDT-Branch: master $:$NHDT-Revision: 1.12 $ */ /* NetHack 3.5 sys.h $Date: 2012/01/27 20:15:26 $ $Revision: 1.9 $ */ /* Copyright (c) Kenneth Lorber, Kensington, Maryland, 2008. */ /* NetHack may be freely redistributed. See license for details. */ @@ -6,10 +6,6 @@ #ifndef SYS_H #define SYS_H -#define E extern - -E void NDECL(sys_early_init); - struct sysopt { char *support; /* local support contact */ char *recover; /* how to run recover - may be overridden by win port */ @@ -34,7 +30,8 @@ struct sysopt { #endif int seduce; }; -E struct sysopt sysopt; + +extern struct sysopt sysopt; #define SYSOPT_SEDUCE sysopt.seduce diff --git a/src/save.c b/src/save.c index 165c792db..802d560a9 100644 --- a/src/save.c +++ b/src/save.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 save.c $NHDT-Date: 1426465440 2015/03/16 00:24:00 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.61 $ */ +/* NetHack 3.5 save.c $NHDT-Date: 1426496455 2015/03/16 09:00:55 $ $NHDT-Branch: master $:$NHDT-Revision: 1.62 $ */ /* NetHack 3.5 save.c $Date: 2012/02/16 02:40:24 $ $Revision: 1.53 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1350,6 +1350,7 @@ freedynamicdata() #ifdef STATUS_VIA_WINDOWPORT status_finish(); #endif + sysopt_release(); /* SYSCF strings */ return; } diff --git a/src/sys.c b/src/sys.c index 0392d6554..52489135e 100644 --- a/src/sys.c +++ b/src/sys.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 sys.c $NHDT-Date: 1426465442 2015/03/16 00:24:02 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.16 $ */ +/* NetHack 3.5 sys.c $NHDT-Date: 1426496455 2015/03/16 09:00:55 $ $NHDT-Branch: master $:$NHDT-Revision: 1.17 $ */ /* NetHack 3.5 sys.c $Date: 2012/03/10 02:22:07 $ $Revision: 1.12 $ */ /* Copyright (c) Kenneth Lorber, Kensington, Maryland, 2008. */ /* NetHack may be freely redistributed. See license for details. */ @@ -67,6 +67,24 @@ sys_early_init() sysopt_seduce_set(sysopt.seduce); } +void +sysopt_release() +{ + if (sysopt.support) + free(sysopt.support), sysopt.support = NULL; + if (sysopt.recover) + free(sysopt.recover), sysopt.recover = NULL; + if (sysopt.wizards) + free(sysopt.wizards), sysopt.wizards = NULL; + if (sysopt.debugfiles) + free(sysopt.debugfiles), sysopt.debugfiles = NULL; +#ifdef PANICTRACE + if (sysopt.gdbpath) + free(sysopt.gdbpath), sysopt.gdbpath = NULL; + if (sysopt.greppath) + free (sysopt.greppath), sysopt.greppath = NULL; +#endif +} extern struct attack sa_yes[NATTK]; extern struct attack sa_no[NATTK]; From 0d0711fe178cc82174fef221c1280933d9bd97f0 Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 16 Mar 2015 02:29:10 -0700 Subject: [PATCH 110/132] fix #H3724 - gold pile stacking bug Bug report included a pointer to a fix; this patch is a superset. Gold pieces dropped on an altar by the player got their bknown flag set, which is incorrect since bless/curse doesn't apply to coins. If a monster (in reported case, a slain temple priest) dropped gold there too then the two stacks wouldn't merge. For the normal !GOLDOBJ config, the problem goes away as soon as the gold gets picked up. I didn't test for GOLDOBJ but think two inventory slots containing gold can result. The superset part is to not break agnostic conduct by dropping gold on an altar since no information is revealed when doing that. [This was one of the very last patches checked into the old cvs repository, where the somewhat out of date message above was accidentally omitted.] --- doc/fixes35.0 | 1 + src/do.c | 15 ++++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/doc/fixes35.0 b/doc/fixes35.0 index ad8117820..250b09d85 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -855,6 +855,7 @@ fix "object lost" panic (or even crash) when dropping multiple items while levitating and a lit potion of oil explodes and destroys some inventory fix "object_is_local" panic when saving bones after hero is killed by explosion produced by dropped or thrown lit potion of oil +gold dropped on altar by hero wouldn't stack with gold dropped there by monster if lava burns up the player's water walking boots, the player falls in the messages for lava burning items up are always printed fix used-up magic trap trying to hit steed. diff --git a/src/do.c b/src/do.c index 3069a4047..41e25a1b0 100644 --- a/src/do.c +++ b/src/do.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 do.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 do.c $NHDT-Date: 1426497723 2015/03/16 09:22:03 $ $NHDT-Branch: H3724 $:$NHDT-Revision: 1.109 $ */ /* NetHack 3.5 do.c $Date: 2014/11/18 03:10:39 $ $Revision: 1.101 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -222,10 +222,15 @@ doaltarobj(obj) /* obj is an object dropped on an altar */ if (Blind) return; - /* KMH, conduct */ - u.uconduct.gnostic++; + if (obj->oclass != COIN_CLASS) { + /* KMH, conduct */ + u.uconduct.gnostic++; + } else { + /* coins don't have bless/curse status */ + obj->blessed = obj->cursed = 0; + } - if ((obj->blessed || obj->cursed) && obj->oclass != COIN_CLASS) { + if (obj->blessed || obj->cursed) { There("is %s flash as %s %s the altar.", an(hcolor(obj->blessed ? NH_AMBER : NH_BLACK)), doname(obj), otense(obj, "hit")); @@ -233,7 +238,7 @@ doaltarobj(obj) /* obj is an object dropped on an altar */ } else { pline("%s %s on the altar.", Doname2(obj), otense(obj, "land")); - obj->bknown = 1; + if (obj->oclass != COIN_CLASS) obj->bknown = 1; } } From c24dcf76b2efb51a00aa5d3d53383bb6cf1bfdc7 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 16 Mar 2015 06:04:43 -0400 Subject: [PATCH 111/132] dungeoneers update March 16, 2015 --- dat/history | 75 +++++++++++++++++++++---------------------- doc/Guidebook.mn | 81 ++++++++++++++++++++++++----------------------- doc/Guidebook.tex | 81 ++++++++++++++++++++++++----------------------- 3 files changed, 120 insertions(+), 117 deletions(-) diff --git a/dat/history b/dat/history index 662ec57ae..b97c99039 100644 --- a/dat/history +++ b/dat/history @@ -159,41 +159,42 @@ particularly intriguing modification to help out with the game. The Gods of the Dungeon sometimes make note of the names of the worst of these miscreants in this, the list of Dungeoneers: - Adam Aronow Izchak Miller Mike Passaretti - Alex Kompel J. Ali Harlow Mike Stephenson - Andreas Dorn Janet Walz Norm Meluch - Andy Church Janne Salmijarvi Olaf Seibert - Andy Swanson Jean-Christophe Collet Pasi Kallinen - Ari Huttunen Jochen Erwied Pat Rankin - Barton House John Kallen Paul Winner - Benson I. Margulies John Rupley Pierre Martineau - Bill Dyer John S. Bien Ralf Brown - Boudewijn Waijers Johnny Lee Ray Chason - Bruce Cox Jon W{tte Richard Addison - Bruce Holloway Jonathan Handler Richard Beigel - Bruce Mewborne Joshua Delahunty Richard P. Hughey - Carl Schelin Keizo Yamamoto Rob Menke - Chris Russo Ken Arnold Robin Johnson - David Cohrs Ken Arromdee Roderick Schertler - David Damerell Ken Lorber Roland McGrath - David Gentzel Ken Washikita Ron Van Iwaarden - David Hairston Kevin Darcy Ronnen Miller - Dean Luick Kevin Hugo Ross Brown - Del Lamb Kevin Sitze Sascha Wostmann - Deron Meranda Kevin Smolkowski Scott Bigham - Dion Nicolaas Kevin Sweet Scott R. Turner - Dylan O'Donnell Lars Huttar Stephen Spackman - Eric Backus Leon Arnott Stephen White - Eric Hendrickson Malcolm Ryan Steve Creps - Eric R. Smith Mark Gooderum Steve Linhart - Eric S. Raymond Mark Modrall Steve VanDevender - Erik Andersen Marvin Bressler Teemu Suikki - Frederick Roeber Matthew Day Tim Lennan - Gil Neiger Merlyn LeRoy Timo Hakulinen - Greg Laskin Michael Allison Tom Almy - Greg Olson Michael Feir Tom West - Gregg Wonderly Michael Hamel Warren Cheung - Hao-yang Wang Michael Sokolov Warwick Allison - Helge Hafting Mike Engber Yitzhak Sapir - Irina Rempt-Drijfhout Mike Gallop + Adam Aronow Izchak Miller Mike Stephenson + Alex Kompel J. Ali Harlow Norm Meluch + Andreas Dorn Janet Walz Olaf Seibert + Andy Church Janne Salmijarvi Pasi Kallinen + Andy Swanson Jean-Christophe Collet Pat Rankin + Ari Huttunen Jochen Erwied Paul Winner + Barton House John Kallen Pierre Martineau + Benson I. Margulies John Rupley Ralf Brown + Bill Dyer John S. Bien Ray Chason + Boudewijn Waijers Johnny Lee Richard Addison + Bruce Cox Jon W{tte Richard Beigel + Bruce Holloway Jonathan Handler Richard P. Hughey + Bruce Mewborne Joshua Delahunty Rob Menke + Carl Schelin Keizo Yamamoto Robin Johnson + Chris Russo Ken Arnold Roderick Schertler + David Cohrs Ken Arromdee Roland McGrath + David Damerell Ken Lorber Ron Van Iwaarden + David Gentzel Ken Washikita Ronnen Miller + David Hairston Kevin Darcy Ross Brown + Dean Luick Kevin Hugo Sascha Wostmann + Del Lamb Kevin Sitze Scott Bigham + Derek S. Ray Kevin Smolkowski Scott R. Turner + Deron Meranda Kevin Sweet Sean Hunt + Dion Nicolaas Lars Huttar Stephen Spackman + Dylan O'Donnell Leon Arnott Stephen White + Eric Backus Malcolm Ryan Steve Creps + Eric Hendrickson Mark Gooderum Steve Linhart + Eric R. Smith Mark Modrall Steve VanDevender + Eric S. Raymond Marvin Bressler Teemu Suikki + Erik Andersen Matthew Day Tim Lennan + Frederick Roeber Merlyn LeRoy Timo Hakulinen + Gil Neiger Michael Allison Tom Almy + Greg Laskin Michael Feir Tom West + Greg Olson Michael Hamel Warren Cheung + Gregg Wonderly Michael Sokolov Warwick Allison + Hao-yang Wang Mike Engber Yitzhak Sapir + Helge Hafting Mike Gallop + Irina Rempt-Drijfhout Mike Passaretti diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 82fa2d195..0b2e5cf3b 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -3,10 +3,10 @@ .ds h0 "NetHack Guidebook .ds h1 .ds h2 % -.ds vr "NetHack 3.5 +.ds vr "NetHack 3.6 .ds f0 "\*(vr .ds f1 -.ds f2 "April 7, 2012 +.ds f2 "March 16, 2015 .\" labeled paragraph start (should be part of tmac.n, but I don't want to .\" make changes to that file) .\" .PS word @@ -58,7 +58,7 @@ A Guide to the Mazes of Menace (Guidebook for NetHack) .au Eric S. Raymond -(Extensively edited and expanded for 3.5) +(Edited and expanded for 3.6) .hn 1 Introduction @@ -3205,43 +3205,44 @@ in this, the list of Dungeoneers: center; c c c. .\"TABLE_START -Adam Aronow Izchak Miller Mike Passaretti -Alex Kompel J. Ali Harlow Mike Stephenson -Andreas Dorn Janet Walz Norm Meluch -Andy Church Janne Salmijarvi Olaf Seibert -Andy Swanson Jean-Christophe Collet Pasi Kallinen -Ari Huttunen Jochen Erwied Pat Rankin -Barton House John Kallen Paul Winner -Benson I. Margulies John Rupley Pierre Martineau -Bill Dyer John S. Bien Ralf Brown -Boudewijn Waijers Johnny Lee Ray Chason -Bruce Cox Jon W{tte Richard Addison -Bruce Holloway Jonathan Handler Richard Beigel -Bruce Mewborne Joshua Delahunty Richard P. Hughey -Carl Schelin Keizo Yamamoto Rob Menke -Chris Russo Ken Arnold Robin Johnson -David Cohrs Ken Arromdee Roderick Schertler -David Damerell Ken Lorber Roland McGrath -David Gentzel Ken Washikita Ron Van Iwaarden -David Hairston Kevin Darcy Ronnen Miller -Dean Luick Kevin Hugo Ross Brown -Del Lamb Kevin Sitze Sascha Wostmann -Deron Meranda Kevin Smolkowski Scott Bigham -Dion Nicolaas Kevin Sweet Scott R. Turner -Dylan O'Donnell Lars Huttar Stephen Spackman -Eric Backus Leon Arnott Stephen White -Eric Hendrickson Malcolm Ryan Steve Creps -Eric R. Smith Mark Gooderum Steve Linhart -Eric S. Raymond Mark Modrall Steve VanDevender -Erik Andersen Marvin Bressler Teemu Suikki -Frederick Roeber Matthew Day Tim Lennan -Gil Neiger Merlyn LeRoy Timo Hakulinen -Greg Laskin Michael Allison Tom Almy -Greg Olson Michael Feir Tom West -Gregg Wonderly Michael Hamel Warren Cheung -Hao-yang Wang Michael Sokolov Warwick Allison -Helge Hafting Mike Engber Yitzhak Sapir -Irina Rempt-Drijfhout Mike Gallop +Adam Aronow Izchak Miller Mike Stephenson +Alex Kompel J. Ali Harlow Norm Meluch +Andreas Dorn Janet Walz Olaf Seibert +Andy Church Janne Salmijarvi Pasi Kallinen +Andy Swanson Jean-Christophe Collet Pat Rankin +Ari Huttunen Jochen Erwied Paul Winner +Barton House John Kallen Pierre Martineau +Benson I. Margulies John Rupley Ralf Brown +Bill Dyer John S. Bien Ray Chason +Boudewijn Waijers Johnny Lee Richard Addison +Bruce Cox Jon W{tte Richard Beigel +Bruce Holloway Jonathan Handler Richard P. Hughey +Bruce Mewborne Joshua Delahunty Rob Menke +Carl Schelin Keizo Yamamoto Robin Johnson +Chris Russo Ken Arnold Roderick Schertler +David Cohrs Ken Arromdee Roland McGrath +David Damerell Ken Lorber Ron Van Iwaarden +David Gentzel Ken Washikita Ronnen Miller +David Hairston Kevin Darcy Ross Brown +Dean Luick Kevin Hugo Sascha Wostmann +Del Lamb Kevin Sitze Scott Bigham +Derek S. Ray Kevin Smolkowski Scott R. Turner +Deron Meranda Kevin Sweet Sean Hunt +Dion Nicolaas Lars Huttar Stephen Spackman +Dylan O'Donnell Leon Arnott Stephen White +Eric Backus Malcolm Ryan Steve Creps +Eric Hendrickson Mark Gooderum Steve Linhart +Eric R. Smith Mark Modrall Steve VanDevender +Eric S. Raymond Marvin Bressler Teemu Suikki +Erik Andersen Matthew Day Tim Lennan +Frederick Roeber Merlyn LeRoy Timo Hakulinen +Gil Neiger Michael Allison Tom Almy +Greg Laskin Michael Feir Tom West +Greg Olson Michael Hamel Warren Cheung +Gregg Wonderly Michael Sokolov Warwick Allison +Hao-yang Wang Mike Engber Yitzhak Sapir +Helge Hafting Mike Gallop +Irina Rempt-Drijfhout Mike Passaretti .\"TABLE_END Do not delete this line. .TE diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index d8e361648..c1cf2015e 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -33,7 +33,7 @@ \begin{document} % % input file: guidebook.mn -% $Revision: 1.121 $ $Date: 2012/04/09 02:56:37 $ +% $Revision: 1.122 $ $Date: 2015/03/16 06:00:00 $ % %.ds h0 " %.ds h1 %.ds h2 \% @@ -45,8 +45,8 @@ %.au \author{Eric S. Raymond\\ -(Extensively edited and expanded for 3.5)} -\date{April 7, 2012} +(Edited and expanded for 3.6)} +\date{March 16, 2015} \maketitle @@ -3801,43 +3801,44 @@ in this, the list of Dungeoneers: \begin{center} \begin{tabular}{lll} %TABLE_START -Adam Aronow & Izchak Miller & Mike Passaretti\\ -Alex Kompel & J. Ali Harlow & Mike Stephenson\\ -Andreas Dorn & Janet Walz & Norm Meluch\\ -Andy Church & Janne Salmij\"{a}rvi & Olaf Seibert\\ -Andy Swanson & Jean-Christophe Collet & Pasi Kallinen\\ -Ari Huttunen & Jochen Erwied & Pat Rankin\\ -Barton House & John Kallen & Paul Winner\\ -Benson I. Margulies & John Rupley & Pierre Martineau\\ -Bill Dyer & John S. Bien & Ralf Brown\\ -Boudewijn Waijers & Johnny Lee & Ray Chason\\ -Bruce Cox & Jon W\{tte & Richard Addison\\ -Bruce Holloway & Jonathan Handler & Richard Beigel\\ -Bruce Mewborne & Joshua Delahunty & Richard P. Hughey\\ -Carl Schelin & Keizo Yamamoto & Rob Menke\\ -Chris Russo & Ken Arnold & Robin Johnson\\ -David Cohrs & Ken Arromdee & Roderick Schertler\\ -David Damerell & Ken Lorber & Roland McGrath\\ -David Gentzel & Ken Washikita & Ron Van Iwaarden\\ -David Hairston & Kevin Darcy & Ronnen Miller\\ -Dean Luick & Kevin Hugo & Ross Brown\\ -Del Lamb & Kevin Sitze & Sascha Wostmann\\ -Deron Meranda & Kevin Smolkowski & Scott Bigham\\ -Dion Nicolaas & Kevin Sweet & Scott R. Turner\\ -Dylan O'Donnell & Lars Huttar & Stephen Spackman\\ -Eric Backus & Leon Arnott & Stephen White\\ -Eric Hendrickson & Malcolm Ryan & Steve Creps\\ -Eric R. Smith & Mark Gooderum & Steve Linhart\\ -Eric S. Raymond & Mark Modrall & Steve VanDevender\\ -Erik Andersen & Marvin Bressler & Teemu Suikki\\ -Frederick Roeber & Matthew Day & Tim Lennan\\ -Gil Neiger & Merlyn LeRoy & Timo Hakulinen\\ -Greg Laskin & Michael Allison & Tom Almy\\ -Greg Olson & Michael Feir & Tom West\\ -Gregg Wonderly & Michael Hamel & Warren Cheung\\ -Hao-yang Wang & Michael Sokolov & Warwick Allison\\ -Helge Hafting & Mike Engber & Yitzhak Sapir\\ -Irina Rempt-Drijfhout & Mike Gallop +Adam Aronow & Izchak Miller & Mike Stephenson\\ +Alex Kompel & J. Ali Harlow & Norm Meluch\\ +Andreas Dorn & Janet Walz & Olaf Seibert\\ +Andy Church & Janne Salmij\"{a}rvi & Pasi Kallinen\\ +Andy Swanson & Jean-Christophe Collet & Pat Rankin\\ +Ari Huttunen & Jochen Erwied & Paul Winner\\ +Barton House & John Kallen & Pierre Martineau\\ +Benson I. Margulies & John Rupley & Ralf Brown\\ +Bill Dyer & John S. Bien & Ray Chason\\ +Boudewijn Waijers & Johnny Lee & Richard Addison\\ +Bruce Cox & Jon W\{tte & Richard Beigel\\ +Bruce Holloway & Jonathan Handler & Richard P. Hughey\\ +Bruce Mewborne & Joshua Delahunty & Rob Menke\\ +Carl Schelin & Keizo Yamamoto & Robin Johnson\\ +Chris Russo & Ken Arnold & Roderick Schertler\\ +David Cohrs & Ken Arromdee & Roland McGrath\\ +David Damerell & Ken Lorber & Ron Van Iwaarden\\ +David Gentzel & Ken Washikita & Ronnen Miller\\ +David Hairston & Kevin Darcy & Ross Brown\\ +Dean Luick & Kevin Hugo & Sascha Wostmann\\ +Del Lamb & Kevin Sitze & Scott Bigham\\ +Derek S. Ray & Kevin Smolkowski & Scott R. Turner\\ +Deron Meranda & Kevin Sweet & Sean Hunt\\ +Dion Nicolaas & Lars Huttar & Stephen Spackman\\ +Dylan O'Donnell & Leon Arnott & Stephen White\\ +Eric Backus & Malcolm Ryan & Steve Creps\\ +Eric Hendrickson & Mark Gooderum & Steve Linhart\\ +Eric R. Smith & Mark Modrall & Steve VanDevender\\ +Eric S. Raymond & Marvin Bressler & Teemu Suikki\\ +Erik Andersen & Matthew Day & Tim Lennan\\ +Frederick Roeber & Merlyn LeRoy & Timo Hakulinen\\ +Gil Neiger & Michael Allison & Tom Almy\\ +Greg Laskin & Michael Feir & Tom West\\ +Greg Olson & Michael Hamel & Warren Cheung\\ +Gregg Wonderly & Michael Sokolov & Warwick Allison\\ +Hao-yang Wang & Mike Engber & Yitzhak Sapir\\ +Helge Hafting & Mike Gallop\\ +Irina Rempt-Drijfhout & Mike Passaretti %TABLE_END Do not delete this line. \end{tabular} \end{center} From 4914e256bf342f3e886e84562670c5583c84649a Mon Sep 17 00:00:00 2001 From: "Derek S. Ray" Date: Mon, 16 Mar 2015 17:26:31 -0400 Subject: [PATCH 112/132] finally remember to add the 'nh-' versions --- DEVEL/git_recipes.txt | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/DEVEL/git_recipes.txt b/DEVEL/git_recipes.txt index 71ce0e5dc..88af7f927 100644 --- a/DEVEL/git_recipes.txt +++ b/DEVEL/git_recipes.txt @@ -34,12 +34,17 @@ you specify: [*] git add (filename) +[*] git nhadd (filename) Adds the changes you've made in (filename) to the pre-commit staging area. (also referred to as the 'index') +"nhadd" is the preferred syntax and will automatically update the source file +headers with the latest date, branch, and version. + [*] git commit [-a] [-m "text"] +[*] git nhcommit [-a] [-m "text"] Commits all staged changes (in the index) to this branch in your local repo from your current position. @@ -47,6 +52,9 @@ Including -a will 'git add' all eligible files before doing so. Including -m will use "text" as the commit message instead of opening an editor window for you to create one. +"nhcommit" is the preferred syntax and will automatically update the source file +headers with the latest date, branch, and version. + [*] git push [--all] [-u origin (branch)] @@ -61,7 +69,7 @@ branch. Without any parameters, unstages the changes for (filename) from the index; does not change the working tree. This is the equivalent of the command -[*] git reset --mixed (filename); git reset --soft (filename) has no effect. +git reset --mixed (filename); git reset --soft (filename) has no effect. With --hard, unstages (filename) from the index and reverts (filename) in the working tree to the most recent commit. @@ -160,6 +168,20 @@ you must commit them manually later (likely after you have edited them). This more accurately mimics the merge behavior of svn [and cvs?] +[*] git stash [save | apply | list] + +save: Takes all changes in your working directory and 'stashes' them in a temporary +holding area. Convenient if the command you're trying to run won't go unless +you have a clean working dir; also convenient to move experimental changes +between branches without needing to commit them. + +apply: Replays the named stash onto your current working directory as though +it were a patch. Does not delete the stash from the list. + +list: Lists all of your stashed code blobs. + + + ======================================= Typical workflows for common activities ======================================= From 562fa952ce95695272467ef8f00277735ba93820 Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 16 Mar 2015 15:28:01 -0700 Subject: [PATCH 113/132] allow DEBUGFILES to be overridden via getenv() If getenv("DEBUGFILES") yields a value then it takes precedence over sysconf.DEBUGFILES or sys.c's #define DEBUGFILES. (It probably should only be controlled via environment since it is not a system-wide attribute, but I haven't taken out the SYSCF handling for it.) --- include/sys.h | 7 ++++++- src/files.c | 21 +++++++++++++++++++-- src/sys.c | 5 ++++- 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/include/sys.h b/include/sys.h index 940e95a11..b97f7ca80 100644 --- a/include/sys.h +++ b/include/sys.h @@ -1,4 +1,4 @@ -/* NetHack 3.5 sys.h $NHDT-Date: 1426496454 2015/03/16 09:00:54 $ $NHDT-Branch: master $:$NHDT-Revision: 1.12 $ */ +/* NetHack 3.5 sys.h $NHDT-Date: 1426544796 2015/03/16 22:26:36 $ $NHDT-Branch: master $:$NHDT-Revision: 1.13 $ */ /* NetHack 3.5 sys.h $Date: 2012/01/27 20:15:26 $ $Revision: 1.9 $ */ /* Copyright (c) Kenneth Lorber, Kensington, Maryland, 2008. */ /* NetHack may be freely redistributed. See license for details. */ @@ -12,6 +12,11 @@ struct sysopt { char *wizards; char *shellers; /* like wizards, for ! command (-DSHELL) */ char *debugfiles; /* files to show debugplines in. '*' is all. */ + int env_dbgfl; /* 1: debugfiles comes from getenv("DEBUGFILES") + * so sysconf's DEBUGFILES shouldn't override it; + * 0: getenv() hasn't been attempted yet; + * -1: getenv() didn't find a value for DEBUGFILES. + */ int maxplayers; /* record file */ int persmax; diff --git a/src/files.c b/src/files.c index 9e9cea746..a6f17b906 100644 --- a/src/files.c +++ b/src/files.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 files.c $NHDT-Date: 1426465435 2015/03/16 00:23:55 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.133 $ */ +/* NetHack 3.5 files.c $NHDT-Date: 1426544796 2015/03/16 22:26:36 $ $NHDT-Branch: master $:$NHDT-Revision: 1.134 $ */ /* NetHack 3.5 files.c $Date: 2012/03/10 02:49:08 $ $Revision: 1.124 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2157,7 +2157,11 @@ int src; sysopt.shellers = dupstr(bufp); } else if (src == SET_IN_SYS && match_varname(buf, "DEBUGFILES", 5)) { if (sysopt.debugfiles) free(sysopt.debugfiles); - sysopt.debugfiles = dupstr(bufp); + /* if showdebug() has already been called (perhaps we've added + some debugpline() calls to option processing) and has found + a value for getenv("DEBUGFILES"), don't override that */ + if (sysopt.env_dbgfl == 0) + sysopt.debugfiles = dupstr(bufp); } else if (src == SET_IN_SYS && match_varname(buf, "SUPPORT", 7)) { if (sysopt.support) free(sysopt.support); sysopt.support = dupstr(bufp); @@ -3207,6 +3211,19 @@ const char *filename; if (!filename || !*filename) return FALSE; /* sanity precaution */ + if (sysopt.env_dbgfl == 0) { + /* check once for DEBUGFILES in the environment; + if found, it supersedes the sysconf value + [note: getenv() rather than nh_getenv() since a long value + is valid and doesn't pose any sort of overflow risk here] */ + if ((p = getenv("DEBUGFILES")) != 0) { + if (sysopt.debugfiles) free(sysopt.debugfiles); + sysopt.debugfiles = dupstr(p); + sysopt.env_dbgfl = 1; + } else + sysopt.env_dbgfl = -1; + } + debugfiles = sysopt.debugfiles; /* usual case: sysopt.debugfiles will be empty */ if (!debugfiles || !*debugfiles) return FALSE; diff --git a/src/sys.c b/src/sys.c index 52489135e..35e46b7c8 100644 --- a/src/sys.c +++ b/src/sys.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 sys.c $NHDT-Date: 1426496455 2015/03/16 09:00:55 $ $NHDT-Branch: master $:$NHDT-Revision: 1.17 $ */ +/* NetHack 3.5 sys.c $NHDT-Date: 1426544797 2015/03/16 22:26:37 $ $NHDT-Branch: master $:$NHDT-Revision: 1.18 $ */ /* NetHack 3.5 sys.c $Date: 2012/03/10 02:22:07 $ $Revision: 1.12 $ */ /* Copyright (c) Kenneth Lorber, Kensington, Maryland, 2008. */ /* NetHack may be freely redistributed. See license for details. */ @@ -10,6 +10,8 @@ to enable debugging feedback for source files foo.c and bar.c; to activate debugpline(), set an appropriate value and uncomment */ /* # define DEBUGFILES "*" */ +/* note: DEBUGFILES value here or in sysconf.DEBUGFILES can be overridden + at runtime by setting up a value for "DEBUGFILES" in the environment */ #endif struct sysopt sysopt; @@ -29,6 +31,7 @@ sys_early_init() #else sysopt.debugfiles = dupstr(DEBUGFILES); #endif + sysopt.env_dbgfl = 0; /* haven't checked getenv("DEBUGFILES") yet */ sysopt.shellers = NULL; sysopt.maxplayers = 0; /* XXX eventually replace MAX_NR_OF_PLAYERS */ From ad03a7fb7a40ac908a03cc8ba16d14138d13c2ba Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 16 Mar 2015 19:22:49 -0700 Subject: [PATCH 114/132] some lint cleanup --- src/do_name.c | 15 ++++++++------- src/pickup.c | 8 ++++---- src/role.c | 20 +++++++++++--------- src/trap.c | 10 ++-------- 4 files changed, 25 insertions(+), 28 deletions(-) diff --git a/src/do_name.c b/src/do_name.c index f1960b6ff..37daffbc4 100644 --- a/src/do_name.c +++ b/src/do_name.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 do_name.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 do_name.c $NHDT-Date: 1426558927 2015/03/17 02:22:07 $ $NHDT-Branch: master $:$NHDT-Revision: 1.53 $ */ /* NetHack 3.5 do_name.c $Date: 2012/01/29 03:00:17 $ $Revision: 1.49 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -56,8 +56,8 @@ const char *goal; } int -getpos(cc, force, goal) -coord *cc; +getpos(ccp, force, goal) +coord *ccp; boolean force; const char *goal; { @@ -75,8 +75,8 @@ const char *goal; pline("(For instructions type a ?)"); msg_given = TRUE; } - cx = cc->x; - cy = cc->y; + cx = ccp->x; + cy = ccp->y; #ifdef CLIPPING cliparound(cx, cy); #endif @@ -97,6 +97,7 @@ const char *goal; int sym = 0; char tmpbuf[BUFSZ]; const char *firstmatch = NULL; + cc.x = cx; cc.y = cy; if (do_screen_description(cc, TRUE, sym, tmpbuf, &firstmatch)) { @@ -250,8 +251,8 @@ const char *goal; lock_mouse_cursor(FALSE); #endif if (msg_given) clear_nhwindow(WIN_MESSAGE); - cc->x = cx; - cc->y = cy; + ccp->x = cx; + ccp->y = cy; return result; } diff --git a/src/pickup.c b/src/pickup.c index 7b3096c59..3eba9874f 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 pickup.c $NHDT-Date: 1426465438 2015/03/16 00:23:58 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.130 $ */ +/* NetHack 3.5 pickup.c $NHDT-Date: 1426558927 2015/03/17 02:22:07 $ $NHDT-Branch: master $:$NHDT-Revision: 1.131 $ */ /* NetHack 3.5 pickup.c $Date: 2012/02/16 03:01:38 $ $Revision: 1.123 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1515,7 +1515,7 @@ doloot() /* loot a container on the floor or loot saddle from mon. */ lootcont: if (container_at(cc.x, cc.y, FALSE)) { - boolean any = FALSE; + boolean anyfound = FALSE; int num_conts = 0; if (!able_to_loot(cc.x, cc.y, TRUE)) return 0; @@ -1563,14 +1563,14 @@ lootcont: cobj, doname, ansimpleoname, "a container")); if (c == 'q') return (timepassed); if (c == 'n') continue; - any = TRUE; + anyfound = TRUE; timepassed |= do_loot_cont(&cobj); /* might have triggered chest trap or magic bag explosion */ if (multi < 0 || !cobj) return 1; } } - if (any) c = 'y'; + if (anyfound) c = 'y'; } } else if (IS_GRAVE(levl[cc.x][cc.y].typ)) { You("need to dig up the grave to effectively loot it..."); diff --git a/src/role.c b/src/role.c index 9e09d448a..bf4d66de7 100644 --- a/src/role.c +++ b/src/role.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 role.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 role.c $NHDT-Date: 1426558928 2015/03/17 02:22:08 $ $NHDT-Branch: master $:$NHDT-Revision: 1.21 $ */ /* NetHack 3.5 role.c $Date: 2012/02/16 03:01:38 $ $Revision: 1.18 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985-1999. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1333,14 +1333,16 @@ plnamesuffix() int i; #ifdef GENERIC_USERNAMES - /* some generic user names will be ignored in favor of prompting */ - i = (int)strlen(plname); - eptr = GENERIC_USERNAMES; - sptr = strstri(eptr, plname); - if (sptr - && (sptr == eptr || sptr[-1] == ' ') - && (sptr[i] == ' ' || sptr[i] == '\0')) - *plname = '\0'; /* call askname() */ + { + /* some generic user names will be ignored in favor of prompting */ + const char *uptr = GENERIC_USERNAMES; + + i = (int)strlen(plname); + if ((sptr = strstri(uptr, plname)) != 0 + && (sptr == uptr || sptr[-1] == ' ') + && (sptr[i] == ' ' || sptr[i] == '\0')) + *plname = '\0'; /* call askname() */ + } #endif do { diff --git a/src/trap.c b/src/trap.c index 911aafdc5..36c1ee632 100644 --- a/src/trap.c +++ b/src/trap.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 trap.c $NHDT-Date: 1425318721 2015/03/02 17:52:01 $ $NHDT-Branch: master $:$NHDT-Revision: 1.194 $ */ +/* NetHack 3.5 trap.c $NHDT-Date: 1426558928 2015/03/17 02:22:08 $ $NHDT-Branch: master $:$NHDT-Revision: 1.195 $ */ /* NetHack 3.5 trap.c $Date: 2013/03/14 01:58:21 $ $Revision: 1.179 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -3016,7 +3016,6 @@ xchar x, y; { int chance; struct obj *otmp, *ncobj; - int retval = 0; int in_sight = !Blind && couldsee(x, y); /* Don't care if it's lit */ int dindx; @@ -3158,7 +3157,7 @@ struct obj *obj; const char *ostr; boolean force; { - boolean loose_obj = (obj && obj->where == OBJ_FREE), exploded = FALSE; + boolean exploded = FALSE; if (snuff_lit(obj)) return ER_DAMAGED; @@ -3214,11 +3213,6 @@ boolean force; (one ? "Another" : "More"), bufp, vtense(bufp, "explode")); exploded = TRUE; - /* let caller know that obj has gone away - [when obj is part of a list, delobj()'s - obj_extract_self() takes care of this; - for loose_obj, obj should always equal - *objp and otmp should always be null] */ setnotworn(obj); delobj(obj); if (update) From 379c23096afdcf0bbe504604539b27004785f385 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Tue, 17 Mar 2015 21:22:43 +0200 Subject: [PATCH 115/132] More getpos improvements Look up remembered dungeon features, not user-visible glyphs, and ignore uninteresting features (room, corridor and wall tiles). Original patch by Patric Mueller, from UnNetHack --- doc/fixes35.0 | 1 + src/do_name.c | 20 ++++++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 250b09d85..53a9d784e 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -1089,6 +1089,7 @@ change command X to twoweapon toggle pressing @ when cursor positioning moves cursor on top of hero pressing # when cursor positioning toggles automatic description of features under the cursor +cursor positioning ignores uninteresting dungeon features Platform- and/or Interface-Specific New Features diff --git a/src/do_name.c b/src/do_name.c index 37daffbc4..47012d3f3 100644 --- a/src/do_name.c +++ b/src/do_name.c @@ -204,9 +204,25 @@ const char *goal; lo_x = (pass == 0 && ty == lo_y) ? cx + 1 : 1; hi_x = (pass == 1 && ty == hi_y) ? cx : COLNO - 1; for (tx = lo_x; tx <= hi_x; tx++) { - k = levl[tx][ty].glyph; + /* look at dungeon feature, not at user-visible glyph */ + k = back_to_glyph(tx,ty); + /* uninteresting background glyph */ if (glyph_is_cmap(k) && - matching[glyph_to_cmap(k)]) { + (IS_DOOR(levl[tx][ty].typ) || + glyph_to_cmap(k) == S_room || + glyph_to_cmap(k) == S_corr || + glyph_to_cmap(k) == S_litcorr)) { + /* what the hero remembers to be at tx,ty */ + k = glyph_at(tx, ty); + } + if (glyph_is_cmap(k) && + matching[glyph_to_cmap(k)] && + levl[tx][ty].seenv && + (!IS_WALL(levl[tx][ty].typ)) && + (levl[tx][ty].typ != SDOOR) && + glyph_to_cmap(k) != S_room && + glyph_to_cmap(k) != S_corr && + glyph_to_cmap(k) != S_litcorr) { cx = tx, cy = ty; if (msg_given) { clear_nhwindow(WIN_MESSAGE); From c80828fe7aff35131cb4b36267858718662126c0 Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 17 Mar 2015 22:40:57 -0400 Subject: [PATCH 116/132] Start to prepare dat/history for release This gets the history started. Please review/correct/improve and fill in the various items I've flagged. --- dat/history | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 64 insertions(+), 3 deletions(-) diff --git a/dat/history b/dat/history index b97c99039..0e15a079c 100644 --- a/dat/history +++ b/dat/history @@ -1,4 +1,4 @@ -NetHack History file for release 3.4 +NetHack History file for release 3.6 Behold, mortal, the origins of NetHack... @@ -120,7 +120,6 @@ publicly available web-site listing all the bugs that had been discovered. Despite that constantly growing bug list, 3.3 proved stable enough to last for more than a year and a half. - The 3.4 development team initially consisted of Michael Allison, Ken Arromdee, David Cohrs, Jessie Collet, Kevin Hugo, Ken Lorber, Dean Luick, Pat Rankin, Mike Stephenson, Janet Walz, and Paul Winner, with Warwick Allison joining @@ -150,7 +149,69 @@ Amiga port of 3.5 after Janne Salmijarvi resurrected it for 3.3.1. Christian `Marvin' Bressler maintained 3.5 for the Atari after he resurrected it for 3.3.1. -There is a NetHack web site maintained by Ken Lorber at http://www.nethack.org/. +The release of NetHack 3.4.3 in December 2003 marked the beginning of a +long release hiatus. 3.4.3 proved to be a remarkably stable version that +provided continued enjoyment by the community for more than a decade. The +devteam slowly and quietly continued to work on the game behind the scenes +during the tenure of 3.4.3. It was during that same period that several new +variants emerged within the NetHack community. Notably sporkhack by +Derek S. Ray, unnethack by Patric Mueller, nitrohack and its successors +originally by Daniel Thaler and then by Alex Smith, and +Dynahack by Tung Nguyen. Some of those variants continue to be developed, +maintained, and enjoyed by the community to this day. + +In September 2014, an interim snapshot of the code under development was +released publicly by other parties. Since that code was a work-in-progress +and had not gone through a period of debugging, it was decided that the +version numbers present on that code snapshot would be retired and never +used in an official NetHack release. An announcement was posted on the +devteam's official nethack.org website to that effect, stating that there +would never be a 3.4.4, 3.5, or 3.5.0 official release version. + +In January 2015, preparation began for the release of NetHack 3.6. + +At the beginning of development for what would eventually get released +as 3.6.0, the development team consisted of Michael Allison, +Warwick Allison, Ken Arromdee, David Cohrs, Jessie Collet, Ken Lorber, +Dean Luick, Pat Rankin, Mike Stephenson, Janet Walz, and Paul Winner. + +Leading up to the release of 3.6.0 in early 2015, new members Sean Hunt, +Pasi Kallinen, and Derek S. Ray joined the NetHack development team. + +3.6.0 - insert apprpriate description of 3.6.0 here + +The development team, as well as Steve VanDevender and Kevin Smolkowski +ensured that NetHack 3.6.0 continued to operate on various Unix flavors +as well as maintaining the X11 interface. + +Ken Lorber, Haoyang Wang, Pat Rankin, and Dean Luick maintained the port +of NetHack 3.6.0 for Mac. + +Michael Allison, Derek S. Ray, Yitzhak Sapir, Alex Kompel, and David Cohrs +maintained the port of NetHack 3.6.0 for Microsoft Windows. + +Jeff Bailey created and maintained a port of NetHack 3.6.0 for Chrome. + +Alex Kompel maintained a port of NetHack 3.6.0 to Windows Phone. ? + +This version of the game is special in a particular way. Near the end of +the development of 3.6, one of the significant inspirations for many of the +humorous and fun features found in the game, author Terry Pratchett, +passed away. This version of the game is dedicated to + + +An official NetHack web site continues to be maintained by Ken Lorber at +http://www.nethack.org/. + +-- +SHOUT-OUTS + +The devteam would like to give a special "shout-out" to thank the generous +people primarily responsible for the public NetHack servers available for +playing the game at nethack.alt.org and devnull.net. In addition to providing +a way for the public to play a game of NetHack from almost anywhere, they +have hosted annual NetHack tournaments for many, many years. + write up something for Robin, M. Drew Streib, Pasi Kallinen - - - - - - - - - - From e93add8cb8e0ed782ec6da0beebf4d18d5c6f59a Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Wed, 18 Mar 2015 21:40:54 +0200 Subject: [PATCH 117/132] Prevent segfault, water_damage may get a NULL obj --- src/trap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/trap.c b/src/trap.c index 36c1ee632..bc8f0c746 100644 --- a/src/trap.c +++ b/src/trap.c @@ -3159,6 +3159,8 @@ boolean force; { boolean exploded = FALSE; + if (!obj) return ER_NOTHING; + if (snuff_lit(obj)) return ER_DAMAGED; From debdf7ca48fc7b9c8b7b3698147d05312a605092 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Wed, 18 Mar 2015 22:05:10 +0200 Subject: [PATCH 118/132] Move some hard-coded string arrays into data files. Random epitaphs, engravings and hallucinatory monsters now live in text data files. --- dat/bogusmon.txt | 177 ++++++++++++++++++++++++++++++++++++++++++ dat/engrave.txt | 45 +++++++++++ dat/epitaph.txt | 32 ++++++++ doc/makedefs.6 | 9 +++ include/extern.h | 5 +- include/global.h | 3 + src/do_name.c | 115 ++++++--------------------- src/eat.c | 2 +- src/engrave.c | 73 +++-------------- src/explode.c | 4 +- src/fountain.c | 2 +- src/muse.c | 2 +- src/pickup.c | 2 +- src/potion.c | 2 +- src/priest.c | 5 +- src/rumors.c | 40 ++++++++++ src/sounds.c | 2 +- src/timeout.c | 2 +- src/trap.c | 2 +- src/zap.c | 2 +- sys/unix/Makefile.dat | 11 ++- sys/unix/Makefile.top | 11 ++- util/makedefs.c | 46 ++++++++++- 23 files changed, 420 insertions(+), 174 deletions(-) create mode 100644 dat/bogusmon.txt create mode 100644 dat/engrave.txt create mode 100644 dat/epitaph.txt diff --git a/dat/bogusmon.txt b/dat/bogusmon.txt new file mode 100644 index 000000000..8c7aba45b --- /dev/null +++ b/dat/bogusmon.txt @@ -0,0 +1,177 @@ +# Hallucinatory monsters +# +# +# prefix codes: +# dash - female, personal name +# underscore _ female, general name +# plus + male, personal name +# vertical bar | male, general name +# equals = gender not specified, personal name + +# misc. +jumbo shrimp +giant pigmy +gnu +killer penguin +giant cockroach +giant slug +maggot +pterodactyl +tyrannosaurus rex +basilisk +beholder +nightmare +efreeti +marid +rot grub +bookworm +master lichen +shadow +hologram +jester +attorney +sleazoid +killer tomato +amazon +robot +battlemech +rhinovirus +harpy +lion-dog +rat-ant +Y2K bug + +# Quendor (Zork, &c.) +grue +Christmas-tree monster +luck sucker +paskald +brogmoid +dornbeast + +# Moria +Ancient Multi-Hued Dragon ++Evil Iggy + +# Rogue +emu +kestrel +xeroc +venus flytrap + +# Wizardry +creeping coins + +# Greek legend +hydra +siren + +# Monty Python +killer bunny + +# The Princess Bride +rodent of unusual size + +# Wallace & Gromit +were-rabbit + +# "Only you can prevent forest fires! ++Smokey Bear + +# Discworld +Luggage + +# Lord of the Rings +Ent + +# Xanth +tangle tree +nickelpede +wiggle + +# Lewis Carroll +white rabbit +snark + +# Dr. Dolittle +pushmi-pullyu + +# The Smurfs +smurf + +# Star Trek +tribble +Klingon +Borg + +# Star Wars +Ewok + +# Tonari no Totoro +Totoro + +# Nausicaa +ohmu + +# Sailor Moon +youma + +# Pokemon (Meowth) +nyaasu + +# monster movies +-Godzilla ++King Kong + +# old L of SH +earthquake beast + +# Robotech +Invid + +# The Terminator +Terminator + +# Bubblegum Crisis +boomer + +# Dr. Who ("Exterminate!") +Dalek + +# HGttG +microscopic space fleet +Ravenous Bugblatter Beast of Traal + +# TMNT +teenage mutant ninja turtle + +# Usagi Yojimbo +samurai rabbit + +# Cerebus +aardvark + +# Little Shop of Horrors +=Audrey II + +# 50's rock 'n' roll +witch doctor +one-eyed one-horned flying purple people eater + +# saccharine kiddy TV ++Barney the dinosaur + +# Angband ++Morgoth + +# Babylon 5 +Vorlon + +# King Arthur +questing beast + +# Movie +Predator + +# common pest +mother-in-law diff --git a/dat/engrave.txt b/dat/engrave.txt new file mode 100644 index 000000000..6827c8a9a --- /dev/null +++ b/dat/engrave.txt @@ -0,0 +1,45 @@ +# Random engravings on the floor +# +Elbereth +# trap engravings +Vlad was here +ad aerarium + +# take-offs and other famous engravings +Owlbreath +Galadriel +Kilroy was here + +# Journey to the Center of the Earth +A.S. -> +<- A.S. +# Adventure +You won't get it up the steps +# Inferno +Lasciate ogni speranza o voi ch'entrate. +# Prisoner +Well Come +# So Long... +We apologize for the inconvenience. +# Thriller +See you next Wednesday +# Smokey Stover +notary sojak + +For a good time call 8?7-5309 +# Various zoos around the world +Please don't feed the animals. +# A palindrome +Madam, in Eden, I'm Adam. +# Siskel & Ebert +Two thumbs up! +# The First C Program +Hello, World! +^?MAIL +# AOL +You've got mail! +^. +# Clueless +As if! +# 200x incarnation of Dr.Who +BAD WOLF diff --git a/dat/epitaph.txt b/dat/epitaph.txt new file mode 100644 index 000000000..79019ea45 --- /dev/null +++ b/dat/epitaph.txt @@ -0,0 +1,32 @@ +# Epitaphs for random headstones +# +# +Rest in peace +R.I.P. +Rest In Pieces +Note -- there are NO valuable items in this grave +1994-1995. The Longest-Lived Hacker Ever +The Grave of the Unknown Hacker +We weren't sure who this was, but we buried him here anyway +Sparky -- he was a very good dog +Beware of Electric Third Rail +Made in Taiwan +Og friend. Og good dude. Og died. Og now food +Beetlejuice Beetlejuice Beetlejuice +Look out below! +Please don't dig me up. I'm perfectly happy down here. -- Resident +Postman, please note forwarding address: Gehennom, Asmodeus's Fortress, fifth lemure on the left +Mary had a little lamb/Its fleece was white as snow/When Mary was in trouble/The lamb was first to go +Be careful, or this could happen to you! +Soon you'll join this fellow in hell! -- the Wizard of Yendor +Caution! This grave contains toxic waste +Sum quod eris +Here lies an Atheist, all dressed up and no place to go +Here lies Ezekiel, age 102. The good die young. +Here lies my wife: Here let her lie! Now she's at rest and so am I. +Here lies Johnny Yeast. Pardon me for not rising. +He always lied while on the earth and now he's lying in it +I made an ash of myself +Soon ripe. Soon rotten. Soon gone. But not forgotten. +Here lies the body of Jonathan Blake. Stepped on the gas instead of the brake. +Go away! diff --git a/doc/makedefs.6 b/doc/makedefs.6 index 7b850108c..61bd7c741 100644 --- a/doc/makedefs.6 +++ b/doc/makedefs.6 @@ -105,6 +105,15 @@ Generate the file. .br .TP +.B -s +Generate the +.I bogusmon +, +.I engrave +and +.IR epitaph files. +.br +.TP .B -h Generate the .B oracles diff --git a/include/extern.h b/include/extern.h index fc3952804..23d10d324 100644 --- a/include/extern.h +++ b/include/extern.h @@ -387,7 +387,7 @@ E char *FDECL(Adjmonnam, (struct monst *,const char *)); E char *FDECL(Amonnam, (struct monst *)); E char *FDECL(a_monnam, (struct monst *)); E char *FDECL(distant_monnam, (struct monst *,int,char *)); -E const char *NDECL(rndmonnam); +E char *FDECL(rndmonnam, (char *)); E const char *FDECL(hcolor, (const char *)); E const char *NDECL(rndcolor); E const char *NDECL(roguename); @@ -1174,7 +1174,7 @@ E struct obj *FDECL(mkobj_at, (CHAR_P,int,int,BOOLEAN_P)); E struct obj *FDECL(mksobj_at, (int,int,int,BOOLEAN_P,BOOLEAN_P)); E struct obj *FDECL(mkobj, (CHAR_P,BOOLEAN_P)); E int NDECL(rndmonnum); -E boolean FDECL(bogon_is_pname, (const char *)); +E boolean FDECL(bogon_is_pname, (CHAR_P)); E struct obj *FDECL(splitobj, (struct obj *,long)); E void FDECL(replace_object, (struct obj *,struct obj *)); E void FDECL(bill_dummy_object, (struct obj *)); @@ -1931,6 +1931,7 @@ E const char *NDECL(Goodbye); /* ### rumors.c ### */ E char *FDECL(getrumor, (int,char *, BOOLEAN_P)); +E char *FDECL(get_rnd_text, (const char *, char *)); E void FDECL(outrumor, (int,int)); E void FDECL(outoracle, (BOOLEAN_P, BOOLEAN_P)); E void FDECL(save_oracles, (int,int)); diff --git a/include/global.h b/include/global.h index 6179409bb..a67066d64 100644 --- a/include/global.h +++ b/include/global.h @@ -30,6 +30,9 @@ #define OPTIONFILE "opthelp" /* file explaining runtime options */ #define OPTIONS_USED "options" /* compile-time options, for #version */ #define SYMBOLS "symbols" /* replacement symbol sets */ +#define EPITAPHFILE "epitaph" /* random epitaphs on graves */ +#define ENGRAVEFILE "engrave" /* random engravings on the floor */ +#define BOGUSMONFILE "bogusmon" /* hallucinatory monsters */ #define LEV_EXT ".lev" /* extension for special level files */ diff --git a/src/do_name.c b/src/do_name.c index 47012d3f3..0f837c9d4 100644 --- a/src/do_name.c +++ b/src/do_name.c @@ -809,10 +809,10 @@ boolean called; /* Put the actual monster name or type into the buffer now */ /* Be sure to remember whether the buffer starts with a name */ if (do_hallu) { - const char *rname = rndmonnam(); - + char rnamecode; + char *rname = rndmonnam(&rnamecode); Strcat(buf, rname); - name_at_start = bogon_is_pname(rname); + name_at_start = bogon_is_pname(rnamecode); } else if (has_mname(mtmp)) { char *name = MNAME(mtmp); @@ -1006,113 +1006,44 @@ char *outbuf; return outbuf; } -/* - * Name prefix codes (same as shknam.c): - * dash - female, personal name - * underscore _ female, general name - * plus + male, personal name - * vertical bar | male, general name - * equals = gender not specified, personal name - */ - -static const char * const bogusmons[] = { - "jumbo shrimp", "giant pigmy", "gnu", "killer penguin", - "giant cockroach", "giant slug", "maggot", "pterodactyl", - "tyrannosaurus rex", "basilisk", "beholder", "nightmare", - "efreeti", "marid", "rot grub", "bookworm", "master lichen", - "shadow", "hologram", "jester", "attorney", "sleazoid", - "killer tomato", "amazon", "robot", "battlemech", - "rhinovirus", "harpy", "lion-dog", "rat-ant", "Y2K bug", - /* misc. */ - "grue", "Christmas-tree monster", "luck sucker", "paskald", - "brogmoid", "dornbeast", /* Quendor (Zork, &c.) */ - "Ancient Multi-Hued Dragon", "+Evil Iggy", - /* Moria */ - "emu", "kestrel", "xeroc", "venus flytrap", - /* Rogue */ - "creeping coins", /* Wizardry */ - "hydra", "siren", /* Greek legend */ - "killer bunny", /* Monty Python */ - "rodent of unusual size", /* The Princess Bride */ - "were-rabbit", /* Wallace & Gromit */ - "+Smokey Bear", /* "Only you can prevent forest fires!" */ - "Luggage", /* Discworld */ - "Ent", /* Lord of the Rings */ - "tangle tree", "nickelpede", "wiggle", /* Xanth */ - "white rabbit", "snark", /* Lewis Carroll */ - "pushmi-pullyu", /* Dr. Dolittle */ - "smurf", /* The Smurfs */ - "tribble", "Klingon", "Borg", /* Star Trek */ - "Ewok", /* Star Wars */ - "Totoro", /* Tonari no Totoro */ - "ohmu", /* Nausicaa */ - "youma", /* Sailor Moon */ - "nyaasu", /* Pokemon (Meowth) */ - "-Godzilla", "+King Kong", /* monster movies */ - "earthquake beast", /* old L of SH */ - "Invid", /* Robotech */ - "Terminator", /* The Terminator */ - "boomer", /* Bubblegum Crisis */ - "Dalek", /* Dr. Who ("Exterminate!") */ - "microscopic space fleet", "Ravenous Bugblatter Beast of Traal", - /* HGttG */ - "teenage mutant ninja turtle", /* TMNT */ - "samurai rabbit", /* Usagi Yojimbo */ - "aardvark", /* Cerebus */ - "=Audrey II", /* Little Shop of Horrors */ - "witch doctor", "one-eyed one-horned flying purple people eater", - /* 50's rock 'n' roll */ - "+Barney the dinosaur", /* saccharine kiddy TV */ - "+Morgoth", /* Angband */ - "Vorlon", /* Babylon 5 */ - "questing beast", /* King Arthur */ - "Predator", /* Movie */ - "mother-in-law" /* common pest */ -}; - - +#define BOGUSMONSIZE 100 /* arbitrary */ /* return a random monster name, for hallucination */ -const char * -rndmonnam() +char * +rndmonnam(code) +char *code; { - const char *mname; + static char buf[BUFSZ]; + char *mname = buf; int name; + if (code) *code = '\0'; + do { - name = rn1(SPECIAL_PM + SIZE(bogusmons) - LOW_PM, LOW_PM); + name = rn1(SPECIAL_PM + BOGUSMONSIZE - LOW_PM, LOW_PM); } while (name < SPECIAL_PM && (type_is_pname(&mons[name]) || (mons[name].geno & G_NOGEN))); if (name >= SPECIAL_PM) { - mname = bogusmons[name - SPECIAL_PM]; + get_rnd_text(BOGUSMONFILE, buf); /* strip prefix if present */ - if (!letter(*mname)) ++mname; + if (!letter(*mname)) { + if (code) *code = *mname; + ++mname; + } } else { - mname = mons[name].mname; + Strcpy(buf, mons[name].mname); } return mname; } +#undef BOGUSMONSIZE /* scan bogusmons to check whether this name is in the list and has a prefix */ boolean -bogon_is_pname(mname) -const char *mname; +bogon_is_pname(code) +char code; { - const char *bname; - int name; - - if (!mname || !*mname) return FALSE; - if (!strncmpi(mname, "the ", 4)) mname += 4; - /* scan the bogusmons[] list; case sensitive here */ - for (name = 0; name < SIZE(bogusmons); name++) { - bname = bogusmons[name]; - /* we can skip all ordinary entries */ - if (letter(*bname)) continue; - /* starts with a classification code; does rest of name match? */ - if (!strcmp(mname, bname + 1)) - return index("-+=", *bname) ? TRUE : FALSE; - } - return FALSE; + if (!code) return FALSE; + return index("-+=", code) ? TRUE : FALSE; } const char * diff --git a/src/eat.c b/src/eat.c index 983f6bcec..a5b413772 100644 --- a/src/eat.c +++ b/src/eat.c @@ -1252,7 +1252,7 @@ const char *mesg; what = "chicken"; which = 1; /* suppress pluralization */ } else if (Hallucination) { - what = rndmonnam(); + what = rndmonnam(NULL); } else { what = mons[mnum].mname; if (the_unique_pm(&mons[mnum])) which = 2; diff --git a/src/engrave.c b/src/engrave.c index ebfcd0829..5a8aa38f3 100644 --- a/src/engrave.c +++ b/src/engrave.c @@ -9,33 +9,6 @@ STATIC_VAR NEARDATA struct engr *head_engr; -/* random engravings */ -static const char *random_mesg[] = { - "Elbereth", - /* trap engravings */ - "Vlad was here", "ad aerarium", - /* take-offs and other famous engravings */ - "Owlbreath", "Galadriel", - "Kilroy was here", - "A.S. ->", "<- A.S.", /* Journey to the Center of the Earth */ - "You won't get it up the steps", /* Adventure */ - "Lasciate ogni speranza o voi ch'entrate.", /* Inferno */ - "Well Come", /* Prisoner */ - "We apologize for the inconvenience.", /* So Long... */ - "See you next Wednesday", /* Thriller */ - "notary sojak", /* Smokey Stover */ - "For a good time call 8?7-5309", - "Please don't feed the animals.", /* Various zoos around the world */ - "Madam, in Eden, I'm Adam.", /* A palindrome */ - "Two thumbs up!", /* Siskel & Ebert */ - "Hello, World!", /* The First C Program */ -#ifdef MAIL - "You've got mail!", /* AOL */ -#endif - "As if!", /* Clueless */ - "BAD WOLF", /* 200x incarnation of Dr.Who */ -}; - char * random_engraving(outbuf) char *outbuf; @@ -44,8 +17,10 @@ char *outbuf; /* a random engraving may come from the "rumors" file, or from the list above */ - if (!rn2(4) || !(rumor = getrumor(0, outbuf, TRUE)) || !*rumor) - Strcpy(outbuf, random_mesg[rn2(SIZE(random_mesg))]); + if (!rn2(4) || !(rumor = getrumor(0, outbuf, TRUE)) || !*rumor) { + char buf[BUFSZ]; + Strcpy(outbuf, get_rnd_text(ENGRAVEFILE, buf)); + } wipeout_text(outbuf, (int)(strlen(outbuf) / 4), 0); return outbuf; @@ -1232,39 +1207,6 @@ struct engr *ep; } -/* Epitaphs for random headstones */ -static const char *epitaphs[] = { - "Rest in peace", - "R.I.P.", - "Rest In Pieces", - "Note -- there are NO valuable items in this grave", - "1994-1995. The Longest-Lived Hacker Ever", - "The Grave of the Unknown Hacker", - "We weren't sure who this was, but we buried him here anyway", - "Sparky -- he was a very good dog", - "Beware of Electric Third Rail", - "Made in Taiwan", - "Og friend. Og good dude. Og died. Og now food", - "Beetlejuice Beetlejuice Beetlejuice", - "Look out below!", - "Please don't dig me up. I'm perfectly happy down here. -- Resident", - "Postman, please note forwarding address: Gehennom, Asmodeus's Fortress, fifth lemure on the left", - "Mary had a little lamb/Its fleece was white as snow/When Mary was in trouble/The lamb was first to go", - "Be careful, or this could happen to you!", - "Soon you'll join this fellow in hell! -- the Wizard of Yendor", - "Caution! This grave contains toxic waste", - "Sum quod eris", - "Here lies an Atheist, all dressed up and no place to go", - "Here lies Ezekiel, age 102. The good die young.", - "Here lies my wife: Here let her lie! Now she's at rest and so am I.", - "Here lies Johnny Yeast. Pardon me for not rising.", - "He always lied while on the earth and now he's lying in it", - "I made an ash of myself", - "Soon ripe. Soon rotten. Soon gone. But not forgotten.", - "Here lies the body of Jonathan Blake. Stepped on the gas instead of the brake.", - "Go away!" -}; - /* Create a headstone at the given location. * The caller is responsible for newsym(x, y). */ @@ -1280,9 +1222,12 @@ const char *str; levl[x][y].typ = GRAVE; /* Engrave the headstone */ - if (!str) str = epitaphs[rn2(SIZE(epitaphs))]; del_engr_at(x, y); - make_engr_at(x, y, str, 0L, HEADSTONE); + if (str) make_engr_at(x, y, str, 0L, HEADSTONE); + else { + char buf[BUFSZ]; + make_engr_at(x, y, get_rnd_text(EPITAPHFILE, buf), 0L, HEADSTONE); + } return; } diff --git a/src/explode.c b/src/explode.c index 65dbe82a5..905b7b94b 100644 --- a/src/explode.c +++ b/src/explode.c @@ -283,7 +283,7 @@ int expltype; so avoid any which begins with a capital letter) */ do { Sprintf(hallu_buf, "%s explosion", - s_suffix(rndmonnam())); + s_suffix(rndmonnam(NULL))); } while (*hallu_buf != lowc(*hallu_buf)); str = hallu_buf; } @@ -365,7 +365,7 @@ int expltype; if (do_hallu) { /* (see explanation above) */ do { Sprintf(hallu_buf, "%s explosion", - s_suffix(rndmonnam())); + s_suffix(rndmonnam(NULL))); } while (*hallu_buf != lowc(*hallu_buf)); str = hallu_buf; } diff --git a/src/fountain.c b/src/fountain.c index e87748e0a..88fb6e2a4 100644 --- a/src/fountain.c +++ b/src/fountain.c @@ -39,7 +39,7 @@ dowatersnakes() /* Fountain of snakes! */ if (!(mvitals[PM_WATER_MOCCASIN].mvflags & G_GONE)) { if (!Blind) pline("An endless stream of %s pours forth!", - Hallucination ? makeplural(rndmonnam()) : "snakes"); + Hallucination ? makeplural(rndmonnam(NULL)) : "snakes"); else You_hear("%s hissing!", something); while(num-- > 0) diff --git a/src/muse.c b/src/muse.c index 855a91887..9ea9c1d14 100644 --- a/src/muse.c +++ b/src/muse.c @@ -88,7 +88,7 @@ struct obj *obj; if (vis) { pline("As %s opens the bottle, an enormous %s emerges!", mon_nam(mon), - Hallucination ? rndmonnam() : (const char *)"ghost"); + Hallucination ? rndmonnam(NULL) : (const char *)"ghost"); pline("%s is frightened to death, and unable to move.", Monnam(mon)); } diff --git a/src/pickup.c b/src/pickup.c index 3eba9874f..1d78dea76 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -2040,7 +2040,7 @@ struct obj *box; (void) add_to_container(box, deadcat); } pline_The("%s inside the box is dead!", - Hallucination ? rndmonnam() : "housecat"); + Hallucination ? rndmonnam(NULL) : "housecat"); } box->owt = weight(box); return; diff --git a/src/potion.c b/src/potion.c index d4bfcdad3..0af019181 100644 --- a/src/potion.c +++ b/src/potion.c @@ -371,7 +371,7 @@ ghost_from_bottle() return; } pline("As you open the bottle, an enormous %s emerges!", - Hallucination ? rndmonnam() : (const char *)"ghost"); + Hallucination ? rndmonnam(NULL) : (const char *)"ghost"); if(flags.verbose) You("are frightened to death, and unable to move."); nomul(-3); diff --git a/src/priest.c b/src/priest.c index 1ef7ea286..a28f2b8d4 100644 --- a/src/priest.c +++ b/src/priest.c @@ -284,13 +284,14 @@ char *pname; /* caller-supplied output buffer */ boolean do_hallu = Hallucination, aligned_priest = mon->data == &mons[PM_ALIGNED_PRIEST], high_priest = mon->data == &mons[PM_HIGH_PRIEST]; - const char *what = do_hallu ? rndmonnam() : mon->data->mname; + char whatcode = '\0'; + const char *what = do_hallu ? rndmonnam(&whatcode) : mon->data->mname; if (!mon->ispriest && !mon->isminion) /* should never happen... */ return strcpy(pname, what); /* caller must be confused */ *pname = '\0'; - if (!do_hallu || !bogon_is_pname(what)) Strcat(pname, "the "); + if (!do_hallu || !bogon_is_pname(whatcode)) Strcat(pname, "the "); if (mon->minvis) Strcat(pname, "invisible "); if (mon->isminion && EMIN(mon)->renegade) Strcat(pname, "renegade "); diff --git a/src/rumors.c b/src/rumors.c index 081b81d8d..4bcb5c177 100644 --- a/src/rumors.c +++ b/src/rumors.c @@ -266,6 +266,46 @@ rumor_check() } } + +/* Gets a random line of text from file 'fname', and returns it. */ +char * +get_rnd_text(fname, buf) +const char *fname; +char *buf; +{ + dlb *fh; + + buf[0] = '\0'; + + fh = dlb_fopen(fname, "r"); + + if (fh) { + /* TODO: cache sizetxt, starttxt, endtxt. maybe cache file contents? */ + long sizetxt = 0, starttxt = 0, endtxt = 0, tidbit = 0; + char *endp, line[BUFSZ], xbuf[BUFSZ]; + (void) dlb_fgets(line, sizeof line, fh); /* skip "don't edit" comment */ + + (void) dlb_fseek(fh, 0L, SEEK_CUR); + starttxt = dlb_ftell(fh); + (void) dlb_fseek(fh, 0L, SEEK_END); + endtxt = dlb_ftell(fh); + sizetxt = endtxt - starttxt; + tidbit = Rand() % sizetxt; + + (void) dlb_fseek(fh, starttxt + tidbit, SEEK_SET); + (void) dlb_fgets(line, sizeof line, fh); + if (!dlb_fgets(line, sizeof line, fh)) { + (void) dlb_fseek(fh, starttxt, SEEK_SET); + (void) dlb_fgets(line, sizeof line, fh); + } + if ((endp = index(line, '\n')) != 0) *endp = 0; + Strcat(buf, xcrypt(line, xbuf)); + (void) dlb_fclose(fh); + } else impossible("Can't open file %s!", fname); + return buf; +} + + void outrumor(truth, mechanism) int truth; /* 1=true, -1=false, 0=either */ diff --git a/src/sounds.c b/src/sounds.c index 3b2ee2f56..6204847e8 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -1006,7 +1006,7 @@ dochat() if (!Blind) { if (Hallucination) { /* if you're hallucinating, you can't tell it's a statue */ - pline_The("%s seems not to notice you.", rndmonnam()); + pline_The("%s seems not to notice you.", rndmonnam(NULL)); } else { pline_The("statue seems not to notice you."); diff --git a/src/timeout.c b/src/timeout.c index 481b16ae7..e47d863fb 100644 --- a/src/timeout.c +++ b/src/timeout.c @@ -164,7 +164,7 @@ slime_dialogue() if (!Blind) /* [what if you're already green?] */ pline(buf, hcolor(NH_GREEN)); } else - pline(buf, an(Hallucination ? rndmonnam() : "green slime")); + pline(buf, an(Hallucination ? rndmonnam(NULL) : "green slime")); } else pline1(buf); } diff --git a/src/trap.c b/src/trap.c index bc8f0c746..beb24ad9a 100644 --- a/src/trap.c +++ b/src/trap.c @@ -621,7 +621,7 @@ int *fail_reason; "statue"); pline("%s %s!", upstart(statuename), comes_to_life); } else if (Hallucination) { /* They don't know it's a statue */ - pline_The("%s suddenly seems more animated.", rndmonnam()); + pline_The("%s suddenly seems more animated.", rndmonnam(NULL)); } else if (cause == ANIMATE_SHATTER) { if (cansee(x, y)) Sprintf(statuename, "%s%s", shk_your(tmpbuf, statue), diff --git a/src/zap.c b/src/zap.c index 5f39fc30e..3134c8b88 100644 --- a/src/zap.c +++ b/src/zap.c @@ -1799,7 +1799,7 @@ struct obj *obj, *otmp; if (break_statue(obj)) { if (cansee(obj->ox, obj->oy)) { if (Hallucination) - pline_The("%s shatters.", rndmonnam()); + pline_The("%s shatters.", rndmonnam(NULL)); else pline_The("statue shatters."); } else diff --git a/sys/unix/Makefile.dat b/sys/unix/Makefile.dat index ad9cb6e2d..17c543897 100644 --- a/sys/unix/Makefile.dat +++ b/sys/unix/Makefile.dat @@ -9,7 +9,7 @@ NHSROOT=.. # SHELL=E:/GEMINI2/MUPFEL.TTP # UUDECODE=uudecode -VARDAT = data rumors quest.dat oracles options +VARDAT = bogusmon data engrave epitaph rumors quest.dat oracles options all: $(VARDAT) spec_levs quest_levs dungeon @@ -98,6 +98,15 @@ quest.dat: quest.txt ../util/makedefs oracles: oracles.txt ../util/makedefs ../util/makedefs -h +engrave: engrave.txt ../util/makedefs + ../util/makedefs -s + +epitaph: epitaph.txt ../util/makedefs + ../util/makedefs -s + +bogusmon: bogusmon.txt ../util/makedefs + ../util/makedefs -s + # note: 'options' should have already been made when include/date.h was created options: ../util/makedefs ../util/makedefs -v diff --git a/sys/unix/Makefile.top b/sys/unix/Makefile.top index f9e474a5b..77cd28fa1 100644 --- a/sys/unix/Makefile.top +++ b/sys/unix/Makefile.top @@ -56,7 +56,7 @@ VARDIR = $(HACKDIR) # for Gnome # VARDATND = x11tiles pet_mark.xbm rip.xpm mapbg.xpm -VARDATD = data oracles options quest.dat rumors +VARDATD = bogusmon data engrave epitaph oracles options quest.dat rumors VARDAT = $(VARDATD) $(VARDATND) # Some versions of make use the SHELL environment variable as the shell @@ -109,6 +109,15 @@ manpages: data: $(GAME) ( cd dat ; $(MAKE) data ) +engrave: $(GAME) + ( cd dat ; $(MAKE) engrave ) + +bogusmon: $(GAME) + ( cd dat ; $(MAKE) bogusmon ) + +epitaph: $(GAME) + ( cd dat ; $(MAKE) epitaph ) + rumors: $(GAME) ( cd dat ; $(MAKE) rumors ) diff --git a/util/makedefs.c b/util/makedefs.c index f4ca9febb..8555178e1 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -169,6 +169,7 @@ static char *FDECL(bannerc_string, (char *,const char *)); static char *FDECL(xcrypt, (const char *)); static unsigned long FDECL(read_rumors_file, (const char *,int *,long *,unsigned long)); +static void FDECL(do_rnd_access_file, (const char *)); static boolean FDECL(d_filter, (char *)); static boolean FDECL(h_filter, (char *)); static boolean FDECL(ranged_attk,(struct permonst*)); @@ -213,7 +214,7 @@ extern unsigned _stklen = STKSIZ; int main(void) { - const char *def_options = "odemvpqrhz"; + const char *def_options = "odemvpqrshz"; char buf[100]; int len; @@ -329,6 +330,11 @@ char *options; case 'r': case 'R': do_rumors(); break; + case 's': + case 'S': do_rnd_access_file(EPITAPHFILE); + do_rnd_access_file(ENGRAVEFILE); + do_rnd_access_file(BOGUSMONFILE); + break; case 'h': case 'H': do_oracles(); break; @@ -870,6 +876,44 @@ unsigned long old_rumor_offset; return rumor_offset; } + +void +do_rnd_access_file(fname) +const char *fname; +{ + Sprintf(filename, DATA_IN_TEMPLATE, fname); + Strcat(filename, ".txt"); + if (!(ifp = fopen(filename, RDTMODE))) { + perror(filename); + exit(EXIT_FAILURE); + } + filename[0]='\0'; +#ifdef FILE_PREFIX + Strcat(filename, file_prefix); +#endif + Sprintf(eos(filename), DATA_TEMPLATE, fname); + if (!(ofp = fopen(filename, WRTMODE))) { + perror(filename); + exit(EXIT_FAILURE); + } + Fprintf(ofp,"%s",Dont_Edit_Data); + + tfp = getfp(DATA_TEMPLATE, "grep.tmp", WRTMODE); + grep0(ifp, tfp); + ifp = getfp(DATA_TEMPLATE, "grep.tmp", RDTMODE); + + while (fgets(in_line, sizeof in_line, ifp) != 0) { + if (in_line[0] == '#') continue; /* discard comments */ + if (in_line[0] == '\n') continue; /* and empty lines */ + (void) fputs(xcrypt(in_line), ofp); + } + Fclose(ifp); + Fclose(ofp); + + delete_file(DATA_TEMPLATE, "grep.tmp"); + return; +} + void do_rumors() { From 4b0a1af482553c806cfb62d37cedad49c8066fea Mon Sep 17 00:00:00 2001 From: PatR Date: Wed, 18 Mar 2015 19:21:29 -0700 Subject: [PATCH 119/132] xlogfile tweak to avoid forcing ANSI C Avoid the C89/C90 feature of implicit concatentation of string literals. XLOG_SEP handling becomes clumsier but will work with pre-ANSI compilers. --- src/topten.c | 95 +++++++++++++++++++++++++++------------------------- 1 file changed, 50 insertions(+), 45 deletions(-) diff --git a/src/topten.c b/src/topten.c index cc4aefbe1..12adcc449 100644 --- a/src/topten.c +++ b/src/topten.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 topten.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 topten.c $NHDT-Date: 1426731079 2015/03/19 02:11:19 $ $NHDT-Branch: harder_d8 $:$NHDT-Revision: 1.25 $ */ /* NetHack 3.5 topten.c $Date: 2012/01/24 04:26:15 $ $Revision: 1.23 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -66,8 +66,8 @@ STATIC_DCL void FDECL(discardexcess, (FILE *)); STATIC_DCL void FDECL(readentry, (FILE *,struct toptenentry *)); STATIC_DCL void FDECL(writeentry, (FILE *,struct toptenentry *)); STATIC_DCL void FDECL(writexlentry, (FILE*, struct toptenentry *)); -STATIC_DCL long FDECL(encodeconduct, (void)); -STATIC_DCL long FDECL(encodeachieve, (void)); +STATIC_DCL long NDECL(encodeconduct); +STATIC_DCL long NDECL(encodeachieve); STATIC_DCL void FDECL(free_ttlist, (struct toptenentry *)); STATIC_DCL int FDECL(classmon, (char *,BOOLEAN_P)); STATIC_DCL int FDECL(score_wanted, @@ -295,53 +295,58 @@ struct toptenentry *tt; #endif } -#define XLOG_SEP "\t" /* xlogfile field separator. */ /* as tab is never used in eg. plname or death, no need to mangle those. */ STATIC_OVL void writexlentry(rfile,tt) FILE *rfile; struct toptenentry *tt; { - char buf[DTHSZ+1]; - (void)fprintf(rfile, - "version=%d.%d.%d" - XLOG_SEP "points=%ld" - XLOG_SEP "deathdnum=%d" - XLOG_SEP "deathlev=%d" - XLOG_SEP "maxlvl=%d" - XLOG_SEP "hp=%d" - XLOG_SEP "maxhp=%d" - XLOG_SEP "deaths=%d" - XLOG_SEP "deathdate=%d" - XLOG_SEP "birthdate=%d" - XLOG_SEP "uid=%d", - tt->ver_major, tt->ver_minor, tt->patchlevel, - tt->points, tt->deathdnum, tt->deathlev, - tt->maxlvl, tt->hp, tt->maxhp, tt->deaths, - tt->deathdate, tt->birthdate, tt->uid); - (void)fprintf(rfile, - XLOG_SEP "role=%s" - XLOG_SEP "race=%s" - XLOG_SEP "gender=%s" - XLOG_SEP "align=%s", - tt->plrole, tt->plrace, tt->plgend, tt->plalign); - (void)fprintf(rfile, XLOG_SEP "name=%s", plname); - (void)fprintf(rfile, XLOG_SEP "death=%s", tt->death); - (void)fprintf(rfile, XLOG_SEP "conduct=0x%lx", encodeconduct()); - (void)fprintf(rfile, XLOG_SEP "turns=%ld", moves); - (void)fprintf(rfile, XLOG_SEP "achieve=0x%lx", encodeachieve()); - (void)fprintf(rfile, XLOG_SEP "realtime=%ld", (long)u.urealtime.realtime); - (void)fprintf(rfile, XLOG_SEP "starttime=%ld", (long)ubirthday); - (void)fprintf(rfile, XLOG_SEP "endtime=%ld", (long)u.urealtime.endtime); - (void)fprintf(rfile, XLOG_SEP "gender0=%s", genders[flags.initgend].filecode); - (void)fprintf(rfile, XLOG_SEP "align0=%s", - aligns[1 - u.ualignbase[A_ORIGINAL]].filecode); - fprintf(rfile, "\n"); -} -#undef XLOG_SEP +#define Fprintf (void)fprintf +#define XLOG_SEP '\t' /* xlogfile field separator. */ + char buf[BUFSZ]; -long -encodeconduct(void) + Sprintf(buf, "version=%d.%d.%d", + tt->ver_major, tt->ver_minor, tt->patchlevel); + Sprintf(eos(buf), "%cpoints=%ld%cdeathdnum=%d%cdeathlev=%d", + XLOG_SEP, tt->points, + XLOG_SEP, tt->deathdnum, + XLOG_SEP, tt->deathlev); + Sprintf(eos(buf), "%cmaxlvl=%d%chp=%d%cmaxhp=%d", + XLOG_SEP, tt->maxlvl, + XLOG_SEP, tt->hp, + XLOG_SEP, tt->maxhp); + Sprintf(eos(buf), "%cdeaths=%d%cdeathdate=%ld%cbirthdate=%ld%cuid=%d", + XLOG_SEP, tt->deaths, + XLOG_SEP, tt->deathdate, + XLOG_SEP, tt->birthdate, + XLOG_SEP, tt->uid); + Fprintf(rfile, "%s", buf); + Sprintf(buf, "%crole=%s%crace=%s%cgender=%s%calign=%s", + XLOG_SEP, tt->plrole, + XLOG_SEP, tt->plrace, + XLOG_SEP, tt->plgend, + XLOG_SEP, tt->plalign); + Fprintf(rfile, "%s%cname=%s%cdeath=%s", + buf, /* (already includes separator) */ + XLOG_SEP, plname, + XLOG_SEP, tt->death); + Fprintf(rfile, "%cconduct=0x%lx%cturns=%ld%cachieve=0x%lx", + XLOG_SEP, encodeconduct(), + XLOG_SEP, moves, + XLOG_SEP, encodeachieve()); + Fprintf(rfile, "%crealtime=%ld%cstarttime=%ld%cendtime%ld", + XLOG_SEP, (long)u.urealtime.realtime, + XLOG_SEP, (long)ubirthday, + XLOG_SEP, (long)u.urealtime.endtime); + Fprintf(rfile, "%cgender0=%s%calign0=%s", + XLOG_SEP, genders[flags.initgend].filecode, + XLOG_SEP, aligns[1 - u.ualignbase[A_ORIGINAL]].filecode); + Fprintf(rfile, "\n"); +#undef XLOG_SEP +} + +STATIC_OVL long +encodeconduct() { long e = 0L; @@ -361,8 +366,8 @@ encodeconduct(void) return e; } -long -encodeachieve(void) +STATIC_OVL long +encodeachieve() { long r = 0L; From 357115ae80d443f4404c58f84065353d8dc6d179 Mon Sep 17 00:00:00 2001 From: PatR Date: Wed, 18 Mar 2015 19:24:43 -0700 Subject: [PATCH 120/132] add bogusmon,engrave,epitaph to dat/.gitignore --- dat/.gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dat/.gitignore b/dat/.gitignore index 88e516283..1784229ab 100644 --- a/dat/.gitignore +++ b/dat/.gitignore @@ -5,6 +5,9 @@ rip.xpm pet_mark.xbm quest.dat rumors +bogusmon +engrave +epitaph x11tiles *.lev spec_levs From d182920655aea1f5c723977f9ea9e99b7f998b7c Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 18 Mar 2015 23:00:46 -0400 Subject: [PATCH 121/132] update cmdline Makefile --- sys/winnt/Makefile.msc | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index 847aa3797..4be6dd3ab 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -305,6 +305,9 @@ PDBFILE= /PDB:"$(O)$(GAME).PDB" MAPFILE= /MAP:"$(O)$(GAME).MAP" INCLDIR= /I..\include +ldebug=/DEBUG +cdebug = -Zi -Od + !IF ("$(ldebug)" != "") !IF ("$(ldebug)" != "/RELEASE") ldebug = /DEBUG @@ -341,14 +344,14 @@ LIBS= user32.lib winmm.lib $(ZLIB) !IF ("$(GRAPHICAL)"=="Y") cflagsGame = $(cdebug) $(cflags2) $(guiflags) $(INCLDIR) \ - $(WINPFLAG) $(DLBFLG) $(GAMEPDBFILE) $(GAMEMAPFILE) -lflagsGame = $(ldebug) $(lflags) $(guilibs) + $(WINPFLAG) $(DLBFLG) +lflagsGame = $(ldebug) $(lflags) $(guilibs) $(GAMEPDBFILE) $(GAMEMAPFILE) !ELSE cflagsGame = $(cdebug) $(cflags2) $(conflags) $(INCLDIR) \ - $(WINPFLAG) $(DLBFLG) $(GAMEPDBFILE) $(GAMEMAPFILE) -lflagsGame = $(ldebug) $(lflags) $(conlibs) + $(WINPFLAG) $(DLBFLG) +lflagsGame = $(ldebug) $(lflags) $(conlibs) $(GAMEPDBFILE) $(GAMEMAPFILE) !ENDIF @@ -607,6 +610,7 @@ all : install install: envchk $(GAME) $(O)install.tag @echo Done. + $(O)install.tag: $(DAT)\data $(DAT)\rumors $(DAT)\dungeon \ $(DAT)\oracles $(DAT)\quest.dat $(O)sp_lev.tag $(DLB) ! IF ("$(USE_DLB)"=="Y") @@ -840,6 +844,14 @@ $(INCL)\vis_tab.h: $(U)makedefs.exe $(SRC)\vis_tab.c: $(U)makedefs.exe $(U)makedefs -z +$(DAT)\engrave: $(DAT)\engrave.txt $(U)makedefs.exe + ../util/makedefs -s +$(DAT)\epitaph: $(DAT)\epitaph.txt $(U)makedefs.exe + ../util/makedefs -s +$(DAT)\bogusmon: $(DAT)\bogusmon.txt $(U)makedefs.exe + ../util/makedefs -s + + #========================================== # uudecode utility and uuencoded targets #========================================== @@ -1081,7 +1093,7 @@ $(DAT)\porthelp: $(NTSYS)\porthelp nhdat: $(U)dlb_main.exe $(DAT)\data $(DAT)\oracles $(OPTIONS_FILE) \ $(DAT)\quest.dat $(DAT)\rumors $(DAT)\help $(DAT)\hh $(DAT)\cmdhelp \ $(DAT)\history $(DAT)\opthelp $(DAT)\wizhelp $(DAT)\dungeon $(DAT)\porthelp \ - $(DAT)\license $(O)sp_lev.tag + $(DAT)\license $(DAT)\engrave $(DAT)\epitaph $(DAT)\bogusmon $(O)sp_lev.tag cd $(DAT) echo data >dlb.lst echo oracles >>dlb.lst @@ -1091,6 +1103,9 @@ nhdat: $(U)dlb_main.exe $(DAT)\data $(DAT)\oracles $(OPTIONS_FILE) \ if exist porthelp echo porthelp >>dlb.lst echo quest.dat >>dlb.lst echo rumors >>dlb.lst + echo engrave >>dlb.lst + echo epitaph >>dlb.lst + echo bogusmon >>dlb.lst echo help >>dlb.lst echo hh >>dlb.lst echo cmdhelp >>dlb.lst @@ -1238,6 +1253,9 @@ spotless: clean if exist $(U)*.map del $(U)*.map if exist $(DAT)\data del $(DAT)\data if exist $(DAT)\rumors del $(DAT)\rumors + if exist $(DAT)\engrave del $(DAT)\engrave + if exist $(DAT)\epitaph del $(DAT)\epitaph + if exist $(DAT)\bogusmon del $(DAT)\bogusmon if exist $(DAT)\???-fil?.lev del $(DAT)\???-fil?.lev if exist $(DAT)\???-goal.lev del $(DAT)\???-goal.lev if exist $(DAT)\???-loca.lev del $(DAT)\???-loca.lev From 3cc3709d9535fc9d3b34b0b45a436a8a707eb35e Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Thu, 19 Mar 2015 17:41:14 +0200 Subject: [PATCH 122/132] Save xlogfile time_t fields correctly --- include/decl.h | 1 + include/patchlevel.h | 2 +- include/you.h | 1 - src/allmain.c | 6 +++--- src/decl.c | 1 + src/end.c | 2 +- src/restore.c | 15 ++++++++++----- src/save.c | 4 +++- src/topten.c | 8 ++++---- src/u_init.c | 1 + 10 files changed, 25 insertions(+), 16 deletions(-) diff --git a/include/decl.h b/include/decl.h index 2071277dc..bacff08d9 100644 --- a/include/decl.h +++ b/include/decl.h @@ -244,6 +244,7 @@ E NEARDATA anything zeroany; /* init'd and defined in decl.c */ #include "you.h" E NEARDATA struct you u; E NEARDATA time_t ubirthday; +E NEARDATA struct u_realtime urealtime; #include "onames.h" #ifndef PM_H /* (pm.h has already been included via youprop.h) */ diff --git a/include/patchlevel.h b/include/patchlevel.h index 00411a2c2..02b8b3bfa 100644 --- a/include/patchlevel.h +++ b/include/patchlevel.h @@ -14,7 +14,7 @@ * Incrementing EDITLEVEL can be used to force invalidation of old bones * and save files. */ -#define EDITLEVEL 56 +#define EDITLEVEL 57 #define COPYRIGHT_BANNER_A \ "NetHack, Copyright 1985-2012" diff --git a/include/you.h b/include/you.h index 81aba0ba4..0fc5c6073 100644 --- a/include/you.h +++ b/include/you.h @@ -327,7 +327,6 @@ struct you { unsigned udg_cnt; /* how long you have been demigod */ struct u_achieve uachieve; /* achievements */ - struct u_realtime urealtime; struct u_event uevent; /* certain events have happened */ struct u_have uhave; /* you're carrying special objects */ struct u_conduct uconduct; /* KMH, conduct */ diff --git a/src/allmain.c b/src/allmain.c index eb1f2b69b..45c319037 100644 --- a/src/allmain.c +++ b/src/allmain.c @@ -533,11 +533,11 @@ newgame() #endif program_state.something_worth_saving++; /* useful data now exists */ - u.urealtime.realtime = (time_t)0L; + urealtime.realtime = (time_t)0L; #if defined(BSD) && !defined(POSIX_TYPES) - (void) time((long *)&u.urealtime.restored); + (void) time((long *)&urealtime.restored); #else - (void) time(&u.urealtime.restored); + (void) time(&urealtime.restored); #endif /* Success! */ diff --git a/src/decl.c b/src/decl.c index 6c83f0f14..d0d29a35f 100644 --- a/src/decl.c +++ b/src/decl.c @@ -136,6 +136,7 @@ NEARDATA struct sysflag sysflags = DUMMY; NEARDATA struct instance_flags iflags = DUMMY; NEARDATA struct you u = DUMMY; NEARDATA time_t ubirthday = DUMMY; +NEARDATA struct u_realtime urealtime = DUMMY; schar lastseentyp[COLNO][ROWNO] = {DUMMY}; /* last seen/touched dungeon typ */ diff --git a/src/end.c b/src/end.c index 111fd1b3a..7ada39767 100644 --- a/src/end.c +++ b/src/end.c @@ -911,7 +911,7 @@ die: topten figure it out separately and possibly getting different time or even day if player is slow responding to --More-- */ endtime = getnow(); - u.urealtime.realtime += (endtime - u.urealtime.restored); + urealtime.realtime += (endtime - urealtime.restored); /* Sometimes you die on the first move. Life's not fair. * On those rare occasions you get hosed immediately, go out diff --git a/src/restore.c b/src/restore.c index 9f336d3ad..4e4502b53 100644 --- a/src/restore.c +++ b/src/restore.c @@ -551,13 +551,18 @@ unsigned int *stuckid, *steedid; amii_setpens(amii_numcolors); /* use colors from save file */ #endif mread(fd, (genericptr_t) &u, sizeof(struct you)); - mread(fd, (genericptr_t) timebuf, 14); - timebuf[14] = '\0'; - ubirthday = time_from_yyyymmddhhmmss(timebuf); + +#define ReadTimebuf(foo) mread(fd, (genericptr_t) timebuf, 14); \ + timebuf[14] = '\0'; \ + foo = time_from_yyyymmddhhmmss(timebuf); + + ReadTimebuf(ubirthday); + ReadTimebuf(urealtime.realtime); + ReadTimebuf(urealtime.restored); #if defined(BSD) && !defined(POSIX_TYPES) - (void) time((long *)&u.urealtime.restored); + (void) time((long *)&urealtime.restored); #else - (void) time(&u.urealtime.restored); + (void) time(&urealtime.restored); #endif diff --git a/src/save.c b/src/save.c index 964847190..807ecd7dc 100644 --- a/src/save.c +++ b/src/save.c @@ -307,9 +307,11 @@ register int fd, mode; #ifdef SYSFLAGS bwrite(fd, (genericptr_t) &sysflags, sizeof(struct sysflag)); #endif - u.urealtime.realtime += (getnow() - u.urealtime.restored); + urealtime.realtime += (getnow() - urealtime.restored); bwrite(fd, (genericptr_t) &u, sizeof(struct you)); bwrite(fd, yyyymmddhhmmss(ubirthday), 14); + bwrite(fd, yyyymmddhhmmss(urealtime.realtime), 14); + bwrite(fd, yyyymmddhhmmss(urealtime.restored), 14); save_killers(fd, mode); /* must come before migrating_objs and migrating_mons are freed */ diff --git a/src/topten.c b/src/topten.c index 12adcc449..b68ad1bce 100644 --- a/src/topten.c +++ b/src/topten.c @@ -334,10 +334,10 @@ struct toptenentry *tt; XLOG_SEP, encodeconduct(), XLOG_SEP, moves, XLOG_SEP, encodeachieve()); - Fprintf(rfile, "%crealtime=%ld%cstarttime=%ld%cendtime%ld", - XLOG_SEP, (long)u.urealtime.realtime, + Fprintf(rfile, "%crealtime=%ld%cstarttime=%ld%cendtime=%ld", + XLOG_SEP, (long)urealtime.realtime, XLOG_SEP, (long)ubirthday, - XLOG_SEP, (long)u.urealtime.endtime); + XLOG_SEP, (long)urealtime.endtime); Fprintf(rfile, "%cgender0=%s%calign0=%s", XLOG_SEP, genders[flags.initgend].filecode, XLOG_SEP, aligns[1 - u.ualignbase[A_ORIGINAL]].filecode); @@ -480,7 +480,7 @@ time_t when; t0->birthdate = yyyymmdd(ubirthday); t0->deathdate = yyyymmdd(when); t0->tt_next = 0; - u.urealtime.endtime = when; + urealtime.endtime = when; #ifdef UPDATE_RECORD_IN_PLACE t0->fpos = -1L; #endif diff --git a/src/u_init.c b/src/u_init.c index bfe54671c..79954841c 100644 --- a/src/u_init.c +++ b/src/u_init.c @@ -500,6 +500,7 @@ u_init() (void) memset((genericptr_t)&u, 0, sizeof(u)); u.ustuck = (struct monst *)0; (void) memset((genericptr_t)&ubirthday, 0, sizeof(ubirthday)); + (void) memset((genericptr_t)&urealtime, 0, sizeof(urealtime)); #if 0 /* documentation of more zero values as desirable */ u.usick_cause[0] = 0; From f5ea4e0d1f4eef04d12bbd765cc5e3a3153b78d3 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Thu, 19 Mar 2015 18:43:35 +0200 Subject: [PATCH 123/132] Add lots of new hallu monsters --- dat/bogusmon.txt | 306 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 305 insertions(+), 1 deletion(-) diff --git a/dat/bogusmon.txt b/dat/bogusmon.txt index 8c7aba45b..2ec3e7fe7 100644 --- a/dat/bogusmon.txt +++ b/dat/bogusmon.txt @@ -40,6 +40,39 @@ harpy lion-dog rat-ant Y2K bug +angry mariachi +arch-pedant +bluebird of happiness +cardboard golem +duct tape golem +diagonally moving grid bug +evil overlord +newsgroup troll +ninja pirate zombie robot +octarine dragon +gonzo journalist +lag monster +loan shark +possessed waffle iron +poultrygeist +stuffed raccoon puppet +viking +wee green blobbie +wereplatypus +hag of bolding +blancmange +raging nerd +spelling bee +land octopus +frog prince +pigasus +_Semigorgon +conventioneer +large microbat +small megabat +uberhulk +tofurkey ++Dudley # Quendor (Zork, &c.) grue @@ -53,7 +86,13 @@ dornbeast Ancient Multi-Hued Dragon +Evil Iggy -# Rogue +# Rogue V5 http://rogue.rogueforge.net/vade-mecum/ +rattlesnake +ice monster +phantom +quagga +aquator +griffin emu kestrel xeroc @@ -175,3 +214,268 @@ Predator # common pest mother-in-law + +# Actual creatures +praying mantis +beluga whale +chicken +coelacanth +star-nosed mole +lungfish +slow loris +sea cucumber +tapeworm +liger +velociraptor +corpulent porpoise + +# european cryptids +wolpertinger +elwedritsche +skvader ++Nessie +tatzelwurm +dahu + +# fictitious beasts +dropbear +wild haggis +jackalope +flying pig +hippocampus +hippogriff +kelpie + +# Unusually animate body parts +bouncing eye +floating nose +wandering eye + +# Computerese +buffer overflow +dangling pointer +walking disk drive +floating point +regex engine +netsplit +wiki +peer +COBOL + +# bugs +bohrbug +mandelbug +schroedinbug +heisenbug + +# DooM +cacodemon +scrag + +# MST3K ++Crow T. Robot + +# Items and stuff +chess pawn +chocolate pudding +ooblecks +terracotta warrior +hearse +roomba +miniature blimp +dust speck + +# DnD monster +gazebo + +# SciFi elements +gray goo +magnetic monopole +first category perpetual motion device + +# Ultima ++Lord British + +# They Might Be Giants +particle man + +# Robot Finds Kitten +kitten prospecting robot + +# Typography +guillemet +solidus +obelus + +# Their actual character +apostrophe golem +voluptuous ampersand + +# Web comics and animation ++Bob the angry flower ++Strong Bad ++Magical Trevor + +# KoL +one-winged dewinged stab-bat + +# deities +Invisible Pink Unicorn +Flying Spaghetti Monster + +# Monkey Island +three-headed monkey ++El Pollo Diablo + +# modern folklore +little green man + +# Portal +weighted Companion Cube + +# /b/ +/b/tard + +# South Park +manbearpig + +# internet memes +bonsai-kitten +tie-thulu ++Domo-kun +looooooooooooong cat +nyan cat + +# the Internet is made for cat pix +ceiling cat +basement cat +monorail cat + +# POWDER +tridude + +# Radomir Dopieralski +orcus cosmicus + +# Angband +yeek +quylthulg +Greater Hell Beast + +# Souljazz ++Vendor of Yizard + +# Dungeon Crawl Stone Soup ++Sigmund +lernaean hydra ++Ijyb ++Gloorx Vloq ++Blork the orc + +# Wil Wheaton, John Scalzi +unicorn pegasus kitten + +# Minecraft +enderman + +# Pun +wight supremacist + +# Starcraft 2 +zergling + +# Feelings +existential angst +figment of your imagination +flash of insight + +# Fish +ghoti + +# Roald Dahl +vermicious knid + +# Carcassonne +meeple + +# The Wombles +womble + +# Fraggle Rock +fraggle + +# soundex and typos of monsters +gloating eye +flush golem +martyr orc +mortar orc +acid blog +acute blob +aria elemental +aliasing priest +aligned parasite +aligned parquet +aligned proctor +baby balky dragon +baby blues dragon +baby caricature +baby crochet +baby grainy dragon +baby bong worm +baby long word +baby parable worm +barfed devil +beer wight +boor wight +brawny mold +rave spider +clue golem +bust vortex +errata elemental +elastic eel +electrocardiogram eel +fir elemental +tire elemental +flamingo sphere +fallacy golem +frizzed centaur +forest centerfold +fierceness sphere +frosted giant +geriatric snake +gnat ant +giant bath +grant beetle +grind bug +giant mango +glossy golem +gnome laureate +gnome dummy +gooier ooze +green slide +guardian nacho +hell hound pun +high purist +hairnet devil +ice trowel +killer beet +feather golem +lounge worm +mountain lymph +pager golem +pie fiend +prophylactic worm +sock mole +rogue piercer +seesawing sphere +simile mimic +moldier ant +stain vortex +scone giant +umbrella hulk +vampire mace +verbal jabberwock +water lemon +water melon +winged grizzly +yellow wight From 1fd371600d7eb6dca8414044e41ab23542bb6ac8 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Thu, 19 Mar 2015 21:13:24 +0200 Subject: [PATCH 124/132] Add some new random engravings --- dat/engrave.txt | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/dat/engrave.txt b/dat/engrave.txt index 6827c8a9a..6390c3ee1 100644 --- a/dat/engrave.txt +++ b/dat/engrave.txt @@ -43,3 +43,40 @@ You've got mail! As if! # 200x incarnation of Dr.Who BAD WOLF + +# Gang tag +Arooo! Werewolves of Yendor! + +# Strategy and pun +Dig for Victory here + +# Pompeii +Gaius Julius Primigenius was here. Why are you late? + +# Helpful guiding +Don't go this way +Go left ---> +<--- Go right +X marks the spot +X <--- You are here. +Here be dragons +Save now, and do your homework! +There was a hole here. It's gone now. +The Vibrating Square +This is a pit! +This is not the dungeon you are looking for. +Watch out, there's a gnome with a wand of death behind that door! + +# Misc fun +This square deliberately left blank. + +# Viking graffiti +Haermund Hardaxe carved these runes + +# Advertising +Need a light? Come visit the Minetown branch of Izchak's Lighting Store! +Snakes on the Astral Plane - Soon in a dungeon near you +You are the one millionth visitor to this place! Please wait 200 turns for your wand of wishing. + +# DnD +Warning, Exploding runes! From 384f519cc868692de840abcb6b092cd8e72cfd41 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Thu, 19 Mar 2015 22:01:16 +0200 Subject: [PATCH 125/132] Add lots of new random epitaphs --- dat/epitaph.txt | 364 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 364 insertions(+) diff --git a/dat/epitaph.txt b/dat/epitaph.txt index 79019ea45..58bb62228 100644 --- a/dat/epitaph.txt +++ b/dat/epitaph.txt @@ -30,3 +30,367 @@ I made an ash of myself Soon ripe. Soon rotten. Soon gone. But not forgotten. Here lies the body of Jonathan Blake. Stepped on the gas instead of the brake. Go away! +Alas fair Death, 'twas missed in life - some peace and quiet from my wife +Applaud, my friends, the comedy is finished. +At last... a nice long sleep. +Audi Partem Alteram +Basil, assaulted by bears +Burninated +Confusion will be my epitaph +Do not open until Christmas +Don't be daft, they couldn't hit an elephant at this dist- +Don't forget to stop and smell the roses +Don't let this happen to you! +Dulce et decorum est pro patria mori +Et in Arcadia ego +Fatty and skinny went to bed. Fatty rolled over and skinny was dead. Skinny Smith 1983-2000. +Finally I am becoming stupider no more +Follow me to hell +...for famous men have the whole earth as their memorial +Game over, man. Game over. +Go away! I'm trying to take a nap in here! Bloody adventurers... +Gone fishin' +Good night, sweet prince: And flights of angels sing thee to thy rest! +Go Team Ant! +He farmed his way here +Here lies a programmer. Killed by a fatal error. +Here lies Bob - decided to try an acid blob +Here lies Dudley, killed by another %&#@#& newt. +Here lies Gregg, choked on an egg +Here lies Lies. It's True +Here lies The Lady's maid, died of a Vorpal Blade +Here lies the left foot of Jack, killed by a land mine. Let us know if you find any more of him +He waited too long +I'd rather be sailing +If a man's deeds do not outlive him, of what value is a mark in stone? +I'm gonna make it! +I took both pills! +I will survive! +Killed by a black dragon -- This grave is empty +Let me out of here! +Lookin' good, Medusa. +Mrs. Smith, choked on an apple. She left behind grieving husband, daughter, and granddaughter. +Nobody believed her when she said her feet were killing her +No! I don't want to see my damn conduct! +One corpse, sans head +On the whole, I'd rather be in Minetown +On vacation +Oops. +Out to Lunch +SOLD +Someone set us up the bomb! +Take my stuff, I don't need it anymore +Taking a year dead for tax reasons +The reports of my demise are completely accurate +(This space for sale) +This was actually just a pit, but since there was a corpse, we filled it +This way to the crypt +Tu quoque, Brute? +VACANCY +Welcome! +Wish you were here! +Yea, it got me too +You should see the other guy +...and they made me engrave my own headstone too! +...but the blood has stopped pumping and I am left to decay... + +A masochist is never satisfied. +Ach, 'twas a wee monster in the loch +Adapt. Enjoy. Survive. +Adventure, hah! Excitement, hah! +After all, what are friends for... +After this, nothing will shock me +After three days, fish and guests stink +Age and treachery will always overcome youth and skill +Ageing is not so bad. The real killer is when you stop. +Ain't I a stinker? +Algernon +All else failed... +All hail RNG +All right, we'll call it a draw! +All's well that end well +Alone at last! +Always attack a floating eye from behind! +Am I having fun yet? +And I can still crawl, I'm not dead yet! +And all I wanted was a free lunch +And all of the signs were right there on your face +And don't give me that innocent look either! +And everyone died. Boo hoo hoo. +And here I go again... +And nobody cares until somebody famous dies... +And so it ends? +And so... it begins. +And sometimes the bear eats you. +And then 'e nailed me 'ead to the floor! +And they said it couldn't be done! +And what do I look like? The living? +And yes, it was ALL his fault! +And you said it was pretty here... +Another lost soul +Any day above ground is a good day! +Any more of this and I'll die of a stroke before I'm 30. +Anybody seen my head? +Anyone for deathmatch? +Anything for a change. +Anything that kills you makes you ... well, dead +Anything worth doing is worth overdoing. +Are unicorns supposedly peaceful if you're a virgin? Hah! +Are we all being disintegrated, or is it just me? +At least I'm good at something +Attempted suicide +Auri sacra fames +Auribus teneo lupum +Be prepared +Beauty survives +Been Here. Now Gone. Had a Good Time. +Been through Hell, eh? What did you bring me? +Beg your pardon, didn't recognize you, I've changed a lot. +Being dead builds character +Beloved daughter, a treasure, buried here. +Best friends come and go... Mine just die. +Better be dead than a fat slave +Better luck next time +Beware of Discordians bearing answers +Beware the ... +Bloody Hell... +Bloody barbarians! +Blown upward out of sight: He sought the leak by candlelight +Brains... Brains... Fresh human brains... +Buried the cat. Took an hour. Damn thing kept fighting. +But I disarmed the trap! +CONNECT 1964 - NO CARRIER 1994 +Call me if you need my phone number! +Can YOU fly? +Can you believe that thing is STILL moving? +Can you come up with some better ending for this? +Can you feel anything when I do this? +Can you give me mouth to mouth, you just took my breath away. +Can't I just have a LITTLE peril? +Can't eat, can't sleep, had to bury the husband here. +Can't you hit me?! +Chaos, panic and disorder. My work here is done. +Check enclosed. +Check this out! It's my brain! +Chivalry is only reasonably dead +Coffin for sale. Lifetime guarantee. +Come Monday, I'll be all right. +Come and see the violence inherent in the system +Come back here! I'll bite your bloody knees off! +Commodore Business Machines, Inc. Died for our sins. +Complain to one who can help you +Confess my sins to god? Which one? +Confusion will be my epitaph +Cooties? Ain't no cooties on me! +Could somebody get this noose off me? +Could you check again? My name MUST be there. +Could you please take a breath mint? +Couldn't I be sedated for this? +Courage is looking at your setbacks with serenity +Cover me, I'm going in! +Crash course in brain surgery +Cross my fingers for me. +Curse god and die +Cut to fit +De'Ath +Dead Again? Pardon me for not getting it right the first time! +Dead and loving every moment! +Dear wife of mine. Died of a broken heart, after I took it out of her. +Don't tread on me! +Dragon? What dragon? +Drawn and quartered +Either I'm dead or my watch has stopped. +Eliza -- Was I really alive, or did I just think I was? +Elvis +Enter not into the path of the wicked +Eris? I don't need Eris +Eternal Damnation, Come and stay a long while! +Even The Dead pay taxes (and they aren't Grateful). +Even a tomb stone will say good things when you're down! +Ever notice that live is evil backwards? +Every day is starting to look like Monday +Every day, in every way, I am getting better and better. +Every survival kit should include a sense of humor +Evil I did dwell; lewd did I live +Ex post fucto +Excellent day to have a rotten day. +Excuse me for not standing up. +Experience isn't everything. First, You've got to survive +First shalt thou pull out the Holy Pin +For a Breath, I Tarry... +For recreational use only. +For sale: One soul, slightly used. Asking for 3 wishes. +For some moments in life, there are no words. +Forget Disney World, I'm going to Hell! +Forget about the dog, Beware of my wife. +Funeral - Real fun. +Gawd, it's depressing in here, isn't it? +Genuine Exploding Gravestone. (c)Acme Gravestones Inc. +Get back here! I'm not finished yet... +Go ahead, I dare you to! +Go ahead, it's either you or him. +Goldilocks -- This casket is just right +Gone But Not Forgotten +Gone Underground For Good +Gone away owin' more than he could pay. +Gone, but not forgiven +Got a life. Didn't know what to do with it. +Grave? But I was cremated! +Greetings from Hell - Wish you were here. +HELP! It's dark in here... Oh, my eyes are closed - sorry +Ha! I NEVER pay income tax! +Have you come to raise the dead? +Having a good time can be deadly. +Having a great time. Where am I exactly?? +He died of the flux. +He died today... May we rest in peace! +He got the upside, I got the downside. +He lost his face when he was beheaded. +He missed me first. +He's not dead, he just smells that way. +Help! I've fallen and I can't get up! +Help, I can't wake up! +Here lies Pinocchio +Here lies the body of John Round. Lost at sea and never found. +Here there be dragons +Hey, I didn't write this stuff! +Hodie mihi, cras tibi +Hold my calls +Home Sweet Hell +Humpty Dumpty, a Bad Egg. He was pushed off the wall. +I KNEW this would happen if I lived long enough. +I TOLD you I was sick! +I ain't broke but I am badly bent. +I ain't old. I'm chronologically advantaged. +I am NOT a vampire. I just like to bite..nibble, really! +I am here. Wish you were fine. +I am not dead yet, but watch for further reports. +I believe them bones are me. +I broke his brain. +I can feel it. My mind. It's going. I can feel it. +I can't go to Hell. They're afraid I'm gonna take over! +I can't go to hell, they don't want me. +I didn't believe in reincarnation the last time, either. +I didn't mean it when I said 'Bite me' +I died laughing +I disbelieved in reincarnation in my last life, too. +I hacked myself to death +I have all the time in the world +I knew I'd find a use for this gravestone! +I know my mind. And it's around here someplace. +I lied! I'll never be alright! +I like it better in the dark. +I like to be here when I can. +I may rise but I refuse to shine. +I never get any either. +I said hit HIM with the fireball, not me! +I told you I would never say goodbye. +I used to be amusing. Now I'm just disgusting. +I used up all my sick days, so now I'm calling in dead. +I was killed by +I was somebody. Who, is no business of yours. +I will not go quietly. +I'd give you a piece of my mind... but I can't find it. +I'd rather be breathing +I'll be back! +I'll be mellow when I'm dead. For now, let's PARTY! +I'm doing this only for tax purposes. +I'm not afraid of Death! What's he gonna do? Kill me? +I'm not getting enough money, so I'm not going to engrave anything useful here. +I'm not saying anything. +I'm weeth stupeed ---> +If you thought you had problems... +Ignorance kills daily. +Ignore me... I'm just here for my looks! +Ilene Toofar -- Fell off a cliff +Is that all? +Is there life before Death? +Is this a joke, or a grave matter? +It happens sometimes. People just explode. +It must be Thursday. I never could get the hang of Thursdays. +It wasn't a fair fight +It wasn't so easy. +It's Loot, Pillage and THEN Burn... +Just doing my job here +Killed by diarrhea of mouth and constipation of brain. +Let her RIP +Let it be; I am dead. +Let's play Hide the Corpse +Life is NOT a dream +Madge Ination -- It wasn't all in my head +Meet me in Heaven +Move on, there's nothing to see here. +Mr. Flintstone -- Yabba-dabba-done +My heart is not in this +No one ever died from it +No, you want room 12A, next door. +Nope. No trap on that chest. I swear. +Not again! +Not every soil can bear all things +Now I have a life +Now I lay thee down to sleep... wanna join me? +OK, here is a question: Where ARE your tanlines? +Obesa Cantavit +Oh! An untimely death. +Oh, by the way, how was my funeral? +Oh, honey..I missed you! She said, and fired again. +Ok, so the light does go off. Now let me out of here. +One stone brain +Ooh! Somebody STOP me! +Oops! +Out for the night. Leave a message. +Ow! Do that again! +Pardon my dust. +Part of me still works. +Please, not in front of those orcs! +Prepare to meet me in Heaven +R2D2 -- Rest, Tin Piece +Relax. Nothing ever happens on the first level. +Res omnia mea culpa est +Rest In Pieces +Rest, rest, perturbed spirit. +Rip Torn +She always said her feet were killing her but nobody believed her. +She died of a chest cold. +So let it be written, so let it be done! +So then I says, How do I know you're the real angel of death? +Some patients insist on dying. +Some people have it dead easy, don't they? +Some things are better left buried. +Sure, trust me, I'm a lawyer... +Thank God I wore my corset, because I think my sides have split. +That is all +The Gods DO have a sense of humor: I'm living proof! +The frog's dead. He Kermitted suicide. +This dungeon is a pushover +This elevator doesn't go to Heaven +This gravestone is shareware. To register, please send me 10 zorkmids +This gravestone provided by The Yendorian Grave Services Inc. +This is not an important part of my life. +This one's on me. +This side up +Tim Burr -- Smashed by a tree +Tone it down a bit, I'm trying to get some rest here. +Virtually Alive +We Will Meet Again. +Weep not, he is at rest +Welcome to Dante's. What level please? +Well, at least they listened to my sermon... +Went to be an angel. +What are you doing over there? +What are you smiling at? +What can you say, Death's got appeal...! +What health care? +What pit? +When the gods want to punish you, they answer your prayers. +Where e'er you be let your wind go free. Keeping it in was the death of me! +Where's my refund? +Will let you know for sure in a day or two... +Wizards are wimps +Worms at work, do not disturb! +Would you mind moving a bit? I'm short of breath down here. +Would you quit being evil over my shoulder? +Ya really had me going baby, but now I'm gone. +Yes Dear, just a few more minutes... +You said it wasn't poisonous! +You set my heart aflame. You gave me heartburn. From f2dc48086f4c36102a1bbeee713e2006e2a1660b Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 19 Mar 2015 15:54:17 -0700 Subject: [PATCH 126/132] acid explosion messages from water_damage() Restore the variant phrasing used when more than one stack of potions of acid explode while being inflicted with water damage. First message: "a potion explodes" or "some potions explode"; second and subsequent messages: "another potion explodes" or "more potions explode". This trivial feature stopped working when erosion handling was overhauled and old water_damage was split into current water_damage_chain+water_damage. Augment the message so that vague "potion" is only used when the object's dknown flag isn't set (ie, object hasn't been seen yet). Use " potion" or "potion of acid" otherwise, depending upon whether such potions have been fully discovered. --- src/trap.c | 56 +++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 45 insertions(+), 11 deletions(-) diff --git a/src/trap.c b/src/trap.c index beb24ad9a..a0c6fa1b1 100644 --- a/src/trap.c +++ b/src/trap.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 trap.c $NHDT-Date: 1426558928 2015/03/17 02:22:08 $ $NHDT-Branch: master $:$NHDT-Revision: 1.195 $ */ +/* NetHack 3.5 trap.c $NHDT-Date: 1426805491 2015/03/19 22:51:31 $ $NHDT-Branch: water_damage $:$NHDT-Revision: 1.198 $ */ /* NetHack 3.5 trap.c $Date: 2013/03/14 01:58:21 $ $Revision: 1.179 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -3145,6 +3145,14 @@ struct obj *obj; erode_obj(obj, NULL, ERODE_CORRODE, EF_GREASE | EF_VERBOSE); } +/* context for water_damage(), managed by water_damage_chain(); + when more than one stack of potions of acid explode while processing + a chain of objects, use alternate phrasing after the first message */ +static struct h2o_ctx { + int dkn_boom, unk_boom; /* track dknown, !dknown separately */ + boolean ctx_valid; +} acid_ctx = { 0, 0, FALSE }; + /* Get an object wet and damage it appropriately. * "ostr", if present, is used instead of the object name in some * messages. @@ -3157,8 +3165,6 @@ struct obj *obj; const char *ostr; boolean force; { - boolean exploded = FALSE; - if (!obj) return ER_NOTHING; if (snuff_lit(obj)) @@ -3203,18 +3209,36 @@ boolean force; return ER_DAMAGED; } else if (obj->oclass == POTION_CLASS) { if (obj->otyp == POT_ACID) { - char *bufp, buf[BUFSZ]; - boolean one = (obj->quan == 1L); - boolean update = carried(obj); + char *bufp; + boolean one = (obj->quan == 1L), + update = carried(obj), + exploded = FALSE; - bufp = strcpy(buf, "potion"); - if (!one) bufp = makeplural(bufp); - /* [should we damage player/monster?] */ + if (Blind && !carried(obj)) obj->dknown = 0; + if (acid_ctx.ctx_valid) + exploded = ((obj->dknown ? acid_ctx.dkn_boom + : acid_ctx.unk_boom) > 0); + /* First message is + * "a [potion| potion|potion of acid] explodes" + * depending on obj->dknown (potion has been seen) and + * objects[POT_ACID].oc_name_known (fully discovered), + * or "some {plural version} explode" when relevant. + * Second and subsequent messages for same chain and + * matching dknown status are + * "another [potion| &c] explodes" or plural + * variant. + */ + bufp = simpleonames(obj); pline("%s %s %s!", /* "A potion explodes!" */ !exploded ? (one ? "A" : "Some") : - (one ? "Another" : "More"), + (one ? "Another" : "More"), bufp, vtense(bufp, "explode")); - exploded = TRUE; + if (acid_ctx.ctx_valid) { + if (obj->dknown) + acid_ctx.dkn_boom++; + else + acid_ctx.unk_boom++; + } setnotworn(obj); delobj(obj); if (update) @@ -3246,10 +3270,20 @@ struct obj *obj; boolean here; { struct obj *otmp; + + /* initialize acid context: so far, neither seen (dknown) potions of + acid nor unseen have exploded during this water damage sequence */ + acid_ctx.dkn_boom = acid_ctx.unk_boom = 0; + acid_ctx.ctx_valid = TRUE; + for (; obj; obj = otmp) { otmp = here ? obj->nexthere : obj->nobj; water_damage(obj, NULL, FALSE); } + + /* reset acid context */ + acid_ctx.dkn_boom = acid_ctx.unk_boom = 0; + acid_ctx.ctx_valid = FALSE; } /* From 2ec4ff0b8c35be3f4a44b4928ee72199df46a40c Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Fri, 20 Mar 2015 19:25:19 +0200 Subject: [PATCH 127/132] Fix C343-108 (e- leaves prompt on screen) You'll get "You mime eating something." --- include/extern.h | 1 + src/hacklib.c | 33 +++++++++++++++++++++++++++++++++ src/invent.c | 10 +++++++++- 3 files changed, 43 insertions(+), 1 deletion(-) diff --git a/include/extern.h b/include/extern.h index 23d10d324..1ba3e110f 100644 --- a/include/extern.h +++ b/include/extern.h @@ -813,6 +813,7 @@ E void FDECL(copynchars, (char *,const char *,int)); E char FDECL(chrcasecpy, (int,int)); E char *FDECL(strcasecpy, (char *,const char *)); E char *FDECL(s_suffix, (const char *)); +E char *FDECL(ing_suffix, (const char *)); E char *FDECL(xcrypt, (const char *,char *)); E boolean FDECL(onlyspace, (const char *)); E char *FDECL(tabexpand, (char *)); diff --git a/src/hacklib.c b/src/hacklib.c index fd4273074..005aa02b9 100644 --- a/src/hacklib.c +++ b/src/hacklib.c @@ -235,6 +235,39 @@ s_suffix(s) /* return a name converted to possessive */ return buf; } +char * +ing_suffix(s) + const char *s; +{ + const char *vowel = "aeiouy"; + static char buf[BUFSZ]; + char onoff[10]; + char *p; + Strcpy(buf, s); + p = eos(buf); + onoff[0] = *p = *(p+1) = '\0'; + if ((strlen(buf) > 4) && + (!strcmpi(p-3, " on") || + !strcmpi(p-4, " off") || + !strcmpi(p-5, " with"))) { + p = strrchr(buf, ' '); + Strcpy(onoff, p); + } + if (!index(vowel, *(p-1)) && index(vowel, *(p-2)) && !index(vowel, *(p-3))) { + /* tip -> tipp + ing */ + *p = *(p-1); + *(p+1) = '\0'; + } else if (!strcmpi(p-2, "ie")) { /* vie -> vy + ing */ + *(p-2) = 'y'; + *(p-1) = '\0'; + } else if (*(p-1) == 'e') /* grease -> greas + ing */ + *(p-1) = '\0'; + Strcat(buf, "ing"); + if (onoff[0]) Strcat(buf, onoff); + return buf; +} + + char * xcrypt(str, buf) /* trivial text encryption routine (see makedefs) */ const char *str; diff --git a/src/invent.c b/src/invent.c index 24213c7e3..66e7e7307 100644 --- a/src/invent.c +++ b/src/invent.c @@ -972,7 +972,15 @@ register const char *let,*word; return((struct obj *)0); } if(ilet == '-') { - return(allownone ? &zeroobj : (struct obj *) 0); + if (!allownone) { + strcpy(buf, word); + if ((bp = strstr(buf, " or ")) != NULL) { + *bp = '\0'; + bp = (rn2(2) ? buf : (bp + 4)); + } else bp = buf; + You("mime %s something.", ing_suffix(bp)); + } + return(allownone ? &zeroobj : (struct obj *) 0); } if(ilet == def_oc_syms[COIN_CLASS].sym) { if (!usegold) { From 66d642fad92368e8b8a7fb3f6fb42357845db5fa Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 20 Mar 2015 22:06:28 -0400 Subject: [PATCH 128/132] more mswin cmdline Makefile tweaks --- sys/winnt/Makefile.msc | 223 +++++++++++++---------------------------- 1 file changed, 70 insertions(+), 153 deletions(-) diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index 4be6dd3ab..0216092cc 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -13,8 +13,10 @@ # #============================================================================== # This is used for building two versions of NetHack: +# # A tty port utilizing the Win32 Console I/O subsystem, Console # NetHack; +# # A Win32 native port built on the Windows API, Graphical NetHack or # NetHackW. # @@ -186,38 +188,11 @@ guilibs = $(winlibs) # Exe File Info. #========================================== -# Yacc/Lex ... if you got 'em. # -# If you have yacc and lex programs (or work-alike such as bison -# and flex), comment out the upper two macros and uncomment -# the lower two. -# - -DO_YACC = YACC_MSG -DO_LEX = LEX_MSG -#DO_YACC = YACC_ACT -#DO_LEX = LEX_ACT - -# - Specify your yacc and lex programs (or work-alikes) here. - -#YACC = bison -y -YACC = byacc -#YACC = yacc - -#LEX = lex -LEX = flex - -# -# - Specify your flex skeleton file (if needed). -# - -FLEXSKEL = -#FLEXSKEL = -S../tools/flex.ske - -YTABC = y_tab.c -YTABH = y_tab.h -LEXYYC = lexyy.c - +# For the level compiler bits, +# we just defer to win\win32\dgnstuff.mak +# and win\win32\levstuff.mak +# # # Optional high-quality BSD random number generation routines # (see pcconf.h). Set to nothing if not used. @@ -305,9 +280,6 @@ PDBFILE= /PDB:"$(O)$(GAME).PDB" MAPFILE= /MAP:"$(O)$(GAME).MAP" INCLDIR= /I..\include -ldebug=/DEBUG -cdebug = -Zi -Od - !IF ("$(ldebug)" != "") !IF ("$(ldebug)" != "/RELEASE") ldebug = /DEBUG @@ -344,14 +316,14 @@ LIBS= user32.lib winmm.lib $(ZLIB) !IF ("$(GRAPHICAL)"=="Y") cflagsGame = $(cdebug) $(cflags2) $(guiflags) $(INCLDIR) \ - $(WINPFLAG) $(DLBFLG) -lflagsGame = $(ldebug) $(lflags) $(guilibs) $(GAMEPDBFILE) $(GAMEMAPFILE) + $(WINPFLAG) $(DLBFLG) $(GAMEPDBFILE) $(GAMEMAPFILE) +lflagsGame = $(ldebug) $(lflags) $(guilibs) !ELSE cflagsGame = $(cdebug) $(cflags2) $(conflags) $(INCLDIR) \ - $(WINPFLAG) $(DLBFLG) -lflagsGame = $(ldebug) $(lflags) $(conlibs) $(GAMEPDBFILE) $(GAMEMAPFILE) + $(WINPFLAG) $(DLBFLG) $(GAMEPDBFILE) $(GAMEMAPFILE) +lflagsGame = $(ldebug) $(lflags) $(conlibs) !ENDIF @@ -454,19 +426,20 @@ U = $(UTIL)^\ MAKESRC = $(U)makedefs.c -SPLEVSRC = $(U)lev_yacc.c $(U)lev_$(LEX).c $(U)lev_main.c $(U)panic.c - -DGNCOMPSRC = $(U)dgn_yacc.c $(U)dgn_$(LEX).c $(U)dgn_main.c - MAKEOBJS = $(O)makedefs.o $(O)monst.o $(O)objects.o -SPLEVOBJS = $(O)lev_yacc.o $(O)lev_$(LEX).o $(O)lev_main.o \ +#SPLEVOBJS = $(O)lev_yacc.o $(O)lev_lex.o $(O)lev_main.o \ +# $(O)alloc.o $(O)decl.o $(O)drawing.o \ +# $(O)monst.o $(O)objects.o $(O)panic.o + +SPLEVOBJS = $(O)lev_yacc.o $(O)lev_lex.o $(O)lev_main.o \ $(O)alloc.o $(O)decl.o $(O)drawing.o \ $(O)monst.o $(O)objects.o $(O)panic.o -DGNCOMPOBJS = $(O)dgn_yacc.o $(O)dgn_$(LEX).o $(O)dgn_main.o \ +DGNCOMPOBJS = $(O)dgn_yacc.o $(O)dgn_lex.o $(O)dgn_main.o \ $(O)alloc.o $(O)panic.o + RECOVOBJS = $(O)recover.o TILEFILES = $(WSHR)\monsters.txt $(WSHR)\objects.txt $(WSHR)\other.txt @@ -610,7 +583,6 @@ all : install install: envchk $(GAME) $(O)install.tag @echo Done. - $(O)install.tag: $(DAT)\data $(DAT)\rumors $(DAT)\dungeon \ $(DAT)\oracles $(DAT)\quest.dat $(O)sp_lev.tag $(DLB) ! IF ("$(USE_DLB)"=="Y") @@ -845,11 +817,11 @@ $(SRC)\vis_tab.c: $(U)makedefs.exe $(U)makedefs -z $(DAT)\engrave: $(DAT)\engrave.txt $(U)makedefs.exe - ../util/makedefs -s + ..\util\makedefs -s $(DAT)\epitaph: $(DAT)\epitaph.txt $(U)makedefs.exe - ../util/makedefs -s + ..\util\makedefs -s $(DAT)\bogusmon: $(DAT)\bogusmon.txt $(U)makedefs.exe - ../util/makedefs -s + ..\util\makedefs -s #========================================== @@ -902,71 +874,55 @@ $(WIN32)\splash.bmp: $(U)uudecode.exe $(WIN32)\splash.uu ..\..\util\uudecode.exe splash.uu chdir ..\..\src -#========================================== +#================================================= # Level Compiler Stuff -#========================================== +#================================================= +# +# defer to the steps in ..\win\win32\levstuff.mak +# -LEVCFLAGS=-c -nologo -DWINVER=0x0400 -DWIN32 -D_WIN32 \ - -D_MT -MT -I..\include -nologo -Z7 -Od -DDLB +$(U)lev_yacc.c $(INCL)\lev_comp.h: $(U)lev_comp.y + nmake -nologo -f ..\win\win32\levstuff.mak default + +LEVCFLAGS=-c -nologo -DWIN32 -D_WIN32 -I$(INCL) -nologo -Z7 -Od -DDLB + +$(O)lev_yacc.o: $(HACK_H) $(SP_LEV_H) $(INCL)\lev_comp.h $(U)lev_yacc.c + $(CC) $(LEVCFLAGS) -W0 -Fo$@ $(U)lev_yacc.c + +$(O)lev_lex.o: $(HACK_H) $(INCL)\lev_comp.h $(SP_LEV_H) \ + $(U)lev_lex.c + $(CC) $(LEVCFLAGS) -W0 -Fo$@ $(U)lev_lex.c + +$(O)lev_main.o: $(U)lev_main.c $(HACK_H) $(SP_LEV_H) + $(CC) $(LEVCFLAGS) -W0 -Fo$@ $(U)lev_main.c $(U)levcomp.exe: $(SPLEVOBJS) @echo Linking $@... - @$(link) $(lflagsUtil) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk + echo $(link) + echo $(lflagsUtil) + $(link) $(lflagsUtil) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk $(SPLEVOBJS:^ =^ ) << -$(O)lev_yacc.o: $(HACK_H) $(SP_LEV_H) $(INCL)\lev_comp.h $(U)lev_yacc.c - @$(CC) $(LEVCFLAGS) -W0 -Fo$@ $(U)lev_yacc.c - -$(O)lev_$(LEX).o: $(HACK_H) $(INCL)\lev_comp.h $(SP_LEV_H) \ - $(U)lev_$(LEX).c - @$(CC) $(LEVCFLAGS) -W0 -Fo$@ $(U)lev_$(LEX).c - -$(O)lev_main.o: $(U)lev_main.c $(HACK_H) $(SP_LEV_H) - @$(CC) $(LEVCFLAGS) -W0 -Fo$@ $(U)lev_main.c - - -$(U)lev_yacc.c $(INCL)\lev_comp.h : $(U)lev_comp.y -! IF "$(DO_YACC)"=="YACC_ACT" - chdir $(UTIL) - $(YACC) -d lev_comp.y - copy $(YTABC) lev_yacc.c - copy $(YTABH) $(INCL)\lev_comp.h - @del $(YTABC) - @del $(YTABH) - chdir $(SRC) -! ELSE - @echo $(U)lev_comp.y has changed. - @echo To update $(U)lev_yacc.c and $(INCL)\lev_comp.h run $(YACC). - @echo --- - @echo For now, we will copy the prebuilt lev_yacc.c and - @echo lev_comp.h from $(SSYS) into $(UTIL) and use them. - @copy $(SSYS)\lev_yacc.c $(U)lev_yacc.c >nul - @copy $(SSYS)\lev_comp.h $(INCL)\lev_comp.h >nul - @echo /**/ >>$(U)lev_yacc.c - @echo /**/ >>$(INCL)\lev_comp.h -! ENDIF - -$(U)lev_$(LEX).c: $(U)lev_comp.l -! IF "$(DO_LEX)"=="LEX_ACT" - chdir $(UTIL) - $(LEX) $(FLEXSKEL) lev_comp.l - copy $(LEXYYC) $@ - @del $(LEXYYC) - chdir $(SRC) -! ELSE - @echo $(U)lev_comp.l has changed. To update $@ run $(LEX). - @echo --- - @echo For now, we will copy the prebuilt lev_lex.c - @echo from $(SSYS) into $(UTIL) and use it. - @copy $(SSYS)\lev_lex.c $@ >nul - @echo /**/ >>$@ -! ENDIF - -#========================================== +#================================================= # Dungeon Compiler Stuff -#========================================== +#================================================= +# +# defer to the steps in ..\win\win32\dgnstuff.mak +# +$(U)dgn_yacc.c $(INCL)\dgn_comp.h : $(U)dgn_comp.y + nmake -nologo -f ..\win\win32\dgnstuff.mak default + +$(O)dgn_yacc.o: $(HACK_H) $(DGN_FILE_H) $(INCL)\dgn_comp.h $(U)dgn_yacc.c + @$(CC) $(LEVCFLAGS) -W0 -Fo$@ $(U)dgn_yacc.c + +$(O)dgn_lex.o: $(HACK_H) $(DGN_FILE_H) $(INCL)\dgn_comp.h \ + $(U)dgn_lex.c + @$(CC) $(LEVCFLAGS) -W0 -Fo$@ $(U)dgn_lex.c + +$(O)dgn_main.o: $(HACK_H) $(U)dgn_main.c + @$(CC) $(LEVCFLAGS) -W0 -Fo$@ $(U)dgn_main.c $(U)dgncomp.exe: $(DGNCOMPOBJS) @echo Linking $@... @@ -975,56 +931,9 @@ $(U)dgncomp.exe: $(DGNCOMPOBJS) ) << -$(O)dgn_yacc.o: $(HACK_H) $(DGN_FILE_H) $(INCL)\dgn_comp.h $(U)dgn_yacc.c - @$(CC) $(LEVCFLAGS) -W0 -Fo$@ $(U)dgn_yacc.c - -$(O)dgn_$(LEX).o: $(HACK_H) $(DGN_FILE_H) $(INCL)\dgn_comp.h \ - $(U)dgn_$(LEX).c - @$(CC) $(LEVCFLAGS) -W0 -Fo$@ $(U)dgn_$(LEX).c - -$(O)dgn_main.o: $(HACK_H) $(U)dgn_main.c - @$(CC) $(LEVCFLAGS) -W0 -Fo$@ $(U)dgn_main.c - -$(U)dgn_yacc.c $(INCL)\dgn_comp.h : $(U)dgn_comp.y -! IF "$(DO_YACC)"=="YACC_ACT" - chdir $(UTIL) - $(YACC) -d dgn_comp.y - copy $(YTABC) dgn_yacc.c - copy $(YTABH) $(INCL)\dgn_comp.h - @del $(YTABC) - @del $(YTABH) - chdir $(SRC) -! ELSE - @echo $(U)dgn_comp.y has changed. To update dgn_yacc.c and - @echo $(INCL)\dgn_comp.h run $(YACC). - @echo --- - @echo For now, we will copy the prebuilt $(U)dgn_yacc.c and - @echo dgn_comp.h from $(SSYS) into $(UTIL) and use them. - @copy $(SSYS)\dgn_yacc.c $(U)dgn_yacc.c >nul - @copy $(SSYS)\dgn_comp.h $(INCL)\dgn_comp.h >nul - @echo /**/ >>$(U)dgn_yacc.c - @echo /**/ >>$(INCL)\dgn_comp.h -! ENDIF - -$(U)dgn_$(LEX).c: $(U)dgn_comp.l -! IF "$(DO_LEX)"=="LEX_ACT" - chdir $(UTIL) - $(LEX) $(FLEXSKEL) dgn_comp.l - copy $(LEXYYC) $@ - @del $(LEXYYC) - chdir $(SRC) -! ELSE - @echo $(U)dgn_comp.l has changed. To update $@ run $(LEX). - @echo --- - @echo For now, we will copy the prebuilt dgn_lex.c - @echo from $(SSYS) into $(UTIL) and use it. - @copy $(SSYS)\dgn_lex.c $@ >nul - @echo /**/ >>$@ -! ENDIF - -#========================================== +#================================================= # Create directory for holding object files -#========================================== +#================================================= $(O)obj.tag: @if not exist $(OBJ)\*.* echo creating directory $(OBJ) @@ -1062,7 +971,7 @@ envchk: #========================================== #=========================================== -# Header files NOT distributed in ..\include +# Header files NOT distributed in $(INCL) #=========================================== $(INCL)\win32api.h: $(NTSYS)\win32api.h @@ -1339,6 +1248,14 @@ clean: if exist $(O)sp_lev.tag del $(O)sp_lev.tag if exist $(O)uudecode.MAP del $(O)uudecode.MAP if exist $(O)uudecode.PDB del $(O)uudecode.PDB + rem + rem defer to the steps in ..\win\win32\levstuff.mak + rem + nmake -nologo -f ..\win\win32\levstuff.mak clean + rem + rem defer to the steps in ..\win\win32\dgnstuff.mak + rem + nmake -nologo -f ..\win\win32\dgnstuff.mak clean ! IF ("$(WINPFLAG)"!="") if exist $(TILEBMP16) del $(TILEBMP16) From 3434a157f816de2c9b47eb3360ff93f763081708 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sat, 21 Mar 2015 11:03:54 +0200 Subject: [PATCH 129/132] More C343-108: Handle "rub on the stone" --- src/invent.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/invent.c b/src/invent.c index 66e7e7307..12f0ef1b3 100644 --- a/src/invent.c +++ b/src/invent.c @@ -973,12 +973,18 @@ register const char *let,*word; } if(ilet == '-') { if (!allownone) { + char *suf = NULL; strcpy(buf, word); + if ((bp = strstr(buf, " on the ")) != NULL) { /* rub on the stone[s] */ + *bp = '\0'; + suf = (bp + 1); + } if ((bp = strstr(buf, " or ")) != NULL) { *bp = '\0'; bp = (rn2(2) ? buf : (bp + 4)); } else bp = buf; - You("mime %s something.", ing_suffix(bp)); + You("mime %s something%s%s.", ing_suffix(bp), + suf ? " " : "", suf ? suf : ""); } return(allownone ? &zeroobj : (struct obj *) 0); } From 6fcc030f37c07aacef9251ad62b2f91fecfe8f0c Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sat, 21 Mar 2015 13:40:07 +0200 Subject: [PATCH 130/132] Make HoOA alignment change depend on object ID The same Helm of opposite alignment will always make the same alignment change for neutrals. --- src/do_wear.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/do_wear.c b/src/do_wear.c index 9925ceaf0..39d3b6c3f 100644 --- a/src/do_wear.c +++ b/src/do_wear.c @@ -391,7 +391,7 @@ Helmet_on(VOID_ARGS) properties, including levitation; uarmh could get dropped or destroyed here */ uchangealign((u.ualign.type != A_NEUTRAL) ? -u.ualign.type : - rn2(2) ? A_CHAOTIC : A_LAWFUL, 1); + (uarmh->o_id % 2) ? A_CHAOTIC : A_LAWFUL, 1); /* makeknown(uarmh->otyp); -- moved below, after xname() */ /*FALLTHRU*/ case DUNCE_CAP: From e3eb74166fc238a55e8c1dcc0332155855b7ce92 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 21 Mar 2015 10:46:11 -0400 Subject: [PATCH 131/132] obj change to support some upcoming work This is an enabling patch for upcoming work. It breaks save/bones so editlevel is incremented. I'd like to a second overloadable int field in struct obj, instead of just the one that is typically overloaded - corpsenm. The second one can be used for things that are being tallied up as opposed to a static one time assignment for reference/linkage purposes. The differentiation will allow both uses to co-exist for the same object. --- include/obj.h | 5 +++-- include/patchlevel.h | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/obj.h b/include/obj.h index f4fd78007..7af927919 100644 --- a/include/obj.h +++ b/include/obj.h @@ -1,4 +1,4 @@ -/* NetHack 3.5 obj.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 obj.h $NHDT-Date: 1426949157 2015/03/21 14:45:57 $ $NHDT-Branch: master $:$NHDT-Revision: 1.36 $ */ /* NetHack 3.5 obj.h $Date: 2012/01/10 17:47:16 $ $Revision: 1.31 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -107,9 +107,10 @@ struct obj { int corpsenm; /* type of corpse is mons[corpsenm] */ #define leashmon corpsenm /* gets m_id of attached pet */ -#define spestudied corpsenm /* # of times a spellbook has been studied */ #define fromsink corpsenm /* a potion from a sink */ #define record_achieve_special corpsenm + int usecount; /* overloaded for various things that tally */ +#define spestudied usecount /* # of times a spellbook has been studied */ unsigned oeaten; /* nutrition left in food, if partly eaten */ long age; /* creation date */ long owornmask; diff --git a/include/patchlevel.h b/include/patchlevel.h index 02b8b3bfa..eab90e89f 100644 --- a/include/patchlevel.h +++ b/include/patchlevel.h @@ -1,4 +1,4 @@ -/* NetHack 3.5 patchlevel.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 patchlevel.h $NHDT-Date: 1426948844 2015/03/21 14:40:44 $ $NHDT-Branch: master $:$NHDT-Revision: 1.95 $ */ /* NetHack 3.5 patchlevel.h $Date: 2012/04/14 08:31:03 $ $Revision: 1.93 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -14,10 +14,10 @@ * Incrementing EDITLEVEL can be used to force invalidation of old bones * and save files. */ -#define EDITLEVEL 57 +#define EDITLEVEL 58 #define COPYRIGHT_BANNER_A \ -"NetHack, Copyright 1985-2012" +"NetHack, Copyright 1985-2015" #define COPYRIGHT_BANNER_B \ " By Stichting Mathematisch Centrum and M. Stephenson." /* COPYRIGHT_BANNER_C is generated by makedefs into date.h */ From c9df82fb42aa95c2b1c220c28197953c68725825 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sat, 21 Mar 2015 16:49:31 +0200 Subject: [PATCH 132/132] Update hacklib func comment doc --- src/hacklib.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hacklib.c b/src/hacklib.c index 005aa02b9..1c091b8f6 100644 --- a/src/hacklib.c +++ b/src/hacklib.c @@ -26,6 +26,7 @@ NetHack, except that rounddiv may call panic(). char chrcasecpy (int,int) char * strcasecpy (char *,const char *) char * s_suffix (const char *) + char * ing_suffix (const char *) char * xcrypt (const char *, char *) boolean onlyspace (const char *) char * tabexpand (char *)