From c9013bdc6a1b37e8abdf8b7f13dc4673b8e536a1 Mon Sep 17 00:00:00 2001 From: PatR Date: Wed, 10 Jun 2015 16:23:19 -0700 Subject: [PATCH 1/5] tribute passage 'summary' When reading a passage from a tribute novel, put the final attribution line "[$TITLE, by Terry Pratchett]" into message history, comparable to the summary line for deliver-by-window quest messages. --- dat/tribute | 2 +- src/files.c | 19 +++++++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/dat/tribute b/dat/tribute index cee54b7f0..7c081388b 100644 --- a/dat/tribute +++ b/dat/tribute @@ -479,7 +479,7 @@ There's a fifth element, and generally it's called Surprise. # The Last Hero has never been released in the U.S. (or anywhere?) as a # conventional mass market paperback. The large (roughly 10" by 12") # trade paperback contains many full page color illustrations and most -# text pages include decorations of varying degress of elaborateness. +# text pages include decorations of varying degrees of elaborateness. # The actual text is probably only novella length. # %title The Last Hero (7) diff --git a/src/files.c b/src/files.c index 697a1fdd1..ed361c159 100644 --- a/src/files.c +++ b/src/files.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 files.c $NHDT-Date: 1432512772 2015/05/25 00:12:52 $ $NHDT-Branch: master $:$NHDT-Revision: 1.173 $ */ +/* NetHack 3.6 files.c $NHDT-Date: 1433978592 2015/06/10 23:23:12 $ $NHDT-Branch: master $:$NHDT-Revision: 1.175 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -3398,7 +3398,7 @@ int tribpassage; { dlb *fp; char *endp; - char line[BUFSZ]; + char line[BUFSZ], lastline[BUFSZ]; int scope = 0; int linect = 0, passagecnt = 0, targetpassage = 0; @@ -3442,6 +3442,7 @@ int tribpassage; * %section death */ + *line = *lastline = '\0'; while (dlb_fgets(line, sizeof line, fp) != 0) { linect++; if ((endp = index(line, '\n')) != 0) @@ -3515,16 +3516,26 @@ int tribpassage; /* comment only, next! */ break; default: - if (matchedtitle && (scope == PASSAGESCOPE) && tribwin != WIN_ERR) + if (matchedtitle && scope == PASSAGESCOPE && tribwin != WIN_ERR) { putstr(tribwin, 0, line); + Strcpy(lastline, line); + } } } cleanup: (void) dlb_fclose(fp); if (tribwin != WIN_ERR) { - if (matchedtitle && (scope == PASSAGESCOPE)) + if (matchedtitle && scope == PASSAGESCOPE) { display_nhwindow(tribwin, FALSE); + /* put the final attribution line into message history, + analogous to the summary line from long quest messages */ + if (index(lastline, '[')) + mungspaces(lastline); /* to remove leading spaces */ + else /* construct one if necessary */ + Sprintf(lastline, "[%s, by Terry Pratchett]", tribtitle); + putmsghistory(lastline, FALSE); + } destroy_nhwindow(tribwin); tribwin = WIN_ERR; grasped = TRUE; From 4c3abcbd11cc7d64df85591771a170b1433b589e Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 10 Jun 2015 20:36:17 -0400 Subject: [PATCH 2/5] more tribute quotes Changes to be committed: modified: dat/tribute --- dat/tribute | 181 +++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 151 insertions(+), 30 deletions(-) diff --git a/dat/tribute b/dat/tribute index 7c081388b..00e14e6c6 100644 --- a/dat/tribute +++ b/dat/tribute @@ -11,8 +11,6 @@ # %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. @@ -23,10 +21,10 @@ 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. + + [The Colour of Magic, by Terry Pratchett] %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.' @@ -42,6 +40,8 @@ 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. + + [The Colour of Magic, by Terry Pratchett] %e passage 2 %e title # @@ -49,8 +49,6 @@ edge. # %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.' @@ -62,10 +60,10 @@ 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.' + + [The Light Fantastic, by Terry Pratchett] %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. @@ -82,17 +80,46 @@ 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.' +THE BOTTOM OF THIS IF IT KILLS ME. FIGURATIVELY SPEAKING OF COURSE.' + + [The Light Fantastic, by Terry Pratchett] %e passage 2 %e title # # # -%title Equal Rites (1) +%title Equal Rites (3) %passage 1 -Equal Rites, by Terry Pratchett +...it is well known that a vital ingredient of success is not knowing that +what you're attempting can't be done. + [Equal Rites, by Terry Pratchett] +%e passage +%passage 2 +Million-to-one chances...crop up nine times out of ten. + [Equal Rites, by Terry Pratchett] +%e passage +%passage 3 +Animal minds are simple, and therefore sharp. Animals never spend time +dividing experience into little bits and speculating about all the bits +they've missed. The whole panoply of the universe has been neatly +expressed to them as things to (a) mate with, (b) eat, (c) run away from, +and (d) rocks. This frees the mind from unnecessary thoughts and gives +it a cutting edge where it matters. Your normal animal, in fact, never +tries to walk and chew gum at the same time. + +The average human, on the other hand, thinks about all sorts of things +around the clock, on all sorts of levels, with interruptions from dozens +of biological calendars and timepieces. There's thoughts about to be said, +and private thoughts, and real thoughts, and thoughts about thoughts, and +a whole gamut of subconscious thoughts. To a telepath the human head is +a din. It is a railway terminus with all the Tannoys talking at once. +It is a complete FM waveband- and some of those stations aren't reputable, +they're outlawed pirates on forbidden seas who play late-night records with +limbic lyrics. + + [Equal Rites, by Terry Pratchett] %e passage %e title # @@ -130,17 +157,23 @@ and the trouble with dying in the attempt was that you died in the attempt. %passage 1 Destiny is important, see, but people go wrong when they think it controls them. It's the other way around. + [Wyrd Sisters, by Terry Pratchett] %e passage %e title # # # -%title Pyramids (1) +%title Pyramids (2) %passage 1 -Pyramids, by Terry Pratchett +The trouble with life was that you didn't get a chance to practice before doing it for real. + [Pyramids, by Terry Pratchett] +%e passage +%passage 2 +Mere animals couldn't possibly manage to act like this. You need to be a human being to be really stupid. + [Pyramids, by Terry Pratchett] %e passage %e title # @@ -167,6 +200,7 @@ through an innocent bystander a hundred yards away instead of the innocent bysta %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 @@ -175,6 +209,8 @@ through an innocent bystander a hundred yards away instead of the innocent bysta 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. + + [Terry Pratchett, Eric] %e passage %e title # @@ -184,10 +220,12 @@ through an innocent bystander a hundred yards away instead of the innocent bysta %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 @@ -196,10 +234,14 @@ through an innocent bystander a hundred yards away instead of the innocent bysta 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".' + + [Terry Pratchett, Moving Pictures] %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.' + + [Terry Pratchett, Moving Pictures] %e passage %e title # @@ -226,11 +268,16 @@ managed it from the cat. # # # -%title Small Gods (1) +%title Small Gods (2) %passage 1 -Small Gods, by Terry Pratchett +He says gods like to see an atheist around. Gives them something to aim at. + [Small Gods, by Terry Pratchett] +%e passage +%passage 2 +Pets are always a great help in times of stress. And in times of starvation too, o'course. + [Small Gods, by Terry Pratchett] %e passage %e title # @@ -238,9 +285,20 @@ Small Gods, by Terry Pratchett # %title Lords and Ladies (1) %passage 1 -Lords and Ladies, by Terry Pratchett +Elves are wonderful. They provoke wonder. +Elves are marvellous. They cause marvels. +Elves are fantastic. They create fantasies. +Elves are glamorous. They project glamour. +Elves are enchanting. They weave enchantment. +Elves are terrific. They beget terror. +The thing about words is that meanings can twist just like a snake, +and if you want to find snakes look for them behind words that have +changed their meaning. +No one ever said elves are nice. +Elves are bad. + [Lords and Ladies, by Terry Pratchett] %e passage %e title # @@ -256,21 +314,42 @@ The maze was so small that people got lost looking for it. # # # -%title Soul Music (1) +%title Soul Music (2) %passage 1 -Soul Music, by Terry Pratchett +But this didn't feel like magic. It felt a lot older than that. It felt like music + [Soul Music, by Terry Pratchett] +%e passage +%passage 2 +"Yes," said the skull. "Quit while you're a head, that's what I say." + [Soul Music, by Terry Pratchett] %e passage %e title # # # -%title Interesting Times (1) +%title Interesting Times (2) %passage 1 -Interesting Times, by Terry Pratchett +Whatever happens, they say afterwards, it must have been fate. +People are always a little confused about this, as they are in +the case of miracles. When someone is saved from certain death +by a strange concatenation of circumstances, they say that's a +miracle. But of course if someone is killed by a freak chain of +events -- the oil spilled just there, the safety fence broken +just there -- that must also be a miracle. Just because it's +not nice doesn't mean it's not miraculous. + [Interesting Times, by Terry Pratchett] +%e passage +%passage 2 +"Oh, no," said the Lecturer in Recent Runes, pushing his chair back. +"Not that. That's meddling with things you don't understand." +"Well, we are wizards," said Ridcully. "We're supposed to meddle in +things we don't understand. If we hung around waitin' till we +understood things we'd never get anything done." + [Interesting Times, by Terry Pratchett] %e passage %e title # @@ -439,6 +518,8 @@ they sometimes bought books full of complicated recipes and interesting pictures, and sometimes when they were really hungry they created vast banquets in their imagination - but at the end of the day they'd settle quite happily for egg and chips, if it was well done and maybe had a slice of tomato. + + [The Fifth Elephant, by Terry Pratchett] %e passage %e title # @@ -696,11 +777,19 @@ Why bother with a cunning plan when a simple one will do? # # # -%title Wintersmith (1) +%title Wintersmith (2) %passage 1 -Wintersmith, by Terry Pratchett +That's Third Thoughts for you. +When a huge rock is going to land on your head, +they're the thoughts that think: +Is that an igneous rock, such as granite, or is it sandstone? + [Wintersmith, by Terry Pratchett] +%e passage +%passage 2 +They say that there can never be two snowflakes that are exactly alike, but has anyone checked lately? + [Wintersmith, by Terry Pratchett] %e passage %e title # @@ -734,39 +823,71 @@ Making Money, by Terry Pratchett # %title Unseen Academicals (1) %passage 1 -Unseen Academicals, by Terry Pratchett - +Be one of the crowd? It went against everything a wizard stood for, +and a wizard would not stand for anything if he could sit down for it, +but even sitting down, you had to stand out. + [Unseen Academicals, by Terry Pratchett] %e passage %e title # # # -%title I Shall Wear Midnight (1) +%title I Shall Wear Midnight (2) %passage 1 -I Shall Wear Midnight, by Terry Pratchett +It is important that we know where we come from, +because if you do not know where you come from, +then you don't know where you are, +and if you don't know where you are, +you don't know where you're going. +And if you don't know where you're going, you're probably going wrong. + [I Shall Wear Midnight, by Terry Pratchett] +%e passage +%passage 2 +There have been times, lately, when I dearly wished that I +could change the past. Well, I can’t, but I can change the +present, so that when it becomes the past it will turn out +to be a past worth having. + + [I Shall Wear Midnight, by Terry Pratchett] %e passage %e title # # # -%title Snuff (1) +%title Snuff (2) %passage 1 -Snuff, by Terry Pratchett +They were crude weapons, to be sure, but a flint axe hitting your head does not need a degree in physics. + [Snuff, by Terry Pratchett] +%e passage +%passage 2 +It is a strange thing to find yourself doing something you +have apparently always wanted to do, when in fact up until +that moment you had never known that you always wanted to do it... + [Snuff, by Terry Pratchett] %e passage %e title # # # -%title Raising Steam (1) +%title Raising Steam (2) %passage 1 -Raising Steam, by Terry Pratchett +Yesterday you never thought about it and after today you +don’t know what you would do without it. +That was what the technology was doing. +It was your slave but, in a sense, it might be the other way round. + [Raising Steam, by Terry Pratchett] +%e passage +%passage 2 +If you take enough precautions, you never need to take precautions. + + [Raising Steam, by Terry Pratchett] %e passage %e title %e section From 00d25adab2ac360b902a237692bac33af62796b7 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 10 Jun 2015 20:48:29 -0400 Subject: [PATCH 3/5] actual field is always around anyway Changes to be committed: modified: include/flag.h --- include/flag.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/flag.h b/include/flag.h index 5e9d33996..b86dcad4a 100644 --- a/include/flag.h +++ b/include/flag.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 flag.h $NHDT-Date: 1433212171 2015/06/02 02:29:31 $ $NHDT-Branch: status_hilite $:$NHDT-Revision: 1.85 $ */ +/* NetHack 3.6 flag.h $NHDT-Date: 1433983706 2015/06/11 00:48:26 $ $NHDT-Branch: master $:$NHDT-Revision: 1.86 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -329,9 +329,7 @@ struct instance_flags { #ifdef TTY_GRAPHICS #define eight_bit_tty wc_eight_bit_input #endif -#ifdef TEXTCOLOR #define use_color wc_color -#endif #define hilite_pet wc_hilite_pet #define use_inverse wc_inverse #ifdef MAC_GRAPHICS_ENV From 0fd193838abfc9c9534e1fe5c75821a7636ee76a Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 10 Jun 2015 20:52:03 -0400 Subject: [PATCH 4/5] punctuation in dat/tribute --- dat/tribute | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dat/tribute b/dat/tribute index 00e14e6c6..d60bba5d8 100644 --- a/dat/tribute +++ b/dat/tribute @@ -847,7 +847,7 @@ And if you don't know where you're going, you're probably going wrong. %e passage %passage 2 There have been times, lately, when I dearly wished that I -could change the past. Well, I can’t, but I can change the +could change the past. Well, I can't, but I can change the present, so that when it becomes the past it will turn out to be a past worth having. @@ -877,7 +877,7 @@ that moment you had never known that you always wanted to do it... %title Raising Steam (2) %passage 1 Yesterday you never thought about it and after today you -don’t know what you would do without it. +don't know what you would do without it. That was what the technology was doing. It was your slave but, in a sense, it might be the other way round. From a3b1833ab99af931b680980695f31d8814540250 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 10 Jun 2015 21:07:19 -0400 Subject: [PATCH 5/5] menucolors Error reported in display.c in current master code is gone, but the menucolors stuff generated the following warnings when TEXTCOLOR wasn't defined. ..\win\tty\wintty.c(1688) : warning C4013: 'term_start_color' undefined; assuming extern returning int ..\win\tty\wintty.c(1711) : warning C4013: 'term_end_color' undefined; assuming extern returning int --- win/tty/wintty.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/win/tty/wintty.c b/win/tty/wintty.c index 50c0ffb67..9aebed158 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 wintty.c $NHDT-Date: 1433806618 2015/06/08 23:36:58 $ $NHDT-Branch: master $:$NHDT-Revision: 1.104 $ */ +/* NetHack 3.6 wintty.c $NHDT-Date: 1433984834 2015/06/11 01:07:14 $ $NHDT-Branch: master $:$NHDT-Revision: 1.106 $ */ /* Copyright (c) David Cohrs, 1991 */ /* NetHack may be freely redistributed. See license for details. */ @@ -1684,8 +1684,10 @@ struct WinDesc *cw; && (menucolr = get_menu_coloring(curr->str, &color, &attr))) { term_start_attr(attr); +#ifdef TEXTCOLOR if (color != NO_COLOR) term_start_color(color); +#endif } else term_start_attr(curr->attr); for (n = 0, cp = curr->str; @@ -1707,8 +1709,10 @@ struct WinDesc *cw; } else (void) putchar(*cp); if (iflags.use_menu_color && menucolr) { +#ifdef TEXTCOLOR if (color != NO_COLOR) term_end_color(); +#endif term_end_attr(attr); } else term_end_attr(curr->attr);