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.
|
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.
|
You probably want to set up a credential cache.
|
||||||
Mac OS X:
|
Mac OS X:
|
||||||
git config --global credential.helper osxkeychain
|
git config --global credential.helper osxkeychain
|
||||||
XXX windows
|
Windows:
|
||||||
|
git config --global credential.helper store
|
||||||
XXX linux
|
XXX linux
|
||||||
B. Specify the prefix for variable substitution:
|
B. Specify the prefix for variable substitution:
|
||||||
(This assumes you are not a member of DevTeam or any variant's development
|
(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 in top directory)
|
||||||
Files Porting README
|
DEVEL Files Porting README
|
||||||
|
|
||||||
dat:
|
dat:
|
||||||
(files for all versions)
|
(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
|
petmark.uu pilemark.uu resource.h rip.uu splash.uu
|
||||||
tiles.mak winMS.h winhack.c winhack.rc
|
tiles.mak winMS.h winhack.c winhack.rc
|
||||||
(files for Visual Studio 2010 Express Edition builds)
|
(files for Visual Studio 2010 Express Edition builds)
|
||||||
dgncomp.vcxproj dgnstuff.vcxproj dgnstuff.mak dlb_main.vcxproj levcomp.vcxproj
|
dgncomp.vcxproj dgnstuff.vcxproj dgnstuff.mak dlb_main.vcxproj
|
||||||
levstuff.vcxproj levstuff.mak makedefs.vcxproj NetHack.sln uudecode.vcxproj
|
levcomp.vcxproj levstuff.vcxproj levstuff.mak makedefs.vcxproj
|
||||||
NetHackW.vcxproj tile2bmp.vcxproj recover.vcxproj tilemap.vcxproj tiles.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
|
This is a list of files produced by auxiliary programs. They can all be
|
||||||
regenerated from the files in the distribution.
|
regenerated from the files in the distribution.
|
||||||
@@ -352,6 +353,21 @@ tiletxt.c
|
|||||||
(files generated for win32 at compile time)
|
(files generated for win32 at compile time)
|
||||||
uudecode.exe
|
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)
|
(files for win32 that are moved into . at compile time)
|
||||||
nethack.dsw
|
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,
|
for particular windowing environments. Reading them, and the man pages,
|
||||||
should answer most of your questions.
|
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
|
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
|
Intel 80386 or greater (or clone) boxes running Linux, or BSDI
|
||||||
Mac OS X 10.9
|
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
|
Previous versions of NetHack were tested and known to run on the
|
||||||
following systems, but it is unknown if they can still build and
|
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
|
Sun SPARC based machine running SunOS 4.x, Solaris 2.x, or Solaris 7
|
||||||
Valid Logic Systems SCALD-System
|
Valid Logic Systems SCALD-System
|
||||||
|
|
||||||
Previous versions, using a cross-compiler hosted on another platform, such as
|
Previous versions, using a cross-compiler hosted on another platform,
|
||||||
win32, could also build the following from source:
|
such as win32, could also build the following from source:
|
||||||
Pocket PC devices running Windows CE 3.0 and higher
|
Pocket PC devices running Windows CE 3.0 and higher
|
||||||
H/PC Pro devices running Windows CE 2.11 and higher
|
H/PC Pro devices running Windows CE 2.11 and higher
|
||||||
Palm Size PC 1.1 devices running Windows CE 2.11
|
Palm Size PC 1.1 devices running Windows CE 2.11
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ oracles
|
|||||||
data
|
data
|
||||||
rip.xpm
|
rip.xpm
|
||||||
pet_mark.xbm
|
pet_mark.xbm
|
||||||
|
pilemark.xbm
|
||||||
quest.dat
|
quest.dat
|
||||||
rumors
|
rumors
|
||||||
bogusmon
|
bogusmon
|
||||||
|
|||||||
+26
-20
@@ -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
|
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
|
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,
|
R. Black ported PC HACK 3.51 to Lattice(tm) C and the Atari 520/1040ST,
|
||||||
producing ST Hack 1.03.
|
producing ST Hack 1.03.
|
||||||
@@ -137,8 +138,8 @@ Dean Luick, Mark Modrall, and Kevin Hugo maintained and enhanced the
|
|||||||
Macintosh port of 3.4.
|
Macintosh port of 3.4.
|
||||||
|
|
||||||
Michael Allison, David Cohrs, Alex Kompel, Dion Nicolaas, and Yitzhak Sapir
|
Michael Allison, David Cohrs, Alex Kompel, Dion Nicolaas, and Yitzhak Sapir
|
||||||
maintained and enhanced 3.4 for the Microsoft Windows platform. Alex Kompel
|
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 new graphical interface for the Windows port. Alex Kompel also
|
||||||
contributed a Windows CE port for 3.4.1.
|
contributed a Windows CE port for 3.4.1.
|
||||||
|
|
||||||
Ron Van Iwaarden maintained 3.4 for OS/2.
|
Ron Van Iwaarden maintained 3.4 for OS/2.
|
||||||
@@ -150,21 +151,21 @@ Christian `Marvin' Bressler maintained 3.5 for the Atari after he
|
|||||||
resurrected it for 3.3.1.
|
resurrected it for 3.3.1.
|
||||||
|
|
||||||
The release of NetHack 3.4.3 in December 2003 marked the beginning of a
|
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
|
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
|
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
|
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
|
during the tenure of 3.4.3. It was during that same period that several
|
||||||
variants emerged within the NetHack community. Notably sporkhack by
|
new variants emerged within the NetHack community. Notably sporkhack by
|
||||||
Derek S. Ray, unnethack by Patric Mueller, nitrohack and its successors
|
Derek S. Ray, unnethack by Patric Mueller, nitrohack and its successors
|
||||||
originally by Daniel Thaler and then by Alex Smith, and
|
originally by Daniel Thaler and then by Alex Smith, and
|
||||||
Dynahack by Tung Nguyen. Some of those variants continue to be developed,
|
Dynahack by Tung Nguyen. Some of those variants continue to be developed,
|
||||||
maintained, and enjoyed by the community to this day.
|
maintained, and enjoyed by the community to this day.
|
||||||
|
|
||||||
In September 2014, an interim snapshot of the code under development was
|
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
|
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
|
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
|
version numbers present on that code snapshot would be retired and never
|
||||||
used in an official NetHack release. An announcement was posted on the
|
used in an official NetHack release. An announcement was posted on the
|
||||||
devteam's official nethack.org website to that effect, stating that there
|
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.
|
would never be a 3.4.4, 3.5, or 3.5.0 official release version.
|
||||||
|
|
||||||
@@ -177,10 +178,10 @@ 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.
|
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
|
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
|
version merges work done by the development team since the previous release
|
||||||
some of the beloved community patches. Many bugs were fixed and some code was
|
with some of the beloved community patches. Many bugs were fixed and some
|
||||||
restructured.
|
code was restructured.
|
||||||
|
|
||||||
The development team, as well as Steve VanDevender and Kevin Smolkowski
|
The development team, as well as Steve VanDevender and Kevin Smolkowski
|
||||||
ensured that NetHack 3.6.0 continued to operate on various Unix flavors
|
ensured that NetHack 3.6.0 continued to operate on various Unix flavors
|
||||||
@@ -192,9 +193,14 @@ of NetHack 3.6.0 for Mac.
|
|||||||
Michael Allison, Derek S. Ray, Yitzhak Sapir, Alex Kompel, Dion Nicolaas,
|
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.
|
and David Cohrs maintained the port of NetHack 3.6.0 for Microsoft Windows.
|
||||||
|
|
||||||
|
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
|
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
|
the development of 3.6, one of the significant inspirations for many of
|
||||||
humorous and fun features found in the game, author Terry Pratchett,
|
the humorous and fun features found in the game, author Terry Pratchett,
|
||||||
passed away. This version of the game includes a tribute to him.
|
passed away. This version of the game includes a tribute to him.
|
||||||
|
|
||||||
|
|
||||||
@@ -206,14 +212,14 @@ SHOUT-OUTS
|
|||||||
|
|
||||||
The devteam would like to give a special "shout-out" to thank the generous
|
The devteam would like to give a special "shout-out" to thank the generous
|
||||||
people primarily responsible for the public NetHack servers available for
|
people primarily responsible for the public NetHack servers available for
|
||||||
playing the game at nethack.alt.org and devnull.net. In addition to providing
|
playing the game at nethack.alt.org and devnull.net. In addition to
|
||||||
a way for the public to play a game of NetHack from almost anywhere, they
|
providing a way for the public to play a game of NetHack from almost
|
||||||
have hosted annual NetHack tournaments for many, many years.
|
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.
|
M. Drew Streib, Pasi Kallinen and Robin Bandy.
|
||||||
|
|
||||||
- - - - - - - - - -
|
- - - - - - - - - -
|
||||||
|
|
||||||
From time to time, some depraved individual out there in netland sends a
|
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
|
particularly intriguing modification to help out with the game. The Gods of
|
||||||
|
|||||||
@@ -1142,6 +1142,7 @@ DOOR:closed,(73,5)
|
|||||||
DOOR:closed,(2,15)
|
DOOR:closed,(2,15)
|
||||||
MAZEWALK:(36,8),west
|
MAZEWALK:(36,8),west
|
||||||
STAIR:(42,8),up
|
STAIR:(42,8),up
|
||||||
|
WALLIFY
|
||||||
|
|
||||||
# Objects
|
# Objects
|
||||||
OBJECT:('*',"diamond"),random
|
OBJECT:('*',"diamond"),random
|
||||||
|
|||||||
+541
-42
@@ -3934,14 +3934,174 @@ is 'me'?"
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
%title Going Postal (1)
|
%title Going Postal (13)
|
||||||
%passage 1
|
%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
|
[Going Postal, by Terry Pratchett]
|
||||||
snap of a finger? Where was the magic in that? It was mumbled
|
%e passage
|
||||||
words and weird drawings in old books and in the wrong hands it
|
# p. 5 (Harper Torch edition)
|
||||||
was dangerous as hell, but not one half as dangerous as it could
|
%passage 2
|
||||||
be in the right hands.
|
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]
|
[Going Postal, by Terry Pratchett]
|
||||||
%e passage
|
%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
|
%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]
|
[Thud!, by Terry Pratchett]
|
||||||
%e passage
|
%e passage
|
||||||
|
# pp. 334-336 (originally transcribed from some other edition)
|
||||||
%passage 2
|
%passage 2
|
||||||
#submitted by Boudewijn
|
He wanted to sleep. He'd never felt this tired before. Vimes slumped to
|
||||||
He wanted to sleep. He'd never felt this tired before.
|
his knees, and then fell sideways on to the sand.
|
||||||
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
|
When he forced his eyes open, he saw pale stars above him, and had, once
|
||||||
again the sensation that there was someone else present.
|
again, the sensation that there was someone else present.
|
||||||
|
|
||||||
He turned his head, wincing at the stab of pain, and saw a small but
|
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
|
brightly lit folding chair on the sand. A robed figure was reclining in
|
||||||
in it, reading a book. A scythe was stuck in the sand beside it.
|
it, reading a book. A scythe was stuck in the sand beside it.
|
||||||
A white skeletal hand turned a page.
|
|
||||||
|
A white, skeletal hand turned a page.
|
||||||
|
|
||||||
'You'll be Death, then?' said Vimes, after a while.
|
'You'll be Death, then?' said Vimes, after a while.
|
||||||
|
|
||||||
AH. MISTER VIMES, ASTUTE AS EVER. GOT IT IN ONE, said Death, shutting
|
AH, MISTER VIMES, ASTUTE AS EVER. GOT IT IN ONE, said Death, shutting the
|
||||||
the book on his finger to keep the place.
|
book on his finger to keep the place.
|
||||||
|
|
||||||
'I've seen you before.'
|
'I've seen you before.'
|
||||||
|
|
||||||
@@ -3976,42 +4141,122 @@ I HAVE WALKED WITH YOU MANY TIMES, MISTER VIMES.
|
|||||||
|
|
||||||
'And this is /it/, is it?'
|
'And this is /it/, is it?'
|
||||||
|
|
||||||
HAS IT NEVER STRUCK YOU THAT THE CONCEPT OF A WRITTEN NARRATIVE IS
|
HAS IT NEVER STRUCK YOU THAT THE CONCEPT OF A WRITTEN NARRATIVE IS SOMEWHAT
|
||||||
SOMEWHAT STRANGE? said Death.
|
STRANGE? said Death.
|
||||||
|
|
||||||
Vimes could tell when people were trying to avoid something they really
|
Vimes could tell when people were trying to avoid something they really
|
||||||
didn't want to say, and it was happening here.
|
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.
|
||||||
|
|
||||||
'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,
|
A VERY ACCURATE ONE. YOU SEE, YOU ARE HAVING A NEAR-DEATH EXPERIENCE,
|
||||||
WHICH INESCAPABLY MEANS THAT I MUST UNDERGO A NEAR VIMES 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.
|
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.
|
'Shouldn't you be somewhere else?' he said.
|
||||||
|
|
||||||
I AM, said Death, sitting down again.
|
I AM, said Death, sitting down again.
|
||||||
|
|
||||||
'But you're here!'
|
'But you're here!'
|
||||||
|
|
||||||
AS WELL. Death turned a page and, for a person without breath, managed
|
AS WELL. Death turned a page and, for a person without breath, managed a
|
||||||
a pretty good sigh. IT APPEARS THAT THE BUTLER DID IT.
|
pretty good sigh. IT APPEARS THAT THE BUTLER DID IT.
|
||||||
|
|
||||||
'Did what?'
|
'Did what?'
|
||||||
|
|
||||||
IT IS A MADE-UP STORY. VERY STRANGE. ALL ONE NEEDS TO DO IS TURN TO THE
|
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
|
LAST PAGE AND THE ANSWER IS THERE. WHAT, THEREFORE, IS THE POINT OF
|
||||||
DELIBERATEDLY NOT KNOWING?
|
DELIBERATEDLY NOT KNOWING?
|
||||||
|
|
||||||
It sounded like gibberish to Vimes, so he ignored it. Some of the aches
|
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,
|
had gone, although his head still hammered. There was an empty feeling
|
||||||
everywhere. He just wanted to sleep.
|
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]
|
[Thud!, by Terry Pratchett]
|
||||||
%e passage
|
%e passage
|
||||||
@@ -4019,21 +4264,268 @@ everywhere. He just wanted to sleep.
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
%title Wintersmith (2)
|
%title Wintersmith (16)
|
||||||
|
# p. 82 (HarperTeen edition--presumably HarperTempest suffered a name change)
|
||||||
%passage 1
|
%passage 1
|
||||||
That's Third Thoughts for you.
|
That's Third Thoughts for you. When a huge rock is going to land on your
|
||||||
When a huge rock is going to land on your head,
|
head, they're the thoughts that think: Is that an igneous rock, such as
|
||||||
they're the thoughts that think:
|
granite, or is it sandstone?
|
||||||
Is that an igneous rock, such as granite, or is it sandstone?
|
|
||||||
|
|
||||||
[Wintersmith, by Terry Pratchett]
|
[Wintersmith, by Terry Pratchett]
|
||||||
%e passage
|
%e passage
|
||||||
|
p. 113
|
||||||
%passage 2
|
%passage 2
|
||||||
They say that there can never be two snowflakes that are exactly alike, but
|
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]
|
[Wintersmith, by Terry Pratchett]
|
||||||
%e passage
|
%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
|
||||||
%e title
|
%e title
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
@@ -4046,7 +4538,7 @@ Making Money, by Terry Pratchett
|
|||||||
'I don't know, thur. I didn't athk.'
|
'I don't know, thur. I didn't athk.'
|
||||||
|
|
||||||
[Making Money, by Terry Pratchett]
|
[Making Money, by Terry Pratchett]
|
||||||
%e pasasge
|
%e passage
|
||||||
%passage 2
|
%passage 2
|
||||||
The Watch armour fitted like a glove. He'd have preferred it to fit like a
|
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
|
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.
|
# Used for interaction with Death.
|
||||||
#
|
#
|
||||||
%section Death
|
%section Death
|
||||||
%title Death Quotes (8)
|
%title Death Quotes (10)
|
||||||
%passage 1
|
%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.
|
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
|
%e passage
|
||||||
@@ -4288,5 +4780,12 @@ THERE IS A LITTLE CONFUSION AT FIRST. IT IS ONLY TO BE EXPECTED.
|
|||||||
# time and space)
|
# time and space)
|
||||||
%passage 8
|
%passage 8
|
||||||
THERE IS ALWAYS TIME FOR ANOTHER LAST MINUTE.
|
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 title
|
||||||
%e section
|
%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. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* 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
|
#define CONFIG_H
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Section 1: Operating and window systems selection.
|
* Section 1: Operating and window systems selection.
|
||||||
* Select the version of the OS you are using.
|
* Select the version of the OS you are using.
|
||||||
* For "UNIX" select BSD, ULTRIX, SYSV, or HPUX in unixconf.h.
|
* For "UNIX" select BSD, ULTRIX, SYSV, or HPUX in unixconf.h.
|
||||||
* A "VMS" option is not needed since the VMS C-compilers
|
* A "VMS" option is not needed since the VMS C-compilers
|
||||||
* provide it (no need to change sec#1, vmsconf.h handles it).
|
* provide it (no need to change sec#1, vmsconf.h handles it).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define UNIX /* delete if no fork(), exec() available */
|
#define UNIX /* delete if no fork(), exec() available */
|
||||||
@@ -53,7 +52,7 @@
|
|||||||
* Define the default window system. This should be one that is compiled
|
* Define the default window system. This should be one that is compiled
|
||||||
* into your system (see defines above). Known window systems are:
|
* 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 */
|
/* MAC also means MAC windows */
|
||||||
@@ -136,40 +135,56 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Section 2: Some global parameters and filenames.
|
* 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.
|
|
||||||
*
|
*
|
||||||
* If SYSCF is defined, the following configuration info is
|
* LOGFILE, XLOGFILE, NEWS and PANICLOG refer to files in
|
||||||
* available in a global config space, with the compiled-in
|
* the playground directory. Commenting out LOGFILE, XLOGFILE,
|
||||||
* entries as defaults:
|
* NEWS or PANICLOG removes that feature from the game.
|
||||||
* 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)
|
|
||||||
*
|
*
|
||||||
* The following options select how the config space is stored:
|
* Building with debugging features enabled is now unconditional;
|
||||||
* SYSCF_FILE in the named file
|
* 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:
|
* SYSCF: (not supported by all ports)
|
||||||
* GREPPATH (the path to the system grep(1) utility)
|
* If SYSCF is defined, the following configuration info is
|
||||||
* GDBPATH (the path to the system gdb(1) program)
|
* 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 */
|
#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
|
#endif
|
||||||
|
|
||||||
#ifndef SYSCF
|
#ifndef SYSCF
|
||||||
@@ -184,11 +199,20 @@
|
|||||||
#define GREPPATH "/bin/grep"
|
#define GREPPATH "/bin/grep"
|
||||||
#endif
|
#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 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 */
|
#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
|
#ifndef PERSMAX
|
||||||
#define PERSMAX 3 /* entries per name/uid per char. allowed */
|
#define PERSMAX 3 /* entries per name/uid per char. allowed */
|
||||||
#endif
|
#endif
|
||||||
@@ -207,20 +231,20 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If COMPRESS is defined, it should contain the full path name of your
|
* If COMPRESS is defined, it should contain the full path name of your
|
||||||
* 'compress' program.
|
* 'compress' program.
|
||||||
*
|
*
|
||||||
* If you define COMPRESS, you must also define COMPRESS_EXTENSION
|
* If you define COMPRESS, you must also define COMPRESS_EXTENSION
|
||||||
* as the extension your compressor appends to filenames after
|
* as the extension your compressor appends to filenames after
|
||||||
* compression. Currently, only UNIX fully implements
|
* compression. Currently, only UNIX fully implements
|
||||||
* COMPRESS; other ports should be able to uncompress save files a
|
* COMPRESS; other ports should be able to uncompress save files a
|
||||||
* la unixmain.c if so inclined.
|
* la unixmain.c if so inclined.
|
||||||
*
|
*
|
||||||
* Defining ZLIB_COMP builds in support for zlib compression. If you
|
* Defining ZLIB_COMP builds in support for zlib compression. If you
|
||||||
* define ZLIB_COMP, you must link with a zlib library. Not all ports
|
* define ZLIB_COMP, you must link with a zlib library. Not all ports
|
||||||
* support ZLIB_COMP.
|
* support ZLIB_COMP.
|
||||||
*
|
*
|
||||||
* COMPRESS and ZLIB_COMP are mutually exclusive.
|
* COMPRESS and ZLIB_COMP are mutually exclusive.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -234,52 +258,52 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef COMPRESS
|
#ifndef COMPRESS
|
||||||
/* # define ZLIB_COMP */ /* ZLIB for compression */
|
/* # define ZLIB_COMP */ /* ZLIB for compression */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Internal Compression Options
|
* Internal Compression Options
|
||||||
*
|
*
|
||||||
* Internal compression options RLECOMP and ZEROCOMP alter the data
|
* Internal compression options RLECOMP and ZEROCOMP alter the data
|
||||||
* that gets written to the save file by NetHack, in contrast
|
* that gets written to the save file by NetHack, in contrast
|
||||||
* to COMPRESS or ZLIB_COMP which compress the entire file after
|
* to COMPRESS or ZLIB_COMP which compress the entire file after
|
||||||
* the NetHack data is written out.
|
* the NetHack data is written out.
|
||||||
*
|
*
|
||||||
* Defining RLECOMP builds in support for internal run-length
|
* Defining RLECOMP builds in support for internal run-length
|
||||||
* compression of level structures. If RLECOMP support is included
|
* compression of level structures. If RLECOMP support is included
|
||||||
* it can be toggled on/off at runtime via the config file option
|
* it can be toggled on/off at runtime via the config file option
|
||||||
* rlecomp.
|
* rlecomp.
|
||||||
*
|
*
|
||||||
* Defining ZEROCOMP builds in support for internal zero-comp
|
* Defining ZEROCOMP builds in support for internal zero-comp
|
||||||
* compression of data. If ZEROCOMP support is included it can still
|
* compression of data. If ZEROCOMP support is included it can still
|
||||||
* be toggled on/off at runtime via the config file option zerocomp.
|
* be toggled on/off at runtime via the config file option zerocomp.
|
||||||
*
|
*
|
||||||
* RLECOMP and ZEROCOMP support can be included even if
|
* RLECOMP and ZEROCOMP support can be included even if
|
||||||
* COMPRESS or ZLIB_COMP support is included. One reason for doing
|
* COMPRESS or ZLIB_COMP support is included. One reason for doing
|
||||||
* so would be to provide savefile read compatibility with a savefile
|
* so would be to provide savefile read compatibility with a savefile
|
||||||
* where those options were in effect. With RLECOMP and/or ZEROCOMP
|
* where those options were in effect. With RLECOMP and/or ZEROCOMP
|
||||||
* defined, NetHack can read an rlecomp or zerocomp savefile in, yet
|
* defined, NetHack can read an rlecomp or zerocomp savefile in, yet
|
||||||
* re-save without them.
|
* re-save without them.
|
||||||
*
|
*
|
||||||
* Using any compression option will create smaller bones/level/save
|
* Using any compression option will create smaller bones/level/save
|
||||||
* files at the cost of additional code and time.
|
* files at the cost of additional code and time.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* # define INTERNAL_COMP */ /* defines both ZEROCOMP and RLECOMP */
|
/* # define INTERNAL_COMP */ /* defines both ZEROCOMP and RLECOMP */
|
||||||
/* # define ZEROCOMP */ /* Support ZEROCOMP compression */
|
/* # define ZEROCOMP */ /* Support ZEROCOMP compression */
|
||||||
/* # define RLECOMP */ /* Support RLECOMP compression */
|
/* # define RLECOMP */ /* Support RLECOMP compression */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Data librarian. Defining DLB places most of the support files into
|
* Data librarian. Defining DLB places most of the support files into
|
||||||
* a tar-like file, thus making a neater installation. See *conf.h
|
* a tar-like file, thus making a neater installation. See *conf.h
|
||||||
* for detailed configuration.
|
* for detailed configuration.
|
||||||
*/
|
*/
|
||||||
/* #define DLB */ /* not supported on all platforms */
|
/* #define DLB */ /* not supported on all platforms */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Defining INSURANCE slows down level changes, but allows games that
|
* Defining INSURANCE slows down level changes, but allows games that
|
||||||
* died due to program or system crashes to be resumed from the point
|
* died due to program or system crashes to be resumed from the point
|
||||||
* of the last level change, after running a utility program.
|
* of the last level change, after running a utility program.
|
||||||
*/
|
*/
|
||||||
#define INSURANCE /* allow crashed game recovery */
|
#define INSURANCE /* allow crashed game recovery */
|
||||||
|
|
||||||
@@ -299,7 +323,7 @@
|
|||||||
/*
|
/*
|
||||||
* Some system administrators are stupid enough to make Hack suid root
|
* Some system administrators are stupid enough to make Hack suid root
|
||||||
* or suid daemon, where daemon has other powers besides that of reading or
|
* 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.
|
* since the user might create files in a directory of his choice.
|
||||||
* Of course SECURE is meaningful only if HACKDIR is defined.
|
* Of course SECURE is meaningful only if HACKDIR is defined.
|
||||||
*/
|
*/
|
||||||
@@ -313,15 +337,15 @@
|
|||||||
*/
|
*/
|
||||||
#endif /* CHDIR */
|
#endif /* CHDIR */
|
||||||
|
|
||||||
/* If GENERIC_USERNAMES is defined, and the user name is found
|
/* If GENERIC_USERNAMES is defined, and the player's username is found
|
||||||
* in that list, prompt for username instead.
|
* in the list, prompt for character name instead of using username.
|
||||||
* A public server should probably disable this. */
|
* A public server should probably disable this. */
|
||||||
#define GENERIC_USERNAMES "play player game games nethack nethacker"
|
#define GENERIC_USERNAMES "play player game games nethack nethacker"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Section 3: Definitions that may vary with system type.
|
* Section 3: Definitions that may vary with system type.
|
||||||
* For example, both schar and uchar should be short ints on
|
* For example, both schar and uchar should be short ints on
|
||||||
* the AT&T 3B2/3B5/etc. family.
|
* the AT&T 3B2/3B5/etc. family.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -341,13 +365,11 @@
|
|||||||
#include "tradstdc.h"
|
#include "tradstdc.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* type schar: small signed integers (8 bits suffice) (eg. TOS)
|
* type schar:
|
||||||
*
|
* small signed integers (8 bits suffice) (eg. TOS)
|
||||||
* typedef char schar;
|
* typedef char schar;
|
||||||
*
|
* will do when you have signed characters; otherwise use
|
||||||
* will do when you have signed characters; otherwise use
|
* typedef short int schar;
|
||||||
*
|
|
||||||
* typedef short int schar;
|
|
||||||
*/
|
*/
|
||||||
#ifdef AZTEC
|
#ifdef AZTEC
|
||||||
#define schar char
|
#define schar char
|
||||||
@@ -356,14 +378,11 @@ typedef signed char schar;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* type uchar: small unsigned integers (8 bits suffice - but 7 bits do not)
|
* type uchar:
|
||||||
*
|
* small unsigned integers (8 bits suffice - but 7 bits do not)
|
||||||
* typedef unsigned char uchar;
|
* typedef unsigned char uchar;
|
||||||
*
|
* will be satisfactory if you have an "unsigned char" type; otherwise use
|
||||||
* will be satisfactory if you have an "unsigned char" type;
|
* typedef unsigned short int uchar;
|
||||||
* otherwise use
|
|
||||||
*
|
|
||||||
* typedef unsigned short int uchar;
|
|
||||||
*/
|
*/
|
||||||
#ifndef _AIX32 /* identical typedef in system file causes trouble */
|
#ifndef _AIX32 /* identical typedef in system file causes trouble */
|
||||||
typedef unsigned char uchar;
|
typedef unsigned char uchar;
|
||||||
@@ -400,19 +419,6 @@ typedef unsigned char uchar;
|
|||||||
#endif
|
#endif
|
||||||
#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(MAC)
|
||||||
#if !defined(NOCLIPPING)
|
#if !defined(NOCLIPPING)
|
||||||
#define CLIPPING /* allow smaller screens -- ERS */
|
#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 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.
|
* Conditional compilation of new or experimental options are controlled here.
|
||||||
* Enable any of these at your own risk -- there are almost certainly
|
* Enable any of these at your own risk -- there are almost certainly
|
||||||
* bugs left here.
|
* bugs left here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* #define STATUS_VIA_WINDOWPORT */ /* re-work of the status line updating process */
|
/* #define STATUS_VIA_WINDOWPORT */ /* re-work of the status line
|
||||||
/* #define STATUS_HILITES */ /* support hilites of status fields */
|
updating process */
|
||||||
/* #define WINCHAIN*/ /* stacked window systems */
|
/* #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 */
|
#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. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -90,6 +90,12 @@ struct tribute_info {
|
|||||||
/* 30 free bits */
|
/* 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 {
|
struct context_info {
|
||||||
unsigned ident; /* social security number for each monster */
|
unsigned ident; /* social security number for each monster */
|
||||||
unsigned no_of_wizards; /* 0, 1 or 2 (wizard and his shadow) */
|
unsigned no_of_wizards; /* 0, 1 or 2 (wizard and his shadow) */
|
||||||
@@ -124,6 +130,7 @@ struct context_info {
|
|||||||
struct polearm_info polearm;
|
struct polearm_info polearm;
|
||||||
struct obj_split objsplit; /* track most recently split object stack */
|
struct obj_split objsplit; /* track most recently split object stack */
|
||||||
struct tribute_info tribute;
|
struct tribute_info tribute;
|
||||||
|
struct novel_tracking novel;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern NEARDATA struct context_info context;
|
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 */
|
/* 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. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
#ifndef DISPLAY_H
|
#ifndef DISPLAY_H
|
||||||
@@ -27,14 +27,16 @@
|
|||||||
* Returns true if the hero can sense the given monster. This includes
|
* Returns true if the hero can sense the given monster. This includes
|
||||||
* monsters that are hiding or mimicing other monsters.
|
* monsters that are hiding or mimicing other monsters.
|
||||||
*/
|
*/
|
||||||
#define tp_sensemon(mon) \
|
#define tp_sensemon(mon) \
|
||||||
(/* The hero can always sense a monster IF: */ \
|
(/* The hero can always sense a monster IF: */ \
|
||||||
(!mindless(mon->data)) && /* 1. the monster has a brain to sense AND */ \
|
/* 1. the monster has a brain to sense */ \
|
||||||
((Blind && Blind_telepat) \
|
(!mindless(mon->data)) \
|
||||||
|| /* 2a. hero is blind and telepathic OR */ /* 2b. hero is using a \
|
/* AND 2a. hero is blind and telepathic */ \
|
||||||
telepathy inducing */ /* object and in range */ \
|
&& ((Blind && Blind_telepat) \
|
||||||
(Unblind_telepat \
|
/* OR 2b. hero is using a telepathy inducing */ \
|
||||||
&& (distu(mon->mx, mon->my) <= (BOLT_LIM * BOLT_LIM)))))
|
/* object and in range */ \
|
||||||
|
|| (Unblind_telepat \
|
||||||
|
&& (distu(mon->mx, mon->my) <= (BOLT_LIM * BOLT_LIM)))))
|
||||||
|
|
||||||
#define sensemon(mon) \
|
#define sensemon(mon) \
|
||||||
(tp_sensemon(mon) || Detect_monsters || MATCH_WARN_OF_MON(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.
|
* vobj_at() returns a pointer to an object that the hero can see there.
|
||||||
* Infravision is not taken into account.
|
* Infravision is not taken into account.
|
||||||
*/
|
*/
|
||||||
#define mon_visible(mon) \
|
#define mon_visible(mon) \
|
||||||
(/* The hero can see the monster */ /* IF the monster */ \
|
(/* The hero can see the monster IF the monster */ \
|
||||||
(!mon->minvis || See_invisible) && /* 1. is not invisible AND */ \
|
(!mon->minvis || See_invisible) /* 1. is not invisible */ \
|
||||||
(!mon->mundetected) && /* 2. not an undetected hider */ \
|
&& !mon->mundetected /* AND 2. not an undetected hider */ \
|
||||||
(!(mon->mburied || u.uburied)) /* 3. neither you or it is buried */ \
|
&& !(mon->mburied || u.uburied)) /* AND 3. neither you nor it is buried */
|
||||||
)
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* see_with_infrared()
|
* see_with_infrared()
|
||||||
@@ -72,7 +73,7 @@
|
|||||||
* canseemon() or canspotmon() which already check that.
|
* canseemon() or canspotmon() which already check that.
|
||||||
*/
|
*/
|
||||||
#define see_with_infrared(mon) \
|
#define see_with_infrared(mon) \
|
||||||
(!Blind && Infravision && infravisible(mon->data) \
|
(!Blind && Infravision && mon && infravisible(mon->data) \
|
||||||
&& couldsee(mon->mx, mon->my))
|
&& couldsee(mon->mx, mon->my))
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -99,7 +100,7 @@
|
|||||||
/* knowninvisible(mon)
|
/* knowninvisible(mon)
|
||||||
* This one checks to see if you know a monster is both there and invisible.
|
* 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
|
* 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.)
|
* Nethack were really inconsistent on this.)
|
||||||
* 2) If you can't see the monster, but can see its location and you have
|
* 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
|
* telepathy that works when you can see, you can tell that there is a
|
||||||
@@ -116,7 +117,7 @@
|
|||||||
/*
|
/*
|
||||||
* is_safepet(mon)
|
* 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.
|
* definition here is convenient.
|
||||||
*/
|
*/
|
||||||
#define is_safepet(mon) \
|
#define is_safepet(mon) \
|
||||||
@@ -176,13 +177,12 @@
|
|||||||
/*
|
/*
|
||||||
* tmp_at() control calls.
|
* tmp_at() control calls.
|
||||||
*/
|
*/
|
||||||
#define DISP_BEAM (-1) /* Keep all glyphs showing & clean up at end. */
|
#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_ALL (-2) /* Like beam, but still displayed if not visible. */
|
||||||
#define DISP_FLASH (-3) /* Clean up each glyph before displaying new one. */
|
#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_ALWAYS (-4) /* Like flash, but still displayed if not visible. */
|
||||||
*/
|
#define DISP_CHANGE (-5) /* Change glyph. */
|
||||||
#define DISP_CHANGE (-5) /* Change glyph. */
|
#define DISP_END (-6) /* Clean up. */
|
||||||
#define DISP_END (-6) /* Clean up. */
|
|
||||||
#define DISP_FREEMEM (-7) /* Free all memory during exit only. */
|
#define DISP_FREEMEM (-7) /* Free all memory during exit only. */
|
||||||
|
|
||||||
/* Total number of cmap indices in the shield_static[] array. */
|
/* 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) \
|
((u.usteed && mon_visible(u.usteed)) ? ridden_mon_to_glyph(u.usteed) \
|
||||||
: (otherwise_self))
|
: (otherwise_self))
|
||||||
|
|
||||||
#define display_self() \
|
#define display_self() \
|
||||||
show_glyph(u.ux, u.uy, \
|
show_glyph(u.ux, u.uy, \
|
||||||
maybe_display_usteed( \
|
maybe_display_usteed((youmonst.m_ap_type == M_AP_NOTHING) \
|
||||||
youmonst.m_ap_type == M_AP_NOTHING \
|
? hero_glyph \
|
||||||
? hero_glyph \
|
: (youmonst.m_ap_type == M_AP_FURNITURE) \
|
||||||
: youmonst.m_ap_type == M_AP_FURNITURE \
|
? cmap_to_glyph(youmonst.mappearance) \
|
||||||
? cmap_to_glyph(youmonst.mappearance) \
|
: (youmonst.m_ap_type == M_AP_OBJECT) \
|
||||||
: youmonst.m_ap_type == M_AP_OBJECT \
|
? objnum_to_glyph(youmonst.mappearance) \
|
||||||
? objnum_to_glyph(youmonst.mappearance) \
|
/* else M_AP_MONSTER */ \
|
||||||
: /* else M_AP_MONSTER */ \
|
: monnum_to_glyph(youmonst.mappearance)))
|
||||||
monnum_to_glyph(youmonst.mappearance)))
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* A glyph is an abstraction that represents a _unique_ monster, object,
|
* A glyph is an abstraction that represents a _unique_ monster, object,
|
||||||
@@ -222,62 +221,61 @@
|
|||||||
*
|
*
|
||||||
* Glyphs are grouped for easy accessibility:
|
* 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
|
* cmap One for each entry in the character map. The character map
|
||||||
* is the dungeon features and other miscellaneous things.
|
* is the dungeon features and other miscellaneous things.
|
||||||
* Count: MAXPCHARS
|
* 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.
|
* dark, noxious, muddy, wet, magical, fiery, frosty.
|
||||||
* The nine positions represent those surrounding the hero.
|
* 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.
|
* 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
|
* The beam type is shifted over 2 positions and the direction
|
||||||
* is stored in the lower 2 bits. Count: NUM_ZAP << 2
|
* is stored in the lower 2 bits. Count: NUM_ZAP << 2
|
||||||
*
|
*
|
||||||
* swallow A set of eight for each monster. The eight positions rep-
|
* swallow A set of eight for each monster. The eight positions rep-
|
||||||
* resent those surrounding the hero. The monster number is
|
* resent those surrounding the hero. The monster number is
|
||||||
* shifted over 3 positions and the swallow position is stored
|
* shifted over 3 positions and the swallow position is stored
|
||||||
* in the lower three bits. Count: NUMMONS << 3
|
* 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.
|
* The following are offsets used to convert to and from a glyph.
|
||||||
*/
|
*/
|
||||||
#define NUM_ZAP 8 /* number of zap beam types */
|
#define NUM_ZAP 8 /* number of zap beam types */
|
||||||
|
|
||||||
#define GLYPH_MON_OFF 0
|
#define GLYPH_MON_OFF 0
|
||||||
#define GLYPH_PET_OFF (NUMMONS + GLYPH_MON_OFF)
|
#define GLYPH_PET_OFF (NUMMONS + GLYPH_MON_OFF)
|
||||||
#define GLYPH_INVIS_OFF (NUMMONS + GLYPH_PET_OFF)
|
#define GLYPH_INVIS_OFF (NUMMONS + GLYPH_PET_OFF)
|
||||||
#define GLYPH_DETECT_OFF (1 + GLYPH_INVIS_OFF)
|
#define GLYPH_DETECT_OFF (1 + GLYPH_INVIS_OFF)
|
||||||
#define GLYPH_BODY_OFF (NUMMONS + GLYPH_DETECT_OFF)
|
#define GLYPH_BODY_OFF (NUMMONS + GLYPH_DETECT_OFF)
|
||||||
#define GLYPH_RIDDEN_OFF (NUMMONS + GLYPH_BODY_OFF)
|
#define GLYPH_RIDDEN_OFF (NUMMONS + GLYPH_BODY_OFF)
|
||||||
#define GLYPH_OBJ_OFF (NUMMONS + GLYPH_RIDDEN_OFF)
|
#define GLYPH_OBJ_OFF (NUMMONS + GLYPH_RIDDEN_OFF)
|
||||||
#define GLYPH_CMAP_OFF (NUM_OBJECTS + GLYPH_OBJ_OFF)
|
#define GLYPH_CMAP_OFF (NUM_OBJECTS + GLYPH_OBJ_OFF)
|
||||||
#define GLYPH_EXPLODE_OFF ((MAXPCHARS - MAXEXPCHARS) + GLYPH_CMAP_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_SWALLOW_OFF ((NUM_ZAP << 2) + GLYPH_ZAP_OFF)
|
||||||
#define GLYPH_WARNING_OFF ((NUMMONS << 3) + GLYPH_SWALLOW_OFF)
|
#define GLYPH_WARNING_OFF ((NUMMONS << 3) + GLYPH_SWALLOW_OFF)
|
||||||
#define GLYPH_STATUE_OFF (WARNCOUNT + GLYPH_WARNING_OFF)
|
#define GLYPH_STATUE_OFF (WARNCOUNT + GLYPH_WARNING_OFF)
|
||||||
#define MAX_GLYPH (NUMMONS + GLYPH_STATUE_OFF)
|
#define MAX_GLYPH (NUMMONS + GLYPH_STATUE_OFF)
|
||||||
|
|
||||||
#define NO_GLYPH MAX_GLYPH
|
#define NO_GLYPH MAX_GLYPH
|
||||||
|
#define GLYPH_INVISIBLE GLYPH_INVIS_OFF
|
||||||
#define GLYPH_INVISIBLE GLYPH_INVIS_OFF
|
|
||||||
|
|
||||||
#define warning_to_glyph(mwarnlev) ((mwarnlev) + GLYPH_WARNING_OFF)
|
#define warning_to_glyph(mwarnlev) ((mwarnlev) + GLYPH_WARNING_OFF)
|
||||||
#define mon_to_glyph(mon) \
|
#define mon_to_glyph(mon) \
|
||||||
@@ -289,23 +287,24 @@
|
|||||||
#define pet_to_glyph(mon) \
|
#define pet_to_glyph(mon) \
|
||||||
((int) what_mon(monsndx((mon)->data)) + GLYPH_PET_OFF)
|
((int) what_mon(monsndx((mon)->data)) + GLYPH_PET_OFF)
|
||||||
|
|
||||||
/* This has the unfortunate side effect of needing a global variable */
|
/* This has the unfortunate side effect of needing a global variable */
|
||||||
/* to store a result. 'otg_temp' is defined and declared in decl.{ch}. */
|
/* to store a result. 'otg_temp' is defined and declared in decl.{ch}. */
|
||||||
#define random_obj_to_glyph() \
|
#define random_obj_to_glyph() \
|
||||||
((otg_temp = random_object()) == CORPSE \
|
((otg_temp = random_object()) == CORPSE \
|
||||||
? random_monster() + GLYPH_BODY_OFF \
|
? random_monster() + GLYPH_BODY_OFF \
|
||||||
: otg_temp + GLYPH_OBJ_OFF)
|
: otg_temp + GLYPH_OBJ_OFF)
|
||||||
|
|
||||||
#define obj_to_glyph(obj) \
|
#define obj_to_glyph(obj) \
|
||||||
((obj)->otyp == STATUE \
|
(((obj)->otyp == STATUE) \
|
||||||
? statue_to_glyph(obj) \
|
? statue_to_glyph(obj) \
|
||||||
: Hallucination ? random_obj_to_glyph() \
|
: Hallucination \
|
||||||
: (obj)->otyp == CORPSE \
|
? random_obj_to_glyph() \
|
||||||
? (int) (obj)->corpsenm + GLYPH_BODY_OFF \
|
: ((obj)->otyp == CORPSE) \
|
||||||
: (int) (obj)->otyp + GLYPH_OBJ_OFF)
|
? (int) (obj)->corpsenm + GLYPH_BODY_OFF \
|
||||||
|
: (int) (obj)->otyp + GLYPH_OBJ_OFF)
|
||||||
|
|
||||||
/* MRKR: Statues now have glyphs corresponding to the monster they */
|
/* 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) \
|
#define statue_to_glyph(obj) \
|
||||||
(Hallucination ? random_monster() + GLYPH_MON_OFF \
|
(Hallucination ? random_monster() + GLYPH_MON_OFF \
|
||||||
@@ -313,7 +312,7 @@
|
|||||||
|
|
||||||
#define cmap_to_glyph(cmap_idx) ((int) (cmap_idx) + GLYPH_CMAP_OFF)
|
#define cmap_to_glyph(cmap_idx) ((int) (cmap_idx) + GLYPH_CMAP_OFF)
|
||||||
#define explosion_to_glyph(expltype, idx) \
|
#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) \
|
#define trap_to_glyph(trap) \
|
||||||
cmap_to_glyph(trap_to_defsym(what_trap((trap)->ttyp)))
|
cmap_to_glyph(trap_to_defsym(what_trap((trap)->ttyp)))
|
||||||
@@ -337,43 +336,45 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Change the given glyph into it's given type. Note:
|
* Change the given glyph into it's given type. Note:
|
||||||
* 1) Pets, detected, and ridden monsters are animals and are converted
|
* 1) Pets, detected, and ridden monsters are animals and are converted
|
||||||
* to the proper monster number.
|
* to the proper monster number.
|
||||||
* 2) Bodies are all mapped into the generic CORPSE object
|
* 2) Bodies are all mapped into the generic CORPSE object
|
||||||
* 3) If handed a glyph out of range for the type, these functions
|
* 3) If handed a glyph out of range for the type, these functions
|
||||||
* will return NO_GLYPH (see exception below)
|
* will return NO_GLYPH (see exception below)
|
||||||
* 4) glyph_to_swallow() does not return a showsyms[] index, but an
|
* 4) glyph_to_swallow() does not return a showsyms[] index, but an
|
||||||
* offset from the first swallow symbol. If handed something
|
* offset from the first swallow symbol. If handed something
|
||||||
* out of range, it will return zero (for lack of anything better
|
* out of range, it will return zero (for lack of anything better
|
||||||
* to return).
|
* to return).
|
||||||
*/
|
*/
|
||||||
#define glyph_to_mon(glyph) \
|
#define glyph_to_mon(glyph) \
|
||||||
(glyph_is_normal_monster(glyph) \
|
(glyph_is_normal_monster(glyph) \
|
||||||
? ((glyph) -GLYPH_MON_OFF) \
|
? ((glyph) - GLYPH_MON_OFF) \
|
||||||
: glyph_is_pet(glyph) \
|
: glyph_is_pet(glyph) \
|
||||||
? ((glyph) -GLYPH_PET_OFF) \
|
? ((glyph) - GLYPH_PET_OFF) \
|
||||||
: glyph_is_detected_monster(glyph) \
|
: glyph_is_detected_monster(glyph) \
|
||||||
? ((glyph) -GLYPH_DETECT_OFF) \
|
? ((glyph) - GLYPH_DETECT_OFF) \
|
||||||
: glyph_is_ridden_monster(glyph) \
|
: glyph_is_ridden_monster(glyph) \
|
||||||
? ((glyph) -GLYPH_RIDDEN_OFF) \
|
? ((glyph) - GLYPH_RIDDEN_OFF) \
|
||||||
: glyph_is_statue(glyph) \
|
: glyph_is_statue(glyph) \
|
||||||
? ((glyph) -GLYPH_STATUE_OFF) \
|
? ((glyph) - GLYPH_STATUE_OFF) \
|
||||||
: NO_GLYPH)
|
: NO_GLYPH)
|
||||||
#define glyph_to_obj(glyph) \
|
#define glyph_to_obj(glyph) \
|
||||||
(glyph_is_body(glyph) ? CORPSE : glyph_is_statue(glyph) \
|
(glyph_is_body(glyph) \
|
||||||
? STATUE \
|
? CORPSE \
|
||||||
: glyph_is_normal_object(glyph) \
|
: glyph_is_statue(glyph) \
|
||||||
? ((glyph) -GLYPH_OBJ_OFF) \
|
? STATUE \
|
||||||
: NO_GLYPH)
|
: glyph_is_normal_object(glyph) \
|
||||||
#define glyph_to_trap(glyph) \
|
? ((glyph) - GLYPH_OBJ_OFF) \
|
||||||
(glyph_is_trap(glyph) ? ((int) defsym_to_trap((glyph) -GLYPH_CMAP_OFF)) \
|
: NO_GLYPH)
|
||||||
|
#define glyph_to_trap(glyph) \
|
||||||
|
(glyph_is_trap(glyph) ? ((int) defsym_to_trap((glyph) - GLYPH_CMAP_OFF)) \
|
||||||
: NO_GLYPH)
|
: NO_GLYPH)
|
||||||
#define glyph_to_cmap(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) \
|
#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) \
|
#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
|
* 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. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -79,12 +79,10 @@ typedef struct branch {
|
|||||||
|
|
||||||
/* branch types */
|
/* branch types */
|
||||||
#define BR_STAIR 0 /* "Regular" connection, 2 staircases. */
|
#define BR_STAIR 0 /* "Regular" connection, 2 staircases. */
|
||||||
#define BR_NO_END1 1 /* "Regular" connection. However, no stair from */
|
#define BR_NO_END1 1 /* "Regular" connection. However, no stair from
|
||||||
/* end1 to end2. There is a stair from end2 */
|
end1 to end2. There is a stair from end2 to end1. */
|
||||||
/* to end1. */
|
#define BR_NO_END2 2 /* "Regular" connection. However, no stair from
|
||||||
#define BR_NO_END2 2 /* "Regular" connection. However, no stair from */
|
end2 to end1. There is a stair from end1 to end2. */
|
||||||
/* end2 to end1. There is a stair from end1 */
|
|
||||||
/* to end2. */
|
|
||||||
#define BR_PORTAL 3 /* Connection by magic portals (traps) */
|
#define BR_PORTAL 3 /* Connection by magic portals (traps) */
|
||||||
|
|
||||||
/* A particular dungeon contains num_dunlevs d_levels with dlevel 1..
|
/* 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 VISITED 0x01 /* hero has visited this level */
|
||||||
#define FORGOTTEN 0x02 /* hero will forget this level when reached */
|
#define FORGOTTEN 0x02 /* hero will forget this level when reached */
|
||||||
#define LFILE_EXISTS 0x04 /* a level file exists for this level */
|
#define LFILE_EXISTS 0x04 /* a level file exists for this level */
|
||||||
/*
|
/* Note: VISITED and LFILE_EXISTS are currently almost always
|
||||||
* Note: VISITED and LFILE_EXISTS are currently almost always set at the
|
* set at the same time. However they _mean_ different things.
|
||||||
* same time. However they _mean_ different things.
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef MFLOPPY
|
#ifdef MFLOPPY
|
||||||
#define FROMPERM 1 /* for ramdisk use */
|
#define FROMPERM 1 /* for ramdisk use */
|
||||||
#define TOPERM 2 /* for ramdisk use */
|
#define TOPERM 2 /* for ramdisk use */
|
||||||
@@ -171,18 +167,15 @@ struct linfo {
|
|||||||
|
|
||||||
/* types and structures for dungeon map recording
|
/* types and structures for dungeon map recording
|
||||||
*
|
*
|
||||||
* It is designed to eliminate the need for an external notes file for some of
|
* It is designed to eliminate the need for an external notes file for some
|
||||||
* the more mundane dungeon elements. "Where was the last altar I passed?"
|
* mundane dungeon elements. "Where was the last altar I passed?" etc...
|
||||||
* etc...
|
|
||||||
* Presumably the character can remember this sort of thing even if, months
|
* 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.
|
* 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
|
* 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
|
* has no physical correspondence (eliminating illiteracy/blind/hands/hands
|
||||||
* free
|
* free concerns). Therefore, this map is not exhaustive nor detailed ("some
|
||||||
* concerns.) Therefore, this map is not exhaustive nor detailed ("some
|
* fountains"). This makes it also subject to player conditions (amnesia).
|
||||||
* fountains").
|
|
||||||
* This makes it also subject to player conditions (amnesia).
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Because clearly Nethack needs more ways to specify alignment */
|
/* 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. */
|
/* Copyright (c) Steve Creps, 1988. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* 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(map_invisible, (XCHAR_P, XCHAR_P));
|
||||||
E void FDECL(unmap_object, (int, int));
|
E void FDECL(unmap_object, (int, int));
|
||||||
E void FDECL(map_location, (int, 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(feel_location, (XCHAR_P, XCHAR_P));
|
||||||
E void FDECL(newsym, (int, int));
|
E void FDECL(newsym, (int, int));
|
||||||
E void FDECL(shieldeff, (XCHAR_P, XCHAR_P));
|
E void FDECL(shieldeff, (XCHAR_P, XCHAR_P));
|
||||||
@@ -765,7 +766,8 @@ E void NDECL(really_close);
|
|||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
E boolean FDECL(debugcore, (const char *, BOOLEAN_P));
|
E boolean FDECL(debugcore, (const char *, BOOLEAN_P));
|
||||||
#endif
|
#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));
|
E boolean FDECL(Death_quote, (char *, int));
|
||||||
|
|
||||||
/* ### fountain.c ### */
|
/* ### fountain.c ### */
|
||||||
@@ -1069,6 +1071,7 @@ E int FDECL(monhp_per_lvl, (struct monst *));
|
|||||||
E void FDECL(newmonhp, (struct monst *, int));
|
E void FDECL(newmonhp, (struct monst *, int));
|
||||||
E struct mextra *NDECL(newmextra);
|
E struct mextra *NDECL(newmextra);
|
||||||
E void FDECL(copy_mextra, (struct monst *, struct monst *));
|
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 struct monst *FDECL(makemon, (struct permonst *, int, int, int));
|
||||||
E boolean FDECL(create_critters, (int, struct permonst *, BOOLEAN_P));
|
E boolean FDECL(create_critters, (int, struct permonst *, BOOLEAN_P));
|
||||||
E struct permonst *NDECL(rndmonst);
|
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 struct oextra *NDECL(newoextra);
|
||||||
E void FDECL(copy_oextra, (struct obj *, struct obj *));
|
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(newomonst, (struct obj *));
|
||||||
E void FDECL(free_omonst, (struct obj *));
|
E void FDECL(free_omonst, (struct obj *));
|
||||||
E void FDECL(newomid, (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 int FDECL(add_autopickup_exception, (const char *));
|
||||||
E void NDECL(free_autopickup_exceptions);
|
E void NDECL(free_autopickup_exceptions);
|
||||||
E int FDECL(load_symset, (const char *, int));
|
E int FDECL(load_symset, (const char *, int));
|
||||||
|
E void NDECL(free_symsets);
|
||||||
E void FDECL(parsesymbols, (char *));
|
E void FDECL(parsesymbols, (char *));
|
||||||
E struct symparse *FDECL(match_sym, (char *));
|
E struct symparse *FDECL(match_sym, (char *));
|
||||||
E void NDECL(set_playmode);
|
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 $ */
|
/* 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. */
|
/* Copyright (c) Jon W{tte 1993. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This header is the supported external interface for the "tty" window
|
* This header is the supported external interface for the "tty" window
|
||||||
@@ -72,14 +72,14 @@
|
|||||||
#define CHAR_BLANK ((char) 32)
|
#define CHAR_BLANK ((char) 32)
|
||||||
#define CHAR_DELETE ((char) 127)
|
#define CHAR_DELETE ((char) 127)
|
||||||
|
|
||||||
extern char
|
extern char game_active; /* flag to window rendering routines
|
||||||
game_active; /* flag to window rendering routines not to use ppat */
|
not to use ppat */
|
||||||
/*
|
/*
|
||||||
* If you want some fancy operations that not a normal TTY device normally
|
* If you want some fancy operations that not a normal TTY device normally
|
||||||
* supports, use EXTENDED_SUPPORT. For frames, area erases and area scrolls,
|
* supports, use EXTENDED_SUPPORT. For frames, area erases and area scrolls,
|
||||||
* plus bitmap graphics - RESOLUTION DEPENDENT, be sure to call
|
* plus bitmap graphics - RESOLUTION DEPENDENT, be sure to call
|
||||||
* get_tty_metrics and use those limits.
|
* get_tty_metrics and use those limits.
|
||||||
*/
|
*/
|
||||||
#define EXTENDED_SUPPORT 0
|
#define EXTENDED_SUPPORT 0
|
||||||
/*
|
/*
|
||||||
* if you print a lot of single characters, accumulating each one in a
|
* 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
|
* Use this macro to cast a function pointer to a tty attribute; this will
|
||||||
* help
|
* help portability to systems where a function pointer doesn't fit in a long
|
||||||
* portability to systems where a function pointer doesn't fit in a long
|
|
||||||
*/
|
*/
|
||||||
#define TA_ATTRIB_FUNC(x) ((long) (x))
|
#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. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -27,7 +27,8 @@ typedef pascal void (*UserItemProcPtr)(WindowPtr theWindow, short itemNo);
|
|||||||
typedef UserItemProcPtr UserItemUPP;
|
typedef UserItemProcPtr UserItemUPP;
|
||||||
#define NewUserItemProc(p) (UserItemUPP)(p)
|
#define NewUserItemProc(p) (UserItemUPP)(p)
|
||||||
|
|
||||||
typedef pascal void (*ControlActionProcPtr)(ControlHandle theControl, short partCode);
|
typedef pascal void (*ControlActionProcPtr)(ControlHandle theControl,
|
||||||
|
short partCode);
|
||||||
typedef ControlActionProcPtr ControlActionUPP;
|
typedef ControlActionProcPtr ControlActionUPP;
|
||||||
#define NewControlActionProc(p) (ControlActionUPP)(p)
|
#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. */
|
/* Copyright (c) NetHack PC Development Team 1993, 1994. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -107,11 +107,12 @@ extern void FDECL(interject, (int));
|
|||||||
#ifdef YYPREFIX
|
#ifdef YYPREFIX
|
||||||
#pragma warning(disable : 4102) /* unreferenced label */
|
#pragma warning(disable : 4102) /* unreferenced label */
|
||||||
#endif
|
#endif
|
||||||
#if 0
|
#ifdef __cplusplus
|
||||||
#pragma warning(disable : 4018) /* signed/unsigned mismatch */
|
/* suppress a warning in cppregex.cpp */
|
||||||
#pragma warning(disable : 4305) /* init, conv from 'const int' to 'char' */
|
#pragma warning(disable : 4101) /* unreferenced local variable */
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* _MSC_VER */
|
||||||
|
|
||||||
|
|
||||||
#define RUNTIME_PORT_ID /* trigger run-time port identification for \
|
#define RUNTIME_PORT_ID /* trigger run-time port identification for \
|
||||||
* identification of exe CPU architecture \
|
* identification of exe CPU architecture \
|
||||||
@@ -187,10 +188,6 @@ extern void FDECL(interject, (int));
|
|||||||
#define FILENAME_CMP stricmp /* case insensitive */
|
#define FILENAME_CMP stricmp /* case insensitive */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 0
|
|
||||||
extern char levels[], bones[], permbones[],
|
|
||||||
#endif /* 0 */
|
|
||||||
|
|
||||||
/* this was part of the MICRO stuff in the past */
|
/* this was part of the MICRO stuff in the past */
|
||||||
extern const char *alllevels, *allbones;
|
extern const char *alllevels, *allbones;
|
||||||
extern char hackdir[];
|
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. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -31,8 +31,8 @@ struct objclass {
|
|||||||
|
|
||||||
Bitfield(oc_dir, 2);
|
Bitfield(oc_dir, 2);
|
||||||
#define NODIR 1 /* for wands/spells: non-directional */
|
#define NODIR 1 /* for wands/spells: non-directional */
|
||||||
#define IMMEDIATE 2 /* directional */
|
#define IMMEDIATE 2 /* directional */
|
||||||
#define RAY 3 /* zap beams */
|
#define RAY 3 /* zap beams */
|
||||||
|
|
||||||
#define PIERCE 1 /* for weapons & tools used as weapons */
|
#define PIERCE 1 /* for weapons & tools used as weapons */
|
||||||
#define SLASH 2 /* (latter includes iron ball & chain) */
|
#define SLASH 2 /* (latter includes iron ball & chain) */
|
||||||
@@ -151,17 +151,17 @@ extern NEARDATA struct objdescr obj_descr[];
|
|||||||
#define VENOM_CLASS 17
|
#define VENOM_CLASS 17
|
||||||
#define MAXOCLASSES 18
|
#define MAXOCLASSES 18
|
||||||
|
|
||||||
#define ALLOW_COUNT (MAXOCLASSES + 1) /* Can be used in the object class */
|
#define ALLOW_COUNT (MAXOCLASSES + 1) /* Can be used in the object class */
|
||||||
#define ALL_CLASSES (MAXOCLASSES + 2) /* input to getobj(). */
|
#define ALL_CLASSES (MAXOCLASSES + 2) /* input to getobj(). */
|
||||||
#define ALLOW_NONE (MAXOCLASSES + 3) /* */
|
#define ALLOW_NONE (MAXOCLASSES + 3)
|
||||||
|
|
||||||
#define BURNING_OIL (MAXOCLASSES + 1) /* Can be used as input to explode. */
|
#define BURNING_OIL (MAXOCLASSES + 1) /* Can be used as input to explode. */
|
||||||
#define MON_EXPLODE (MAXOCLASSES + 2) /* Exploding monster (e.g. gas spore) \
|
#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 */
|
#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 const struct class_sym
|
||||||
extern uchar oc_syms[MAXOCLASSES]; /* current class symbols */
|
def_oc_syms[MAXOCLASSES]; /* default class symbols */
|
||||||
|
extern uchar oc_syms[MAXOCLASSES]; /* current class symbols */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Default definitions of all object-symbols (must match classes above). */
|
/* 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. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -8,12 +8,12 @@
|
|||||||
/*
|
/*
|
||||||
* PATCHLEVEL is updated for each release.
|
* PATCHLEVEL is updated for each release.
|
||||||
*/
|
*/
|
||||||
#define PATCHLEVEL 1
|
#define PATCHLEVEL 0
|
||||||
/*
|
/*
|
||||||
* Incrementing EDITLEVEL can be used to force invalidation of old bones
|
* Incrementing EDITLEVEL can be used to force invalidation of old bones
|
||||||
* and save files.
|
* and save files.
|
||||||
*/
|
*/
|
||||||
#define EDITLEVEL 0
|
#define EDITLEVEL 2
|
||||||
|
|
||||||
#define COPYRIGHT_BANNER_A "NetHack, Copyright 1985-2015"
|
#define COPYRIGHT_BANNER_A "NetHack, Copyright 1985-2015"
|
||||||
#define COPYRIGHT_BANNER_B \
|
#define COPYRIGHT_BANNER_B \
|
||||||
@@ -25,14 +25,14 @@
|
|||||||
* If two or more successive releases have compatible data files, define
|
* If two or more successive releases have compatible data files, define
|
||||||
* this with the version number of the oldest such release so that the
|
* 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
|
* new release will accept old save and bones files. The format is
|
||||||
* 0xMMmmPPeeL
|
* 0xMMmmPPeeL
|
||||||
* 0x = literal prefix "0x", MM = major version, mm = minor version,
|
* 0x = literal prefix "0x", MM = major version, mm = minor version,
|
||||||
* PP = patch level, ee = edit level, L = literal suffix "L",
|
* PP = patch level, ee = edit level, L = literal suffix "L",
|
||||||
* with all four numbers specified as two hexadecimal digits.
|
* with all four numbers specified as two hexadecimal digits.
|
||||||
*/
|
*/
|
||||||
/* #define VERSION_COMPATIBILITY 0x03050000L */
|
/* #define VERSION_COMPATIBILITY 0x03050000L */
|
||||||
|
|
||||||
/*****************************************************************************/
|
/****************************************************************************/
|
||||||
/* Version 3.6.x */
|
/* Version 3.6.x */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -40,7 +40,13 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*****************************************************************************/
|
/****************************************************************************/
|
||||||
|
/* Version 3.5.x */
|
||||||
|
|
||||||
|
/* Version 3.5 was never officially released.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
/* Version 3.4.x */
|
/* Version 3.4.x */
|
||||||
|
|
||||||
/* Patch 3, December 7, 2003
|
/* Patch 3, December 7, 2003
|
||||||
@@ -86,11 +92,11 @@
|
|||||||
*
|
*
|
||||||
* Hundreds of general bug fixes including some for sliming, zapping,
|
* Hundreds of general bug fixes including some for sliming, zapping,
|
||||||
*conduct,
|
*conduct,
|
||||||
* and several more for riding
|
* and several more for riding
|
||||||
* Eliminated a few potentially fatal bugs including one for stone-to-flesh,
|
* Eliminated a few potentially fatal bugs including one for stone-to-flesh,
|
||||||
* trouble-fixing during prayer, riding down stairs while punished,
|
* trouble-fixing during prayer, riding down stairs while punished,
|
||||||
* polyd player demon summoning, throwing digging tools into shops, and
|
* polyd player demon summoning, throwing digging tools into shops, and
|
||||||
* a couple from having the vision system enabled at inappropriate times
|
* a couple from having the vision system enabled at inappropriate times
|
||||||
* Corrected some incorrect calculations in final scoring
|
* Corrected some incorrect calculations in final scoring
|
||||||
* Enhanced config file processing and alert to duplication of entries
|
* Enhanced config file processing and alert to duplication of entries
|
||||||
* Player selection prompt enhancements for TTY and X11
|
* Player selection prompt enhancements for TTY and X11
|
||||||
@@ -109,25 +115,25 @@
|
|||||||
|
|
||||||
/* Version 3.4 */
|
/* Version 3.4 */
|
||||||
|
|
||||||
/*****************************************************************************/
|
/****************************************************************************/
|
||||||
/* Version 3.3.x */
|
/* Version 3.3.x */
|
||||||
|
|
||||||
/* Patch 1, August 9, 2000
|
/* Patch 1, August 9, 2000
|
||||||
* Many, many general fixes, including a number for riding, twoweapon,
|
* 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
|
* A security fix for a couple of potentially exploitable buffer overflows
|
||||||
* in previous versions
|
* in previous versions
|
||||||
* Redo Ranger quest
|
* Redo Ranger quest
|
||||||
* Introduction of differentiation between different causes of blindness
|
* Introduction of differentiation between different causes of blindness
|
||||||
* Overhaul of warning
|
* Overhaul of warning
|
||||||
* Functionality restored to Amiga (courtesy Janne Salmijarvi) and Atari
|
* Functionality restored to Amiga (courtesy Janne Salmijarvi) and Atari
|
||||||
* (courtesy Christian "Marvin" Bressler) ports
|
* (courtesy Christian "Marvin" Bressler) ports
|
||||||
* Mac: multiple interface fixes
|
* Mac: multiple interface fixes
|
||||||
* win32: fixed bug that caused messages to stop displaying after escape
|
* win32: fixed bug that caused messages to stop displaying after escape
|
||||||
* tty: use ANSI color (AF) over standard color (Sf) when given the choice
|
* tty: use ANSI color (AF) over standard color (Sf) when given the choice
|
||||||
* several ports: offer for player selection only choices consistent with
|
* several ports: offer for player selection only choices consistent with
|
||||||
* those already made by config file/command line (e.g., only offer roles
|
* those already made by config file/command line (e.g., only offer roles
|
||||||
* that are compatible with specified race)
|
* that are compatible with specified race)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -150,7 +156,7 @@
|
|||||||
|
|
||||||
/* Version 3.3 */
|
/* Version 3.3 */
|
||||||
|
|
||||||
/*****************************************************************************/
|
/****************************************************************************/
|
||||||
/* Version 3.2.x */
|
/* Version 3.2.x */
|
||||||
|
|
||||||
/* Patch 3, December 10, 1999
|
/* Patch 3, December 10, 1999
|
||||||
@@ -171,7 +177,7 @@
|
|||||||
* fix the `recover' utility
|
* fix the `recover' utility
|
||||||
* fix priest/minion name overflow which could cause Astral Plane crashes
|
* fix priest/minion name overflow which could cause Astral Plane crashes
|
||||||
* avoid crash when hit by own thrown boomerang
|
* 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
|
* handle returning live Wizard correctly in deep dungeon levels
|
||||||
* don't occasionally display unseen areas of new levels during level change
|
* don't occasionally display unseen areas of new levels during level change
|
||||||
* other minor display fixes
|
* other minor display fixes
|
||||||
@@ -184,13 +190,13 @@
|
|||||||
* tty: support object class characters for 'I' command in menu mode
|
* tty: support object class characters for 'I' command in menu mode
|
||||||
* Unix: work around several <curses.h> compilation problems
|
* Unix: work around several <curses.h> compilation problems
|
||||||
* X11: as tty above, plus implement tty-style count handling in menus;
|
* 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
|
/* Patch 1, May 28, 1996
|
||||||
* eliminate `#qualifications'; fix weapon proficiency handling for missiles
|
* eliminate `#qualifications'; fix weapon proficiency handling for missiles
|
||||||
* keep Medusa from continuing to move after she's been killed by reflection
|
* 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
|
* make monsters a little smarter; assorted eating and chatting changes
|
||||||
* fix object amnesia for spellbooks; fix Nazgul's sleep gas attack
|
* fix object amnesia for spellbooks; fix Nazgul's sleep gas attack
|
||||||
* fix bullwhip usage for case of having recently been in a trap
|
* 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)
|
* DLB: avoid excessive fseek calls (major performance hit for MSDOS)
|
||||||
* HPUX: workaround for gcc-2.6.3 bug adversely affecting monster generation
|
* HPUX: workaround for gcc-2.6.3 bug adversely affecting monster generation
|
||||||
* Mac: avoid MW 68K struct copy optimization bug which caused crashes;
|
* 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;
|
* MSDOS: wasn't safe to enter endgame for MFLOPPY configuration;
|
||||||
* fix re-entry into game after "!" (shell escape) + chdir + EXIT;
|
* fix re-entry into game after "!" (shell escape) + chdir + EXIT;
|
||||||
* F3/F4/F5 display interface swapping improvements;
|
* F3/F4/F5 display interface swapping improvements;
|
||||||
* add support for preloading all tiles in protected mode environment
|
* add support for preloading all tiles in protected mode environment
|
||||||
* TERMINFO: colors were wrong for some systems, such as Linux
|
* TERMINFO: colors were wrong for some systems, such as Linux
|
||||||
* X11: display help files properly
|
* X11: display help files properly
|
||||||
*/
|
*/
|
||||||
@@ -217,41 +223,41 @@
|
|||||||
/*
|
/*
|
||||||
* NetHack 3.2.0, April 11, 1996
|
* NetHack 3.2.0, April 11, 1996
|
||||||
* enhancements to the windowing systems including "tiles" or icons to
|
* 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
|
* window based menu system introduced for inventory and selection
|
||||||
* moving light sources besides the player
|
* moving light sources besides the player
|
||||||
* improved #untrap (courtesy Helge Hafting)
|
* improved #untrap (courtesy Helge Hafting)
|
||||||
* spellcasting logic changes to balance spellcasting towards magic-using
|
* spellcasting logic changes to balance spellcasting towards magic-using
|
||||||
* classes (courtesy Stephen White)
|
* classes (courtesy Stephen White)
|
||||||
* many, many bug fixes and abuse eliminations
|
* many, many bug fixes and abuse eliminations
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Version 3.2 */
|
/* Version 3.2 */
|
||||||
|
|
||||||
/*****************************************************************************/
|
/****************************************************************************/
|
||||||
/* Version 3.1.x */
|
/* Version 3.1.x */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Patch 3, July 12, 1993
|
* Patch 3, July 12, 1993
|
||||||
* further revise Mac windowing and extend to Think C (courtesy
|
* further revise Mac windowing and extend to Think C (courtesy
|
||||||
* Barton House)
|
* Barton House)
|
||||||
* fix confusing black/gray/white display on some MSDOS hardware
|
* fix confusing black/gray/white display on some MSDOS hardware
|
||||||
* remove fatal bugs dealing with horns of plenty and VMS bones levels,
|
* 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
|
* Patch 2, June 1, 1993
|
||||||
* add tty windowing to Mac and Amiga ports and revise native windowing
|
* 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
|
* 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
|
* changes for NEC PC-9800 and various termcap.zip fixes by Yamamoto Keizo
|
||||||
* SYSV 386 music driver ported to 386BSD (courtesy Andrew Chernov) and
|
* 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
|
* enhanced pickup and disclosure options
|
||||||
* removed fatal bugs dealing with cursed bags of holding, renaming
|
* removed fatal bugs dealing with cursed bags of holding, renaming
|
||||||
* shopkeepers, objects falling through trapdoors on deep levels,
|
* shopkeepers, objects falling through trapdoors on deep levels,
|
||||||
* and kicking embedded objects loose, and many more minor ones
|
* and kicking embedded objects loose, and many more minor ones
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -266,11 +272,11 @@
|
|||||||
* many, many changes and bugfixes -- some of the highlights include:
|
* many, many changes and bugfixes -- some of the highlights include:
|
||||||
* display rewrite using line-of-sight vision
|
* display rewrite using line-of-sight vision
|
||||||
* general window interface, with the ability to use multiple interfaces
|
* general window interface, with the ability to use multiple interfaces
|
||||||
* in the same executable
|
* in the same executable
|
||||||
* intelligent monsters
|
* intelligent monsters
|
||||||
* enhanced dungeon mythology
|
* enhanced dungeon mythology
|
||||||
* branching dungeons with more special levels, quest dungeons, and
|
* branching dungeons with more special levels, quest dungeons, and
|
||||||
* multi-level endgame
|
* multi-level endgame
|
||||||
* more artifacts and more uses for artifacts
|
* more artifacts and more uses for artifacts
|
||||||
* generalization to multiple shops with damage repair
|
* generalization to multiple shops with damage repair
|
||||||
* X11 interface
|
* X11 interface
|
||||||
@@ -282,7 +288,7 @@
|
|||||||
|
|
||||||
/* Version 3.1 */
|
/* Version 3.1 */
|
||||||
|
|
||||||
/*****************************************************************************/
|
/****************************************************************************/
|
||||||
/* Version 3.0 */
|
/* Version 3.0 */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -303,8 +309,8 @@
|
|||||||
* Patch 8, June 3, 1990
|
* Patch 8, June 3, 1990
|
||||||
* further debug and refine Macintosh port
|
* further debug and refine Macintosh port
|
||||||
* refine the overlay manager, rearrange the OVLx breakdown for better
|
* refine the overlay manager, rearrange the OVLx breakdown for better
|
||||||
* efficiency, rename the overlay macros, and split off the overlay
|
* efficiency, rename the overlay macros, and split off the overlay
|
||||||
* instructions to Install.ovl
|
* instructions to Install.ovl
|
||||||
* introduce NEARDATA for better Amiga efficiency
|
* introduce NEARDATA for better Amiga efficiency
|
||||||
* support for more VMS versions (courtesy Joshua Delahunty and Pat Rankin)
|
* support for more VMS versions (courtesy Joshua Delahunty and Pat Rankin)
|
||||||
* more const fixes
|
* more const fixes
|
||||||
@@ -315,17 +321,17 @@
|
|||||||
/*
|
/*
|
||||||
* Patch 7, February 19, 1990
|
* Patch 7, February 19, 1990
|
||||||
* refine overlay support to handle portions of .c files through OVLx
|
* 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,
|
* update and extend Amiga port and documentation (courtesy Richard Addison,
|
||||||
* Jochen Erwied, Mark Gooderum, Ken Lorber, Greg Olson, Mike Passaretti,
|
* Jochen Erwied, Mark Gooderum, Ken Lorber, Greg Olson, Mike Passaretti,
|
||||||
* and Gregg Wonderly)
|
* and Gregg Wonderly)
|
||||||
* refine and extend Macintosh port and documentation (courtesy Johnny Lee,
|
* 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
|
* refine VMS documentation
|
||||||
* continuing ANSIfication, this time of const usage
|
* continuing ANSIfication, this time of const usage
|
||||||
* teach '/' about differences within monster classes
|
* teach '/' about differences within monster classes
|
||||||
* smarter eating code (yet again), death messages, and treatment of
|
* 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
|
* extended version command to give compilation options
|
||||||
* and the usual bug fixes and hole plugs
|
* and the usual bug fixes and hole plugs
|
||||||
*/
|
*/
|
||||||
@@ -333,14 +339,14 @@
|
|||||||
/*
|
/*
|
||||||
* Patch 6, November 19, 1989
|
* Patch 6, November 19, 1989
|
||||||
* add overlay support for MS-DOS (courtesy Pierre Martineau, Stephen
|
* add overlay support for MS-DOS (courtesy Pierre Martineau, Stephen
|
||||||
* Spackman, and Norm Meluch)
|
* Spackman, and Norm Meluch)
|
||||||
* refine Macintosh port
|
* refine Macintosh port
|
||||||
* different door states show as different symbols (courtesy Ari Huttunen)
|
* different door states show as different symbols (courtesy Ari Huttunen)
|
||||||
* smarter drawbridges (courtesy Kevin Darcy)
|
* smarter drawbridges (courtesy Kevin Darcy)
|
||||||
* add CLIPPING and split INFERNO off HARD
|
* add CLIPPING and split INFERNO off HARD
|
||||||
* further refine eating code wrt picking up and resumption
|
* further refine eating code wrt picking up and resumption
|
||||||
* make first few levels easier, by adding :x monsters and increasing initial
|
* 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
|
* teach '/' about configurable symbols
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -358,9 +364,9 @@
|
|||||||
* Patch 4, September 27, 1989
|
* Patch 4, September 27, 1989
|
||||||
* add support for VMS (courtesy David Gentzel)
|
* add support for VMS (courtesy David Gentzel)
|
||||||
* move monster-on-floor references into functions and implement the new
|
* 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"
|
* 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
|
* ifdef varargs usage to satisfy ANSI compilers
|
||||||
* standardize on the color 'gray'
|
* standardize on the color 'gray'
|
||||||
* assorted bug fixes
|
* assorted bug fixes
|
||||||
@@ -371,9 +377,9 @@
|
|||||||
* add war hammers and revise object prices
|
* add war hammers and revise object prices
|
||||||
* extend prototypes to ANSI compilers in addition to the previous MSDOS ones
|
* extend prototypes to ANSI compilers in addition to the previous MSDOS ones
|
||||||
* move object-on-floor references into functions in preparation for planned
|
* 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
|
* fix some more bugs, and extend the portability of things added in earlier
|
||||||
* patches
|
* patches
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -391,9 +397,9 @@
|
|||||||
/*
|
/*
|
||||||
* Patch 1, July 31, 1989
|
* Patch 1, July 31, 1989
|
||||||
* add support for Atari TOS (courtesy Eric Smith) and Andrew File System
|
* 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
|
* 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
|
* make a number of simple changes to accommodate various compilers
|
||||||
* fix a handful of bugs, and do some code cleaning elsewhere
|
* fix a handful of bugs, and do some code cleaning elsewhere
|
||||||
* add more instructions for new environments and things commonly done wrong
|
* add more instructions for new environments and things commonly done wrong
|
||||||
@@ -405,6 +411,6 @@
|
|||||||
|
|
||||||
/* Version 3.0 */
|
/* Version 3.0 */
|
||||||
|
|
||||||
/*****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
/*patchlevel.h*/
|
/*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.
|
// Copyright (c) Warwick Allison, 1999.
|
||||||
// NetHack may be freely redistributed. See license for details.
|
// 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(int x, int y);
|
||||||
static void qt_cliparound_window(winid wid, 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(const char *str);
|
||||||
static void qt_raw_print_bold(const char *str);
|
static void qt_raw_print_bold(const char *str);
|
||||||
static int qt_nhgetch();
|
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. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* 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
|
* USE_STDARG means use the ANSI <stdarg.h> facilities (only ANSI compilers
|
||||||
* should do this, and only if the library supports it).
|
* should do this, and only if the library supports it).
|
||||||
* USE_VARARGS means use the <varargs.h> facilities. Again, this should only
|
* 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.
|
* Otherwise, the kludgy old methods are used.
|
||||||
* The defaults are USE_STDARG for ANSI compilers, and USE_OLDARGS for
|
* The defaults are USE_STDARG for ANSI compilers, and USE_OLDARGS for
|
||||||
* others.
|
* others.
|
||||||
@@ -64,24 +64,24 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef NEED_VARARGS /* only define these if necessary */
|
#ifdef NEED_VARARGS /* only define these if necessary */
|
||||||
/*
|
/*
|
||||||
* These have changed since 3.4.3. VA_END() now provides an explicit
|
* 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
|
* closing brace to complement VA_DECL()'s hidden opening brace, so code
|
||||||
* started with VA_DECL() needs an extra opening brace to complement
|
* started with VA_DECL() needs an extra opening brace to complement
|
||||||
* the explicit final closing brace. This was done so that the source
|
* the explicit final closing brace. This was done so that the source
|
||||||
* would look less strange, where VA_DECL() appeared to introduce a
|
* would look less strange, where VA_DECL() appeared to introduce a
|
||||||
* function whose opening brace was missing; there are now visible and
|
* function whose opening brace was missing; there are now visible and
|
||||||
* invisible braces at beginning and end. Sample usage:
|
* invisible braces at beginning and end. Sample usage:
|
||||||
void foo VA_DECL(int, arg) --macro expansion has a hidden opening brace
|
void foo VA_DECL(int, arg) --macro expansion has a hidden opening brace
|
||||||
{ --new, explicit opening brace (actually introduces a nested block)
|
{ --new, explicit opening brace (actually introduces a nested block)
|
||||||
VA_START(bar);
|
VA_START(bar);
|
||||||
...code for foo...
|
...code for foo...
|
||||||
VA_END(); --expansion now provides a closing brace for the nested block
|
VA_END(); --expansion now provides a closing brace for the nested block
|
||||||
} --existing closing brace, still pairs with the hidden one in VA_DECL()
|
} --existing closing brace, still pairs with the hidden one in VA_DECL()
|
||||||
* Reading the code--or using source browsing tools which match braces--
|
* Reading the code--or using source browsing tools which match braces--
|
||||||
* results in seeing a matched set of braces. Usage of VA_END() is
|
* results in seeing a matched set of braces. Usage of VA_END() is
|
||||||
* potentially trickier, but nethack uses it in a straightforward manner.
|
* potentially trickier, but nethack uses it in a straightforward manner.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef USE_STDARG
|
#ifdef USE_STDARG
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
@@ -104,6 +104,7 @@
|
|||||||
#define _VA_LIST_ /* prevents multiple def in stdio.h */
|
#define _VA_LIST_ /* prevents multiple def in stdio.h */
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#ifdef USE_VARARGS
|
#ifdef USE_VARARGS
|
||||||
#include <varargs.h>
|
#include <varargs.h>
|
||||||
#define VA_DECL(typ1, var1) \
|
#define VA_DECL(typ1, var1) \
|
||||||
@@ -125,6 +126,8 @@
|
|||||||
va_end(the_args); \
|
va_end(the_args); \
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
/*USE_OLDARGS*/
|
||||||
#define VA_ARGS arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9
|
#define VA_ARGS arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9
|
||||||
#define VA_DECL(typ1, var1) \
|
#define VA_DECL(typ1, var1) \
|
||||||
(var1, VA_ARGS) typ1 var1; \
|
(var1, VA_ARGS) typ1 var1; \
|
||||||
@@ -137,10 +140,15 @@
|
|||||||
{
|
{
|
||||||
#define VA_START(x)
|
#define VA_START(x)
|
||||||
#define VA_INIT(var1, typ1)
|
#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
|
very last resort; manipulating arguments which haven't actually
|
||||||
been passed may or may not cause severe trouble depending on
|
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() \
|
#define VA_SHIFT() \
|
||||||
(arg1 = arg2, arg2 = arg3, arg3 = arg4, arg4 = arg5, arg5 = arg6, \
|
(arg1 = arg2, arg2 = arg3, arg3 = arg4, arg4 = arg5, arg5 = arg6, \
|
||||||
arg6 = arg7, arg7 = arg8, arg8 = arg9)
|
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. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -8,13 +8,13 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Some include files are in a different place under SYSV
|
* Some include files are in a different place under SYSV
|
||||||
* BSD SYSV
|
* BSD SYSV
|
||||||
* <sys/time.h> <time.h>
|
* <sys/time.h> <time.h>
|
||||||
* <sgtty.h> <termio.h>
|
* <sgtty.h> <termio.h>
|
||||||
*
|
*
|
||||||
* Some routines are called differently
|
* Some routines are called differently
|
||||||
* index strchr
|
* index strchr
|
||||||
* rindex strrchr
|
* rindex strrchr
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -46,18 +46,17 @@
|
|||||||
* job control (note that AIX is SYSV otherwise)
|
* job control (note that AIX is SYSV otherwise)
|
||||||
* Also define this for AIX 3.2 */
|
* Also define this for AIX 3.2 */
|
||||||
|
|
||||||
#define TERMINFO /* uses terminfo rather than termcap */
|
#define TERMINFO /* uses terminfo rather than termcap */
|
||||||
/* Should be defined for most SYSV, SVR4 (including
|
/* Should be defined for most SYSV, SVR4 (including
|
||||||
* Solaris 2+), HPUX, and Linux systems. In
|
* Solaris 2+), HPUX, and Linux systems. In
|
||||||
* particular, it should NOT be defined for the UNIXPC
|
* particular, it should NOT be defined for the UNIXPC
|
||||||
* unless you remove the use of the shared library in
|
* unless you remove the use of the shared library in
|
||||||
* the Makefile */
|
* the Makefile */
|
||||||
#define TEXTCOLOR /* Use System V r3.2 terminfo color support */
|
#define TEXTCOLOR /* Use System V r3.2 terminfo color support
|
||||||
/* and/or ANSI color support on termcap systems */
|
* and/or ANSI color support on termcap systems
|
||||||
/* and/or X11 color */
|
* and/or X11 color */
|
||||||
#define POSIX_JOB_CONTROL /* use System V / Solaris 2.x / POSIX job control \
|
#define POSIX_JOB_CONTROL /* use System V / Solaris 2.x / POSIX job control
|
||||||
*/
|
* (e.g., VSUSP) */
|
||||||
/* (e.g., VSUSP) */
|
|
||||||
#define POSIX_TYPES /* use POSIX types for system calls and termios */
|
#define POSIX_TYPES /* use POSIX types for system calls and termios */
|
||||||
/* Define for many recent OS releases, including
|
/* Define for many recent OS releases, including
|
||||||
* those with specific defines (since types are
|
* 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
|
* 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
|
* will be created in LOCKDIR using open() instead of in the playground using
|
||||||
* link().
|
* 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 */
|
/* #define NO_FILE_LINKS */ /* if no hard links */
|
||||||
@@ -109,8 +108,8 @@
|
|||||||
* If defined, it can be overridden by the environment variable PAGER.
|
* If defined, it can be overridden by the environment variable PAGER.
|
||||||
* Hack will use its internal pager if DEF_PAGER is not defined.
|
* Hack will use its internal pager if DEF_PAGER is not defined.
|
||||||
* (This might be preferable for security reasons.)
|
* (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.
|
* 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
|
* (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
|
* the user's home directory path to generate the Mailbox path - just in
|
||||||
* case other Andrew sites do it differently from CMU.
|
* case other Andrew sites do it differently from CMU.
|
||||||
*
|
* dan lovinger
|
||||||
* dan lovinger
|
* dl2n+@andrew.cmu.edu (dec 19 1989)
|
||||||
* dl2n+@andrew.cmu.edu (dec 19 1989)
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* #define AMS */ /* use Andrew message system for mail */
|
/* #define AMS */ /* use Andrew message system for mail */
|
||||||
@@ -158,8 +156,7 @@
|
|||||||
/* NO_MAILREADER is for kerberos authenticating filesystems where it is
|
/* NO_MAILREADER is for kerberos authenticating filesystems where it is
|
||||||
* essentially impossible to securely exec child processes, like mail
|
* essentially impossible to securely exec child processes, like mail
|
||||||
* readers, when the game is running under a special token.
|
* readers, when the game is running under a special token.
|
||||||
*
|
* dan
|
||||||
* dan
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* #define NO_MAILREADER */ /* have mail daemon just tell player of mail */
|
/* #define NO_MAILREADER */ /* have mail daemon just tell player of mail */
|
||||||
|
|||||||
+4
-10
@@ -401,19 +401,13 @@ register struct obj *obj;
|
|||||||
case SDOOR:
|
case SDOOR:
|
||||||
You_hear(hollow_str, "door");
|
You_hear(hollow_str, "door");
|
||||||
cvt_sdoor_to_door(lev); /* ->typ = DOOR */
|
cvt_sdoor_to_door(lev); /* ->typ = DOOR */
|
||||||
if (Blind)
|
feel_newsym(rx, ry);
|
||||||
feel_location(rx, ry);
|
|
||||||
else
|
|
||||||
newsym(rx, ry);
|
|
||||||
return res;
|
return res;
|
||||||
case SCORR:
|
case SCORR:
|
||||||
You_hear(hollow_str, "passage");
|
You_hear(hollow_str, "passage");
|
||||||
lev->typ = CORR;
|
lev->typ = CORR;
|
||||||
unblock_point(rx, ry);
|
unblock_point(rx, ry);
|
||||||
if (Blind)
|
feel_newsym(rx, ry);
|
||||||
feel_location(rx, ry);
|
|
||||||
else
|
|
||||||
newsym(rx, ry);
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2042,8 +2036,8 @@ boolean quietly;
|
|||||||
You("don't have enough room in here.");
|
You("don't have enough room in here.");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
x = cc->x;
|
x = cc ? cc->x : u.ux;
|
||||||
y = cc->y;
|
y = cc ? cc->y : u.uy;
|
||||||
if (!isok(x, y)) {
|
if (!isok(x, y)) {
|
||||||
if (!quietly)
|
if (!quietly)
|
||||||
You("cannot put the figurine there.");
|
You("cannot put the figurine there.");
|
||||||
|
|||||||
+4
-1
@@ -1404,7 +1404,10 @@ arti_invoke(obj)
|
|||||||
struct obj *obj;
|
struct obj *obj;
|
||||||
{
|
{
|
||||||
register const struct artifact *oart = get_artifact(obj);
|
register const struct artifact *oart = get_artifact(obj);
|
||||||
|
if (!obj) {
|
||||||
|
impossible("arti_invoke without obj");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
if (!oart || !oart->inv_prop) {
|
if (!oart || !oart->inv_prop) {
|
||||||
if (obj->otyp == CRYSTAL_BALL)
|
if (obj->otyp == CRYSTAL_BALL)
|
||||||
use_crystal_ball(&obj);
|
use_crystal_ball(&obj);
|
||||||
|
|||||||
@@ -385,7 +385,6 @@ extcmd_via_menu()
|
|||||||
biggest = 0;
|
biggest = 0;
|
||||||
while (!ret) {
|
while (!ret) {
|
||||||
i = n = 0;
|
i = n = 0;
|
||||||
accelerator = 0;
|
|
||||||
any = zeroany;
|
any = zeroany;
|
||||||
/* populate choices */
|
/* populate choices */
|
||||||
for (efp = extcmdlist; efp->ef_txt; efp++) {
|
for (efp = extcmdlist; efp->ef_txt; efp++) {
|
||||||
@@ -421,7 +420,7 @@ extcmd_via_menu()
|
|||||||
/* otherwise... */
|
/* otherwise... */
|
||||||
win = create_nhwindow(NHW_MENU);
|
win = create_nhwindow(NHW_MENU);
|
||||||
start_menu(win);
|
start_menu(win);
|
||||||
prevaccelerator = 0;
|
accelerator = prevaccelerator = 0;
|
||||||
acount = 0;
|
acount = 0;
|
||||||
for (i = 0; choices[i]; ++i) {
|
for (i = 0; choices[i]; ++i) {
|
||||||
accelerator = choices[i]->ef_txt[matchlevel];
|
accelerator = choices[i]->ef_txt[matchlevel];
|
||||||
@@ -1769,7 +1768,7 @@ int final;
|
|||||||
/* when mounted, Wounded_legs applies to steed rather than to
|
/* when mounted, Wounded_legs applies to steed rather than to
|
||||||
hero; we only report steed's wounded legs in wizard mode */
|
hero; we only report steed's wounded legs in wizard mode */
|
||||||
if (u.usteed) { /* not `Riding' here */
|
if (u.usteed) { /* not `Riding' here */
|
||||||
if (wizard) {
|
if (wizard && steedname) {
|
||||||
Strcpy(buf, steedname);
|
Strcpy(buf, steedname);
|
||||||
*buf = highc(*buf);
|
*buf = highc(*buf);
|
||||||
enl_msg(buf, " has", " had", " wounded legs", "");
|
enl_msg(buf, " has", " had", " wounded legs", "");
|
||||||
|
|||||||
+1
-1
@@ -388,7 +388,7 @@ const char *verb;
|
|||||||
static char wholebuf[80];
|
static char wholebuf[80];
|
||||||
|
|
||||||
Strcpy(wholebuf, is_u(etmp) ? "You" : Monnam(etmp->emon));
|
Strcpy(wholebuf, is_u(etmp) ? "You" : Monnam(etmp->emon));
|
||||||
if (!*verb)
|
if (!verb || !*verb)
|
||||||
return wholebuf;
|
return wholebuf;
|
||||||
Strcat(wholebuf, " ");
|
Strcat(wholebuf, " ");
|
||||||
if (is_u(etmp))
|
if (is_u(etmp))
|
||||||
|
|||||||
+1
-4
@@ -1291,10 +1291,7 @@ struct trap *trap;
|
|||||||
|
|
||||||
trap->tseen = 1;
|
trap->tseen = 1;
|
||||||
exercise(A_WIS, TRUE);
|
exercise(A_WIS, TRUE);
|
||||||
if (Blind)
|
feel_newsym(trap->tx, trap->ty);
|
||||||
feel_location(trap->tx, trap->ty);
|
|
||||||
else
|
|
||||||
newsym(trap->tx, trap->ty);
|
|
||||||
|
|
||||||
if (levl[trap->tx][trap->ty].glyph != trap_to_glyph(trap)) {
|
if (levl[trap->tx][trap->ty].glyph != trap_to_glyph(trap)) {
|
||||||
/* There's too much clutter to see your find otherwise */
|
/* There's too much clutter to see your find otherwise */
|
||||||
|
|||||||
@@ -81,10 +81,7 @@ boolean waslit, rockit;
|
|||||||
lev->typ = (rockit ? STONE : ROOM);
|
lev->typ = (rockit ? STONE : ROOM);
|
||||||
if (dist >= 3)
|
if (dist >= 3)
|
||||||
impossible("mkcavepos called with dist %d", dist);
|
impossible("mkcavepos called with dist %d", dist);
|
||||||
if (Blind)
|
feel_newsym(x, y);
|
||||||
feel_location(x, y);
|
|
||||||
else
|
|
||||||
newsym(x, y);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC_OVL void
|
STATIC_OVL void
|
||||||
@@ -437,10 +434,7 @@ dig(VOID_ARGS)
|
|||||||
|
|
||||||
if (!does_block(dpx, dpy, &levl[dpx][dpy]))
|
if (!does_block(dpx, dpy, &levl[dpx][dpy]))
|
||||||
unblock_point(dpx, dpy); /* vision: can see through */
|
unblock_point(dpx, dpy); /* vision: can see through */
|
||||||
if (Blind)
|
feel_newsym(dpx, dpy);
|
||||||
feel_location(dpx, dpy);
|
|
||||||
else
|
|
||||||
newsym(dpx, dpy);
|
|
||||||
if (digtxt && !context.digging.quiet)
|
if (digtxt && !context.digging.quiet)
|
||||||
pline1(digtxt); /* after newsym */
|
pline1(digtxt); /* after newsym */
|
||||||
if (dmgtxt)
|
if (dmgtxt)
|
||||||
@@ -1989,7 +1983,8 @@ long timeout;
|
|||||||
if (mtmp && !OBJ_AT(x, y) && mtmp->mundetected
|
if (mtmp && !OBJ_AT(x, y) && mtmp->mundetected
|
||||||
&& hides_under(mtmp->data)) {
|
&& hides_under(mtmp->data)) {
|
||||||
mtmp->mundetected = 0;
|
mtmp->mundetected = 0;
|
||||||
}
|
} else if (x == u.ux && y == u.uy && u.uundetected && hides_under(youmonst.data))
|
||||||
|
(void) hideunder(&youmonst);
|
||||||
newsym(x, y);
|
newsym(x, y);
|
||||||
} else if (in_invent)
|
} else if (in_invent)
|
||||||
update_inventory();
|
update_inventory();
|
||||||
|
|||||||
@@ -486,6 +486,23 @@ register struct monst *mon;
|
|||||||
show_glyph(x, y, glyph);
|
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()
|
* feel_location()
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1123,6 +1123,10 @@ register struct obj *otmp;
|
|||||||
{
|
{
|
||||||
boolean was_blind = Blind, changed = FALSE;
|
boolean was_blind = Blind, changed = FALSE;
|
||||||
|
|
||||||
|
if (!otmp) {
|
||||||
|
impossible("Blindf_off without otmp");
|
||||||
|
return;
|
||||||
|
}
|
||||||
context.takeoff.mask &= ~W_TOOL;
|
context.takeoff.mask &= ~W_TOOL;
|
||||||
setworn((struct obj *) 0, otmp->owornmask);
|
setworn((struct obj *) 0, otmp->owornmask);
|
||||||
off_msg(otmp);
|
off_msg(otmp);
|
||||||
|
|||||||
+3
-12
@@ -973,10 +973,7 @@ dokick()
|
|||||||
} else if (maploc->doormask != D_NODOOR
|
} else if (maploc->doormask != D_NODOOR
|
||||||
&& !(maploc->doormask & D_LOCKED))
|
&& !(maploc->doormask & D_LOCKED))
|
||||||
maploc->doormask = D_ISOPEN;
|
maploc->doormask = D_ISOPEN;
|
||||||
if (Blind)
|
feel_newsym(x, y); /* we know it's gone */
|
||||||
feel_location(x, y); /* we know it's gone */
|
|
||||||
else
|
|
||||||
newsym(x, y);
|
|
||||||
if (maploc->doormask == D_ISOPEN
|
if (maploc->doormask == D_ISOPEN
|
||||||
|| maploc->doormask == D_NODOOR)
|
|| maploc->doormask == D_NODOOR)
|
||||||
unblock_point(x, y); /* vision */
|
unblock_point(x, y); /* vision */
|
||||||
@@ -989,10 +986,7 @@ dokick()
|
|||||||
pline("Crash! You kick open a secret passage!");
|
pline("Crash! You kick open a secret passage!");
|
||||||
exercise(A_DEX, TRUE);
|
exercise(A_DEX, TRUE);
|
||||||
maploc->typ = CORR;
|
maploc->typ = CORR;
|
||||||
if (Blind)
|
feel_newsym(x, y); /* we know it's gone */
|
||||||
feel_location(x, y); /* we know it's gone */
|
|
||||||
else
|
|
||||||
newsym(x, y);
|
|
||||||
unblock_point(x, y); /* vision */
|
unblock_point(x, y); /* vision */
|
||||||
return 1;
|
return 1;
|
||||||
} else
|
} else
|
||||||
@@ -1267,10 +1261,7 @@ dokick()
|
|||||||
exercise(A_STR, TRUE);
|
exercise(A_STR, TRUE);
|
||||||
maploc->doormask = D_BROKEN;
|
maploc->doormask = D_BROKEN;
|
||||||
}
|
}
|
||||||
if (Blind)
|
feel_newsym(x, y); /* we know we broke it */
|
||||||
feel_location(x, y); /* we know we broke it */
|
|
||||||
else
|
|
||||||
newsym(x, y);
|
|
||||||
unblock_point(x, y); /* vision */
|
unblock_point(x, y); /* vision */
|
||||||
if (shopdoor) {
|
if (shopdoor) {
|
||||||
add_damage(x, y, 400L);
|
add_damage(x, y, 400L);
|
||||||
|
|||||||
+2
-3
@@ -1161,10 +1161,9 @@ boolean
|
|||||||
; /* missile has already been handled */
|
; /* missile has already been handled */
|
||||||
} else if (u.uswallow) {
|
} else if (u.uswallow) {
|
||||||
/* ball is not picked up by monster */
|
/* ball is not picked up by monster */
|
||||||
if (obj != uball) {
|
if (obj != uball)
|
||||||
(void) mpickobj(u.ustuck, obj);
|
(void) mpickobj(u.ustuck, obj);
|
||||||
thrownobj = (struct obj *) 0;
|
thrownobj = (struct obj *) 0;
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
/* the code following might become part of dropy() */
|
/* the code following might become part of dropy() */
|
||||||
if (obj->oartifact == ART_MJOLLNIR && Role_if(PM_VALKYRIE)
|
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. */
|
/* Copyright (c) NetHack Development Team 1992. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -520,9 +520,7 @@ boolean name_too;
|
|||||||
free((genericptr_t) symset[which_set].desc);
|
free((genericptr_t) symset[which_set].desc);
|
||||||
symset[which_set].desc = (char *) 0;
|
symset[which_set].desc = (char *) 0;
|
||||||
|
|
||||||
symset[which_set].nocolor = 0;
|
|
||||||
symset[which_set].handling = H_UNK;
|
symset[which_set].handling = H_UNK;
|
||||||
symset[which_set].desc = (char *) 0;
|
|
||||||
symset[which_set].nocolor = 0;
|
symset[which_set].nocolor = 0;
|
||||||
/* initialize restriction bits */
|
/* initialize restriction bits */
|
||||||
symset[which_set].primary = 0;
|
symset[which_set].primary = 0;
|
||||||
|
|||||||
@@ -271,7 +271,10 @@ STATIC_OVL void
|
|||||||
recalc_wt()
|
recalc_wt()
|
||||||
{
|
{
|
||||||
struct obj *piece = context.victual.piece;
|
struct obj *piece = context.victual.piece;
|
||||||
|
if (!piece) {
|
||||||
|
impossible("recalc_wt without piece");
|
||||||
|
return;
|
||||||
|
}
|
||||||
debugpline1("Old weight = %d", piece->owt);
|
debugpline1("Old weight = %d", piece->owt);
|
||||||
debugpline2("Used time = %d, Req'd time = %d", context.victual.usedtime,
|
debugpline2("Used time = %d, Req'd time = %d", context.victual.usedtime,
|
||||||
context.victual.reqtime);
|
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. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -627,7 +627,7 @@ boolean taken;
|
|||||||
{
|
{
|
||||||
char c = 0, defquery;
|
char c = 0, defquery;
|
||||||
char qbuf[QBUFSZ];
|
char qbuf[QBUFSZ];
|
||||||
boolean ask;
|
boolean ask = FALSE;
|
||||||
|
|
||||||
if (invent && !done_stopprint) {
|
if (invent && !done_stopprint) {
|
||||||
if (taken)
|
if (taken)
|
||||||
@@ -1094,6 +1094,7 @@ die:
|
|||||||
/* clean up unneeded windows */
|
/* clean up unneeded windows */
|
||||||
if (have_windows) {
|
if (have_windows) {
|
||||||
wait_synch();
|
wait_synch();
|
||||||
|
free_pickinv_cache(); /* extra persistent window if perm_invent */
|
||||||
if (WIN_INVEN != WIN_ERR)
|
if (WIN_INVEN != WIN_ERR)
|
||||||
destroy_nhwindow(WIN_INVEN), WIN_INVEN = WIN_ERR;
|
destroy_nhwindow(WIN_INVEN), WIN_INVEN = WIN_ERR;
|
||||||
display_nhwindow(WIN_MESSAGE, TRUE);
|
display_nhwindow(WIN_MESSAGE, TRUE);
|
||||||
@@ -1122,13 +1123,12 @@ die:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!done_stopprint) {
|
if (!done_stopprint) {
|
||||||
Sprintf(
|
Sprintf(pbuf, "%s %s the %s...", Goodbye(), plname,
|
||||||
pbuf, "%s %s the %s...", Goodbye(), plname,
|
(how != ASCENDED)
|
||||||
how != ASCENDED
|
? (const char *) ((flags.female && urole.name.f)
|
||||||
? (const char *) ((flags.female && urole.name.f)
|
|
||||||
? urole.name.f
|
? urole.name.f
|
||||||
: urole.name.m)
|
: urole.name.m)
|
||||||
: (const char *) (flags.female ? "Demigoddess" : "Demigod"));
|
: (const char *) (flags.female ? "Demigoddess" : "Demigod"));
|
||||||
putstr(endwin, 0, pbuf);
|
putstr(endwin, 0, pbuf);
|
||||||
putstr(endwin, 0, "");
|
putstr(endwin, 0, "");
|
||||||
}
|
}
|
||||||
@@ -1254,10 +1254,9 @@ die:
|
|||||||
putstr(endwin, 0, pbuf);
|
putstr(endwin, 0, pbuf);
|
||||||
}
|
}
|
||||||
if (!done_stopprint) {
|
if (!done_stopprint) {
|
||||||
Sprintf(
|
Sprintf(pbuf,
|
||||||
pbuf,
|
|
||||||
"You were level %d with a maximum of %d hit point%s when you %s.",
|
"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, pbuf);
|
||||||
putstr(endwin, 0, "");
|
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. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -3421,20 +3421,55 @@ boolean wildcards;
|
|||||||
/* ---------- BEGIN TRIBUTE ----------- */
|
/* ---------- BEGIN TRIBUTE ----------- */
|
||||||
|
|
||||||
/* 3.6 tribute code
|
/* 3.6 tribute code
|
||||||
*
|
|
||||||
* Returns TRUE if you were able to read something.
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define SECTIONSCOPE 1
|
#define SECTIONSCOPE 1
|
||||||
#define TITLESCOPE 2
|
#define TITLESCOPE 2
|
||||||
#define PASSAGESCOPE 3
|
#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
|
boolean
|
||||||
read_tribute(tribsection, tribtitle, tribpassage, nowin_buf, bufsz)
|
read_tribute(tribsection, tribtitle, tribpassage, nowin_buf, bufsz, oid)
|
||||||
const char *tribsection, *tribtitle;
|
const char *tribsection, *tribtitle;
|
||||||
int tribpassage, bufsz;
|
int tribpassage, bufsz;
|
||||||
char *nowin_buf;
|
char *nowin_buf;
|
||||||
|
unsigned oid; /* book identifier */
|
||||||
{
|
{
|
||||||
dlb *fp;
|
dlb *fp;
|
||||||
char *endp;
|
char *endp;
|
||||||
@@ -3510,22 +3545,17 @@ char *nowin_buf;
|
|||||||
if ((p2 = index(p1, ')')) != 0) {
|
if ((p2 = index(p1, ')')) != 0) {
|
||||||
*p2 = '\0';
|
*p2 = '\0';
|
||||||
passagecnt = atoi(p1);
|
passagecnt = atoi(p1);
|
||||||
/* sanity check here caps #passages at 50 */
|
if (passagecnt > MAXPASSAGES)
|
||||||
if ((passagecnt > 0) && (passagecnt < 50)) {
|
passagecnt = MAXPASSAGES;
|
||||||
scope = TITLESCOPE;
|
scope = TITLESCOPE;
|
||||||
if (matchedsection && !strcmpi(st, tribtitle)) {
|
if (matchedsection && !strcmpi(st, tribtitle)) {
|
||||||
matchedtitle = TRUE;
|
matchedtitle = TRUE;
|
||||||
if (!tribpassage) {
|
targetpassage = !tribpassage
|
||||||
targetpassage = rnd(passagecnt);
|
? choose_passage(passagecnt, oid)
|
||||||
} else {
|
: (tribpassage <= passagecnt)
|
||||||
if (tribpassage <= passagecnt)
|
? tribpassage : 0;
|
||||||
targetpassage = tribpassage;
|
} else {
|
||||||
else
|
matchedtitle = FALSE;
|
||||||
targetpassage = 0;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
matchedtitle = FALSE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3610,8 +3640,11 @@ Death_quote(buf, bufsz)
|
|||||||
char *buf;
|
char *buf;
|
||||||
int bufsz;
|
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 ----------- */
|
/* ---------- END TRIBUTE ----------- */
|
||||||
|
|
||||||
/*files.c*/
|
/*files.c*/
|
||||||
|
|||||||
+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. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* 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 */
|
then regrown to full inventory, possibly being resized in the process */
|
||||||
static winid cached_pickinv_win = WIN_ERR;
|
static winid cached_pickinv_win = WIN_ERR;
|
||||||
|
|
||||||
/* #ifdef FREE_ALL_MEMORY */
|
|
||||||
void
|
void
|
||||||
free_pickinv_cache()
|
free_pickinv_cache()
|
||||||
{
|
{
|
||||||
@@ -1994,7 +1993,6 @@ free_pickinv_cache()
|
|||||||
cached_pickinv_win = WIN_ERR;
|
cached_pickinv_win = WIN_ERR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* #endif */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Internal function used by display_inventory and getobj that can display
|
* 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 */
|
return actions[3]; /* same as lock_pick */
|
||||||
else if (xlock.door)
|
else if (xlock.door)
|
||||||
return actions[0]; /* "unlocking the door" */
|
return actions[0]; /* "unlocking the door" */
|
||||||
else
|
else if (xlock.box)
|
||||||
return xlock.box->otyp == CHEST ? actions[1] : actions[2];
|
return xlock.box->otyp == CHEST ? actions[1] : actions[2];
|
||||||
|
else
|
||||||
|
return actions[3];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* try to open/close a lock */
|
/* try to open/close a lock */
|
||||||
@@ -648,10 +650,7 @@ int x, y;
|
|||||||
add_damage(cc.x, cc.y, 0L);
|
add_damage(cc.x, cc.y, 0L);
|
||||||
} else
|
} else
|
||||||
door->doormask = D_ISOPEN;
|
door->doormask = D_ISOPEN;
|
||||||
if (Blind)
|
feel_newsym(cc.x, cc.y); /* the hero knows she opened it */
|
||||||
feel_location(cc.x, cc.y); /* the hero knows she opened it */
|
|
||||||
else
|
|
||||||
newsym(cc.x, cc.y);
|
|
||||||
unblock_point(cc.x, cc.y); /* vision: new see through there */
|
unblock_point(cc.x, cc.y); /* vision: new see through there */
|
||||||
} else {
|
} else {
|
||||||
exercise(A_STR, TRUE);
|
exercise(A_STR, TRUE);
|
||||||
@@ -781,10 +780,7 @@ doclose()
|
|||||||
|| rn2(25) < (ACURRSTR + ACURR(A_DEX) + ACURR(A_CON)) / 3) {
|
|| rn2(25) < (ACURRSTR + ACURR(A_DEX) + ACURR(A_CON)) / 3) {
|
||||||
pline_The("door closes.");
|
pline_The("door closes.");
|
||||||
door->doormask = D_CLOSED;
|
door->doormask = D_CLOSED;
|
||||||
if (Blind)
|
feel_newsym(x, y); /* the hero knows she closed it */
|
||||||
feel_location(x, y); /* the hero knows she closed it */
|
|
||||||
else
|
|
||||||
newsym(x, y);
|
|
||||||
block_point(x, y); /* vision: no longer see there */
|
block_point(x, y); /* vision: no longer see there */
|
||||||
} else {
|
} else {
|
||||||
exercise(A_STR, TRUE);
|
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
|
int
|
||||||
bagotricks(bag, tipping, seencount)
|
bagotricks(bag, tipping, seencount)
|
||||||
struct obj *bag;
|
struct obj *bag;
|
||||||
|
|||||||
+4
-4
@@ -824,7 +824,7 @@ bound_digging()
|
|||||||
return; /* everything diggable here */
|
return; /* everything diggable here */
|
||||||
|
|
||||||
found = nonwall = FALSE;
|
found = nonwall = FALSE;
|
||||||
for (xmin = 0; !found; xmin++) {
|
for (xmin = 0; !found && xmin <= COLNO; xmin++) {
|
||||||
lev = &levl[xmin][0];
|
lev = &levl[xmin][0];
|
||||||
for (y = 0; y <= ROWNO - 1; y++, lev++) {
|
for (y = 0; y <= ROWNO - 1; y++, lev++) {
|
||||||
typ = lev->typ;
|
typ = lev->typ;
|
||||||
@@ -840,7 +840,7 @@ bound_digging()
|
|||||||
xmin = 0;
|
xmin = 0;
|
||||||
|
|
||||||
found = nonwall = FALSE;
|
found = nonwall = FALSE;
|
||||||
for (xmax = COLNO - 1; !found; xmax--) {
|
for (xmax = COLNO - 1; !found && xmax >= 0; xmax--) {
|
||||||
lev = &levl[xmax][0];
|
lev = &levl[xmax][0];
|
||||||
for (y = 0; y <= ROWNO - 1; y++, lev++) {
|
for (y = 0; y <= ROWNO - 1; y++, lev++) {
|
||||||
typ = lev->typ;
|
typ = lev->typ;
|
||||||
@@ -856,7 +856,7 @@ bound_digging()
|
|||||||
xmax = COLNO - 1;
|
xmax = COLNO - 1;
|
||||||
|
|
||||||
found = nonwall = FALSE;
|
found = nonwall = FALSE;
|
||||||
for (ymin = 0; !found; ymin++) {
|
for (ymin = 0; !found && ymin <= ROWNO; ymin++) {
|
||||||
lev = &levl[xmin][ymin];
|
lev = &levl[xmin][ymin];
|
||||||
for (x = xmin; x <= xmax; x++, lev += ROWNO) {
|
for (x = xmin; x <= xmax; x++, lev += ROWNO) {
|
||||||
typ = lev->typ;
|
typ = lev->typ;
|
||||||
@@ -870,7 +870,7 @@ bound_digging()
|
|||||||
ymin -= (nonwall || !level.flags.is_maze_lev) ? 2 : 1;
|
ymin -= (nonwall || !level.flags.is_maze_lev) ? 2 : 1;
|
||||||
|
|
||||||
found = nonwall = FALSE;
|
found = nonwall = FALSE;
|
||||||
for (ymax = ROWNO - 1; !found; ymax--) {
|
for (ymax = ROWNO - 1; !found && ymax >= 0; ymax--) {
|
||||||
lev = &levl[xmin][ymax];
|
lev = &levl[xmin][ymax];
|
||||||
for (x = xmin; x <= xmax; x++, lev += ROWNO) {
|
for (x = xmin; x <= xmax; x++, lev += ROWNO) {
|
||||||
typ = lev->typ;
|
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. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -79,21 +79,25 @@ newoextra()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
dealloc_oextra(x)
|
dealloc_oextra(o)
|
||||||
struct oextra *x;
|
struct obj *o;
|
||||||
{
|
{
|
||||||
|
struct oextra *x = o->oextra;
|
||||||
|
|
||||||
if (x) {
|
if (x) {
|
||||||
if (x->oname)
|
if (x->oname)
|
||||||
free((genericptr_t) x->oname);
|
free((genericptr_t) x->oname);
|
||||||
if (x->omonst)
|
if (x->omonst)
|
||||||
free((genericptr_t) x->omonst);
|
free_omonst(o); /* 'o' rather than 'x' */
|
||||||
if (x->omid)
|
if (x->omid)
|
||||||
free((genericptr_t) x->omid);
|
free((genericptr_t) x->omid);
|
||||||
if (x->olong)
|
if (x->olong)
|
||||||
free((genericptr_t) x->olong);
|
free((genericptr_t) x->olong);
|
||||||
if (x->omailcmd)
|
if (x->omailcmd)
|
||||||
free((genericptr_t) x->omailcmd);
|
free((genericptr_t) x->omailcmd);
|
||||||
|
|
||||||
free((genericptr_t) x);
|
free((genericptr_t) x);
|
||||||
|
o->oextra = (struct oextra *) 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,8 +108,13 @@ struct obj *otmp;
|
|||||||
if (!otmp->oextra)
|
if (!otmp->oextra)
|
||||||
otmp->oextra = newoextra();
|
otmp->oextra = newoextra();
|
||||||
if (!OMONST(otmp)) {
|
if (!OMONST(otmp)) {
|
||||||
OMONST(otmp) = (struct monst *) alloc(sizeof (struct monst));
|
struct monst *m = newmonst();
|
||||||
(void) memset((genericptr_t) OMONST(otmp), 0, sizeof (struct monst));
|
|
||||||
|
/* 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)
|
free_omonst(otmp)
|
||||||
struct obj *otmp;
|
struct obj *otmp;
|
||||||
{
|
{
|
||||||
if (otmp->oextra && OMONST(otmp)) {
|
if (otmp->oextra) {
|
||||||
free((genericptr_t) OMONST(otmp));
|
struct monst *m = OMONST(otmp);
|
||||||
OMONST(otmp) = (struct monst *) 0;
|
|
||||||
|
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);
|
newomonst(obj);
|
||||||
if (has_omonst(obj)) {
|
if (has_omonst(obj)) {
|
||||||
struct monst *mtmp2 = OMONST(obj);
|
struct monst *mtmp2 = OMONST(obj);
|
||||||
|
|
||||||
*mtmp2 = *mtmp;
|
*mtmp2 = *mtmp;
|
||||||
mtmp2->mextra = (struct mextra *) 0;
|
mtmp2->mextra = (struct mextra *) 0;
|
||||||
if (mtmp->data)
|
if (mtmp->data)
|
||||||
@@ -2053,7 +2069,7 @@ struct obj *obj;
|
|||||||
kickedobj = 0;
|
kickedobj = 0;
|
||||||
|
|
||||||
if (obj->oextra)
|
if (obj->oextra)
|
||||||
dealloc_oextra(obj->oextra);
|
dealloc_oextra(obj);
|
||||||
free((genericptr_t) obj);
|
free((genericptr_t) obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -422,7 +422,7 @@ int mm_flags;
|
|||||||
|
|
||||||
while (cnt--) {
|
while (cnt--) {
|
||||||
mdat = morguemon();
|
mdat = morguemon();
|
||||||
if (enexto(&cc, mm->x, mm->y, mdat)
|
if (mdat && enexto(&cc, mm->x, mm->y, mdat)
|
||||||
&& (!revive_corpses
|
&& (!revive_corpses
|
||||||
|| !(otmp = sobj_at(CORPSE, cc.x, cc.y))
|
|| !(otmp = sobj_at(CORPSE, cc.x, cc.y))
|
||||||
|| !revive(otmp, FALSE)))
|
|| !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. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* 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 long FDECL(mm_displacement, (struct monst *, struct monst *));
|
||||||
STATIC_DCL int NDECL(pick_animal);
|
STATIC_DCL int NDECL(pick_animal);
|
||||||
STATIC_DCL void FDECL(kill_eggs, (struct obj *));
|
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 int FDECL(pickvampshape, (struct monst *));
|
||||||
STATIC_DCL boolean FDECL(isspecmon, (struct monst *));
|
STATIC_DCL boolean FDECL(isspecmon, (struct monst *));
|
||||||
STATIC_DCL boolean FDECL(validspecmon, (struct monst *, int));
|
STATIC_DCL boolean FDECL(validspecmon, (struct monst *, int));
|
||||||
@@ -392,6 +391,8 @@ unsigned corpseflags;
|
|||||||
}
|
}
|
||||||
/* All special cases should precede the G_NOCORPSE check */
|
/* All special cases should precede the G_NOCORPSE check */
|
||||||
|
|
||||||
|
if (!obj) return NULL;
|
||||||
|
|
||||||
/* if polymorph or undead turning has killed this monster,
|
/* if polymorph or undead turning has killed this monster,
|
||||||
prevent the same attack beam from hitting its corpse */
|
prevent the same attack beam from hitting its corpse */
|
||||||
if (context.bypasses)
|
if (context.bypasses)
|
||||||
@@ -1597,10 +1598,12 @@ struct monst *mtmp2, *mtmp1;
|
|||||||
MCORPSENM(mtmp2) = MCORPSENM(mtmp1);
|
MCORPSENM(mtmp2) = MCORPSENM(mtmp1);
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC_OVL void
|
void
|
||||||
dealloc_mextra(x)
|
dealloc_mextra(m)
|
||||||
struct mextra *x;
|
struct monst *m;
|
||||||
{
|
{
|
||||||
|
struct mextra *x = m->mextra;
|
||||||
|
|
||||||
if (x) {
|
if (x) {
|
||||||
if (x->mname)
|
if (x->mname)
|
||||||
free((genericptr_t) x->mname);
|
free((genericptr_t) x->mname);
|
||||||
@@ -1615,7 +1618,9 @@ struct mextra *x;
|
|||||||
if (x->edog)
|
if (x->edog)
|
||||||
free((genericptr_t) x->edog);
|
free((genericptr_t) x->edog);
|
||||||
/* [no action needed for x->mcorpsenm] */
|
/* [no action needed for x->mcorpsenm] */
|
||||||
|
|
||||||
free((genericptr_t) x);
|
free((genericptr_t) x);
|
||||||
|
m->mextra = (struct mextra *) 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1626,7 +1631,7 @@ struct monst *mon;
|
|||||||
if (mon->nmon)
|
if (mon->nmon)
|
||||||
panic("dealloc_monst with nmon");
|
panic("dealloc_monst with nmon");
|
||||||
if (mon->mextra)
|
if (mon->mextra)
|
||||||
dealloc_mextra(mon->mextra);
|
dealloc_mextra(mon);
|
||||||
free((genericptr_t) mon);
|
free((genericptr_t) mon);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+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 $ */
|
/* 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. */
|
/* Copyright (c) Mike Threepoint, 1989. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* 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("punishment", "VE FORBRYDERNE", 1, 15, 300),
|
||||||
SCROLL("charging", "HACKEM MUCHE", 1, 15, 300),
|
SCROLL("charging", "HACKEM MUCHE", 1, 15, 300),
|
||||||
SCROLL("stinking cloud", "VELOX NEB", 1, 15, 300),
|
SCROLL("stinking cloud", "VELOX NEB", 1, 15, 300),
|
||||||
/* extra descriptions, shuffled into use at start of new game */
|
/* Extra descriptions, shuffled into use at start of new game.
|
||||||
SCROLL(None, "FOOBIE BLETCH", 1, 0, 100),
|
* Code in win/share/tilemap.c depends on SCR_STINKING_CLOUD preceding
|
||||||
SCROLL(None, "TEMOV", 1, 0, 100),
|
* these and on how many of them there are. If a real scroll gets added
|
||||||
SCROLL(None, "GARVEN DEH", 1, 0, 100),
|
* after stinking cloud or the number of extra descriptions changes,
|
||||||
SCROLL(None, "READ ME", 1, 0, 100),
|
* tilemap.c must be modified to match.
|
||||||
SCROLL(None, "ETAOIN SHRDLU", 1, 0, 100),
|
*/
|
||||||
SCROLL(None, "LOREM IPSUM", 1, 0, 100),
|
SCROLL(None, "FOOBIE BLETCH", 1, 0, 100),
|
||||||
SCROLL(None, "FNORD", 1, 0, 100), /* Illuminati */
|
SCROLL(None, "TEMOV", 1, 0, 100),
|
||||||
SCROLL(None, "KO BATE", 1, 0, 100), /* Kurd Lasswitz */
|
SCROLL(None, "GARVEN DEH", 1, 0, 100),
|
||||||
SCROLL(None, "ABRA KA DABRA", 1, 0, 100), /* traditional incantation */
|
SCROLL(None, "READ ME", 1, 0, 100),
|
||||||
SCROLL(None, "ASHPD SODALG", 1, 0, 100), /* Portal */
|
SCROLL(None, "ETAOIN SHRDLU", 1, 0, 100),
|
||||||
SCROLL(None, "ZLORFIK", 1, 0, 100), /* Zak McKracken */
|
SCROLL(None, "LOREM IPSUM", 1, 0, 100),
|
||||||
SCROLL(None, "GNIK SISI VLE", 1, 0, 100), /* Zak McKracken */
|
SCROLL(None, "FNORD", 1, 0, 100), /* Illuminati */
|
||||||
SCROLL(None, "HAPAX LEGOMENON", 1, 0, 100),
|
SCROLL(None, "KO BATE", 1, 0, 100), /* Kurd Lasswitz */
|
||||||
SCROLL(None, "EIRIS SAZUN IDISI", 1, 0, 100), /* Merseburg Incantations */
|
SCROLL(None, "ABRA KA DABRA", 1, 0, 100), /* traditional incantation */
|
||||||
SCROLL(None, "PHOL ENDE WODAN", 1, 0, 100), /* Merseburg Incantations */
|
SCROLL(None, "ASHPD SODALG", 1, 0, 100), /* Portal */
|
||||||
SCROLL(None, "GHOTI", 1, 0, 100), /* pronounced as 'fish', George Bernard Shaw */
|
SCROLL(None, "ZLORFIK", 1, 0, 100), /* Zak McKracken */
|
||||||
SCROLL(None, "MAPIRO MAHAMA DIROMAT", 1, 0, 100), /* Wizardry */
|
SCROLL(None, "GNIK SISI VLE", 1, 0, 100), /* Zak McKracken */
|
||||||
SCROLL(None, "VAS CORP BET MANI", 1, 0, 100), /* Ultima */
|
SCROLL(None, "HAPAX LEGOMENON", 1, 0, 100),
|
||||||
SCROLL(None, "XOR OTA", 1, 0, 100), /* Aarne Haapakoski */
|
SCROLL(None, "EIRIS SAZUN IDISI", 1, 0, 100), /* Merseburg Incantations */
|
||||||
SCROLL(None, "STRC PRST SKRZ KRK", 1, 0, 100), /* Czech and Slovak tongue-twister */
|
SCROLL(None, "PHOL ENDE WODAN", 1, 0, 100), /* Merseburg Incantations */
|
||||||
/* these must come last because they have special descriptions
|
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
|
#ifdef MAIL
|
||||||
SCROLL("mail", "stamped", 0, 0, 0),
|
SCROLL("mail", "stamped", 0, 0, 0),
|
||||||
#endif
|
#endif
|
||||||
SCROLL("blank paper", "unlabeled", 0, 28, 60),
|
SCROLL("blank paper", "unlabeled", 0, 28, 60),
|
||||||
#undef SCROLL
|
#undef SCROLL
|
||||||
|
|
||||||
/* spellbooks ... */
|
/* 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. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -2364,6 +2364,13 @@ struct alt_spellings {
|
|||||||
{ "grappling iron", GRAPPLING_HOOK },
|
{ "grappling iron", GRAPPLING_HOOK },
|
||||||
{ "grapnel", GRAPPLING_HOOK },
|
{ "grapnel", GRAPPLING_HOOK },
|
||||||
{ "grapple", 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 },
|
{ (const char *) 0, 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -2429,7 +2436,6 @@ struct obj *no_wish;
|
|||||||
* "2 3 alarm chilis". Currently this isn't allowed; options.c
|
* "2 3 alarm chilis". Currently this isn't allowed; options.c
|
||||||
* automatically sticks 'candied' in front of such names.
|
* automatically sticks 'candied' in front of such names.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
char oclass;
|
char oclass;
|
||||||
char *un, *dn, *actualn;
|
char *un, *dn, *actualn;
|
||||||
const char *name = 0;
|
const char *name = 0;
|
||||||
@@ -2556,35 +2562,44 @@ struct obj *no_wish;
|
|||||||
}
|
}
|
||||||
if (!cnt)
|
if (!cnt)
|
||||||
cnt = 1; /* %% what with "gems" etc. ? */
|
cnt = 1; /* %% what with "gems" etc. ? */
|
||||||
if (strlen(bp) > 1) {
|
if (strlen(bp) > 1 && (p = rindex(bp, '(')) != 0) {
|
||||||
if ((p = rindex(bp, '(')) != 0) {
|
boolean keeptrailingchars = TRUE;
|
||||||
if (p > bp && p[-1] == ' ')
|
|
||||||
p[-1] = 0;
|
p[(p > bp && p[-1] == ' ') ? -1 : 0] = '\0'; /*terminate bp */
|
||||||
else
|
++p; /* advance past '(' */
|
||||||
*p = 0;
|
if (!strncmpi(p, "lit)", 4)) {
|
||||||
p++;
|
islit = 1;
|
||||||
if (!strcmpi(p, "lit)")) {
|
p += 4 - 1; /* point at ')' */
|
||||||
islit = 1;
|
} else {
|
||||||
} else {
|
spe = atoi(p);
|
||||||
|
while (digit(*p))
|
||||||
|
p++;
|
||||||
|
if (*p == ':') {
|
||||||
|
p++;
|
||||||
|
rechrg = spe;
|
||||||
spe = atoi(p);
|
spe = atoi(p);
|
||||||
while (digit(*p))
|
while (digit(*p))
|
||||||
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;
|
goto typfnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!BSTRCMPI(bp, p - 6, " stone")) {
|
if (!BSTRCMPI(bp, p - 6, " stone") || !BSTRCMPI(bp, p - 4, " gem")) {
|
||||||
p[-6] = 0;
|
p[!strcmpi(p - 4, " gem") ? -4 : -6] = '\0';
|
||||||
oclass = GEM_CLASS;
|
oclass = GEM_CLASS;
|
||||||
dn = actualn = bp;
|
dn = actualn = bp;
|
||||||
goto srch;
|
goto srch;
|
||||||
@@ -2918,8 +2933,9 @@ retry:
|
|||||||
goto typfnd;
|
goto typfnd;
|
||||||
else
|
else
|
||||||
typ = 0; /* somebody changed objects[]? punt */
|
typ = 0; /* somebody changed objects[]? punt */
|
||||||
} else { /* try to construct canonical form */
|
} else { /* try to construct canonical form */
|
||||||
char tbuf[BUFSZ];
|
char tbuf[BUFSZ];
|
||||||
|
|
||||||
Strcpy(tbuf, "worthless piece of ");
|
Strcpy(tbuf, "worthless piece of ");
|
||||||
Strcat(tbuf, g); /* assume it starts with the color */
|
Strcat(tbuf, g); /* assume it starts with the color */
|
||||||
Strcpy(bp, tbuf);
|
Strcpy(bp, tbuf);
|
||||||
@@ -2967,6 +2983,7 @@ srch:
|
|||||||
}
|
}
|
||||||
if (actualn) {
|
if (actualn) {
|
||||||
struct Jitem *j = Japanese_items;
|
struct Jitem *j = Japanese_items;
|
||||||
|
|
||||||
while (j->item) {
|
while (j->item) {
|
||||||
if (actualn && !strcmpi(actualn, j->name)) {
|
if (actualn && !strcmpi(actualn, j->name)) {
|
||||||
typ = j->item;
|
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. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -710,8 +710,10 @@ initoptions_init()
|
|||||||
#if defined(UNIX) || defined(VMS)
|
#if defined(UNIX) || defined(VMS)
|
||||||
#ifdef TTY_GRAPHICS
|
#ifdef TTY_GRAPHICS
|
||||||
/* detect whether a "vt" terminal can handle alternate charsets */
|
/* detect whether a "vt" terminal can handle alternate charsets */
|
||||||
if ((opts = nh_getenv("TERM")) && !strncmpi(opts, "vt", 2) && AS && AE
|
if ((opts = nh_getenv("TERM"))
|
||||||
&& index(AS, '\016') && index(AE, '\017')) {
|
/* [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)
|
if (!symset[PRIMARY].name)
|
||||||
load_symset("DECGraphics", PRIMARY);
|
load_symset("DECGraphics", PRIMARY);
|
||||||
switch_symbols(TRUE);
|
switch_symbols(TRUE);
|
||||||
@@ -1057,9 +1059,9 @@ const char *optn;
|
|||||||
else
|
else
|
||||||
flags.suppress_alert = fnv;
|
flags.suppress_alert = fnv;
|
||||||
if (rejectver) {
|
if (rejectver) {
|
||||||
if (!initial)
|
if (!initial) {
|
||||||
You_cant("disable new feature alerts for future versions.");
|
You_cant("disable new feature alerts for future versions.");
|
||||||
else {
|
} else {
|
||||||
Sprintf(buf,
|
Sprintf(buf,
|
||||||
"\n%s=%s Invalid reference to a future version ignored",
|
"\n%s=%s Invalid reference to a future version ignored",
|
||||||
optn, op);
|
optn, op);
|
||||||
@@ -1372,7 +1374,7 @@ int typ;
|
|||||||
char *pattern;
|
char *pattern;
|
||||||
{
|
{
|
||||||
struct plinemsg_type *tmp
|
struct plinemsg_type *tmp
|
||||||
= (struct plinemsg_type *) alloc(sizeof (struct plinemsg_type));
|
= (struct plinemsg_type *) alloc(sizeof (struct plinemsg_type));
|
||||||
|
|
||||||
if (!tmp)
|
if (!tmp)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -1387,7 +1389,7 @@ char *pattern;
|
|||||||
pline("%s: %s", re_error, regex_error_desc(tmp->regex));
|
pline("%s: %s", re_error, regex_error_desc(tmp->regex));
|
||||||
wait_synch();
|
wait_synch();
|
||||||
regex_free(tmp->regex);
|
regex_free(tmp->regex);
|
||||||
free(tmp);
|
free((genericptr_t) tmp);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
tmp->pattern = dupstr(pattern);
|
tmp->pattern = dupstr(pattern);
|
||||||
@@ -1655,7 +1657,7 @@ boolean tinitial, tfrom_file;
|
|||||||
{
|
{
|
||||||
register char *op;
|
register char *op;
|
||||||
unsigned num;
|
unsigned num;
|
||||||
boolean negated, duplicate;
|
boolean negated, val_negated, duplicate;
|
||||||
int i;
|
int i;
|
||||||
const char *fullname;
|
const char *fullname;
|
||||||
|
|
||||||
@@ -1730,10 +1732,10 @@ boolean tinitial, tfrom_file;
|
|||||||
/* align:string */
|
/* align:string */
|
||||||
fullname = "align";
|
fullname = "align";
|
||||||
if (match_optname(opts, fullname, sizeof("align") - 1, TRUE)) {
|
if (match_optname(opts, fullname, sizeof("align") - 1, TRUE)) {
|
||||||
if (negated)
|
if (negated) {
|
||||||
bad_negation(fullname, FALSE);
|
bad_negation(fullname, FALSE);
|
||||||
else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) {
|
} else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) {
|
||||||
boolean val_negated = FALSE;
|
val_negated = FALSE;
|
||||||
while ((*op == '!') || !strncmpi(op, "no", 2)) {
|
while ((*op == '!') || !strncmpi(op, "no", 2)) {
|
||||||
if (*op == '!')
|
if (*op == '!')
|
||||||
op++;
|
op++;
|
||||||
@@ -1758,10 +1760,10 @@ boolean tinitial, tfrom_file;
|
|||||||
fullname = "role";
|
fullname = "role";
|
||||||
if (match_optname(opts, fullname, 4, TRUE)
|
if (match_optname(opts, fullname, 4, TRUE)
|
||||||
|| match_optname(opts, (fullname = "character"), 4, TRUE)) {
|
|| match_optname(opts, (fullname = "character"), 4, TRUE)) {
|
||||||
if (negated)
|
if (negated) {
|
||||||
bad_negation(fullname, FALSE);
|
bad_negation(fullname, FALSE);
|
||||||
else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) {
|
} else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) {
|
||||||
boolean val_negated = FALSE;
|
val_negated = FALSE;
|
||||||
while ((*op == '!') || !strncmpi(op, "no", 2)) {
|
while ((*op == '!') || !strncmpi(op, "no", 2)) {
|
||||||
if (*op == '!')
|
if (*op == '!')
|
||||||
op++;
|
op++;
|
||||||
@@ -1787,10 +1789,10 @@ boolean tinitial, tfrom_file;
|
|||||||
/* race:string */
|
/* race:string */
|
||||||
fullname = "race";
|
fullname = "race";
|
||||||
if (match_optname(opts, fullname, 4, TRUE)) {
|
if (match_optname(opts, fullname, 4, TRUE)) {
|
||||||
if (negated)
|
if (negated) {
|
||||||
bad_negation(fullname, FALSE);
|
bad_negation(fullname, FALSE);
|
||||||
else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) {
|
} else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) {
|
||||||
boolean val_negated = FALSE;
|
val_negated = FALSE;
|
||||||
while ((*op == '!') || !strncmpi(op, "no", 2)) {
|
while ((*op == '!') || !strncmpi(op, "no", 2)) {
|
||||||
if (*op == '!')
|
if (*op == '!')
|
||||||
op++;
|
op++;
|
||||||
@@ -1816,10 +1818,10 @@ boolean tinitial, tfrom_file;
|
|||||||
/* gender:string */
|
/* gender:string */
|
||||||
fullname = "gender";
|
fullname = "gender";
|
||||||
if (match_optname(opts, fullname, 4, TRUE)) {
|
if (match_optname(opts, fullname, 4, TRUE)) {
|
||||||
if (negated)
|
if (negated) {
|
||||||
bad_negation(fullname, FALSE);
|
bad_negation(fullname, FALSE);
|
||||||
else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) {
|
} else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) {
|
||||||
boolean val_negated = FALSE;
|
val_negated = FALSE;
|
||||||
while ((*op == '!') || !strncmpi(op, "no", 2)) {
|
while ((*op == '!') || !strncmpi(op, "no", 2)) {
|
||||||
if (*op == '!')
|
if (*op == '!')
|
||||||
op++;
|
op++;
|
||||||
@@ -1968,11 +1970,10 @@ boolean tinitial, tfrom_file;
|
|||||||
if (match_optname(opts, fullname, 7, TRUE)) {
|
if (match_optname(opts, fullname, 7, TRUE)) {
|
||||||
if (duplicate)
|
if (duplicate)
|
||||||
complain_about_duplicate(opts, 1);
|
complain_about_duplicate(opts, 1);
|
||||||
if (negated)
|
if (negated) {
|
||||||
bad_negation(fullname, FALSE);
|
bad_negation(fullname, FALSE);
|
||||||
else if ((op = string_for_opt(opts, FALSE)) != 0) {
|
} else if ((op = string_for_opt(opts, FALSE)) != 0) {
|
||||||
symset[ROGUESET].name = (char *) alloc(strlen(op) + 1);
|
symset[ROGUESET].name = dupstr(op);
|
||||||
Strcpy(symset[ROGUESET].name, op);
|
|
||||||
if (!read_sym_file(ROGUESET)) {
|
if (!read_sym_file(ROGUESET)) {
|
||||||
clear_symsetentry(ROGUESET, TRUE);
|
clear_symsetentry(ROGUESET, TRUE);
|
||||||
raw_printf("Unable to load symbol set \"%s\" from \"%s\".",
|
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 (match_optname(opts, fullname, 6, TRUE)) {
|
||||||
if (duplicate)
|
if (duplicate)
|
||||||
complain_about_duplicate(opts, 1);
|
complain_about_duplicate(opts, 1);
|
||||||
if (negated)
|
if (negated) {
|
||||||
bad_negation(fullname, FALSE);
|
bad_negation(fullname, FALSE);
|
||||||
else if ((op = string_for_opt(opts, FALSE)) != 0) {
|
} else if ((op = string_for_opt(opts, FALSE)) != 0) {
|
||||||
symset[PRIMARY].name = (char *) alloc(strlen(op) + 1);
|
symset[PRIMARY].name = dupstr(op);
|
||||||
Strcpy(symset[PRIMARY].name, op);
|
|
||||||
if (!read_sym_file(PRIMARY)) {
|
if (!read_sym_file(PRIMARY)) {
|
||||||
clear_symsetentry(PRIMARY, TRUE);
|
clear_symsetentry(PRIMARY, TRUE);
|
||||||
raw_printf("Unable to load symbol set \"%s\" from \"%s\".",
|
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 (match_optname(opts, fullname, 4, TRUE)) {
|
||||||
if (duplicate)
|
if (duplicate)
|
||||||
complain_about_duplicate(opts, 1);
|
complain_about_duplicate(opts, 1);
|
||||||
if (negated)
|
if (negated) {
|
||||||
bad_negation(fullname, FALSE);
|
bad_negation(fullname, FALSE);
|
||||||
else if ((op = string_for_opt(opts, negated))) {
|
} else if ((op = string_for_opt(opts, negated)) != 0) {
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
(void) strncpy(iflags.altkeyhandler, op, MAX_ALTKEYHANDLER - 5);
|
(void) strncpy(iflags.altkeyhandler, op, MAX_ALTKEYHANDLER - 5);
|
||||||
load_keyboard_handler();
|
load_keyboard_handler();
|
||||||
@@ -2973,9 +2973,9 @@ boolean tinitial, tfrom_file;
|
|||||||
fullname = "subkeyvalue";
|
fullname = "subkeyvalue";
|
||||||
if (match_optname(opts, fullname, 5, TRUE)) {
|
if (match_optname(opts, fullname, 5, TRUE)) {
|
||||||
/* no duplicate complaint here */
|
/* no duplicate complaint here */
|
||||||
if (negated)
|
if (negated) {
|
||||||
bad_negation(fullname, FALSE);
|
bad_negation(fullname, FALSE);
|
||||||
else {
|
} else {
|
||||||
#if defined(WIN32)
|
#if defined(WIN32)
|
||||||
op = string_for_opt(opts, 0);
|
op = string_for_opt(opts, 0);
|
||||||
map_subkeyvalue(op);
|
map_subkeyvalue(op);
|
||||||
@@ -3140,9 +3140,9 @@ boolean tinitial, tfrom_file;
|
|||||||
if (duplicate)
|
if (duplicate)
|
||||||
complain_about_duplicate(opts, 1);
|
complain_about_duplicate(opts, 1);
|
||||||
if (match_optname(opts, fullname, (int) strlen(fullname), TRUE)) {
|
if (match_optname(opts, fullname, (int) strlen(fullname), TRUE)) {
|
||||||
if (negated)
|
if (negated) {
|
||||||
bad_negation(fullname, FALSE);
|
bad_negation(fullname, FALSE);
|
||||||
else if ((op = string_for_opt(opts, FALSE)) != 0) {
|
} else if ((op = string_for_opt(opts, FALSE)) != 0) {
|
||||||
int j;
|
int j;
|
||||||
char c, op_buf[BUFSZ];
|
char c, op_buf[BUFSZ];
|
||||||
boolean isbad = FALSE;
|
boolean isbad = FALSE;
|
||||||
@@ -3197,11 +3197,10 @@ boolean tinitial, tfrom_file;
|
|||||||
complain_about_duplicate(opts, 1);
|
complain_about_duplicate(opts, 1);
|
||||||
if (!negated) {
|
if (!negated) {
|
||||||
/* There is no rogue level DECgraphics-specific set */
|
/* There is no rogue level DECgraphics-specific set */
|
||||||
if (symset[PRIMARY].name)
|
if (symset[PRIMARY].name) {
|
||||||
badflag = TRUE;
|
badflag = TRUE;
|
||||||
else {
|
} else {
|
||||||
symset[PRIMARY].name = (char *) alloc(strlen(fullname) + 1);
|
symset[PRIMARY].name = dupstr(fullname);
|
||||||
Strcpy(symset[PRIMARY].name, fullname);
|
|
||||||
if (!read_sym_file(PRIMARY)) {
|
if (!read_sym_file(PRIMARY)) {
|
||||||
badflag = TRUE;
|
badflag = TRUE;
|
||||||
clear_symsetentry(PRIMARY, TRUE);
|
clear_symsetentry(PRIMARY, TRUE);
|
||||||
@@ -3224,13 +3223,12 @@ boolean tinitial, tfrom_file;
|
|||||||
complain_about_duplicate(opts, 1);
|
complain_about_duplicate(opts, 1);
|
||||||
if (!negated) {
|
if (!negated) {
|
||||||
for (i = 0; i < NUM_GRAPHICS; ++i) {
|
for (i = 0; i < NUM_GRAPHICS; ++i) {
|
||||||
if (symset[i].name)
|
if (symset[i].name) {
|
||||||
badflag = TRUE;
|
badflag = TRUE;
|
||||||
else {
|
} else {
|
||||||
if (i == ROGUESET)
|
if (i == ROGUESET)
|
||||||
sym_name = "RogueIBM";
|
sym_name = "RogueIBM";
|
||||||
symset[i].name = (char *) alloc(strlen(sym_name) + 1);
|
symset[i].name = dupstr(sym_name);
|
||||||
Strcpy(symset[i].name, sym_name);
|
|
||||||
if (!read_sym_file(i)) {
|
if (!read_sym_file(i)) {
|
||||||
badflag = TRUE;
|
badflag = TRUE;
|
||||||
clear_symsetentry(i, TRUE);
|
clear_symsetentry(i, TRUE);
|
||||||
@@ -3258,11 +3256,10 @@ boolean tinitial, tfrom_file;
|
|||||||
if (duplicate)
|
if (duplicate)
|
||||||
complain_about_duplicate(opts, 1);
|
complain_about_duplicate(opts, 1);
|
||||||
if (!negated) {
|
if (!negated) {
|
||||||
if (symset[PRIMARY].name)
|
if (symset[PRIMARY].name) {
|
||||||
badflag = TRUE;
|
badflag = TRUE;
|
||||||
else {
|
} else {
|
||||||
symset[PRIMARY].name = (char *) alloc(strlen(fullname) + 1);
|
symset[PRIMARY].name = dupstr(fullname);
|
||||||
Strcpy(symset[PRIMARY].name, fullname);
|
|
||||||
if (!read_sym_file(PRIMARY)) {
|
if (!read_sym_file(PRIMARY)) {
|
||||||
badflag = TRUE;
|
badflag = TRUE;
|
||||||
clear_symsetentry(PRIMARY, TRUE);
|
clear_symsetentry(PRIMARY, TRUE);
|
||||||
@@ -3355,9 +3352,8 @@ boolean tinitial, tfrom_file;
|
|||||||
|| (boolopt[i].addr) == &flags.showrace
|
|| (boolopt[i].addr) == &flags.showrace
|
||||||
|| (boolopt[i].addr) == &iflags.hilite_pet) {
|
|| (boolopt[i].addr) == &iflags.hilite_pet) {
|
||||||
need_redraw = TRUE;
|
need_redraw = TRUE;
|
||||||
}
|
|
||||||
#ifdef TEXTCOLOR
|
#ifdef TEXTCOLOR
|
||||||
else if ((boolopt[i].addr) == &iflags.use_color) {
|
} else if ((boolopt[i].addr) == &iflags.use_color) {
|
||||||
need_redraw = TRUE;
|
need_redraw = TRUE;
|
||||||
#ifdef TOS
|
#ifdef TOS
|
||||||
if ((boolopt[i].addr) == &iflags.use_color && iflags.BIOS) {
|
if ((boolopt[i].addr) == &iflags.use_color && iflags.BIOS) {
|
||||||
@@ -3367,9 +3363,8 @@ boolean tinitial, tfrom_file;
|
|||||||
set_colors();
|
set_colors();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* TEXTCOLOR */
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3417,9 +3412,9 @@ void
|
|||||||
add_menu_cmd_alias(from_ch, to_ch)
|
add_menu_cmd_alias(from_ch, to_ch)
|
||||||
char 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.");
|
pline("out of menu map space.");
|
||||||
else {
|
} else {
|
||||||
mapped_menu_cmds[n_menu_mapped] = from_ch;
|
mapped_menu_cmds[n_menu_mapped] = from_ch;
|
||||||
mapped_menu_op[n_menu_mapped] = to_ch;
|
mapped_menu_op[n_menu_mapped] = to_ch;
|
||||||
n_menu_mapped++;
|
n_menu_mapped++;
|
||||||
@@ -3604,19 +3599,20 @@ doset()
|
|||||||
}
|
}
|
||||||
any.a_int = -4;
|
any.a_int = -4;
|
||||||
Sprintf(buf2, n_currently_set, msgtype_count());
|
Sprintf(buf2, n_currently_set, msgtype_count());
|
||||||
Sprintf(buf, fmtstr_doset_add_menu, any.a_int ? "" : " ", "message types",
|
Sprintf(buf, fmtstr_doset_add_menu, any.a_int ? "" : " ",
|
||||||
buf2);
|
"message types", buf2);
|
||||||
add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, MENU_UNSELECTED);
|
add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, MENU_UNSELECTED);
|
||||||
any.a_int = -3;
|
any.a_int = -3;
|
||||||
Sprintf(buf2, n_currently_set, count_menucolors());
|
Sprintf(buf2, n_currently_set, count_menucolors());
|
||||||
Sprintf(buf, fmtstr_doset_add_menu, any.a_int ? "" : " ", "menucolors",
|
Sprintf(buf, fmtstr_doset_add_menu, any.a_int ? "" : " ",
|
||||||
buf2);
|
"menucolors", buf2);
|
||||||
add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, MENU_UNSELECTED);
|
add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, MENU_UNSELECTED);
|
||||||
#ifdef STATUS_VIA_WINDOWPORT
|
#ifdef STATUS_VIA_WINDOWPORT
|
||||||
#ifdef STATUS_HILITES
|
#ifdef STATUS_HILITES
|
||||||
any.a_int = -2;
|
any.a_int = -2;
|
||||||
get_status_hilites(buf2, 60);
|
get_status_hilites(buf2, 60);
|
||||||
if (!*buf2) Sprintf(buf2, "%s", "(none)");
|
if (!*buf2)
|
||||||
|
Sprintf(buf2, "%s", "(none)");
|
||||||
if (!iflags.menu_tab_sep)
|
if (!iflags.menu_tab_sep)
|
||||||
Sprintf(buf, fmtstr_doset_add_menu, any.a_int ? "" : " ",
|
Sprintf(buf, fmtstr_doset_add_menu, any.a_int ? "" : " ",
|
||||||
"status_hilites", buf2);
|
"status_hilites", buf2);
|
||||||
@@ -3824,8 +3820,7 @@ boolean setinitial, setfromfile;
|
|||||||
could have toggled off preselected ones to end up with 0 */
|
could have toggled off preselected ones to end up with 0 */
|
||||||
flags.paranoia_bits = 0;
|
flags.paranoia_bits = 0;
|
||||||
if (i > 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)
|
while (--i >= 0)
|
||||||
flags.paranoia_bits |= paranoia_picks[i].item.a_int;
|
flags.paranoia_bits |= paranoia_picks[i].item.a_int;
|
||||||
free((genericptr_t) paranoia_picks);
|
free((genericptr_t) paranoia_picks);
|
||||||
@@ -3835,6 +3830,7 @@ boolean setinitial, setfromfile;
|
|||||||
} else if (!strcmp("pickup_burden", optname)) {
|
} else if (!strcmp("pickup_burden", optname)) {
|
||||||
const char *burden_name, *burden_letters = "ubsntl";
|
const char *burden_name, *burden_letters = "ubsntl";
|
||||||
menu_item *burden_pick = (menu_item *) 0;
|
menu_item *burden_pick = (menu_item *) 0;
|
||||||
|
|
||||||
tmpwin = create_nhwindow(NHW_MENU);
|
tmpwin = create_nhwindow(NHW_MENU);
|
||||||
start_menu(tmpwin);
|
start_menu(tmpwin);
|
||||||
any = zeroany;
|
any = zeroany;
|
||||||
@@ -3922,6 +3918,7 @@ boolean setinitial, setfromfile;
|
|||||||
} else if (!strcmp("runmode", optname)) {
|
} else if (!strcmp("runmode", optname)) {
|
||||||
const char *mode_name;
|
const char *mode_name;
|
||||||
menu_item *mode_pick = (menu_item *) 0;
|
menu_item *mode_pick = (menu_item *) 0;
|
||||||
|
|
||||||
tmpwin = create_nhwindow(NHW_MENU);
|
tmpwin = create_nhwindow(NHW_MENU);
|
||||||
start_menu(tmpwin);
|
start_menu(tmpwin);
|
||||||
any = zeroany;
|
any = zeroany;
|
||||||
@@ -3941,6 +3938,7 @@ boolean setinitial, setfromfile;
|
|||||||
#ifdef TTY_GRAPHICS
|
#ifdef TTY_GRAPHICS
|
||||||
/* by Christian W. Cooper */
|
/* by Christian W. Cooper */
|
||||||
menu_item *window_pick = (menu_item *) 0;
|
menu_item *window_pick = (menu_item *) 0;
|
||||||
|
|
||||||
tmpwin = create_nhwindow(NHW_MENU);
|
tmpwin = create_nhwindow(NHW_MENU);
|
||||||
start_menu(tmpwin);
|
start_menu(tmpwin);
|
||||||
any = zeroany;
|
any = zeroany;
|
||||||
@@ -3966,6 +3964,7 @@ boolean setinitial, setfromfile;
|
|||||||
} else if (!strcmp("sortloot", optname)) {
|
} else if (!strcmp("sortloot", optname)) {
|
||||||
const char *sortl_name;
|
const char *sortl_name;
|
||||||
menu_item *sortl_pick = (menu_item *) 0;
|
menu_item *sortl_pick = (menu_item *) 0;
|
||||||
|
|
||||||
tmpwin = create_nhwindow(NHW_MENU);
|
tmpwin = create_nhwindow(NHW_MENU);
|
||||||
start_menu(tmpwin);
|
start_menu(tmpwin);
|
||||||
any = zeroany;
|
any = zeroany;
|
||||||
@@ -4119,9 +4118,8 @@ boolean setinitial, setfromfile;
|
|||||||
for (pick_idx = 0; pick_idx < pick_cnt; ++pick_idx)
|
for (pick_idx = 0; pick_idx < pick_cnt; ++pick_idx)
|
||||||
free_one_msgtype(pick_list[pick_idx].item.a_int - 1
|
free_one_msgtype(pick_list[pick_idx].item.a_int - 1
|
||||||
- pick_idx);
|
- 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);
|
destroy_nhwindow(tmpwin);
|
||||||
if (pick_cnt >= 0)
|
if (pick_cnt >= 0)
|
||||||
goto msgtypes_again;
|
goto msgtypes_again;
|
||||||
@@ -4175,15 +4173,15 @@ boolean setinitial, setfromfile;
|
|||||||
Sprintf(mcbuf, "%s menu colors",
|
Sprintf(mcbuf, "%s menu colors",
|
||||||
(opt_idx == 1) ? "List of" : "Remove which");
|
(opt_idx == 1) ? "List of" : "Remove which");
|
||||||
end_menu(tmpwin, mcbuf);
|
end_menu(tmpwin, mcbuf);
|
||||||
pick_cnt = select_menu(
|
pick_cnt = select_menu(tmpwin,
|
||||||
tmpwin, (opt_idx == 1) ? PICK_NONE : PICK_ANY, &pick_list);
|
(opt_idx == 1) ? PICK_NONE : PICK_ANY,
|
||||||
|
&pick_list);
|
||||||
if (pick_cnt > 0) {
|
if (pick_cnt > 0) {
|
||||||
for (pick_idx = 0; pick_idx < pick_cnt; ++pick_idx)
|
for (pick_idx = 0; pick_idx < pick_cnt; ++pick_idx)
|
||||||
free_one_menu_coloring(pick_list[pick_idx].item.a_int - 1
|
free_one_menu_coloring(pick_list[pick_idx].item.a_int - 1
|
||||||
- pick_idx);
|
- 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);
|
destroy_nhwindow(tmpwin);
|
||||||
if (pick_cnt >= 0)
|
if (pick_cnt >= 0)
|
||||||
goto menucolors_again;
|
goto menucolors_again;
|
||||||
@@ -4240,16 +4238,16 @@ boolean setinitial, setfromfile;
|
|||||||
Sprintf(apebuf, "%s autopickup exceptions",
|
Sprintf(apebuf, "%s autopickup exceptions",
|
||||||
(opt_idx == 1) ? "List of" : "Remove which");
|
(opt_idx == 1) ? "List of" : "Remove which");
|
||||||
end_menu(tmpwin, apebuf);
|
end_menu(tmpwin, apebuf);
|
||||||
pick_cnt = select_menu(
|
pick_cnt = select_menu(tmpwin,
|
||||||
tmpwin, (opt_idx == 1) ? PICK_NONE : PICK_ANY, &pick_list);
|
(opt_idx == 1) ? PICK_NONE : PICK_ANY,
|
||||||
|
&pick_list);
|
||||||
if (pick_cnt > 0) {
|
if (pick_cnt > 0) {
|
||||||
for (pick_idx = 0; pick_idx < pick_cnt; ++pick_idx)
|
for (pick_idx = 0; pick_idx < pick_cnt; ++pick_idx)
|
||||||
remove_autopickup_exception(
|
remove_autopickup_exception(
|
||||||
(struct autopickup_exception *) pick_list[pick_idx]
|
(struct autopickup_exception *)
|
||||||
.item.a_void);
|
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);
|
destroy_nhwindow(tmpwin);
|
||||||
if (pick_cnt >= 0)
|
if (pick_cnt >= 0)
|
||||||
goto ape_again;
|
goto ape_again;
|
||||||
@@ -4258,13 +4256,12 @@ boolean setinitial, setfromfile;
|
|||||||
|| !strcmp("roguesymset", optname)) {
|
|| !strcmp("roguesymset", optname)) {
|
||||||
menu_item *symset_pick = (menu_item *) 0;
|
menu_item *symset_pick = (menu_item *) 0;
|
||||||
boolean primaryflag = (*optname == 's'),
|
boolean primaryflag = (*optname == 's'),
|
||||||
rogueflag = (*optname == 'r'), ready_to_switch = FALSE,
|
rogueflag = (*optname == 'r'),
|
||||||
|
ready_to_switch = FALSE,
|
||||||
nothing_to_do = FALSE;
|
nothing_to_do = FALSE;
|
||||||
int res;
|
|
||||||
char *symset_name, fmtstr[20];
|
char *symset_name, fmtstr[20];
|
||||||
struct symsetentry *sl;
|
struct symsetentry *sl;
|
||||||
int setcount = 0;
|
int res, which_set, setcount = 0, chosen = -2;
|
||||||
int chosen = -2, which_set;
|
|
||||||
|
|
||||||
if (rogueflag)
|
if (rogueflag)
|
||||||
which_set = ROGUESET;
|
which_set = ROGUESET;
|
||||||
@@ -4359,14 +4356,13 @@ boolean setinitial, setfromfile;
|
|||||||
}
|
}
|
||||||
sl = sl->next;
|
sl = sl->next;
|
||||||
}
|
}
|
||||||
}
|
} else if (chosen == -1) {
|
||||||
|
|
||||||
else if (chosen == -1) {
|
|
||||||
/* explicit selection of defaults */
|
/* explicit selection of defaults */
|
||||||
/* free the now stale symset attributes */
|
/* free the now stale symset attributes */
|
||||||
if (symset_name)
|
if (symset_name) {
|
||||||
free((genericptr_t) symset_name);
|
free((genericptr_t) symset_name);
|
||||||
symset_name = (char *) 0;
|
symset_name = (char *) 0;
|
||||||
|
}
|
||||||
clear_symsetentry(which_set, TRUE);
|
clear_symsetentry(which_set, TRUE);
|
||||||
} else
|
} else
|
||||||
nothing_to_do = TRUE;
|
nothing_to_do = TRUE;
|
||||||
@@ -4399,7 +4395,7 @@ boolean setinitial, setfromfile;
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
if (!symset[which_set].name && symset_name)
|
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 */
|
/* Set default symbols and clear the handling value */
|
||||||
if (rogueflag)
|
if (rogueflag)
|
||||||
@@ -4408,9 +4404,9 @@ boolean setinitial, setfromfile;
|
|||||||
init_l_symbols();
|
init_l_symbols();
|
||||||
|
|
||||||
if (symset[which_set].name) {
|
if (symset[which_set].name) {
|
||||||
if (read_sym_file(which_set))
|
if (read_sym_file(which_set)) {
|
||||||
ready_to_switch = TRUE;
|
ready_to_switch = TRUE;
|
||||||
else {
|
} else {
|
||||||
clear_symsetentry(which_set, TRUE);
|
clear_symsetentry(which_set, TRUE);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -4586,9 +4582,9 @@ char *buf;
|
|||||||
Sprintf(buf, "%s", to_be_done);
|
Sprintf(buf, "%s", to_be_done);
|
||||||
else if (!strcmp(optname, "menu_invert_all"))
|
else if (!strcmp(optname, "menu_invert_all"))
|
||||||
Sprintf(buf, "%s", to_be_done);
|
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));
|
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);
|
Sprintf(buf, "%s", to_be_done);
|
||||||
else if (!strcmp(optname, "menu_last_page"))
|
else if (!strcmp(optname, "menu_last_page"))
|
||||||
Sprintf(buf, "%s", to_be_done);
|
Sprintf(buf, "%s", to_be_done);
|
||||||
@@ -4602,12 +4598,12 @@ char *buf;
|
|||||||
Sprintf(buf, "%s", to_be_done);
|
Sprintf(buf, "%s", to_be_done);
|
||||||
else if (!strcmp(optname, "menu_select_page"))
|
else if (!strcmp(optname, "menu_select_page"))
|
||||||
Sprintf(buf, "%s", to_be_done);
|
Sprintf(buf, "%s", to_be_done);
|
||||||
else if (!strcmp(optname, "monsters"))
|
else if (!strcmp(optname, "monsters")) {
|
||||||
Sprintf(buf, "%s", to_be_done);
|
Sprintf(buf, "%s", to_be_done);
|
||||||
else if (!strcmp(optname, "msghistory"))
|
} else if (!strcmp(optname, "msghistory")) {
|
||||||
Sprintf(buf, "%u", iflags.msg_history);
|
Sprintf(buf, "%u", iflags.msg_history);
|
||||||
#ifdef TTY_GRAPHICS
|
#ifdef TTY_GRAPHICS
|
||||||
else if (!strcmp(optname, "msg_window"))
|
} else if (!strcmp(optname, "msg_window")) {
|
||||||
Sprintf(buf, "%s", (iflags.prevmsg_window == 's')
|
Sprintf(buf, "%s", (iflags.prevmsg_window == 's')
|
||||||
? "single"
|
? "single"
|
||||||
: (iflags.prevmsg_window == 'c')
|
: (iflags.prevmsg_window == 'c')
|
||||||
@@ -4616,9 +4612,9 @@ char *buf;
|
|||||||
? "full"
|
? "full"
|
||||||
: "reversed");
|
: "reversed");
|
||||||
#endif
|
#endif
|
||||||
else if (!strcmp(optname, "name"))
|
} else if (!strcmp(optname, "name")) {
|
||||||
Sprintf(buf, "%s", plname);
|
Sprintf(buf, "%s", plname);
|
||||||
else if (!strcmp(optname, "number_pad")) {
|
} else if (!strcmp(optname, "number_pad")) {
|
||||||
static const char *numpadmodes[] = {
|
static const char *numpadmodes[] = {
|
||||||
"0=off", "1=on", "2=on, MSDOS compatible",
|
"0=off", "1=on", "2=on, MSDOS compatible",
|
||||||
"3=on, phone-style layout",
|
"3=on, phone-style layout",
|
||||||
@@ -4699,14 +4695,11 @@ char *buf;
|
|||||||
else
|
else
|
||||||
Strcpy(buf, defopt);
|
Strcpy(buf, defopt);
|
||||||
} else if (!strcmp(optname, "sortloot")) {
|
} else if (!strcmp(optname, "sortloot")) {
|
||||||
char *sortname = (char *) NULL;
|
for (i = 0; i < SIZE(sortltype); i++)
|
||||||
|
if (flags.sortloot == sortltype[i][0]) {
|
||||||
for (i = 0; i < SIZE(sortltype) && sortname == (char *) NULL; i++) {
|
Strcpy(buf, sortltype[i]);
|
||||||
if (flags.sortloot == sortltype[i][0])
|
break;
|
||||||
sortname = (char *) sortltype[i];
|
}
|
||||||
}
|
|
||||||
if (sortname != (char *) NULL)
|
|
||||||
Sprintf(buf, "%s", sortname);
|
|
||||||
} else if (!strcmp(optname, "player_selection")) {
|
} else if (!strcmp(optname, "player_selection")) {
|
||||||
Sprintf(buf, "%s", iflags.wc_player_selection ? "prompts" : "dialog");
|
Sprintf(buf, "%s", iflags.wc_player_selection ? "prompts" : "dialog");
|
||||||
#ifdef MSDOS
|
#ifdef MSDOS
|
||||||
@@ -4831,15 +4824,15 @@ const char *mapping;
|
|||||||
apehead = (grab) ? &iflags.autopickup_exceptions[AP_GRAB]
|
apehead = (grab) ? &iflags.autopickup_exceptions[AP_GRAB]
|
||||||
: &iflags.autopickup_exceptions[AP_LEAVE];
|
: &iflags.autopickup_exceptions[AP_LEAVE];
|
||||||
ape = (struct autopickup_exception *) alloc(
|
ape = (struct autopickup_exception *) alloc(
|
||||||
sizeof(struct autopickup_exception));
|
sizeof (struct autopickup_exception));
|
||||||
ape->regex = regex_init();
|
ape->regex = regex_init();
|
||||||
if (!regex_compile(text2, ape->regex)) {
|
if (!regex_compile(text2, ape->regex)) {
|
||||||
raw_print("regex error in AUTOPICKUP_EXCEPTION");
|
raw_print("regex error in AUTOPICKUP_EXCEPTION");
|
||||||
regex_free(ape->regex);
|
regex_free(ape->regex);
|
||||||
free(ape);
|
free((genericptr_t) ape);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
ape->pattern = (char *)alloc(strlen(text2) + 1);
|
ape->pattern = (char *) alloc(strlen(text2) + 1);
|
||||||
strcpy(ape->pattern, text2);
|
strcpy(ape->pattern, text2);
|
||||||
ape->grab = grab;
|
ape->grab = grab;
|
||||||
ape->next = *apehead;
|
ape->next = *apehead;
|
||||||
@@ -4861,14 +4854,15 @@ struct autopickup_exception *whichape;
|
|||||||
for (ape = iflags.autopickup_exceptions[chain]; ape;) {
|
for (ape = iflags.autopickup_exceptions[chain]; ape;) {
|
||||||
if (ape == whichape) {
|
if (ape == whichape) {
|
||||||
struct autopickup_exception *freeape = ape;
|
struct autopickup_exception *freeape = ape;
|
||||||
|
|
||||||
ape = ape->next;
|
ape = ape->next;
|
||||||
if (prev)
|
if (prev)
|
||||||
prev->next = ape;
|
prev->next = ape;
|
||||||
else
|
else
|
||||||
iflags.autopickup_exceptions[chain] = ape;
|
iflags.autopickup_exceptions[chain] = ape;
|
||||||
regex_free(freeape->regex);
|
regex_free(freeape->regex);
|
||||||
free(freeape->pattern);
|
free((genericptr_t) freeape->pattern);
|
||||||
free(freeape);
|
free((genericptr_t) freeape);
|
||||||
} else {
|
} else {
|
||||||
prev = ape;
|
prev = ape;
|
||||||
ape = ape->next;
|
ape = ape->next;
|
||||||
@@ -4907,9 +4901,9 @@ free_autopickup_exceptions()
|
|||||||
for (pass = AP_LEAVE; pass <= AP_GRAB; ++pass) {
|
for (pass = AP_LEAVE; pass <= AP_GRAB; ++pass) {
|
||||||
while ((ape = iflags.autopickup_exceptions[pass]) != 0) {
|
while ((ape = iflags.autopickup_exceptions[pass]) != 0) {
|
||||||
regex_free(ape->regex);
|
regex_free(ape->regex);
|
||||||
free(ape->pattern);
|
free((genericptr_t) ape->pattern);
|
||||||
iflags.autopickup_exceptions[pass] = ape->next;
|
iflags.autopickup_exceptions[pass] = ape->next;
|
||||||
free(ape);
|
free((genericptr_t) ape);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4922,17 +4916,30 @@ int which_set;
|
|||||||
{
|
{
|
||||||
clear_symsetentry(which_set, TRUE);
|
clear_symsetentry(which_set, TRUE);
|
||||||
|
|
||||||
symset[which_set].name = (char *) alloc(strlen(s) + 1);
|
if (symset[which_set].name)
|
||||||
Strcpy(symset[which_set].name, s);
|
free((genericptr_t) symset[which_set].name);
|
||||||
if (read_sym_file(which_set))
|
symset[which_set].name = dupstr(s);
|
||||||
|
|
||||||
|
if (read_sym_file(which_set)) {
|
||||||
switch_symbols(TRUE);
|
switch_symbols(TRUE);
|
||||||
else {
|
} else {
|
||||||
clear_symsetentry(which_set, TRUE);
|
clear_symsetentry(which_set, TRUE);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return 1;
|
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 */
|
/* Parse the value of a SYMBOLS line from a config file */
|
||||||
void
|
void
|
||||||
parsesymbols(opts)
|
parsesymbols(opts)
|
||||||
@@ -5104,7 +5111,7 @@ const char *str;
|
|||||||
Strcat(buf, ", ");
|
Strcat(buf, ", ");
|
||||||
} else {
|
} else {
|
||||||
putstr(datawin, 0, str);
|
putstr(datawin, 0, str);
|
||||||
free(buf), buf = 0;
|
free((genericptr_t) buf), buf = 0;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -5550,9 +5557,8 @@ char *fontname;
|
|||||||
}
|
}
|
||||||
if (fn) {
|
if (fn) {
|
||||||
if (*fn)
|
if (*fn)
|
||||||
free(*fn);
|
free((genericptr_t) *fn);
|
||||||
*fn = (char *) alloc(strlen(fontname) + 1);
|
*fn = dupstr(fontname);
|
||||||
Strcpy(*fn, fontname);
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -5638,15 +5644,13 @@ char *op;
|
|||||||
if (!strcmpi(wn, wnames[j]) || !strcmpi(wn, shortnames[j])) {
|
if (!strcmpi(wn, wnames[j]) || !strcmpi(wn, shortnames[j])) {
|
||||||
if (tfg && !strstri(tfg, " ")) {
|
if (tfg && !strstri(tfg, " ")) {
|
||||||
if (*fgp[j])
|
if (*fgp[j])
|
||||||
free(*fgp[j]);
|
free((genericptr_t) *fgp[j]);
|
||||||
*fgp[j] = (char *) alloc(strlen(tfg) + 1);
|
*fgp[j] = dupstr(tfg);
|
||||||
Strcpy(*fgp[j], tfg);
|
|
||||||
}
|
}
|
||||||
if (tbg && !strstri(tbg, " ")) {
|
if (tbg && !strstri(tbg, " ")) {
|
||||||
if (*bgp[j])
|
if (*bgp[j])
|
||||||
free(*bgp[j]);
|
free((genericptr_t) *bgp[j]);
|
||||||
*bgp[j] = (char *) alloc(strlen(tbg) + 1);
|
*bgp[j] = dupstr(tbg);
|
||||||
Strcpy(*bgp[j], tbg);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -144,7 +144,7 @@ struct obj *objs;
|
|||||||
boolean here;
|
boolean here;
|
||||||
int *menu_on_demand;
|
int *menu_on_demand;
|
||||||
{
|
{
|
||||||
char ilets[20], inbuf[BUFSZ];
|
char ilets[30], inbuf[BUFSZ]; /* FIXME: hardcoded ilets[] length */
|
||||||
int iletct, oclassct;
|
int iletct, oclassct;
|
||||||
boolean not_everything;
|
boolean not_everything;
|
||||||
char qbuf[QBUFSZ];
|
char qbuf[QBUFSZ];
|
||||||
|
|||||||
+1
-1
@@ -448,7 +448,7 @@ int psflags;
|
|||||||
|| mntmp == urole.femalenum)) {
|
|| mntmp == urole.femalenum)) {
|
||||||
const char *pm_name;
|
const char *pm_name;
|
||||||
|
|
||||||
/* mkclass_ploy() can pick a !polyok()
|
/* mkclass_poly() can pick a !polyok()
|
||||||
candidate; if so, usually try again */
|
candidate; if so, usually try again */
|
||||||
if (class) {
|
if (class) {
|
||||||
if (rn2(3) || --tryct > 0)
|
if (rn2(3) || --tryct > 0)
|
||||||
|
|||||||
+2
-2
@@ -797,7 +797,7 @@ gcrownu()
|
|||||||
case A_NEUTRAL:
|
case A_NEUTRAL:
|
||||||
if (class_gift != STRANGE_OBJECT) {
|
if (class_gift != STRANGE_OBJECT) {
|
||||||
; /* already got bonus above */
|
; /* already got bonus above */
|
||||||
} else if (in_hand) {
|
} else if (obj && in_hand) {
|
||||||
Your("%s goes snicker-snack!", xname(obj));
|
Your("%s goes snicker-snack!", xname(obj));
|
||||||
obj->dknown = TRUE;
|
obj->dknown = TRUE;
|
||||||
} else if (!already_exists) {
|
} else if (!already_exists) {
|
||||||
@@ -819,7 +819,7 @@ gcrownu()
|
|||||||
Sprintf(swordbuf, "%s sword", hcolor(NH_BLACK));
|
Sprintf(swordbuf, "%s sword", hcolor(NH_BLACK));
|
||||||
if (class_gift != STRANGE_OBJECT) {
|
if (class_gift != STRANGE_OBJECT) {
|
||||||
; /* already got bonus above */
|
; /* already got bonus above */
|
||||||
} else if (in_hand) {
|
} else if (obj && in_hand) {
|
||||||
Your("%s hums ominously!", swordbuf);
|
Your("%s hums ominously!", swordbuf);
|
||||||
obj->dknown = TRUE;
|
obj->dknown = TRUE;
|
||||||
} else if (!already_exists) {
|
} else if (!already_exists) {
|
||||||
|
|||||||
+48
-21
@@ -82,38 +82,62 @@ char *buf;
|
|||||||
"I survived Yendor Military Boot Camp",
|
"I survived Yendor Military Boot Camp",
|
||||||
"Ludios Accounting School Intra-Mural Lacrosse Team",
|
"Ludios Accounting School Intra-Mural Lacrosse Team",
|
||||||
"Oracle(TM) Fountains 10th Annual Wet T-Shirt Contest",
|
"Oracle(TM) Fountains 10th Annual Wet T-Shirt Contest",
|
||||||
"Hey, black dragon! Disintegrate THIS!", "I'm With Stupid -->",
|
"Hey, black dragon! Disintegrate THIS!",
|
||||||
"Don't blame me, I voted for Izchak!", "Don't Panic", /* HHGTTG */
|
"I'm With Stupid -->",
|
||||||
|
"Don't blame me, I voted for Izchak!",
|
||||||
|
"Don't Panic", /* HHGTTG */
|
||||||
"Furinkan High School Athletic Dept.", /* Ranma 1/2 */
|
"Furinkan High School Athletic Dept.", /* Ranma 1/2 */
|
||||||
"Hel-LOOO, Nurse!", /* Animaniacs */
|
"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",
|
"cK -- Cockatrice touches the Kop",
|
||||||
"Don't ask me, I only adventure here", "Down with pants!",
|
"Don't ask me, I only adventure here",
|
||||||
"d, your dog or a killer?", "FREE PUG AND NEWT!", "Go team ant!",
|
"Down with pants!",
|
||||||
"Got newt?", "Hello, my darlings!", /* Charlie Drake */
|
"d, your dog or a killer?",
|
||||||
"Hey! Nymphs! Steal This T-Shirt!", "I <3 Dungeon of Doom",
|
"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 <3 Maud",
|
||||||
"I am a Valkyrie. If you see me running, try to keep up.",
|
"I am a Valkyrie. If you see me running, try to keep up.",
|
||||||
"I am not a pack rat - I am a collector",
|
"I am not a pack rat - I am a collector",
|
||||||
"I bounced off a rubber tree", /* Monkey Island */
|
"I bounced off a rubber tree", /* Monkey Island */
|
||||||
"Plunder Island Brimstone Beach Club", /* Monkey Island */
|
"Plunder Island Brimstone Beach Club", /* Monkey Island */
|
||||||
"If you can read this, I can hit you with my polearm",
|
"If you can read this, I can hit you with my polearm",
|
||||||
"I'm confused!", "I scored with the princess",
|
"I'm confused!",
|
||||||
"I want to live forever or die in the attempt.", "Lichen Park",
|
"I scored with the princess",
|
||||||
"LOST IN THOUGHT - please send search party", "Meat is Mordor",
|
"I want to live forever or die in the attempt.",
|
||||||
"Minetown Better Business Bureau", "Minetown Watch",
|
"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",
|
"Ms. Palm's House of Negotiable Affection -- A Very Reputable House Of Disrepute",
|
||||||
"Protection Racketeer", "Real men love Crom",
|
"Protection Racketeer",
|
||||||
"Somebody stole my Mojo!", "The Hellhound Gang", "The Werewolves",
|
"Real men love Crom",
|
||||||
|
"Somebody stole my Mojo!",
|
||||||
|
"The Hellhound Gang",
|
||||||
|
"The Werewolves",
|
||||||
"They Might Be Storm Giants",
|
"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!",
|
"You're killing me!",
|
||||||
"Anhur State University - Home of the Fighting Fire Ants!",
|
"Anhur State University - Home of the Fighting Fire Ants!",
|
||||||
"FREE HUGS", "Serial Ascender", "Real men are valkyries",
|
"FREE HUGS",
|
||||||
"Young Men's Cavedigging Association", "Occupy Fort Ludios",
|
"Serial Ascender",
|
||||||
"I couldn't afford this T-shirt so I stole it!", "Mind flayers suck",
|
"Real men are valkyries",
|
||||||
"I'm not wearing any pants", "Down with the living!",
|
"Young Men's Cavedigging Association",
|
||||||
"Pudding farmer", "Vegetarian",
|
"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)]);
|
Strcpy(buf, shirt_msgs[tshirt->o_id % SIZE(shirt_msgs)]);
|
||||||
@@ -126,8 +150,11 @@ struct obj *apron;
|
|||||||
char *buf;
|
char *buf;
|
||||||
{
|
{
|
||||||
static const char *apron_msgs[] = {
|
static const char *apron_msgs[] = {
|
||||||
"Kiss the cook", "I'm making SCIENCE!", "Don't mess with the chef",
|
"Kiss the cook",
|
||||||
"Don't make me poison you", "Gehennom's Kitchen",
|
"I'm making SCIENCE!",
|
||||||
|
"Don't mess with the chef",
|
||||||
|
"Don't make me poison you",
|
||||||
|
"Gehennom's Kitchen",
|
||||||
"Rat: The other white meat",
|
"Rat: The other white meat",
|
||||||
"If you can't stand the heat, get out of Gehennom!",
|
"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?",
|
"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. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -1395,7 +1395,8 @@ freedynamicdata()
|
|||||||
free_autopickup_exceptions();
|
free_autopickup_exceptions();
|
||||||
|
|
||||||
/* miscellaneous */
|
/* miscellaneous */
|
||||||
free_pickinv_cache();
|
/* free_pickinv_cache(); -- done from done()... */
|
||||||
|
free_symsets();
|
||||||
#endif /* FREE_ALL_MEMORY */
|
#endif /* FREE_ALL_MEMORY */
|
||||||
#ifdef STATUS_VIA_WINDOWPORT
|
#ifdef STATUS_VIA_WINDOWPORT
|
||||||
status_finish();
|
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 */
|
/* Copyright (c) 1989 by Jean-Christophe Collet */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
#pragma warning(disable : 4244)
|
#pragma warning(disable : 4244)
|
||||||
#endif
|
#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 *));
|
extern void FDECL(mkmap, (lev_init *));
|
||||||
|
|
||||||
@@ -471,6 +471,7 @@ opvar_var_conversion(coder, ov)
|
|||||||
struct sp_coder *coder;
|
struct sp_coder *coder;
|
||||||
struct opvar *ov;
|
struct opvar *ov;
|
||||||
{
|
{
|
||||||
|
static const char nhFunc[] = "opvar_var_conversion";
|
||||||
struct splev_var *tmp;
|
struct splev_var *tmp;
|
||||||
struct opvar *tmpov;
|
struct opvar *tmpov;
|
||||||
struct opvar *array_idx = NULL;
|
struct opvar *array_idx = NULL;
|
||||||
@@ -483,14 +484,15 @@ struct opvar *ov;
|
|||||||
while (tmp) {
|
while (tmp) {
|
||||||
if (!strcmp(tmp->name, OV_s(ov))) {
|
if (!strcmp(tmp->name, OV_s(ov))) {
|
||||||
if ((tmp->svtyp & SPOVAR_ARRAY)) {
|
if ((tmp->svtyp & SPOVAR_ARRAY)) {
|
||||||
array_idx = opvar_var_conversion(
|
array_idx = opvar_var_conversion(coder,
|
||||||
coder, splev_stack_pop(coder->stack));
|
splev_stack_pop(coder->stack));
|
||||||
if (!array_idx || OV_typ(array_idx) != SPOVAR_INT)
|
if (!array_idx || OV_typ(array_idx) != SPOVAR_INT)
|
||||||
panic("array idx not an int");
|
panic("array idx not an int");
|
||||||
if (tmp->array_len < 1)
|
if (tmp->array_len < 1)
|
||||||
panic("array len < 1");
|
panic("array len < 1");
|
||||||
OV_i(array_idx) = (OV_i(array_idx) % tmp->array_len);
|
OV_i(array_idx) = (OV_i(array_idx) % tmp->array_len);
|
||||||
tmpov = opvar_clone(tmp->data.arrayvalues[OV_i(array_idx)]);
|
tmpov = opvar_clone(tmp->data.arrayvalues[OV_i(array_idx)]);
|
||||||
|
opvar_free(array_idx);
|
||||||
return tmpov;
|
return tmpov;
|
||||||
} else {
|
} else {
|
||||||
tmpov = opvar_clone(tmp->data.value);
|
tmpov = opvar_clone(tmp->data.value);
|
||||||
@@ -525,15 +527,21 @@ splev_stack_getdat(coder, typ)
|
|||||||
struct sp_coder *coder;
|
struct sp_coder *coder;
|
||||||
xchar typ;
|
xchar typ;
|
||||||
{
|
{
|
||||||
|
static const char nhFunc[] = "splev_stack_getdat";
|
||||||
if (coder && coder->stack) {
|
if (coder && coder->stack) {
|
||||||
struct opvar *tmp = splev_stack_pop(coder->stack);
|
struct opvar *tmp = splev_stack_pop(coder->stack);
|
||||||
|
struct opvar *ret = NULL;
|
||||||
|
|
||||||
if (!tmp)
|
if (!tmp)
|
||||||
panic("no value type %i in stack.", typ);
|
panic("no value type %i in stack.", typ);
|
||||||
if (tmp->spovartyp == SPOVAR_VARIABLE)
|
if (tmp->spovartyp == SPOVAR_VARIABLE) {
|
||||||
tmp = opvar_var_conversion(coder, tmp);
|
ret = opvar_var_conversion(coder, tmp);
|
||||||
|
opvar_free(tmp);
|
||||||
|
tmp = ret;
|
||||||
|
}
|
||||||
if (tmp->spovartyp == typ)
|
if (tmp->spovartyp == typ)
|
||||||
return tmp;
|
return tmp;
|
||||||
|
else opvar_free(tmp);
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -542,10 +550,14 @@ struct opvar *
|
|||||||
splev_stack_getdat_any(coder)
|
splev_stack_getdat_any(coder)
|
||||||
struct sp_coder *coder;
|
struct sp_coder *coder;
|
||||||
{
|
{
|
||||||
|
static const char nhFunc[] = "splev_stack_getdat_any";
|
||||||
if (coder && coder->stack) {
|
if (coder && coder->stack) {
|
||||||
struct opvar *tmp = splev_stack_pop(coder->stack);
|
struct opvar *tmp = splev_stack_pop(coder->stack);
|
||||||
if (tmp && tmp->spovartyp == SPOVAR_VARIABLE)
|
if (tmp && tmp->spovartyp == SPOVAR_VARIABLE) {
|
||||||
tmp = opvar_var_conversion(coder, tmp);
|
struct opvar *ret = opvar_var_conversion(coder, tmp);
|
||||||
|
opvar_free(tmp);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -964,6 +976,9 @@ packed_coord pos;
|
|||||||
schar try_x, try_y;
|
schar try_x, try_y;
|
||||||
register int trycnt = 0;
|
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);
|
get_location_coord(&try_x, &try_y, DRY, croom, pos);
|
||||||
if (levl[try_x][try_y].typ != ROOM) {
|
if (levl[try_x][try_y].typ != ROOM) {
|
||||||
do {
|
do {
|
||||||
@@ -3786,7 +3801,7 @@ boolean diagonals;
|
|||||||
} while (0)
|
} while (0)
|
||||||
#define SEL_FLOOD_CHKDIR(mx,my,sel) \
|
#define SEL_FLOOD_CHKDIR(mx,my,sel) \
|
||||||
if (isok((mx), (my)) \
|
if (isok((mx), (my)) \
|
||||||
&& (*selection_flood_check_func)((mx),(my)) \
|
&& (*selection_flood_check_func)((mx), (my)) \
|
||||||
&& !selection_getpoint((mx), (my), (sel))) \
|
&& !selection_getpoint((mx), (my), (sel))) \
|
||||||
SEL_FLOOD((mx), (my))
|
SEL_FLOOD((mx), (my))
|
||||||
static const char floodfill_stack_overrun[] = "floodfill stack overrun";
|
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));
|
dy1 = (xchar) SP_REGION_Y1(OV_i(r));
|
||||||
dx2 = (xchar) SP_REGION_X2(OV_i(r));
|
dx2 = (xchar) SP_REGION_X2(OV_i(r));
|
||||||
dy2 = (xchar) SP_REGION_Y2(OV_i(r));
|
dy2 = (xchar) SP_REGION_Y2(OV_i(r));
|
||||||
wallify_map(dx1 < 0 ? xstart : dx1, dy1 < 0 ? ystart : dy1,
|
wallify_map(dx1 < 0 ? (xstart-1) : dx1, dy1 < 0 ? (ystart-1) : dy1,
|
||||||
dx2 < 0 ? xstart + xsize : dx2,
|
dx2 < 0 ? (xstart + xsize + 1) : dx2,
|
||||||
dy2 < 0 ? ystart + ysize : dy2);
|
dy2 < 0 ? (ystart + ysize + 1) : dy2);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if (!OV_pop_typ(r, SPOVAR_SEL))
|
if (!OV_pop_typ(r, SPOVAR_SEL))
|
||||||
@@ -4736,6 +4751,7 @@ struct sp_coder *coder;
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
opvar_free(r);
|
opvar_free(r);
|
||||||
|
opvar_free(typ);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
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 */
|
/* Copyright (c) M. Stephenson 1988 */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -469,7 +469,9 @@ register struct obj *spellbook;
|
|||||||
if (booktype == SPE_NOVEL) {
|
if (booktype == SPE_NOVEL) {
|
||||||
/* Obtain current Terry Pratchett book title */
|
/* Obtain current Terry Pratchett book title */
|
||||||
const char *tribtitle = noveltitle(&spellbook->novelidx);
|
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++;
|
u.uconduct.literate++;
|
||||||
check_unpaid(spellbook);
|
check_unpaid(spellbook);
|
||||||
if (!u.uevent.read_tribute) {
|
if (!u.uevent.read_tribute) {
|
||||||
|
|||||||
@@ -676,6 +676,7 @@ boolean is_pet; /* If true, pet should keep wielded/worn items */
|
|||||||
if (canspotmon(mtmp))
|
if (canspotmon(mtmp))
|
||||||
pline("%s gold %s.", s_suffix(Monnam(mtmp)),
|
pline("%s gold %s.", s_suffix(Monnam(mtmp)),
|
||||||
canseemon(mtmp) ? "vanishes" : "seems to vanish");
|
canseemon(mtmp) ? "vanishes" : "seems to vanish");
|
||||||
|
obj_extract_self(otmp);
|
||||||
obfree(otmp, (struct obj *) 0);
|
obfree(otmp, (struct obj *) 0);
|
||||||
} /* isgd && has gold */
|
} /* 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. */
|
/* Copyright (c) Kenneth Lorber, Kensington, Maryland, 2008. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -6,9 +6,11 @@
|
|||||||
|
|
||||||
#ifndef SYSCF
|
#ifndef SYSCF
|
||||||
/* !SYSCF configurations need '#define DEBUGFILES "foo.c bar.c"'
|
/* !SYSCF configurations need '#define DEBUGFILES "foo.c bar.c"'
|
||||||
to enable debugging feedback for source files foo.c and bar.c;
|
* to enable debugging feedback for source files foo.c and bar.c;
|
||||||
to activate debugpline(), set an appropriate value and uncomment */
|
* to activate debugpline(), set an appropriate value and uncomment
|
||||||
|
*/
|
||||||
/* # define DEBUGFILES "*" */
|
/* # define DEBUGFILES "*" */
|
||||||
|
|
||||||
/* note: DEBUGFILES value here or in sysconf.DEBUGFILES can be overridden
|
/* note: DEBUGFILES value here or in sysconf.DEBUGFILES can be overridden
|
||||||
at runtime by setting up a value for "DEBUGFILES" in the environment */
|
at runtime by setting up a value for "DEBUGFILES" in the environment */
|
||||||
#endif
|
#endif
|
||||||
@@ -18,21 +20,21 @@ struct sysopt sysopt;
|
|||||||
void
|
void
|
||||||
sys_early_init()
|
sys_early_init()
|
||||||
{
|
{
|
||||||
sysopt.support = NULL;
|
sysopt.support = (char *) 0;
|
||||||
sysopt.recover = NULL;
|
sysopt.recover = (char *) 0;
|
||||||
#ifdef SYSCF
|
#ifdef SYSCF
|
||||||
sysopt.wizards = NULL;
|
sysopt.wizards = (char *) 0;
|
||||||
#else
|
#else
|
||||||
sysopt.wizards = dupstr(WIZARD_NAME);
|
sysopt.wizards = dupstr(WIZARD_NAME);
|
||||||
#endif
|
#endif
|
||||||
#if defined(SYSCF) || !defined(DEBUGFILES)
|
#if defined(SYSCF) || !defined(DEBUGFILES)
|
||||||
sysopt.debugfiles = NULL;
|
sysopt.debugfiles = (char *) 0;
|
||||||
#else
|
#else
|
||||||
sysopt.debugfiles = dupstr(DEBUGFILES);
|
sysopt.debugfiles = dupstr(DEBUGFILES);
|
||||||
#endif
|
#endif
|
||||||
sysopt.env_dbgfl = 0; /* haven't checked getenv("DEBUGFILES") yet */
|
sysopt.env_dbgfl = 0; /* haven't checked getenv("DEBUGFILES") yet */
|
||||||
sysopt.shellers = NULL;
|
sysopt.shellers = (char *) 0;
|
||||||
sysopt.explorers = NULL;
|
sysopt.explorers = (char *) 0;
|
||||||
sysopt.maxplayers = 0; /* XXX eventually replace MAX_NR_OF_PLAYERS */
|
sysopt.maxplayers = 0; /* XXX eventually replace MAX_NR_OF_PLAYERS */
|
||||||
|
|
||||||
/* record file */
|
/* record file */
|
||||||
@@ -72,25 +74,31 @@ sys_early_init()
|
|||||||
sysopt.check_save_uid = 1;
|
sysopt.check_save_uid = 1;
|
||||||
sysopt.seduce = 1; /* if it's compiled in, default to on */
|
sysopt.seduce = 1; /* if it's compiled in, default to on */
|
||||||
sysopt_seduce_set(sysopt.seduce);
|
sysopt_seduce_set(sysopt.seduce);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
sysopt_release()
|
sysopt_release()
|
||||||
{
|
{
|
||||||
if (sysopt.support)
|
if (sysopt.support)
|
||||||
free(sysopt.support), sysopt.support = NULL;
|
free(sysopt.support), sysopt.support = (char *) 0;
|
||||||
if (sysopt.recover)
|
if (sysopt.recover)
|
||||||
free(sysopt.recover), sysopt.recover = NULL;
|
free(sysopt.recover), sysopt.recover = (char *) 0;
|
||||||
if (sysopt.wizards)
|
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)
|
if (sysopt.debugfiles)
|
||||||
free(sysopt.debugfiles), sysopt.debugfiles = NULL;
|
free(sysopt.debugfiles), sysopt.debugfiles = (char *) 0;
|
||||||
#ifdef PANICTRACE
|
#ifdef PANICTRACE
|
||||||
if (sysopt.gdbpath)
|
if (sysopt.gdbpath)
|
||||||
free(sysopt.gdbpath), sysopt.gdbpath = NULL;
|
free(sysopt.gdbpath), sysopt.gdbpath = (char *) 0;
|
||||||
if (sysopt.greppath)
|
if (sysopt.greppath)
|
||||||
free(sysopt.greppath), sysopt.greppath = NULL;
|
free(sysopt.greppath), sysopt.greppath = (char *) 0;
|
||||||
#endif
|
#endif
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern struct attack sa_yes[NATTK];
|
extern struct attack sa_yes[NATTK];
|
||||||
@@ -102,8 +110,12 @@ int val;
|
|||||||
{
|
{
|
||||||
struct attack *setval = val ? sa_yes : sa_no;
|
struct attack *setval = val ? sa_yes : sa_no;
|
||||||
int x;
|
int x;
|
||||||
|
|
||||||
for (x = 0; x < NATTK; x++) {
|
for (x = 0; x < NATTK; x++) {
|
||||||
mons[PM_INCUBUS].mattk[x] = setval[x];
|
mons[PM_INCUBUS].mattk[x] = setval[x];
|
||||||
mons[PM_SUCCUBUS].mattk[x] = setval[x];
|
mons[PM_SUCCUBUS].mattk[x] = setval[x];
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*sys.c*/
|
||||||
|
|||||||
+3
-1
@@ -490,12 +490,14 @@ int
|
|||||||
dotele()
|
dotele()
|
||||||
{
|
{
|
||||||
struct trap *trap;
|
struct trap *trap;
|
||||||
|
boolean trap_once = FALSE;
|
||||||
|
|
||||||
trap = t_at(u.ux, u.uy);
|
trap = t_at(u.ux, u.uy);
|
||||||
if (trap && (!trap->tseen || trap->ttyp != TELEP_TRAP))
|
if (trap && (!trap->tseen || trap->ttyp != TELEP_TRAP))
|
||||||
trap = 0;
|
trap = 0;
|
||||||
|
|
||||||
if (trap) {
|
if (trap) {
|
||||||
|
trap_once = trap->once; /* trap may get deleted, save this */
|
||||||
if (trap->once) {
|
if (trap->once) {
|
||||||
pline("This is a vault teleport, usable once only.");
|
pline("This is a vault teleport, usable once only.");
|
||||||
if (yn("Jump in?") == 'n')
|
if (yn("Jump in?") == 'n')
|
||||||
@@ -569,7 +571,7 @@ dotele()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (next_to_u()) {
|
if (next_to_u()) {
|
||||||
if (trap && trap->once)
|
if (trap && trap_once)
|
||||||
vault_tele();
|
vault_tele();
|
||||||
else
|
else
|
||||||
tele();
|
tele();
|
||||||
|
|||||||
+2
-5
@@ -760,10 +760,7 @@ boolean shatter;
|
|||||||
otmp = nxtobj(otmp, STATUE, TRUE);
|
otmp = nxtobj(otmp, STATUE, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Blind)
|
feel_newsym(x, y);
|
||||||
feel_location(x, y);
|
|
||||||
else
|
|
||||||
newsym(x, y);
|
|
||||||
return mtmp;
|
return mtmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3767,7 +3764,7 @@ STATIC_OVL void
|
|||||||
move_into_trap(ttmp)
|
move_into_trap(ttmp)
|
||||||
struct trap *ttmp;
|
struct trap *ttmp;
|
||||||
{
|
{
|
||||||
int bc;
|
int bc = 0;
|
||||||
xchar x = ttmp->tx, y = ttmp->ty, bx, by, cx, cy;
|
xchar x = ttmp->tx, y = ttmp->ty, bx, by, cx, cy;
|
||||||
boolean unused;
|
boolean unused;
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -959,7 +959,7 @@ int otyp;
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (skills->skill != P_NONE) {
|
while (skills && skills->skill != P_NONE) {
|
||||||
if (skills->skill == this_skill)
|
if (skills->skill == this_skill)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
++skills;
|
++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. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -2979,7 +2979,8 @@ STATIC_OVL void
|
|||||||
skiprange(range, skipstart, skipend)
|
skiprange(range, skipstart, skipend)
|
||||||
int 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;
|
*skipstart = tmp;
|
||||||
*skipend = tmp - ((tmp / 4) * rnd(3));
|
*skipend = tmp - ((tmp / 4) * rnd(3));
|
||||||
if (*skipend >= tmp)
|
if (*skipend >= tmp)
|
||||||
@@ -4461,9 +4462,8 @@ register struct obj *obj; /* no texts here! */
|
|||||||
obj->owt = weight(obj);
|
obj->owt = weight(obj);
|
||||||
obj->dknown = obj->bknown = obj->rknown = 0;
|
obj->dknown = obj->bknown = obj->rknown = 0;
|
||||||
obj->known = objects[obj->otyp].oc_uses_known ? 0 : 1;
|
obj->known = objects[obj->otyp].oc_uses_known ? 0 : 1;
|
||||||
if (obj->oextra)
|
dealloc_oextra(obj);
|
||||||
dealloc_oextra(obj->oextra);
|
|
||||||
obj->oextra = (struct oextra *) 0;
|
|
||||||
if (obj->where == OBJ_FLOOR) {
|
if (obj->where == OBJ_FLOOR) {
|
||||||
obj_extract_self(obj); /* move rocks back on top */
|
obj_extract_self(obj); /* move rocks back on top */
|
||||||
place_object(obj, obj->ox, obj->oy);
|
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. */
|
/* Copyright (c) Dean Luick, 1996. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -66,10 +66,10 @@ MAIN(int argc, char **argv)
|
|||||||
|
|
||||||
display_gamewindows();
|
display_gamewindows();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* First, try to find and restore a save file for specified character.
|
* First, try to find and restore a save file for specified character.
|
||||||
* We'll return here if new game player_selection() renames the hero.
|
* We'll return here if new game player_selection() renames the hero.
|
||||||
*/
|
*/
|
||||||
attempt_restore:
|
attempt_restore:
|
||||||
if ((fd = restore_saved_game()) >= 0) {
|
if ((fd = restore_saved_game()) >= 0) {
|
||||||
#ifdef NEWS
|
#ifdef NEWS
|
||||||
@@ -167,7 +167,6 @@ process_options(int argc, char **argv)
|
|||||||
case 'D':
|
case 'D':
|
||||||
wizard = TRUE, discover = FALSE;
|
wizard = TRUE, discover = FALSE;
|
||||||
break;
|
break;
|
||||||
/* otherwise fall thru to discover */
|
|
||||||
case 'X':
|
case 'X':
|
||||||
discover = TRUE, wizard = FALSE;
|
discover = TRUE, wizard = FALSE;
|
||||||
break;
|
break;
|
||||||
@@ -268,6 +267,7 @@ authorize_wizard_mode()
|
|||||||
* do anything extra.
|
* do anything extra.
|
||||||
*/
|
*/
|
||||||
void nethack_exit(int status);
|
void nethack_exit(int status);
|
||||||
|
|
||||||
void
|
void
|
||||||
nethack_exit(int status)
|
nethack_exit(int status)
|
||||||
{
|
{
|
||||||
|
|||||||
+1399
-1139
File diff suppressed because it is too large
Load Diff
+1892
-2458
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
|||||||
# NetHack Makefile.
|
# 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:
|
# Root of source tree:
|
||||||
NHSROOT=..
|
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 \
|
../util/tile2x11 ../win/share/monsters.txt ../win/share/objects.txt \
|
||||||
../win/share/other.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
|
../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
|
../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
|
../win/share/other.txt
|
||||||
../util/tile2bmp $@
|
../util/tile2bmp $@
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# NetHack Makefile.
|
# 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:
|
# Root of source tree:
|
||||||
NHSROOT=..
|
NHSROOT=..
|
||||||
@@ -750,7 +750,8 @@ dogmove.o: dogmove.c $(HACK_H) ../include/mfndpos.h
|
|||||||
dokick.o: dokick.c $(HACK_H)
|
dokick.o: dokick.c $(HACK_H)
|
||||||
dothrow.o: dothrow.c $(HACK_H)
|
dothrow.o: dothrow.c $(HACK_H)
|
||||||
drawing.o: drawing.c $(HACK_H) ../include/tcap.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)
|
eat.o: eat.c $(HACK_H)
|
||||||
end.o: end.c $(HACK_H) ../include/lev.h ../include/dlb.h
|
end.o: end.c $(HACK_H) ../include/lev.h ../include/dlb.h
|
||||||
engrave.o: engrave.c $(HACK_H) ../include/lev.h
|
engrave.o: engrave.c $(HACK_H) ../include/lev.h
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# NetHack Makefile.
|
# 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:
|
# Root of source tree:
|
||||||
NHSROOT=.
|
NHSROOT=.
|
||||||
@@ -46,14 +46,14 @@ DIRPERM = 0755
|
|||||||
|
|
||||||
# per discussion in Install.X11 and Install.Qt
|
# per discussion in Install.X11 and Install.Qt
|
||||||
#VARDATND =
|
#VARDATND =
|
||||||
# VARDATND = x11tiles NetHack.ad pet_mark.xbm
|
# VARDATND = x11tiles NetHack.ad pet_mark.xbm pilemark.xpm
|
||||||
# VARDATND = x11tiles NetHack.ad pet_mark.xbm rip.xpm
|
# VARDATND = x11tiles NetHack.ad pet_mark.xbm pilemark.xpm rip.xpm
|
||||||
# for Atari/Gem
|
# for Atari/Gem
|
||||||
# VARDATND = nh16.img title.img GEM_RSC.RSC rip.img
|
# VARDATND = nh16.img title.img GEM_RSC.RSC rip.img
|
||||||
# for BeOS
|
# for BeOS
|
||||||
# VARDATND = beostiles
|
# VARDATND = beostiles
|
||||||
# for Gnome
|
# 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
|
VARDATD = bogusmon data engrave epitaph oracles options quest.dat rumors
|
||||||
VARDAT = $(VARDATD) $(VARDATND)
|
VARDAT = $(VARDATD) $(VARDATND)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# Makefile for NetHack's utility programs.
|
# 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:
|
# Root of source tree:
|
||||||
NHSROOT=..
|
NHSROOT=..
|
||||||
@@ -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
|
dgn_main.o: dgn_main.c $(CONFIG_H) ../include/dlb.h
|
||||||
|
|
||||||
# see dgn_comp.l for WEIRD_LEX discussion
|
# 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
|
@echo $(CC) -c $(CFLAGS) dgn_lex.c
|
||||||
@$(CC) -c $(CFLAGS) -DWEIRD_LEX=`egrep -c _cplusplus dgn_lex.c` 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
|
tile2beos.o: ../win/BeOS/tile2beos.cpp $(HACK_H) ../include/tile.h
|
||||||
$(CXX) $(CFLAGS) -c ../win/BeOS/tile2beos.cpp
|
$(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
|
# using dependencies like
|
||||||
# ../src/foo::
|
# ../src/foo::
|
||||||
# @( cd ../src ; $(MAKE) foo )
|
# @( cd ../src ; $(MAKE) foo )
|
||||||
@@ -416,8 +421,5 @@ spotless: clean
|
|||||||
-rm -f ../include/lev_comp.h ../include/dgn_comp.h
|
-rm -f ../include/lev_comp.h ../include/dgn_comp.h
|
||||||
-rm -f ../include/tile.h tiletxt.c
|
-rm -f ../include/tile.h tiletxt.c
|
||||||
-rm -f makedefs lev_comp dgn_comp recover dlb
|
-rm -f makedefs lev_comp dgn_comp recover dlb
|
||||||
-rm -f gif2txt txt2ppm tile2x11 tile2img.ttp xpm2img.ttp tilemap
|
-rm -f gif2txt txt2ppm tile2x11 tile2img.ttp xpm2img.ttp \
|
||||||
|
tilemap tileedit
|
||||||
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
|
|
||||||
|
|||||||
@@ -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.
|
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007.
|
||||||
# NetHack may be freely redistributed. See license for details.
|
# 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.
|
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2009.
|
||||||
# NetHack may be freely redistributed. See license for details.
|
# 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.
|
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2009.
|
||||||
# NetHack may be freely redistributed. See license for details.
|
# NetHack may be freely redistributed. See license for details.
|
||||||
#
|
#
|
||||||
|
|||||||
+13
-16
@@ -5,18 +5,10 @@
|
|||||||
0. Please read this entire file before trying to build or install
|
0. Please read this entire file before trying to build or install
|
||||||
NetHack, then read it again!
|
NetHack, then read it again!
|
||||||
|
|
||||||
1. Building NetHack requires a C compiler (either Compaq C, DEC C,
|
1. Build testing was done using a recent version of HP C (aka Compaq C
|
||||||
VAX C, or GNU C) and VMS version V4.6 or later (but see note #9).
|
aka--and more widely known as--DEC C). Older versions of DEC C will
|
||||||
This release has been tested with Compaq C V6.4 on Alpha/VMS V7.3-1
|
probably work too. Ancient VAX C probably will not. The set of
|
||||||
and with VAX C V3.2 and GNU C 2.7.1 on VAX/VMS V5.5-2. The build
|
Makefiles are known to be out of date; use vmsbuild.com instead.
|
||||||
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.
|
|
||||||
|
|
||||||
2. Make sure all the NetHack files are in the appropriate directory
|
2. Make sure all the NetHack files are in the appropriate directory
|
||||||
structure. You should set up a directory--referred to as "top" below
|
structure. You should set up a directory--referred to as "top" below
|
||||||
@@ -43,6 +35,7 @@
|
|||||||
[.sys .os2] -- OS/2
|
[.sys .os2] -- OS/2
|
||||||
[.sys .share .sounds] -- AIFF format audio files
|
[.sys .share .sounds] -- AIFF format audio files
|
||||||
[.sys .unix] -- guess :-)
|
[.sys .unix] -- guess :-)
|
||||||
|
[.sys .unit .hints] -- configuration data for setup.sh
|
||||||
[.sys .wince] -- Windows CE
|
[.sys .wince] -- Windows CE
|
||||||
[.sys .wince .ceinc] -- more WinCE
|
[.sys .wince .ceinc] -- more WinCE
|
||||||
[.sys .wince .ceinc .sys] -- ditto
|
[.sys .wince .ceinc .sys] -- ditto
|
||||||
@@ -136,10 +129,11 @@
|
|||||||
|
|
||||||
Notes:
|
Notes:
|
||||||
|
|
||||||
|
0. Versions 3.5.0 was never publicly released.
|
||||||
|
|
||||||
1. Save files and bones files from 3.4.x and earlier versions
|
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
|
will not work with 3.6.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
|
3.4.x or 3.3.x will work.
|
||||||
format but should be compatible.
|
|
||||||
|
|
||||||
2. To specify user-preference options in your environment, define the
|
2. To specify user-preference options in your environment, define the
|
||||||
logical name NETHACKOPTIONS to have the value of a quoted string
|
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
|
placed in the playground directory by install.com. Also, an example
|
||||||
configuration file can be found in [.win.X11]nethack.rc.)
|
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
|
use the set of Makefiles found in the vms subdirectory, provided you
|
||||||
have an appropriate and compatible make utility. They've been tested
|
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,
|
using MMK, a freeware clone of Digital's MMS. There are five of them,
|
||||||
@@ -477,3 +473,4 @@ Notes:
|
|||||||
and the C compiler used.
|
and the C compiler used.
|
||||||
|
|
||||||
20-OCT-2003
|
20-OCT-2003
|
||||||
|
minimally updated 9-NOV-2015...
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# NetHack Makefile (VMS) - for building nethack itself.
|
# 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.
|
# Copy this file to [.src]Makefile. and then edit it as needed.
|
||||||
# The default configuration is for building with DEC C (aka Compaq C).
|
# 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)
|
dokick.obj : dokick.c $(HACK_H)
|
||||||
dothrow.obj : dothrow.c $(HACK_H)
|
dothrow.obj : dothrow.c $(HACK_H)
|
||||||
drawing.obj : drawing.c $(HACK_H) $(INC)tcap.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)
|
eat.obj : eat.c $(HACK_H)
|
||||||
end.obj : end.c $(HACK_H) $(INC)lev.h $(INC)dlb.h
|
end.obj : end.c $(HACK_H) $(INC)lev.h $(INC)dlb.h
|
||||||
engrave.obj : engrave.c $(HACK_H) $(INC)lev.h
|
engrave.obj : engrave.c $(HACK_H) $(INC)lev.h
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
==============================================================
|
==============================================================
|
||||||
Instructions for compiling and installing
|
Instructions for compiling and installing
|
||||||
NetHack 3.6 on a Windows system
|
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 $
|
Last revision: $NHDT-Date: 1434806470 2015/06/20 13:21:10 $
|
||||||
|
|
||||||
|
|||||||
@@ -17,3 +17,6 @@ gif2txt
|
|||||||
txt2ppm
|
txt2ppm
|
||||||
tile2img.ttp
|
tile2img.ttp
|
||||||
xpm2ppm.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) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* Copyright (c) M. Stephenson, 1990, 1991. */
|
/* Copyright (c) M. Stephenson, 1990, 1991. */
|
||||||
/* Copyright (c) Dean Luick, 1990. */
|
/* Copyright (c) Dean Luick, 1990. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
#define MAKEDEFS_C /* use to conditionally include file sections */
|
#define MAKEDEFS_C /* use to conditionally include file sections */
|
||||||
|
|
||||||
#include "config.h"
|
#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 "permonst.h"
|
||||||
#include "objclass.h"
|
#include "objclass.h"
|
||||||
#include "monsym.h"
|
#include "monsym.h"
|
||||||
@@ -228,8 +231,8 @@ main(void)
|
|||||||
|
|
||||||
if (buf[0] == '-' && buf[1] == '-') {
|
if (buf[0] == '-' && buf[1] == '-') {
|
||||||
#if 0
|
#if 0
|
||||||
split up buf into words
|
split up buf into words
|
||||||
do_ext_makedefs(fakeargc, fakeargv);
|
do_ext_makedefs(fakeargc, fakeargv);
|
||||||
#else
|
#else
|
||||||
printf("extended makedefs not implemented for Mac OS9\n");
|
printf("extended makedefs not implemented for Mac OS9\n");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
@@ -589,12 +592,12 @@ do_ext_makedefs(int argc, char **argv)
|
|||||||
existing lines in the docs look like that)
|
existing lines in the docs look like that)
|
||||||
|
|
||||||
Control lines:
|
Control lines:
|
||||||
^^ a line starting with a (single) literal caret
|
^^ a line starting with a (single) literal caret
|
||||||
^# a comment - the line is ignored
|
^# a comment - the line is ignored
|
||||||
^?ID if defined(ID)
|
^?ID if defined(ID)
|
||||||
^!ID if !defined(ID)
|
^!ID if !defined(ID)
|
||||||
^: else
|
^: else
|
||||||
^. endif
|
^. endif
|
||||||
|
|
||||||
*/
|
*/
|
||||||
#define GREP_MAGIC '^'
|
#define GREP_MAGIC '^'
|
||||||
@@ -891,6 +894,7 @@ unsigned long old_rumor_offset;
|
|||||||
we ameliorate the latter by padding the shortest lines,
|
we ameliorate the latter by padding the shortest lines,
|
||||||
increasing the chance of the random seek landing in them */
|
increasing the chance of the random seek landing in them */
|
||||||
int len = (int) strlen(line);
|
int len = (int) strlen(line);
|
||||||
|
|
||||||
if (len <= PAD_RUMORS_TO) {
|
if (len <= PAD_RUMORS_TO) {
|
||||||
char *base = index(line, '\n');
|
char *base = index(line, '\n');
|
||||||
/* this is only safe because fgetline() overallocates */
|
/* this is only safe because fgetline() overallocates */
|
||||||
@@ -903,8 +907,8 @@ unsigned long old_rumor_offset;
|
|||||||
#endif
|
#endif
|
||||||
(*rumor_count)++;
|
(*rumor_count)++;
|
||||||
#if 0
|
#if 0
|
||||||
/*[if we forced binary output, this would be sufficient]*/
|
/*[if we forced binary output, this would be sufficient]*/
|
||||||
*rumor_size += strlen(line); /* includes newline */
|
*rumor_size += strlen(line); /* includes newline */
|
||||||
#endif
|
#endif
|
||||||
(void) fputs(xcrypt(line), tfp);
|
(void) fputs(xcrypt(line), tfp);
|
||||||
free(line);
|
free(line);
|
||||||
@@ -1204,8 +1208,8 @@ const char *build_date;
|
|||||||
version_string(versbuf, "."), PORT_ID, subbuf, &build_date[4]);
|
version_string(versbuf, "."), PORT_ID, subbuf, &build_date[4]);
|
||||||
#if 0
|
#if 0
|
||||||
Sprintf(outbuf, "%s NetHack%s %s Copyright 1985-%s (built %s)",
|
Sprintf(outbuf, "%s NetHack%s %s Copyright 1985-%s (built %s)",
|
||||||
PORT_ID, subbuf, version_string(versbuf,"."), RELEASE_YEAR,
|
PORT_ID, subbuf, version_string(versbuf,"."), RELEASE_YEAR,
|
||||||
&build_date[4]);
|
&build_date[4]);
|
||||||
#endif
|
#endif
|
||||||
return outbuf;
|
return outbuf;
|
||||||
}
|
}
|
||||||
@@ -1593,21 +1597,21 @@ char *line;
|
|||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
New format (v3.1) of 'data' file which allows much faster lookups [pr]
|
New format (v3.1) of 'data' file which allows much faster lookups [pr]
|
||||||
"do not edit" first record is a comment line
|
"do not edit" first record is a comment line
|
||||||
01234567 hexadecimal formatted offset to text area
|
01234567 hexadecimal formatted offset to text area
|
||||||
name-a first name of interest
|
name-a first name of interest
|
||||||
123,4 offset to name's text, and number of lines for it
|
123,4 offset to name's text, and number of lines for it
|
||||||
name-b next name of interest
|
name-b next name of interest
|
||||||
name-c multiple names which share same description also
|
name-c multiple names which share same description also
|
||||||
456,7 share a single offset,count line
|
456,7 share a single offset,count line
|
||||||
. sentinel to mark end of names
|
. sentinel to mark end of names
|
||||||
789,0 dummy record containing offset, count of EOF
|
789,0 dummy record containing offset, count of EOF
|
||||||
text-a 4 lines of descriptive text for name-a
|
text-a 4 lines of descriptive text for name-a
|
||||||
text-a at file position 0x01234567L + 123L
|
text-a at file position 0x01234567L + 123L
|
||||||
text-a
|
text-a
|
||||||
text-a
|
text-a
|
||||||
text-b/text-c 7 lines of text for names-b and -c
|
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 at fseek(0x01234567L + 456L)
|
||||||
...
|
...
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -1985,7 +1989,7 @@ register struct permonst *ptr;
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (FALSE);
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This routine is designed to return an integer value which represents
|
/* 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 */
|
if (tmp > 49) /* special fixed hp monster */
|
||||||
tmp = 2 * (tmp - 6) / 4;
|
tmp = 2 * (tmp - 6) / 4;
|
||||||
|
|
||||||
/* For creation in groups */
|
/* For creation in groups */
|
||||||
n = (!!(ptr->geno & G_SGROUP));
|
n = (!!(ptr->geno & G_SGROUP));
|
||||||
n += (!!(ptr->geno & G_LGROUP)) << 1;
|
n += (!!(ptr->geno & G_LGROUP)) << 1;
|
||||||
|
|
||||||
/* For ranged attacks */
|
/* For ranged attacks */
|
||||||
if (ranged_attk(ptr))
|
if (ranged_attk(ptr))
|
||||||
n++;
|
n++;
|
||||||
|
|
||||||
/* For higher ac values */
|
/* For higher ac values */
|
||||||
n += (ptr->ac < 4);
|
n += (ptr->ac < 4);
|
||||||
n += (ptr->ac < 0);
|
n += (ptr->ac < 0);
|
||||||
|
|
||||||
/* For very fast monsters */
|
/* For very fast monsters */
|
||||||
n += (ptr->mmove >= 18);
|
n += (ptr->mmove >= 18);
|
||||||
|
|
||||||
/* For each attack and "special" attack */
|
/* For each attack and "special" attack */
|
||||||
for (i = 0; i < NATTK; i++) {
|
for (i = 0; i < NATTK; i++) {
|
||||||
tmp2 = ptr->mattk[i].aatyp;
|
tmp2 = ptr->mattk[i].aatyp;
|
||||||
n += (tmp2 > 0);
|
n += (tmp2 > 0);
|
||||||
@@ -2024,7 +2028,7 @@ struct permonst *ptr;
|
|||||||
n += (tmp2 == AT_WEAP && (ptr->mflags2 & M2_STRONG));
|
n += (tmp2 == AT_WEAP && (ptr->mflags2 & M2_STRONG));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* For each "special" damage type */
|
/* For each "special" damage type */
|
||||||
for (i = 0; i < NATTK; i++) {
|
for (i = 0; i < NATTK; i++) {
|
||||||
tmp2 = ptr->mattk[i].adtyp;
|
tmp2 = ptr->mattk[i].adtyp;
|
||||||
if ((tmp2 == AD_DRLI) || (tmp2 == AD_STON) || (tmp2 == AD_DRST)
|
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);
|
n += ((int) (ptr->mattk[i].damd * ptr->mattk[i].damn) > 23);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Leprechauns are special cases. They have many hit dice so they
|
/* Leprechauns are special cases. They have many hit dice so they can
|
||||||
can hit and are hard to kill, but they don't really do much
|
hit and are hard to kill, but they don't really do much damage. */
|
||||||
damage. */
|
|
||||||
if (!strcmp(ptr->mname, "leprechaun"))
|
if (!strcmp(ptr->mname, "leprechaun"))
|
||||||
n -= 2;
|
n -= 2;
|
||||||
|
|
||||||
/* Finally, adjust the monster level 0 <= n <= 24 (approx.) */
|
/* Finally, adjust the monster level 0 <= n <= 24 (approx.) */
|
||||||
if (n == 0)
|
if (n == 0)
|
||||||
tmp--;
|
tmp--;
|
||||||
else if (n >= 6)
|
else if (n >= 6)
|
||||||
@@ -2049,7 +2052,7 @@ struct permonst *ptr;
|
|||||||
else
|
else
|
||||||
tmp += (n / 3 + 1);
|
tmp += (n / 3 + 1);
|
||||||
|
|
||||||
return ((tmp >= 0) ? tmp : 0);
|
return (tmp >= 0) ? tmp : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -2134,7 +2137,7 @@ do_permonst()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Start of Quest text file processing. */
|
/* Start of Quest text file processing. */
|
||||||
#include "qtext.h"
|
#include "qtext.h"
|
||||||
|
|
||||||
static struct qthdr qt_hdr;
|
static struct qthdr qt_hdr;
|
||||||
@@ -2151,15 +2154,15 @@ qt_comment(s)
|
|||||||
char *s;
|
char *s;
|
||||||
{
|
{
|
||||||
if (s[0] == '#')
|
if (s[0] == '#')
|
||||||
return (TRUE);
|
return TRUE;
|
||||||
return ((boolean)(!in_msg && strlen(s) == NO_MSG));
|
return (boolean) (!in_msg && strlen(s) == NO_MSG);
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean
|
static boolean
|
||||||
qt_control(s)
|
qt_control(s)
|
||||||
char *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
|
static int
|
||||||
@@ -2170,9 +2173,9 @@ char *code;
|
|||||||
|
|
||||||
for (i = 0; i < qt_hdr.n_hdr; i++)
|
for (i = 0; i < qt_hdr.n_hdr; i++)
|
||||||
if (!strncmp(code, qt_hdr.id[i], LEN_HDR))
|
if (!strncmp(code, qt_hdr.id[i], LEN_HDR))
|
||||||
return (++i);
|
return ++i;
|
||||||
|
|
||||||
return (0);
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean
|
static boolean
|
||||||
@@ -2181,13 +2184,13 @@ char *code;
|
|||||||
{
|
{
|
||||||
if (qt_hdr.n_hdr >= N_HDR) {
|
if (qt_hdr.n_hdr >= N_HDR) {
|
||||||
Fprintf(stderr, OUT_OF_HEADERS, qt_line);
|
Fprintf(stderr, OUT_OF_HEADERS, qt_line);
|
||||||
return (FALSE);
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
strncpy(&qt_hdr.id[qt_hdr.n_hdr][0], code, LEN_HDR);
|
strncpy(&qt_hdr.id[qt_hdr.n_hdr][0], code, LEN_HDR);
|
||||||
msg_hdr[qt_hdr.n_hdr].n_msg = 0;
|
msg_hdr[qt_hdr.n_hdr].n_msg = 0;
|
||||||
qt_hdr.offset[qt_hdr.n_hdr++] = 0L;
|
qt_hdr.offset[qt_hdr.n_hdr++] = 0L;
|
||||||
return (TRUE);
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean
|
static boolean
|
||||||
@@ -2198,9 +2201,9 @@ int num, id;
|
|||||||
|
|
||||||
for (i = 0; i < msg_hdr[num].n_msg; i++)
|
for (i = 0; i < msg_hdr[num].n_msg; i++)
|
||||||
if (msg_hdr[num].qt_msg[i].msgnum == id)
|
if (msg_hdr[num].qt_msg[i].msgnum == id)
|
||||||
return (TRUE);
|
return TRUE;
|
||||||
|
|
||||||
return (FALSE);
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -2364,7 +2367,7 @@ put_qt_hdrs()
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The main header record.
|
* The main header record.
|
||||||
*/
|
*/
|
||||||
if (debug)
|
if (debug)
|
||||||
Fprintf(stderr, "%ld: header info.\n", ftell(ofp));
|
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++) {
|
for (i = 0; i < qt_hdr.n_hdr; i++) {
|
||||||
if (debug)
|
if (debug)
|
||||||
@@ -2392,10 +2395,12 @@ put_qt_hdrs()
|
|||||||
sizeof(struct qtmsg), msg_hdr[i].n_msg, ofp);
|
sizeof(struct qtmsg), msg_hdr[i].n_msg, ofp);
|
||||||
if (debug) {
|
if (debug) {
|
||||||
int j;
|
int j;
|
||||||
|
|
||||||
for (j = 0; j < msg_hdr[i].n_msg; j++) {
|
for (j = 0; j < msg_hdr[i].n_msg; j++) {
|
||||||
Fprintf(
|
Fprintf(stderr, "msg %d @ %ld (%ld)",
|
||||||
stderr, "msg %d @ %ld (%ld)", msg_hdr[i].qt_msg[j].msgnum,
|
msg_hdr[i].qt_msg[j].msgnum,
|
||||||
msg_hdr[i].qt_msg[j].offset, msg_hdr[i].qt_msg[j].size);
|
msg_hdr[i].qt_msg[j].offset,
|
||||||
|
msg_hdr[i].qt_msg[j].size);
|
||||||
if (msg_hdr[i].qt_msg[j].summary_size)
|
if (msg_hdr[i].qt_msg[j].summary_size)
|
||||||
Fprintf(stderr, " [%ld]",
|
Fprintf(stderr, " [%ld]",
|
||||||
msg_hdr[i].qt_msg[j].summary_size);
|
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 $ */
|
/* 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 */
|
/* Copyright (c) Dean Luick, 1992 */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This file contains:
|
* This file contains:
|
||||||
* + global functions print_glyph() and cliparound()
|
* + global functions print_glyph() and cliparound()
|
||||||
* + the map window routines
|
* + the map window routines
|
||||||
* + the char and pointer input routines
|
* + the char and pointer input routines
|
||||||
*
|
*
|
||||||
* Notes:
|
* Notes:
|
||||||
* + We don't really have a good way to get the compiled ROWNO and
|
* + We don't really have a good way to get the compiled ROWNO and
|
||||||
* COLNO as defaults. They are hardwired to the current "correct"
|
* COLNO as defaults. They are hardwired to the current "correct"
|
||||||
* values in the Window widget. I am _not_ in favor of including
|
* values in the Window widget. I am _not_ in favor of including
|
||||||
* some nethack include file for Window.c.
|
* some nethack include file for Window.c.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SYSV
|
#ifndef SYSV
|
||||||
@@ -58,8 +58,8 @@ extern int total_tiles_used;
|
|||||||
static boolean FDECL(init_tiles, (struct xwindow *));
|
static boolean FDECL(init_tiles, (struct xwindow *));
|
||||||
static void FDECL(set_button_values, (Widget, int, int, unsigned));
|
static void FDECL(set_button_values, (Widget, int, int, unsigned));
|
||||||
static void FDECL(map_check_size_change, (struct xwindow *));
|
static void FDECL(map_check_size_change, (struct xwindow *));
|
||||||
static void FDECL(map_update,
|
static void FDECL(map_update, (struct xwindow *, int, int, int, int,
|
||||||
(struct xwindow *, int, int, int, int, BOOLEAN_P));
|
BOOLEAN_P));
|
||||||
static void FDECL(init_text, (struct xwindow *));
|
static void FDECL(init_text, (struct xwindow *));
|
||||||
static void FDECL(map_exposed, (Widget, XtPointer, XtPointer));
|
static void FDECL(map_exposed, (Widget, XtPointer, XtPointer));
|
||||||
static void FDECL(set_gc, (Widget, Font, const char *, Pixel, GC *, GC *));
|
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(get_char_info, (struct xwindow *));
|
||||||
static void FDECL(display_cursor, (struct xwindow *));
|
static void FDECL(display_cursor, (struct xwindow *));
|
||||||
|
|
||||||
/* Global functions ========================================================
|
/* Global functions ======================================================= */
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
void
|
||||||
X11_print_glyph(window, x, y, glyph, bkglyph)
|
X11_print_glyph(window, x, y, glyph, bkglyph)
|
||||||
winid window;
|
winid window;
|
||||||
xchar x, y;
|
xchar x, y;
|
||||||
int glyph, bkglyph;
|
int glyph;
|
||||||
|
int bkglyph UNUSED;
|
||||||
{
|
{
|
||||||
struct map_info_t *map_info;
|
struct map_info_t *map_info;
|
||||||
boolean update_bbox = FALSE;
|
boolean update_bbox = FALSE;
|
||||||
@@ -104,6 +104,7 @@ int glyph, bkglyph;
|
|||||||
#ifdef TEXTCOLOR
|
#ifdef TEXTCOLOR
|
||||||
register unsigned char *co_ptr;
|
register unsigned char *co_ptr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* map glyph to character and color */
|
/* map glyph to character and color */
|
||||||
(void) mapglyph(glyph, &och, &color, &special, x, y);
|
(void) mapglyph(glyph, &och, &color, &special, x, y);
|
||||||
ch = (uchar) och;
|
ch = (uchar) och;
|
||||||
@@ -156,8 +157,7 @@ int x, y;
|
|||||||
}
|
}
|
||||||
#endif /* CLIPPING */
|
#endif /* CLIPPING */
|
||||||
|
|
||||||
/* End global functions ====================================================
|
/* End global functions =================================================== */
|
||||||
*/
|
|
||||||
|
|
||||||
#include "tile2x11.h"
|
#include "tile2x11.h"
|
||||||
|
|
||||||
@@ -199,6 +199,7 @@ Pixel colorpixel;
|
|||||||
&annotation->bitmap, &annotation->hotx,
|
&annotation->bitmap, &annotation->hotx,
|
||||||
&annotation->hoty)) {
|
&annotation->hoty)) {
|
||||||
char buf[BUFSZ];
|
char buf[BUFSZ];
|
||||||
|
|
||||||
Sprintf(buf, "Failed to load %s", filename);
|
Sprintf(buf, "Failed to load %s", filename);
|
||||||
X11_raw_print(buf);
|
X11_raw_print(buf);
|
||||||
}
|
}
|
||||||
@@ -327,10 +328,9 @@ struct xwindow *wp;
|
|||||||
/* assume a fixed number of tiles per row */
|
/* assume a fixed number of tiles per row */
|
||||||
if (tile_image->width % TILES_PER_ROW != 0
|
if (tile_image->width % TILES_PER_ROW != 0
|
||||||
|| tile_image->width <= TILES_PER_ROW) {
|
|| tile_image->width <= TILES_PER_ROW) {
|
||||||
Sprintf(
|
Sprintf(buf,
|
||||||
buf,
|
"%s is not a multiple of %d (number of tiles/row) pixels wide",
|
||||||
"%s is not a multiple of %d (number of tiles/row) pixels wide",
|
appResources.tile_file, TILES_PER_ROW);
|
||||||
appResources.tile_file, TILES_PER_ROW);
|
|
||||||
X11_raw_print(buf);
|
X11_raw_print(buf);
|
||||||
XDestroyImage(tile_image);
|
XDestroyImage(tile_image);
|
||||||
tile_image = 0;
|
tile_image = 0;
|
||||||
@@ -348,7 +348,7 @@ struct xwindow *wp;
|
|||||||
}
|
}
|
||||||
tile_width = image_width / TILES_PER_ROW;
|
tile_width = image_width / TILES_PER_ROW;
|
||||||
tile_height = image_height / (tile_count / TILES_PER_ROW);
|
tile_height = image_height / (tile_count / TILES_PER_ROW);
|
||||||
#else
|
#else /* !USE_XPM */
|
||||||
/* any less than 16 colours makes tiles useless */
|
/* any less than 16 colours makes tiles useless */
|
||||||
ddepth = DefaultDepthOfScreen(screen);
|
ddepth = DefaultDepthOfScreen(screen);
|
||||||
if (ddepth < 4) {
|
if (ddepth < 4) {
|
||||||
@@ -377,11 +377,11 @@ struct xwindow *wp;
|
|||||||
result = FALSE;
|
result = FALSE;
|
||||||
goto tiledone;
|
goto tiledone;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
fprintf(stderr, "X11 tile file:\n version %ld\n ncolors %ld\n "
|
fprintf(stderr, "\
|
||||||
"tile width %ld\n tile height %ld\n per row %ld\n "
|
X11 tile file:\n version %ld\n ncolors %ld\n \
|
||||||
" ntiles %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.version, header.ncolors, header.tile_width,
|
||||||
header.tile_height, header.per_row, header.ntiles);
|
header.tile_height, header.per_row, header.ntiles);
|
||||||
#endif
|
#endif
|
||||||
@@ -458,15 +458,15 @@ struct xwindow *wp;
|
|||||||
else
|
else
|
||||||
bitmap_pad = 8;
|
bitmap_pad = 8;
|
||||||
|
|
||||||
tile_image =
|
tile_image = XCreateImage(dpy, DefaultVisualOfScreen(screen),
|
||||||
XCreateImage(dpy, DefaultVisualOfScreen(screen), ddepth, /* depth */
|
ddepth, /* depth */
|
||||||
ZPixmap, /* format */
|
ZPixmap, /* format */
|
||||||
0, /* offset */
|
0, /* offset */
|
||||||
0, /* data */
|
(char *) 0, /* data */
|
||||||
image_width, /* width */
|
image_width, /* width */
|
||||||
image_height, /* height */
|
image_height, /* height */
|
||||||
bitmap_pad, /* bit pad */
|
bitmap_pad, /* bit pad */
|
||||||
0); /* bytes_per_line */
|
0); /* bytes_per_line */
|
||||||
|
|
||||||
if (!tile_image)
|
if (!tile_image)
|
||||||
impossible("init_tiles: insufficient memory to create 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++)
|
for (x = 0; x < (int) image_width; x++, tb++)
|
||||||
XPutPixel(tile_image, x, y, colors[*tb].pixel);
|
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
|
#ifdef USE_WHITE
|
||||||
/* use white or black as the border */
|
/* use white or black as the border */
|
||||||
mask = GCFunction | GCForeground | GCGraphicsExposures;
|
mask = GCFunction | GCForeground | GCGraphicsExposures;
|
||||||
@@ -872,7 +872,7 @@ struct xwindow *wp;
|
|||||||
/* changed map display mode, re-display the full map */
|
/* changed map display mode, re-display the full map */
|
||||||
(void) memset((genericptr_t) map_info->t_start, (char) 0,
|
(void) memset((genericptr_t) map_info->t_start, (char) 0,
|
||||||
sizeof(map_info->t_start));
|
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));
|
sizeof(map_info->t_stop));
|
||||||
map_info->is_tile = iflags.wc_tiled_map && !Is_rogue_level(&u.uz);
|
map_info->is_tile = iflags.wc_tiled_map && !Is_rogue_level(&u.uz);
|
||||||
XClearWindow(XtDisplay(wp->w), XtWindow(wp->w));
|
XClearWindow(XtDisplay(wp->w), XtWindow(wp->w));
|
||||||
@@ -911,9 +911,8 @@ static void
|
|||||||
map_all_stone(map_info)
|
map_all_stone(map_info)
|
||||||
struct map_info_t *map_info;
|
struct map_info_t *map_info;
|
||||||
{
|
{
|
||||||
int x,y;
|
int x, y;
|
||||||
unsigned short *sp, stone;
|
unsigned short stone = cmap_to_glyph(S_stone);
|
||||||
stone = cmap_to_glyph(S_stone);
|
|
||||||
|
|
||||||
for (x = 0; x < COLNO; x++)
|
for (x = 0; x < COLNO; x++)
|
||||||
for (y = 0; y < ROWNO; y++) {
|
for (y = 0; y < ROWNO; y++) {
|
||||||
@@ -1122,8 +1121,8 @@ unsigned int button;
|
|||||||
click_y = y / map_info->text_map.square_height;
|
click_y = y / map_info->text_map.square_height;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The values can be out of range if the map window has been resized */
|
/* The values can be out of range if the map window has been resized
|
||||||
/* to be larger than the max size. */
|
to be larger than the max size. */
|
||||||
if (click_x >= COLNO)
|
if (click_x >= COLNO)
|
||||||
click_x = COLNO - 1;
|
click_x = COLNO - 1;
|
||||||
if (click_y >= ROWNO)
|
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);
|
t_width, start_row, stop_row, start_col, stop_col);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Out of range values are possible if the map window is resized to be */
|
/* Out of range values are possible if the map window is resized to be
|
||||||
/* bigger than the largest expected value. */
|
bigger than the largest expected value. */
|
||||||
if (stop_row >= ROWNO)
|
if (stop_row >= ROWNO)
|
||||||
stop_row = ROWNO - 1;
|
stop_row = ROWNO - 1;
|
||||||
if (stop_col >= COLNO)
|
if (stop_col >= COLNO)
|
||||||
@@ -1294,8 +1293,9 @@ boolean inverted;
|
|||||||
XSetClipMask(dpy, tile_map->black_gc,
|
XSetClipMask(dpy, tile_map->black_gc,
|
||||||
pile_annotation.bitmap);
|
pile_annotation.bitmap);
|
||||||
XCopyPlane(dpy, pile_annotation.bitmap, XtWindow(wp->w),
|
XCopyPlane(dpy, pile_annotation.bitmap, XtWindow(wp->w),
|
||||||
tile_map->black_gc, 0, 0, pile_annotation.width,
|
tile_map->black_gc, 0, 0,
|
||||||
pile_annotation.height, dest_x, dest_y, 1);
|
pile_annotation.width, pile_annotation.height,
|
||||||
|
dest_x, dest_y, 1);
|
||||||
XSetClipOrigin(dpy, tile_map->black_gc, 0, 0);
|
XSetClipOrigin(dpy, tile_map->black_gc, 0, 0);
|
||||||
XSetClipMask(dpy, tile_map->black_gc, None);
|
XSetClipMask(dpy, tile_map->black_gc, None);
|
||||||
XSetForeground(dpy, tile_map->black_gc,
|
XSetForeground(dpy, tile_map->black_gc,
|
||||||
@@ -1305,19 +1305,20 @@ boolean inverted;
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (inverted) {
|
if (inverted) {
|
||||||
XDrawRectangle(
|
XDrawRectangle(XtDisplay(wp->w), XtWindow(wp->w),
|
||||||
XtDisplay(wp->w), XtWindow(wp->w),
|
|
||||||
#ifdef USE_WHITE
|
#ifdef USE_WHITE
|
||||||
/* kludge for white square... */
|
/* kludge for white square... */
|
||||||
tile_map->glyphs[start_row][start_col].glyph == cmap_to_glyph(S_ice)
|
(tile_map->glyphs[start_row][start_col].glyph
|
||||||
? tile_map->black_gc
|
== cmap_to_glyph(S_ice))
|
||||||
: tile_map->white_gc,
|
? tile_map->black_gc
|
||||||
|
: tile_map->white_gc,
|
||||||
#else
|
#else
|
||||||
tile_map->white_gc,
|
tile_map->white_gc,
|
||||||
#endif
|
#endif
|
||||||
start_col * tile_map->square_width,
|
start_col * tile_map->square_width,
|
||||||
start_row * tile_map->square_height,
|
start_row * tile_map->square_height,
|
||||||
tile_map->square_width - 1, tile_map->square_height - 1);
|
tile_map->square_width - 1,
|
||||||
|
tile_map->square_height - 1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
struct text_map_info_t *text_map = &map_info->text_map;
|
struct text_map_info_t *text_map = &map_info->text_map;
|
||||||
@@ -1366,20 +1367,22 @@ boolean inverted;
|
|||||||
{
|
{
|
||||||
int win_row, win_xstart;
|
int win_row, win_xstart;
|
||||||
|
|
||||||
/* We always start at the same x window position and have */
|
/* We always start at the same x window position and have
|
||||||
/* the same character count. */
|
the same character count. */
|
||||||
win_xstart = text_map->square_lbearing
|
win_xstart = text_map->square_lbearing
|
||||||
+ (win_start_col * text_map->square_width);
|
+ (win_start_col * text_map->square_width);
|
||||||
count = stop_col - start_col + 1;
|
count = stop_col - start_col + 1;
|
||||||
|
|
||||||
for (row = start_row, win_row = win_start_row; row <= stop_row;
|
for (row = start_row, win_row = win_start_row; row <= stop_row;
|
||||||
row++, win_row++) {
|
row++, win_row++) {
|
||||||
XDrawImageString(
|
XDrawImageString(XtDisplay(wp->w), XtWindow(wp->w),
|
||||||
XtDisplay(wp->w), XtWindow(wp->w),
|
inverted ? text_map->inv_copy_gc
|
||||||
inverted ? text_map->inv_copy_gc : text_map->copy_gc,
|
: text_map->copy_gc,
|
||||||
win_xstart, text_map->square_ascent
|
win_xstart,
|
||||||
|
text_map->square_ascent
|
||||||
+ (win_row * text_map->square_height),
|
+ (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>Right: scroll(6)\n\
|
||||||
<Key>Up: scroll(8)\n\
|
<Key>Up: scroll(8)\n\
|
||||||
<Key>Down: scroll(2)\n\
|
<Key>Down: scroll(2)\n\
|
||||||
<Key>: input() \
|
<Key>: input() \
|
||||||
";
|
";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1463,8 +1466,9 @@ Widget parent;
|
|||||||
XtSetArg(args[num_args], XtNinput, False);
|
XtSetArg(args[num_args], XtNinput, False);
|
||||||
num_args++;
|
num_args++;
|
||||||
|
|
||||||
wp->popup = parent = XtCreatePopupShell(
|
wp->popup = parent = XtCreatePopupShell("nethack",
|
||||||
"nethack", topLevelShellWidgetClass, toplevel, args, num_args);
|
topLevelShellWidgetClass,
|
||||||
|
toplevel, args, num_args);
|
||||||
/*
|
/*
|
||||||
* If we're here, then this is an auxiliary map window. If we're
|
* 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.
|
* cancelled via a delete window message, we should just pop down.
|
||||||
@@ -1476,18 +1480,20 @@ Widget parent;
|
|||||||
num_args++;
|
num_args++;
|
||||||
XtSetArg(args[num_args], XtNallowVert, True);
|
XtSetArg(args[num_args], XtNallowVert, True);
|
||||||
num_args++;
|
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);
|
XtSetArg(args[num_args], XtNuseBottom, True);
|
||||||
num_args++;
|
num_args++;
|
||||||
XtSetArg(args[num_args], XtNtranslations,
|
XtSetArg(args[num_args], XtNtranslations,
|
||||||
XtParseTranslationTable(map_translations));
|
XtParseTranslationTable(map_translations));
|
||||||
num_args++;
|
num_args++;
|
||||||
viewport = XtCreateManagedWidget(
|
viewport = XtCreateManagedWidget("map_viewport", /* name */
|
||||||
"map_viewport", /* name */
|
viewportWidgetClass, /* from Window.h */
|
||||||
viewportWidgetClass, /* widget class from Window.h */
|
parent, /* parent widget */
|
||||||
parent, /* parent widget */
|
args, /* set some values */
|
||||||
args, /* set some values */
|
num_args); /* number of values to set */
|
||||||
num_args); /* number of values to set */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create a map window. We need to set the width and height to some
|
* 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 */
|
boolean exit_x_event; /* exit condition for the event loop */
|
||||||
/*******
|
|
||||||
|
#if 0 /*******/
|
||||||
|
void
|
||||||
pkey(k)
|
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
|
* Main X event loop. Here we accept and dispatch X events. We only exit
|
||||||
@@ -1650,6 +1658,7 @@ int exit_condition;
|
|||||||
switch (exit_condition) {
|
switch (exit_condition) {
|
||||||
case EXIT_ON_SENT_EVENT: {
|
case EXIT_ON_SENT_EVENT: {
|
||||||
XAnyEvent *any = (XAnyEvent *) &event;
|
XAnyEvent *any = (XAnyEvent *) &event;
|
||||||
|
|
||||||
if (any->send_event) {
|
if (any->send_event) {
|
||||||
retval = 0;
|
retval = 0;
|
||||||
keep_going = FALSE;
|
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. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -28,6 +28,8 @@ extern void FDECL(exit, (int));
|
|||||||
#define OBJ_GLYPH 2
|
#define OBJ_GLYPH 2
|
||||||
#define OTH_GLYPH 3 /* fortunately unnecessary */
|
#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/
|
/* note that the ifdefs here should be the opposite sense from monst.c/
|
||||||
* objects.c/rm.h
|
* objects.c/rm.h
|
||||||
*/
|
*/
|
||||||
@@ -64,7 +66,7 @@ struct conditionals {
|
|||||||
* don't know what a slime mold should look like when renamed anyway
|
* don't know what a slime mold should look like when renamed anyway
|
||||||
*/
|
*/
|
||||||
#ifndef MAIL
|
#ifndef MAIL
|
||||||
{ OBJ_GLYPH, SCR_STINKING_CLOUD + 4, "stamped / mail" },
|
{ OBJ_GLYPH, SCR_STINKING_CLOUD + EXTRA_SCROLL_DESCR_COUNT, "stamped / mail" },
|
||||||
#endif
|
#endif
|
||||||
{ 0, 0, 0 }
|
{ 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. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -30,8 +30,7 @@ static void NDECL(init_hilite);
|
|||||||
static void NDECL(kill_hilite);
|
static void NDECL(kill_hilite);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* (see tcap.h) -- nh_CM, nh_ND, nh_CD, nh_HI,nh_HE, nh_US,nh_UE,
|
/* (see tcap.h) -- nh_CM, nh_ND, nh_CD, nh_HI,nh_HE, nh_US,nh_UE, ul_hack */
|
||||||
ul_hack */
|
|
||||||
struct tc_lcl_data tc_lcl_data = { 0, 0, 0, 0, 0, 0, 0, FALSE };
|
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;
|
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
|
#endif
|
||||||
|
|
||||||
#ifdef TERMLIB
|
#ifdef TERMLIB
|
||||||
|
boolean dynamic_HIHE = FALSE;
|
||||||
#ifdef TEXTCOLOR
|
#ifdef TEXTCOLOR
|
||||||
STATIC_VAR char *MD;
|
STATIC_VAR char *MD;
|
||||||
#endif
|
#endif
|
||||||
@@ -152,9 +152,9 @@ int *wid, *hgt;
|
|||||||
nh_US = "\033[4m";
|
nh_US = "\033[4m";
|
||||||
MR = "\033[7m";
|
MR = "\033[7m";
|
||||||
TI = nh_HE = ME = SE = nh_UE = "\033[0m";
|
TI = nh_HE = ME = SE = nh_UE = "\033[0m";
|
||||||
/* strictly, SE should be 2, and nh_UE should be 24,
|
/* strictly, SE should be 2, and nh_UE should be 24,
|
||||||
but we can't trust all ANSI emulators to be
|
but we can't trust all ANSI emulators to be
|
||||||
that complete. -3. */
|
that complete. -3. */
|
||||||
#ifndef MICRO
|
#ifndef MICRO
|
||||||
AS = "\016";
|
AS = "\016";
|
||||||
AE = "\017";
|
AE = "\017";
|
||||||
@@ -221,11 +221,11 @@ int *wid, *hgt;
|
|||||||
#else
|
#else
|
||||||
HO = Tgetstr("ho");
|
HO = Tgetstr("ho");
|
||||||
#endif
|
#endif
|
||||||
/*
|
/*
|
||||||
* LI and CO are set in ioctl.c via a TIOCGWINSZ if available. If
|
* 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 kernel has values for either we should use them rather than
|
||||||
* the values from TERMCAP ...
|
* the values from TERMCAP ...
|
||||||
*/
|
*/
|
||||||
#ifndef MICRO
|
#ifndef MICRO
|
||||||
if (!CO)
|
if (!CO)
|
||||||
CO = tgetnum("co");
|
CO = tgetnum("co");
|
||||||
@@ -233,18 +233,17 @@ int *wid, *hgt;
|
|||||||
LI = tgetnum("li");
|
LI = tgetnum("li");
|
||||||
#else
|
#else
|
||||||
#if defined(TOS) && defined(__GNUC__)
|
#if defined(TOS) && defined(__GNUC__)
|
||||||
if (!strcmp(term, "builtin"))
|
if (!strcmp(term, "builtin")) {
|
||||||
get_scr_size();
|
get_scr_size();
|
||||||
else {
|
} else
|
||||||
#endif
|
#endif
|
||||||
|
{
|
||||||
CO = tgetnum("co");
|
CO = tgetnum("co");
|
||||||
LI = tgetnum("li");
|
LI = tgetnum("li");
|
||||||
if (!LI || !CO) /* if we don't override it */
|
if (!LI || !CO) /* if we don't override it */
|
||||||
get_scr_size();
|
get_scr_size();
|
||||||
#if defined(TOS) && defined(__GNUC__)
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* ?MICRO */
|
||||||
#endif
|
|
||||||
#ifdef CLIPPING
|
#ifdef CLIPPING
|
||||||
if (CO < COLNO || LI < ROWNO + 3)
|
if (CO < COLNO || LI < ROWNO + 3)
|
||||||
setclipped();
|
setclipped();
|
||||||
@@ -298,16 +297,14 @@ int *wid, *hgt;
|
|||||||
* pager as a string - so how can you send it NULs???
|
* pager as a string - so how can you send it NULs???
|
||||||
* -jsb
|
* -jsb
|
||||||
*/
|
*/
|
||||||
nh_HI = (char *) alloc((unsigned) (strlen(SO) + 1));
|
for (i = 0; digit(SO[i]); ++i)
|
||||||
nh_HE = (char *) alloc((unsigned) (strlen(ME) + 1));
|
continue;
|
||||||
i = 0;
|
nh_HI = dupstr(&SO[i]);
|
||||||
while (digit(SO[i]))
|
for (i = 0; digit(ME[i]); ++i)
|
||||||
i++;
|
continue;
|
||||||
Strcpy(nh_HI, &SO[i]);
|
nh_HE = dupstr(&ME[i]);
|
||||||
i = 0;
|
dynamic_HIHE = TRUE;
|
||||||
while (digit(ME[i]))
|
|
||||||
i++;
|
|
||||||
Strcpy(nh_HE, &ME[i]);
|
|
||||||
AS = Tgetstr("as");
|
AS = Tgetstr("as");
|
||||||
AE = Tgetstr("ae");
|
AE = Tgetstr("ae");
|
||||||
nh_CD = Tgetstr("cd");
|
nh_CD = Tgetstr("cd");
|
||||||
@@ -340,10 +337,17 @@ int *wid, *hgt;
|
|||||||
void
|
void
|
||||||
tty_shutdown()
|
tty_shutdown()
|
||||||
{
|
{
|
||||||
#if defined(TEXTCOLOR) && defined(TERMLIB)
|
/* we only attempt to clean up a few individual termcap variables */
|
||||||
|
#ifdef TERMLIB
|
||||||
|
#ifdef TEXTCOLOR
|
||||||
kill_hilite();
|
kill_hilite();
|
||||||
#endif
|
#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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -570,7 +574,8 @@ register int x, y;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* See note above. xputc() is a special function. */
|
/* See note above. xputc() is a special function. */
|
||||||
void xputc(c)
|
void
|
||||||
|
xputc(c)
|
||||||
#if defined(apollo)
|
#if defined(apollo)
|
||||||
int c;
|
int c;
|
||||||
#else
|
#else
|
||||||
@@ -758,7 +763,7 @@ tty_delay_output()
|
|||||||
#else /* MICRO */
|
#else /* MICRO */
|
||||||
/* BUG: if the padding character is visible, as it is on the 5620
|
/* BUG: if the padding character is visible, as it is on the 5620
|
||||||
then this looks terrible. */
|
then this looks terrible. */
|
||||||
if (flags.null)
|
if (flags.null) {
|
||||||
#ifdef TERMINFO
|
#ifdef TERMINFO
|
||||||
/* cbosgd!cbcephus!pds for SYS V R2 */
|
/* cbosgd!cbcephus!pds for SYS V R2 */
|
||||||
#ifdef NHSTDC
|
#ifdef NHSTDC
|
||||||
@@ -774,7 +779,7 @@ tty_delay_output()
|
|||||||
#endif
|
#endif
|
||||||
#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 */
|
/* delay by sending cm(here) an appropriate number of times */
|
||||||
register int cmlen =
|
register int cmlen =
|
||||||
strlen(tgoto(nh_CM, ttyDisplay->curx, ttyDisplay->cury));
|
strlen(tgoto(nh_CM, ttyDisplay->curx, ttyDisplay->cury));
|
||||||
@@ -788,13 +793,15 @@ tty_delay_output()
|
|||||||
#endif /* MICRO */
|
#endif /* MICRO */
|
||||||
}
|
}
|
||||||
|
|
||||||
void cl_eos() /* free after Robert Viduya */
|
/* must only be called with curx = 1 */
|
||||||
{ /* must only be called with curx = 1 */
|
void
|
||||||
|
cl_eos() /* free after Robert Viduya */
|
||||||
if (nh_CD)
|
{
|
||||||
|
if (nh_CD) {
|
||||||
xputs(nh_CD);
|
xputs(nh_CD);
|
||||||
else {
|
} else {
|
||||||
register int cy = ttyDisplay->cury + 1;
|
register int cy = ttyDisplay->cury + 1;
|
||||||
|
|
||||||
while (cy <= LI - 2) {
|
while (cy <= LI - 2) {
|
||||||
cl_end();
|
cl_end();
|
||||||
xputc('\n');
|
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 */
|
/* Copyright (c) David Cohrs, 1991 */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -1189,17 +1189,36 @@ const char *str;
|
|||||||
winid i;
|
winid i;
|
||||||
|
|
||||||
tty_suspend_nhwindows(str);
|
tty_suspend_nhwindows(str);
|
||||||
/* Just forget any windows existed, since we're about to exit anyway.
|
/*
|
||||||
* Disable windows to avoid calls to window routines.
|
* Disable windows to avoid calls to window routines.
|
||||||
*/
|
*/
|
||||||
for (i = 0; i < MAXWIN; i++)
|
free_pickinv_cache(); /* reset its state as well as tear down window */
|
||||||
if (wins[i] && (i != BASE_WINDOW)) {
|
for (i = 0; i < MAXWIN; i++) {
|
||||||
|
if (i == BASE_WINDOW)
|
||||||
|
continue; /* handle wins[BASE_WINDOW] last */
|
||||||
|
if (wins[i]) {
|
||||||
#ifdef FREE_ALL_MEMORY
|
#ifdef FREE_ALL_MEMORY
|
||||||
free_window_info(wins[i], TRUE);
|
free_window_info(wins[i], TRUE);
|
||||||
free((genericptr_t) wins[i]);
|
free((genericptr_t) wins[i]);
|
||||||
#endif
|
#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)*/
|
#ifndef NO_TERMS /*(until this gets added to the window interface)*/
|
||||||
tty_shutdown(); /* cleanup termcap/terminfo/whatever */
|
tty_shutdown(); /* cleanup termcap/terminfo/whatever */
|
||||||
#endif
|
#endif
|
||||||
@@ -1298,9 +1317,10 @@ int type;
|
|||||||
newwin->datlen =
|
newwin->datlen =
|
||||||
(short *) alloc(sizeof(short) * (unsigned) newwin->maxrow);
|
(short *) alloc(sizeof(short) * (unsigned) newwin->maxrow);
|
||||||
if (newwin->maxcol) {
|
if (newwin->maxcol) {
|
||||||
|
/* WIN_STATUS */
|
||||||
for (i = 0; i < newwin->maxrow; i++) {
|
for (i = 0; i < newwin->maxrow; i++) {
|
||||||
newwin->data[i] = (char *) alloc((unsigned) newwin->maxcol);
|
newwin->data[i] = (char *) alloc((unsigned) newwin->maxcol);
|
||||||
newwin->datlen[i] = newwin->maxcol;
|
newwin->datlen[i] = (short) newwin->maxcol;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (i = 0; i < newwin->maxrow; i++) {
|
for (i = 0; i < newwin->maxrow; i++) {
|
||||||
@@ -2017,6 +2037,7 @@ winid window;
|
|||||||
boolean blocking; /* with ttys, all windows are blocking */
|
boolean blocking; /* with ttys, all windows are blocking */
|
||||||
{
|
{
|
||||||
register struct WinDesc *cw = 0;
|
register struct WinDesc *cw = 0;
|
||||||
|
short s_maxcol;
|
||||||
|
|
||||||
if (window == WIN_ERR || (cw = wins[window]) == (struct WinDesc *) 0)
|
if (window == WIN_ERR || (cw = wins[window]) == (struct WinDesc *) 0)
|
||||||
panic(winpanicstr, window);
|
panic(winpanicstr, window);
|
||||||
@@ -2053,15 +2074,18 @@ boolean blocking; /* with ttys, all windows are blocking */
|
|||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case NHW_MENU:
|
case NHW_MENU:
|
||||||
cw->active = 1;
|
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
|
#ifdef H2344_BROKEN
|
||||||
cw->offx = (cw->type == NHW_TEXT)
|
cw->offx = (cw->type == NHW_TEXT)
|
||||||
? 0
|
? 0
|
||||||
: min(min(82, ttyDisplay->cols / 2),
|
: min(min(82, ttyDisplay->cols / 2),
|
||||||
ttyDisplay->cols - cw->maxcol - 1);
|
ttyDisplay->cols - s_maxcol - 1);
|
||||||
#else
|
#else
|
||||||
/* avoid converting to uchar before calculations are finished */
|
/* avoid converting to uchar before calculations are finished */
|
||||||
cw->offx = (uchar)(int) max(
|
cw->offx = (uchar) max((int) 10,
|
||||||
(int) 10, (int) (ttyDisplay->cols - cw->maxcol - 1));
|
(int) (ttyDisplay->cols - s_maxcol - 1));
|
||||||
#endif
|
#endif
|
||||||
if (cw->offx < 0)
|
if (cw->offx < 0)
|
||||||
cw->offx = 0;
|
cw->offx = 0;
|
||||||
@@ -3008,7 +3032,8 @@ void
|
|||||||
tty_print_glyph(window, x, y, glyph, bkglyph)
|
tty_print_glyph(window, x, y, glyph, bkglyph)
|
||||||
winid window;
|
winid window;
|
||||||
xchar x, y;
|
xchar x, y;
|
||||||
int glyph, bkglyph;
|
int glyph;
|
||||||
|
int bkglyph UNUSED;
|
||||||
{
|
{
|
||||||
int ch;
|
int ch;
|
||||||
boolean reverse_on = FALSE;
|
boolean reverse_on = FALSE;
|
||||||
@@ -3298,12 +3323,12 @@ genericptr_t ptr;
|
|||||||
long cond, *condptr = (long *) ptr;
|
long cond, *condptr = (long *) ptr;
|
||||||
register int i;
|
register int i;
|
||||||
char *text = (char *) ptr;
|
char *text = (char *) ptr;
|
||||||
/* Mapping BL attributes to tty attributes
|
/* Mapping BL attributes to tty attributes
|
||||||
* BL_HILITE_NONE -1 + 3 = 2 (statusattr[2])
|
* BL_HILITE_NONE -1 + 3 = 2 (statusattr[2])
|
||||||
* BL_HILITE_INVERSE -2 + 3 = 1 (statusattr[1])
|
* BL_HILITE_INVERSE -2 + 3 = 1 (statusattr[1])
|
||||||
* BL_HILITE_BOLD -3 + 3 = 0 (statusattr[0])
|
* BL_HILITE_BOLD -3 + 3 = 0 (statusattr[0])
|
||||||
*/
|
*/
|
||||||
int statusattr[] = {ATR_BOLD, ATR_INVERSE, ATR_NONE};
|
int statusattr[] = { ATR_BOLD, ATR_INVERSE, ATR_NONE };
|
||||||
int attridx = 0;
|
int attridx = 0;
|
||||||
long value = -1L;
|
long value = -1L;
|
||||||
static boolean beenhere = FALSE;
|
static boolean beenhere = FALSE;
|
||||||
@@ -3342,18 +3367,16 @@ genericptr_t ptr;
|
|||||||
default:
|
default:
|
||||||
value = atol(text);
|
value = atol(text);
|
||||||
Sprintf(status_vals[fldidx],
|
Sprintf(status_vals[fldidx],
|
||||||
status_fieldfmt[fldidx] ? status_fieldfmt[fldidx] :
|
status_fieldfmt[fldidx] ? status_fieldfmt[fldidx] : "%s",
|
||||||
"%s", text);
|
text);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef STATUS_HILITES
|
#ifdef STATUS_HILITES
|
||||||
switch (tty_status_hilites[fldidx].behavior) {
|
switch (tty_status_hilites[fldidx].behavior) {
|
||||||
case BL_TH_NONE:
|
case BL_TH_NONE:
|
||||||
tty_status_colors[fldidx] = NO_COLOR;
|
tty_status_colors[fldidx] = NO_COLOR;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BL_TH_UPDOWN:
|
case BL_TH_UPDOWN:
|
||||||
if (chg > 0)
|
if (chg > 0)
|
||||||
tty_status_colors[fldidx] = tty_status_hilites[fldidx].over;
|
tty_status_colors[fldidx] = tty_status_hilites[fldidx].over;
|
||||||
@@ -3362,29 +3385,27 @@ genericptr_t ptr;
|
|||||||
else
|
else
|
||||||
tty_status_colors[fldidx] = NO_COLOR;
|
tty_status_colors[fldidx] = NO_COLOR;
|
||||||
break;
|
break;
|
||||||
|
case BL_TH_VAL_PERCENTAGE: {
|
||||||
case BL_TH_VAL_PERCENTAGE:
|
|
||||||
{
|
|
||||||
int pct_th = 0;
|
int pct_th = 0;
|
||||||
|
|
||||||
if (tty_status_hilites[fldidx].thresholdtype != ANY_INT) {
|
if (tty_status_hilites[fldidx].thresholdtype != ANY_INT) {
|
||||||
impossible(
|
impossible(
|
||||||
"tty_status_update: unsupported percentage threshold type %d",
|
"tty_status_update: unsupported percentage threshold type %d",
|
||||||
tty_status_hilites[fldidx].thresholdtype);
|
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;
|
break;
|
||||||
tty_status_colors[fldidx] = (percent >= pct_th)
|
}
|
||||||
? tty_status_hilites[fldidx].over
|
case BL_TH_VAL_ABSOLUTE: {
|
||||||
: tty_status_hilites[fldidx].under;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case BL_TH_VAL_ABSOLUTE:
|
|
||||||
{
|
|
||||||
int c = NO_COLOR;
|
int c = NO_COLOR;
|
||||||
int o = tty_status_hilites[fldidx].over;
|
int o = tty_status_hilites[fldidx].over;
|
||||||
int u = tty_status_hilites[fldidx].under;
|
int u = tty_status_hilites[fldidx].under;
|
||||||
anything *t = &tty_status_hilites[fldidx].threshold;
|
anything *t = &tty_status_hilites[fldidx].threshold;
|
||||||
|
|
||||||
switch (tty_status_hilites[fldidx].thresholdtype) {
|
switch (tty_status_hilites[fldidx].thresholdtype) {
|
||||||
case ANY_LONG:
|
case ANY_LONG:
|
||||||
c = (value >= t->a_long) ? o : u;
|
c = (value >= t->a_long) ? o : u;
|
||||||
@@ -3404,14 +3425,15 @@ genericptr_t ptr;
|
|||||||
default:
|
default:
|
||||||
impossible(
|
impossible(
|
||||||
"tty_status_update: unsupported absolute threshold type %d\n",
|
"tty_status_update: unsupported absolute threshold type %d\n",
|
||||||
tty_status_hilites[fldidx].thresholdtype);
|
tty_status_hilites[fldidx].thresholdtype);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
tty_status_colors[fldidx] = c;
|
tty_status_colors[fldidx] = c;
|
||||||
}
|
break;
|
||||||
break;
|
} /* case */
|
||||||
}
|
} /* switch */
|
||||||
#endif /* STATUS_HILITES */
|
#endif /* STATUS_HILITES */
|
||||||
|
}
|
||||||
|
|
||||||
/* For now, this version copied from the genl_ version currently
|
/* For now, this version copied from the genl_ version currently
|
||||||
* updates everything on the display, everytime
|
* updates everything on the display, everytime
|
||||||
|
|||||||
Reference in New Issue
Block a user