Merge branch 'master' into mac-build-tty-pkg
This commit is contained in:
+3
-2
@@ -4,7 +4,7 @@
|
||||
|___/\___|\_/\___|_\___/ .__/\___|_|
|
||||
|_|
|
||||
|
||||
$NHDT-Date: 1429884664 2015/04/24 14:11:04 $
|
||||
$NHDT-Date: 1447180052 2015/11/10 18:27:32 $
|
||||
|
||||
Welcome to the NetHack Infrastructure Developer's Guide.
|
||||
|
||||
@@ -58,7 +58,8 @@ A. If you have never set up git on this machine before:
|
||||
You probably want to set up a credential cache.
|
||||
Mac OS X:
|
||||
git config --global credential.helper osxkeychain
|
||||
XXX windows
|
||||
Windows:
|
||||
git config --global credential.helper store
|
||||
XXX linux
|
||||
B. Specify the prefix for variable substitution:
|
||||
(This assumes you are not a member of DevTeam or any variant's development
|
||||
|
||||
@@ -6,7 +6,7 @@ from or not transferred to your system if you wish.
|
||||
|
||||
.:
|
||||
(files in top directory)
|
||||
Files Porting README
|
||||
DEVEL Files Porting README
|
||||
|
||||
dat:
|
||||
(files for all versions)
|
||||
@@ -272,9 +272,10 @@ mnsel.uu mnselcnt.uu mnunsel.uu mswproc.c
|
||||
petmark.uu pilemark.uu resource.h rip.uu splash.uu
|
||||
tiles.mak winMS.h winhack.c winhack.rc
|
||||
(files for Visual Studio 2010 Express Edition builds)
|
||||
dgncomp.vcxproj dgnstuff.vcxproj dgnstuff.mak dlb_main.vcxproj levcomp.vcxproj
|
||||
levstuff.vcxproj levstuff.mak makedefs.vcxproj NetHack.sln uudecode.vcxproj
|
||||
NetHackW.vcxproj tile2bmp.vcxproj recover.vcxproj tilemap.vcxproj tiles.vcxproj
|
||||
dgncomp.vcxproj dgnstuff.vcxproj dgnstuff.mak dlb_main.vcxproj
|
||||
levcomp.vcxproj levstuff.vcxproj levstuff.mak makedefs.vcxproj
|
||||
NetHack.sln uudecode.vcxproj NetHackW.vcxproj tile2bmp.vcxproj
|
||||
recover.vcxproj tilemap.vcxproj tiles.vcxproj
|
||||
|
||||
This is a list of files produced by auxiliary programs. They can all be
|
||||
regenerated from the files in the distribution.
|
||||
@@ -352,6 +353,21 @@ tiletxt.c
|
||||
(files generated for win32 at compile time)
|
||||
uudecode.exe
|
||||
|
||||
DEVEL:
|
||||
(files for people developing changes to NetHack)
|
||||
DOTGIT code_style.txt nhgitset.pl
|
||||
Developer.txt git_recipes.txt
|
||||
code_features.txt hooksdir
|
||||
|
||||
DEVEL/hooksdir:
|
||||
NHadd nhsub pre-auto-gc
|
||||
NHgithook.pm post-applypatch pre-commit
|
||||
NHsubst post-checkout pre-push
|
||||
NHtext post-commit pre-rebase
|
||||
TARGET post-merge prepare-commit-msg
|
||||
applypatch-msg post-rewrite
|
||||
commit-msg pre-applypatch
|
||||
|
||||
.:
|
||||
(files for win32 that are moved into . at compile time)
|
||||
nethack.dsw
|
||||
|
||||
@@ -57,12 +57,14 @@ 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.6 has been tested to run/compile on:
|
||||
At the time of this release, NetHack 3.6 has been tested to run/compile
|
||||
on:
|
||||
|
||||
Intel Pentium or better (or clone) running Linux, BSDI, or
|
||||
Windows (XP through 8.1)
|
||||
Windows (XP through 10)
|
||||
Intel 80386 or greater (or clone) boxes running Linux, or BSDI
|
||||
Mac OS X 10.9
|
||||
OpenVMS (aka VMS) V8.4 on Alpha and on Integrity/Itanium/IA64
|
||||
|
||||
Previous versions of NetHack were tested and known to run on the
|
||||
following systems, but it is unknown if they can still build and
|
||||
@@ -107,8 +109,8 @@ Please read items (1), (2) and (3) BEFORE doing anything with your new code.
|
||||
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:
|
||||
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
|
||||
|
||||
@@ -3,6 +3,7 @@ oracles
|
||||
data
|
||||
rip.xpm
|
||||
pet_mark.xbm
|
||||
pilemark.xbm
|
||||
quest.dat
|
||||
rumors
|
||||
bogusmon
|
||||
|
||||
+61
-55
@@ -11,7 +11,8 @@ UNIX(tm) machines to the Usenet.
|
||||
|
||||
Don G. Kneller ported Hack 1.0.3 to Microsoft(tm) C and MS-DOS(tm), producing
|
||||
PC HACK 1.01e, added support for DEC Rainbow graphics in version 1.03g, and
|
||||
went on to produce at least four more versions (3.0, 3.2, 3.51, and 3.6).
|
||||
went on to produce at least four more versions (3.0, 3.2, 3.51, and 3.6;
|
||||
note that these are old Hack version numbers, not contemporary NetHack ones).
|
||||
|
||||
R. Black ported PC HACK 3.51 to Lattice(tm) C and the Atari 520/1040ST,
|
||||
producing ST Hack 1.03.
|
||||
@@ -20,7 +21,7 @@ Mike Stephenson merged these various versions back together, incorporating
|
||||
many of the added features, and produced NetHack version 1.4 in 1987. He
|
||||
then coordinated a cast of thousands in enhancing and debugging NetHack 1.4
|
||||
and released NetHack versions 2.2 and 2.3.
|
||||
|
||||
|
||||
Later, Mike coordinated a major rewrite of the game, heading a team which
|
||||
included Ken Arromdee, Jean-Christophe Collet, Steve Creps, Eric Hendrickson,
|
||||
Izchak Miller, Eric S. Raymond, John Rupley, Mike Threepoint, and Janet Walz,
|
||||
@@ -37,7 +38,7 @@ Spackman and Pierre Martineau designed overlay code for PC NetHack 3.0.
|
||||
Johnny Lee ported NetHack 3.0 to the Macintosh. Along with various other
|
||||
Dungeoneers, they continued to enhance the PC, Macintosh, and Amiga ports
|
||||
through the later revisions of 3.0.
|
||||
|
||||
|
||||
Headed by Mike Stephenson and coordinated by Izchak Miller and Janet Walz,
|
||||
the development team which now included Ken Arromdee, David Cohrs,
|
||||
Jean-Christophe Collet, Kevin Darcy, Matt Day, Timo Hakulinen, Steve Linhart,
|
||||
@@ -56,7 +57,7 @@ Spackman, Steve VanDevender, and Paul Winner, ported NetHack 3.1 to the PC.
|
||||
Jon W{tte and Hao-yang Wang, with help from Ross Brown, Mike Engber, David
|
||||
Hairston, Michael Hamel, Jonathan Handler, Johnny Lee, Tim Lennan, Rob Menke,
|
||||
and Andy Swanson developed NetHack 3.1 for the Macintosh, porting it for
|
||||
MPW. Building on their development, Barton House added a Think C port.
|
||||
MPW. Building on their development, Barton House added a Think C port.
|
||||
|
||||
Timo Hakulinen ported NetHack 3.1 to OS/2. Eric Smith ported NetHack 3.1
|
||||
to the Atari. Pat Rankin, with help from Joshua Delahunty, is responsible
|
||||
@@ -103,17 +104,17 @@ DevTeam and incorporated the best of these ideas in NetHack 3.3.
|
||||
The final update to 3.2 was the bug fix release 3.2.3, which was released
|
||||
simultaneously with 3.3.0 in December 1999 just in time for the Year 2000.
|
||||
|
||||
The 3.3 development team, consisting of Michael Allison, Ken Arromdee,
|
||||
David Cohrs, Jessie Collet, Steve Creps, Kevin Darcy, Timo Hakulinen,
|
||||
Kevin Hugo, Steve Linhart, Ken Lorber, Dean Luick, Pat Rankin, Eric Smith,
|
||||
Mike Stephenson, Janet Walz, and Paul Winner, released 3.3.0 in
|
||||
The 3.3 development team, consisting of Michael Allison, Ken Arromdee,
|
||||
David Cohrs, Jessie Collet, Steve Creps, Kevin Darcy, Timo Hakulinen,
|
||||
Kevin Hugo, Steve Linhart, Ken Lorber, Dean Luick, Pat Rankin, Eric Smith,
|
||||
Mike Stephenson, Janet Walz, and Paul Winner, released 3.3.0 in
|
||||
December 1999 and 3.3.1 in August of 2000.
|
||||
|
||||
Version 3.3 offered many firsts. It was the first version to separate race
|
||||
and profession. The Elf class was removed in preference to an elf race,
|
||||
and the races of dwarves, gnomes, and orcs made their first appearance in
|
||||
the game alongside the familiar human race. Monk and Ranger roles joined
|
||||
Archeologists, Barbarians, Cavemen, Healers, Knights, Priests, Rogues,
|
||||
Version 3.3 offered many firsts. It was the first version to separate race
|
||||
and profession. The Elf class was removed in preference to an elf race,
|
||||
and the races of dwarves, gnomes, and orcs made their first appearance in
|
||||
the game alongside the familiar human race. Monk and Ranger roles joined
|
||||
Archeologists, Barbarians, Cavemen, Healers, Knights, Priests, Rogues,
|
||||
Samurai, Tourists, Valkyries and of course, Wizards. It was also the first
|
||||
version to allow you to ride a steed, and was the first version to have a
|
||||
publicly available web-site listing all the bugs that had been discovered.
|
||||
@@ -130,61 +131,61 @@ well as supporting ports on the different platforms that NetHack runs on:
|
||||
|
||||
Pat Rankin maintained 3.4 for VMS.
|
||||
|
||||
Michael Allison maintained NetHack 3.4 for the MS-DOS platform.
|
||||
Michael Allison maintained NetHack 3.4 for the MS-DOS platform.
|
||||
Paul Winner and Yitzhak Sapir provided encouragement.
|
||||
|
||||
Dean Luick, Mark Modrall, and Kevin Hugo maintained and enhanced the
|
||||
Macintosh port of 3.4.
|
||||
|
||||
Michael Allison, David Cohrs, Alex Kompel, Dion Nicolaas, and Yitzhak Sapir
|
||||
maintained and enhanced 3.4 for the Microsoft Windows platform. Alex Kompel
|
||||
contributed a new graphical interface for the Windows port. Alex Kompel also
|
||||
Michael Allison, David Cohrs, Alex Kompel, Dion Nicolaas, and Yitzhak Sapir
|
||||
maintained and enhanced 3.4 for the Microsoft Windows platform. Alex Kompel
|
||||
contributed a new graphical interface for the Windows port. Alex Kompel also
|
||||
contributed a Windows CE port for 3.4.1.
|
||||
|
||||
Ron Van Iwaarden maintained 3.4 for OS/2.
|
||||
|
||||
Janne Salmijarvi and Teemu Suikki maintained and enhanced the
|
||||
Janne Salmijarvi and Teemu Suikki maintained and enhanced the
|
||||
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.
|
||||
|
||||
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,
|
||||
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
|
||||
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.
|
||||
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,
|
||||
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,
|
||||
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.
|
||||
|
||||
In January 2015, preparation began for the release of NetHack 3.6. The 3.6
|
||||
version merges work done by the development team since the previous release with
|
||||
some of the beloved community patches. Many bugs were fixed and some code was
|
||||
restructured.
|
||||
In January 2015, preparation began for the release of NetHack 3.6. The 3.6
|
||||
version merges work done by the development team since the previous release
|
||||
with some of the beloved community patches. Many bugs were fixed and some
|
||||
code was restructured.
|
||||
|
||||
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.
|
||||
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.
|
||||
@@ -192,28 +193,33 @@ of NetHack 3.6.0 for Mac.
|
||||
Michael Allison, Derek S. Ray, Yitzhak Sapir, Alex Kompel, Dion Nicolaas,
|
||||
and David Cohrs maintained the port of NetHack 3.6.0 for Microsoft Windows.
|
||||
|
||||
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,
|
||||
Pat Rankin attempted to keep the VMS port running for NetHack 3.6.0,
|
||||
hindered by limited access. Kevin Smolkowski has updated and tested it
|
||||
for the most recent version of OpenVMS (V8.4 as of this writing) on Alpha
|
||||
and Integrity (aka Itanium aka IA64) but not VAX.
|
||||
|
||||
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 includes a tribute to him.
|
||||
|
||||
|
||||
An official NetHack web site continues to be maintained by Ken Lorber at
|
||||
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.
|
||||
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.
|
||||
|
||||
On behalf of the NetHack community, thank you very much to
|
||||
On behalf of the NetHack community, thank you very much to
|
||||
M. Drew Streib, Pasi Kallinen and Robin Bandy.
|
||||
|
||||
- - - - - - - - - -
|
||||
- - - - - - - - - -
|
||||
|
||||
From time to time, some depraved individual out there in netland sends a
|
||||
particularly intriguing modification to help out with the game. The Gods of
|
||||
@@ -258,5 +264,5 @@ in this, the list of Dungeoneers:
|
||||
Hao-yang Wang Mike Engber Warren Cheung
|
||||
Helge Hafting Mike Gallop Warwick Allison
|
||||
Irina Rempt-Drijfhout Mike Passaretti Yitzhak Sapir
|
||||
Izchak Miller Mike Stephenson
|
||||
J. Ali Harlow Mikko Juola
|
||||
Izchak Miller Mike Stephenson
|
||||
J. Ali Harlow Mikko Juola
|
||||
|
||||
@@ -1142,6 +1142,7 @@ DOOR:closed,(73,5)
|
||||
DOOR:closed,(2,15)
|
||||
MAZEWALK:(36,8),west
|
||||
STAIR:(42,8),up
|
||||
WALLIFY
|
||||
|
||||
# Objects
|
||||
OBJECT:('*',"diamond"),random
|
||||
|
||||
+545
-46
@@ -3934,14 +3934,174 @@ is 'me'?"
|
||||
#
|
||||
#
|
||||
#
|
||||
%title Going Postal (1)
|
||||
%title Going Postal (13)
|
||||
%passage 1
|
||||
What was magic, after all, but something that happened at the snap of
|
||||
a finger? Where was the magic in that? It was mumbled words and weird
|
||||
drawings in old books and in the wrong hands it was dangerous as hell,
|
||||
but not one half as dangerous as it could be in the right hands.
|
||||
|
||||
What was magic, after all, but something that happened at the
|
||||
snap of a finger? Where was the magic in that? It was mumbled
|
||||
words and weird drawings in old books and in the wrong hands it
|
||||
was dangerous as hell, but not one half as dangerous as it could
|
||||
be in the right hands.
|
||||
[Going Postal, by Terry Pratchett]
|
||||
%e passage
|
||||
# p. 5 (Harper Torch edition)
|
||||
%passage 2
|
||||
They say that the prospect of being hanged in the morning concentrates
|
||||
a man's mind wonderfully; unfortunately, what the mind inevitably
|
||||
concentrates on is that, in the morning, it will be in a body that is
|
||||
going to be hanged.
|
||||
|
||||
[Going Postal, by Terry Pratchett]
|
||||
%e passage
|
||||
# p. 18
|
||||
%passage 3
|
||||
There is a saying, "You can't fool an honest man," which is much quoted
|
||||
by people who make a profitable living by fooling honest men. Moist
|
||||
never tried it, knowingly anyway. If you did fool an honest man, he
|
||||
tended to complain to the local Watch, and these days they were harder
|
||||
to buy off. Fooling dishonest men was a lot safer, and somehow, more
|
||||
sporting. And, of course, there were so many more of them. You hardly
|
||||
had to aim.
|
||||
|
||||
[Going Postal, by Terry Pratchett]
|
||||
%e passage
|
||||
# p. 47 (passage starts mid-paragraph;
|
||||
# italics because it's Moist von Lipwig's internal monolog)
|
||||
%passage 4
|
||||
/What kind of man would put a known criminal in charge of a major branch
|
||||
of government? Apart from, say, the average voter./
|
||||
|
||||
[Going Postal, by Terry Pratchett]
|
||||
%e passage
|
||||
# p. 137
|
||||
%passage 5
|
||||
Now he could see the mysterious order clearly. They were robed, of course,
|
||||
because you couldn't have a secret order without robes. They had pushed
|
||||
the hoods back now, and each man(1) was wearing a peaked cap with a bird
|
||||
skeleton wired to it.
|
||||
|
||||
(1) Women are always significantly underrepresented in secret orders.
|
||||
|
||||
[Going Postal, by Terry Pratchett]
|
||||
%e passage
|
||||
# p. 184 ('Tubso' and 'Bissonomy' are accurate)
|
||||
%passage 6
|
||||
Just below the dome, staring down from their niches, were statues of the
|
||||
Virtues: Patience, Chastity, Silence, Charity, Hope, Tubso, Bissonomy,(1)
|
||||
and Fortitude.
|
||||
|
||||
(1) Many cultures practice neither of these in the hustle and bustle of
|
||||
the modern world, because no one can remember what they are.
|
||||
|
||||
[Going Postal, by Terry Pratchett]
|
||||
%e passage
|
||||
# pp. 249-250 (Moist and Miss Dearheart are in a fancy restaurant)
|
||||
%passage 7
|
||||
She froze, staring over his shoulder. He saw her right hand scrabble
|
||||
frantically among the cutlery and grab a knife.
|
||||
|
||||
"That bastard has just walked into the place!" she hissed. "Reacher Gilt!
|
||||
I'll just kill him and join you for the pudding..."
|
||||
|
||||
"You can't do that!" hissed Moist.
|
||||
|
||||
"Oh? Why not?"
|
||||
|
||||
"You're using the wrong knife! That's for the fish! You'll get into
|
||||
trouble!"
|
||||
|
||||
She glared at him, but her hand relaxed, and something like a smile
|
||||
appeared on her face.
|
||||
|
||||
"They don't have a knife for stabbing rich, murdering bastards?" she said.
|
||||
|
||||
"They bring it to the table when you order one," said Moist urgently.
|
||||
"Look, this isn't the Drum, they don't just throw the body into the river!
|
||||
They'll call the Watch! Get a grip. Not on a knife! And get ready to
|
||||
run."
|
||||
|
||||
"Why?"
|
||||
|
||||
"Because I forged his signature on Grand Trunk notepaper to get us in
|
||||
here, that's why."
|
||||
|
||||
[Going Postal, by Terry Pratchett]
|
||||
%e passage
|
||||
# pp 260-261 (Mr. Groat: elderly postal employee recently attacked in
|
||||
# the palacial but severely dilapidated post office;
|
||||
# "his imagination": Moist's; "him": Mr. Groat; "he": Moist)
|
||||
%passage 8
|
||||
The vision of Mr. Groat's chest kept bumping insistently against his
|
||||
imagination. It looked as though something with claws had taken a swipe
|
||||
at him, and only the thick uniform coat prevented him from being opened
|
||||
like a clam. But that didn't sound like a vampire. They weren't messy
|
||||
like that. It was a waste of good food.
|
||||
|
||||
Nevertheless, he picked up a piece of smashed chair. It had splintered
|
||||
nicely. And the nice thing about a stake through the heart was that it
|
||||
also worked on non-vampires.
|
||||
|
||||
[Going Postal, by Terry Pratchett]
|
||||
%e passage
|
||||
# p. 262 (Stanley, a young postal employee who collects pins, recently
|
||||
# fought off /something/ using a bag of pins as a weapon)
|
||||
# [this passage doesn't have a very satisfactory ending...]
|
||||
%passage 9
|
||||
You probably couldn't /kill/ a vampire with pins...
|
||||
|
||||
And after a thought like that is when you realize that however hard you
|
||||
try to look behind you, there's a behind you, behind you, where you aren't
|
||||
looking. Moist flung his back to the cold stone wall where he slithered
|
||||
along it until he ran out of wall and acquired a doorframe.
|
||||
|
||||
[Going Postal, by Terry Pratchett]
|
||||
%e passage
|
||||
#p. 278 ('thoughted' and 'thoughting' are accurate)
|
||||
%passage 10
|
||||
"Oh, Mr. Lipwig!"
|
||||
|
||||
It is not often that a wailing woman rushes into a room and throws herself
|
||||
at a man. It had never happened to Moist before. Now it happened, and it
|
||||
seemed such a waste that the woman was Miss Maccalariat.
|
||||
|
||||
She tottered forward and clung to the startled Moist, tears streaming down
|
||||
her face.
|
||||
|
||||
"Oh, Mr. Lipwig!" she wailed. "Oh, Mr. Lipwig!"
|
||||
|
||||
Moist reeled under her weight. She was dragging at his collar so hard
|
||||
that he was likely to end up on the floor, and the thought of being found
|
||||
on the floor with Miss Maccalariat was--well, a thought that just couldn't
|
||||
be thoughted. The head would explode before thoughting it.
|
||||
|
||||
[Going Postal, by Terry Pratchett]
|
||||
%e passage
|
||||
#p. 315
|
||||
%passage 11
|
||||
Always remember that the crowd that applauds your coronation is the same
|
||||
crowd that will applaud your beheading. People like a show.
|
||||
|
||||
[Going Postal, by Terry Pratchett]
|
||||
%e passage
|
||||
# p. 326 (homage to "To Have and Have Not"; Lauren Bacall's character says
|
||||
# to Humphrey Bogart's character, "You know how to whistle, don't
|
||||
# you Steve? Just put your lips together and--blow."
|
||||
# Miss Dearheart's slight pause seems better placed...)
|
||||
%passage 12
|
||||
Miss Dearheart stubbed out her cigarette. "Go up there tonight, Mr. Lipwig.
|
||||
Get yourself a little bit closer to heaven. And then get down on your
|
||||
knees and pray. You know how to pray, don't you? You just put your hands
|
||||
together--and hope."
|
||||
|
||||
[Going Postal, by Terry Pratchett]
|
||||
%e passage
|
||||
# p. 333 ('crackers' have been sending and receiving clandestine clacks
|
||||
# messages without owners/operators of the clacks network noticing)
|
||||
%passage 13
|
||||
It was a little like stealing. It was exactly like stealing. It was, in
|
||||
fact, stealing. But there was no law against it, because no one knew the
|
||||
crime existed, so is it really stealing if what's stolen isn't missed?
|
||||
And is it stealing if you're stealing from thieves? Anyway, all property
|
||||
is theft, except mine.
|
||||
|
||||
[Going Postal, by Terry Pratchett]
|
||||
%e passage
|
||||
@@ -3949,26 +4109,31 @@ be in the right hands.
|
||||
#
|
||||
#
|
||||
#
|
||||
%title Thud! (2)
|
||||
%title Thud! (7)
|
||||
# p. 39 (Harper Torch edition; passage starts mid-paragraph; speaker is Nobby)
|
||||
%passage 1
|
||||
Why bother with a cunning plan when a simple one will do?
|
||||
"Why mess about with a cunning plan when a simple one will do?"
|
||||
|
||||
[Thud!, by Terry Pratchett]
|
||||
%e passage
|
||||
# pp. 334-336 (originally transcribed from some other edition)
|
||||
%passage 2
|
||||
#submitted by Boudewijn
|
||||
He wanted to sleep. He'd never felt this tired before.
|
||||
Vimes slumped to his knees, and then fell sideways on to the sand.
|
||||
When he forced open his eyes he saw pale stars above him, and had once
|
||||
again the sensation that there was someone else present.
|
||||
He turned his head, wincing at the stab of pain, and saw a small but
|
||||
brightly lit folding chair on the sand. A robed figure was reclining
|
||||
in it, reading a book. A scythe was stuck in the sand beside it.
|
||||
A white skeletal hand turned a page.
|
||||
He wanted to sleep. He'd never felt this tired before. Vimes slumped to
|
||||
his knees, and then fell sideways on to the sand.
|
||||
|
||||
When he forced his eyes open, he saw pale stars above him, and had, once
|
||||
again, the sensation that there was someone else present.
|
||||
|
||||
He turned his head, wincing at the stab of pain, and saw a small but
|
||||
brightly lit folding chair on the sand. A robed figure was reclining in
|
||||
it, reading a book. A scythe was stuck in the sand beside it.
|
||||
|
||||
A white, skeletal hand turned a page.
|
||||
|
||||
'You'll be Death, then?' said Vimes, after a while.
|
||||
|
||||
AH. MISTER VIMES, ASTUTE AS EVER. GOT IT IN ONE, said Death, shutting
|
||||
the book on his finger to keep the place.
|
||||
AH, MISTER VIMES, ASTUTE AS EVER. GOT IT IN ONE, said Death, shutting the
|
||||
book on his finger to keep the place.
|
||||
|
||||
'I've seen you before.'
|
||||
|
||||
@@ -3976,42 +4141,122 @@ I HAVE WALKED WITH YOU MANY TIMES, MISTER VIMES.
|
||||
|
||||
'And this is /it/, is it?'
|
||||
|
||||
HAS IT NEVER STRUCK YOU THAT THE CONCEPT OF A WRITTEN NARRATIVE IS
|
||||
SOMEWHAT STRANGE? said Death.
|
||||
HAS IT NEVER STRUCK YOU THAT THE CONCEPT OF A WRITTEN NARRATIVE IS SOMEWHAT
|
||||
STRANGE? said Death.
|
||||
|
||||
Vimes could tell when people were trying to avoid something they really
|
||||
didn't want to say, and it was happening here.
|
||||
'Is it?' he insisted. 'Is this it? This time I die?'
|
||||
|
||||
'Is it?' he insisted. 'Is this it? This time I die?'
|
||||
|
||||
COULD BE.
|
||||
|
||||
'Could be? What sort of answer is that?' said Vimes.
|
||||
'Could be? What sort of answer is that?' said Vimes.
|
||||
|
||||
A VERY ACCURATE ONE. YOU SEE, YOU ARE HAVING A NEAR DEATH EXPERIENCE,
|
||||
WHICH INESCAPABLY MEANS THAT I MUST UNDERGO A NEAR VIMES EXPERIENCE.
|
||||
DON'T MIND ME. CARRY ON WHATEVER YOU WERE DOING. I HAVE A BOOK.
|
||||
A VERY ACCURATE ONE. YOU SEE, YOU ARE HAVING A NEAR-DEATH EXPERIENCE,
|
||||
WHICH INESCAPABLY MEANS THAT I MUST UNDERGO A NEAR-/VIMES/ EXPERIENCE.
|
||||
DON'T MIND ME. CARRY ON WITH WHATEVER YOU WERE DOING. I HAVE A BOOK.
|
||||
|
||||
Vimes rolled over on to his stomach, gritted his teeth, and pushed himself
|
||||
on to his hands and knees again. He managed a few yards before slumping
|
||||
back down.
|
||||
|
||||
He heard the sound of a chair being moved.
|
||||
|
||||
Vimes rolled over on to his stomach, gritted his teeth and pushed
|
||||
himself on to his hands and knees again. He managed a few yards before
|
||||
slumping back down. He heard the sound of a chair being moved.
|
||||
'Shouldn't you be somewhere else?' he said.
|
||||
|
||||
I AM, said Death, sitting down again.
|
||||
|
||||
|
||||
'But you're here!'
|
||||
|
||||
AS WELL. Death turned a page and, for a person without breath, managed
|
||||
a pretty good sigh. IT APPEARS THAT THE BUTLER DID IT.
|
||||
|
||||
AS WELL. Death turned a page and, for a person without breath, managed a
|
||||
pretty good sigh. IT APPEARS THAT THE BUTLER DID IT.
|
||||
|
||||
'Did what?'
|
||||
|
||||
IT IS A MADE-UP STORY. VERY STRANGE. ALL ONE NEEDS TO DO IS TURN TO THE
|
||||
LAST PAGE AND THE ANSWER IS THERE. WHAT, THEREFORE, IS THE POINT OF
|
||||
IT IS A MADE-UP STORY. VERY STRANGE. ALL ONE NEEDS TO DO IS TURN TO THE
|
||||
LAST PAGE AND THE ANSWER IS THERE. WHAT, THEREFORE, IS THE POINT OF
|
||||
DELIBERATEDLY NOT KNOWING?
|
||||
|
||||
It sounded like gibberish to Vimes, so he ignored it. Some of the aches
|
||||
had gone, although his head still hammered. There was an empty feeling,
|
||||
everywhere. He just wanted to sleep.
|
||||
It sounded like gibberish to Vimes, so he ignored it. Some of the aches
|
||||
had gone, although his head still hammered. There was an empty feeling
|
||||
everywhere. He just wanted to sleep.
|
||||
|
||||
[Thud!, by Terry Pratchett]
|
||||
%e passage
|
||||
# pp. 225-226
|
||||
%passage 3
|
||||
And I'm going home, Vimes repeated to himself. Everyone wants something
|
||||
from Vimes, even though I'm not the sharpest knife in the drawer. Hell,
|
||||
I'm probably a spoon. Well I'm going to be Vimes, and Vimes reads
|
||||
/Where's My Cow?/ to Young Sam at six o'clock. With the noises done right.
|
||||
|
||||
[Thud!, by Terry Pratchett]
|
||||
%e passage
|
||||
# pp. 261-262
|
||||
%passage 4
|
||||
Fred Colon peered through the bars. He was, on the whole, a pretty good
|
||||
jailer; he always had a pot of tea on the go, he was, as a general rule,
|
||||
amiably disposed to most people, he was too slow to be easily fooled, and
|
||||
he kept the cell keys in a box in the bottom drawer of his desk, a long
|
||||
way out of reach of any stick, hand, dog, cunningly thrown belt, or
|
||||
trained Klatchian monkey spider.(1)
|
||||
|
||||
(1) Making Fred Colon possibly unique in the annals of jail history.
|
||||
|
||||
[Thud!, by Terry Pratchett]
|
||||
%e passage
|
||||
# p. 287 (American spelling of 'theater' is accurate [Harper Torch edition])
|
||||
%passage 5
|
||||
Brushing aside cobwebs with one hand and holding up a lantern with the
|
||||
other, Sybil led the way past boxes of MEN'S BOOTS, VARIOUS; RISIBLE
|
||||
PUPPETS, STRING & GLOVE; MODEL THEATER AND SCENERY. Maybe that was the
|
||||
reason for their wealth: they bought things that were built to last, and
|
||||
now they seldom had to buy anything at all. Except food, of course, and
|
||||
even then Vimes would not have been surprised to see boxes labeled APPLE
|
||||
CORES, VARIOUS, or LEFTOVERS, NEED EATING UP.(1)
|
||||
|
||||
(1) That was a phrase of Sybil's that got to him. She'd announce at lunch,
|
||||
"we must have the pork tonight, it needs eating up." Vimes never had an
|
||||
actual problem with this, because he'd been raised to eat what was put in
|
||||
front of him, and do it quickly, too, before someone else snatched it away.
|
||||
He was just puzzled at the suggestion that he was there to do the food a
|
||||
favor.
|
||||
|
||||
[Thud!, by Terry Pratchett]
|
||||
%e passage
|
||||
# pp. 296-297
|
||||
%passage 6
|
||||
"Tell me Drumknott, are you a betting man at all?"
|
||||
|
||||
"I have been know to have the occasional 'little flutter,' sir."
|
||||
|
||||
"Given, then, a contest between an invisible and very powerful quasidemonic
|
||||
/thing/ of pure vengence on the one hand, and the commander on the other,
|
||||
where would you wager, say... one dollar?"
|
||||
|
||||
"I wouldn't, sir. That looks like one that would go to the judges."
|
||||
|
||||
"Yes," said Vetinari, staring thoughtfully at the closed door. "Yes,
|
||||
/indeed/."
|
||||
|
||||
[Thud!, by Terry Pratchett]
|
||||
%e passage
|
||||
# p. 351 ('teeth-aching' probably ought to have been 'teeth-achingly')
|
||||
%passage 7
|
||||
Vimes reached up and took a mug of water from Angua. It was teeth-aching
|
||||
cold and the best drink he'd ever tasted. And his mind worked fast, flying
|
||||
in emergency supplies of common sense, as human minds do, to construct a
|
||||
huge anchor in sanity and prove that what happened hadn't really happened
|
||||
and, if it had happened, hadn't happened very much.
|
||||
|
||||
It was all mystic, that's what it was. Oh, it /might/ all be true, but how
|
||||
could you ever tell? You had to stick to the things you can see. And you
|
||||
had to keep reminding yourself of that, too.
|
||||
|
||||
Yeah, that was it. What had really happened, eh? A few signs? Well,
|
||||
anything can look like you want it to, if you're worried and confused
|
||||
enough, yes? A sheep can look like a cow, right? Ha!
|
||||
|
||||
[Thud!, by Terry Pratchett]
|
||||
%e passage
|
||||
@@ -4019,18 +4264,265 @@ everywhere. He just wanted to sleep.
|
||||
#
|
||||
#
|
||||
#
|
||||
%title Wintersmith (2)
|
||||
%title Wintersmith (16)
|
||||
# p. 82 (HarperTeen edition--presumably HarperTempest suffered a name change)
|
||||
%passage 1
|
||||
That's Third Thoughts for you.
|
||||
When a huge rock is going to land on your head,
|
||||
they're the thoughts that think:
|
||||
Is that an igneous rock, such as granite, or is it sandstone?
|
||||
That's Third Thoughts for you. When a huge rock is going to land on your
|
||||
head, they're the thoughts that think: Is that an igneous rock, such as
|
||||
granite, or is it sandstone?
|
||||
|
||||
[Wintersmith, by Terry Pratchett]
|
||||
%e passage
|
||||
p. 113
|
||||
%passage 2
|
||||
They say that there can never be two snowflakes that are exactly alike, but
|
||||
has anyone checked lately?
|
||||
has anyone checked lately?
|
||||
|
||||
[Wintersmith, by Terry Pratchett]
|
||||
%e passage
|
||||
# pp. 32-33
|
||||
%passage 3
|
||||
All witches are a bit odd. Tiffany had got used to odd, so that odd seemed
|
||||
quite normal. There was Miss Level, for example, who had two bodies,
|
||||
although one of them was imaginery. Mistress Pullunder, who bred pedigreed
|
||||
earthworms and gave them all names... well, she was hardly odd at all, just
|
||||
a bit peculiar, and anyway earthworms were quite interesting in a basically
|
||||
uninterestng kind of way. And there had been Old Mother Dismass, who
|
||||
suffered from bouts of temporal confusion, which can be quite strange when
|
||||
it happens to a witch; her mouth never moved in time with her words, and
|
||||
sometimes her footsteps came down the stairs ten minutes before she did.
|
||||
|
||||
But when it came to odd, Miss Treason didn't just take the cake, but a
|
||||
packet of biscuits too, with sprinkles on the top, and also a candle.
|
||||
|
||||
[Wintersmith, by Terry Pratchett]
|
||||
%e passage
|
||||
# p. 34 ('villages': plural is accurate; 'clonk-clank' is rendered bold)
|
||||
%passage 4
|
||||
Then there was her clock. It was heavy and made of rusty iron by someone
|
||||
who was more blacksmith than watchmaker, which was why it went
|
||||
*clonk-clank* instead of /tick-tock/. She wore it on her belt and could
|
||||
tell the time by feeling the stubby little hands.
|
||||
|
||||
There was a story in the villages that the clock was Miss Treason's heart,
|
||||
which she'd used ever since her first heart died. But there were lots of
|
||||
stories about Miss Treason.
|
||||
|
||||
[Wintersmith, by Terry Pratchett]
|
||||
%e passage
|
||||
# p. 40 (Boffo)
|
||||
%passage 5
|
||||
First Sight and Second Thoughts, that's what a witch had to rely on: First
|
||||
Sight to see what's really there, and Second Thoughts to watch the First
|
||||
Thoughts to check that they were thinking right. Then there were the
|
||||
Third Thoughts, which Tiffany had never heard discussed and therefore kept
|
||||
quiet about; they were odd, seemed to think for themselves, and didn't
|
||||
turn up very often. And they were telling her that there was more to Miss
|
||||
Treason than met the eye.
|
||||
|
||||
[Wintersmith, by Terry Pratchett]
|
||||
%e passage
|
||||
# p. 53-54 (in Carpe Jugulum, most of the lore [for humans] about how to kill
|
||||
# vampires had been written by long-lived/long-not-defunct vampires
|
||||
# [meaning that it was deliberately full of inaccuracies...])
|
||||
%passage 6
|
||||
It was in fact Miss Tick who had written /Witch Hunting for Dumb People/,
|
||||
and she made sure that copies of it found their way into those areas where
|
||||
people still believed that witches should be burned or drowned.
|
||||
|
||||
Since the only witch ever likely to pass through these days was Miss Tick
|
||||
herself, it meant that if things did go wrong, she'd get a good night's
|
||||
sleep and a decent meal before being thrown into the water. The water was
|
||||
no problem at all for Miss Tick, who had been to the Quirm College for
|
||||
Young Ladies, where you had to have an icy dip every morning to build Moral
|
||||
Fiber. And a No. 1 Bosun's knot was very easy to undo with your teeth,
|
||||
even underwater.
|
||||
|
||||
[Wintersmith, by Terry Pratchett]
|
||||
%e passage
|
||||
# p. 55-56
|
||||
%passage 7
|
||||
Working quickly, she emptied her pockets and started a shamble.
|
||||
|
||||
Shambles worked. That was about all you could say about them for certain.
|
||||
You made them out of some string and a couple of sticks and anything you
|
||||
had in your pocket at the time. They were a witch's equivalent of those
|
||||
knives with fifteen blades and three screwdrivers and a tiny magnifying
|
||||
glass and a thing for extracting earwax from chickens.
|
||||
|
||||
You couldn't even say precisely what they did, although Miss Tick thought
|
||||
that they were a way of finding out what things the hidden bits of your
|
||||
own mind already knew. You had to make a shamble from scratch every time,
|
||||
and only from things in your pockets. There was no harm in having
|
||||
interesting things in your pockets, though, just in case.
|
||||
|
||||
[Wintersmith, by Terry Pratchett]
|
||||
%e passage
|
||||
# p. 69
|
||||
%passage 8
|
||||
A witch didn't do things because they seemed like a good idea at the time!
|
||||
That was practically cackling! You had to deal every day with people who
|
||||
were foolish and lazy and untruthful and downright unpleasant, and you
|
||||
could certainly end up thinking that the world would be considerably
|
||||
improved if you gave them a slap. But you didn't because, as Miss Tick
|
||||
had once explained: a) it would make the world a better place for only a
|
||||
very short period of time; b) it would then make the world a slightly
|
||||
worse place; and c) you're not supposed to be as stupid as they are.
|
||||
|
||||
[Wintersmith, by Terry Pratchett]
|
||||
%e passage
|
||||
# p. 106 (Rob Anybody is married to their kelda, ruler of the clan;
|
||||
# passage continues with three or so pages about Explaining
|
||||
# [focusing on the reactions of the recipient of the explanation:
|
||||
# Pursin' o' the Lips; Foldin' o' the Arms; Tappin' o' the Feets;
|
||||
# and also the reactions of the listening Feegles as they hear
|
||||
# about them] but would end up on the long side if included here)
|
||||
%passage 9
|
||||
"Aye, but the boy willna be interested in marryin'," said Slightly Mad
|
||||
Angus.
|
||||
|
||||
"He might be one day," said Billy Bigchin, who'd made a hobby of watching
|
||||
humans. "Most bigjob men get married."
|
||||
|
||||
"They do?" said a Feegle in astonishment.
|
||||
|
||||
"Oh, aye."
|
||||
|
||||
"They want tae get married?"
|
||||
|
||||
"A lot o' them do, aye," said Billy.
|
||||
|
||||
"So there's nae more drinkin', and stealin', and fightin'?"
|
||||
|
||||
"Hey, ah'm still allowed some drinkin' and stealin' and fightin'!" said
|
||||
Rob Anybody.
|
||||
|
||||
"Aye, Rob, but we canna help noticin' ye also have tae do the Explainin',
|
||||
too." said Daft Wullie.
|
||||
|
||||
There was a general nodding from the crowd. To Feegles, Explaining was a
|
||||
dark art. It was just so /hard/.
|
||||
|
||||
[Wintersmith, by Terry Pratchett]
|
||||
%e passage
|
||||
# p. 126-127 (passage starts mid-paragraph;
|
||||
# witches know in advance when they're going to die)
|
||||
%passage 10
|
||||
"[...] We shall hold the funeral tomorrow afternoon."
|
||||
|
||||
"Sorry? You mean /before/ you die?" said Tiffany.
|
||||
|
||||
"Why, of course! I don't see why I shouldn't have some fun!"
|
||||
|
||||
"Good thinkin'!" said Rob Anybody. "That's the kind o' sensible detail
|
||||
people usually fails tae consider."
|
||||
|
||||
"We call it a going-away party," said Miss Treason. "Just for witches, of
|
||||
course. Other people tend to get a bit nervous--I can't think why. And
|
||||
on the bright side, we've got that splendid ham that Mr. Armbinder gave us
|
||||
last week for settling the ownership of the chestnut tree, and I'd love to
|
||||
try it."
|
||||
|
||||
[Wintersmith, by Terry Pratchett]
|
||||
%e passage
|
||||
# p. 129
|
||||
%passage 11
|
||||
Some people think that "coven" is a word for a group of witches, and it's
|
||||
true that's what the dictionary says. But the real word for a group of
|
||||
witches is an "argument."
|
||||
|
||||
[Wintersmith, by Terry Pratchett]
|
||||
%e passage
|
||||
# p. 174-175 (passage starts mid-paragraph; last paragraph continues, but
|
||||
# changes topic so abruptly Tiffany gasps; 'rumbustious' is accurate)
|
||||
%passage 12
|
||||
"[...] And now I shall tell you something vitally important. It is the
|
||||
secret of my long life."
|
||||
|
||||
Ah, thought Tiffany, and she leaned forward.
|
||||
|
||||
"The important thing," said Miss Treason, "is to stay the passage of the
|
||||
wind. You should avoid rumbustious fruits and vegetables. Beans are the
|
||||
worst, take it from me."
|
||||
|
||||
"I don't think I understand--" Tiffany began.
|
||||
|
||||
"Try not to fart, in a nutshell."
|
||||
|
||||
"In a nutshell, I imagine it would be pretty unpleasant!" said Tiffany
|
||||
nervously. She couldn't believe she was being told this.
|
||||
|
||||
"This is no joking matter," said Miss Treason. "The human body has only
|
||||
so much air in it. You have to make it last. One plate of beans can take
|
||||
a year off your life. I have avoided rumbustiousness all my days. I am
|
||||
an old person and that means what I say is wisdom!" She gave the
|
||||
bewildered Tiffany a stern look. "Do you understand, child?"
|
||||
|
||||
Tiffany's mind raced. Everything is a test! "No," she said. "I'm not a
|
||||
child and that's nonsense, not wisdom!"
|
||||
|
||||
The stern look cracked into a smile. "Yes," said Miss Treason. "Total
|
||||
gibberish. But you've got to admit it's a corker, all the same, right?
|
||||
You definitely believed it, just for a moment? The villagers did last
|
||||
year. You should have seen the way they walked about for a few weeks!
|
||||
The strained looks on their faces quite cheered me up! [...]"
|
||||
|
||||
[Wintersmith, by Terry Pratchett]
|
||||
%e passage
|
||||
# p. 185 (Miss Treason tells people she's 113, but she's actually /only/ 111)
|
||||
%passage 13
|
||||
MISS EUMENIDES TREASON, AGED ONE HUNDRED AND ELEVEN?
|
||||
|
||||
Tiffany heard the voice inside her head. It didn't seem to have come
|
||||
through her ears. And she'd heard it before, making her quite unusual.
|
||||
Most people hear the voice of Death only once.
|
||||
|
||||
[Wintersmith, by Terry Pratchett]
|
||||
%e passage
|
||||
# p. 229
|
||||
%passage 14
|
||||
Tiffany had looked up "strumpet" in the Unexpurgated Dictionary, and found
|
||||
it meant "a woman who is no better than she should be" and "a lady of easy
|
||||
virtue." This, she decided after some working out, meant that Mrs. Gytha
|
||||
Ogg, known as Nanny, was a very respectable person. She found virtue easy,
|
||||
for one thing. And if she was no better than she should be, she was just
|
||||
as good as she ought to be.
|
||||
|
||||
[Wintersmith, by Terry Pratchett]
|
||||
%e passage
|
||||
# p. 360-361 ('wurds' is accurate)
|
||||
%passage 15
|
||||
"An heroic effect, Mr. Anybody," said Granny. "The first thing a hero must
|
||||
conquer is his fear, and when it comes to fightin', the Nac Mac Feegle
|
||||
don't know the meanin' of the word."
|
||||
|
||||
"Aye, true enough," Rob grunted. "We dinna ken the meanin' o' thousands
|
||||
o' wurds!"
|
||||
|
||||
[Wintersmith, by Terry Pratchett]
|
||||
%e passage
|
||||
# p. 398-399 ("Chumsfanleigh" is pronounced "Chuffley")
|
||||
%passage 16
|
||||
At the back of the Feegles' chalk pit, more chalk had been carved out of
|
||||
the wall to make a tunnel about five feet high and perhaps as long.
|
||||
|
||||
In front of it stood Roland de Chumsfanleigh (it wasn't his fault). His
|
||||
ancestors had been knights, and they had come to own the Chalk by killing
|
||||
the kings who thought they did. Swords, that's what it had all been about.
|
||||
Swords and cutting off heads. That was how you got land in the old days,
|
||||
and then the rules were changed so that you didn't need a sword to own
|
||||
land anymore, you just needed the right piece of paper. But his ancestors
|
||||
had still hung on to their swords, just in case people thought that the
|
||||
whole thing with the bits of paper had been unfair, it being a fact that
|
||||
you can't please everybody.
|
||||
|
||||
He'd always wanted to be good with a sword, and it had come as a shock to
|
||||
find that they were so /heavy/. He was great at air sword. In front of a
|
||||
mirror he could fence against his reflection and win nearly all the time.
|
||||
Real swords didn't allow that. You tried to swing them and they ended up
|
||||
swinging you. He'd realized that maybe he was more cut out for bits of
|
||||
paper. Besides, he needed glasses, which could be a bit tricky under a
|
||||
helmet, especially if someone was hitting /you/ with a sword.
|
||||
|
||||
[Wintersmith, by Terry Pratchett]
|
||||
%e passage
|
||||
@@ -4046,7 +4538,7 @@ Making Money, by Terry Pratchett
|
||||
'I don't know, thur. I didn't athk.'
|
||||
|
||||
[Making Money, by Terry Pratchett]
|
||||
%e pasasge
|
||||
%e passage
|
||||
%passage 2
|
||||
The Watch armour fitted like a glove. He'd have preferred it to fit like a
|
||||
helmet and breastplate. It was common knowledge that the Watch's approach
|
||||
@@ -4255,7 +4747,7 @@ IF YOU ASK ME, said Death, NOBODY COULD DO ANY BETTER THAN THAT. . .
|
||||
# Used for interaction with Death.
|
||||
#
|
||||
%section Death
|
||||
%title Death Quotes (8)
|
||||
%title Death Quotes (10)
|
||||
%passage 1
|
||||
WHERE THE FIRST PRIMAL CELL WAS, THERE WAS I ALSO. WHERE MAN IS, THERE AM I. WHEN THE LAST LIFE CRAWLS UNDER FREEZING STARS, THERE WILL I BE.
|
||||
%e passage
|
||||
@@ -4288,5 +4780,12 @@ THERE IS A LITTLE CONFUSION AT FIRST. IT IS ONLY TO BE EXPECTED.
|
||||
# time and space)
|
||||
%passage 8
|
||||
THERE IS ALWAYS TIME FOR ANOTHER LAST MINUTE.
|
||||
# Wintersmith, p. 187 (HarperTeen edition; dying Miss Treason takes a ham
|
||||
# [too silly?] sandwich with her to the grave, and it accompanies
|
||||
# her to the afterlife, but its condiments don't)
|
||||
%passage 9
|
||||
MUSTARD IS ALWAYS TRICKY.
|
||||
%passage 10
|
||||
PICKLES OF ALL SORTS DON'T SEEM TO MAKE IT. I'M SORRY.
|
||||
%e title
|
||||
%e section
|
||||
|
||||
+2071
-1741
File diff suppressed because it is too large
Load Diff
+139
-121
@@ -1,17 +1,16 @@
|
||||
/* NetHack 3.6 config.h $NHDT-Date: 1433279371 2015/06/02 21:09:31 $ $NHDT-Branch: status_hilite $:$NHDT-Revision: 1.89 $ */
|
||||
/* NetHack 3.6 config.h $NHDT-Date: 1447728911 2015/11/17 02:55:11 $ $NHDT-Branch: master $:$NHDT-Revision: 1.91 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
#ifndef CONFIG_H /* make sure the compiler does not see the typedefs twice \
|
||||
*/
|
||||
#ifndef CONFIG_H /* make sure the compiler does not see the typedefs twice */
|
||||
#define CONFIG_H
|
||||
|
||||
/*
|
||||
* Section 1: Operating and window systems selection.
|
||||
* Select the version of the OS you are using.
|
||||
* For "UNIX" select BSD, ULTRIX, SYSV, or HPUX in unixconf.h.
|
||||
* A "VMS" option is not needed since the VMS C-compilers
|
||||
* provide it (no need to change sec#1, vmsconf.h handles it).
|
||||
* Section 1: Operating and window systems selection.
|
||||
* Select the version of the OS you are using.
|
||||
* For "UNIX" select BSD, ULTRIX, SYSV, or HPUX in unixconf.h.
|
||||
* A "VMS" option is not needed since the VMS C-compilers
|
||||
* provide it (no need to change sec#1, vmsconf.h handles it).
|
||||
*/
|
||||
|
||||
#define UNIX /* delete if no fork(), exec() available */
|
||||
@@ -53,7 +52,7 @@
|
||||
* Define the default window system. This should be one that is compiled
|
||||
* into your system (see defines above). Known window systems are:
|
||||
*
|
||||
* tty, X11, mac, amii, BeOS, Qt, Gem, Gnome
|
||||
* tty, X11, mac, amii, BeOS, Qt, Gem, Gnome
|
||||
*/
|
||||
|
||||
/* MAC also means MAC windows */
|
||||
@@ -136,40 +135,56 @@
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Section 2: Some global parameters and filenames.
|
||||
* Commenting out WIZARD, LOGFILE, NEWS or PANICLOG removes that
|
||||
* feature from the game; otherwise set the appropriate wizard
|
||||
* name. LOGFILE, NEWS and PANICLOG refer to files in the
|
||||
* playground.
|
||||
* Section 2: Some global parameters and filenames.
|
||||
*
|
||||
* If SYSCF is defined, the following configuration info is
|
||||
* available in a global config space, with the compiled-in
|
||||
* entries as defaults:
|
||||
* WIZARDS (a value of * allows anyone to be wizard)
|
||||
* (this does NOT default to compiled-in value)
|
||||
* MAXPLAYERS (see MAX_NR_OF_PLAYERS above and nethack.sh)
|
||||
* SUPPORT (how to get local support)(no default)
|
||||
* RECOVER (how to recover a game at your site)(no
|
||||
*default)
|
||||
* SHELLERS (who can use !, syntax as WIZARDS)
|
||||
* for the record file (see topten.c):
|
||||
* PERSMAX (max entries for one person)
|
||||
* ENTRYMAX (max entries in the record file)
|
||||
* POINTSMIN (min points to get an entry)
|
||||
* PERS_IS_UID (0 or 1 - person is name or (numeric) userid)
|
||||
* SEDUCE (0 or 1 - runtime disable/enable SEDUCE
|
||||
*option)
|
||||
* LOGFILE, XLOGFILE, NEWS and PANICLOG refer to files in
|
||||
* the playground directory. Commenting out LOGFILE, XLOGFILE,
|
||||
* NEWS or PANICLOG removes that feature from the game.
|
||||
*
|
||||
* The following options select how the config space is stored:
|
||||
* SYSCF_FILE in the named file
|
||||
* Building with debugging features enabled is now unconditional;
|
||||
* the old WIZARD setting for that has been eliminated.
|
||||
* If SYSCF is enabled, WIZARD_NAME will be overridden at
|
||||
* runtime by the SYSCF WIZARDS value.
|
||||
*
|
||||
* The following options pertain to crash reporting:
|
||||
* GREPPATH (the path to the system grep(1) utility)
|
||||
* GDBPATH (the path to the system gdb(1) program)
|
||||
* SYSCF: (not supported by all ports)
|
||||
* If SYSCF is defined, the following configuration info is
|
||||
* available in a global config space, with the compiled-in
|
||||
* entries as defaults:
|
||||
* WIZARDS (a space-separated list of usernames of users who
|
||||
* can run the game in debug mode, aka wizard mode;
|
||||
* a value of * allows anyone to debug;
|
||||
* this does NOT default to compiled-in value)
|
||||
* EXPLORERS (who can use explore mode, aka discover mode)
|
||||
* SHELLERS (who can use ! to execute a shell subprocess)
|
||||
* MAXPLAYERS (see MAX_NR_OF_PLAYERS below and nethack.sh)
|
||||
* SUPPORT (how to get local support) [no default]
|
||||
* RECOVER (how to recover a game at your site) [no default]
|
||||
* For the record file (see topten.c):
|
||||
* PERSMAX (max entries for one person)
|
||||
* ENTRYMAX (max entries in the record file)
|
||||
* POINTSMIN (min points to get an entry)
|
||||
* PERS_IS_UID (0 or 1 - person is name or (numeric) userid)
|
||||
* Can force incubi/succubi behavior to be toned down to nymph-like:
|
||||
* SEDUCE (0 or 1 - runtime disable/enable SEDUCE option)
|
||||
* The following options pertain to crash reporting:
|
||||
* GREPPATH (the path to the system grep(1) utility)
|
||||
* GDBPATH (the path to the system gdb(1) program)
|
||||
* Regular nethack options can also be specified in order to
|
||||
* provide system-wide default values local to your system:
|
||||
* OPTIONS (same as in users' .nethackrc or defaults.nh)
|
||||
*
|
||||
* In the future there may be other ways to supply SYSCF
|
||||
* information (Windows registry, Apple resource forks, etc)
|
||||
* but at present the only supported method is via a text file.
|
||||
* If the program is built with SYSCF enabled, the file *must*
|
||||
* exist and be readable, otherwise the game will complain and
|
||||
* refuse to start.
|
||||
* SYSCF_FILE: file containing the SYSCF options shown above;
|
||||
* default is 'sysconf' in nethack's playground.
|
||||
*/
|
||||
|
||||
#ifndef WIZARD_NAME /* allow for compile-time or Makefile changes */
|
||||
#define WIZARD_NAME "wizard"
|
||||
#define WIZARD_NAME "wizard" /* value is ignored if SYSCF is enabled */
|
||||
#endif
|
||||
|
||||
#ifndef SYSCF
|
||||
@@ -184,11 +199,20 @@
|
||||
#define GREPPATH "/bin/grep"
|
||||
#endif
|
||||
|
||||
#define LOGFILE "logfile" /* larger file for debugging purposes */
|
||||
/* note: "larger" is in comparison with 'record', the high-scores file
|
||||
(whose name can be overridden via #define in global.h if desired) */
|
||||
#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 NEWS "news" /* the file containing the latest hack news */
|
||||
#define PANICLOG "paniclog" /* log of panic and impossible events */
|
||||
|
||||
/*
|
||||
* PERSMAX, POINTSMIN, ENTRYMAX, PERS_IS_UID:
|
||||
* These control the contents of 'record', the high-scores file.
|
||||
* They used to be located in topten.c rather than config.h, and
|
||||
* their values can be overridden at runtime (to increase ENTRYMAX, the
|
||||
* maximum number of scores to keep, for example) if SYSCF is enabled.
|
||||
*/
|
||||
#ifndef PERSMAX
|
||||
#define PERSMAX 3 /* entries per name/uid per char. allowed */
|
||||
#endif
|
||||
@@ -207,20 +231,20 @@
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If COMPRESS is defined, it should contain the full path name of your
|
||||
* 'compress' program.
|
||||
* If COMPRESS is defined, it should contain the full path name of your
|
||||
* 'compress' program.
|
||||
*
|
||||
* If you define COMPRESS, you must also define COMPRESS_EXTENSION
|
||||
* as the extension your compressor appends to filenames after
|
||||
* compression. Currently, only UNIX fully implements
|
||||
* COMPRESS; other ports should be able to uncompress save files a
|
||||
* la unixmain.c if so inclined.
|
||||
* If you define COMPRESS, you must also define COMPRESS_EXTENSION
|
||||
* as the extension your compressor appends to filenames after
|
||||
* compression. Currently, only UNIX fully implements
|
||||
* COMPRESS; other ports should be able to uncompress save files a
|
||||
* la unixmain.c if so inclined.
|
||||
*
|
||||
* Defining ZLIB_COMP builds in support for zlib compression. If you
|
||||
* define ZLIB_COMP, you must link with a zlib library. Not all ports
|
||||
* support ZLIB_COMP.
|
||||
* Defining ZLIB_COMP builds in support for zlib compression. If you
|
||||
* define ZLIB_COMP, you must link with a zlib library. Not all ports
|
||||
* support ZLIB_COMP.
|
||||
*
|
||||
* COMPRESS and ZLIB_COMP are mutually exclusive.
|
||||
* COMPRESS and ZLIB_COMP are mutually exclusive.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -234,52 +258,52 @@
|
||||
#endif
|
||||
|
||||
#ifndef COMPRESS
|
||||
/* # define ZLIB_COMP */ /* ZLIB for compression */
|
||||
/* # define ZLIB_COMP */ /* ZLIB for compression */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Internal Compression Options
|
||||
* Internal Compression Options
|
||||
*
|
||||
* Internal compression options RLECOMP and ZEROCOMP alter the data
|
||||
* that gets written to the save file by NetHack, in contrast
|
||||
* to COMPRESS or ZLIB_COMP which compress the entire file after
|
||||
* the NetHack data is written out.
|
||||
* Internal compression options RLECOMP and ZEROCOMP alter the data
|
||||
* that gets written to the save file by NetHack, in contrast
|
||||
* to COMPRESS or ZLIB_COMP which compress the entire file after
|
||||
* the NetHack data is written out.
|
||||
*
|
||||
* Defining RLECOMP builds in support for internal run-length
|
||||
* compression of level structures. If RLECOMP support is included
|
||||
* it can be toggled on/off at runtime via the config file option
|
||||
* rlecomp.
|
||||
* Defining RLECOMP builds in support for internal run-length
|
||||
* compression of level structures. If RLECOMP support is included
|
||||
* it can be toggled on/off at runtime via the config file option
|
||||
* rlecomp.
|
||||
*
|
||||
* Defining ZEROCOMP builds in support for internal zero-comp
|
||||
* compression of data. If ZEROCOMP support is included it can still
|
||||
* be toggled on/off at runtime via the config file option zerocomp.
|
||||
* Defining ZEROCOMP builds in support for internal zero-comp
|
||||
* compression of data. If ZEROCOMP support is included it can still
|
||||
* be toggled on/off at runtime via the config file option zerocomp.
|
||||
*
|
||||
* RLECOMP and ZEROCOMP support can be included even if
|
||||
* COMPRESS or ZLIB_COMP support is included. One reason for doing
|
||||
* so would be to provide savefile read compatibility with a savefile
|
||||
* where those options were in effect. With RLECOMP and/or ZEROCOMP
|
||||
* defined, NetHack can read an rlecomp or zerocomp savefile in, yet
|
||||
* re-save without them.
|
||||
* RLECOMP and ZEROCOMP support can be included even if
|
||||
* COMPRESS or ZLIB_COMP support is included. One reason for doing
|
||||
* so would be to provide savefile read compatibility with a savefile
|
||||
* where those options were in effect. With RLECOMP and/or ZEROCOMP
|
||||
* defined, NetHack can read an rlecomp or zerocomp savefile in, yet
|
||||
* re-save without them.
|
||||
*
|
||||
* Using any compression option will create smaller bones/level/save
|
||||
* files at the cost of additional code and time.
|
||||
* Using any compression option will create smaller bones/level/save
|
||||
* files at the cost of additional code and time.
|
||||
*/
|
||||
|
||||
/* # define INTERNAL_COMP */ /* defines both ZEROCOMP and RLECOMP */
|
||||
/* # define ZEROCOMP */ /* Support ZEROCOMP compression */
|
||||
/* # define RLECOMP */ /* Support RLECOMP compression */
|
||||
/* # define INTERNAL_COMP */ /* defines both ZEROCOMP and RLECOMP */
|
||||
/* # define ZEROCOMP */ /* Support ZEROCOMP compression */
|
||||
/* # define RLECOMP */ /* Support RLECOMP compression */
|
||||
|
||||
/*
|
||||
* Data librarian. Defining DLB places most of the support files into
|
||||
* a tar-like file, thus making a neater installation. See *conf.h
|
||||
* for detailed configuration.
|
||||
* Data librarian. Defining DLB places most of the support files into
|
||||
* a tar-like file, thus making a neater installation. See *conf.h
|
||||
* for detailed configuration.
|
||||
*/
|
||||
/* #define DLB */ /* not supported on all platforms */
|
||||
|
||||
/*
|
||||
* Defining INSURANCE slows down level changes, but allows games that
|
||||
* died due to program or system crashes to be resumed from the point
|
||||
* of the last level change, after running a utility program.
|
||||
* Defining INSURANCE slows down level changes, but allows games that
|
||||
* died due to program or system crashes to be resumed from the point
|
||||
* of the last level change, after running a utility program.
|
||||
*/
|
||||
#define INSURANCE /* allow crashed game recovery */
|
||||
|
||||
@@ -299,7 +323,7 @@
|
||||
/*
|
||||
* Some system administrators are stupid enough to make Hack suid root
|
||||
* or suid daemon, where daemon has other powers besides that of reading or
|
||||
* writing Hack files. In such cases one should be careful with chdir's
|
||||
* writing Hack files. In such cases one should be careful with chdir's
|
||||
* since the user might create files in a directory of his choice.
|
||||
* Of course SECURE is meaningful only if HACKDIR is defined.
|
||||
*/
|
||||
@@ -313,15 +337,15 @@
|
||||
*/
|
||||
#endif /* CHDIR */
|
||||
|
||||
/* If GENERIC_USERNAMES is defined, and the user name is found
|
||||
* in that list, prompt for username instead.
|
||||
/* If GENERIC_USERNAMES is defined, and the player's username is found
|
||||
* in the list, prompt for character name instead of using username.
|
||||
* 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.
|
||||
* For example, both schar and uchar should be short ints on
|
||||
* the AT&T 3B2/3B5/etc. family.
|
||||
* Section 3: Definitions that may vary with system type.
|
||||
* For example, both schar and uchar should be short ints on
|
||||
* the AT&T 3B2/3B5/etc. family.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -341,13 +365,11 @@
|
||||
#include "tradstdc.h"
|
||||
|
||||
/*
|
||||
* type schar: small signed integers (8 bits suffice) (eg. TOS)
|
||||
*
|
||||
* typedef char schar;
|
||||
*
|
||||
* will do when you have signed characters; otherwise use
|
||||
*
|
||||
* typedef short int schar;
|
||||
* type schar:
|
||||
* small signed integers (8 bits suffice) (eg. TOS)
|
||||
* typedef char schar;
|
||||
* will do when you have signed characters; otherwise use
|
||||
* typedef short int schar;
|
||||
*/
|
||||
#ifdef AZTEC
|
||||
#define schar char
|
||||
@@ -356,14 +378,11 @@ typedef signed char schar;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* type uchar: small unsigned integers (8 bits suffice - but 7 bits do not)
|
||||
*
|
||||
* typedef unsigned char uchar;
|
||||
*
|
||||
* will be satisfactory if you have an "unsigned char" type;
|
||||
* otherwise use
|
||||
*
|
||||
* typedef unsigned short int uchar;
|
||||
* type uchar:
|
||||
* small unsigned integers (8 bits suffice - but 7 bits do not)
|
||||
* typedef unsigned char uchar;
|
||||
* will be satisfactory if you have an "unsigned char" type; otherwise use
|
||||
* typedef unsigned short int uchar;
|
||||
*/
|
||||
#ifndef _AIX32 /* identical typedef in system file causes trouble */
|
||||
typedef unsigned char uchar;
|
||||
@@ -400,19 +419,6 @@ typedef unsigned char uchar;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Section 4: THE FUN STUFF!!!
|
||||
*
|
||||
* Conditional compilation of special options are controlled here.
|
||||
* If you define the following flags, you will add not only to the
|
||||
* complexity of the game but also to the size of the load module.
|
||||
*/
|
||||
|
||||
/* display features */
|
||||
/* dungeon features */
|
||||
/* dungeon levels */
|
||||
/* monsters & objects */
|
||||
/* I/O */
|
||||
#if !defined(MAC)
|
||||
#if !defined(NOCLIPPING)
|
||||
#define CLIPPING /* allow smaller screens -- ERS */
|
||||
@@ -421,21 +427,33 @@ typedef unsigned char uchar;
|
||||
|
||||
#define DOAGAIN '\001' /* ^A, the "redo" key used in cmd.c and getline.c */
|
||||
|
||||
/* #define SCORE_ON_BOTL */ /* added by Gary Erickson (erickson@ucivax) */
|
||||
|
||||
/*
|
||||
* Section 5: EXPERIMENTAL STUFF
|
||||
* Section 4: EXPERIMENTAL STUFF
|
||||
*
|
||||
* Conditional compilation of new or experimental options are controlled here.
|
||||
* Enable any of these at your own risk -- there are almost certainly
|
||||
* bugs left here.
|
||||
*/
|
||||
|
||||
/* #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 */
|
||||
/* #define STATUS_VIA_WINDOWPORT */ /* re-work of the status line
|
||||
updating process */
|
||||
/* #define STATUS_HILITES */ /* support hilites of status fields */
|
||||
|
||||
/* End of Section 5 */
|
||||
/* #define WINCHAIN */ /* stacked window systems */
|
||||
|
||||
/* #define DEBUG_MIGRATING_MONS */ /* add a wizard-mode command to help debug
|
||||
migrating monsters */
|
||||
|
||||
/* SCORE_ON_BOTL is neither experimental nor inadequately tested,
|
||||
but doesn't seem to fit in any other section... */
|
||||
/* #define SCORE_ON_BOTL */ /* enable the 'showscore' option to
|
||||
show estimated score on status line */
|
||||
|
||||
/* FREE_ALL_MEMORY is neither experimental nor inadequately tested,
|
||||
but it isn't necessary for successful operation of the program */
|
||||
#define FREE_ALL_MEMORY /* free all memory at exit */
|
||||
|
||||
/* End of Section 4 */
|
||||
|
||||
#include "global.h" /* Define everything else according to choices above */
|
||||
|
||||
|
||||
+8
-1
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 context.h $NHDT-Date: 1445215010 2015/10/19 00:36:50 $ $NHDT-Branch: master $:$NHDT-Revision: 1.27 $ */
|
||||
/* NetHack 3.6 context.h $NHDT-Date: 1447653421 2015/11/16 05:57:01 $ $NHDT-Branch: master $:$NHDT-Revision: 1.28 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -90,6 +90,12 @@ struct tribute_info {
|
||||
/* 30 free bits */
|
||||
};
|
||||
|
||||
struct novel_tracking { /* for choosing random passage when reading novel */
|
||||
unsigned id; /* novel oid from previous passage selection */
|
||||
int count; /* number of passage indices available in pasg[] */
|
||||
xchar pasg[30]; /* pasg[0..count] are passage indices */
|
||||
};
|
||||
|
||||
struct context_info {
|
||||
unsigned ident; /* social security number for each monster */
|
||||
unsigned no_of_wizards; /* 0, 1 or 2 (wizard and his shadow) */
|
||||
@@ -124,6 +130,7 @@ struct context_info {
|
||||
struct polearm_info polearm;
|
||||
struct obj_split objsplit; /* track most recently split object stack */
|
||||
struct tribute_info tribute;
|
||||
struct novel_tracking novel;
|
||||
};
|
||||
|
||||
extern NEARDATA struct context_info context;
|
||||
|
||||
+113
-112
@@ -1,6 +1,6 @@
|
||||
/* NetHack 3.6 display.h $NHDT-Date: 1432512777 2015/05/25 00:12:57 $ $NHDT-Branch: master $:$NHDT-Revision: 1.24 $ */
|
||||
/* NetHack 3.6 display.h $NHDT-Date: 1447729027 2015/11/17 02:57:07 $ $NHDT-Branch: master $:$NHDT-Revision: 1.26 $ */
|
||||
/* Copyright (c) Dean Luick, with acknowledgements to Kevin Darcy */
|
||||
/* and Dave Cohrs, 1990. */
|
||||
/* and Dave Cohrs, 1990. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
#ifndef DISPLAY_H
|
||||
@@ -27,14 +27,16 @@
|
||||
* Returns true if the hero can sense the given monster. This includes
|
||||
* monsters that are hiding or mimicing other monsters.
|
||||
*/
|
||||
#define tp_sensemon(mon) \
|
||||
(/* The hero can always sense a monster IF: */ \
|
||||
(!mindless(mon->data)) && /* 1. the monster has a brain to sense AND */ \
|
||||
((Blind && Blind_telepat) \
|
||||
|| /* 2a. hero is blind and telepathic OR */ /* 2b. hero is using a \
|
||||
telepathy inducing */ /* object and in range */ \
|
||||
(Unblind_telepat \
|
||||
&& (distu(mon->mx, mon->my) <= (BOLT_LIM * BOLT_LIM)))))
|
||||
#define tp_sensemon(mon) \
|
||||
(/* The hero can always sense a monster IF: */ \
|
||||
/* 1. the monster has a brain to sense */ \
|
||||
(!mindless(mon->data)) \
|
||||
/* AND 2a. hero is blind and telepathic */ \
|
||||
&& ((Blind && Blind_telepat) \
|
||||
/* OR 2b. hero is using a telepathy inducing */ \
|
||||
/* object and in range */ \
|
||||
|| (Unblind_telepat \
|
||||
&& (distu(mon->mx, mon->my) <= (BOLT_LIM * BOLT_LIM)))))
|
||||
|
||||
#define sensemon(mon) \
|
||||
(tp_sensemon(mon) || Detect_monsters || MATCH_WARN_OF_MON(mon))
|
||||
@@ -56,12 +58,11 @@
|
||||
* vobj_at() returns a pointer to an object that the hero can see there.
|
||||
* Infravision is not taken into account.
|
||||
*/
|
||||
#define mon_visible(mon) \
|
||||
(/* The hero can see the monster */ /* IF the monster */ \
|
||||
(!mon->minvis || See_invisible) && /* 1. is not invisible AND */ \
|
||||
(!mon->mundetected) && /* 2. not an undetected hider */ \
|
||||
(!(mon->mburied || u.uburied)) /* 3. neither you or it is buried */ \
|
||||
)
|
||||
#define mon_visible(mon) \
|
||||
(/* The hero can see the monster IF the monster */ \
|
||||
(!mon->minvis || See_invisible) /* 1. is not invisible */ \
|
||||
&& !mon->mundetected /* AND 2. not an undetected hider */ \
|
||||
&& !(mon->mburied || u.uburied)) /* AND 3. neither you nor it is buried */
|
||||
|
||||
/*
|
||||
* see_with_infrared()
|
||||
@@ -72,7 +73,7 @@
|
||||
* canseemon() or canspotmon() which already check that.
|
||||
*/
|
||||
#define see_with_infrared(mon) \
|
||||
(!Blind && Infravision && infravisible(mon->data) \
|
||||
(!Blind && Infravision && mon && infravisible(mon->data) \
|
||||
&& couldsee(mon->mx, mon->my))
|
||||
|
||||
/*
|
||||
@@ -99,7 +100,7 @@
|
||||
/* knowninvisible(mon)
|
||||
* This one checks to see if you know a monster is both there and invisible.
|
||||
* 1) If you can see the monster and have see invisible, it is assumed the
|
||||
* monster is transparent, but visible in some manner. (Earlier versions of
|
||||
* monster is transparent, but visible in some manner. (Earlier versions of
|
||||
* Nethack were really inconsistent on this.)
|
||||
* 2) If you can't see the monster, but can see its location and you have
|
||||
* telepathy that works when you can see, you can tell that there is a
|
||||
@@ -116,7 +117,7 @@
|
||||
/*
|
||||
* is_safepet(mon)
|
||||
*
|
||||
* A special case check used in attack() and domove(). Placing the
|
||||
* A special case check used in attack() and domove(). Placing the
|
||||
* definition here is convenient.
|
||||
*/
|
||||
#define is_safepet(mon) \
|
||||
@@ -176,13 +177,12 @@
|
||||
/*
|
||||
* tmp_at() control calls.
|
||||
*/
|
||||
#define DISP_BEAM (-1) /* Keep all glyphs showing & clean up at end. */
|
||||
#define DISP_ALL (-2) /* Like beam, but still displayed if not visible. */
|
||||
#define DISP_FLASH (-3) /* Clean up each glyph before displaying new one. */
|
||||
#define DISP_ALWAYS (-4) /* Like flash, but still displayed if not visible. \
|
||||
*/
|
||||
#define DISP_CHANGE (-5) /* Change glyph. */
|
||||
#define DISP_END (-6) /* Clean up. */
|
||||
#define DISP_BEAM (-1) /* Keep all glyphs showing & clean up at end. */
|
||||
#define DISP_ALL (-2) /* Like beam, but still displayed if not visible. */
|
||||
#define DISP_FLASH (-3) /* Clean up each glyph before displaying new one. */
|
||||
#define DISP_ALWAYS (-4) /* Like flash, but still displayed if not visible. */
|
||||
#define DISP_CHANGE (-5) /* Change glyph. */
|
||||
#define DISP_END (-6) /* Clean up. */
|
||||
#define DISP_FREEMEM (-7) /* Free all memory during exit only. */
|
||||
|
||||
/* Total number of cmap indices in the shield_static[] array. */
|
||||
@@ -198,17 +198,16 @@
|
||||
((u.usteed && mon_visible(u.usteed)) ? ridden_mon_to_glyph(u.usteed) \
|
||||
: (otherwise_self))
|
||||
|
||||
#define display_self() \
|
||||
show_glyph(u.ux, u.uy, \
|
||||
maybe_display_usteed( \
|
||||
youmonst.m_ap_type == M_AP_NOTHING \
|
||||
? hero_glyph \
|
||||
: youmonst.m_ap_type == M_AP_FURNITURE \
|
||||
? cmap_to_glyph(youmonst.mappearance) \
|
||||
: youmonst.m_ap_type == M_AP_OBJECT \
|
||||
? objnum_to_glyph(youmonst.mappearance) \
|
||||
: /* else M_AP_MONSTER */ \
|
||||
monnum_to_glyph(youmonst.mappearance)))
|
||||
#define display_self() \
|
||||
show_glyph(u.ux, u.uy, \
|
||||
maybe_display_usteed((youmonst.m_ap_type == M_AP_NOTHING) \
|
||||
? hero_glyph \
|
||||
: (youmonst.m_ap_type == M_AP_FURNITURE) \
|
||||
? cmap_to_glyph(youmonst.mappearance) \
|
||||
: (youmonst.m_ap_type == M_AP_OBJECT) \
|
||||
? objnum_to_glyph(youmonst.mappearance) \
|
||||
/* else M_AP_MONSTER */ \
|
||||
: monnum_to_glyph(youmonst.mappearance)))
|
||||
|
||||
/*
|
||||
* A glyph is an abstraction that represents a _unique_ monster, object,
|
||||
@@ -222,62 +221,61 @@
|
||||
*
|
||||
* Glyphs are grouped for easy accessibility:
|
||||
*
|
||||
* monster Represents all the wild (not tame) monsters. Count: NUMMONS.
|
||||
* monster Represents all the wild (not tame) monsters. Count: NUMMONS.
|
||||
*
|
||||
* pet Represents all of the tame monsters. Count: NUMMONS
|
||||
* pet Represents all of the tame monsters. Count: NUMMONS
|
||||
*
|
||||
* invisible Invisible monster placeholder. Count: 1
|
||||
* invisible Invisible monster placeholder. Count: 1
|
||||
*
|
||||
* detect Represents all detected monsters. Count: NUMMONS
|
||||
* detect Represents all detected monsters. Count: NUMMONS
|
||||
*
|
||||
* corpse One for each monster. Count: NUMMONS
|
||||
* corpse One for each monster. Count: NUMMONS
|
||||
*
|
||||
* ridden Represents all monsters being ridden. Count: NUMMONS
|
||||
* ridden Represents all monsters being ridden. Count: NUMMONS
|
||||
*
|
||||
* object One for each object. Count: NUM_OBJECTS
|
||||
* object One for each object. Count: NUM_OBJECTS
|
||||
*
|
||||
* cmap One for each entry in the character map. The character map
|
||||
* is the dungeon features and other miscellaneous things.
|
||||
* Count: MAXPCHARS
|
||||
* cmap One for each entry in the character map. The character map
|
||||
* is the dungeon features and other miscellaneous things.
|
||||
* Count: MAXPCHARS
|
||||
*
|
||||
* explosions A set of nine for each of the following seven explosion types:
|
||||
* explosions A set of nine for each of the following seven explosion types:
|
||||
* dark, noxious, muddy, wet, magical, fiery, frosty.
|
||||
* The nine positions represent those surrounding the hero.
|
||||
* Count: MAXEXPCHARS * EXPL_MAX (EXPL_MAX is defined in hack.h)
|
||||
* Count: MAXEXPCHARS * EXPL_MAX (EXPL_MAX is defined in hack.h)
|
||||
*
|
||||
* zap beam A set of four (there are four directions) for each beam type.
|
||||
* The beam type is shifted over 2 positions and the direction
|
||||
* is stored in the lower 2 bits. Count: NUM_ZAP << 2
|
||||
* zap beam A set of four (there are four directions) for each beam type.
|
||||
* The beam type is shifted over 2 positions and the direction
|
||||
* is stored in the lower 2 bits. Count: NUM_ZAP << 2
|
||||
*
|
||||
* swallow A set of eight for each monster. The eight positions rep-
|
||||
* resent those surrounding the hero. The monster number is
|
||||
* shifted over 3 positions and the swallow position is stored
|
||||
* in the lower three bits. Count: NUMMONS << 3
|
||||
* swallow A set of eight for each monster. The eight positions rep-
|
||||
* resent those surrounding the hero. The monster number is
|
||||
* shifted over 3 positions and the swallow position is stored
|
||||
* in the lower three bits. Count: NUMMONS << 3
|
||||
*
|
||||
* warning A set of six representing the different warning levels.
|
||||
* warning A set of six representing the different warning levels.
|
||||
*
|
||||
* The following are offsets used to convert to and from a glyph.
|
||||
*/
|
||||
#define NUM_ZAP 8 /* number of zap beam types */
|
||||
|
||||
#define GLYPH_MON_OFF 0
|
||||
#define GLYPH_PET_OFF (NUMMONS + GLYPH_MON_OFF)
|
||||
#define GLYPH_INVIS_OFF (NUMMONS + GLYPH_PET_OFF)
|
||||
#define GLYPH_DETECT_OFF (1 + GLYPH_INVIS_OFF)
|
||||
#define GLYPH_BODY_OFF (NUMMONS + GLYPH_DETECT_OFF)
|
||||
#define GLYPH_RIDDEN_OFF (NUMMONS + GLYPH_BODY_OFF)
|
||||
#define GLYPH_OBJ_OFF (NUMMONS + GLYPH_RIDDEN_OFF)
|
||||
#define GLYPH_CMAP_OFF (NUM_OBJECTS + GLYPH_OBJ_OFF)
|
||||
#define GLYPH_MON_OFF 0
|
||||
#define GLYPH_PET_OFF (NUMMONS + GLYPH_MON_OFF)
|
||||
#define GLYPH_INVIS_OFF (NUMMONS + GLYPH_PET_OFF)
|
||||
#define GLYPH_DETECT_OFF (1 + GLYPH_INVIS_OFF)
|
||||
#define GLYPH_BODY_OFF (NUMMONS + GLYPH_DETECT_OFF)
|
||||
#define GLYPH_RIDDEN_OFF (NUMMONS + GLYPH_BODY_OFF)
|
||||
#define GLYPH_OBJ_OFF (NUMMONS + GLYPH_RIDDEN_OFF)
|
||||
#define GLYPH_CMAP_OFF (NUM_OBJECTS + GLYPH_OBJ_OFF)
|
||||
#define GLYPH_EXPLODE_OFF ((MAXPCHARS - MAXEXPCHARS) + GLYPH_CMAP_OFF)
|
||||
#define GLYPH_ZAP_OFF ((MAXEXPCHARS * EXPL_MAX) + GLYPH_EXPLODE_OFF)
|
||||
#define GLYPH_ZAP_OFF ((MAXEXPCHARS * EXPL_MAX) + GLYPH_EXPLODE_OFF)
|
||||
#define GLYPH_SWALLOW_OFF ((NUM_ZAP << 2) + GLYPH_ZAP_OFF)
|
||||
#define GLYPH_WARNING_OFF ((NUMMONS << 3) + GLYPH_SWALLOW_OFF)
|
||||
#define GLYPH_STATUE_OFF (WARNCOUNT + GLYPH_WARNING_OFF)
|
||||
#define MAX_GLYPH (NUMMONS + GLYPH_STATUE_OFF)
|
||||
#define GLYPH_STATUE_OFF (WARNCOUNT + GLYPH_WARNING_OFF)
|
||||
#define MAX_GLYPH (NUMMONS + GLYPH_STATUE_OFF)
|
||||
|
||||
#define NO_GLYPH MAX_GLYPH
|
||||
|
||||
#define GLYPH_INVISIBLE GLYPH_INVIS_OFF
|
||||
#define NO_GLYPH MAX_GLYPH
|
||||
#define GLYPH_INVISIBLE GLYPH_INVIS_OFF
|
||||
|
||||
#define warning_to_glyph(mwarnlev) ((mwarnlev) + GLYPH_WARNING_OFF)
|
||||
#define mon_to_glyph(mon) \
|
||||
@@ -289,23 +287,24 @@
|
||||
#define pet_to_glyph(mon) \
|
||||
((int) what_mon(monsndx((mon)->data)) + GLYPH_PET_OFF)
|
||||
|
||||
/* This has the unfortunate side effect of needing a global variable */
|
||||
/* to store a result. 'otg_temp' is defined and declared in decl.{ch}. */
|
||||
/* This has the unfortunate side effect of needing a global variable */
|
||||
/* to store a result. 'otg_temp' is defined and declared in decl.{ch}. */
|
||||
#define random_obj_to_glyph() \
|
||||
((otg_temp = random_object()) == CORPSE \
|
||||
? random_monster() + GLYPH_BODY_OFF \
|
||||
: otg_temp + GLYPH_OBJ_OFF)
|
||||
|
||||
#define obj_to_glyph(obj) \
|
||||
((obj)->otyp == STATUE \
|
||||
#define obj_to_glyph(obj) \
|
||||
(((obj)->otyp == STATUE) \
|
||||
? statue_to_glyph(obj) \
|
||||
: Hallucination ? random_obj_to_glyph() \
|
||||
: (obj)->otyp == CORPSE \
|
||||
? (int) (obj)->corpsenm + GLYPH_BODY_OFF \
|
||||
: (int) (obj)->otyp + GLYPH_OBJ_OFF)
|
||||
: Hallucination \
|
||||
? random_obj_to_glyph() \
|
||||
: ((obj)->otyp == CORPSE) \
|
||||
? (int) (obj)->corpsenm + GLYPH_BODY_OFF \
|
||||
: (int) (obj)->otyp + GLYPH_OBJ_OFF)
|
||||
|
||||
/* MRKR: Statues now have glyphs corresponding to the monster they */
|
||||
/* brepresent and look like monsters when you are hallucinating. */
|
||||
/* represent and look like monsters when you are hallucinating. */
|
||||
|
||||
#define statue_to_glyph(obj) \
|
||||
(Hallucination ? random_monster() + GLYPH_MON_OFF \
|
||||
@@ -313,7 +312,7 @@
|
||||
|
||||
#define cmap_to_glyph(cmap_idx) ((int) (cmap_idx) + GLYPH_CMAP_OFF)
|
||||
#define explosion_to_glyph(expltype, idx) \
|
||||
((((expltype) *MAXEXPCHARS) + ((idx) -S_explode1)) + GLYPH_EXPLODE_OFF)
|
||||
((((expltype) * MAXEXPCHARS) + ((idx) - S_explode1)) + GLYPH_EXPLODE_OFF)
|
||||
|
||||
#define trap_to_glyph(trap) \
|
||||
cmap_to_glyph(trap_to_defsym(what_trap((trap)->ttyp)))
|
||||
@@ -337,43 +336,45 @@
|
||||
|
||||
/*
|
||||
* Change the given glyph into it's given type. Note:
|
||||
* 1) Pets, detected, and ridden monsters are animals and are converted
|
||||
* to the proper monster number.
|
||||
* 2) Bodies are all mapped into the generic CORPSE object
|
||||
* 3) If handed a glyph out of range for the type, these functions
|
||||
* will return NO_GLYPH (see exception below)
|
||||
* 4) glyph_to_swallow() does not return a showsyms[] index, but an
|
||||
* offset from the first swallow symbol. If handed something
|
||||
* out of range, it will return zero (for lack of anything better
|
||||
* to return).
|
||||
* 1) Pets, detected, and ridden monsters are animals and are converted
|
||||
* to the proper monster number.
|
||||
* 2) Bodies are all mapped into the generic CORPSE object
|
||||
* 3) If handed a glyph out of range for the type, these functions
|
||||
* will return NO_GLYPH (see exception below)
|
||||
* 4) glyph_to_swallow() does not return a showsyms[] index, but an
|
||||
* offset from the first swallow symbol. If handed something
|
||||
* out of range, it will return zero (for lack of anything better
|
||||
* to return).
|
||||
*/
|
||||
#define glyph_to_mon(glyph) \
|
||||
(glyph_is_normal_monster(glyph) \
|
||||
? ((glyph) -GLYPH_MON_OFF) \
|
||||
: glyph_is_pet(glyph) \
|
||||
? ((glyph) -GLYPH_PET_OFF) \
|
||||
: glyph_is_detected_monster(glyph) \
|
||||
? ((glyph) -GLYPH_DETECT_OFF) \
|
||||
: glyph_is_ridden_monster(glyph) \
|
||||
? ((glyph) -GLYPH_RIDDEN_OFF) \
|
||||
: glyph_is_statue(glyph) \
|
||||
? ((glyph) -GLYPH_STATUE_OFF) \
|
||||
#define glyph_to_mon(glyph) \
|
||||
(glyph_is_normal_monster(glyph) \
|
||||
? ((glyph) - GLYPH_MON_OFF) \
|
||||
: glyph_is_pet(glyph) \
|
||||
? ((glyph) - GLYPH_PET_OFF) \
|
||||
: glyph_is_detected_monster(glyph) \
|
||||
? ((glyph) - GLYPH_DETECT_OFF) \
|
||||
: glyph_is_ridden_monster(glyph) \
|
||||
? ((glyph) - GLYPH_RIDDEN_OFF) \
|
||||
: glyph_is_statue(glyph) \
|
||||
? ((glyph) - GLYPH_STATUE_OFF) \
|
||||
: NO_GLYPH)
|
||||
#define glyph_to_obj(glyph) \
|
||||
(glyph_is_body(glyph) ? CORPSE : glyph_is_statue(glyph) \
|
||||
? STATUE \
|
||||
: glyph_is_normal_object(glyph) \
|
||||
? ((glyph) -GLYPH_OBJ_OFF) \
|
||||
: NO_GLYPH)
|
||||
#define glyph_to_trap(glyph) \
|
||||
(glyph_is_trap(glyph) ? ((int) defsym_to_trap((glyph) -GLYPH_CMAP_OFF)) \
|
||||
#define glyph_to_obj(glyph) \
|
||||
(glyph_is_body(glyph) \
|
||||
? CORPSE \
|
||||
: glyph_is_statue(glyph) \
|
||||
? STATUE \
|
||||
: glyph_is_normal_object(glyph) \
|
||||
? ((glyph) - GLYPH_OBJ_OFF) \
|
||||
: NO_GLYPH)
|
||||
#define glyph_to_trap(glyph) \
|
||||
(glyph_is_trap(glyph) ? ((int) defsym_to_trap((glyph) - GLYPH_CMAP_OFF)) \
|
||||
: NO_GLYPH)
|
||||
#define glyph_to_cmap(glyph) \
|
||||
(glyph_is_cmap(glyph) ? ((glyph) -GLYPH_CMAP_OFF) : NO_GLYPH)
|
||||
(glyph_is_cmap(glyph) ? ((glyph) - GLYPH_CMAP_OFF) : NO_GLYPH)
|
||||
#define glyph_to_swallow(glyph) \
|
||||
(glyph_is_swallow(glyph) ? (((glyph) -GLYPH_SWALLOW_OFF) & 0x7) : 0)
|
||||
(glyph_is_swallow(glyph) ? (((glyph) - GLYPH_SWALLOW_OFF) & 0x7) : 0)
|
||||
#define glyph_to_warning(glyph) \
|
||||
(glyph_is_warning(glyph) ? ((glyph) -GLYPH_WARNING_OFF) : NO_GLYPH);
|
||||
(glyph_is_warning(glyph) ? ((glyph) - GLYPH_WARNING_OFF) : NO_GLYPH);
|
||||
|
||||
/*
|
||||
* Return true if the given glyph is what we want. Note that bodies are
|
||||
|
||||
+12
-19
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 dungeon.h $NHDT-Date: 1436065581 2015/07/05 03:06:21 $ $NHDT-Branch: master $:$NHDT-Revision: 1.21 $ */
|
||||
/* NetHack 3.6 dungeon.h $NHDT-Date: 1447755969 2015/11/17 10:26:09 $ $NHDT-Branch: master $:$NHDT-Revision: 1.24 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -79,12 +79,10 @@ typedef struct branch {
|
||||
|
||||
/* branch types */
|
||||
#define BR_STAIR 0 /* "Regular" connection, 2 staircases. */
|
||||
#define BR_NO_END1 1 /* "Regular" connection. However, no stair from */
|
||||
/* end1 to end2. There is a stair from end2 */
|
||||
/* to end1. */
|
||||
#define BR_NO_END2 2 /* "Regular" connection. However, no stair from */
|
||||
/* end2 to end1. There is a stair from end1 */
|
||||
/* to end2. */
|
||||
#define BR_NO_END1 1 /* "Regular" connection. However, no stair from
|
||||
end1 to end2. There is a stair from end2 to end1. */
|
||||
#define BR_NO_END2 2 /* "Regular" connection. However, no stair from
|
||||
end2 to end1. There is a stair from end1 to end2. */
|
||||
#define BR_PORTAL 3 /* Connection by magic portals (traps) */
|
||||
|
||||
/* A particular dungeon contains num_dunlevs d_levels with dlevel 1..
|
||||
@@ -153,11 +151,9 @@ struct linfo {
|
||||
#define VISITED 0x01 /* hero has visited this level */
|
||||
#define FORGOTTEN 0x02 /* hero will forget this level when reached */
|
||||
#define LFILE_EXISTS 0x04 /* a level file exists for this level */
|
||||
/*
|
||||
* Note: VISITED and LFILE_EXISTS are currently almost always set at the
|
||||
* same time. However they _mean_ different things.
|
||||
*/
|
||||
|
||||
/* Note: VISITED and LFILE_EXISTS are currently almost always
|
||||
* set at the same time. However they _mean_ different things.
|
||||
*/
|
||||
#ifdef MFLOPPY
|
||||
#define FROMPERM 1 /* for ramdisk use */
|
||||
#define TOPERM 2 /* for ramdisk use */
|
||||
@@ -171,18 +167,15 @@ struct linfo {
|
||||
|
||||
/* types and structures for dungeon map recording
|
||||
*
|
||||
* It is designed to eliminate the need for an external notes file for some of
|
||||
* the more mundane dungeon elements. "Where was the last altar I passed?"
|
||||
* etc...
|
||||
* It is designed to eliminate the need for an external notes file for some
|
||||
* mundane dungeon elements. "Where was the last altar I passed?" etc...
|
||||
* Presumably the character can remember this sort of thing even if, months
|
||||
* later in real time picking up an old save game, I can't.
|
||||
*
|
||||
* To be consistent, one can assume that this map is in the player's mind and
|
||||
* has no physical correspondence (eliminating illiteracy/blind/hands/hands
|
||||
* free
|
||||
* concerns.) Therefore, this map is not exhaustive nor detailed ("some
|
||||
* fountains").
|
||||
* This makes it also subject to player conditions (amnesia).
|
||||
* free concerns). Therefore, this map is not exhaustive nor detailed ("some
|
||||
* fountains"). This makes it also subject to player conditions (amnesia).
|
||||
*/
|
||||
|
||||
/* Because clearly Nethack needs more ways to specify alignment */
|
||||
|
||||
+7
-3
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 extern.h $NHDT-Date: 1446516834 2015/11/03 02:13:54 $ $NHDT-Branch: master $:$NHDT-Revision: 1.513 $ */
|
||||
/* NetHack 3.6 extern.h $NHDT-Date: 1447653422 2015/11/16 05:57:02 $ $NHDT-Branch: master $:$NHDT-Revision: 1.517 $ */
|
||||
/* Copyright (c) Steve Creps, 1988. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -306,6 +306,7 @@ E void FDECL(map_object, (struct obj *, int));
|
||||
E void FDECL(map_invisible, (XCHAR_P, XCHAR_P));
|
||||
E void FDECL(unmap_object, (int, int));
|
||||
E void FDECL(map_location, (int, int, int));
|
||||
E void FDECL(feel_newsym, (XCHAR_P, XCHAR_P));
|
||||
E void FDECL(feel_location, (XCHAR_P, XCHAR_P));
|
||||
E void FDECL(newsym, (int, int));
|
||||
E void FDECL(shieldeff, (XCHAR_P, XCHAR_P));
|
||||
@@ -765,7 +766,8 @@ E void NDECL(really_close);
|
||||
#ifdef DEBUG
|
||||
E boolean FDECL(debugcore, (const char *, BOOLEAN_P));
|
||||
#endif
|
||||
E boolean FDECL(read_tribute, (const char *, const char *, int, char *, int));
|
||||
E boolean FDECL(read_tribute, (const char *, const char *, int,
|
||||
char *, int, unsigned));
|
||||
E boolean FDECL(Death_quote, (char *, int));
|
||||
|
||||
/* ### fountain.c ### */
|
||||
@@ -1069,6 +1071,7 @@ E int FDECL(monhp_per_lvl, (struct monst *));
|
||||
E void FDECL(newmonhp, (struct monst *, int));
|
||||
E struct mextra *NDECL(newmextra);
|
||||
E void FDECL(copy_mextra, (struct monst *, struct monst *));
|
||||
E void FDECL(dealloc_mextra, (struct monst *));
|
||||
E struct monst *FDECL(makemon, (struct permonst *, int, int, int));
|
||||
E boolean FDECL(create_critters, (int, struct permonst *, BOOLEAN_P));
|
||||
E struct permonst *NDECL(rndmonst);
|
||||
@@ -1202,7 +1205,7 @@ E const char *FDECL(waterbody_name, (XCHAR_P, XCHAR_P));
|
||||
|
||||
E struct oextra *NDECL(newoextra);
|
||||
E void FDECL(copy_oextra, (struct obj *, struct obj *));
|
||||
E void FDECL(dealloc_oextra, (struct oextra *));
|
||||
E void FDECL(dealloc_oextra, (struct obj *));
|
||||
E void FDECL(newomonst, (struct obj *));
|
||||
E void FDECL(free_omonst, (struct obj *));
|
||||
E void FDECL(newomid, (struct obj *));
|
||||
@@ -1637,6 +1640,7 @@ E void FDECL(set_option_mod_status, (const char *, int));
|
||||
E int FDECL(add_autopickup_exception, (const char *));
|
||||
E void NDECL(free_autopickup_exceptions);
|
||||
E int FDECL(load_symset, (const char *, int));
|
||||
E void NDECL(free_symsets);
|
||||
E void FDECL(parsesymbols, (char *));
|
||||
E struct symparse *FDECL(match_sym, (char *));
|
||||
E void NDECL(set_playmode);
|
||||
|
||||
+12
-13
@@ -1,6 +1,6 @@
|
||||
/* NetHack 3.6 mactty.h $NHDT-Date: 1432512775 2015/05/25 00:12:55 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ */
|
||||
/* Copyright (c) Jon W{tte 1993. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
/* NetHack 3.6 mactty.h $NHDT-Date: 1447755970 2015/11/17 10:26:10 $ $NHDT-Branch: master $:$NHDT-Revision: 1.12 $ */
|
||||
/* Copyright (c) Jon W{tte 1993. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
/*
|
||||
* This header is the supported external interface for the "tty" window
|
||||
@@ -72,14 +72,14 @@
|
||||
#define CHAR_BLANK ((char) 32)
|
||||
#define CHAR_DELETE ((char) 127)
|
||||
|
||||
extern char
|
||||
game_active; /* flag to window rendering routines not to use ppat */
|
||||
/*
|
||||
* If you want some fancy operations that not a normal TTY device normally
|
||||
* supports, use EXTENDED_SUPPORT. For frames, area erases and area scrolls,
|
||||
* plus bitmap graphics - RESOLUTION DEPENDENT, be sure to call
|
||||
* get_tty_metrics and use those limits.
|
||||
*/
|
||||
extern char game_active; /* flag to window rendering routines
|
||||
not to use ppat */
|
||||
/*
|
||||
* If you want some fancy operations that not a normal TTY device normally
|
||||
* supports, use EXTENDED_SUPPORT. For frames, area erases and area scrolls,
|
||||
* plus bitmap graphics - RESOLUTION DEPENDENT, be sure to call
|
||||
* get_tty_metrics and use those limits.
|
||||
*/
|
||||
#define EXTENDED_SUPPORT 0
|
||||
/*
|
||||
* if you print a lot of single characters, accumulating each one in a
|
||||
@@ -174,8 +174,7 @@ typedef enum tty_attrib {
|
||||
|
||||
/*
|
||||
* Use this macro to cast a function pointer to a tty attribute; this will
|
||||
* help
|
||||
* portability to systems where a function pointer doesn't fit in a long
|
||||
* help portability to systems where a function pointer doesn't fit in a long
|
||||
*/
|
||||
#define TA_ATTRIB_FUNC(x) ((long) (x))
|
||||
|
||||
|
||||
+3
-2
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 macwin.h $NHDT-Date: 1432512779 2015/05/25 00:12:59 $ $NHDT-Branch: master $:$NHDT-Revision: 1.9 $ */
|
||||
/* NetHack 3.6 macwin.h $NHDT-Date: 1447755970 2015/11/17 10:26:10 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -27,7 +27,8 @@ typedef pascal void (*UserItemProcPtr)(WindowPtr theWindow, short itemNo);
|
||||
typedef UserItemProcPtr UserItemUPP;
|
||||
#define NewUserItemProc(p) (UserItemUPP)(p)
|
||||
|
||||
typedef pascal void (*ControlActionProcPtr)(ControlHandle theControl, short partCode);
|
||||
typedef pascal void (*ControlActionProcPtr)(ControlHandle theControl,
|
||||
short partCode);
|
||||
typedef ControlActionProcPtr ControlActionUPP;
|
||||
#define NewControlActionProc(p) (ControlActionUPP)(p)
|
||||
|
||||
|
||||
+6
-9
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 ntconf.h $NHDT-Date: 1432512777 2015/05/25 00:12:57 $ $NHDT-Branch: master $:$NHDT-Revision: 1.47 $ */
|
||||
/* NetHack 3.6 ntconf.h $NHDT-Date: 1447424077 2015/11/13 14:14:37 $ $NHDT-Branch: master $:$NHDT-Revision: 1.48 $ */
|
||||
/* Copyright (c) NetHack PC Development Team 1993, 1994. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -107,11 +107,12 @@ extern void FDECL(interject, (int));
|
||||
#ifdef YYPREFIX
|
||||
#pragma warning(disable : 4102) /* unreferenced label */
|
||||
#endif
|
||||
#if 0
|
||||
#pragma warning(disable : 4018) /* signed/unsigned mismatch */
|
||||
#pragma warning(disable : 4305) /* init, conv from 'const int' to 'char' */
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
/* suppress a warning in cppregex.cpp */
|
||||
#pragma warning(disable : 4101) /* unreferenced local variable */
|
||||
#endif
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
|
||||
#define RUNTIME_PORT_ID /* trigger run-time port identification for \
|
||||
* identification of exe CPU architecture \
|
||||
@@ -187,10 +188,6 @@ extern void FDECL(interject, (int));
|
||||
#define FILENAME_CMP stricmp /* case insensitive */
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
extern char levels[], bones[], permbones[],
|
||||
#endif /* 0 */
|
||||
|
||||
/* this was part of the MICRO stuff in the past */
|
||||
extern const char *alllevels, *allbones;
|
||||
extern char hackdir[];
|
||||
|
||||
+11
-11
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 objclass.h $NHDT-Date: 1432512779 2015/05/25 00:12:59 $ $NHDT-Branch: master $:$NHDT-Revision: 1.13 $ */
|
||||
/* NetHack 3.6 objclass.h $NHDT-Date: 1447755971 2015/11/17 10:26:11 $ $NHDT-Branch: master $:$NHDT-Revision: 1.15 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -31,8 +31,8 @@ struct objclass {
|
||||
|
||||
Bitfield(oc_dir, 2);
|
||||
#define NODIR 1 /* for wands/spells: non-directional */
|
||||
#define IMMEDIATE 2 /* directional */
|
||||
#define RAY 3 /* zap beams */
|
||||
#define IMMEDIATE 2 /* directional */
|
||||
#define RAY 3 /* zap beams */
|
||||
|
||||
#define PIERCE 1 /* for weapons & tools used as weapons */
|
||||
#define SLASH 2 /* (latter includes iron ball & chain) */
|
||||
@@ -151,17 +151,17 @@ extern NEARDATA struct objdescr obj_descr[];
|
||||
#define VENOM_CLASS 17
|
||||
#define MAXOCLASSES 18
|
||||
|
||||
#define ALLOW_COUNT (MAXOCLASSES + 1) /* Can be used in the object class */
|
||||
#define ALL_CLASSES (MAXOCLASSES + 2) /* input to getobj(). */
|
||||
#define ALLOW_NONE (MAXOCLASSES + 3) /* */
|
||||
#define ALLOW_COUNT (MAXOCLASSES + 1) /* Can be used in the object class */
|
||||
#define ALL_CLASSES (MAXOCLASSES + 2) /* input to getobj(). */
|
||||
#define ALLOW_NONE (MAXOCLASSES + 3)
|
||||
|
||||
#define BURNING_OIL (MAXOCLASSES + 1) /* Can be used as input to explode. */
|
||||
#define MON_EXPLODE (MAXOCLASSES + 2) /* Exploding monster (e.g. gas spore) \
|
||||
*/
|
||||
#define BURNING_OIL (MAXOCLASSES + 1) /* Can be used as input to explode. */
|
||||
#define MON_EXPLODE (MAXOCLASSES + 2) /* Exploding monster (e.g. gas spore) */
|
||||
|
||||
#if 0 /* moved to decl.h so that makedefs.c won't see them */
|
||||
extern const struct class_sym def_oc_syms[MAXOCLASSES]; /* default class symbols */
|
||||
extern uchar oc_syms[MAXOCLASSES]; /* current class symbols */
|
||||
extern const struct class_sym
|
||||
def_oc_syms[MAXOCLASSES]; /* default class symbols */
|
||||
extern uchar oc_syms[MAXOCLASSES]; /* current class symbols */
|
||||
#endif
|
||||
|
||||
/* Default definitions of all object-symbols (must match classes above). */
|
||||
|
||||
+58
-52
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 patchlevel.h $NHDT-Date: 1445215015 2015/10/19 00:36:55 $ $NHDT-Branch: master $:$NHDT-Revision: 1.109 $ */
|
||||
/* NetHack 3.6 patchlevel.h $NHDT-Date: 1447755971 2015/11/17 10:26:11 $ $NHDT-Branch: master $:$NHDT-Revision: 1.112 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
/*
|
||||
* PATCHLEVEL is updated for each release.
|
||||
*/
|
||||
#define PATCHLEVEL 1
|
||||
#define PATCHLEVEL 0
|
||||
/*
|
||||
* Incrementing EDITLEVEL can be used to force invalidation of old bones
|
||||
* and save files.
|
||||
*/
|
||||
#define EDITLEVEL 0
|
||||
#define EDITLEVEL 2
|
||||
|
||||
#define COPYRIGHT_BANNER_A "NetHack, Copyright 1985-2015"
|
||||
#define COPYRIGHT_BANNER_B \
|
||||
@@ -25,14 +25,14 @@
|
||||
* If two or more successive releases have compatible data files, define
|
||||
* this with the version number of the oldest such release so that the
|
||||
* new release will accept old save and bones files. The format is
|
||||
* 0xMMmmPPeeL
|
||||
* 0xMMmmPPeeL
|
||||
* 0x = literal prefix "0x", MM = major version, mm = minor version,
|
||||
* PP = patch level, ee = edit level, L = literal suffix "L",
|
||||
* with all four numbers specified as two hexadecimal digits.
|
||||
*/
|
||||
/* #define VERSION_COMPATIBILITY 0x03050000L */
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
/* Version 3.6.x */
|
||||
|
||||
/*
|
||||
@@ -40,7 +40,13 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
/* Version 3.5.x */
|
||||
|
||||
/* Version 3.5 was never officially released.
|
||||
*/
|
||||
|
||||
/****************************************************************************/
|
||||
/* Version 3.4.x */
|
||||
|
||||
/* Patch 3, December 7, 2003
|
||||
@@ -86,11 +92,11 @@
|
||||
*
|
||||
* Hundreds of general bug fixes including some for sliming, zapping,
|
||||
*conduct,
|
||||
* and several more for riding
|
||||
* and several more for riding
|
||||
* Eliminated a few potentially fatal bugs including one for stone-to-flesh,
|
||||
* trouble-fixing during prayer, riding down stairs while punished,
|
||||
* polyd player demon summoning, throwing digging tools into shops, and
|
||||
* a couple from having the vision system enabled at inappropriate times
|
||||
* trouble-fixing during prayer, riding down stairs while punished,
|
||||
* polyd player demon summoning, throwing digging tools into shops, and
|
||||
* a couple from having the vision system enabled at inappropriate times
|
||||
* Corrected some incorrect calculations in final scoring
|
||||
* Enhanced config file processing and alert to duplication of entries
|
||||
* Player selection prompt enhancements for TTY and X11
|
||||
@@ -109,25 +115,25 @@
|
||||
|
||||
/* Version 3.4 */
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
/* Version 3.3.x */
|
||||
|
||||
/* Patch 1, August 9, 2000
|
||||
* Many, many general fixes, including a number for riding, twoweapon,
|
||||
* and invisible monsters
|
||||
* and invisible monsters
|
||||
* A security fix for a couple of potentially exploitable buffer overflows
|
||||
* in previous versions
|
||||
* in previous versions
|
||||
* Redo Ranger quest
|
||||
* Introduction of differentiation between different causes of blindness
|
||||
* Overhaul of warning
|
||||
* Functionality restored to Amiga (courtesy Janne Salmijarvi) and Atari
|
||||
* (courtesy Christian "Marvin" Bressler) ports
|
||||
* (courtesy Christian "Marvin" Bressler) ports
|
||||
* Mac: multiple interface fixes
|
||||
* win32: fixed bug that caused messages to stop displaying after escape
|
||||
* tty: use ANSI color (AF) over standard color (Sf) when given the choice
|
||||
* several ports: offer for player selection only choices consistent with
|
||||
* those already made by config file/command line (e.g., only offer roles
|
||||
* that are compatible with specified race)
|
||||
* those already made by config file/command line (e.g., only offer roles
|
||||
* that are compatible with specified race)
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -150,7 +156,7 @@
|
||||
|
||||
/* Version 3.3 */
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
/* Version 3.2.x */
|
||||
|
||||
/* Patch 3, December 10, 1999
|
||||
@@ -171,7 +177,7 @@
|
||||
* fix the `recover' utility
|
||||
* fix priest/minion name overflow which could cause Astral Plane crashes
|
||||
* avoid crash when hit by own thrown boomerang
|
||||
* " " " worn blindfold pushed off by applying cursed towel
|
||||
* " " " worn blindfold pushed off by applying cursed towel
|
||||
* handle returning live Wizard correctly in deep dungeon levels
|
||||
* don't occasionally display unseen areas of new levels during level change
|
||||
* other minor display fixes
|
||||
@@ -184,13 +190,13 @@
|
||||
* tty: support object class characters for 'I' command in menu mode
|
||||
* Unix: work around several <curses.h> compilation problems
|
||||
* X11: as tty above, plus implement tty-style count handling in menus;
|
||||
* better window placement support for old window managers
|
||||
* better window placement support for old window managers
|
||||
*/
|
||||
|
||||
/* Patch 1, May 28, 1996
|
||||
* eliminate `#qualifications'; fix weapon proficiency handling for missiles
|
||||
* keep Medusa from continuing to move after she's been killed by reflection
|
||||
* of her own gaze (fixes relmon panic)
|
||||
* of her own gaze (fixes relmon panic)
|
||||
* make monsters a little smarter; assorted eating and chatting changes
|
||||
* fix object amnesia for spellbooks; fix Nazgul's sleep gas attack
|
||||
* fix bullwhip usage for case of having recently been in a trap
|
||||
@@ -205,11 +211,11 @@
|
||||
* DLB: avoid excessive fseek calls (major performance hit for MSDOS)
|
||||
* HPUX: workaround for gcc-2.6.3 bug adversely affecting monster generation
|
||||
* Mac: avoid MW 68K struct copy optimization bug which caused crashes;
|
||||
* fix dragging of scrollbar; boost partitions to 2MB minimum
|
||||
* fix dragging of scrollbar; boost partitions to 2MB minimum
|
||||
* MSDOS: wasn't safe to enter endgame for MFLOPPY configuration;
|
||||
* fix re-entry into game after "!" (shell escape) + chdir + EXIT;
|
||||
* F3/F4/F5 display interface swapping improvements;
|
||||
* add support for preloading all tiles in protected mode environment
|
||||
* fix re-entry into game after "!" (shell escape) + chdir + EXIT;
|
||||
* F3/F4/F5 display interface swapping improvements;
|
||||
* add support for preloading all tiles in protected mode environment
|
||||
* TERMINFO: colors were wrong for some systems, such as Linux
|
||||
* X11: display help files properly
|
||||
*/
|
||||
@@ -217,41 +223,41 @@
|
||||
/*
|
||||
* NetHack 3.2.0, April 11, 1996
|
||||
* enhancements to the windowing systems including "tiles" or icons to
|
||||
* visually represent monsters and objects (courtesy Warwick Allison)
|
||||
* visually represent monsters and objects (courtesy Warwick Allison)
|
||||
* window based menu system introduced for inventory and selection
|
||||
* moving light sources besides the player
|
||||
* improved #untrap (courtesy Helge Hafting)
|
||||
* spellcasting logic changes to balance spellcasting towards magic-using
|
||||
* classes (courtesy Stephen White)
|
||||
* classes (courtesy Stephen White)
|
||||
* many, many bug fixes and abuse eliminations
|
||||
*/
|
||||
|
||||
/* Version 3.2 */
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
/* Version 3.1.x */
|
||||
|
||||
/*
|
||||
* Patch 3, July 12, 1993
|
||||
* further revise Mac windowing and extend to Think C (courtesy
|
||||
* Barton House)
|
||||
* Barton House)
|
||||
* fix confusing black/gray/white display on some MSDOS hardware
|
||||
* remove fatal bugs dealing with horns of plenty and VMS bones levels,
|
||||
* as well as more minor ones
|
||||
* as well as more minor ones
|
||||
*/
|
||||
|
||||
/*
|
||||
* Patch 2, June 1, 1993
|
||||
* add tty windowing to Mac and Amiga ports and revise native windowing
|
||||
* allow direct screen I/O for MS-DOS versions instead of going through
|
||||
* termcap routines (courtesy Michael Allison and Kevin Smolkowski)
|
||||
* termcap routines (courtesy Michael Allison and Kevin Smolkowski)
|
||||
* changes for NEC PC-9800 and various termcap.zip fixes by Yamamoto Keizo
|
||||
* SYSV 386 music driver ported to 386BSD (courtesy Andrew Chernov) and
|
||||
* SCO UNIX (courtesy Andreas Arens)
|
||||
* SCO UNIX (courtesy Andreas Arens)
|
||||
* enhanced pickup and disclosure options
|
||||
* removed fatal bugs dealing with cursed bags of holding, renaming
|
||||
* shopkeepers, objects falling through trapdoors on deep levels,
|
||||
* and kicking embedded objects loose, and many more minor ones
|
||||
* shopkeepers, objects falling through trapdoors on deep levels,
|
||||
* and kicking embedded objects loose, and many more minor ones
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -266,11 +272,11 @@
|
||||
* many, many changes and bugfixes -- some of the highlights include:
|
||||
* display rewrite using line-of-sight vision
|
||||
* general window interface, with the ability to use multiple interfaces
|
||||
* in the same executable
|
||||
* in the same executable
|
||||
* intelligent monsters
|
||||
* enhanced dungeon mythology
|
||||
* branching dungeons with more special levels, quest dungeons, and
|
||||
* multi-level endgame
|
||||
* multi-level endgame
|
||||
* more artifacts and more uses for artifacts
|
||||
* generalization to multiple shops with damage repair
|
||||
* X11 interface
|
||||
@@ -282,7 +288,7 @@
|
||||
|
||||
/* Version 3.1 */
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
/* Version 3.0 */
|
||||
|
||||
/*
|
||||
@@ -303,8 +309,8 @@
|
||||
* Patch 8, June 3, 1990
|
||||
* further debug and refine Macintosh port
|
||||
* refine the overlay manager, rearrange the OVLx breakdown for better
|
||||
* efficiency, rename the overlay macros, and split off the overlay
|
||||
* instructions to Install.ovl
|
||||
* efficiency, rename the overlay macros, and split off the overlay
|
||||
* instructions to Install.ovl
|
||||
* introduce NEARDATA for better Amiga efficiency
|
||||
* support for more VMS versions (courtesy Joshua Delahunty and Pat Rankin)
|
||||
* more const fixes
|
||||
@@ -315,17 +321,17 @@
|
||||
/*
|
||||
* Patch 7, February 19, 1990
|
||||
* refine overlay support to handle portions of .c files through OVLx
|
||||
* (courtesy above plus Kevin Smolkowski)
|
||||
* (courtesy above plus Kevin Smolkowski)
|
||||
* update and extend Amiga port and documentation (courtesy Richard Addison,
|
||||
* Jochen Erwied, Mark Gooderum, Ken Lorber, Greg Olson, Mike Passaretti,
|
||||
* and Gregg Wonderly)
|
||||
* Jochen Erwied, Mark Gooderum, Ken Lorber, Greg Olson, Mike Passaretti,
|
||||
* and Gregg Wonderly)
|
||||
* refine and extend Macintosh port and documentation (courtesy Johnny Lee,
|
||||
* Kevin Sitze, Michael Sokolov, Andy Swanson, Jon Watte, and Tom West)
|
||||
* Kevin Sitze, Michael Sokolov, Andy Swanson, Jon Watte, and Tom West)
|
||||
* refine VMS documentation
|
||||
* continuing ANSIfication, this time of const usage
|
||||
* teach '/' about differences within monster classes
|
||||
* smarter eating code (yet again), death messages, and treatment of
|
||||
* non-animal monsters, monster unconsciousness, and naming
|
||||
* non-animal monsters, monster unconsciousness, and naming
|
||||
* extended version command to give compilation options
|
||||
* and the usual bug fixes and hole plugs
|
||||
*/
|
||||
@@ -333,14 +339,14 @@
|
||||
/*
|
||||
* Patch 6, November 19, 1989
|
||||
* add overlay support for MS-DOS (courtesy Pierre Martineau, Stephen
|
||||
* Spackman, and Norm Meluch)
|
||||
* Spackman, and Norm Meluch)
|
||||
* refine Macintosh port
|
||||
* different door states show as different symbols (courtesy Ari Huttunen)
|
||||
* smarter drawbridges (courtesy Kevin Darcy)
|
||||
* add CLIPPING and split INFERNO off HARD
|
||||
* further refine eating code wrt picking up and resumption
|
||||
* make first few levels easier, by adding :x monsters and increasing initial
|
||||
* attribute points and hitting probability
|
||||
* attribute points and hitting probability
|
||||
* teach '/' about configurable symbols
|
||||
*/
|
||||
|
||||
@@ -358,9 +364,9 @@
|
||||
* Patch 4, September 27, 1989
|
||||
* add support for VMS (courtesy David Gentzel)
|
||||
* move monster-on-floor references into functions and implement the new
|
||||
* lookup structure for both objects and monsters
|
||||
* lookup structure for both objects and monsters
|
||||
* extend the definitions of objects and monsters to provide "living color"
|
||||
* in the dungeon, instead of a single monster color
|
||||
* in the dungeon, instead of a single monster color
|
||||
* ifdef varargs usage to satisfy ANSI compilers
|
||||
* standardize on the color 'gray'
|
||||
* assorted bug fixes
|
||||
@@ -371,9 +377,9 @@
|
||||
* add war hammers and revise object prices
|
||||
* extend prototypes to ANSI compilers in addition to the previous MSDOS ones
|
||||
* move object-on-floor references into functions in preparation for planned
|
||||
* data structures to allow faster access and better colors
|
||||
* data structures to allow faster access and better colors
|
||||
* fix some more bugs, and extend the portability of things added in earlier
|
||||
* patches
|
||||
* patches
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -391,9 +397,9 @@
|
||||
/*
|
||||
* Patch 1, July 31, 1989
|
||||
* add support for Atari TOS (courtesy Eric Smith) and Andrew File System
|
||||
* (courtesy Ralf Brown)
|
||||
* (courtesy Ralf Brown)
|
||||
* include the uuencoded version of termcap.arc for the MSDOS versions that
|
||||
* was included with 2.2 and 2.3
|
||||
* was included with 2.2 and 2.3
|
||||
* make a number of simple changes to accommodate various compilers
|
||||
* fix a handful of bugs, and do some code cleaning elsewhere
|
||||
* add more instructions for new environments and things commonly done wrong
|
||||
@@ -405,6 +411,6 @@
|
||||
|
||||
/* Version 3.0 */
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************************************************************/
|
||||
|
||||
/*patchlevel.h*/
|
||||
|
||||
+3
-2
@@ -1,4 +1,4 @@
|
||||
// NetHack 3.6 qt_win.h $NHDT-Date: 1433806580 2015/06/08 23:36:20 $ $NHDT-Branch: master $:$NHDT-Revision: 1.16 $
|
||||
// NetHack 3.6 qt_win.h $NHDT-Date: 1447755972 2015/11/17 10:26:12 $ $NHDT-Branch: master $:$NHDT-Revision: 1.17 $
|
||||
// Copyright (c) Warwick Allison, 1999.
|
||||
// NetHack may be freely redistributed. See license for details.
|
||||
//
|
||||
@@ -863,7 +863,8 @@ class NetHackQtBind : NetHackQtBindBase
|
||||
|
||||
static void qt_cliparound(int x, int y);
|
||||
static void qt_cliparound_window(winid wid, int x, int y);
|
||||
static void qt_print_glyph(winid wid, XCHAR_P x, XCHAR_P y, int glyph, int bkglyph);
|
||||
static void qt_print_glyph(winid wid, XCHAR_P x, XCHAR_P y,
|
||||
int glyph, int bkglyph);
|
||||
static void qt_raw_print(const char *str);
|
||||
static void qt_raw_print_bold(const char *str);
|
||||
static int qt_nhgetch();
|
||||
|
||||
+30
-22
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 tradstdc.h $NHDT-Date: 1432512778 2015/05/25 00:12:58 $ $NHDT-Branch: master $:$NHDT-Revision: 1.24 $ */
|
||||
/* NetHack 3.6 tradstdc.h $NHDT-Date: 1447755973 2015/11/17 10:26:13 $ $NHDT-Branch: master $:$NHDT-Revision: 1.26 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
* USE_STDARG means use the ANSI <stdarg.h> facilities (only ANSI compilers
|
||||
* should do this, and only if the library supports it).
|
||||
* USE_VARARGS means use the <varargs.h> facilities. Again, this should only
|
||||
* be done if the library supports it. ANSI is *not* required for this.
|
||||
* be done if the library supports it. ANSI is *not* required for this.
|
||||
* Otherwise, the kludgy old methods are used.
|
||||
* The defaults are USE_STDARG for ANSI compilers, and USE_OLDARGS for
|
||||
* others.
|
||||
@@ -64,24 +64,24 @@
|
||||
#endif
|
||||
|
||||
#ifdef NEED_VARARGS /* only define these if necessary */
|
||||
/*
|
||||
* These have changed since 3.4.3. VA_END() now provides an explicit
|
||||
* closing brace to complement VA_DECL()'s hidden opening brace, so code
|
||||
* started with VA_DECL() needs an extra opening brace to complement
|
||||
* the explicit final closing brace. This was done so that the source
|
||||
* would look less strange, where VA_DECL() appeared to introduce a
|
||||
* function whose opening brace was missing; there are now visible and
|
||||
* invisible braces at beginning and end. Sample usage:
|
||||
void foo VA_DECL(int, arg) --macro expansion has a hidden opening brace
|
||||
{ --new, explicit opening brace (actually introduces a nested block)
|
||||
VA_START(bar);
|
||||
...code for foo...
|
||||
VA_END(); --expansion now provides a closing brace for the nested block
|
||||
} --existing closing brace, still pairs with the hidden one in VA_DECL()
|
||||
* Reading the code--or using source browsing tools which match braces--
|
||||
* results in seeing a matched set of braces. Usage of VA_END() is
|
||||
* potentially trickier, but nethack uses it in a straightforward manner.
|
||||
*/
|
||||
/*
|
||||
* These have changed since 3.4.3. VA_END() now provides an explicit
|
||||
* closing brace to complement VA_DECL()'s hidden opening brace, so code
|
||||
* started with VA_DECL() needs an extra opening brace to complement
|
||||
* the explicit final closing brace. This was done so that the source
|
||||
* would look less strange, where VA_DECL() appeared to introduce a
|
||||
* function whose opening brace was missing; there are now visible and
|
||||
* invisible braces at beginning and end. Sample usage:
|
||||
void foo VA_DECL(int, arg) --macro expansion has a hidden opening brace
|
||||
{ --new, explicit opening brace (actually introduces a nested block)
|
||||
VA_START(bar);
|
||||
...code for foo...
|
||||
VA_END(); --expansion now provides a closing brace for the nested block
|
||||
} --existing closing brace, still pairs with the hidden one in VA_DECL()
|
||||
* Reading the code--or using source browsing tools which match braces--
|
||||
* results in seeing a matched set of braces. Usage of VA_END() is
|
||||
* potentially trickier, but nethack uses it in a straightforward manner.
|
||||
*/
|
||||
|
||||
#ifdef USE_STDARG
|
||||
#include <stdarg.h>
|
||||
@@ -104,6 +104,7 @@
|
||||
#define _VA_LIST_ /* prevents multiple def in stdio.h */
|
||||
#endif
|
||||
#else
|
||||
|
||||
#ifdef USE_VARARGS
|
||||
#include <varargs.h>
|
||||
#define VA_DECL(typ1, var1) \
|
||||
@@ -125,6 +126,8 @@
|
||||
va_end(the_args); \
|
||||
}
|
||||
#else
|
||||
|
||||
/*USE_OLDARGS*/
|
||||
#define VA_ARGS arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9
|
||||
#define VA_DECL(typ1, var1) \
|
||||
(var1, VA_ARGS) typ1 var1; \
|
||||
@@ -137,10 +140,15 @@
|
||||
{
|
||||
#define VA_START(x)
|
||||
#define VA_INIT(var1, typ1)
|
||||
/* this is inherently risky, and should only be attempted as a
|
||||
/* This is inherently risky, and should only be attempted as a
|
||||
very last resort; manipulating arguments which haven't actually
|
||||
been passed may or may not cause severe trouble depending on
|
||||
the function-calling/argument-passing mechanism being used */
|
||||
the function-calling/argument-passing mechanism being used.
|
||||
|
||||
[nethack's core doesn't use VA_NEXT() so doesn't use VA_SHIFT()
|
||||
either, and this definition is just retained for completeness.
|
||||
lev_comp does use VA_NEXT(), but it passes all 'argX' arguments.]
|
||||
*/
|
||||
#define VA_SHIFT() \
|
||||
(arg1 = arg2, arg2 = arg3, arg3 = arg4, arg4 = arg5, arg5 = arg6, \
|
||||
arg6 = arg7, arg7 = arg8, arg8 = arg9)
|
||||
|
||||
+22
-25
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 unixconf.h $NHDT-Date: 1432512778 2015/05/25 00:12:58 $ $NHDT-Branch: master $:$NHDT-Revision: 1.23 $ */
|
||||
/* NetHack 3.6 unixconf.h $NHDT-Date: 1447755973 2015/11/17 10:26:13 $ $NHDT-Branch: master $:$NHDT-Revision: 1.24 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
|
||||
/*
|
||||
* Some include files are in a different place under SYSV
|
||||
* BSD SYSV
|
||||
* <sys/time.h> <time.h>
|
||||
* <sgtty.h> <termio.h>
|
||||
* BSD SYSV
|
||||
* <sys/time.h> <time.h>
|
||||
* <sgtty.h> <termio.h>
|
||||
*
|
||||
* Some routines are called differently
|
||||
* index strchr
|
||||
* rindex strrchr
|
||||
* index strchr
|
||||
* rindex strrchr
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -46,18 +46,17 @@
|
||||
* job control (note that AIX is SYSV otherwise)
|
||||
* Also define this for AIX 3.2 */
|
||||
|
||||
#define TERMINFO /* uses terminfo rather than termcap */
|
||||
/* Should be defined for most SYSV, SVR4 (including
|
||||
* Solaris 2+), HPUX, and Linux systems. In
|
||||
* particular, it should NOT be defined for the UNIXPC
|
||||
* unless you remove the use of the shared library in
|
||||
* the Makefile */
|
||||
#define TEXTCOLOR /* Use System V r3.2 terminfo color support */
|
||||
/* and/or ANSI color support on termcap systems */
|
||||
/* and/or X11 color */
|
||||
#define POSIX_JOB_CONTROL /* use System V / Solaris 2.x / POSIX job control \
|
||||
*/
|
||||
/* (e.g., VSUSP) */
|
||||
#define TERMINFO /* uses terminfo rather than termcap */
|
||||
/* Should be defined for most SYSV, SVR4 (including
|
||||
* Solaris 2+), HPUX, and Linux systems. In
|
||||
* particular, it should NOT be defined for the UNIXPC
|
||||
* unless you remove the use of the shared library in
|
||||
* the Makefile */
|
||||
#define TEXTCOLOR /* Use System V r3.2 terminfo color support
|
||||
* and/or ANSI color support on termcap systems
|
||||
* and/or X11 color */
|
||||
#define POSIX_JOB_CONTROL /* use System V / Solaris 2.x / POSIX job control
|
||||
* (e.g., VSUSP) */
|
||||
#define POSIX_TYPES /* use POSIX types for system calls and termios */
|
||||
/* Define for many recent OS releases, including
|
||||
* those with specific defines (since types are
|
||||
@@ -92,7 +91,7 @@
|
||||
* which does not allow hard links. If NO_FILE_LINKS is defined, lock files
|
||||
* will be created in LOCKDIR using open() instead of in the playground using
|
||||
* link().
|
||||
* Ralf Brown, 7/26/89 (from v2.3 hack of 10/10/88)
|
||||
* Ralf Brown, 7/26/89 (from v2.3 hack of 10/10/88)
|
||||
*/
|
||||
|
||||
/* #define NO_FILE_LINKS */ /* if no hard links */
|
||||
@@ -109,8 +108,8 @@
|
||||
* If defined, it can be overridden by the environment variable PAGER.
|
||||
* Hack will use its internal pager if DEF_PAGER is not defined.
|
||||
* (This might be preferable for security reasons.)
|
||||
* #define DEF_PAGER ".../mydir/mypager"
|
||||
*/
|
||||
/* #define DEF_PAGER ".../mydir/mypager" */
|
||||
|
||||
/*
|
||||
* Define PORT_HELP to be the name of the port-specfic help file.
|
||||
@@ -148,9 +147,8 @@
|
||||
* (another directory). MAILBOX is the element that will be added on to
|
||||
* the user's home directory path to generate the Mailbox path - just in
|
||||
* case other Andrew sites do it differently from CMU.
|
||||
*
|
||||
* dan lovinger
|
||||
* dl2n+@andrew.cmu.edu (dec 19 1989)
|
||||
* dan lovinger
|
||||
* dl2n+@andrew.cmu.edu (dec 19 1989)
|
||||
*/
|
||||
|
||||
/* #define AMS */ /* use Andrew message system for mail */
|
||||
@@ -158,8 +156,7 @@
|
||||
/* NO_MAILREADER is for kerberos authenticating filesystems where it is
|
||||
* essentially impossible to securely exec child processes, like mail
|
||||
* readers, when the game is running under a special token.
|
||||
*
|
||||
* dan
|
||||
* dan
|
||||
*/
|
||||
|
||||
/* #define NO_MAILREADER */ /* have mail daemon just tell player of mail */
|
||||
|
||||
+4
-10
@@ -401,19 +401,13 @@ register struct obj *obj;
|
||||
case SDOOR:
|
||||
You_hear(hollow_str, "door");
|
||||
cvt_sdoor_to_door(lev); /* ->typ = DOOR */
|
||||
if (Blind)
|
||||
feel_location(rx, ry);
|
||||
else
|
||||
newsym(rx, ry);
|
||||
feel_newsym(rx, ry);
|
||||
return res;
|
||||
case SCORR:
|
||||
You_hear(hollow_str, "passage");
|
||||
lev->typ = CORR;
|
||||
unblock_point(rx, ry);
|
||||
if (Blind)
|
||||
feel_location(rx, ry);
|
||||
else
|
||||
newsym(rx, ry);
|
||||
feel_newsym(rx, ry);
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -2042,8 +2036,8 @@ boolean quietly;
|
||||
You("don't have enough room in here.");
|
||||
return FALSE;
|
||||
}
|
||||
x = cc->x;
|
||||
y = cc->y;
|
||||
x = cc ? cc->x : u.ux;
|
||||
y = cc ? cc->y : u.uy;
|
||||
if (!isok(x, y)) {
|
||||
if (!quietly)
|
||||
You("cannot put the figurine there.");
|
||||
|
||||
+4
-1
@@ -1404,7 +1404,10 @@ arti_invoke(obj)
|
||||
struct obj *obj;
|
||||
{
|
||||
register const struct artifact *oart = get_artifact(obj);
|
||||
|
||||
if (!obj) {
|
||||
impossible("arti_invoke without obj");
|
||||
return 0;
|
||||
}
|
||||
if (!oart || !oart->inv_prop) {
|
||||
if (obj->otyp == CRYSTAL_BALL)
|
||||
use_crystal_ball(&obj);
|
||||
|
||||
+1
-1
@@ -643,7 +643,7 @@ boolean
|
||||
}
|
||||
for (i = 0; i < MAXBLSTATS; ++i) {
|
||||
enum statusfields fld = initblstats[i].fld;
|
||||
|
||||
|
||||
switch (fld) {
|
||||
case BL_TITLE:
|
||||
fieldfmt = "%s";
|
||||
|
||||
@@ -385,7 +385,6 @@ extcmd_via_menu()
|
||||
biggest = 0;
|
||||
while (!ret) {
|
||||
i = n = 0;
|
||||
accelerator = 0;
|
||||
any = zeroany;
|
||||
/* populate choices */
|
||||
for (efp = extcmdlist; efp->ef_txt; efp++) {
|
||||
@@ -421,7 +420,7 @@ extcmd_via_menu()
|
||||
/* otherwise... */
|
||||
win = create_nhwindow(NHW_MENU);
|
||||
start_menu(win);
|
||||
prevaccelerator = 0;
|
||||
accelerator = prevaccelerator = 0;
|
||||
acount = 0;
|
||||
for (i = 0; choices[i]; ++i) {
|
||||
accelerator = choices[i]->ef_txt[matchlevel];
|
||||
@@ -1769,7 +1768,7 @@ 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 */
|
||||
if (wizard) {
|
||||
if (wizard && steedname) {
|
||||
Strcpy(buf, steedname);
|
||||
*buf = highc(*buf);
|
||||
enl_msg(buf, " has", " had", " wounded legs", "");
|
||||
|
||||
+1
-1
@@ -388,7 +388,7 @@ const char *verb;
|
||||
static char wholebuf[80];
|
||||
|
||||
Strcpy(wholebuf, is_u(etmp) ? "You" : Monnam(etmp->emon));
|
||||
if (!*verb)
|
||||
if (!verb || !*verb)
|
||||
return wholebuf;
|
||||
Strcat(wholebuf, " ");
|
||||
if (is_u(etmp))
|
||||
|
||||
+1
-4
@@ -1291,10 +1291,7 @@ struct trap *trap;
|
||||
|
||||
trap->tseen = 1;
|
||||
exercise(A_WIS, TRUE);
|
||||
if (Blind)
|
||||
feel_location(trap->tx, trap->ty);
|
||||
else
|
||||
newsym(trap->tx, trap->ty);
|
||||
feel_newsym(trap->tx, trap->ty);
|
||||
|
||||
if (levl[trap->tx][trap->ty].glyph != trap_to_glyph(trap)) {
|
||||
/* There's too much clutter to see your find otherwise */
|
||||
|
||||
@@ -81,10 +81,7 @@ boolean waslit, rockit;
|
||||
lev->typ = (rockit ? STONE : ROOM);
|
||||
if (dist >= 3)
|
||||
impossible("mkcavepos called with dist %d", dist);
|
||||
if (Blind)
|
||||
feel_location(x, y);
|
||||
else
|
||||
newsym(x, y);
|
||||
feel_newsym(x, y);
|
||||
}
|
||||
|
||||
STATIC_OVL void
|
||||
@@ -437,10 +434,7 @@ dig(VOID_ARGS)
|
||||
|
||||
if (!does_block(dpx, dpy, &levl[dpx][dpy]))
|
||||
unblock_point(dpx, dpy); /* vision: can see through */
|
||||
if (Blind)
|
||||
feel_location(dpx, dpy);
|
||||
else
|
||||
newsym(dpx, dpy);
|
||||
feel_newsym(dpx, dpy);
|
||||
if (digtxt && !context.digging.quiet)
|
||||
pline1(digtxt); /* after newsym */
|
||||
if (dmgtxt)
|
||||
@@ -1989,7 +1983,8 @@ long timeout;
|
||||
if (mtmp && !OBJ_AT(x, y) && mtmp->mundetected
|
||||
&& hides_under(mtmp->data)) {
|
||||
mtmp->mundetected = 0;
|
||||
}
|
||||
} else if (x == u.ux && y == u.uy && u.uundetected && hides_under(youmonst.data))
|
||||
(void) hideunder(&youmonst);
|
||||
newsym(x, y);
|
||||
} else if (in_invent)
|
||||
update_inventory();
|
||||
|
||||
@@ -486,6 +486,23 @@ register struct monst *mon;
|
||||
show_glyph(x, y, glyph);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* feel_newsym()
|
||||
*
|
||||
* When hero knows what happened to location, even when blind.
|
||||
*/
|
||||
void
|
||||
feel_newsym(x, y)
|
||||
xchar x, y;
|
||||
{
|
||||
if (Blind)
|
||||
feel_location(x, y);
|
||||
else
|
||||
newsym(x, y);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* feel_location()
|
||||
*
|
||||
|
||||
@@ -1123,6 +1123,10 @@ register struct obj *otmp;
|
||||
{
|
||||
boolean was_blind = Blind, changed = FALSE;
|
||||
|
||||
if (!otmp) {
|
||||
impossible("Blindf_off without otmp");
|
||||
return;
|
||||
}
|
||||
context.takeoff.mask &= ~W_TOOL;
|
||||
setworn((struct obj *) 0, otmp->owornmask);
|
||||
off_msg(otmp);
|
||||
|
||||
+3
-12
@@ -973,10 +973,7 @@ dokick()
|
||||
} else if (maploc->doormask != D_NODOOR
|
||||
&& !(maploc->doormask & D_LOCKED))
|
||||
maploc->doormask = D_ISOPEN;
|
||||
if (Blind)
|
||||
feel_location(x, y); /* we know it's gone */
|
||||
else
|
||||
newsym(x, y);
|
||||
feel_newsym(x, y); /* we know it's gone */
|
||||
if (maploc->doormask == D_ISOPEN
|
||||
|| maploc->doormask == D_NODOOR)
|
||||
unblock_point(x, y); /* vision */
|
||||
@@ -989,10 +986,7 @@ dokick()
|
||||
pline("Crash! You kick open a secret passage!");
|
||||
exercise(A_DEX, TRUE);
|
||||
maploc->typ = CORR;
|
||||
if (Blind)
|
||||
feel_location(x, y); /* we know it's gone */
|
||||
else
|
||||
newsym(x, y);
|
||||
feel_newsym(x, y); /* we know it's gone */
|
||||
unblock_point(x, y); /* vision */
|
||||
return 1;
|
||||
} else
|
||||
@@ -1267,10 +1261,7 @@ dokick()
|
||||
exercise(A_STR, TRUE);
|
||||
maploc->doormask = D_BROKEN;
|
||||
}
|
||||
if (Blind)
|
||||
feel_location(x, y); /* we know we broke it */
|
||||
else
|
||||
newsym(x, y);
|
||||
feel_newsym(x, y); /* we know we broke it */
|
||||
unblock_point(x, y); /* vision */
|
||||
if (shopdoor) {
|
||||
add_damage(x, y, 400L);
|
||||
|
||||
+2
-3
@@ -1161,10 +1161,9 @@ boolean
|
||||
; /* missile has already been handled */
|
||||
} else if (u.uswallow) {
|
||||
/* ball is not picked up by monster */
|
||||
if (obj != uball) {
|
||||
if (obj != uball)
|
||||
(void) mpickobj(u.ustuck, obj);
|
||||
thrownobj = (struct obj *) 0;
|
||||
}
|
||||
thrownobj = (struct obj *) 0;
|
||||
} else {
|
||||
/* the code following might become part of dropy() */
|
||||
if (obj->oartifact == ART_MJOLLNIR && Role_if(PM_VALKYRIE)
|
||||
|
||||
+1
-3
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 drawing.c $NHDT-Date: 1446975466 2015/11/08 09:37:46 $ $NHDT-Branch: master $:$NHDT-Revision: 1.48 $ */
|
||||
/* NetHack 3.6 drawing.c $NHDT-Date: 1447124657 2015/11/10 03:04:17 $ $NHDT-Branch: master $:$NHDT-Revision: 1.49 $ */
|
||||
/* Copyright (c) NetHack Development Team 1992. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -520,9 +520,7 @@ boolean name_too;
|
||||
free((genericptr_t) symset[which_set].desc);
|
||||
symset[which_set].desc = (char *) 0;
|
||||
|
||||
symset[which_set].nocolor = 0;
|
||||
symset[which_set].handling = H_UNK;
|
||||
symset[which_set].desc = (char *) 0;
|
||||
symset[which_set].nocolor = 0;
|
||||
/* initialize restriction bits */
|
||||
symset[which_set].primary = 0;
|
||||
|
||||
@@ -271,7 +271,10 @@ STATIC_OVL void
|
||||
recalc_wt()
|
||||
{
|
||||
struct obj *piece = context.victual.piece;
|
||||
|
||||
if (!piece) {
|
||||
impossible("recalc_wt without piece");
|
||||
return;
|
||||
}
|
||||
debugpline1("Old weight = %d", piece->owt);
|
||||
debugpline2("Used time = %d, Req'd time = %d", context.victual.usedtime,
|
||||
context.victual.reqtime);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 end.c $NHDT-Date: 1446510332 2015/11/03 00:25:32 $ $NHDT-Branch: master $:$NHDT-Revision: 1.102 $ */
|
||||
/* NetHack 3.6 end.c $NHDT-Date: 1447576343 2015/11/15 08:32:23 $ $NHDT-Branch: master $:$NHDT-Revision: 1.103 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -627,7 +627,7 @@ boolean taken;
|
||||
{
|
||||
char c = 0, defquery;
|
||||
char qbuf[QBUFSZ];
|
||||
boolean ask;
|
||||
boolean ask = FALSE;
|
||||
|
||||
if (invent && !done_stopprint) {
|
||||
if (taken)
|
||||
@@ -1094,6 +1094,7 @@ die:
|
||||
/* clean up unneeded windows */
|
||||
if (have_windows) {
|
||||
wait_synch();
|
||||
free_pickinv_cache(); /* extra persistent window if perm_invent */
|
||||
if (WIN_INVEN != WIN_ERR)
|
||||
destroy_nhwindow(WIN_INVEN), WIN_INVEN = WIN_ERR;
|
||||
display_nhwindow(WIN_MESSAGE, TRUE);
|
||||
@@ -1122,13 +1123,12 @@ die:
|
||||
}
|
||||
|
||||
if (!done_stopprint) {
|
||||
Sprintf(
|
||||
pbuf, "%s %s the %s...", Goodbye(), plname,
|
||||
how != ASCENDED
|
||||
? (const char *) ((flags.female && urole.name.f)
|
||||
Sprintf(pbuf, "%s %s the %s...", Goodbye(), plname,
|
||||
(how != ASCENDED)
|
||||
? (const char *) ((flags.female && urole.name.f)
|
||||
? urole.name.f
|
||||
: urole.name.m)
|
||||
: (const char *) (flags.female ? "Demigoddess" : "Demigod"));
|
||||
: (const char *) (flags.female ? "Demigoddess" : "Demigod"));
|
||||
putstr(endwin, 0, pbuf);
|
||||
putstr(endwin, 0, "");
|
||||
}
|
||||
@@ -1254,10 +1254,9 @@ die:
|
||||
putstr(endwin, 0, pbuf);
|
||||
}
|
||||
if (!done_stopprint) {
|
||||
Sprintf(
|
||||
pbuf,
|
||||
Sprintf(pbuf,
|
||||
"You were level %d with a maximum of %d hit point%s when you %s.",
|
||||
u.ulevel, u.uhpmax, plur(u.uhpmax), ends[how]);
|
||||
u.ulevel, u.uhpmax, plur(u.uhpmax), ends[how]);
|
||||
putstr(endwin, 0, pbuf);
|
||||
putstr(endwin, 0, "");
|
||||
}
|
||||
|
||||
+55
-22
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 files.c $NHDT-Date: 1446955299 2015/11/08 04:01:39 $ $NHDT-Branch: master $:$NHDT-Revision: 1.186 $ */
|
||||
/* NetHack 3.6 files.c $NHDT-Date: 1447653425 2015/11/16 05:57:05 $ $NHDT-Branch: master $:$NHDT-Revision: 1.187 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -3421,20 +3421,55 @@ boolean wildcards;
|
||||
/* ---------- BEGIN TRIBUTE ----------- */
|
||||
|
||||
/* 3.6 tribute code
|
||||
*
|
||||
* Returns TRUE if you were able to read something.
|
||||
*
|
||||
*/
|
||||
|
||||
#define SECTIONSCOPE 1
|
||||
#define TITLESCOPE 2
|
||||
#define PASSAGESCOPE 3
|
||||
|
||||
#define MAXPASSAGES SIZE(context.novel.pasg) /* 30 */
|
||||
|
||||
static int FDECL(choose_passage, (int, unsigned));
|
||||
|
||||
/* choose a random passage that hasn't been chosen yet; once all have
|
||||
been chosen, reset the tracking to make all passages available again */
|
||||
static int
|
||||
choose_passage(passagecnt, oid)
|
||||
int passagecnt; /* total of available passages, 1..MAXPASSAGES */
|
||||
unsigned oid; /* book.o_id, used to determine whether re-reading same book */
|
||||
{
|
||||
int idx, res;
|
||||
|
||||
if (passagecnt < 1)
|
||||
return 0;
|
||||
if (passagecnt > MAXPASSAGES)
|
||||
passagecnt = MAXPASSAGES;
|
||||
|
||||
/* if a different book or we've used up all the passages already,
|
||||
reset in order to have all 'passagecnt' passages available */
|
||||
if (oid != context.novel.id || context.novel.count == 0) {
|
||||
context.novel.id = oid;
|
||||
context.novel.count = passagecnt;
|
||||
for (idx = 0; idx < MAXPASSAGES; idx++)
|
||||
context.novel.pasg[idx] = (xchar) ((idx < passagecnt) ? idx + 1
|
||||
: 0);
|
||||
}
|
||||
|
||||
idx = rn2(context.novel.count);
|
||||
res = (int) context.novel.pasg[idx];
|
||||
/* move the last slot's passage index into the slot just used
|
||||
and reduce the number of passages available */
|
||||
context.novel.pasg[idx] = context.novel.pasg[--context.novel.count];
|
||||
return res;
|
||||
}
|
||||
|
||||
/* Returns True if you were able to read something. */
|
||||
boolean
|
||||
read_tribute(tribsection, tribtitle, tribpassage, nowin_buf, bufsz)
|
||||
read_tribute(tribsection, tribtitle, tribpassage, nowin_buf, bufsz, oid)
|
||||
const char *tribsection, *tribtitle;
|
||||
int tribpassage, bufsz;
|
||||
char *nowin_buf;
|
||||
unsigned oid; /* book identifier */
|
||||
{
|
||||
dlb *fp;
|
||||
char *endp;
|
||||
@@ -3510,22 +3545,17 @@ char *nowin_buf;
|
||||
if ((p2 = index(p1, ')')) != 0) {
|
||||
*p2 = '\0';
|
||||
passagecnt = atoi(p1);
|
||||
/* sanity check here caps #passages at 50 */
|
||||
if ((passagecnt > 0) && (passagecnt < 50)) {
|
||||
scope = TITLESCOPE;
|
||||
if (matchedsection && !strcmpi(st, tribtitle)) {
|
||||
matchedtitle = TRUE;
|
||||
if (!tribpassage) {
|
||||
targetpassage = rnd(passagecnt);
|
||||
} else {
|
||||
if (tribpassage <= passagecnt)
|
||||
targetpassage = tribpassage;
|
||||
else
|
||||
targetpassage = 0;
|
||||
}
|
||||
} else {
|
||||
matchedtitle = FALSE;
|
||||
}
|
||||
if (passagecnt > MAXPASSAGES)
|
||||
passagecnt = MAXPASSAGES;
|
||||
scope = TITLESCOPE;
|
||||
if (matchedsection && !strcmpi(st, tribtitle)) {
|
||||
matchedtitle = TRUE;
|
||||
targetpassage = !tribpassage
|
||||
? choose_passage(passagecnt, oid)
|
||||
: (tribpassage <= passagecnt)
|
||||
? tribpassage : 0;
|
||||
} else {
|
||||
matchedtitle = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3610,8 +3640,11 @@ Death_quote(buf, bufsz)
|
||||
char *buf;
|
||||
int bufsz;
|
||||
{
|
||||
return read_tribute("Death", "Death Quotes", 0, buf, bufsz);
|
||||
unsigned death_oid = 1; /* chance of oid #1 being a novel is negligible */
|
||||
|
||||
return read_tribute("Death", "Death Quotes", 0, buf, bufsz, death_oid);
|
||||
}
|
||||
|
||||
/* ---------- END TRIBUTE ----------- */
|
||||
|
||||
/*files.c*/
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
Assorted 'small' utility routines. They're virtually independent of
|
||||
NetHack, except that rounddiv may call panic(). setrandom calls one
|
||||
of srandom(), srand48(), or srand() depending upon configuration.
|
||||
|
||||
|
||||
return type routine name argument type(s)
|
||||
boolean digit (char)
|
||||
boolean letter (char)
|
||||
|
||||
+1
-3
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 invent.c $NHDT-Date: 1446516832 2015/11/03 02:13:52 $ $NHDT-Branch: master $:$NHDT-Revision: 1.178 $ */
|
||||
/* NetHack 3.6 invent.c $NHDT-Date: 1447576348 2015/11/15 08:32:28 $ $NHDT-Branch: master $:$NHDT-Revision: 1.179 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1985,7 +1985,6 @@ struct obj *list, **last_found;
|
||||
then regrown to full inventory, possibly being resized in the process */
|
||||
static winid cached_pickinv_win = WIN_ERR;
|
||||
|
||||
/* #ifdef FREE_ALL_MEMORY */
|
||||
void
|
||||
free_pickinv_cache()
|
||||
{
|
||||
@@ -1994,7 +1993,6 @@ free_pickinv_cache()
|
||||
cached_pickinv_win = WIN_ERR;
|
||||
}
|
||||
}
|
||||
/* #endif */
|
||||
|
||||
/*
|
||||
* Internal function used by display_inventory and getobj that can display
|
||||
|
||||
+5
-9
@@ -64,8 +64,10 @@ lock_action()
|
||||
return actions[3]; /* same as lock_pick */
|
||||
else if (xlock.door)
|
||||
return actions[0]; /* "unlocking the door" */
|
||||
else
|
||||
else if (xlock.box)
|
||||
return xlock.box->otyp == CHEST ? actions[1] : actions[2];
|
||||
else
|
||||
return actions[3];
|
||||
}
|
||||
|
||||
/* try to open/close a lock */
|
||||
@@ -648,10 +650,7 @@ int x, y;
|
||||
add_damage(cc.x, cc.y, 0L);
|
||||
} else
|
||||
door->doormask = D_ISOPEN;
|
||||
if (Blind)
|
||||
feel_location(cc.x, cc.y); /* the hero knows she opened it */
|
||||
else
|
||||
newsym(cc.x, cc.y);
|
||||
feel_newsym(cc.x, cc.y); /* the hero knows she opened it */
|
||||
unblock_point(cc.x, cc.y); /* vision: new see through there */
|
||||
} else {
|
||||
exercise(A_STR, TRUE);
|
||||
@@ -781,10 +780,7 @@ doclose()
|
||||
|| rn2(25) < (ACURRSTR + ACURR(A_DEX) + ACURR(A_CON)) / 3) {
|
||||
pline_The("door closes.");
|
||||
door->doormask = D_CLOSED;
|
||||
if (Blind)
|
||||
feel_location(x, y); /* the hero knows she closed it */
|
||||
else
|
||||
newsym(x, y);
|
||||
feel_newsym(x, y); /* the hero knows she closed it */
|
||||
block_point(x, y); /* vision: no longer see there */
|
||||
} else {
|
||||
exercise(A_STR, TRUE);
|
||||
|
||||
+1
-1
@@ -2089,7 +2089,7 @@ register struct monst *mtmp;
|
||||
}
|
||||
}
|
||||
|
||||
/* release monster frome bag of tricks; return number of monsters created */
|
||||
/* release monster from bag of tricks; return number of monsters created */
|
||||
int
|
||||
bagotricks(bag, tipping, seencount)
|
||||
struct obj *bag;
|
||||
|
||||
+4
-4
@@ -824,7 +824,7 @@ bound_digging()
|
||||
return; /* everything diggable here */
|
||||
|
||||
found = nonwall = FALSE;
|
||||
for (xmin = 0; !found; xmin++) {
|
||||
for (xmin = 0; !found && xmin <= COLNO; xmin++) {
|
||||
lev = &levl[xmin][0];
|
||||
for (y = 0; y <= ROWNO - 1; y++, lev++) {
|
||||
typ = lev->typ;
|
||||
@@ -840,7 +840,7 @@ bound_digging()
|
||||
xmin = 0;
|
||||
|
||||
found = nonwall = FALSE;
|
||||
for (xmax = COLNO - 1; !found; xmax--) {
|
||||
for (xmax = COLNO - 1; !found && xmax >= 0; xmax--) {
|
||||
lev = &levl[xmax][0];
|
||||
for (y = 0; y <= ROWNO - 1; y++, lev++) {
|
||||
typ = lev->typ;
|
||||
@@ -856,7 +856,7 @@ bound_digging()
|
||||
xmax = COLNO - 1;
|
||||
|
||||
found = nonwall = FALSE;
|
||||
for (ymin = 0; !found; ymin++) {
|
||||
for (ymin = 0; !found && ymin <= ROWNO; ymin++) {
|
||||
lev = &levl[xmin][ymin];
|
||||
for (x = xmin; x <= xmax; x++, lev += ROWNO) {
|
||||
typ = lev->typ;
|
||||
@@ -870,7 +870,7 @@ bound_digging()
|
||||
ymin -= (nonwall || !level.flags.is_maze_lev) ? 2 : 1;
|
||||
|
||||
found = nonwall = FALSE;
|
||||
for (ymax = ROWNO - 1; !found; ymax--) {
|
||||
for (ymax = ROWNO - 1; !found && ymax >= 0; ymax--) {
|
||||
lev = &levl[xmin][ymax];
|
||||
for (x = xmin; x <= xmax; x++, lev += ROWNO) {
|
||||
typ = lev->typ;
|
||||
|
||||
+26
-10
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 mkobj.c $NHDT-Date: 1446892448 2015/11/07 10:34:08 $ $NHDT-Branch: master $:$NHDT-Revision: 1.112 $ */
|
||||
/* NetHack 3.6 mkobj.c $NHDT-Date: 1447475943 2015/11/14 04:39:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.113 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -79,21 +79,25 @@ newoextra()
|
||||
}
|
||||
|
||||
void
|
||||
dealloc_oextra(x)
|
||||
struct oextra *x;
|
||||
dealloc_oextra(o)
|
||||
struct obj *o;
|
||||
{
|
||||
struct oextra *x = o->oextra;
|
||||
|
||||
if (x) {
|
||||
if (x->oname)
|
||||
free((genericptr_t) x->oname);
|
||||
if (x->omonst)
|
||||
free((genericptr_t) x->omonst);
|
||||
free_omonst(o); /* 'o' rather than 'x' */
|
||||
if (x->omid)
|
||||
free((genericptr_t) x->omid);
|
||||
if (x->olong)
|
||||
free((genericptr_t) x->olong);
|
||||
if (x->omailcmd)
|
||||
free((genericptr_t) x->omailcmd);
|
||||
|
||||
free((genericptr_t) x);
|
||||
o->oextra = (struct oextra *) 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,8 +108,13 @@ struct obj *otmp;
|
||||
if (!otmp->oextra)
|
||||
otmp->oextra = newoextra();
|
||||
if (!OMONST(otmp)) {
|
||||
OMONST(otmp) = (struct monst *) alloc(sizeof (struct monst));
|
||||
(void) memset((genericptr_t) OMONST(otmp), 0, sizeof (struct monst));
|
||||
struct monst *m = newmonst();
|
||||
|
||||
/* newmonst() allocates memory but doesn't initialize anything */
|
||||
(void) memset((genericptr_t) m, 0, sizeof (struct monst));
|
||||
m->mextra = (struct mextra *) 0;
|
||||
m->nmon = (struct monst *) 0;
|
||||
OMONST(otmp) = m;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,9 +122,15 @@ void
|
||||
free_omonst(otmp)
|
||||
struct obj *otmp;
|
||||
{
|
||||
if (otmp->oextra && OMONST(otmp)) {
|
||||
free((genericptr_t) OMONST(otmp));
|
||||
OMONST(otmp) = (struct monst *) 0;
|
||||
if (otmp->oextra) {
|
||||
struct monst *m = OMONST(otmp);
|
||||
|
||||
if (m) {
|
||||
if (m->mextra)
|
||||
dealloc_mextra(m);
|
||||
free((genericptr_t) m);
|
||||
OMONST(otmp) = (struct monst *) 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1511,6 +1526,7 @@ struct monst *mtmp;
|
||||
newomonst(obj);
|
||||
if (has_omonst(obj)) {
|
||||
struct monst *mtmp2 = OMONST(obj);
|
||||
|
||||
*mtmp2 = *mtmp;
|
||||
mtmp2->mextra = (struct mextra *) 0;
|
||||
if (mtmp->data)
|
||||
@@ -2053,7 +2069,7 @@ struct obj *obj;
|
||||
kickedobj = 0;
|
||||
|
||||
if (obj->oextra)
|
||||
dealloc_oextra(obj->oextra);
|
||||
dealloc_oextra(obj);
|
||||
free((genericptr_t) obj);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -422,7 +422,7 @@ int mm_flags;
|
||||
|
||||
while (cnt--) {
|
||||
mdat = morguemon();
|
||||
if (enexto(&cc, mm->x, mm->y, mdat)
|
||||
if (mdat && enexto(&cc, mm->x, mm->y, mdat)
|
||||
&& (!revive_corpses
|
||||
|| !(otmp = sobj_at(CORPSE, cc.x, cc.y))
|
||||
|| !revive(otmp, FALSE)))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 mon.c $NHDT-Date: 1446458009 2015/11/02 09:53:29 $ $NHDT-Branch: master $:$NHDT-Revision: 1.194 $ */
|
||||
/* NetHack 3.6 mon.c $NHDT-Date: 1447475944 2015/11/14 04:39:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.196 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -18,7 +18,6 @@ STATIC_DCL long FDECL(mm_aggression, (struct monst *, struct monst *));
|
||||
STATIC_DCL long FDECL(mm_displacement, (struct monst *, struct monst *));
|
||||
STATIC_DCL int NDECL(pick_animal);
|
||||
STATIC_DCL void FDECL(kill_eggs, (struct obj *));
|
||||
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));
|
||||
@@ -392,6 +391,8 @@ unsigned corpseflags;
|
||||
}
|
||||
/* All special cases should precede the G_NOCORPSE check */
|
||||
|
||||
if (!obj) return NULL;
|
||||
|
||||
/* if polymorph or undead turning has killed this monster,
|
||||
prevent the same attack beam from hitting its corpse */
|
||||
if (context.bypasses)
|
||||
@@ -1597,10 +1598,12 @@ struct monst *mtmp2, *mtmp1;
|
||||
MCORPSENM(mtmp2) = MCORPSENM(mtmp1);
|
||||
}
|
||||
|
||||
STATIC_OVL void
|
||||
dealloc_mextra(x)
|
||||
struct mextra *x;
|
||||
void
|
||||
dealloc_mextra(m)
|
||||
struct monst *m;
|
||||
{
|
||||
struct mextra *x = m->mextra;
|
||||
|
||||
if (x) {
|
||||
if (x->mname)
|
||||
free((genericptr_t) x->mname);
|
||||
@@ -1615,7 +1618,9 @@ struct mextra *x;
|
||||
if (x->edog)
|
||||
free((genericptr_t) x->edog);
|
||||
/* [no action needed for x->mcorpsenm] */
|
||||
|
||||
free((genericptr_t) x);
|
||||
m->mextra = (struct mextra *) 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1626,7 +1631,7 @@ struct monst *mon;
|
||||
if (mon->nmon)
|
||||
panic("dealloc_monst with nmon");
|
||||
if (mon->mextra)
|
||||
dealloc_mextra(mon->mextra);
|
||||
dealloc_mextra(mon);
|
||||
free((genericptr_t) mon);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1464,7 +1464,7 @@ struct permonst _mons2[] = {
|
||||
M2_HOSTILE | M2_STRONG | M2_NASTY | M2_COLLECT, M3_INFRAVISIBLE,
|
||||
CLR_ORANGE),
|
||||
#if 0 /* DEFERRED */
|
||||
MON("vorpal jabberwock", S_JABBERWOCK,
|
||||
MON("vorpal jabberwock", S_JABBERWOCK,
|
||||
LVL(20, 12, -2, 50, 0), (G_GENO | 1),
|
||||
A(ATTK(AT_BITE, AD_PHYS, 3, 10), ATTK(AT_BITE, AD_PHYS, 3, 10),
|
||||
ATTK(AT_CLAW, AD_PHYS, 3, 10), ATTK(AT_CLAW, AD_PHYS, 3, 10),
|
||||
|
||||
+34
-27
@@ -1,5 +1,5 @@
|
||||
/* NetHack 3.6 objects.c $NHDT-Date: 1444617222 2015/10/12 02:33:42 $ $NHDT-Branch: master $:$NHDT-Revision: 1.46 $ */
|
||||
/* Copyright (c) Mike Threepoint, 1989. */
|
||||
/* NetHack 3.6 objects.c $NHDT-Date: 1447313395 2015/11/12 07:29:55 $ $NHDT-Branch: master $:$NHDT-Revision: 1.49 $ */
|
||||
/* Copyright (c) Mike Threepoint, 1989. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
/*
|
||||
@@ -846,33 +846,40 @@ SCROLL("earth", "KIRJE", 1, 18, 200),
|
||||
SCROLL("punishment", "VE FORBRYDERNE", 1, 15, 300),
|
||||
SCROLL("charging", "HACKEM MUCHE", 1, 15, 300),
|
||||
SCROLL("stinking cloud", "VELOX NEB", 1, 15, 300),
|
||||
/* extra descriptions, shuffled into use at start of new game */
|
||||
SCROLL(None, "FOOBIE BLETCH", 1, 0, 100),
|
||||
SCROLL(None, "TEMOV", 1, 0, 100),
|
||||
SCROLL(None, "GARVEN DEH", 1, 0, 100),
|
||||
SCROLL(None, "READ ME", 1, 0, 100),
|
||||
SCROLL(None, "ETAOIN SHRDLU", 1, 0, 100),
|
||||
SCROLL(None, "LOREM IPSUM", 1, 0, 100),
|
||||
SCROLL(None, "FNORD", 1, 0, 100), /* Illuminati */
|
||||
SCROLL(None, "KO BATE", 1, 0, 100), /* Kurd Lasswitz */
|
||||
SCROLL(None, "ABRA KA DABRA", 1, 0, 100), /* traditional incantation */
|
||||
SCROLL(None, "ASHPD SODALG", 1, 0, 100), /* Portal */
|
||||
SCROLL(None, "ZLORFIK", 1, 0, 100), /* Zak McKracken */
|
||||
SCROLL(None, "GNIK SISI VLE", 1, 0, 100), /* Zak McKracken */
|
||||
SCROLL(None, "HAPAX LEGOMENON", 1, 0, 100),
|
||||
SCROLL(None, "EIRIS SAZUN IDISI", 1, 0, 100), /* Merseburg Incantations */
|
||||
SCROLL(None, "PHOL ENDE WODAN", 1, 0, 100), /* Merseburg Incantations */
|
||||
SCROLL(None, "GHOTI", 1, 0, 100), /* pronounced as 'fish', George Bernard Shaw */
|
||||
SCROLL(None, "MAPIRO MAHAMA DIROMAT", 1, 0, 100), /* Wizardry */
|
||||
SCROLL(None, "VAS CORP BET MANI", 1, 0, 100), /* Ultima */
|
||||
SCROLL(None, "XOR OTA", 1, 0, 100), /* Aarne Haapakoski */
|
||||
SCROLL(None, "STRC PRST SKRZ KRK", 1, 0, 100), /* Czech and Slovak tongue-twister */
|
||||
/* these must come last because they have special descriptions
|
||||
*/
|
||||
/* Extra descriptions, shuffled into use at start of new game.
|
||||
* Code in win/share/tilemap.c depends on SCR_STINKING_CLOUD preceding
|
||||
* these and on how many of them there are. If a real scroll gets added
|
||||
* after stinking cloud or the number of extra descriptions changes,
|
||||
* tilemap.c must be modified to match.
|
||||
*/
|
||||
SCROLL(None, "FOOBIE BLETCH", 1, 0, 100),
|
||||
SCROLL(None, "TEMOV", 1, 0, 100),
|
||||
SCROLL(None, "GARVEN DEH", 1, 0, 100),
|
||||
SCROLL(None, "READ ME", 1, 0, 100),
|
||||
SCROLL(None, "ETAOIN SHRDLU", 1, 0, 100),
|
||||
SCROLL(None, "LOREM IPSUM", 1, 0, 100),
|
||||
SCROLL(None, "FNORD", 1, 0, 100), /* Illuminati */
|
||||
SCROLL(None, "KO BATE", 1, 0, 100), /* Kurd Lasswitz */
|
||||
SCROLL(None, "ABRA KA DABRA", 1, 0, 100), /* traditional incantation */
|
||||
SCROLL(None, "ASHPD SODALG", 1, 0, 100), /* Portal */
|
||||
SCROLL(None, "ZLORFIK", 1, 0, 100), /* Zak McKracken */
|
||||
SCROLL(None, "GNIK SISI VLE", 1, 0, 100), /* Zak McKracken */
|
||||
SCROLL(None, "HAPAX LEGOMENON", 1, 0, 100),
|
||||
SCROLL(None, "EIRIS SAZUN IDISI", 1, 0, 100), /* Merseburg Incantations */
|
||||
SCROLL(None, "PHOL ENDE WODAN", 1, 0, 100), /* Merseburg Incantations */
|
||||
SCROLL(None, "GHOTI", 1, 0, 100), /* pronounced as 'fish',
|
||||
George Bernard Shaw */
|
||||
SCROLL(None, "MAPIRO MAHAMA DIROMAT", 1, 0, 100), /* Wizardry */
|
||||
SCROLL(None, "VAS CORP BET MANI", 1, 0, 100), /* Ultima */
|
||||
SCROLL(None, "XOR OTA", 1, 0, 100), /* Aarne Haapakoski */
|
||||
SCROLL(None, "STRC PRST SKRZ KRK", 1, 0, 100), /* Czech and Slovak
|
||||
tongue-twister */
|
||||
/* These must come last because they have special fixed descriptions.
|
||||
*/
|
||||
#ifdef MAIL
|
||||
SCROLL("mail", "stamped", 0, 0, 0),
|
||||
SCROLL("mail", "stamped", 0, 0, 0),
|
||||
#endif
|
||||
SCROLL("blank paper", "unlabeled", 0, 28, 60),
|
||||
SCROLL("blank paper", "unlabeled", 0, 28, 60),
|
||||
#undef SCROLL
|
||||
|
||||
/* spellbooks ... */
|
||||
|
||||
+47
-30
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 objnam.c $NHDT-Date: 1446892450 2015/11/07 10:34:10 $ $NHDT-Branch: master $:$NHDT-Revision: 1.153 $ */
|
||||
/* NetHack 3.6 objnam.c $NHDT-Date: 1447490776 2015/11/14 08:46:16 $ $NHDT-Branch: master $:$NHDT-Revision: 1.154 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -2364,6 +2364,13 @@ struct alt_spellings {
|
||||
{ "grappling iron", GRAPPLING_HOOK },
|
||||
{ "grapnel", GRAPPLING_HOOK },
|
||||
{ "grapple", GRAPPLING_HOOK },
|
||||
/* normally we wouldn't have to worry about unnecessary <space>, but
|
||||
" stone" will get stripped off, preventing a wishymatch; that actually
|
||||
lets "flint stone" be a match, so we also accept bogus "flintstone" */
|
||||
{ "luck stone", LUCKSTONE },
|
||||
{ "load stone", LOADSTONE },
|
||||
{ "touch stone", TOUCHSTONE },
|
||||
{ "flintstone", FLINT },
|
||||
{ (const char *) 0, 0 },
|
||||
};
|
||||
|
||||
@@ -2429,7 +2436,6 @@ struct obj *no_wish;
|
||||
* "2 3 alarm chilis". Currently this isn't allowed; options.c
|
||||
* automatically sticks 'candied' in front of such names.
|
||||
*/
|
||||
|
||||
char oclass;
|
||||
char *un, *dn, *actualn;
|
||||
const char *name = 0;
|
||||
@@ -2556,35 +2562,44 @@ struct obj *no_wish;
|
||||
}
|
||||
if (!cnt)
|
||||
cnt = 1; /* %% what with "gems" etc. ? */
|
||||
if (strlen(bp) > 1) {
|
||||
if ((p = rindex(bp, '(')) != 0) {
|
||||
if (p > bp && p[-1] == ' ')
|
||||
p[-1] = 0;
|
||||
else
|
||||
*p = 0;
|
||||
p++;
|
||||
if (!strcmpi(p, "lit)")) {
|
||||
islit = 1;
|
||||
} else {
|
||||
if (strlen(bp) > 1 && (p = rindex(bp, '(')) != 0) {
|
||||
boolean keeptrailingchars = TRUE;
|
||||
|
||||
p[(p > bp && p[-1] == ' ') ? -1 : 0] = '\0'; /*terminate bp */
|
||||
++p; /* advance past '(' */
|
||||
if (!strncmpi(p, "lit)", 4)) {
|
||||
islit = 1;
|
||||
p += 4 - 1; /* point at ')' */
|
||||
} else {
|
||||
spe = atoi(p);
|
||||
while (digit(*p))
|
||||
p++;
|
||||
if (*p == ':') {
|
||||
p++;
|
||||
rechrg = spe;
|
||||
spe = atoi(p);
|
||||
while (digit(*p))
|
||||
p++;
|
||||
if (*p == ':') {
|
||||
p++;
|
||||
rechrg = spe;
|
||||
spe = atoi(p);
|
||||
while (digit(*p))
|
||||
p++;
|
||||
}
|
||||
if (*p != ')') {
|
||||
spe = rechrg = 0;
|
||||
} else {
|
||||
spesgn = 1;
|
||||
p++;
|
||||
if (*p)
|
||||
Strcat(bp, p);
|
||||
}
|
||||
}
|
||||
if (*p != ')') {
|
||||
spe = rechrg = 0;
|
||||
/* mis-matched parentheses; rest of string will be ignored
|
||||
* [probably we should restore everything back to '('
|
||||
* instead since it might be part of "named ..."]
|
||||
*/
|
||||
keeptrailingchars = FALSE;
|
||||
} else {
|
||||
spesgn = 1;
|
||||
}
|
||||
}
|
||||
if (keeptrailingchars) {
|
||||
char *pp = eos(bp);
|
||||
|
||||
/* 'pp' points at 'pb's terminating '\0',
|
||||
'p' points at ')' and will be incremented past it */
|
||||
do {
|
||||
*pp++ = *++p;
|
||||
} while (*p);
|
||||
}
|
||||
}
|
||||
/*
|
||||
@@ -2892,8 +2907,8 @@ retry:
|
||||
goto typfnd;
|
||||
}
|
||||
|
||||
if (!BSTRCMPI(bp, p - 6, " stone")) {
|
||||
p[-6] = 0;
|
||||
if (!BSTRCMPI(bp, p - 6, " stone") || !BSTRCMPI(bp, p - 4, " gem")) {
|
||||
p[!strcmpi(p - 4, " gem") ? -4 : -6] = '\0';
|
||||
oclass = GEM_CLASS;
|
||||
dn = actualn = bp;
|
||||
goto srch;
|
||||
@@ -2918,8 +2933,9 @@ retry:
|
||||
goto typfnd;
|
||||
else
|
||||
typ = 0; /* somebody changed objects[]? punt */
|
||||
} else { /* try to construct canonical form */
|
||||
} else { /* try to construct canonical form */
|
||||
char tbuf[BUFSZ];
|
||||
|
||||
Strcpy(tbuf, "worthless piece of ");
|
||||
Strcat(tbuf, g); /* assume it starts with the color */
|
||||
Strcpy(bp, tbuf);
|
||||
@@ -2967,6 +2983,7 @@ srch:
|
||||
}
|
||||
if (actualn) {
|
||||
struct Jitem *j = Japanese_items;
|
||||
|
||||
while (j->item) {
|
||||
if (actualn && !strcmpi(actualn, j->name)) {
|
||||
typ = j->item;
|
||||
|
||||
+123
-119
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 options.c $NHDT-Date: 1446854231 2015/11/06 23:57:11 $ $NHDT-Branch: master $:$NHDT-Revision: 1.236 $ */
|
||||
/* NetHack 3.6 options.c $NHDT-Date: 1447234076 2015/11/11 09:27:56 $ $NHDT-Branch: master $:$NHDT-Revision: 1.240 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -710,8 +710,10 @@ initoptions_init()
|
||||
#if defined(UNIX) || defined(VMS)
|
||||
#ifdef TTY_GRAPHICS
|
||||
/* detect whether a "vt" terminal can handle alternate charsets */
|
||||
if ((opts = nh_getenv("TERM")) && !strncmpi(opts, "vt", 2) && AS && AE
|
||||
&& index(AS, '\016') && index(AE, '\017')) {
|
||||
if ((opts = nh_getenv("TERM"))
|
||||
/* [could also check "xterm" which emulates vtXXX by default] */
|
||||
&& !strncmpi(opts, "vt", 2)
|
||||
&& AS && AE && index(AS, '\016') && index(AE, '\017')) {
|
||||
if (!symset[PRIMARY].name)
|
||||
load_symset("DECGraphics", PRIMARY);
|
||||
switch_symbols(TRUE);
|
||||
@@ -1057,9 +1059,9 @@ const char *optn;
|
||||
else
|
||||
flags.suppress_alert = fnv;
|
||||
if (rejectver) {
|
||||
if (!initial)
|
||||
if (!initial) {
|
||||
You_cant("disable new feature alerts for future versions.");
|
||||
else {
|
||||
} else {
|
||||
Sprintf(buf,
|
||||
"\n%s=%s Invalid reference to a future version ignored",
|
||||
optn, op);
|
||||
@@ -1372,7 +1374,7 @@ int typ;
|
||||
char *pattern;
|
||||
{
|
||||
struct plinemsg_type *tmp
|
||||
= (struct plinemsg_type *) alloc(sizeof (struct plinemsg_type));
|
||||
= (struct plinemsg_type *) alloc(sizeof (struct plinemsg_type));
|
||||
|
||||
if (!tmp)
|
||||
return FALSE;
|
||||
@@ -1387,7 +1389,7 @@ char *pattern;
|
||||
pline("%s: %s", re_error, regex_error_desc(tmp->regex));
|
||||
wait_synch();
|
||||
regex_free(tmp->regex);
|
||||
free(tmp);
|
||||
free((genericptr_t) tmp);
|
||||
return FALSE;
|
||||
}
|
||||
tmp->pattern = dupstr(pattern);
|
||||
@@ -1655,7 +1657,7 @@ boolean tinitial, tfrom_file;
|
||||
{
|
||||
register char *op;
|
||||
unsigned num;
|
||||
boolean negated, duplicate;
|
||||
boolean negated, val_negated, duplicate;
|
||||
int i;
|
||||
const char *fullname;
|
||||
|
||||
@@ -1730,10 +1732,10 @@ boolean tinitial, tfrom_file;
|
||||
/* align:string */
|
||||
fullname = "align";
|
||||
if (match_optname(opts, fullname, sizeof("align") - 1, TRUE)) {
|
||||
if (negated)
|
||||
if (negated) {
|
||||
bad_negation(fullname, FALSE);
|
||||
else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) {
|
||||
boolean val_negated = FALSE;
|
||||
} else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) {
|
||||
val_negated = FALSE;
|
||||
while ((*op == '!') || !strncmpi(op, "no", 2)) {
|
||||
if (*op == '!')
|
||||
op++;
|
||||
@@ -1758,10 +1760,10 @@ boolean tinitial, tfrom_file;
|
||||
fullname = "role";
|
||||
if (match_optname(opts, fullname, 4, TRUE)
|
||||
|| match_optname(opts, (fullname = "character"), 4, TRUE)) {
|
||||
if (negated)
|
||||
if (negated) {
|
||||
bad_negation(fullname, FALSE);
|
||||
else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) {
|
||||
boolean val_negated = FALSE;
|
||||
} else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) {
|
||||
val_negated = FALSE;
|
||||
while ((*op == '!') || !strncmpi(op, "no", 2)) {
|
||||
if (*op == '!')
|
||||
op++;
|
||||
@@ -1787,10 +1789,10 @@ boolean tinitial, tfrom_file;
|
||||
/* race:string */
|
||||
fullname = "race";
|
||||
if (match_optname(opts, fullname, 4, TRUE)) {
|
||||
if (negated)
|
||||
if (negated) {
|
||||
bad_negation(fullname, FALSE);
|
||||
else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) {
|
||||
boolean val_negated = FALSE;
|
||||
} else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) {
|
||||
val_negated = FALSE;
|
||||
while ((*op == '!') || !strncmpi(op, "no", 2)) {
|
||||
if (*op == '!')
|
||||
op++;
|
||||
@@ -1816,10 +1818,10 @@ boolean tinitial, tfrom_file;
|
||||
/* gender:string */
|
||||
fullname = "gender";
|
||||
if (match_optname(opts, fullname, 4, TRUE)) {
|
||||
if (negated)
|
||||
if (negated) {
|
||||
bad_negation(fullname, FALSE);
|
||||
else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) {
|
||||
boolean val_negated = FALSE;
|
||||
} else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) {
|
||||
val_negated = FALSE;
|
||||
while ((*op == '!') || !strncmpi(op, "no", 2)) {
|
||||
if (*op == '!')
|
||||
op++;
|
||||
@@ -1968,11 +1970,10 @@ boolean tinitial, tfrom_file;
|
||||
if (match_optname(opts, fullname, 7, TRUE)) {
|
||||
if (duplicate)
|
||||
complain_about_duplicate(opts, 1);
|
||||
if (negated)
|
||||
if (negated) {
|
||||
bad_negation(fullname, FALSE);
|
||||
else if ((op = string_for_opt(opts, FALSE)) != 0) {
|
||||
symset[ROGUESET].name = (char *) alloc(strlen(op) + 1);
|
||||
Strcpy(symset[ROGUESET].name, op);
|
||||
} else if ((op = string_for_opt(opts, FALSE)) != 0) {
|
||||
symset[ROGUESET].name = dupstr(op);
|
||||
if (!read_sym_file(ROGUESET)) {
|
||||
clear_symsetentry(ROGUESET, TRUE);
|
||||
raw_printf("Unable to load symbol set \"%s\" from \"%s\".",
|
||||
@@ -1991,11 +1992,10 @@ boolean tinitial, tfrom_file;
|
||||
if (match_optname(opts, fullname, 6, TRUE)) {
|
||||
if (duplicate)
|
||||
complain_about_duplicate(opts, 1);
|
||||
if (negated)
|
||||
if (negated) {
|
||||
bad_negation(fullname, FALSE);
|
||||
else if ((op = string_for_opt(opts, FALSE)) != 0) {
|
||||
symset[PRIMARY].name = (char *) alloc(strlen(op) + 1);
|
||||
Strcpy(symset[PRIMARY].name, op);
|
||||
} else if ((op = string_for_opt(opts, FALSE)) != 0) {
|
||||
symset[PRIMARY].name = dupstr(op);
|
||||
if (!read_sym_file(PRIMARY)) {
|
||||
clear_symsetentry(PRIMARY, TRUE);
|
||||
raw_printf("Unable to load symbol set \"%s\" from \"%s\".",
|
||||
@@ -2370,9 +2370,9 @@ boolean tinitial, tfrom_file;
|
||||
if (match_optname(opts, fullname, 4, TRUE)) {
|
||||
if (duplicate)
|
||||
complain_about_duplicate(opts, 1);
|
||||
if (negated)
|
||||
if (negated) {
|
||||
bad_negation(fullname, FALSE);
|
||||
else if ((op = string_for_opt(opts, negated))) {
|
||||
} else if ((op = string_for_opt(opts, negated)) != 0) {
|
||||
#ifdef WIN32
|
||||
(void) strncpy(iflags.altkeyhandler, op, MAX_ALTKEYHANDLER - 5);
|
||||
load_keyboard_handler();
|
||||
@@ -2973,9 +2973,9 @@ boolean tinitial, tfrom_file;
|
||||
fullname = "subkeyvalue";
|
||||
if (match_optname(opts, fullname, 5, TRUE)) {
|
||||
/* no duplicate complaint here */
|
||||
if (negated)
|
||||
if (negated) {
|
||||
bad_negation(fullname, FALSE);
|
||||
else {
|
||||
} else {
|
||||
#if defined(WIN32)
|
||||
op = string_for_opt(opts, 0);
|
||||
map_subkeyvalue(op);
|
||||
@@ -3140,9 +3140,9 @@ boolean tinitial, tfrom_file;
|
||||
if (duplicate)
|
||||
complain_about_duplicate(opts, 1);
|
||||
if (match_optname(opts, fullname, (int) strlen(fullname), TRUE)) {
|
||||
if (negated)
|
||||
if (negated) {
|
||||
bad_negation(fullname, FALSE);
|
||||
else if ((op = string_for_opt(opts, FALSE)) != 0) {
|
||||
} else if ((op = string_for_opt(opts, FALSE)) != 0) {
|
||||
int j;
|
||||
char c, op_buf[BUFSZ];
|
||||
boolean isbad = FALSE;
|
||||
@@ -3197,11 +3197,10 @@ boolean tinitial, tfrom_file;
|
||||
complain_about_duplicate(opts, 1);
|
||||
if (!negated) {
|
||||
/* There is no rogue level DECgraphics-specific set */
|
||||
if (symset[PRIMARY].name)
|
||||
if (symset[PRIMARY].name) {
|
||||
badflag = TRUE;
|
||||
else {
|
||||
symset[PRIMARY].name = (char *) alloc(strlen(fullname) + 1);
|
||||
Strcpy(symset[PRIMARY].name, fullname);
|
||||
} else {
|
||||
symset[PRIMARY].name = dupstr(fullname);
|
||||
if (!read_sym_file(PRIMARY)) {
|
||||
badflag = TRUE;
|
||||
clear_symsetentry(PRIMARY, TRUE);
|
||||
@@ -3224,13 +3223,12 @@ boolean tinitial, tfrom_file;
|
||||
complain_about_duplicate(opts, 1);
|
||||
if (!negated) {
|
||||
for (i = 0; i < NUM_GRAPHICS; ++i) {
|
||||
if (symset[i].name)
|
||||
if (symset[i].name) {
|
||||
badflag = TRUE;
|
||||
else {
|
||||
} else {
|
||||
if (i == ROGUESET)
|
||||
sym_name = "RogueIBM";
|
||||
symset[i].name = (char *) alloc(strlen(sym_name) + 1);
|
||||
Strcpy(symset[i].name, sym_name);
|
||||
symset[i].name = dupstr(sym_name);
|
||||
if (!read_sym_file(i)) {
|
||||
badflag = TRUE;
|
||||
clear_symsetentry(i, TRUE);
|
||||
@@ -3258,11 +3256,10 @@ boolean tinitial, tfrom_file;
|
||||
if (duplicate)
|
||||
complain_about_duplicate(opts, 1);
|
||||
if (!negated) {
|
||||
if (symset[PRIMARY].name)
|
||||
if (symset[PRIMARY].name) {
|
||||
badflag = TRUE;
|
||||
else {
|
||||
symset[PRIMARY].name = (char *) alloc(strlen(fullname) + 1);
|
||||
Strcpy(symset[PRIMARY].name, fullname);
|
||||
} else {
|
||||
symset[PRIMARY].name = dupstr(fullname);
|
||||
if (!read_sym_file(PRIMARY)) {
|
||||
badflag = TRUE;
|
||||
clear_symsetentry(PRIMARY, TRUE);
|
||||
@@ -3355,9 +3352,8 @@ boolean tinitial, tfrom_file;
|
||||
|| (boolopt[i].addr) == &flags.showrace
|
||||
|| (boolopt[i].addr) == &iflags.hilite_pet) {
|
||||
need_redraw = TRUE;
|
||||
}
|
||||
#ifdef TEXTCOLOR
|
||||
else if ((boolopt[i].addr) == &iflags.use_color) {
|
||||
} else if ((boolopt[i].addr) == &iflags.use_color) {
|
||||
need_redraw = TRUE;
|
||||
#ifdef TOS
|
||||
if ((boolopt[i].addr) == &iflags.use_color && iflags.BIOS) {
|
||||
@@ -3367,9 +3363,8 @@ boolean tinitial, tfrom_file;
|
||||
set_colors();
|
||||
}
|
||||
#endif
|
||||
#endif /* TEXTCOLOR */
|
||||
}
|
||||
#endif
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -3417,9 +3412,9 @@ void
|
||||
add_menu_cmd_alias(from_ch, to_ch)
|
||||
char from_ch, to_ch;
|
||||
{
|
||||
if (n_menu_mapped >= MAX_MENU_MAPPED_CMDS)
|
||||
if (n_menu_mapped >= MAX_MENU_MAPPED_CMDS) {
|
||||
pline("out of menu map space.");
|
||||
else {
|
||||
} else {
|
||||
mapped_menu_cmds[n_menu_mapped] = from_ch;
|
||||
mapped_menu_op[n_menu_mapped] = to_ch;
|
||||
n_menu_mapped++;
|
||||
@@ -3604,19 +3599,20 @@ doset()
|
||||
}
|
||||
any.a_int = -4;
|
||||
Sprintf(buf2, n_currently_set, msgtype_count());
|
||||
Sprintf(buf, fmtstr_doset_add_menu, any.a_int ? "" : " ", "message types",
|
||||
buf2);
|
||||
Sprintf(buf, fmtstr_doset_add_menu, any.a_int ? "" : " ",
|
||||
"message types", buf2);
|
||||
add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, MENU_UNSELECTED);
|
||||
any.a_int = -3;
|
||||
Sprintf(buf2, n_currently_set, count_menucolors());
|
||||
Sprintf(buf, fmtstr_doset_add_menu, any.a_int ? "" : " ", "menucolors",
|
||||
buf2);
|
||||
Sprintf(buf, fmtstr_doset_add_menu, any.a_int ? "" : " ",
|
||||
"menucolors", buf2);
|
||||
add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, MENU_UNSELECTED);
|
||||
#ifdef STATUS_VIA_WINDOWPORT
|
||||
#ifdef STATUS_HILITES
|
||||
any.a_int = -2;
|
||||
get_status_hilites(buf2, 60);
|
||||
if (!*buf2) Sprintf(buf2, "%s", "(none)");
|
||||
if (!*buf2)
|
||||
Sprintf(buf2, "%s", "(none)");
|
||||
if (!iflags.menu_tab_sep)
|
||||
Sprintf(buf, fmtstr_doset_add_menu, any.a_int ? "" : " ",
|
||||
"status_hilites", buf2);
|
||||
@@ -3824,8 +3820,7 @@ boolean setinitial, setfromfile;
|
||||
could have toggled off preselected ones to end up with 0 */
|
||||
flags.paranoia_bits = 0;
|
||||
if (i > 0) {
|
||||
/* at least one item set, either preselected or newly picked
|
||||
*/
|
||||
/* at least 1 item set, either preselected or newly picked */
|
||||
while (--i >= 0)
|
||||
flags.paranoia_bits |= paranoia_picks[i].item.a_int;
|
||||
free((genericptr_t) paranoia_picks);
|
||||
@@ -3835,6 +3830,7 @@ boolean setinitial, setfromfile;
|
||||
} else if (!strcmp("pickup_burden", optname)) {
|
||||
const char *burden_name, *burden_letters = "ubsntl";
|
||||
menu_item *burden_pick = (menu_item *) 0;
|
||||
|
||||
tmpwin = create_nhwindow(NHW_MENU);
|
||||
start_menu(tmpwin);
|
||||
any = zeroany;
|
||||
@@ -3922,6 +3918,7 @@ boolean setinitial, setfromfile;
|
||||
} else if (!strcmp("runmode", optname)) {
|
||||
const char *mode_name;
|
||||
menu_item *mode_pick = (menu_item *) 0;
|
||||
|
||||
tmpwin = create_nhwindow(NHW_MENU);
|
||||
start_menu(tmpwin);
|
||||
any = zeroany;
|
||||
@@ -3941,6 +3938,7 @@ boolean setinitial, setfromfile;
|
||||
#ifdef TTY_GRAPHICS
|
||||
/* by Christian W. Cooper */
|
||||
menu_item *window_pick = (menu_item *) 0;
|
||||
|
||||
tmpwin = create_nhwindow(NHW_MENU);
|
||||
start_menu(tmpwin);
|
||||
any = zeroany;
|
||||
@@ -3966,6 +3964,7 @@ boolean setinitial, setfromfile;
|
||||
} else if (!strcmp("sortloot", optname)) {
|
||||
const char *sortl_name;
|
||||
menu_item *sortl_pick = (menu_item *) 0;
|
||||
|
||||
tmpwin = create_nhwindow(NHW_MENU);
|
||||
start_menu(tmpwin);
|
||||
any = zeroany;
|
||||
@@ -4119,9 +4118,8 @@ boolean setinitial, setfromfile;
|
||||
for (pick_idx = 0; pick_idx < pick_cnt; ++pick_idx)
|
||||
free_one_msgtype(pick_list[pick_idx].item.a_int - 1
|
||||
- pick_idx);
|
||||
free((genericptr_t) pick_list), pick_list = (menu_item *) 0;
|
||||
}
|
||||
free((genericptr_t) pick_list);
|
||||
pick_list = (menu_item *) 0;
|
||||
destroy_nhwindow(tmpwin);
|
||||
if (pick_cnt >= 0)
|
||||
goto msgtypes_again;
|
||||
@@ -4175,15 +4173,15 @@ boolean setinitial, setfromfile;
|
||||
Sprintf(mcbuf, "%s menu colors",
|
||||
(opt_idx == 1) ? "List of" : "Remove which");
|
||||
end_menu(tmpwin, mcbuf);
|
||||
pick_cnt = select_menu(
|
||||
tmpwin, (opt_idx == 1) ? PICK_NONE : PICK_ANY, &pick_list);
|
||||
pick_cnt = select_menu(tmpwin,
|
||||
(opt_idx == 1) ? PICK_NONE : PICK_ANY,
|
||||
&pick_list);
|
||||
if (pick_cnt > 0) {
|
||||
for (pick_idx = 0; pick_idx < pick_cnt; ++pick_idx)
|
||||
free_one_menu_coloring(pick_list[pick_idx].item.a_int - 1
|
||||
- pick_idx);
|
||||
free((genericptr_t) pick_list), pick_list = (menu_item *) 0;
|
||||
}
|
||||
free((genericptr_t) pick_list);
|
||||
pick_list = (menu_item *) 0;
|
||||
destroy_nhwindow(tmpwin);
|
||||
if (pick_cnt >= 0)
|
||||
goto menucolors_again;
|
||||
@@ -4240,16 +4238,16 @@ boolean setinitial, setfromfile;
|
||||
Sprintf(apebuf, "%s autopickup exceptions",
|
||||
(opt_idx == 1) ? "List of" : "Remove which");
|
||||
end_menu(tmpwin, apebuf);
|
||||
pick_cnt = select_menu(
|
||||
tmpwin, (opt_idx == 1) ? PICK_NONE : PICK_ANY, &pick_list);
|
||||
pick_cnt = select_menu(tmpwin,
|
||||
(opt_idx == 1) ? PICK_NONE : PICK_ANY,
|
||||
&pick_list);
|
||||
if (pick_cnt > 0) {
|
||||
for (pick_idx = 0; pick_idx < pick_cnt; ++pick_idx)
|
||||
remove_autopickup_exception(
|
||||
(struct autopickup_exception *) pick_list[pick_idx]
|
||||
.item.a_void);
|
||||
(struct autopickup_exception *)
|
||||
pick_list[pick_idx].item.a_void);
|
||||
free((genericptr_t) pick_list), pick_list = (menu_item *) 0;
|
||||
}
|
||||
free((genericptr_t) pick_list);
|
||||
pick_list = (menu_item *) 0;
|
||||
destroy_nhwindow(tmpwin);
|
||||
if (pick_cnt >= 0)
|
||||
goto ape_again;
|
||||
@@ -4258,13 +4256,12 @@ boolean setinitial, setfromfile;
|
||||
|| !strcmp("roguesymset", optname)) {
|
||||
menu_item *symset_pick = (menu_item *) 0;
|
||||
boolean primaryflag = (*optname == 's'),
|
||||
rogueflag = (*optname == 'r'), ready_to_switch = FALSE,
|
||||
rogueflag = (*optname == 'r'),
|
||||
ready_to_switch = FALSE,
|
||||
nothing_to_do = FALSE;
|
||||
int res;
|
||||
char *symset_name, fmtstr[20];
|
||||
struct symsetentry *sl;
|
||||
int setcount = 0;
|
||||
int chosen = -2, which_set;
|
||||
int res, which_set, setcount = 0, chosen = -2;
|
||||
|
||||
if (rogueflag)
|
||||
which_set = ROGUESET;
|
||||
@@ -4359,14 +4356,13 @@ boolean setinitial, setfromfile;
|
||||
}
|
||||
sl = sl->next;
|
||||
}
|
||||
}
|
||||
|
||||
else if (chosen == -1) {
|
||||
} else if (chosen == -1) {
|
||||
/* explicit selection of defaults */
|
||||
/* free the now stale symset attributes */
|
||||
if (symset_name)
|
||||
if (symset_name) {
|
||||
free((genericptr_t) symset_name);
|
||||
symset_name = (char *) 0;
|
||||
symset_name = (char *) 0;
|
||||
}
|
||||
clear_symsetentry(which_set, TRUE);
|
||||
} else
|
||||
nothing_to_do = TRUE;
|
||||
@@ -4399,7 +4395,7 @@ boolean setinitial, setfromfile;
|
||||
return TRUE;
|
||||
|
||||
if (!symset[which_set].name && symset_name)
|
||||
symset[which_set].name = symset_name;
|
||||
symset[which_set].name = symset_name; /* not dupstr() here */
|
||||
|
||||
/* Set default symbols and clear the handling value */
|
||||
if (rogueflag)
|
||||
@@ -4408,9 +4404,9 @@ boolean setinitial, setfromfile;
|
||||
init_l_symbols();
|
||||
|
||||
if (symset[which_set].name) {
|
||||
if (read_sym_file(which_set))
|
||||
if (read_sym_file(which_set)) {
|
||||
ready_to_switch = TRUE;
|
||||
else {
|
||||
} else {
|
||||
clear_symsetentry(which_set, TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
@@ -4586,9 +4582,9 @@ char *buf;
|
||||
Sprintf(buf, "%s", to_be_done);
|
||||
else if (!strcmp(optname, "menu_invert_all"))
|
||||
Sprintf(buf, "%s", to_be_done);
|
||||
else if (!strcmp(optname, "menu_headings")) {
|
||||
else if (!strcmp(optname, "menu_headings"))
|
||||
Sprintf(buf, "%s", attr2attrname(iflags.menu_headings));
|
||||
} else if (!strcmp(optname, "menu_invert_page"))
|
||||
else if (!strcmp(optname, "menu_invert_page"))
|
||||
Sprintf(buf, "%s", to_be_done);
|
||||
else if (!strcmp(optname, "menu_last_page"))
|
||||
Sprintf(buf, "%s", to_be_done);
|
||||
@@ -4602,12 +4598,12 @@ char *buf;
|
||||
Sprintf(buf, "%s", to_be_done);
|
||||
else if (!strcmp(optname, "menu_select_page"))
|
||||
Sprintf(buf, "%s", to_be_done);
|
||||
else if (!strcmp(optname, "monsters"))
|
||||
else if (!strcmp(optname, "monsters")) {
|
||||
Sprintf(buf, "%s", to_be_done);
|
||||
else if (!strcmp(optname, "msghistory"))
|
||||
} else if (!strcmp(optname, "msghistory")) {
|
||||
Sprintf(buf, "%u", iflags.msg_history);
|
||||
#ifdef TTY_GRAPHICS
|
||||
else if (!strcmp(optname, "msg_window"))
|
||||
} else if (!strcmp(optname, "msg_window")) {
|
||||
Sprintf(buf, "%s", (iflags.prevmsg_window == 's')
|
||||
? "single"
|
||||
: (iflags.prevmsg_window == 'c')
|
||||
@@ -4616,9 +4612,9 @@ char *buf;
|
||||
? "full"
|
||||
: "reversed");
|
||||
#endif
|
||||
else if (!strcmp(optname, "name"))
|
||||
} else if (!strcmp(optname, "name")) {
|
||||
Sprintf(buf, "%s", plname);
|
||||
else if (!strcmp(optname, "number_pad")) {
|
||||
} else if (!strcmp(optname, "number_pad")) {
|
||||
static const char *numpadmodes[] = {
|
||||
"0=off", "1=on", "2=on, MSDOS compatible",
|
||||
"3=on, phone-style layout",
|
||||
@@ -4699,14 +4695,11 @@ char *buf;
|
||||
else
|
||||
Strcpy(buf, defopt);
|
||||
} else if (!strcmp(optname, "sortloot")) {
|
||||
char *sortname = (char *) NULL;
|
||||
|
||||
for (i = 0; i < SIZE(sortltype) && sortname == (char *) NULL; i++) {
|
||||
if (flags.sortloot == sortltype[i][0])
|
||||
sortname = (char *) sortltype[i];
|
||||
}
|
||||
if (sortname != (char *) NULL)
|
||||
Sprintf(buf, "%s", sortname);
|
||||
for (i = 0; i < SIZE(sortltype); i++)
|
||||
if (flags.sortloot == sortltype[i][0]) {
|
||||
Strcpy(buf, sortltype[i]);
|
||||
break;
|
||||
}
|
||||
} else if (!strcmp(optname, "player_selection")) {
|
||||
Sprintf(buf, "%s", iflags.wc_player_selection ? "prompts" : "dialog");
|
||||
#ifdef MSDOS
|
||||
@@ -4831,15 +4824,15 @@ const char *mapping;
|
||||
apehead = (grab) ? &iflags.autopickup_exceptions[AP_GRAB]
|
||||
: &iflags.autopickup_exceptions[AP_LEAVE];
|
||||
ape = (struct autopickup_exception *) alloc(
|
||||
sizeof(struct autopickup_exception));
|
||||
sizeof (struct autopickup_exception));
|
||||
ape->regex = regex_init();
|
||||
if (!regex_compile(text2, ape->regex)) {
|
||||
raw_print("regex error in AUTOPICKUP_EXCEPTION");
|
||||
regex_free(ape->regex);
|
||||
free(ape);
|
||||
free((genericptr_t) ape);
|
||||
return 0;
|
||||
}
|
||||
ape->pattern = (char *)alloc(strlen(text2) + 1);
|
||||
ape->pattern = (char *) alloc(strlen(text2) + 1);
|
||||
strcpy(ape->pattern, text2);
|
||||
ape->grab = grab;
|
||||
ape->next = *apehead;
|
||||
@@ -4861,14 +4854,15 @@ struct autopickup_exception *whichape;
|
||||
for (ape = iflags.autopickup_exceptions[chain]; ape;) {
|
||||
if (ape == whichape) {
|
||||
struct autopickup_exception *freeape = ape;
|
||||
|
||||
ape = ape->next;
|
||||
if (prev)
|
||||
prev->next = ape;
|
||||
else
|
||||
iflags.autopickup_exceptions[chain] = ape;
|
||||
regex_free(freeape->regex);
|
||||
free(freeape->pattern);
|
||||
free(freeape);
|
||||
free((genericptr_t) freeape->pattern);
|
||||
free((genericptr_t) freeape);
|
||||
} else {
|
||||
prev = ape;
|
||||
ape = ape->next;
|
||||
@@ -4907,9 +4901,9 @@ free_autopickup_exceptions()
|
||||
for (pass = AP_LEAVE; pass <= AP_GRAB; ++pass) {
|
||||
while ((ape = iflags.autopickup_exceptions[pass]) != 0) {
|
||||
regex_free(ape->regex);
|
||||
free(ape->pattern);
|
||||
free((genericptr_t) ape->pattern);
|
||||
iflags.autopickup_exceptions[pass] = ape->next;
|
||||
free(ape);
|
||||
free((genericptr_t) ape);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4922,17 +4916,30 @@ int which_set;
|
||||
{
|
||||
clear_symsetentry(which_set, TRUE);
|
||||
|
||||
symset[which_set].name = (char *) alloc(strlen(s) + 1);
|
||||
Strcpy(symset[which_set].name, s);
|
||||
if (read_sym_file(which_set))
|
||||
if (symset[which_set].name)
|
||||
free((genericptr_t) symset[which_set].name);
|
||||
symset[which_set].name = dupstr(s);
|
||||
|
||||
if (read_sym_file(which_set)) {
|
||||
switch_symbols(TRUE);
|
||||
else {
|
||||
} else {
|
||||
clear_symsetentry(which_set, TRUE);
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
void
|
||||
free_symsets()
|
||||
{
|
||||
clear_symsetentry(PRIMARY, TRUE);
|
||||
clear_symsetentry(ROGUESET, TRUE);
|
||||
|
||||
/* symset_list is cleaned up as soon as it's used, so we shouldn't
|
||||
have to anything about it here */
|
||||
/* assert( symset_list == NULL ); */
|
||||
}
|
||||
|
||||
/* Parse the value of a SYMBOLS line from a config file */
|
||||
void
|
||||
parsesymbols(opts)
|
||||
@@ -5104,7 +5111,7 @@ const char *str;
|
||||
Strcat(buf, ", ");
|
||||
} else {
|
||||
putstr(datawin, 0, str);
|
||||
free(buf), buf = 0;
|
||||
free((genericptr_t) buf), buf = 0;
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -5550,9 +5557,8 @@ char *fontname;
|
||||
}
|
||||
if (fn) {
|
||||
if (*fn)
|
||||
free(*fn);
|
||||
*fn = (char *) alloc(strlen(fontname) + 1);
|
||||
Strcpy(*fn, fontname);
|
||||
free((genericptr_t) *fn);
|
||||
*fn = dupstr(fontname);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -5638,15 +5644,13 @@ char *op;
|
||||
if (!strcmpi(wn, wnames[j]) || !strcmpi(wn, shortnames[j])) {
|
||||
if (tfg && !strstri(tfg, " ")) {
|
||||
if (*fgp[j])
|
||||
free(*fgp[j]);
|
||||
*fgp[j] = (char *) alloc(strlen(tfg) + 1);
|
||||
Strcpy(*fgp[j], tfg);
|
||||
free((genericptr_t) *fgp[j]);
|
||||
*fgp[j] = dupstr(tfg);
|
||||
}
|
||||
if (tbg && !strstri(tbg, " ")) {
|
||||
if (*bgp[j])
|
||||
free(*bgp[j]);
|
||||
*bgp[j] = (char *) alloc(strlen(tbg) + 1);
|
||||
Strcpy(*bgp[j], tbg);
|
||||
free((genericptr_t) *bgp[j]);
|
||||
*bgp[j] = dupstr(tbg);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
+1
-1
@@ -144,7 +144,7 @@ struct obj *objs;
|
||||
boolean here;
|
||||
int *menu_on_demand;
|
||||
{
|
||||
char ilets[20], inbuf[BUFSZ];
|
||||
char ilets[30], inbuf[BUFSZ]; /* FIXME: hardcoded ilets[] length */
|
||||
int iletct, oclassct;
|
||||
boolean not_everything;
|
||||
char qbuf[QBUFSZ];
|
||||
|
||||
+1
-1
@@ -448,7 +448,7 @@ int psflags;
|
||||
|| mntmp == urole.femalenum)) {
|
||||
const char *pm_name;
|
||||
|
||||
/* mkclass_ploy() can pick a !polyok()
|
||||
/* mkclass_poly() can pick a !polyok()
|
||||
candidate; if so, usually try again */
|
||||
if (class) {
|
||||
if (rn2(3) || --tryct > 0)
|
||||
|
||||
+2
-2
@@ -797,7 +797,7 @@ gcrownu()
|
||||
case A_NEUTRAL:
|
||||
if (class_gift != STRANGE_OBJECT) {
|
||||
; /* already got bonus above */
|
||||
} else if (in_hand) {
|
||||
} else if (obj && in_hand) {
|
||||
Your("%s goes snicker-snack!", xname(obj));
|
||||
obj->dknown = TRUE;
|
||||
} else if (!already_exists) {
|
||||
@@ -819,7 +819,7 @@ gcrownu()
|
||||
Sprintf(swordbuf, "%s sword", hcolor(NH_BLACK));
|
||||
if (class_gift != STRANGE_OBJECT) {
|
||||
; /* already got bonus above */
|
||||
} else if (in_hand) {
|
||||
} else if (obj && in_hand) {
|
||||
Your("%s hums ominously!", swordbuf);
|
||||
obj->dknown = TRUE;
|
||||
} else if (!already_exists) {
|
||||
|
||||
+1
-1
@@ -241,7 +241,7 @@ char who, /* 'd' => deity, 'l' => leader, 'n' => nemesis, 'o' => artifact */
|
||||
if (who == 'o'
|
||||
&& (strstri(cvt_buf, "Eyes ")
|
||||
|| strcmpi(cvt_buf, makesingular(cvt_buf)))) {
|
||||
pnoun = (lwhich == 'h') ? "they"
|
||||
pnoun = (lwhich == 'h') ? "they"
|
||||
: (lwhich == 'i') ? "them"
|
||||
: (lwhich == 'j') ? "their" : "?";
|
||||
} else {
|
||||
|
||||
+48
-21
@@ -82,38 +82,62 @@ char *buf;
|
||||
"I survived Yendor Military Boot Camp",
|
||||
"Ludios Accounting School Intra-Mural Lacrosse Team",
|
||||
"Oracle(TM) Fountains 10th Annual Wet T-Shirt Contest",
|
||||
"Hey, black dragon! Disintegrate THIS!", "I'm With Stupid -->",
|
||||
"Don't blame me, I voted for Izchak!", "Don't Panic", /* HHGTTG */
|
||||
"Hey, black dragon! Disintegrate THIS!",
|
||||
"I'm With Stupid -->",
|
||||
"Don't blame me, I voted for Izchak!",
|
||||
"Don't Panic", /* HHGTTG */
|
||||
"Furinkan High School Athletic Dept.", /* Ranma 1/2 */
|
||||
"Hel-LOOO, Nurse!", /* Animaniacs */
|
||||
"=^.^=", "100% goblin hair - do not wash", "Aberzombie and Fitch",
|
||||
"=^.^=",
|
||||
"100% goblin hair - do not wash",
|
||||
"Aberzombie and Fitch",
|
||||
"cK -- Cockatrice touches the Kop",
|
||||
"Don't ask me, I only adventure here", "Down with pants!",
|
||||
"d, your dog or a killer?", "FREE PUG AND NEWT!", "Go team ant!",
|
||||
"Got newt?", "Hello, my darlings!", /* Charlie Drake */
|
||||
"Hey! Nymphs! Steal This T-Shirt!", "I <3 Dungeon of Doom",
|
||||
"Don't ask me, I only adventure here",
|
||||
"Down with pants!",
|
||||
"d, your dog or a killer?",
|
||||
"FREE PUG AND NEWT!",
|
||||
"Go team ant!",
|
||||
"Got newt?",
|
||||
"Hello, my darlings!", /* Charlie Drake */
|
||||
"Hey! Nymphs! Steal This T-Shirt!",
|
||||
"I <3 Dungeon of Doom",
|
||||
"I <3 Maud",
|
||||
"I am a Valkyrie. If you see me running, try to keep up.",
|
||||
"I am not a pack rat - I am a collector",
|
||||
"I bounced off a rubber tree", /* Monkey Island */
|
||||
"Plunder Island Brimstone Beach Club", /* Monkey Island */
|
||||
"If you can read this, I can hit you with my polearm",
|
||||
"I'm confused!", "I scored with the princess",
|
||||
"I want to live forever or die in the attempt.", "Lichen Park",
|
||||
"LOST IN THOUGHT - please send search party", "Meat is Mordor",
|
||||
"Minetown Better Business Bureau", "Minetown Watch",
|
||||
"I'm confused!",
|
||||
"I scored with the princess",
|
||||
"I want to live forever or die in the attempt.",
|
||||
"Lichen Park",
|
||||
"LOST IN THOUGHT - please send search party",
|
||||
"Meat is Mordor",
|
||||
"Minetown Better Business Bureau",
|
||||
"Minetown Watch",
|
||||
"Ms. Palm's House of Negotiable Affection -- A Very Reputable House Of Disrepute",
|
||||
"Protection Racketeer", "Real men love Crom",
|
||||
"Somebody stole my Mojo!", "The Hellhound Gang", "The Werewolves",
|
||||
"Protection Racketeer",
|
||||
"Real men love Crom",
|
||||
"Somebody stole my Mojo!",
|
||||
"The Hellhound Gang",
|
||||
"The Werewolves",
|
||||
"They Might Be Storm Giants",
|
||||
"Weapons don't kill people, I kill people", "White Zombie",
|
||||
"Weapons don't kill people, I kill people",
|
||||
"White Zombie",
|
||||
"You're killing me!",
|
||||
"Anhur State University - Home of the Fighting Fire Ants!",
|
||||
"FREE HUGS", "Serial Ascender", "Real men are valkyries",
|
||||
"Young Men's Cavedigging Association", "Occupy Fort Ludios",
|
||||
"I couldn't afford this T-shirt so I stole it!", "Mind flayers suck",
|
||||
"I'm not wearing any pants", "Down with the living!",
|
||||
"Pudding farmer", "Vegetarian",
|
||||
"FREE HUGS",
|
||||
"Serial Ascender",
|
||||
"Real men are valkyries",
|
||||
"Young Men's Cavedigging Association",
|
||||
"Occupy Fort Ludios",
|
||||
"I couldn't afford this T-shirt so I stole it!",
|
||||
"Mind flayers suck",
|
||||
"I'm not wearing any pants",
|
||||
"Down with the living!",
|
||||
"Pudding farmer",
|
||||
"Vegetarian",
|
||||
"Hello, I'm War!",
|
||||
};
|
||||
|
||||
Strcpy(buf, shirt_msgs[tshirt->o_id % SIZE(shirt_msgs)]);
|
||||
@@ -126,8 +150,11 @@ struct obj *apron;
|
||||
char *buf;
|
||||
{
|
||||
static const char *apron_msgs[] = {
|
||||
"Kiss the cook", "I'm making SCIENCE!", "Don't mess with the chef",
|
||||
"Don't make me poison you", "Gehennom's Kitchen",
|
||||
"Kiss the cook",
|
||||
"I'm making SCIENCE!",
|
||||
"Don't mess with the chef",
|
||||
"Don't make me poison you",
|
||||
"Gehennom's Kitchen",
|
||||
"Rat: The other white meat",
|
||||
"If you can't stand the heat, get out of Gehennom!",
|
||||
"If we weren't meant to eat animals, why are they made out of meat?",
|
||||
|
||||
+3
-2
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 save.c $NHDT-Date: 1446892456 2015/11/07 10:34:16 $ $NHDT-Branch: master $:$NHDT-Revision: 1.92 $ */
|
||||
/* NetHack 3.6 save.c $NHDT-Date: 1447576350 2015/11/15 08:32:30 $ $NHDT-Branch: master $:$NHDT-Revision: 1.94 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1395,7 +1395,8 @@ freedynamicdata()
|
||||
free_autopickup_exceptions();
|
||||
|
||||
/* miscellaneous */
|
||||
free_pickinv_cache();
|
||||
/* free_pickinv_cache(); -- done from done()... */
|
||||
free_symsets();
|
||||
#endif /* FREE_ALL_MEMORY */
|
||||
#ifdef STATUS_VIA_WINDOWPORT
|
||||
status_finish();
|
||||
|
||||
+28
-12
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 sp_lev.c $NHDT-Date: 1446887534 2015/11/07 09:12:14 $ $NHDT-Branch: master $:$NHDT-Revision: 1.70 $ */
|
||||
/* NetHack 3.6 sp_lev.c $NHDT-Date: 1447836300 2015/11/18 08:45:00 $ $NHDT-Branch: master $:$NHDT-Revision: 1.73 $ */
|
||||
/* Copyright (c) 1989 by Jean-Christophe Collet */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#pragma warning(disable : 4244)
|
||||
#endif
|
||||
|
||||
typedef void (*select_iter_func)(int, int, genericptr_t);
|
||||
typedef void FDECL((*select_iter_func), (int, int, genericptr_t));
|
||||
|
||||
extern void FDECL(mkmap, (lev_init *));
|
||||
|
||||
@@ -471,6 +471,7 @@ opvar_var_conversion(coder, ov)
|
||||
struct sp_coder *coder;
|
||||
struct opvar *ov;
|
||||
{
|
||||
static const char nhFunc[] = "opvar_var_conversion";
|
||||
struct splev_var *tmp;
|
||||
struct opvar *tmpov;
|
||||
struct opvar *array_idx = NULL;
|
||||
@@ -483,14 +484,15 @@ struct opvar *ov;
|
||||
while (tmp) {
|
||||
if (!strcmp(tmp->name, OV_s(ov))) {
|
||||
if ((tmp->svtyp & SPOVAR_ARRAY)) {
|
||||
array_idx = opvar_var_conversion(
|
||||
coder, splev_stack_pop(coder->stack));
|
||||
array_idx = opvar_var_conversion(coder,
|
||||
splev_stack_pop(coder->stack));
|
||||
if (!array_idx || OV_typ(array_idx) != SPOVAR_INT)
|
||||
panic("array idx not an int");
|
||||
if (tmp->array_len < 1)
|
||||
panic("array len < 1");
|
||||
OV_i(array_idx) = (OV_i(array_idx) % tmp->array_len);
|
||||
tmpov = opvar_clone(tmp->data.arrayvalues[OV_i(array_idx)]);
|
||||
opvar_free(array_idx);
|
||||
return tmpov;
|
||||
} else {
|
||||
tmpov = opvar_clone(tmp->data.value);
|
||||
@@ -525,15 +527,21 @@ splev_stack_getdat(coder, typ)
|
||||
struct sp_coder *coder;
|
||||
xchar typ;
|
||||
{
|
||||
static const char nhFunc[] = "splev_stack_getdat";
|
||||
if (coder && coder->stack) {
|
||||
struct opvar *tmp = splev_stack_pop(coder->stack);
|
||||
struct opvar *ret = NULL;
|
||||
|
||||
if (!tmp)
|
||||
panic("no value type %i in stack.", typ);
|
||||
if (tmp->spovartyp == SPOVAR_VARIABLE)
|
||||
tmp = opvar_var_conversion(coder, tmp);
|
||||
if (tmp->spovartyp == SPOVAR_VARIABLE) {
|
||||
ret = opvar_var_conversion(coder, tmp);
|
||||
opvar_free(tmp);
|
||||
tmp = ret;
|
||||
}
|
||||
if (tmp->spovartyp == typ)
|
||||
return tmp;
|
||||
else opvar_free(tmp);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@@ -542,10 +550,14 @@ struct opvar *
|
||||
splev_stack_getdat_any(coder)
|
||||
struct sp_coder *coder;
|
||||
{
|
||||
static const char nhFunc[] = "splev_stack_getdat_any";
|
||||
if (coder && coder->stack) {
|
||||
struct opvar *tmp = splev_stack_pop(coder->stack);
|
||||
if (tmp && tmp->spovartyp == SPOVAR_VARIABLE)
|
||||
tmp = opvar_var_conversion(coder, tmp);
|
||||
if (tmp && tmp->spovartyp == SPOVAR_VARIABLE) {
|
||||
struct opvar *ret = opvar_var_conversion(coder, tmp);
|
||||
opvar_free(tmp);
|
||||
return ret;
|
||||
}
|
||||
return tmp;
|
||||
}
|
||||
return NULL;
|
||||
@@ -964,6 +976,9 @@ packed_coord pos;
|
||||
schar try_x, try_y;
|
||||
register int trycnt = 0;
|
||||
|
||||
if (!x || !y)
|
||||
panic("get_free_room_loc: x or y is null");
|
||||
|
||||
get_location_coord(&try_x, &try_y, DRY, croom, pos);
|
||||
if (levl[try_x][try_y].typ != ROOM) {
|
||||
do {
|
||||
@@ -3786,7 +3801,7 @@ boolean diagonals;
|
||||
} while (0)
|
||||
#define SEL_FLOOD_CHKDIR(mx,my,sel) \
|
||||
if (isok((mx), (my)) \
|
||||
&& (*selection_flood_check_func)((mx),(my)) \
|
||||
&& (*selection_flood_check_func)((mx), (my)) \
|
||||
&& !selection_getpoint((mx), (my), (sel))) \
|
||||
SEL_FLOOD((mx), (my))
|
||||
static const char floodfill_stack_overrun[] = "floodfill stack overrun";
|
||||
@@ -4725,9 +4740,9 @@ struct sp_coder *coder;
|
||||
dy1 = (xchar) SP_REGION_Y1(OV_i(r));
|
||||
dx2 = (xchar) SP_REGION_X2(OV_i(r));
|
||||
dy2 = (xchar) SP_REGION_Y2(OV_i(r));
|
||||
wallify_map(dx1 < 0 ? xstart : dx1, dy1 < 0 ? ystart : dy1,
|
||||
dx2 < 0 ? xstart + xsize : dx2,
|
||||
dy2 < 0 ? ystart + ysize : dy2);
|
||||
wallify_map(dx1 < 0 ? (xstart-1) : dx1, dy1 < 0 ? (ystart-1) : dy1,
|
||||
dx2 < 0 ? (xstart + xsize + 1) : dx2,
|
||||
dy2 < 0 ? (ystart + ysize + 1) : dy2);
|
||||
break;
|
||||
case 1:
|
||||
if (!OV_pop_typ(r, SPOVAR_SEL))
|
||||
@@ -4736,6 +4751,7 @@ struct sp_coder *coder;
|
||||
break;
|
||||
}
|
||||
opvar_free(r);
|
||||
opvar_free(typ);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
+4
-2
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 spell.c $NHDT-Date: 1446854236 2015/11/06 23:57:16 $ $NHDT-Branch: master $:$NHDT-Revision: 1.70 $ */
|
||||
/* NetHack 3.6 spell.c $NHDT-Date: 1447653429 2015/11/16 05:57:09 $ $NHDT-Branch: master $:$NHDT-Revision: 1.72 $ */
|
||||
/* Copyright (c) M. Stephenson 1988 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -469,7 +469,9 @@ register struct obj *spellbook;
|
||||
if (booktype == SPE_NOVEL) {
|
||||
/* Obtain current Terry Pratchett book title */
|
||||
const char *tribtitle = noveltitle(&spellbook->novelidx);
|
||||
if (read_tribute("books", tribtitle, 0, (char *)0, 0)) {
|
||||
|
||||
if (read_tribute("books", tribtitle, 0, (char *) 0, 0,
|
||||
spellbook->o_id)) {
|
||||
u.uconduct.literate++;
|
||||
check_unpaid(spellbook);
|
||||
if (!u.uevent.read_tribute) {
|
||||
|
||||
@@ -676,6 +676,7 @@ boolean is_pet; /* If true, pet should keep wielded/worn items */
|
||||
if (canspotmon(mtmp))
|
||||
pline("%s gold %s.", s_suffix(Monnam(mtmp)),
|
||||
canseemon(mtmp) ? "vanishes" : "seems to vanish");
|
||||
obj_extract_self(otmp);
|
||||
obfree(otmp, (struct obj *) 0);
|
||||
} /* isgd && has gold */
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 sys.c $NHDT-Date: 1432512769 2015/05/25 00:12:49 $ $NHDT-Branch: master $:$NHDT-Revision: 1.33 $ */
|
||||
/* NetHack 3.6 sys.c $NHDT-Date: 1447118472 2015/11/10 01:21:12 $ $NHDT-Branch: master $:$NHDT-Revision: 1.34 $ */
|
||||
/* Copyright (c) Kenneth Lorber, Kensington, Maryland, 2008. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -6,9 +6,11 @@
|
||||
|
||||
#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 */
|
||||
* 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
|
||||
@@ -18,21 +20,21 @@ struct sysopt sysopt;
|
||||
void
|
||||
sys_early_init()
|
||||
{
|
||||
sysopt.support = NULL;
|
||||
sysopt.recover = NULL;
|
||||
sysopt.support = (char *) 0;
|
||||
sysopt.recover = (char *) 0;
|
||||
#ifdef SYSCF
|
||||
sysopt.wizards = NULL;
|
||||
sysopt.wizards = (char *) 0;
|
||||
#else
|
||||
sysopt.wizards = dupstr(WIZARD_NAME);
|
||||
#endif
|
||||
#if defined(SYSCF) || !defined(DEBUGFILES)
|
||||
sysopt.debugfiles = NULL;
|
||||
sysopt.debugfiles = (char *) 0;
|
||||
#else
|
||||
sysopt.debugfiles = dupstr(DEBUGFILES);
|
||||
#endif
|
||||
sysopt.env_dbgfl = 0; /* haven't checked getenv("DEBUGFILES") yet */
|
||||
sysopt.shellers = NULL;
|
||||
sysopt.explorers = NULL;
|
||||
sysopt.shellers = (char *) 0;
|
||||
sysopt.explorers = (char *) 0;
|
||||
sysopt.maxplayers = 0; /* XXX eventually replace MAX_NR_OF_PLAYERS */
|
||||
|
||||
/* record file */
|
||||
@@ -72,25 +74,31 @@ sys_early_init()
|
||||
sysopt.check_save_uid = 1;
|
||||
sysopt.seduce = 1; /* if it's compiled in, default to on */
|
||||
sysopt_seduce_set(sysopt.seduce);
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
sysopt_release()
|
||||
{
|
||||
if (sysopt.support)
|
||||
free(sysopt.support), sysopt.support = NULL;
|
||||
free(sysopt.support), sysopt.support = (char *) 0;
|
||||
if (sysopt.recover)
|
||||
free(sysopt.recover), sysopt.recover = NULL;
|
||||
free(sysopt.recover), sysopt.recover = (char *) 0;
|
||||
if (sysopt.wizards)
|
||||
free(sysopt.wizards), sysopt.wizards = NULL;
|
||||
free(sysopt.wizards), sysopt.wizards = (char *) 0;
|
||||
if (sysopt.explorers)
|
||||
free(sysopt.explorers), sysopt.explorers = (char *) 0;
|
||||
if (sysopt.shellers)
|
||||
free(sysopt.shellers), sysopt.shellers = (char *) 0;
|
||||
if (sysopt.debugfiles)
|
||||
free(sysopt.debugfiles), sysopt.debugfiles = NULL;
|
||||
free(sysopt.debugfiles), sysopt.debugfiles = (char *) 0;
|
||||
#ifdef PANICTRACE
|
||||
if (sysopt.gdbpath)
|
||||
free(sysopt.gdbpath), sysopt.gdbpath = NULL;
|
||||
free(sysopt.gdbpath), sysopt.gdbpath = (char *) 0;
|
||||
if (sysopt.greppath)
|
||||
free(sysopt.greppath), sysopt.greppath = NULL;
|
||||
free(sysopt.greppath), sysopt.greppath = (char *) 0;
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
extern struct attack sa_yes[NATTK];
|
||||
@@ -102,8 +110,12 @@ int val;
|
||||
{
|
||||
struct attack *setval = val ? sa_yes : sa_no;
|
||||
int x;
|
||||
|
||||
for (x = 0; x < NATTK; x++) {
|
||||
mons[PM_INCUBUS].mattk[x] = setval[x];
|
||||
mons[PM_SUCCUBUS].mattk[x] = setval[x];
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/*sys.c*/
|
||||
|
||||
+3
-1
@@ -490,12 +490,14 @@ int
|
||||
dotele()
|
||||
{
|
||||
struct trap *trap;
|
||||
boolean trap_once = FALSE;
|
||||
|
||||
trap = t_at(u.ux, u.uy);
|
||||
if (trap && (!trap->tseen || trap->ttyp != TELEP_TRAP))
|
||||
trap = 0;
|
||||
|
||||
if (trap) {
|
||||
trap_once = trap->once; /* trap may get deleted, save this */
|
||||
if (trap->once) {
|
||||
pline("This is a vault teleport, usable once only.");
|
||||
if (yn("Jump in?") == 'n')
|
||||
@@ -569,7 +571,7 @@ dotele()
|
||||
}
|
||||
|
||||
if (next_to_u()) {
|
||||
if (trap && trap->once)
|
||||
if (trap && trap_once)
|
||||
vault_tele();
|
||||
else
|
||||
tele();
|
||||
|
||||
+2
-5
@@ -760,10 +760,7 @@ boolean shatter;
|
||||
otmp = nxtobj(otmp, STATUE, TRUE);
|
||||
}
|
||||
|
||||
if (Blind)
|
||||
feel_location(x, y);
|
||||
else
|
||||
newsym(x, y);
|
||||
feel_newsym(x, y);
|
||||
return mtmp;
|
||||
}
|
||||
|
||||
@@ -3767,7 +3764,7 @@ STATIC_OVL void
|
||||
move_into_trap(ttmp)
|
||||
struct trap *ttmp;
|
||||
{
|
||||
int bc;
|
||||
int bc = 0;
|
||||
xchar x = ttmp->tx, y = ttmp->ty, bx, by, cx, cy;
|
||||
boolean unused;
|
||||
|
||||
|
||||
+1
-1
@@ -959,7 +959,7 @@ int otyp;
|
||||
break;
|
||||
}
|
||||
|
||||
while (skills->skill != P_NONE) {
|
||||
while (skills && skills->skill != P_NONE) {
|
||||
if (skills->skill == this_skill)
|
||||
return FALSE;
|
||||
++skills;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 zap.c $NHDT-Date: 1446887542 2015/11/07 09:12:22 $ $NHDT-Branch: master $:$NHDT-Revision: 1.233 $ */
|
||||
/* NetHack 3.6 zap.c $NHDT-Date: 1447475947 2015/11/14 04:39:07 $ $NHDT-Branch: master $:$NHDT-Revision: 1.235 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -2979,7 +2979,8 @@ STATIC_OVL void
|
||||
skiprange(range, skipstart, skipend)
|
||||
int range, *skipstart, *skipend;
|
||||
{
|
||||
int tmp = range - (rnd(range / 4));
|
||||
int tr = (range / 4);
|
||||
int tmp = range - ((tr > 0) ? rnd(tr) : 0);
|
||||
*skipstart = tmp;
|
||||
*skipend = tmp - ((tmp / 4) * rnd(3));
|
||||
if (*skipend >= tmp)
|
||||
@@ -4461,9 +4462,8 @@ register struct obj *obj; /* no texts here! */
|
||||
obj->owt = weight(obj);
|
||||
obj->dknown = obj->bknown = obj->rknown = 0;
|
||||
obj->known = objects[obj->otyp].oc_uses_known ? 0 : 1;
|
||||
if (obj->oextra)
|
||||
dealloc_oextra(obj->oextra);
|
||||
obj->oextra = (struct oextra *) 0;
|
||||
dealloc_oextra(obj);
|
||||
|
||||
if (obj->where == OBJ_FLOOR) {
|
||||
obj_extract_self(obj); /* move rocks back on top */
|
||||
place_object(obj, obj->ox, obj->oy);
|
||||
|
||||
+6
-6
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 bemain.c $NHDT-Date: 1432512791 2015/05/25 00:13:11 $ $NHDT-Branch: master $:$NHDT-Revision: 1.17 $ */
|
||||
/* NetHack 3.6 bemain.c $NHDT-Date: 1447844549 2015/11/18 11:02:29 $ $NHDT-Branch: master $:$NHDT-Revision: 1.18 $ */
|
||||
/* Copyright (c) Dean Luick, 1996. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -66,10 +66,10 @@ MAIN(int argc, char **argv)
|
||||
|
||||
display_gamewindows();
|
||||
|
||||
/*
|
||||
* First, try to find and restore a save file for specified character.
|
||||
* We'll return here if new game player_selection() renames the hero.
|
||||
*/
|
||||
/*
|
||||
* First, try to find and restore a save file for specified character.
|
||||
* We'll return here if new game player_selection() renames the hero.
|
||||
*/
|
||||
attempt_restore:
|
||||
if ((fd = restore_saved_game()) >= 0) {
|
||||
#ifdef NEWS
|
||||
@@ -167,7 +167,6 @@ process_options(int argc, char **argv)
|
||||
case 'D':
|
||||
wizard = TRUE, discover = FALSE;
|
||||
break;
|
||||
/* otherwise fall thru to discover */
|
||||
case 'X':
|
||||
discover = TRUE, wizard = FALSE;
|
||||
break;
|
||||
@@ -268,6 +267,7 @@ authorize_wizard_mode()
|
||||
* do anything extra.
|
||||
*/
|
||||
void nethack_exit(int status);
|
||||
|
||||
void
|
||||
nethack_exit(int status)
|
||||
{
|
||||
|
||||
+1413
-1153
File diff suppressed because it is too large
Load Diff
+1896
-2462
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
# NetHack Makefile.
|
||||
# NetHack 3.6 Makefile.dat $NHDT-Date: 1432512788 2015/05/25 00:13:08 $ $NHDT-Branch: master $:$NHDT-Revision: 1.15 $
|
||||
# NetHack 3.6 Makefile.dat $NHDT-Date: 1447844574 2015/11/18 11:02:54 $ $NHDT-Branch: master $:$NHDT-Revision: 1.18 $
|
||||
|
||||
# Root of source tree:
|
||||
NHSROOT=..
|
||||
@@ -35,12 +35,15 @@ x11tiles: ../util/tile2x11 ../win/share/monsters.txt ../win/share/objects.txt \
|
||||
../util/tile2x11 ../win/share/monsters.txt ../win/share/objects.txt \
|
||||
../win/share/other.txt
|
||||
|
||||
beostiles: ../util/tile2beos ../win/share/monsters.txt ../win/share/objects.txt \
|
||||
beostiles: ../util/tile2beos ../win/share/monsters.txt \
|
||||
../win/share/objects.txt \
|
||||
../win/share/other.txt
|
||||
../util/tile2beos ../win/share/monsters.txt ../win/share/objects.txt \
|
||||
../util/tile2beos ../win/share/monsters.txt \
|
||||
../win/share/objects.txt \
|
||||
../win/share/other.txt
|
||||
|
||||
nhtiles.bmp: ../util/tile2bmp ../win/share/monsters.txt ../win/share/objects.txt \
|
||||
nhtiles.bmp: ../util/tile2bmp ../win/share/monsters.txt \
|
||||
../win/share/objects.txt \
|
||||
../win/share/other.txt
|
||||
../util/tile2bmp $@
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# NetHack Makefile.
|
||||
# NetHack 3.6 Makefile.src $NHDT-Date: 1434446945 2015/06/16 09:29:05 $ $NHDT-Branch: master $:$NHDT-Revision: 1.44 $
|
||||
# NetHack 3.6 Makefile.src $NHDT-Date: 1447313972 2015/11/12 07:39:32 $ $NHDT-Branch: master $:$NHDT-Revision: 1.45 $
|
||||
|
||||
# Root of source tree:
|
||||
NHSROOT=..
|
||||
@@ -750,7 +750,8 @@ dogmove.o: dogmove.c $(HACK_H) ../include/mfndpos.h
|
||||
dokick.o: dokick.c $(HACK_H)
|
||||
dothrow.o: dothrow.c $(HACK_H)
|
||||
drawing.o: drawing.c $(HACK_H) ../include/tcap.h
|
||||
dungeon.o: dungeon.c $(HACK_H) ../include/dgn_file.h ../include/dlb.h
|
||||
dungeon.o: dungeon.c $(HACK_H) ../include/dgn_file.h ../include/dlb.h \
|
||||
../include/lev.h
|
||||
eat.o: eat.c $(HACK_H)
|
||||
end.o: end.c $(HACK_H) ../include/lev.h ../include/dlb.h
|
||||
engrave.o: engrave.c $(HACK_H) ../include/lev.h
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# NetHack Makefile.
|
||||
# NetHack 3.6 Makefile.top $NHDT-Date: 1432512789 2015/05/25 00:13:09 $ $NHDT-Branch: master $:$NHDT-Revision: 1.29 $
|
||||
# NetHack 3.6 Makefile.top $NHDT-Date: 1447844578 2015/11/18 11:02:58 $ $NHDT-Branch: master $:$NHDT-Revision: 1.32 $
|
||||
|
||||
# Root of source tree:
|
||||
NHSROOT=.
|
||||
@@ -46,14 +46,14 @@ DIRPERM = 0755
|
||||
|
||||
# per discussion in Install.X11 and Install.Qt
|
||||
#VARDATND =
|
||||
# VARDATND = x11tiles NetHack.ad pet_mark.xbm
|
||||
# VARDATND = x11tiles NetHack.ad pet_mark.xbm rip.xpm
|
||||
# VARDATND = x11tiles NetHack.ad pet_mark.xbm pilemark.xpm
|
||||
# VARDATND = x11tiles NetHack.ad pet_mark.xbm pilemark.xpm rip.xpm
|
||||
# for Atari/Gem
|
||||
# VARDATND = nh16.img title.img GEM_RSC.RSC rip.img
|
||||
# for BeOS
|
||||
# VARDATND = beostiles
|
||||
# for Gnome
|
||||
# VARDATND = x11tiles pet_mark.xbm rip.xpm mapbg.xpm
|
||||
# VARDATND = x11tiles pet_mark.xbm pilemark.xpm rip.xpm mapbg.xpm
|
||||
|
||||
VARDATD = bogusmon data engrave epitaph oracles options quest.dat rumors
|
||||
VARDAT = $(VARDATD) $(VARDATND)
|
||||
|
||||
+12
-10
@@ -1,5 +1,5 @@
|
||||
# Makefile for NetHack's utility programs.
|
||||
# NetHack 3.6 Makefile.utl $NHDT-Date: 1432512789 2015/05/25 00:13:09 $ $NHDT-Branch: master $:$NHDT-Revision: 1.22 $
|
||||
# NetHack 3.6 Makefile.utl $NHDT-Date: 1447844579 2015/11/18 11:02:59 $ $NHDT-Branch: master $:$NHDT-Revision: 1.25 $
|
||||
|
||||
# Root of source tree:
|
||||
NHSROOT=..
|
||||
@@ -23,7 +23,7 @@ NHSROOT=..
|
||||
# For Bull DPX/2 systems at B.O.S. 2.0 or higher use the following:
|
||||
#
|
||||
# CC = gcc -ansi -D_BULL_SOURCE -D_XOPEN_SOURCE -D_POSIX_SOURCE
|
||||
#
|
||||
#
|
||||
# If you are using GCC 2.2.2 or higher on a DPX/2, just use:
|
||||
#
|
||||
# CC = gcc -ansi
|
||||
@@ -96,7 +96,7 @@ NHSROOT=..
|
||||
#LFLAGS =
|
||||
|
||||
LIBS =
|
||||
|
||||
|
||||
# If you are cross-compiling, you must use this:
|
||||
#OBJDIR = .
|
||||
# otherwise, you can save a little bit of disk space with this:
|
||||
@@ -109,7 +109,7 @@ LEX = lex
|
||||
# YACC = bison -y
|
||||
# YACC = byacc
|
||||
# LEX = flex
|
||||
|
||||
|
||||
# these are the names of the output files from YACC/LEX. Under MS-DOS
|
||||
# and similar systems, they may differ
|
||||
YTABC = y.tab.c
|
||||
@@ -256,7 +256,7 @@ dgn_yacc.o: dgn_yacc.c $(CONFIG_H) ../include/dgn_file.h ../include/date.h
|
||||
dgn_main.o: dgn_main.c $(CONFIG_H) ../include/dlb.h
|
||||
|
||||
# see dgn_comp.l for WEIRD_LEX discussion
|
||||
dgn_lex.o: dgn_lex.c $(CONFIG.H) ../include/dgn_comp.h ../include/dgn_file.h
|
||||
dgn_lex.o: dgn_lex.c $(CONFIG_H) ../include/dgn_comp.h ../include/dgn_file.h
|
||||
@echo $(CC) -c $(CFLAGS) dgn_lex.c
|
||||
@$(CC) -c $(CFLAGS) -DWEIRD_LEX=`egrep -c _cplusplus dgn_lex.c` dgn_lex.c
|
||||
|
||||
@@ -373,6 +373,11 @@ bitmfile.o: ../win/gem/bitmfile.c ../include/bitmfile.h
|
||||
tile2beos.o: ../win/BeOS/tile2beos.cpp $(HACK_H) ../include/tile.h
|
||||
$(CXX) $(CFLAGS) -c ../win/BeOS/tile2beos.cpp
|
||||
|
||||
tileedit: tileedit.cpp $(TEXT_IO)
|
||||
$(QTDIR)/bin/moc -o tileedit.moc tileedit.h
|
||||
$(CC) -o tileedit -I../include -I$(QTDIR)/include -L$(QTDIR)/lib \
|
||||
tileedit.cpp $(TEXT_IO) -lqt
|
||||
|
||||
# using dependencies like
|
||||
# ../src/foo::
|
||||
# @( cd ../src ; $(MAKE) foo )
|
||||
@@ -416,8 +421,5 @@ spotless: clean
|
||||
-rm -f ../include/lev_comp.h ../include/dgn_comp.h
|
||||
-rm -f ../include/tile.h tiletxt.c
|
||||
-rm -f makedefs lev_comp dgn_comp recover dlb
|
||||
-rm -f gif2txt txt2ppm tile2x11 tile2img.ttp xpm2img.ttp tilemap
|
||||
|
||||
tileedit: tileedit.cpp $(TEXT_IO)
|
||||
$(QTDIR)/bin/moc -o tileedit.moc tileedit.h
|
||||
$(CC) -o tileedit -I../include -I$(QTDIR)/include -L$(QTDIR)/lib tileedit.cpp $(TEXT_IO) -lqt
|
||||
-rm -f gif2txt txt2ppm tile2x11 tile2img.ttp xpm2img.ttp \
|
||||
tilemap tileedit
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# NetHack 3.6 macosx $NHDT-Date: 1432512814 2015/05/25 00:13:34 $ $NHDT-Branch: master $:$NHDT-Revision: 1.12 $
|
||||
# NetHack 3.6 macosx $NHDT-Date: 1447844580 2015/11/18 11:03:00 $ $NHDT-Branch: master $:$NHDT-Revision: 1.18 $
|
||||
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007.
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# NetHack 3.6 macosx10.5 $NHDT-Date: 1432512814 2015/05/25 00:13:34 $ $NHDT-Branch: master $:$NHDT-Revision: 1.21 $
|
||||
# NetHack 3.6 macosx10.5 $NHDT-Date: 1447844587 2015/11/18 11:03:07 $ $NHDT-Branch: master $:$NHDT-Revision: 1.27 $
|
||||
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2009.
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# NetHack 3.6 macosx10.7 $NHDT-Date: 1432512814 2015/05/25 00:13:34 $ $NHDT-Branch: master $:$NHDT-Revision: 1.25 $
|
||||
# NetHack 3.6 macosx10.7 $NHDT-Date: 1447844589 2015/11/18 11:03:09 $ $NHDT-Branch: master $:$NHDT-Revision: 1.31 $
|
||||
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2009.
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
#
|
||||
|
||||
+14
-17
@@ -5,18 +5,10 @@
|
||||
0. Please read this entire file before trying to build or install
|
||||
NetHack, then read it again!
|
||||
|
||||
1. Building NetHack requires a C compiler (either Compaq C, DEC C,
|
||||
VAX C, or GNU C) and VMS version V4.6 or later (but see note #9).
|
||||
This release has been tested with Compaq C V6.4 on Alpha/VMS V7.3-1
|
||||
and with VAX C V3.2 and GNU C 2.7.1 on VAX/VMS V5.5-2. The build
|
||||
procedure (vmsbuild.com) should not need to be modified; it accepts
|
||||
an option for selecting the compiler, and it can detect different
|
||||
versions which might require specific command qualifiers. Versions
|
||||
of VAXC earlier than V2.3 will produce many warning messages (about
|
||||
200 per source file; over to 25,000 total!), but NetHack has been
|
||||
verified to compile, link, and execute correctly when built with VAXC
|
||||
V2.2 using vmsbuild.com. There is also a set of Makefiles suitable for
|
||||
use with MMS or MMK; they may or may not work with other make utilities.
|
||||
1. Build testing was done using a recent version of HP C (aka Compaq C
|
||||
aka--and more widely known as--DEC C). Older versions of DEC C will
|
||||
probably work too. Ancient VAX C probably will not. The set of
|
||||
Makefiles are known to be out of date; use vmsbuild.com instead.
|
||||
|
||||
2. Make sure all the NetHack files are in the appropriate directory
|
||||
structure. You should set up a directory--referred to as "top" below
|
||||
@@ -43,6 +35,7 @@
|
||||
[.sys .os2] -- OS/2
|
||||
[.sys .share .sounds] -- AIFF format audio files
|
||||
[.sys .unix] -- guess :-)
|
||||
[.sys .unit .hints] -- configuration data for setup.sh
|
||||
[.sys .wince] -- Windows CE
|
||||
[.sys .wince .ceinc] -- more WinCE
|
||||
[.sys .wince .ceinc .sys] -- ditto
|
||||
@@ -136,10 +129,11 @@
|
||||
|
||||
Notes:
|
||||
|
||||
1. Save files and bones files from 3.4.x and earlier versions
|
||||
will not work with 3.5.0. The scoreboard file (RECORD) from
|
||||
3.4.x or 3.3.x will work; one from version 3.2.x is a slightly different
|
||||
format but should be compatible.
|
||||
0. Versions 3.5.0 was never publicly released.
|
||||
|
||||
1. Save files and bones files from 3.4.x and earlier versions
|
||||
will not work with 3.6.0. The scoreboard file (RECORD) from
|
||||
3.4.x or 3.3.x will work.
|
||||
|
||||
2. To specify user-preference options in your environment, define the
|
||||
logical name NETHACKOPTIONS to have the value of a quoted string
|
||||
@@ -174,7 +168,9 @@ Notes:
|
||||
placed in the playground directory by install.com. Also, an example
|
||||
configuration file can be found in [.win.X11]nethack.rc.)
|
||||
|
||||
3. Instead of using vmsbuild.com to compile and link everything, you can
|
||||
3. [As mentioned above, the set of Makefiles is out of date so disregard
|
||||
this note....]
|
||||
Instead of using vmsbuild.com to compile and link everything, you can
|
||||
use the set of Makefiles found in the vms subdirectory, provided you
|
||||
have an appropriate and compatible make utility. They've been tested
|
||||
using MMK, a freeware clone of Digital's MMS. There are five of them,
|
||||
@@ -477,3 +473,4 @@ Notes:
|
||||
and the C compiler used.
|
||||
|
||||
20-OCT-2003
|
||||
minimally updated 9-NOV-2015...
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# NetHack Makefile (VMS) - for building nethack itself.
|
||||
# NetHack 3.6 Makefile.src $NHDT-Date: 1432512790 2015/05/25 00:13:10 $ $NHDT-Branch: master $:$NHDT-Revision: 1.26 $
|
||||
# NetHack 3.6 Makefile.src $NHDT-Date: 1447314365 2015/11/12 07:46:05 $ $NHDT-Branch: master $:$NHDT-Revision: 1.27 $
|
||||
|
||||
# Copy this file to [.src]Makefile. and then edit it as needed.
|
||||
# The default configuration is for building with DEC C (aka Compaq C).
|
||||
@@ -392,7 +392,7 @@ dogmove.obj : dogmove.c $(HACK_H) $(INC)mfndpos.h
|
||||
dokick.obj : dokick.c $(HACK_H)
|
||||
dothrow.obj : dothrow.c $(HACK_H)
|
||||
drawing.obj : drawing.c $(HACK_H) $(INC)tcap.h
|
||||
dungeon.obj : dungeon.c $(HACK_H) $(INC)dgn_file.h $(INC)dlb.h
|
||||
dungeon.obj : dungeon.c $(HACK_H) $(INC)dgn_file.h $(INC)dlb.h $(INC)lev.h
|
||||
eat.obj : eat.c $(HACK_H)
|
||||
end.obj : end.c $(HACK_H) $(INC)lev.h $(INC)dlb.h
|
||||
engrave.obj : engrave.c $(HACK_H) $(INC)lev.h
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
==============================================================
|
||||
Instructions for compiling and installing
|
||||
NetHack 3.6 on a Windows system
|
||||
(Windows 7/8.x or later only. XP may work but is untested)
|
||||
(Windows 7/8.x/10 or later only. XP may work but is untested)
|
||||
==============================================================
|
||||
Last revision: $NHDT-Date: 1434806470 2015/06/20 13:21:10 $
|
||||
|
||||
|
||||
@@ -17,3 +17,6 @@ gif2txt
|
||||
txt2ppm
|
||||
tile2img.ttp
|
||||
xpm2ppm.ttp
|
||||
# dev tool for analyzing data collected by nethack's #define MONITOR_HEAP
|
||||
heaputil
|
||||
heaputil.c
|
||||
|
||||
+60
-55
@@ -1,12 +1,15 @@
|
||||
/* NetHack 3.6 makedefs.c $NHDT-Date: 1434151372 2015/06/12 23:22:52 $ $NHDT-Branch: master $:$NHDT-Revision: 1.103 $ */
|
||||
/* NetHack 3.6 makedefs.c $NHDT-Date: 1447062431 2015/11/09 09:47:11 $ $NHDT-Branch: master $:$NHDT-Revision: 1.105 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* Copyright (c) M. Stephenson, 1990, 1991. */
|
||||
/* Copyright (c) Dean Luick, 1990. */
|
||||
/* Copyright (c) M. Stephenson, 1990, 1991. */
|
||||
/* Copyright (c) Dean Luick, 1990. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
#define MAKEDEFS_C /* use to conditionally include file sections */
|
||||
|
||||
#include "config.h"
|
||||
#ifdef MONITOR_HEAP
|
||||
#undef free /* makedefs doesn't use the alloc and free in src/alloc.c */
|
||||
#endif
|
||||
#include "permonst.h"
|
||||
#include "objclass.h"
|
||||
#include "monsym.h"
|
||||
@@ -228,8 +231,8 @@ main(void)
|
||||
|
||||
if (buf[0] == '-' && buf[1] == '-') {
|
||||
#if 0
|
||||
split up buf into words
|
||||
do_ext_makedefs(fakeargc, fakeargv);
|
||||
split up buf into words
|
||||
do_ext_makedefs(fakeargc, fakeargv);
|
||||
#else
|
||||
printf("extended makedefs not implemented for Mac OS9\n");
|
||||
exit(EXIT_FAILURE);
|
||||
@@ -589,12 +592,12 @@ do_ext_makedefs(int argc, char **argv)
|
||||
existing lines in the docs look like that)
|
||||
|
||||
Control lines:
|
||||
^^ a line starting with a (single) literal caret
|
||||
^# a comment - the line is ignored
|
||||
^?ID if defined(ID)
|
||||
^!ID if !defined(ID)
|
||||
^: else
|
||||
^. endif
|
||||
^^ a line starting with a (single) literal caret
|
||||
^# a comment - the line is ignored
|
||||
^?ID if defined(ID)
|
||||
^!ID if !defined(ID)
|
||||
^: else
|
||||
^. endif
|
||||
|
||||
*/
|
||||
#define GREP_MAGIC '^'
|
||||
@@ -891,6 +894,7 @@ unsigned long old_rumor_offset;
|
||||
we ameliorate the latter by padding the shortest lines,
|
||||
increasing the chance of the random seek landing in them */
|
||||
int len = (int) strlen(line);
|
||||
|
||||
if (len <= PAD_RUMORS_TO) {
|
||||
char *base = index(line, '\n');
|
||||
/* this is only safe because fgetline() overallocates */
|
||||
@@ -903,8 +907,8 @@ unsigned long old_rumor_offset;
|
||||
#endif
|
||||
(*rumor_count)++;
|
||||
#if 0
|
||||
/*[if we forced binary output, this would be sufficient]*/
|
||||
*rumor_size += strlen(line); /* includes newline */
|
||||
/*[if we forced binary output, this would be sufficient]*/
|
||||
*rumor_size += strlen(line); /* includes newline */
|
||||
#endif
|
||||
(void) fputs(xcrypt(line), tfp);
|
||||
free(line);
|
||||
@@ -1204,8 +1208,8 @@ const char *build_date;
|
||||
version_string(versbuf, "."), PORT_ID, subbuf, &build_date[4]);
|
||||
#if 0
|
||||
Sprintf(outbuf, "%s NetHack%s %s Copyright 1985-%s (built %s)",
|
||||
PORT_ID, subbuf, version_string(versbuf,"."), RELEASE_YEAR,
|
||||
&build_date[4]);
|
||||
PORT_ID, subbuf, version_string(versbuf,"."), RELEASE_YEAR,
|
||||
&build_date[4]);
|
||||
#endif
|
||||
return outbuf;
|
||||
}
|
||||
@@ -1593,21 +1597,21 @@ char *line;
|
||||
/*
|
||||
*
|
||||
New format (v3.1) of 'data' file which allows much faster lookups [pr]
|
||||
"do not edit" first record is a comment line
|
||||
01234567 hexadecimal formatted offset to text area
|
||||
name-a first name of interest
|
||||
123,4 offset to name's text, and number of lines for it
|
||||
name-b next name of interest
|
||||
name-c multiple names which share same description also
|
||||
456,7 share a single offset,count line
|
||||
. sentinel to mark end of names
|
||||
789,0 dummy record containing offset, count of EOF
|
||||
text-a 4 lines of descriptive text for name-a
|
||||
text-a at file position 0x01234567L + 123L
|
||||
"do not edit" first record is a comment line
|
||||
01234567 hexadecimal formatted offset to text area
|
||||
name-a first name of interest
|
||||
123,4 offset to name's text, and number of lines for it
|
||||
name-b next name of interest
|
||||
name-c multiple names which share same description also
|
||||
456,7 share a single offset,count line
|
||||
. sentinel to mark end of names
|
||||
789,0 dummy record containing offset, count of EOF
|
||||
text-a 4 lines of descriptive text for name-a
|
||||
text-a at file position 0x01234567L + 123L
|
||||
text-a
|
||||
text-a
|
||||
text-b/text-c 7 lines of text for names-b and -c
|
||||
text-b/text-c at fseek(0x01234567L + 456L)
|
||||
text-b/text-c 7 lines of text for names-b and -c
|
||||
text-b/text-c at fseek(0x01234567L + 456L)
|
||||
...
|
||||
*
|
||||
*/
|
||||
@@ -1985,7 +1989,7 @@ register struct permonst *ptr;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return (FALSE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* This routine is designed to return an integer value which represents
|
||||
@@ -2001,22 +2005,22 @@ struct permonst *ptr;
|
||||
if (tmp > 49) /* special fixed hp monster */
|
||||
tmp = 2 * (tmp - 6) / 4;
|
||||
|
||||
/* For creation in groups */
|
||||
/* For creation in groups */
|
||||
n = (!!(ptr->geno & G_SGROUP));
|
||||
n += (!!(ptr->geno & G_LGROUP)) << 1;
|
||||
|
||||
/* For ranged attacks */
|
||||
/* For ranged attacks */
|
||||
if (ranged_attk(ptr))
|
||||
n++;
|
||||
|
||||
/* For higher ac values */
|
||||
/* For higher ac values */
|
||||
n += (ptr->ac < 4);
|
||||
n += (ptr->ac < 0);
|
||||
|
||||
/* For very fast monsters */
|
||||
/* For very fast monsters */
|
||||
n += (ptr->mmove >= 18);
|
||||
|
||||
/* For each attack and "special" attack */
|
||||
/* For each attack and "special" attack */
|
||||
for (i = 0; i < NATTK; i++) {
|
||||
tmp2 = ptr->mattk[i].aatyp;
|
||||
n += (tmp2 > 0);
|
||||
@@ -2024,7 +2028,7 @@ struct permonst *ptr;
|
||||
n += (tmp2 == AT_WEAP && (ptr->mflags2 & M2_STRONG));
|
||||
}
|
||||
|
||||
/* For each "special" damage type */
|
||||
/* For each "special" damage type */
|
||||
for (i = 0; i < NATTK; i++) {
|
||||
tmp2 = ptr->mattk[i].adtyp;
|
||||
if ((tmp2 == AD_DRLI) || (tmp2 == AD_STON) || (tmp2 == AD_DRST)
|
||||
@@ -2035,13 +2039,12 @@ struct permonst *ptr;
|
||||
n += ((int) (ptr->mattk[i].damd * ptr->mattk[i].damn) > 23);
|
||||
}
|
||||
|
||||
/* Leprechauns are special cases. They have many hit dice so they
|
||||
can hit and are hard to kill, but they don't really do much
|
||||
damage. */
|
||||
/* Leprechauns are special cases. They have many hit dice so they can
|
||||
hit and are hard to kill, but they don't really do much damage. */
|
||||
if (!strcmp(ptr->mname, "leprechaun"))
|
||||
n -= 2;
|
||||
|
||||
/* Finally, adjust the monster level 0 <= n <= 24 (approx.) */
|
||||
/* Finally, adjust the monster level 0 <= n <= 24 (approx.) */
|
||||
if (n == 0)
|
||||
tmp--;
|
||||
else if (n >= 6)
|
||||
@@ -2049,7 +2052,7 @@ struct permonst *ptr;
|
||||
else
|
||||
tmp += (n / 3 + 1);
|
||||
|
||||
return ((tmp >= 0) ? tmp : 0);
|
||||
return (tmp >= 0) ? tmp : 0;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -2134,7 +2137,7 @@ do_permonst()
|
||||
return;
|
||||
}
|
||||
|
||||
/* Start of Quest text file processing. */
|
||||
/* Start of Quest text file processing. */
|
||||
#include "qtext.h"
|
||||
|
||||
static struct qthdr qt_hdr;
|
||||
@@ -2151,15 +2154,15 @@ qt_comment(s)
|
||||
char *s;
|
||||
{
|
||||
if (s[0] == '#')
|
||||
return (TRUE);
|
||||
return ((boolean)(!in_msg && strlen(s) == NO_MSG));
|
||||
return TRUE;
|
||||
return (boolean) (!in_msg && strlen(s) == NO_MSG);
|
||||
}
|
||||
|
||||
static boolean
|
||||
qt_control(s)
|
||||
char *s;
|
||||
{
|
||||
return ((boolean)(s[0] == '%' && (s[1] == 'C' || s[1] == 'E')));
|
||||
return (boolean) (s[0] == '%' && (s[1] == 'C' || s[1] == 'E'));
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -2170,9 +2173,9 @@ char *code;
|
||||
|
||||
for (i = 0; i < qt_hdr.n_hdr; i++)
|
||||
if (!strncmp(code, qt_hdr.id[i], LEN_HDR))
|
||||
return (++i);
|
||||
return ++i;
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static boolean
|
||||
@@ -2181,13 +2184,13 @@ char *code;
|
||||
{
|
||||
if (qt_hdr.n_hdr >= N_HDR) {
|
||||
Fprintf(stderr, OUT_OF_HEADERS, qt_line);
|
||||
return (FALSE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
strncpy(&qt_hdr.id[qt_hdr.n_hdr][0], code, LEN_HDR);
|
||||
msg_hdr[qt_hdr.n_hdr].n_msg = 0;
|
||||
qt_hdr.offset[qt_hdr.n_hdr++] = 0L;
|
||||
return (TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
@@ -2198,9 +2201,9 @@ int num, id;
|
||||
|
||||
for (i = 0; i < msg_hdr[num].n_msg; i++)
|
||||
if (msg_hdr[num].qt_msg[i].msgnum == id)
|
||||
return (TRUE);
|
||||
return TRUE;
|
||||
|
||||
return (FALSE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -2364,7 +2367,7 @@ put_qt_hdrs()
|
||||
int i;
|
||||
|
||||
/*
|
||||
* The main header record.
|
||||
* The main header record.
|
||||
*/
|
||||
if (debug)
|
||||
Fprintf(stderr, "%ld: header info.\n", ftell(ofp));
|
||||
@@ -2380,7 +2383,7 @@ put_qt_hdrs()
|
||||
}
|
||||
|
||||
/*
|
||||
* The individual class headers.
|
||||
* The individual class headers.
|
||||
*/
|
||||
for (i = 0; i < qt_hdr.n_hdr; i++) {
|
||||
if (debug)
|
||||
@@ -2392,10 +2395,12 @@ put_qt_hdrs()
|
||||
sizeof(struct qtmsg), msg_hdr[i].n_msg, ofp);
|
||||
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,
|
||||
msg_hdr[i].qt_msg[j].offset, msg_hdr[i].qt_msg[j].size);
|
||||
Fprintf(stderr, "msg %d @ %ld (%ld)",
|
||||
msg_hdr[i].qt_msg[j].msgnum,
|
||||
msg_hdr[i].qt_msg[j].offset,
|
||||
msg_hdr[i].qt_msg[j].size);
|
||||
if (msg_hdr[i].qt_msg[j].summary_size)
|
||||
Fprintf(stderr, " [%ld]",
|
||||
msg_hdr[i].qt_msg[j].summary_size);
|
||||
|
||||
+86
-77
@@ -1,18 +1,18 @@
|
||||
/* NetHack 3.6 winmap.c $NHDT-Date: 1435002689 2015/06/22 19:51:29 $ $NHDT-Branch: master $:$NHDT-Revision: 1.24 $ */
|
||||
/* Copyright (c) Dean Luick, 1992 */
|
||||
/* NetHack 3.6 winmap.c $NHDT-Date: 1447844616 2015/11/18 11:03:36 $ $NHDT-Branch: master $:$NHDT-Revision: 1.25 $ */
|
||||
/* Copyright (c) Dean Luick, 1992 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
/*
|
||||
* This file contains:
|
||||
* + global functions print_glyph() and cliparound()
|
||||
* + the map window routines
|
||||
* + the char and pointer input routines
|
||||
* + global functions print_glyph() and cliparound()
|
||||
* + the map window routines
|
||||
* + the char and pointer input routines
|
||||
*
|
||||
* Notes:
|
||||
* + We don't really have a good way to get the compiled ROWNO and
|
||||
* COLNO as defaults. They are hardwired to the current "correct"
|
||||
* values in the Window widget. I am _not_ in favor of including
|
||||
* some nethack include file for Window.c.
|
||||
* + We don't really have a good way to get the compiled ROWNO and
|
||||
* COLNO as defaults. They are hardwired to the current "correct"
|
||||
* values in the Window widget. I am _not_ in favor of including
|
||||
* some nethack include file for Window.c.
|
||||
*/
|
||||
|
||||
#ifndef SYSV
|
||||
@@ -58,8 +58,8 @@ extern int total_tiles_used;
|
||||
static boolean FDECL(init_tiles, (struct xwindow *));
|
||||
static void FDECL(set_button_values, (Widget, int, int, unsigned));
|
||||
static void FDECL(map_check_size_change, (struct xwindow *));
|
||||
static void FDECL(map_update,
|
||||
(struct xwindow *, int, int, int, int, BOOLEAN_P));
|
||||
static void FDECL(map_update, (struct xwindow *, int, int, int, int,
|
||||
BOOLEAN_P));
|
||||
static void FDECL(init_text, (struct xwindow *));
|
||||
static void FDECL(map_exposed, (Widget, XtPointer, XtPointer));
|
||||
static void FDECL(set_gc, (Widget, Font, const char *, Pixel, GC *, GC *));
|
||||
@@ -67,14 +67,14 @@ static void FDECL(get_text_gc, (struct xwindow *, Font));
|
||||
static void FDECL(get_char_info, (struct xwindow *));
|
||||
static void FDECL(display_cursor, (struct xwindow *));
|
||||
|
||||
/* Global functions ========================================================
|
||||
*/
|
||||
/* Global functions ======================================================= */
|
||||
|
||||
void
|
||||
X11_print_glyph(window, x, y, glyph, bkglyph)
|
||||
winid window;
|
||||
xchar x, y;
|
||||
int glyph, bkglyph;
|
||||
int glyph;
|
||||
int bkglyph UNUSED;
|
||||
{
|
||||
struct map_info_t *map_info;
|
||||
boolean update_bbox = FALSE;
|
||||
@@ -104,6 +104,7 @@ int glyph, bkglyph;
|
||||
#ifdef TEXTCOLOR
|
||||
register unsigned char *co_ptr;
|
||||
#endif
|
||||
|
||||
/* map glyph to character and color */
|
||||
(void) mapglyph(glyph, &och, &color, &special, x, y);
|
||||
ch = (uchar) och;
|
||||
@@ -156,8 +157,7 @@ int x, y;
|
||||
}
|
||||
#endif /* CLIPPING */
|
||||
|
||||
/* End global functions ====================================================
|
||||
*/
|
||||
/* End global functions =================================================== */
|
||||
|
||||
#include "tile2x11.h"
|
||||
|
||||
@@ -199,6 +199,7 @@ Pixel colorpixel;
|
||||
&annotation->bitmap, &annotation->hotx,
|
||||
&annotation->hoty)) {
|
||||
char buf[BUFSZ];
|
||||
|
||||
Sprintf(buf, "Failed to load %s", filename);
|
||||
X11_raw_print(buf);
|
||||
}
|
||||
@@ -327,10 +328,9 @@ struct xwindow *wp;
|
||||
/* assume a fixed number of tiles per row */
|
||||
if (tile_image->width % TILES_PER_ROW != 0
|
||||
|| tile_image->width <= TILES_PER_ROW) {
|
||||
Sprintf(
|
||||
buf,
|
||||
"%s is not a multiple of %d (number of tiles/row) pixels wide",
|
||||
appResources.tile_file, TILES_PER_ROW);
|
||||
Sprintf(buf,
|
||||
"%s is not a multiple of %d (number of tiles/row) pixels wide",
|
||||
appResources.tile_file, TILES_PER_ROW);
|
||||
X11_raw_print(buf);
|
||||
XDestroyImage(tile_image);
|
||||
tile_image = 0;
|
||||
@@ -348,7 +348,7 @@ struct xwindow *wp;
|
||||
}
|
||||
tile_width = image_width / TILES_PER_ROW;
|
||||
tile_height = image_height / (tile_count / TILES_PER_ROW);
|
||||
#else
|
||||
#else /* !USE_XPM */
|
||||
/* any less than 16 colours makes tiles useless */
|
||||
ddepth = DefaultDepthOfScreen(screen);
|
||||
if (ddepth < 4) {
|
||||
@@ -377,11 +377,11 @@ struct xwindow *wp;
|
||||
result = FALSE;
|
||||
goto tiledone;
|
||||
}
|
||||
|
||||
#ifdef VERBOSE
|
||||
fprintf(stderr, "X11 tile file:\n version %ld\n ncolors %ld\n "
|
||||
"tile width %ld\n tile height %ld\n per row %ld\n "
|
||||
" ntiles %ld\n",
|
||||
fprintf(stderr, "\
|
||||
X11 tile file:\n version %ld\n ncolors %ld\n \
|
||||
tile width %ld\n tile height %ld\n per row %ld\n \
|
||||
ntiles %ld\n",
|
||||
header.version, header.ncolors, header.tile_width,
|
||||
header.tile_height, header.per_row, header.ntiles);
|
||||
#endif
|
||||
@@ -458,15 +458,15 @@ struct xwindow *wp;
|
||||
else
|
||||
bitmap_pad = 8;
|
||||
|
||||
tile_image =
|
||||
XCreateImage(dpy, DefaultVisualOfScreen(screen), ddepth, /* depth */
|
||||
ZPixmap, /* format */
|
||||
0, /* offset */
|
||||
0, /* data */
|
||||
image_width, /* width */
|
||||
image_height, /* height */
|
||||
bitmap_pad, /* bit pad */
|
||||
0); /* bytes_per_line */
|
||||
tile_image = XCreateImage(dpy, DefaultVisualOfScreen(screen),
|
||||
ddepth, /* depth */
|
||||
ZPixmap, /* format */
|
||||
0, /* offset */
|
||||
(char *) 0, /* data */
|
||||
image_width, /* width */
|
||||
image_height, /* height */
|
||||
bitmap_pad, /* bit pad */
|
||||
0); /* bytes_per_line */
|
||||
|
||||
if (!tile_image)
|
||||
impossible("init_tiles: insufficient memory to create image");
|
||||
@@ -499,9 +499,9 @@ struct xwindow *wp;
|
||||
for (x = 0; x < (int) image_width; x++, tb++)
|
||||
XPutPixel(tile_image, x, y, colors[*tb].pixel);
|
||||
}
|
||||
#endif /* USE_XPM */
|
||||
#endif /* ?USE_XPM */
|
||||
|
||||
/* fake an inverted tile by drawing a border around the edges */
|
||||
/* fake an inverted tile by drawing a border around the edges */
|
||||
#ifdef USE_WHITE
|
||||
/* use white or black as the border */
|
||||
mask = GCFunction | GCForeground | GCGraphicsExposures;
|
||||
@@ -872,7 +872,7 @@ struct xwindow *wp;
|
||||
/* changed map display mode, re-display the full map */
|
||||
(void) memset((genericptr_t) map_info->t_start, (char) 0,
|
||||
sizeof(map_info->t_start));
|
||||
(void) memset((genericptr_t) map_info->t_stop, (char) COLNO - 1,
|
||||
(void) memset((genericptr_t) map_info->t_stop, (char) (COLNO - 1),
|
||||
sizeof(map_info->t_stop));
|
||||
map_info->is_tile = iflags.wc_tiled_map && !Is_rogue_level(&u.uz);
|
||||
XClearWindow(XtDisplay(wp->w), XtWindow(wp->w));
|
||||
@@ -911,9 +911,8 @@ static void
|
||||
map_all_stone(map_info)
|
||||
struct map_info_t *map_info;
|
||||
{
|
||||
int x,y;
|
||||
unsigned short *sp, stone;
|
||||
stone = cmap_to_glyph(S_stone);
|
||||
int x, y;
|
||||
unsigned short stone = cmap_to_glyph(S_stone);
|
||||
|
||||
for (x = 0; x < COLNO; x++)
|
||||
for (y = 0; y < ROWNO; y++) {
|
||||
@@ -1122,8 +1121,8 @@ unsigned int button;
|
||||
click_y = y / map_info->text_map.square_height;
|
||||
}
|
||||
|
||||
/* The values can be out of range if the map window has been resized */
|
||||
/* to be larger than the max size. */
|
||||
/* The values can be out of range if the map window has been resized
|
||||
to be larger than the max size. */
|
||||
if (click_x >= COLNO)
|
||||
click_x = COLNO - 1;
|
||||
if (click_y >= ROWNO)
|
||||
@@ -1202,8 +1201,8 @@ XtPointer widget_data; /* expose event from Window widget */
|
||||
t_width, start_row, stop_row, start_col, stop_col);
|
||||
#endif
|
||||
|
||||
/* Out of range values are possible if the map window is resized to be */
|
||||
/* bigger than the largest expected value. */
|
||||
/* Out of range values are possible if the map window is resized to be
|
||||
bigger than the largest expected value. */
|
||||
if (stop_row >= ROWNO)
|
||||
stop_row = ROWNO - 1;
|
||||
if (stop_col >= COLNO)
|
||||
@@ -1294,8 +1293,9 @@ boolean inverted;
|
||||
XSetClipMask(dpy, tile_map->black_gc,
|
||||
pile_annotation.bitmap);
|
||||
XCopyPlane(dpy, pile_annotation.bitmap, XtWindow(wp->w),
|
||||
tile_map->black_gc, 0, 0, pile_annotation.width,
|
||||
pile_annotation.height, dest_x, dest_y, 1);
|
||||
tile_map->black_gc, 0, 0,
|
||||
pile_annotation.width, pile_annotation.height,
|
||||
dest_x, dest_y, 1);
|
||||
XSetClipOrigin(dpy, tile_map->black_gc, 0, 0);
|
||||
XSetClipMask(dpy, tile_map->black_gc, None);
|
||||
XSetForeground(dpy, tile_map->black_gc,
|
||||
@@ -1305,19 +1305,20 @@ boolean inverted;
|
||||
}
|
||||
|
||||
if (inverted) {
|
||||
XDrawRectangle(
|
||||
XtDisplay(wp->w), XtWindow(wp->w),
|
||||
XDrawRectangle(XtDisplay(wp->w), XtWindow(wp->w),
|
||||
#ifdef USE_WHITE
|
||||
/* kludge for white square... */
|
||||
tile_map->glyphs[start_row][start_col].glyph == cmap_to_glyph(S_ice)
|
||||
? tile_map->black_gc
|
||||
: tile_map->white_gc,
|
||||
/* kludge for white square... */
|
||||
(tile_map->glyphs[start_row][start_col].glyph
|
||||
== cmap_to_glyph(S_ice))
|
||||
? tile_map->black_gc
|
||||
: tile_map->white_gc,
|
||||
#else
|
||||
tile_map->white_gc,
|
||||
tile_map->white_gc,
|
||||
#endif
|
||||
start_col * tile_map->square_width,
|
||||
start_row * tile_map->square_height,
|
||||
tile_map->square_width - 1, tile_map->square_height - 1);
|
||||
start_col * tile_map->square_width,
|
||||
start_row * tile_map->square_height,
|
||||
tile_map->square_width - 1,
|
||||
tile_map->square_height - 1);
|
||||
}
|
||||
} else {
|
||||
struct text_map_info_t *text_map = &map_info->text_map;
|
||||
@@ -1366,20 +1367,22 @@ boolean inverted;
|
||||
{
|
||||
int win_row, win_xstart;
|
||||
|
||||
/* We always start at the same x window position and have */
|
||||
/* the same character count. */
|
||||
/* We always start at the same x window position and have
|
||||
the same character count. */
|
||||
win_xstart = text_map->square_lbearing
|
||||
+ (win_start_col * text_map->square_width);
|
||||
count = stop_col - start_col + 1;
|
||||
|
||||
for (row = start_row, win_row = win_start_row; row <= stop_row;
|
||||
row++, win_row++) {
|
||||
XDrawImageString(
|
||||
XtDisplay(wp->w), XtWindow(wp->w),
|
||||
inverted ? text_map->inv_copy_gc : text_map->copy_gc,
|
||||
win_xstart, text_map->square_ascent
|
||||
XDrawImageString(XtDisplay(wp->w), XtWindow(wp->w),
|
||||
inverted ? text_map->inv_copy_gc
|
||||
: text_map->copy_gc,
|
||||
win_xstart,
|
||||
text_map->square_ascent
|
||||
+ (win_row * text_map->square_height),
|
||||
(char *) &(text_map->text[row][start_col]), count);
|
||||
(char *) &(text_map->text[row][start_col]),
|
||||
count);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1432,7 +1435,7 @@ static char map_translations[] = "#override\n\
|
||||
<Key>Right: scroll(6)\n\
|
||||
<Key>Up: scroll(8)\n\
|
||||
<Key>Down: scroll(2)\n\
|
||||
<Key>: input() \
|
||||
<Key>: input() \
|
||||
";
|
||||
|
||||
/*
|
||||
@@ -1463,8 +1466,9 @@ Widget parent;
|
||||
XtSetArg(args[num_args], XtNinput, False);
|
||||
num_args++;
|
||||
|
||||
wp->popup = parent = XtCreatePopupShell(
|
||||
"nethack", topLevelShellWidgetClass, toplevel, args, num_args);
|
||||
wp->popup = parent = XtCreatePopupShell("nethack",
|
||||
topLevelShellWidgetClass,
|
||||
toplevel, args, num_args);
|
||||
/*
|
||||
* If we're here, then this is an auxiliary map window. If we're
|
||||
* cancelled via a delete window message, we should just pop down.
|
||||
@@ -1476,18 +1480,20 @@ Widget parent;
|
||||
num_args++;
|
||||
XtSetArg(args[num_args], XtNallowVert, True);
|
||||
num_args++;
|
||||
/* XtSetArg(args[num_args], XtNforceBars, True); num_args++; */
|
||||
#if 0
|
||||
XtSetArg(args[num_args], XtNforceBars, True);
|
||||
num_args++;
|
||||
#endif
|
||||
XtSetArg(args[num_args], XtNuseBottom, True);
|
||||
num_args++;
|
||||
XtSetArg(args[num_args], XtNtranslations,
|
||||
XtParseTranslationTable(map_translations));
|
||||
num_args++;
|
||||
viewport = XtCreateManagedWidget(
|
||||
"map_viewport", /* name */
|
||||
viewportWidgetClass, /* widget class from Window.h */
|
||||
parent, /* parent widget */
|
||||
args, /* set some values */
|
||||
num_args); /* number of values to set */
|
||||
viewport = XtCreateManagedWidget("map_viewport", /* name */
|
||||
viewportWidgetClass, /* from Window.h */
|
||||
parent, /* parent widget */
|
||||
args, /* set some values */
|
||||
num_args); /* number of values to set */
|
||||
|
||||
/*
|
||||
* Create a map window. We need to set the width and height to some
|
||||
@@ -1607,13 +1613,15 @@ struct xwindow *wp;
|
||||
}
|
||||
|
||||
boolean exit_x_event; /* exit condition for the event loop */
|
||||
/*******
|
||||
|
||||
#if 0 /*******/
|
||||
void
|
||||
pkey(k)
|
||||
int k;
|
||||
int k;
|
||||
{
|
||||
printf("key = '%s%c'\n", (k<32) ? "^":"", (k<32) ? '@'+k : k);
|
||||
printf("key = '%s%c'\n", (k < 32) ? "^" : "", (k < 32) ? '@' + k : k);
|
||||
}
|
||||
******/
|
||||
#endif /***0***/
|
||||
|
||||
/*
|
||||
* Main X event loop. Here we accept and dispatch X events. We only exit
|
||||
@@ -1650,6 +1658,7 @@ int exit_condition;
|
||||
switch (exit_condition) {
|
||||
case EXIT_ON_SENT_EVENT: {
|
||||
XAnyEvent *any = (XAnyEvent *) &event;
|
||||
|
||||
if (any->send_event) {
|
||||
retval = 0;
|
||||
keep_going = FALSE;
|
||||
|
||||
+4
-2
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 tilemap.c $NHDT-Date: 1432512803 2015/05/25 00:13:23 $ $NHDT-Branch: master $:$NHDT-Revision: 1.24 $ */
|
||||
/* NetHack 3.6 tilemap.c $NHDT-Date: 1447306925 2015/11/12 05:42:05 $ $NHDT-Branch: master $:$NHDT-Revision: 1.25 $ */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
/*
|
||||
@@ -28,6 +28,8 @@ extern void FDECL(exit, (int));
|
||||
#define OBJ_GLYPH 2
|
||||
#define OTH_GLYPH 3 /* fortunately unnecessary */
|
||||
|
||||
#define EXTRA_SCROLL_DESCR_COUNT ((SCR_BLANK_PAPER - SCR_STINKING_CLOUD) - 1)
|
||||
|
||||
/* note that the ifdefs here should be the opposite sense from monst.c/
|
||||
* objects.c/rm.h
|
||||
*/
|
||||
@@ -64,7 +66,7 @@ struct conditionals {
|
||||
* don't know what a slime mold should look like when renamed anyway
|
||||
*/
|
||||
#ifndef MAIL
|
||||
{ OBJ_GLYPH, SCR_STINKING_CLOUD + 4, "stamped / mail" },
|
||||
{ OBJ_GLYPH, SCR_STINKING_CLOUD + EXTRA_SCROLL_DESCR_COUNT, "stamped / mail" },
|
||||
#endif
|
||||
{ 0, 0, 0 }
|
||||
};
|
||||
|
||||
+43
-36
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 termcap.c $NHDT-Date: 1446856761 2015/11/07 00:39:21 $ $NHDT-Branch: master $:$NHDT-Revision: 1.22 $ */
|
||||
/* NetHack 3.6 termcap.c $NHDT-Date: 1447234979 2015/11/11 09:42:59 $ $NHDT-Branch: master $:$NHDT-Revision: 1.23 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -30,8 +30,7 @@ static void NDECL(init_hilite);
|
||||
static void NDECL(kill_hilite);
|
||||
#endif
|
||||
|
||||
/* (see tcap.h) -- nh_CM, nh_ND, nh_CD, nh_HI,nh_HE, nh_US,nh_UE,
|
||||
ul_hack */
|
||||
/* (see tcap.h) -- nh_CM, nh_ND, nh_CD, nh_HI,nh_HE, nh_US,nh_UE, ul_hack */
|
||||
struct tc_lcl_data tc_lcl_data = { 0, 0, 0, 0, 0, 0, 0, FALSE };
|
||||
|
||||
STATIC_VAR char *HO, *CL, *CE, *UP, *XD, *BC, *SO, *SE, *TI, *TE;
|
||||
@@ -44,6 +43,7 @@ STATIC_VAR char *MD; /* may already be in use below */
|
||||
#endif
|
||||
|
||||
#ifdef TERMLIB
|
||||
boolean dynamic_HIHE = FALSE;
|
||||
#ifdef TEXTCOLOR
|
||||
STATIC_VAR char *MD;
|
||||
#endif
|
||||
@@ -152,9 +152,9 @@ int *wid, *hgt;
|
||||
nh_US = "\033[4m";
|
||||
MR = "\033[7m";
|
||||
TI = nh_HE = ME = SE = nh_UE = "\033[0m";
|
||||
/* strictly, SE should be 2, and nh_UE should be 24,
|
||||
but we can't trust all ANSI emulators to be
|
||||
that complete. -3. */
|
||||
/* strictly, SE should be 2, and nh_UE should be 24,
|
||||
but we can't trust all ANSI emulators to be
|
||||
that complete. -3. */
|
||||
#ifndef MICRO
|
||||
AS = "\016";
|
||||
AE = "\017";
|
||||
@@ -221,11 +221,11 @@ int *wid, *hgt;
|
||||
#else
|
||||
HO = Tgetstr("ho");
|
||||
#endif
|
||||
/*
|
||||
* LI and CO are set in ioctl.c via a TIOCGWINSZ if available. If
|
||||
* the kernel has values for either we should use them rather than
|
||||
* the values from TERMCAP ...
|
||||
*/
|
||||
/*
|
||||
* LI and CO are set in ioctl.c via a TIOCGWINSZ if available. If
|
||||
* the kernel has values for either we should use them rather than
|
||||
* the values from TERMCAP ...
|
||||
*/
|
||||
#ifndef MICRO
|
||||
if (!CO)
|
||||
CO = tgetnum("co");
|
||||
@@ -233,18 +233,17 @@ int *wid, *hgt;
|
||||
LI = tgetnum("li");
|
||||
#else
|
||||
#if defined(TOS) && defined(__GNUC__)
|
||||
if (!strcmp(term, "builtin"))
|
||||
if (!strcmp(term, "builtin")) {
|
||||
get_scr_size();
|
||||
else {
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
CO = tgetnum("co");
|
||||
LI = tgetnum("li");
|
||||
if (!LI || !CO) /* if we don't override it */
|
||||
get_scr_size();
|
||||
#if defined(TOS) && defined(__GNUC__)
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif /* ?MICRO */
|
||||
#ifdef CLIPPING
|
||||
if (CO < COLNO || LI < ROWNO + 3)
|
||||
setclipped();
|
||||
@@ -298,16 +297,14 @@ int *wid, *hgt;
|
||||
* pager as a string - so how can you send it NULs???
|
||||
* -jsb
|
||||
*/
|
||||
nh_HI = (char *) alloc((unsigned) (strlen(SO) + 1));
|
||||
nh_HE = (char *) alloc((unsigned) (strlen(ME) + 1));
|
||||
i = 0;
|
||||
while (digit(SO[i]))
|
||||
i++;
|
||||
Strcpy(nh_HI, &SO[i]);
|
||||
i = 0;
|
||||
while (digit(ME[i]))
|
||||
i++;
|
||||
Strcpy(nh_HE, &ME[i]);
|
||||
for (i = 0; digit(SO[i]); ++i)
|
||||
continue;
|
||||
nh_HI = dupstr(&SO[i]);
|
||||
for (i = 0; digit(ME[i]); ++i)
|
||||
continue;
|
||||
nh_HE = dupstr(&ME[i]);
|
||||
dynamic_HIHE = TRUE;
|
||||
|
||||
AS = Tgetstr("as");
|
||||
AE = Tgetstr("ae");
|
||||
nh_CD = Tgetstr("cd");
|
||||
@@ -340,10 +337,17 @@ int *wid, *hgt;
|
||||
void
|
||||
tty_shutdown()
|
||||
{
|
||||
#if defined(TEXTCOLOR) && defined(TERMLIB)
|
||||
/* we only attempt to clean up a few individual termcap variables */
|
||||
#ifdef TERMLIB
|
||||
#ifdef TEXTCOLOR
|
||||
kill_hilite();
|
||||
#endif
|
||||
/* we don't attempt to clean up individual termcap variables [yet?] */
|
||||
if (dynamic_HIHE) {
|
||||
free((genericptr_t) nh_HI), nh_HI = (char *) 0;
|
||||
free((genericptr_t) nh_HE), nh_HE = (char *) 0;
|
||||
dynamic_HIHE = FALSE;
|
||||
}
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -570,7 +574,8 @@ register int x, y;
|
||||
}
|
||||
|
||||
/* See note above. xputc() is a special function. */
|
||||
void xputc(c)
|
||||
void
|
||||
xputc(c)
|
||||
#if defined(apollo)
|
||||
int c;
|
||||
#else
|
||||
@@ -758,7 +763,7 @@ tty_delay_output()
|
||||
#else /* MICRO */
|
||||
/* BUG: if the padding character is visible, as it is on the 5620
|
||||
then this looks terrible. */
|
||||
if (flags.null)
|
||||
if (flags.null) {
|
||||
#ifdef TERMINFO
|
||||
/* cbosgd!cbcephus!pds for SYS V R2 */
|
||||
#ifdef NHSTDC
|
||||
@@ -774,7 +779,7 @@ tty_delay_output()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
else if (ospeed > 0 && ospeed < SIZE(tmspc10) && nh_CM) {
|
||||
} else if (ospeed > 0 && ospeed < SIZE(tmspc10) && nh_CM) {
|
||||
/* delay by sending cm(here) an appropriate number of times */
|
||||
register int cmlen =
|
||||
strlen(tgoto(nh_CM, ttyDisplay->curx, ttyDisplay->cury));
|
||||
@@ -788,13 +793,15 @@ tty_delay_output()
|
||||
#endif /* MICRO */
|
||||
}
|
||||
|
||||
void cl_eos() /* free after Robert Viduya */
|
||||
{ /* must only be called with curx = 1 */
|
||||
|
||||
if (nh_CD)
|
||||
/* must only be called with curx = 1 */
|
||||
void
|
||||
cl_eos() /* free after Robert Viduya */
|
||||
{
|
||||
if (nh_CD) {
|
||||
xputs(nh_CD);
|
||||
else {
|
||||
} else {
|
||||
register int cy = ttyDisplay->cury + 1;
|
||||
|
||||
while (cy <= LI - 2) {
|
||||
cl_end();
|
||||
xputc('\n');
|
||||
|
||||
+61
-39
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 wintty.c $NHDT-Date: 1446856765 2015/11/07 00:39:25 $ $NHDT-Branch: master $:$NHDT-Revision: 1.110 $ */
|
||||
/* NetHack 3.6 wintty.c $NHDT-Date: 1447630543 2015/11/15 23:35:43 $ $NHDT-Branch: master $:$NHDT-Revision: 1.115 $ */
|
||||
/* Copyright (c) David Cohrs, 1991 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1189,17 +1189,36 @@ const char *str;
|
||||
winid i;
|
||||
|
||||
tty_suspend_nhwindows(str);
|
||||
/* Just forget any windows existed, since we're about to exit anyway.
|
||||
/*
|
||||
* Disable windows to avoid calls to window routines.
|
||||
*/
|
||||
for (i = 0; i < MAXWIN; i++)
|
||||
if (wins[i] && (i != BASE_WINDOW)) {
|
||||
free_pickinv_cache(); /* reset its state as well as tear down window */
|
||||
for (i = 0; i < MAXWIN; i++) {
|
||||
if (i == BASE_WINDOW)
|
||||
continue; /* handle wins[BASE_WINDOW] last */
|
||||
if (wins[i]) {
|
||||
#ifdef FREE_ALL_MEMORY
|
||||
free_window_info(wins[i], TRUE);
|
||||
free((genericptr_t) wins[i]);
|
||||
#endif
|
||||
wins[i] = 0;
|
||||
wins[i] = (struct WinDesc *) 0;
|
||||
}
|
||||
}
|
||||
WIN_MAP = WIN_MESSAGE = WIN_INVEN = WIN_ERR; /* these are all gone now */
|
||||
#ifndef STATUS_VIA_WINDOWPORT
|
||||
WIN_STATUS = WIN_ERR;
|
||||
#endif
|
||||
#ifdef FREE_ALL_MEMORY
|
||||
if (BASE_WINDOW != WIN_ERR && wins[BASE_WINDOW]) {
|
||||
free_window_info(wins[BASE_WINDOW], TRUE);
|
||||
free((genericptr_t) wins[BASE_WINDOW]);
|
||||
wins[BASE_WINDOW] = (struct WinDesc *) 0;
|
||||
BASE_WINDOW = WIN_ERR;
|
||||
}
|
||||
free((genericptr_t) ttyDisplay);
|
||||
ttyDisplay = (struct DisplayDesc *) 0;
|
||||
#endif
|
||||
|
||||
#ifndef NO_TERMS /*(until this gets added to the window interface)*/
|
||||
tty_shutdown(); /* cleanup termcap/terminfo/whatever */
|
||||
#endif
|
||||
@@ -1298,9 +1317,10 @@ int type;
|
||||
newwin->datlen =
|
||||
(short *) alloc(sizeof(short) * (unsigned) newwin->maxrow);
|
||||
if (newwin->maxcol) {
|
||||
/* WIN_STATUS */
|
||||
for (i = 0; i < newwin->maxrow; i++) {
|
||||
newwin->data[i] = (char *) alloc((unsigned) newwin->maxcol);
|
||||
newwin->datlen[i] = newwin->maxcol;
|
||||
newwin->datlen[i] = (short) newwin->maxcol;
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < newwin->maxrow; i++) {
|
||||
@@ -2017,6 +2037,7 @@ winid window;
|
||||
boolean blocking; /* with ttys, all windows are blocking */
|
||||
{
|
||||
register struct WinDesc *cw = 0;
|
||||
short s_maxcol;
|
||||
|
||||
if (window == WIN_ERR || (cw = wins[window]) == (struct WinDesc *) 0)
|
||||
panic(winpanicstr, window);
|
||||
@@ -2053,15 +2074,18 @@ boolean blocking; /* with ttys, all windows are blocking */
|
||||
/*FALLTHRU*/
|
||||
case NHW_MENU:
|
||||
cw->active = 1;
|
||||
/* cw->maxcol is a long, but its value is constrained to
|
||||
be <= ttyDisplay->cols, so is sure to fit within a short */
|
||||
s_maxcol = (short) cw->maxcol;
|
||||
#ifdef H2344_BROKEN
|
||||
cw->offx = (cw->type == NHW_TEXT)
|
||||
? 0
|
||||
: min(min(82, ttyDisplay->cols / 2),
|
||||
ttyDisplay->cols - cw->maxcol - 1);
|
||||
ttyDisplay->cols - s_maxcol - 1);
|
||||
#else
|
||||
/* avoid converting to uchar before calculations are finished */
|
||||
cw->offx = (uchar)(int) max(
|
||||
(int) 10, (int) (ttyDisplay->cols - cw->maxcol - 1));
|
||||
cw->offx = (uchar) max((int) 10,
|
||||
(int) (ttyDisplay->cols - s_maxcol - 1));
|
||||
#endif
|
||||
if (cw->offx < 0)
|
||||
cw->offx = 0;
|
||||
@@ -3008,7 +3032,8 @@ void
|
||||
tty_print_glyph(window, x, y, glyph, bkglyph)
|
||||
winid window;
|
||||
xchar x, y;
|
||||
int glyph, bkglyph;
|
||||
int glyph;
|
||||
int bkglyph UNUSED;
|
||||
{
|
||||
int ch;
|
||||
boolean reverse_on = FALSE;
|
||||
@@ -3298,12 +3323,12 @@ genericptr_t ptr;
|
||||
long cond, *condptr = (long *) ptr;
|
||||
register int i;
|
||||
char *text = (char *) ptr;
|
||||
/* Mapping BL attributes to tty attributes
|
||||
* BL_HILITE_NONE -1 + 3 = 2 (statusattr[2])
|
||||
* BL_HILITE_INVERSE -2 + 3 = 1 (statusattr[1])
|
||||
* BL_HILITE_BOLD -3 + 3 = 0 (statusattr[0])
|
||||
*/
|
||||
int statusattr[] = {ATR_BOLD, ATR_INVERSE, ATR_NONE};
|
||||
/* Mapping BL attributes to tty attributes
|
||||
* BL_HILITE_NONE -1 + 3 = 2 (statusattr[2])
|
||||
* BL_HILITE_INVERSE -2 + 3 = 1 (statusattr[1])
|
||||
* BL_HILITE_BOLD -3 + 3 = 0 (statusattr[0])
|
||||
*/
|
||||
int statusattr[] = { ATR_BOLD, ATR_INVERSE, ATR_NONE };
|
||||
int attridx = 0;
|
||||
long value = -1L;
|
||||
static boolean beenhere = FALSE;
|
||||
@@ -3342,18 +3367,16 @@ genericptr_t ptr;
|
||||
default:
|
||||
value = atol(text);
|
||||
Sprintf(status_vals[fldidx],
|
||||
status_fieldfmt[fldidx] ? status_fieldfmt[fldidx] :
|
||||
"%s", text);
|
||||
status_fieldfmt[fldidx] ? status_fieldfmt[fldidx] : "%s",
|
||||
text);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef STATUS_HILITES
|
||||
switch (tty_status_hilites[fldidx].behavior) {
|
||||
switch (tty_status_hilites[fldidx].behavior) {
|
||||
case BL_TH_NONE:
|
||||
tty_status_colors[fldidx] = NO_COLOR;
|
||||
break;
|
||||
|
||||
case BL_TH_UPDOWN:
|
||||
if (chg > 0)
|
||||
tty_status_colors[fldidx] = tty_status_hilites[fldidx].over;
|
||||
@@ -3362,29 +3385,27 @@ genericptr_t ptr;
|
||||
else
|
||||
tty_status_colors[fldidx] = NO_COLOR;
|
||||
break;
|
||||
|
||||
case BL_TH_VAL_PERCENTAGE:
|
||||
{
|
||||
case BL_TH_VAL_PERCENTAGE: {
|
||||
int pct_th = 0;
|
||||
|
||||
if (tty_status_hilites[fldidx].thresholdtype != ANY_INT) {
|
||||
impossible(
|
||||
"tty_status_update: unsupported percentage threshold type %d",
|
||||
tty_status_hilites[fldidx].thresholdtype);
|
||||
break;
|
||||
} else {
|
||||
pct_th = tty_status_hilites[fldidx].threshold.a_int;
|
||||
tty_status_colors[fldidx] = (percent >= pct_th)
|
||||
? tty_status_hilites[fldidx].over
|
||||
: tty_status_hilites[fldidx].under;
|
||||
}
|
||||
pct_th = tty_status_hilites[fldidx].threshold.a_int;
|
||||
tty_status_colors[fldidx] = (percent >= pct_th)
|
||||
? tty_status_hilites[fldidx].over
|
||||
: tty_status_hilites[fldidx].under;
|
||||
}
|
||||
break;
|
||||
|
||||
case BL_TH_VAL_ABSOLUTE:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case BL_TH_VAL_ABSOLUTE: {
|
||||
int c = NO_COLOR;
|
||||
int o = tty_status_hilites[fldidx].over;
|
||||
int u = tty_status_hilites[fldidx].under;
|
||||
anything *t = &tty_status_hilites[fldidx].threshold;
|
||||
|
||||
switch (tty_status_hilites[fldidx].thresholdtype) {
|
||||
case ANY_LONG:
|
||||
c = (value >= t->a_long) ? o : u;
|
||||
@@ -3404,14 +3425,15 @@ genericptr_t ptr;
|
||||
default:
|
||||
impossible(
|
||||
"tty_status_update: unsupported absolute threshold type %d\n",
|
||||
tty_status_hilites[fldidx].thresholdtype);
|
||||
break;
|
||||
tty_status_hilites[fldidx].thresholdtype);
|
||||
break;
|
||||
}
|
||||
tty_status_colors[fldidx] = c;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
} /* case */
|
||||
} /* switch */
|
||||
#endif /* STATUS_HILITES */
|
||||
}
|
||||
|
||||
/* For now, this version copied from the genl_ version currently
|
||||
* updates everything on the display, everytime
|
||||
|
||||
Reference in New Issue
Block a user