Merge branch 'master' into win32-x64-working

Conflicts:
	src/do_name.c
	src/trap.c
	src/zap.c
	win/X11/winmenu.c
This commit is contained in:
nhmall
2015-04-12 10:35:00 -04:00
25 changed files with 1084 additions and 144 deletions

596
dat/tribute Normal file
View File

@@ -0,0 +1,596 @@
# NetHack 3.6.0 tribute to:
#
# Sir Terence David John "Terry" Pratchett
# April 28, 1948 - March 12, 2015
# ("or until the ripples he caused in the world die away...")
#
#
%section books
#
#
#
%title The Colour of Magic (2)
%passage 1
The Colour of Magic, by Terry Pratchett
It has been remarked before that those who are sensitive to radiation in the
far octarine - the eighth colour, the pigment of the Imagination - can see
things that others cannot.
Thus it was that Rincewind, hurrying through the crowded, flare-lit, evening
bazarrs of Morpork with the Luggage trundling behind him, jostled a tall
figure, turned to deliver a few suitable curses, and beheld Death.
It had to be Death. No-one else went around with empty eye sockets and, of
course, the scythe over one shoulder was another clue.
%e passage 1
%passage 2
The Colour of Magic, by Terry Pratchett
As he was drawn towards the Eye the terror-struck Rincewind raised the box
protectively, and at the same time heard the picture imp say, 'They're about
ripe now, can't hold them any longer. Every-one smile, please.'
There was a -
- flash of light so white and so bright -
- it didn't seem like light at all.
Bel-Shamharoth screamed, a sound that started in the far ultrasonic and
finished somewhere in Rincewind's bowels. The tentacles went momentarily as
stiff as rods, hurling their various cargos around the room, before bunching
up protectively in front of the abused Eye. The whole mass dropped into the
pit and a moment later the big slab was snatched up by several dozen tentacles
and slammed into place, leaving a number of thrashing limbs trapped around the
edge.
%e passage 2
%e title
#
#
#
%title The Light Fantastic (2)
%passage 1
The Light Fantastic, by Terry Pratchett
'Cohen is my name, boy' Belthan's hands stopped moving.
'Cohen?' she said, 'Cohen the Barbarian?'
'The very shame.'
'Hang on, hang on,' said Rincewind, 'Cohen's a great big chap, neck like a bull,
got chest muscles like a sack of footballs. I mean, he's the Disc's greatest
warrior, a legend in his own lifetime. I remember my grandad telling me he saw
him ... my grandad telling me he ... my grandad ...'
He faltered under the gimlit gaze.
'Oh,' he said, 'Oh. Of course, Sorry.'
'Yesh,' said Cohen, and sighed, 'Thatsh right boy, I'm a lifetime in my own
legend.'
%e passage 1
%passage 2
The Light Fantastic, by Terry Pratchett
Death sat at one side of a black baize table in the entre of the room, arguing
with Famine, War and Pestilence. Twoflower was the only one to look up and
notice Rincewind.
'Hey, how did you get here?' he said.
'Well, some say that the creator took a handful - oh, I see, well, it's hard to
explain but I -'
'Have you got the Luggage?'
The wooden box pushed past Rincewind and settled down in front of its owner,
who opened its lid and rummaged around inside until he came up with a small,
leatherbound book which he handed to War, who was hammering the table with a
mailed fist.
'It's "Nosehinger on the Laws of Contract",' he said. 'It's quite good, there's
a lot in it about double finessing and how to -'
Death snatched the book with a bony hand anflipped through the pages, quite
oblivious to the presence of the two men.
'RIGHT,' he said, 'PESTILENCE, OPEN ANOTHER PACK OF CARDS. I'M GOING TO GET TO
THE GOTTOM OF THIS IF IT KILLS ME. FIGURATIVELY SPEAKING OF COURSE.'
%e passage 2
%e title
#
#
#
%title Equal Rites (1)
%passage 1
Equal Rites, by Terry Pratchett
%e passage
%e title
#
#
#
%title Mort (1)
%passage 1
Ankh-Morpork had dallied with many forms of government and hand ended up with that form of democracy known as One Man, One Vote. The Patrician was the Man; he had the Vote.
[Mort, by Terry Pratchett]
%e passage
%e title
#
#
#
%title Sourcery (1)
%passage 1
Sourcery, by Terry Pratchett
%e passage
%e title
#
#
#
%title Wyrd Sisters (1)
%passage 1
Wyrd Sisters, by Terry Pratchett
%e passage
%e title
#
#
#
%title Pyramids (1)
%passage 1
Pyramids, by Terry Pratchett
%e passage
%e title
#
#
#
%title Guards! Guards! (1)
%passage 1
Guards! Guards!, by Terry Pratchett
%e passage
%e title
#
#
#
%title Eric (2)
%passage 1
No enemies had ever taken Ankh-Morpork. Well, /technically/ they had, quite often; the city welcomed free-spending barbarian invaders, but somehow the puzzled raiders always found, after a few days, that they didn't own their own horses any more, and within a couple of months they were just another minority group with its own graffiti and food shops.
[Terry Pratchett, Eric]
%e passage
%passage 2
Rincewind looked down at the broad steps they were climbing. They were something of a novelty; each one was built out of large stone letters. The one he was just stepping on to, for example, read: I Meant It For The Best.
The next one was: I Thought You'd Like It.
Eric was standing on: For The Sake Of The Children.
'Weird, isn't it?' he said. 'Why do it like this?'
'I think they're meant to be good intentions,' said Rincewind. This was a road to hell, and demons were, after all, traditionalists.
%e passage
%e title
#
#
#
%title Moving Pictures (4)
%passage 1
This is space. It's sometimes called the final frontier.
(Except that of course you can't have a /final/ frontier, because there'd be nothing for it to be a frontier /to/, but as frontiers go, it's pretty penultimate...)
[Terry Pratchett, Moving Pictures]
%e passage
%passage 2
By and large, the only skill the alchemists of Ankh-Morpork had discovered so far was the ability to turn gold into less gold.
[Terry Pratchett, Moving Pictures]
%e passage
%passage 3
There was a dog sitting by his feet.
It was small, bow-legged and wiry, and basically grey but with patches of brown, white, and black in outlying areas...
It looked up slowly, and said 'Woof?'
Victor poked an exploratory finger in his ear. It must have been a trick of an echo, or something. It wasn't that the dog had gone 'woof!', although that was practically unique in itself; most dogs in the universe /never/ went 'woof!', they had complicated barks like 'whuuugh!' and 'hwhoouf!'. No, it was that it hadn't in fact /barked/ at all. It had /said/ 'woof'.
'Could have bin worse, mister. I could have said "miaow".'
%e passage
%passage 4
''Twas beauty killed the beast,' said the Dean, who liked to say things like that.
'No it wasn't,' said the Chair. 'It was it splatting into the ground like that.'
%e passage
%e title
#
#
#
%title Reaper Man (1)
%passage 1
Reaper Man, by Terry Pratchett
%e passage
%e title
#
#
#
%title Witches Abroad (1)
%passage 1
Witches Abroad, by Terry Pratchett
%e passage
%e title
#
#
#
%title Small Gods (1)
%passage 1
Small Gods, by Terry Pratchett
%e passage
%e title
#
#
#
%title Lords and Ladies (1)
%passage 1
Lords and Ladies, by Terry Pratchett
%e passage
%e title
#
#
#
%title Men at Arms (1)
%passage 1
Men at Arms, by Terry Pratchett
%e passage
%e title
#
#
#
%title Soul Music (1)
%passage 1
Soul Music, by Terry Pratchett
%e passage
%e title
#
#
#
%title Interesting Times (1)
%passage 1
Interesting Times, by Terry Pratchett
%e passage
%e title
#
#
#
%title Maskerade (4)
%passage 1
'Maybe you could... help us?'
'What's wrong?'
'It's my boy...'
Granny opened the door further and saw the womand standing behind Mr. Slot. One look at her face was enough. There was a bundle in her arms.
Granny stepped back. 'Bring him in and let me have a look at him.'
She took the baby from the woman, sat down on the room's one chair, and pulled back the blanket.
'Hmm,' said Granny, after a while.
'There's a curse on this house, that's what it is,' said Slot. 'My best cow's been taken mortally sick, too.'
'Oh? You have a cowshed?' siad Granny. 'Very good place for a sick-room, a cowshed. It's the warmth. You better show me were it is.'
'You want to take the boy down there?'
'Right now.'
[...]
'How many have you come for?'
ONE.
'The cow?'
Death shook his head.
'It could be the cow.'
NO. THAT WOULD BE CHANGING HISTORY.
'History is about things changing.'
NO.
Granny sat back.
'Then I challenge you to a game. That's traditional. That's /allowed/.'
Death was silent for a moment.
THIS IS TRUE.
'Good.'
HOWEVER... YOU UNDERSTAND THAT TO WIN ALL YOU MUST GAMBLE ALL?
'Double or quits? Yes, I know.'
BUT NOT CHESS.
'Can't abide chess.'
OR CRIPPLE MR ONION. I'VE NEVER BEEN ABLE TO UNDERSTAND THE RULES.
'Very well. How about one hand of poker? Five cards each, no draws? Sudden death, as they say.'
Death thought about this, too.
YOU KNOW THIS FAMILY?
'No.'
THEN WHY?
'Are we talking or are we playing?'
OH, VERY WELL.
Granny looked at her cards, and threw them down.
FOUR QUEENS. HMM. THAT /IS/ VERY HIGH.
Death looked down at his cards, and then up into Granny's steady, blue-eyed gaze.
Neither moved for some time.
Then Death laid the hand on the table.
I LOSE. ALL I HAVE IS FOUR ONES.
[Maskerade, by Terry Pratchett]
%e passage
%passage 2
Ahahahahaha!
Ahahahaha!
Aahahaha!
BEWARE!!!!!
Yrs sincerely,
The Opera Ghost
'What sort of person,' said Salzella, 'sits down and /writes/ a maniacal laugh? And all those exclamation marks, you notice? Five? A sure sign of someone who wears his underpants on his head. Opera can do that to a man.'
[Maskerade, by Terry Pratchett]
%e passage
%passage 3
Agnes had woken up one morning with the horrible realization that she'd been saddled with a lovely personality. It was the lack of choice that rankled. No one had asked her, before she was born, whether she wanted a lovely personality or whether she'd prefer, say, a miserable personality but a body that could take size 9 in dresses. Instead, people would take pains to tell her that beauty was only skin-deep, as if a man ever fell for an attractive pair of kidneys.
[Maskerade, by Terry Pratchett]
%e passage
%passage 4
'And what can I get you, officers?' she said.
'Officers? Us? What makes you think we're watchment?'
'He's got a helmet on,' Nanny pointed out.
'Milit'ry chic,' Nobby said. 'It's just a fashion accessory. Actually, we are gentlemen of means and have nothing to do with the City Watch whatsoever.'
'Well, /gentlemen/, would you like some wine?'
'Not while we on duty, t'anks', said the troll.
[Maskerade, by Terry Pratchett]
%e passage
%e title
#
#
#
%title Feet of Clay (1)
%passage 1
Feet of Clay, by Terry Pratchett
%e passage
%e title
#
#
#
%title Hogfather (1)
%passage 1
Hogfather, by Terry Pratchett
%e passage
%e title
#
#
#
%title Jingo (1)
%passage 1
Jingo, by Terry Pratchett
%e passage
%e title
#
#
#
%title The Last Continent (1)
%passage 1
The Last Continent, by Terry Pratchett
%e passage
%e title
#
#
#
%title Carpe Jugulum (1)
%passage 1
Carpe Jugulum, by Terry Pratchett
%e passage
%e title
#
#
#
%title The Fifth Elephant (1)
%passage 1
The Fifth Elephant, by Terry Pratchett
%e passage
%e title
#
#
#
%title The Truth (1)
%passage 1
The Truth, by Terry Pratchett
There are, it has been said, two types of people in the world. There are those
who, when presented with a glass that is exactly half full, say: this glass is
half full. And then there are those who say: this glass is half empty.
The world belongs, however, to those who can look at the glass and say: What's
up with this glass? Excuse me? Excuse me? This is may glass? I don't think
so. My glass was full! And it was a bigger glass! Who's been pinching my beer?
%e passage 1
%e title
#
#
#
%title Thief of Time (1)
%passage 1
Thief of Time, by Terry Pratchett
%e passage
%e title
#
#
#
%title The Last Hero (1)
%passage 1
The Last Hero, by Terry Pratchett
%e passage
%e title
#
#
#
%title The Amazing Maurice and his Educated Rodents (1)
%passage 1
The Amazing Maurice and his Educated Rodents, by Terry Pratchett
%e passage
%e title
#
#
#
%title Night Watch (1)
%passage 1
Night Watch, by Terry Pratchett
%e passage
%e title
#
#
#
%title The Wee Free Men (1)
%passage 1
The Wee Free Men, by Terry Pratchett
%e passage
%e title
#
#
#
%title Monstrous Regiment (1)
%passage 1
Monstrous Regiment, by Terry Pratchett
%e passage
%e title
#
#
#
%title A Hat Full of Sky (1)
%passage 1
A Hat Full of Sky, by Terry Pratchett
%e passage
%e title
#
#
#
%title Going Postal (1)
%passage 1
Going Postal, by Terry Pratchett
%e passage
%e title
#
#
#
%title Thud! (1)
%passage 1
Thud!, by Terry Pratchett
%e passage
%e title
#
#
#
%title Wintersmith (1)
%passage 1
Wintersmith, by Terry Pratchett
%e passage
%e title
#
#
#
%title Making Money (3)
%passage 1
Making Money, by Terry Pratchett
'I'm an Igor, thur. We don't athk quethtionth.'
'Really? Why not?'
'I don't know, thur. I didn't athk.'
[Making Money, by Terry Pratchett]
%e pasasge
%passage 2
The Watch armour fitted like a glove. He'd have preferred it to fit like a helmet and breastplate. It was common knowledge that the Watch's approach to uniforms was one-size-doesn't-exactly-fit-anybody, and that Commander Vimes disapproved of armour that didn't have that kicked-by-trolls look. He liked it to make it clear that it had been doing its job.
[Making Money, by Terry Pratchett]
%e passage
%passage 3
'The world is full of things worth more than gold. But we dig the damn stuff up and then bury it in a different hole. Where's the sense in that? What are we, magpies? Good heavens, /potatoes/ are worth more than gold!'
'Surely not!'
'If you were shipwrecked on a desert island, what would you prefer, a bag of potatoes or a bag of gold?'
'Yes, but a desert island isn't Ankh-Morpork!'
'And that proves gold is only valuable because we agree it is, right? It's just a dream. But a potato is always worth a potato, anywhere. A knob of butter and a pinch of salt and you've got a meal, /anywhere/. Bury gold in the ground and you'll be worrying about thieves for ever. Bury a potato and in due season you could be looking at a dividend of a thousand per cent.'
[Making Money, by Terry Pratchett]
%e passage
%e title
#
#
#
%title Unseen Academicals (1)
%passage 1
Unseen Academicals, by Terry Pratchett
%e passage
%e title
#
#
#
%title I Shall Wear Midnight (1)
%passage 1
I Shall Wear Midnight, by Terry Pratchett
%e passage
%e title
#
#
#
%title Snuff (1)
%passage 1
Snuff, by Terry Pratchett
%e passage
%e title
#
#
#
%title Raising Steam (1)
%passage 1
Raising Steam, by Terry Pratchett
%e passage
%e title
%e section
#-----------------------------------------------------
# Currently this section is not used. It is added
# to illustrate how these could be added and adapted
# should they be useful for something
#
%section Death
%title Death Quotes (2)
%passage 1
WHERE THE FIRST PRIMAL CELL WAS, THERE WAS I ALSO. WHERE MAN IS, THERE AM I.
WHEN THE LAST LIFE CRAWLS UNDER FREEZING STARS, THERE WILL I BE.
%e passage
%passage 2
I AM DEATH, NOT TAXES. *I* TURN UP ONLY ONCE.
%e passage
%e title
%e section

View File

@@ -3284,16 +3284,6 @@ successors originally by \fBDaniel Thaler\fP and then by \fBAlex Smith\fP,
and Dynahack by \fBTung Nguyen\fP. Some of those variants continue to be
developed, maintained, and enjoyed by the community to this day.
.pg
In September 2014, an interim snapshot of the code under development was
released publicly by other parties. Since that code was a work-in-progress
and had not gone through a period of debugging, it was decided that the
version numbers present on that code snapshot would be retired and never
used in an official NetHack release. An announcement was posted on the
devteam's official nethack.org website to that effect, stating that there
would never be a 3.4.4, 3.5, or 3.5.0 official release version.
.pg
In January 2015, preparation began for the release of NetHack 3.6
.pg
At the beginning of development for what would eventually get released
as 3.6.0, the development team consisted of \fBWarwick Allison\fP,
\fBMichael Allison\fP, \fBKen Arromdee\fP,
@@ -3302,13 +3292,24 @@ as 3.6.0, the development team consisted of \fBWarwick Allison\fP,
\fBMike Stephenson\fP, \fBJanet Walz\fP, and \fBPaul Winner\fP.
Leading up to the release of 3.6.0 in early 2015, new members
\fBSean Hunt\fP, \fBPasi Kallinen\fP, and \fBDerek S. Ray\fP
joined the NetHack development team,
joined the NetHack development team.
.pg
\fB3.6.0 TODO insert apprpriate description of 3.6.0 here
In September 2014, an interim snapshot of the code under development was
released publicly by other parties. Since that code was a work-in-progress
and had not gone through a period of debugging, it was decided that the
version numbers present on that code snapshot would be retired and never
used in an official NetHack release. An announcement was posted on the
devteam's official nethack.org website to that effect, stating that there
would never be a 3.4.4, 3.5, or 3.5.0 official release version.
.pg
In January 2015, preparation began for the release of NetHack 3.6. The 3.6
version merges work done by the development team since the previous release with
some of the beloved community patches. Many bugs were fixed and some code was
restructured.
.pg
\fBThe development team, as well as \fBSteve VanDevender\fP and
\fBKevin Smolkowski\fP ensured that NetHack 3.6.0 continued to operate on
various Unix flavors as well as maintaining the X11 interface.
various Unix flavors and maintained the X11 interface.
.pg
\fBKen Lorber\fP, \fBHaoyang Wang\fP, \fBPat Rankin\fP, and \fBDean Luick\fP
maintained the port of NetHack 3.6.0 for Mac.
@@ -3319,8 +3320,6 @@ NetHack 3.6.0 for Microsoft Windows.
.pg
\fBJeff Bailey\fP created and maintained a port of NetHack 3.6.0 for Chrome.
.pg
TODO \fBAlex Kompel\fP maintained a port of NetHack 3.6.0 to Windows Phone.
.pg
\fBThis version of the game is special in a particular way. Near the end of
the development of 3.6, one of the significant inspirations for many of the
humorous and fun features found in the game, author \fBTerry Pratchett\fP,

View File

@@ -3955,6 +3955,18 @@ originally by Daniel Thaler and then by Alex Smith, and
Dynahack by Tung Nguyen. Some of those variants continue to be developed,
maintained, and enjoyed by the community to this day.
%.pg
\medskip
At the beginning of development for what would eventually get released
as 3.6.0, the development team consisted of {\it Warwick Allison},
{\it Michael Allison}, {\it Ken Arromdee},
{\it David Cohrs}, {\it Jessie Collet},
{\it Ken Lorber}, {\it Dean Luick}, {\it Pat Rankin},
{\it Mike Stephenson}, {\it Janet Walz}, and {\it Paul Winner}.
Leading up to the release of 3.6.0 in early 2015, new members
{\it Sean Hunt}, {\it Pasi Kallinen}, and {\it Derek S. Ray}
joined the NetHack development team.
%.pg
\medskip
In September 2014, an interim snapshot of the code under development was
@@ -3967,30 +3979,18 @@ would never be a 3.4.4, 3.5, or 3.5.0 official release version.
%.pg
\medskip
In January 2015, preparation began for the release of NetHack 3.6
%.pg
\medskip
At the beginning of development for what would eventually get released
as 3.6.0, the development team consisted of {\it Warwick Allison},
{\it Michael Allison}, {\it Ken Arromdee},
{\it David Cohrs}, {\it Jessie Collet},
{\it Ken Lorber}, {\it Dean Luick}, {\it Pat Rankin},
{\it Mike Stephenson}, {\it Janet Walz}, and {\it Paul Winner}.
Leading up to the release of 3.6.0 in early 2015, new members
{\it Sean Hunt}, {\it Pasi Kallinen}, and {\it Derek S. Ray}
joined the NetHack development team,
%.pg
\medskip
3.6.0 TODO insert apprpriate description of 3.6.0 here
In January 2015, preparation began for the release of NetHack 3.6.
The 3.6 version merges work done by the development team since the previous
release with some of the beloved community patches. Many bugs were fixed
and some code was restructured.
%.pg
\medskip
The development team, as well as {\it Steve VanDevender} and
{\it Kevin Smolkowski} ensured that NetHack 3.6.0 continued to operate on
various Unix flavors as well as maintaining the X11 interface.
various Unix flavors and maintained the X11 interface.
%.pg
{\it Ken Lorber}, {\it Haoyang Wang}, {\it Pat Rankin}, and {\it Dean Luick}
maintained the port of NetHack 3.6.0 for Mac.
@@ -4004,10 +4004,6 @@ NetHack 3.6.0 for Microsoft Windows.
\medskip
{\it Jeff Bailey} created and maintained a port of NetHack 3.6.0 for Chrome.
%.pg
\medskip
{\it Alex Kompel} maintained a port of NetHack 3.6.0 to Windows Phone. <FIXME>?
%.pg
\medskip
This version of the game is special in a particular way. Near the end of

View File

@@ -1116,6 +1116,7 @@ added new hallucinatory-only gods
options to create the character blind or nudist
moving clouds on the plane of air
disclose extinct species alongside genocided ones
tribute to Terry Pratchett
Platform- and/or Interface-Specific New Features

View File

@@ -78,6 +78,14 @@ struct polearm_info {
unsigned m_id; /* monster id of hitmon, in save file */
};
struct tribute_info {
size_t tributesz; /* make it possible to skip this in future */
boolean enabled; /* Do we have tributes turned on? */
Bitfield(bookstock,1); /* Have we stocked the book? */
/* Markers for other tributes can go here */
/* 31 free bits */
};
struct context_info {
unsigned ident; /* social security number for each monster */
unsigned no_of_wizards; /* 0, 1 or 2 (wizard and his shadow) */
@@ -109,6 +117,7 @@ struct context_info {
struct takeoff_info takeoff;
struct warntype_info warntype;
struct polearm_info polearm;
struct tribute_info tribute;
};
extern NEARDATA struct context_info context;

View File

@@ -394,6 +394,8 @@ E const char *NDECL(roguename);
E struct obj *FDECL(realloc_obj,
(struct obj *, int, genericptr_t, int, const char *));
E char *FDECL(coyotename, (struct monst *,char *));
E const char *FDECL(noveltitle, (int *));
E const char *FDECL(lookup_novel, (const char *, int *));
/* ### do_wear.c ### */
@@ -749,6 +751,7 @@ E void NDECL(really_close);
#ifdef DEBUG
E boolean FDECL(showdebug, (const char *));
#endif
E void FDECL(read_tribute, (const char *,const char *,int));
/* ### fountain.c ### */

View File

@@ -33,6 +33,7 @@
#define EPITAPHFILE "epitaph" /* random epitaphs on graves */
#define ENGRAVEFILE "engrave" /* random engravings on the floor */
#define BOGUSMONFILE "bogusmon" /* hallucinatory monsters */
#define TRIBUTEFILE "tribute" /* 3.6 tribute to Terry Pratchett */
#define LEV_EXT ".lev" /* extension for special level files */

View File

@@ -108,6 +108,7 @@ struct obj {
int corpsenm; /* type of corpse is mons[corpsenm] */
#define leashmon corpsenm /* gets m_id of attached pet */
#define fromsink corpsenm /* a potion from a sink */
#define novelidx corpsenm /* 3.6.0 tribute - the index of the novel title */
#define record_achieve_special corpsenm
int usecount; /* overloaded for various things that tally */
#define spestudied usecount /* # of times a spellbook has been studied */

View File

@@ -489,6 +489,8 @@ newgame()
context.stethoscope_move = -1L;
context.warnlevel = 1;
context.next_attrib_check = 600L; /* arbitrary first setting */
context.tribute.enabled = TRUE; /* turn on 3.6 tributes */
context.tribute.tributesz = sizeof(struct tribute_info);
for (i = 0; i < NUMMONS; i++)
mvitals[i].mvflags = mons[i].geno & G_NOCORPSE;

View File

@@ -1,4 +1,4 @@
/* NetHack 3.5 do_name.c $NHDT-Date: 1426558927 2015/03/17 02:22:07 $ $NHDT-Branch: master $:$NHDT-Revision: 1.53 $ */
/* NetHack 3.5 do_name.c $NHDT-Date: 1428196077 2015/04/05 01:07:57 $ $NHDT-Branch: nhmall-booktribute $:$NHDT-Revision: 1.64 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -474,6 +474,12 @@ register struct obj *obj;
const char *aname;
short objtyp;
/* Do this now because there's no point in even asking for a name */
if (obj->otyp == SPE_NOVEL) {
pline("%s already has a published name.", Ysimple_name2(obj));
return;
}
Sprintf(qbuf, "What do you want to name %s ",
is_plural(obj) ? "these" : "this");
(void)safe_qbuf(qbuf, qbuf, "?", obj, xname, simpleonames, "item");
@@ -1152,4 +1158,55 @@ char *buf;
return buf;
}
/* make sure "The Colour of Magic" remains the first entry in here */
static const char * const sir_Terry_novels[] = {
"The Colour of Magic", "The Light Fantastic", "Equal Rites",
"Mort", "Sourcery", "Wyrd Sisters", "Pyramids", "Guards! Guards!",
"Eric", "Moving Pictures", "Reaper Man", "Witches Abroad",
"Small Gods", "Lords and Ladies", "Men at Arms", "Soul Music",
"Interesting Times", "Maskerade", "Feet of Clay", "Hogfather",
"Jingo", "The Last Continent", "Carpe Jugulum", "The Fifth Elephant",
"The Truth", "Thief of Time", "The Last Hero",
"The Amazing Maurice and his Educated Rodents", "Night Watch",
"The Wee Free Men", "Monstrous Regiment", "A Hat Full of Sky",
"Going Postal", "Thud!", "Wintersmith", "Making Money",
"Unseen Academicals", "I Shall Wear Midnight", "Snuff",
"Raising Steam", "The Shepherd's Crown"
};
const char *
noveltitle(novidx)
int *novidx;
{
int j, k = SIZE(sir_Terry_novels)-1;
j = rn2(k);
if (novidx) {
if (*novidx == -1) *novidx = j;
else if ((*novidx >= 0) && (*novidx <= k)) j = *novidx;
}
return sir_Terry_novels[j];
}
const char *
lookup_novel(lookname, idx)
const char *lookname;
int *idx;
{
int k;
/* Take American or U.K. spelling of this one */
if (strcmpi(lookname, "The Color of Magic") == 0)
lookname = sir_Terry_novels[0];
for (k = 0; k < SIZE(sir_Terry_novels); ++k) {
if (strcmpi(lookname, sir_Terry_novels[k]) == 0) {
if (idx) *idx = k;
return sir_Terry_novels[k];
}
}
return (const char *)0;
}
/*do_name.c*/

View File

@@ -3329,4 +3329,152 @@ const char *filename;
}
#endif /*DEBUG*/
/* ---------- BEGIN TRIBUTE ----------- */
/* 3.6 tribute code */
#define SECTIONSCOPE 1
#define TITLESCOPE 2
#define PASSAGESCOPE 3
void
read_tribute(tribsection, tribtitle, tribpassage)
const char *tribsection, *tribtitle;
int tribpassage;
{
dlb *fp;
char *endp;
char line[BUFSZ];
int scopes[4] = {0, SECTIONSCOPE, TITLESCOPE, PASSAGESCOPE};
int scope = 0, section = 0, passage = 0, book = 0;
int linect = 0, passagecnt = 0, targetpassage = 0, textcnt = 0;
char *sectionnm = "", *booknm = "";
const char *badtranslation = "an incomprehensible foreign translation";
boolean matchedsection = FALSE, matchedtitle = FALSE;
winid tribwin = WIN_ERR;
/* check for mandatories */
if (!tribsection || !tribtitle) {
pline("It's %s of \"%s\"!",
badtranslation, tribtitle);
return;
}
debugpline3("read_tribute %s, %s, %d.", tribsection, tribtitle, tribpassage);
fp = dlb_fopen(TRIBUTEFILE, "r");
if (!fp) {
/* this is actually an error - cannot open tribute file! */
pline("You feel too overwhelmed to continue!");
return;
}
/*
* Syntax (not case-sensitive):
* %section books
*
* In the books section:
* %title booktitle(n)
* where booktitle=book title
* (n)= total number of passages present for this title
* %passage n
* where n=sequential passage number
*
* %e ends the passage/book/section
* If in a passage, it marks the end of that passage.
* If in a book, it marks the end of that book.
* If in a section, it marks the end of that section.
*
* %section death
*/
while (dlb_fgets(line, sizeof line, fp) != 0) {
linect++;
if ((endp = index(line, '\n')) != 0) *endp = 0;
switch (line[0]) {
case '%':
if (!strncmpi(&line[1], "section ", sizeof("section ")-1)) {
char *st = &line[9]; /* 9 from "%section " */
scope = SECTIONSCOPE;
if (!strcmpi(st, tribsection))
matchedsection = TRUE;
else
matchedsection = FALSE;
} else if (!strncmpi(&line[1], "title ", sizeof("title ")-1)) {
char *st = &line[7]; /* 7 from "%title " */
char *p1, *p2;
if ((p1 = index(st, '(')) != 0) {
*p1++ = '\0';
(void)mungspaces(st);
if ((p2 = index(p1, ')')) != 0) {
*p2 = '\0';
passagecnt = atoi(p1);
/* sanity check here caps #passages at 50 */
if ((passagecnt > 0) && (passagecnt < 50)) {
scope = TITLESCOPE;
if (matchedsection && !strcmpi(st, tribtitle)) {
matchedtitle = TRUE;
if (!tribpassage) {
targetpassage = rnd(passagecnt);
} else {
if (tribpassage <= passagecnt)
targetpassage = tribpassage;
else
targetpassage = 0;
}
} else {
matchedtitle = FALSE;
}
}
}
}
} else if (!strncmpi(&line[1], "passage ", sizeof("passage ")-1)) {
int passagenum = 0;
char *st = &line[9]; /* 9 from "%passage " */
while(*st == ' ' || *st == '\t') st++;
if (*st && digit(*st) && (strlen(st) < 3))
passagenum = atoi(st);
if (passagenum && (passagenum <= passagecnt)) {
scope = PASSAGESCOPE;
if (matchedtitle && (passagenum == targetpassage))
tribwin = create_nhwindow(NHW_MENU);
}
} else if (!strncmpi(&line[1], "e ", sizeof("e ")-1)) {
if (matchedtitle && (scope == PASSAGESCOPE) && tribwin != WIN_ERR)
goto cleanup;
if (scope == TITLESCOPE) matchedtitle = FALSE;
if (scope == SECTIONSCOPE) matchedsection = FALSE;
if (scope) --scope;
} else {
debugpline1("tribute file error: bad %% command, line %d.",
linect);
}
break;
case '#':
/* comment only, next! */
break;
default:
if (matchedtitle && (scope == PASSAGESCOPE) && tribwin != WIN_ERR)
putstr(tribwin, 0, line);
}
}
cleanup:
(void) dlb_fclose(fp);
if (tribwin != WIN_ERR) {
if (matchedtitle && (scope == PASSAGESCOPE))
display_nhwindow(tribwin, FALSE);
destroy_nhwindow(tribwin);
tribwin = WIN_ERR;
u.uconduct.literate++;
} else {
pline("It seems to be %s of \"%s\"!",
badtranslation, tribtitle);
}
return;
}
/* ---------- END TRIBUTE ----------- */
/*files.c*/

View File

@@ -869,6 +869,13 @@ boolean artif;
/* case TIN: */
set_corpsenm(otmp, otmp->corpsenm);
break;
case SPE_NOVEL:
{
int novidx = -1;
otmp = oname(otmp, noveltitle(&novidx));
otmp->novelidx = novidx;
}
break;
}
/* unique objects may have an associated artifact entry */

View File

@@ -1626,8 +1626,8 @@ register struct monst *mtmp;
}
if(mtmp->iswiz) wizdead();
if(mtmp->data->msound == MS_NEMESIS) nemdead();
if(mtmp->data == &mons[PM_MEDUSA])
u.uachieve.killed_medusa = 1;
if(mtmp->data == &mons[PM_MEDUSA])
u.uachieve.killed_medusa = 1;
if(glyph_is_invisible(levl[mtmp->mx][mtmp->my].glyph))
unmap_object(mtmp->mx, mtmp->my);
m_detach(mtmp, mptr);

View File

@@ -827,6 +827,9 @@ SPELL("freeze sphere", "hardcover", P_MATTER_SPELL, 20, 2, 1, 1, NODIR, CLR
#endif
/* blank spellbook must come last because it retains its description */
SPELL("blank paper", "plain", P_NONE, 18, 0, 0, 0, 0, HI_PAPER),
/* tribute book for 3.6 */
OBJECT(OBJ("novel", "paperback"), BITS(0,0,1,0,0,0,0,1,0,0,0,P_NONE,HI_PAPER), 0,
SPBOOK_CLASS, 0, 0, 0, 1, 0, 0, 0, 1, 20, CLR_BRIGHT_BLUE),
/* a special, one of a kind, spellbook */
OBJECT(OBJ("Book of the Dead", "papyrus"), BITS(0,0,1,0,1,0,1,1,0,0,0,P_NONE,PAPER), 0,
SPBOOK_CLASS, 0, 0,20, 10000, 0, 0, 0, 7, 20, HI_PAPER),

View File

@@ -465,7 +465,18 @@ unsigned cxn_flags; /* bitmask of CXN_xxx values */
Sprintf(buf, "%s wand", dn);
break;
case SPBOOK_CLASS:
if (!dknown) {
if (typ == SPE_NOVEL) { /* 3.6 tribute */
if (!dknown)
Strcpy(buf, "book");
else if (nn)
Strcpy(buf, actualn);
else if (un)
Sprintf(buf, "novel called %s", un);
else
Sprintf(buf, "%s book", dn);
break;
/* end of tribute */
} else if (!dknown) {
Strcpy(buf, "spellbook");
} else if (nn) {
if (typ != SPE_BOOK_OF_THE_DEAD)
@@ -3044,6 +3055,15 @@ typfnd:
}
}
if (typ && wizard) {
if (typ == SPE_NOVEL) {
if (name && !lookup_novel(name, (int *)0)) {
pline("There's no novel by that name.");
return ((struct obj *)0);
}
}
}
/*
* Create the object, then fine-tune it.
*/
@@ -3236,6 +3256,18 @@ typfnd:
aname = artifact_name(name, &objtyp);
if (aname && objtyp == otmp->otyp) name = aname;
/* 3.6.0 tribute - fix up novel */
if (otmp->otyp == SPE_NOVEL) {
int novidx = 0;
const char *novelname;
novelname = lookup_novel(name, &novidx);
if (novelname) {
otmp->novelidx = novidx;
name = novelname;
}
}
otmp = oname(otmp, name);
if (otmp->oartifact) {
otmp->quan = 1L;

View File

@@ -320,9 +320,11 @@ doread()
#endif
/* Actions required to win the game aren't counted towards conduct */
/* Novel conduct is handled in read_tribute so exclude it too*/
if (scroll->otyp != SPE_BOOK_OF_THE_DEAD &&
scroll->otyp != SPE_BLANK_PAPER &&
scroll->otyp != SCR_BLANK_PAPER)
scroll->otyp != SCR_BLANK_PAPER &&
scroll->otyp != SPE_NOVEL)
u.uconduct.literate++;
if(scroll->oclass == SPBOOK_CLASS) {

View File

@@ -1,4 +1,4 @@
/* NetHack 3.5 shknam.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
/* NetHack 3.5 shknam.c $NHDT-Date: 1428207608 2015/04/05 04:20:08 $ $NHDT-Branch: nhmall-booktribute $:$NHDT-Revision: 1.32 $ */
/* NetHack 3.5 shknam.c $Date: 2011/04/15 01:55:42 $ $Revision: 1.24 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -10,7 +10,7 @@
STATIC_DCL boolean FDECL(veggy_item, (struct obj *obj,int));
STATIC_DCL int NDECL(shkveg);
STATIC_DCL void FDECL(mkveggy_at, (int,int));
STATIC_DCL void FDECL(mkshobj_at, (const struct shclass *,int,int));
STATIC_DCL void FDECL(mkshobj_at, (const struct shclass *,int,int,BOOLEAN_P));
STATIC_DCL void FDECL(nameshk, (struct monst *,const char * const *));
STATIC_DCL int FDECL(shkinit, (const struct shclass *,struct mkroom *));
@@ -357,15 +357,24 @@ int sx, sy;
}
STATIC_OVL void
mkshobj_at(shp, sx, sy)
mkshobj_at(shp, sx, sy, mkspecl)
/* make an object of the appropriate type for a shop square */
const struct shclass *shp;
int sx, sy;
boolean mkspecl;
{
struct monst *mtmp;
int atype;
struct permonst *ptr;
/* 3.6.0 tribute */
if (mkspecl && (!strcmp(shp->name, "rare books") ||
!strcmp(shp->name, "second-hand bookstore"))) {
struct obj *novel=mksobj_at(SPE_NOVEL, sx, sy, FALSE, FALSE);
if (novel) context.tribute.bookstock = TRUE;
return;
}
if (rn2(100) < depth(&u.uz) &&
!MON_AT(sx, sy) && (ptr = mkclass(S_MIMIC,0)) &&
(mtmp = makemon(ptr,sx,sy,NO_MM_FLAGS)) != 0) {
@@ -572,7 +581,8 @@ register struct mkroom *sroom;
* shop-style placement (all squares except a row nearest the first
* door get objects).
*/
register int sx, sy, sh;
int sx, sy, sh;
int stockcount = 0, specialspot = 0;
char buf[BUFSZ];
int rmno = (int)((sroom - rooms) + ROOMOFFSET);
const struct shclass *shp = &shtypes[shp_indx];
@@ -608,6 +618,29 @@ register struct mkroom *sroom;
make_engr_at(m, n, buf, 0L, DUST);
}
if (context.tribute.enabled && !context.tribute.bookstock) {
/*
* Out of the number of spots where we're actually
* going to put stuff, randomly single out one in particular.
*/
for (sx = sroom->lx; sx <= sroom->hx; sx++)
for (sy = sroom->ly; sy <= sroom->hy; sy++) {
if (sroom->irregular) {
if (levl[sx][sy].edge || (int)levl[sx][sy].roomno != rmno ||
distmin(sx, sy, doors[sh].x, doors[sh].y) <= 1)
continue;
}
else if ((sx == sroom->lx && doors[sh].x == sx - 1) ||
(sx == sroom->hx && doors[sh].x == sx + 1) ||
(sy == sroom->ly && doors[sh].y == sy - 1) ||
(sy == sroom->hy && doors[sh].y == sy + 1)) continue;
stockcount++;
}
specialspot = rnd(stockcount);
stockcount = 0;
}
for(sx = sroom->lx; sx <= sroom->hx; sx++)
for(sy = sroom->ly; sy <= sroom->hy; sy++) {
if(sroom->irregular) {
@@ -618,7 +651,8 @@ register struct mkroom *sroom;
(sx == sroom->hx && doors[sh].x == sx+1) ||
(sy == sroom->ly && doors[sh].y == sy-1) ||
(sy == sroom->hy && doors[sh].y == sy+1)) continue;
mkshobj_at(shp, sx, sy);
stockcount++;
mkshobj_at(shp, sx, sy, ((stockcount) && (stockcount == specialspot)));
}
/*

View File

@@ -411,8 +411,8 @@ int
study_book(spellbook)
register struct obj *spellbook;
{
register int booktype = spellbook->otyp;
register boolean confused = (Confusion != 0);
int booktype = spellbook->otyp;
boolean confused = (Confusion != 0);
boolean too_hard = FALSE;
/* attempting to read dull book may make hero fall asleep */
@@ -440,7 +440,8 @@ register struct obj *spellbook;
/* handle the sequence: start reading, get interrupted,
have context.spbook.book become erased somehow, resume reading it */
booktype != SPE_BLANK_PAPER) {
You("continue your efforts to memorize the spell.");
You("continue your efforts to %s.", (booktype == SPE_NOVEL) ?
"read the novel" : "memorize the spell");
} else {
/* KMH -- Simplified this code */
if (booktype == SPE_BLANK_PAPER) {
@@ -448,6 +449,16 @@ register struct obj *spellbook;
makeknown(booktype);
return(1);
}
/* 3.6.0 tribute */
if (booktype == SPE_NOVEL) {
/* Obtain current Terry Pratchett book
title for the current game. */
const char *tribtitle = noveltitle(&spellbook->novelidx);
read_tribute("books", tribtitle, 0);
return(1);
}
switch (objects[booktype].oc_level) {
case 1:
case 2:

View File

@@ -1,4 +1,4 @@
/* NetHack 3.5 trap.c $NHDT-Date: 1427934551 2015/04/02 00:29:11 $ $NHDT-Branch: master $:$NHDT-Revision: 1.223 $ */
/* NetHack 3.5 trap.c $NHDT-Date: 1428207616 2015/04/05 04:20:16 $ $NHDT-Branch: nhmall-booktribute $:$NHDT-Revision: 1.224 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -3205,6 +3205,10 @@ boolean force;
pline("Steam rises from %s.", the(xname(obj)));
return 0;
}
if (obj->otyp == SPE_NOVEL) {
obj->novelidx = 0;
free_oname(obj);
}
obj->otyp = SPE_BLANK_PAPER;
obj->dknown = 0;
if (carried(obj))

View File

@@ -1,4 +1,4 @@
/* NetHack 3.5 zap.c $NHDT-Date: 1427782839 2015/03/31 06:20:39 $ $NHDT-Branch: master $:$NHDT-Revision: 1.200 $ */
/* NetHack 3.5 zap.c $NHDT-Date: 1428207622 2015/04/05 04:20:22 $ $NHDT-Branch: nhmall-booktribute $:$NHDT-Revision: 1.215 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -955,7 +955,9 @@ register struct obj *obj;
obj->spe = 0;
break;
case SPBOOK_CLASS:
if (otyp != SPE_CANCELLATION && otyp != SPE_BOOK_OF_THE_DEAD) {
if (otyp != SPE_CANCELLATION &&
otyp != SPE_NOVEL &&
otyp != SPE_BOOK_OF_THE_DEAD) {
costly_alteration(obj, COST_CANCEL);
obj->otyp = SPE_BLANK_PAPER;
}

View File

@@ -1,5 +1,5 @@
# NetHack Makefile.
# NetHack 3.5 Makefile.top $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$
# NetHack 3.5 Makefile.top $NHDT-Date: 1428453876 2015/04/08 00:44:36 $ $NHDT-Branch: nhmall-booktribute $:$NHDT-Revision: 1.25 $
# NetHack 3.5 Makefile.top $Date: 2012/01/10 17:47:30 $ $Revision: 1.19 $
# Root of source tree:
@@ -87,7 +87,7 @@ SPEC_LEVS = asmodeus.lev baalz.lev bigrm-*.lev castle.lev fakewiz?.lev \
QUEST_LEVS = ???-goal.lev ???-fil?.lev ???-loca.lev ???-strt.lev
DATNODLB = $(VARDATND) license
DATDLB = $(DATHELP) dungeon $(SPEC_LEVS) $(QUEST_LEVS) $(VARDATD)
DATDLB = $(DATHELP) dungeon tribute $(SPEC_LEVS) $(QUEST_LEVS) $(VARDATD)
DAT = $(DATNODLB) $(DATDLB)
$(GAME):

View File

@@ -1,4 +1,4 @@
# NetHack 3.5 Makefile.msc $NHDT-Date: 1426967393 2015/03/21 19:49:53 $ $NHDT-Branch: master $:$NHDT-Revision: 1.72 $ */
# NetHack 3.5 Makefile.msc $NHDT-Date: 1427076358 2015/03/23 02:05:58 $ $NHDT-Branch: nhmall-booktribute $:$NHDT-Revision: 1.75 $ */
# Copyright (c) NetHack PC Development Team 1993-2015
#
#==============================================================================
@@ -679,6 +679,7 @@ all : install
install: envchk $(GAME) $(O)install.tag
@echo Done.
$(O)install.tag: $(DAT)\data $(DAT)\rumors $(DAT)\dungeon \
$(DAT)\oracles $(DAT)\quest.dat $(O)sp_lev.tag $(DLB)
! IF ("$(USE_DLB)"=="Y")
@@ -1099,7 +1100,7 @@ $(DAT)\porthelp: $(MSWSYS)\porthelp
nhdat: $(U)dlb_main.exe $(DAT)\data $(DAT)\oracles $(OPTIONS_FILE) \
$(DAT)\quest.dat $(DAT)\rumors $(DAT)\help $(DAT)\hh $(DAT)\cmdhelp \
$(DAT)\history $(DAT)\opthelp $(DAT)\wizhelp $(DAT)\dungeon $(DAT)\porthelp \
$(DAT)\license $(DAT)\engrave $(DAT)\epitaph $(DAT)\bogusmon $(O)sp_lev.tag
$(DAT)\license $(DAT)\engrave $(DAT)\epitaph $(DAT)\bogusmon $(DAT)\tribute $(O)sp_lev.tag
cd $(DAT)
echo data >dlb.lst
echo oracles >>dlb.lst
@@ -1112,6 +1113,7 @@ nhdat: $(U)dlb_main.exe $(DAT)\data $(DAT)\oracles $(OPTIONS_FILE) \
echo engrave >>dlb.lst
echo epitaph >>dlb.lst
echo bogusmon >>dlb.lst
echo tribute >>dlb.lst
echo help >>dlb.lst
echo hh >>dlb.lst
echo cmdhelp >>dlb.lst

View File

@@ -1,4 +1,4 @@
/* NetHack 3.5 winmenu.c $NHDT-Date: 1427881480 2015/04/01 09:44:40 $ $NHDT-Branch: master $:$NHDT-Revision: 1.5 $ */
/* NetHack 3.5 winmenu.c $NHDT-Date: 1428828477 2015/04/12 08:47:57 $ $NHDT-Branch: master $:$NHDT-Revision: 1.7 $ */
/* SCCS Id: @(#)winmenu.c 3.5 1996/08/15 */
/* Copyright (c) Dean Luick, 1992 */
/* NetHack may be freely redistributed. See license for details. */
@@ -248,9 +248,13 @@ menu_key(w, event, params, num_params)
return;
} else if (ch == MENU_SEARCH) { /* search */
if (menu_info->how == PICK_ANY || menu_info->how == PICK_ONE) {
char buf[BUFSZ];
X11_getlin("Search for:", buf);
if (!*buf || *buf == '\033') return;
char buf[BUFSZ+2], tmpbuf[BUFSZ];
X11_getlin("Search for:", tmpbuf);
if (!*tmpbuf || *tmpbuf == '\033') return;
/* convert "string" into "*string*" for use with pmatch() */
Sprintf(buf, "*%s*", tmpbuf);
if (menu_info->how == PICK_ANY) {
invert_match(wp, buf);
return;
@@ -394,10 +398,12 @@ menu_search(w, client_data, call_data)
{
struct xwindow *wp = (struct xwindow *) client_data;
struct menu_info_t *menu_info = wp->menu_information;
char buf[BUFSZ+2], tmpbuf[BUFSZ];
char buf[BUFSZ];
X11_getlin("Search for:", buf);
if (!*buf || *buf == '\033') return;
X11_getlin("Search for:", tmpbuf);
if (!*tmpbuf || *tmpbuf == '\033') return;
/* convert "string" into "*string*" for use with pmatch() */
Sprintf(buf, "*%s*", tmpbuf);
if (menu_info->how == PICK_ANY)
invert_match(wp, buf);
@@ -478,7 +484,7 @@ invert_all(wp)
static void
invert_match(wp, match)
struct xwindow *wp;
char *match;
char *match; /* wildcard pattern for pmatch() */
{
x11_menu_item *curr;
int count;
@@ -487,7 +493,7 @@ invert_match(wp, match)
reset_menu_count(wp->menu_information);
for (count = 0, curr = wp->menu_information->curr_menu.base; curr;
curr = curr->next, count++)
if (curr->identifier.a_void != 0 && strstri(curr->str, match)) {
if (curr->identifier.a_void != 0 && pmatchi(match, curr->str)) {
invert_line(wp, curr, count, -1L);
changed = TRUE;
}
@@ -502,7 +508,7 @@ invert_match(wp, match)
static void
select_match(wp, match)
struct xwindow *wp;
char *match;
char *match; /* wildcard pattern for pmatch() */
{
x11_menu_item *curr;
int count;
@@ -510,11 +516,12 @@ select_match(wp, match)
reset_menu_count(wp->menu_information);
for (count = 0, curr = wp->menu_information->curr_menu.base; curr;
curr = curr->next, count++)
if (curr->identifier.a_void != 0 && strstri(curr->str, match)) {
if (curr->identifier.a_void != 0 && pmatchi(match, curr->str)) {
if (!curr->selected) {
invert_line(wp, curr, count, -1L);
#ifndef USE_FWF
XawListChange(wp->w, wp->menu_information->curr_menu.list_pointer,
XawListChange(wp->w,
wp->menu_information->curr_menu.list_pointer,
0, 0, True);
#endif
}

View File

@@ -7006,7 +7006,26 @@ P = (108, 145, 182)
MMMMMMMJJJAAMMMM
MMMMMMMMMMMMMMMM
}
# tile 368 (papyrus / Book of the Dead)
# tile 368 (paperback / novel)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
MMMMEEEEMMMMMMMM
MMMMEEEEEEMMMMMM
MMMEEEEEEEEEEMMM
MMMEEEEEEEEEBMMM
MMEEEEEEEEEEOAMM
MMEEEEEEEEEBOAAM
MEEEEEEEEEEOEAMM
MEEEEEEEEEBOAAMM
MEOOEEEEEEOEAMMM
MMEEOOOEEBOAAMMM
MMMMEEEOOOEAMMMM
MMMMMMMEEEAAMMMM
MMMMMMMMMMMMMMMM
}
# tile 369 (papyrus / Book of the Dead)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7025,7 +7044,7 @@ P = (108, 145, 182)
MMMMMMMAAAMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 369 (glass / light)
# tile 370 (glass / light)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7044,7 +7063,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 370 (balsa / secret door detection)
# tile 371 (balsa / secret door detection)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7063,7 +7082,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 371 (crystal / enlightenment)
# tile 372 (crystal / enlightenment)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7082,7 +7101,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 372 (maple / create monster)
# tile 373 (maple / create monster)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7101,7 +7120,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 373 (pine / wishing)
# tile 374 (pine / wishing)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7120,7 +7139,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 374 (oak / nothing)
# tile 375 (oak / nothing)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7139,7 +7158,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 375 (ebony / striking)
# tile 376 (ebony / striking)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7158,7 +7177,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 376 (marble / make invisible)
# tile 377 (marble / make invisible)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7177,7 +7196,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 377 (tin / slow monster)
# tile 378 (tin / slow monster)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7196,7 +7215,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 378 (brass / speed monster)
# tile 379 (brass / speed monster)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7215,7 +7234,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 379 (copper / undead turning)
# tile 380 (copper / undead turning)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7234,7 +7253,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 380 (silver / polymorph)
# tile 381 (silver / polymorph)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7253,7 +7272,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 381 (platinum / cancellation)
# tile 382 (platinum / cancellation)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7272,7 +7291,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 382 (iridium / teleportation)
# tile 383 (iridium / teleportation)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7291,7 +7310,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 383 (zinc / opening)
# tile 384 (zinc / opening)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7310,7 +7329,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 384 (aluminum / locking)
# tile 385 (aluminum / locking)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7329,7 +7348,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 385 (uranium / probing)
# tile 386 (uranium / probing)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7348,7 +7367,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 386 (iron / digging)
# tile 387 (iron / digging)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7367,7 +7386,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 387 (steel / magic missile)
# tile 388 (steel / magic missile)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7386,7 +7405,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 388 (hexagonal / fire)
# tile 389 (hexagonal / fire)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7405,7 +7424,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 389 (short / cold)
# tile 390 (short / cold)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7424,7 +7443,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 390 (runed / sleep)
# tile 391 (runed / sleep)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7443,7 +7462,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 391 (long / death)
# tile 392 (long / death)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMNOM
@@ -7462,7 +7481,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 392 (curved / lightning)
# tile 393 (curved / lightning)
{
MMMMMMMMMMMMMMMM
MMMMMMMNOMMMMMMM
@@ -7481,7 +7500,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 393 (forked)
# tile 394 (forked)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7500,7 +7519,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 394 (spiked)
# tile 395 (spiked)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7519,7 +7538,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 395 (jeweled)
# tile 396 (jeweled)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7538,7 +7557,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 396 (gold piece)
# tile 397 (gold piece)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7557,7 +7576,7 @@ P = (108, 145, 182)
MMMMMMMMMHAMMMMM
MMMMMMMMMMMHAMMM
}
# tile 397 (white / dilithium crystal)
# tile 398 (white / dilithium crystal)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7576,7 +7595,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 398 (white / diamond)
# tile 399 (white / diamond)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7595,7 +7614,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 399 (red / ruby)
# tile 400 (red / ruby)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7614,7 +7633,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 400 (orange / jacinth)
# tile 401 (orange / jacinth)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7633,7 +7652,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 401 (blue / sapphire)
# tile 402 (blue / sapphire)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7652,7 +7671,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 402 (black / black opal)
# tile 403 (black / black opal)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7671,7 +7690,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 403 (green / emerald)
# tile 404 (green / emerald)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7690,7 +7709,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 404 (green / turquoise)
# tile 405 (green / turquoise)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7709,7 +7728,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 405 (yellow / citrine)
# tile 406 (yellow / citrine)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7728,7 +7747,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 406 (green / aquamarine)
# tile 407 (green / aquamarine)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7747,7 +7766,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 407 (yellowish brown / amber)
# tile 408 (yellowish brown / amber)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7766,7 +7785,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 408 (yellowish brown / topaz)
# tile 409 (yellowish brown / topaz)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7785,7 +7804,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 409 (black / jet)
# tile 410 (black / jet)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7804,7 +7823,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 410 (white / opal)
# tile 411 (white / opal)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7823,7 +7842,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 411 (yellow / chrysoberyl)
# tile 412 (yellow / chrysoberyl)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7842,7 +7861,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 412 (red / garnet)
# tile 413 (red / garnet)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7861,7 +7880,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 413 (violet / amethyst)
# tile 414 (violet / amethyst)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7880,7 +7899,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 414 (red / jasper)
# tile 415 (red / jasper)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7899,7 +7918,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 415 (violet / fluorite)
# tile 416 (violet / fluorite)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7918,7 +7937,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 416 (black / obsidian)
# tile 417 (black / obsidian)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7937,7 +7956,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 417 (orange / agate)
# tile 418 (orange / agate)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7956,7 +7975,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 418 (green / jade)
# tile 419 (green / jade)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7975,7 +7994,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 419 (white / worthless piece of white glass)
# tile 420 (white / worthless piece of white glass)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -7994,7 +8013,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 420 (blue / worthless piece of blue glass)
# tile 421 (blue / worthless piece of blue glass)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -8013,7 +8032,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 421 (red / worthless piece of red glass)
# tile 422 (red / worthless piece of red glass)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -8032,7 +8051,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 422 (yellowish brown / worthless piece of yellowish brown glass)
# tile 423 (yellowish brown / worthless piece of yellowish brown glass)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -8051,7 +8070,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 423 (orange / worthless piece of orange glass)
# tile 424 (orange / worthless piece of orange glass)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -8070,7 +8089,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 424 (yellow / worthless piece of yellow glass)
# tile 425 (yellow / worthless piece of yellow glass)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -8089,7 +8108,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 425 (black / worthless piece of black glass)
# tile 426 (black / worthless piece of black glass)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -8108,7 +8127,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 426 (green / worthless piece of green glass)
# tile 427 (green / worthless piece of green glass)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -8127,7 +8146,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 427 (violet / worthless piece of violet glass)
# tile 428 (violet / worthless piece of violet glass)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -8146,7 +8165,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 428 (gray / luckstone)
# tile 429 (gray / luckstone)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -8165,7 +8184,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 429 (gray / loadstone)
# tile 430 (gray / loadstone)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -8184,7 +8203,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 430 (gray / touchstone)
# tile 431 (gray / touchstone)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -8203,7 +8222,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 431 (gray / flint)
# tile 432 (gray / flint)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -8222,7 +8241,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 432 (rock)
# tile 433 (rock)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -8241,7 +8260,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 433 (boulder)
# tile 434 (boulder)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -8260,7 +8279,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 434 (statue)
# tile 435 (statue)
{
MMMMMMMMMMMMMMMM
MMMMMMMMJJMMMMMM
@@ -8279,7 +8298,7 @@ P = (108, 145, 182)
MMMMMJJJJJJAAMMM
MMMMMMMMMMMMMMMM
}
# tile 435 (heavy iron ball)
# tile 436 (heavy iron ball)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -8298,7 +8317,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 436 (iron chain)
# tile 437 (iron chain)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -8317,7 +8336,7 @@ P = (108, 145, 182)
MMMMMMMMMMMPPMPA
MMMMMMMMMMMMAAMM
}
# tile 437 (splash of venom / blinding venom)
# tile 438 (splash of venom / blinding venom)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
@@ -8336,7 +8355,7 @@ P = (108, 145, 182)
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM
}
# tile 438 (splash of venom / acid venom)
# tile 439 (splash of venom / acid venom)
{
MMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM

View File

@@ -1,4 +1,4 @@
/* NetHack 3.5 wintty.c $NHDT-Date: 1428394244 2015/04/07 08:10:44 $ $NHDT-Branch: master $:$NHDT-Revision: 1.84 $ */
/* NetHack 3.5 wintty.c $NHDT-Date: 1428828474 2015/04/12 08:47:54 $ $NHDT-Branch: master $:$NHDT-Revision: 1.85 $ */
/* NetHack 3.5 wintty.c $Date: 2012/01/22 06:27:09 $ $Revision: 1.66 $ */
/* Copyright (c) David Cohrs, 1991 */
/* NetHack may be freely redistributed. See license for details. */
@@ -1664,20 +1664,24 @@ struct WinDesc *cw;
tty_nhbell();
break;
} else {
char searchbuf[BUFSZ], tmpbuf[BUFSZ];
char searchbuf[BUFSZ+2], tmpbuf[BUFSZ];
boolean on_curr_page = FALSE;
int lineno = 0;
tty_getlin("Search for:", tmpbuf);
if (!tmpbuf[0] || tmpbuf[0] == '\033') break;
Sprintf(searchbuf, "*%s*", tmpbuf);
for (curr = cw->mlist; curr; curr = curr->next) {
if (on_curr_page) lineno++;
if (curr == page_start)
on_curr_page = TRUE;
else if (curr == page_end)
on_curr_page = FALSE;
if (curr->identifier.a_void && pmatch(searchbuf, curr->str)) {
toggle_menu_curr(window, curr, lineno, on_curr_page, counting, count);
if (curr->identifier.a_void
&& pmatchi(searchbuf, curr->str)) {
toggle_menu_curr(window, curr, lineno,
on_curr_page, counting, count);
if (cw->how == PICK_ONE) {
finished = TRUE;
break;